fix: update

This commit is contained in:
Fine 2023-05-03 00:01:05 +08:00
parent 9bdfcc1397
commit ceb1ea8ef1

View File

@ -611,6 +611,9 @@ limitations under the License. -->
return ElMessage.error(resp.errors); return ElMessage.error(resp.errors);
} }
const pod = resp.data.endpoint || {}; const pod = resp.data.endpoint || {};
if (!pod.id) {
ElMessage.info("The Destination endpoint ID doesn't exist.");
}
selectorStore.setCurrentDestPod(pod); selectorStore.setCurrentDestPod(pod);
states.currentDestPod = pod.label; states.currentDestPod = pod.label;
} }
@ -626,6 +629,9 @@ limitations under the License. -->
if (!currentDestPod) { if (!currentDestPod) {
states.currentDestPod = ""; states.currentDestPod = "";
selectorStore.setCurrentDestPod(null); selectorStore.setCurrentDestPod(null);
ElMessage.info(
`The Destination ${params.entity === EntityType[6].value ? "endpoint" : "instance"} ID doesn't exist.`,
);
return; return;
} }
selectorStore.setCurrentDestPod(currentDestPod); selectorStore.setCurrentDestPod(currentDestPod);
@ -638,8 +644,11 @@ limitations under the License. -->
return ElMessage.error(resp.errors); return ElMessage.error(resp.errors);
} }
const pod = resp.data.endpoint || {}; const pod = resp.data.endpoint || {};
if (!pod.id) {
ElMessage.info("The endpoint ID doesn't exist.");
}
selectorStore.setCurrentPod(pod); selectorStore.setCurrentPod(pod);
states.currentPod = pod.label; states.currentPod = pod.label || "";
} }
async function updateCurrentPod() { async function updateCurrentPod() {
if (!(selectorStore.pods.length && selectorStore.pods[0])) { if (!(selectorStore.pods.length && selectorStore.pods[0])) {
@ -652,6 +661,7 @@ limitations under the License. -->
if (!currentPod) { if (!currentPod) {
selectorStore.setCurrentPod(null); selectorStore.setCurrentPod(null);
states.currentPod = ""; states.currentPod = "";
ElMessage.info(`The ${params.entity === EntityType[2].value ? "endpoint" : "instance"} ID doesn't exist.`);
return; return;
} }
selectorStore.setCurrentPod(currentPod); selectorStore.setCurrentPod(currentPod);