mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 23:45:23 +00:00
fix selector
This commit is contained in:
parent
3b921aa911
commit
30cbcd1b95
@ -295,15 +295,12 @@ async function setSourceSelector() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const pod = params.podId || selectorStore.pods[0].id;
|
const pod = params.podId || selectorStore.pods[0].id;
|
||||||
let currentPod;
|
const currentPod = selectorStore.pods.find(
|
||||||
if (states.currentPod) {
|
(d: { id: string }) => d.id === pod
|
||||||
currentPod = selectorStore.pods.find(
|
|
||||||
(d: { label: string }) => d.label === states.currentPod
|
|
||||||
);
|
);
|
||||||
} else {
|
|
||||||
currentPod = selectorStore.pods.find((d: { id: string }) => d.id === pod);
|
|
||||||
}
|
|
||||||
if (!currentPod) {
|
if (!currentPod) {
|
||||||
|
selectorStore.setCurrentProcess(null);
|
||||||
|
states.currentProcess = "";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
selectorStore.setCurrentPod(currentPod);
|
selectorStore.setCurrentPod(currentPod);
|
||||||
@ -314,16 +311,9 @@ async function setSourceSelector() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const process = params.processId || selectorStore.processes[0].id;
|
const process = params.processId || selectorStore.processes[0].id;
|
||||||
let currentProcess;
|
const currentProcess = selectorStore.processes.find(
|
||||||
if (states.currentProcess) {
|
|
||||||
currentProcess = selectorStore.processes.find(
|
|
||||||
(d: { label: string }) => d.label === states.currentProcess
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
currentProcess = selectorStore.processes.find(
|
|
||||||
(d: { id: string }) => d.id === process
|
(d: { id: string }) => d.id === process
|
||||||
);
|
);
|
||||||
}
|
|
||||||
if (currentProcess) {
|
if (currentProcess) {
|
||||||
selectorStore.setCurrentProcess(currentProcess);
|
selectorStore.setCurrentProcess(currentProcess);
|
||||||
states.currentProcess = currentProcess.label;
|
states.currentProcess = currentProcess.label;
|
||||||
@ -344,36 +334,27 @@ async function setDestSelector() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const destPod = params.destPodId || selectorStore.destPods[0].id;
|
const destPod = params.destPodId || selectorStore.destPods[0].id;
|
||||||
let currentDestPod = { label: "" };
|
const currentDestPod = selectorStore.destPods.find(
|
||||||
if (states.currentDestPod) {
|
|
||||||
currentDestPod = selectorStore.pods.find(
|
|
||||||
(d: { label: string }) => d.label === states.currentDestPod
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
currentDestPod = selectorStore.destPods.find(
|
|
||||||
(d: { id: string }) => d.id === destPod
|
(d: { id: string }) => d.id === destPod
|
||||||
);
|
);
|
||||||
}
|
|
||||||
if (!currentDestPod) {
|
if (!currentDestPod) {
|
||||||
|
states.currentDestProcess = "";
|
||||||
|
selectorStore.setCurrentProcess(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
selectorStore.setCurrentDestPod(currentDestPod);
|
selectorStore.setCurrentDestPod(currentDestPod);
|
||||||
states.currentDestPod = currentDestPod.label;
|
states.currentDestPod = currentDestPod.label;
|
||||||
const destProcess = params.destProcessId || selectorStore.destProcesses[0].id;
|
const destProcess = params.destProcessId || selectorStore.destProcesses[0].id;
|
||||||
let currentDestProcess;
|
const currentDestProcess = selectorStore.destProcesses.find(
|
||||||
if (states.currentDestProcess) {
|
|
||||||
currentDestProcess = selectorStore.destProcesses.find(
|
|
||||||
(d: { label: string }) => d.label === states.currentProcess
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
currentDestProcess = selectorStore.destProcesses.find(
|
|
||||||
(d: { id: string }) => d.id === destProcess
|
(d: { id: string }) => d.id === destProcess
|
||||||
);
|
);
|
||||||
|
if (!currentDestProcess) {
|
||||||
|
states.currentDestProcess = "";
|
||||||
|
selectorStore.setCurrentProcess(null);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (currentDestProcess) {
|
|
||||||
selectorStore.setCurrentProcess(currentDestProcess);
|
selectorStore.setCurrentProcess(currentDestProcess);
|
||||||
states.currentProcess = currentDestProcess.label;
|
states.currentDestProcess = currentDestProcess.label;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getServices() {
|
async function getServices() {
|
||||||
|
Loading…
Reference in New Issue
Block a user