From 237f0e28512690dc1bb74f51c146124eedcdfdf1 Mon Sep 17 00:00:00 2001 From: Fine Date: Sat, 17 Dec 2022 15:51:17 +0800 Subject: [PATCH] fix: instance topology --- src/store/modules/topology.ts | 6 +++--- .../dashboard/related/topology/components/PodTopology.vue | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/store/modules/topology.ts b/src/store/modules/topology.ts index 425e0ec3..2a4fbb8e 100644 --- a/src/store/modules/topology.ts +++ b/src/store/modules/topology.ts @@ -192,12 +192,12 @@ export const topologyStore = defineStore({ }, async getInstanceTopology() { const { currentService, currentDestService } = useSelectorStore(); - const serverServiceId = currentService && currentService.id; - const clientServiceId = currentDestService && currentDestService.id; + const serverServiceId = (currentService && currentService.id) || ""; + const clientServiceId = (currentDestService && currentDestService.id) || ""; + const duration = useAppStoreWithOut().durationTime; if (!(serverServiceId && clientServiceId)) { return; } - const duration = useAppStoreWithOut().durationTime; const res: AxiosResponse = await graphql.query("getInstanceTopology").params({ clientServiceId, serverServiceId, diff --git a/src/views/dashboard/related/topology/components/PodTopology.vue b/src/views/dashboard/related/topology/components/PodTopology.vue index 9804e457..cc63d346 100644 --- a/src/views/dashboard/related/topology/components/PodTopology.vue +++ b/src/views/dashboard/related/topology/components/PodTopology.vue @@ -245,7 +245,6 @@ limitations under the License. --> watch( () => [selectorStore.currentService, selectorStore.currentDestService], () => { - console.log(selectorStore.currentService); if (dashboardStore.entity !== EntityType[4].value) { return; }