From 1a88a14a8095b78c41c14f6c750c638e4ac74bce Mon Sep 17 00:00:00 2001 From: Fine Date: Tue, 23 Aug 2022 17:19:34 +0800 Subject: [PATCH] observe duration --- src/views/dashboard/graphs/ServiceList.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/views/dashboard/graphs/ServiceList.vue b/src/views/dashboard/graphs/ServiceList.vue index e9d6bb6a..bfeb4553 100644 --- a/src/views/dashboard/graphs/ServiceList.vue +++ b/src/views/dashboard/graphs/ServiceList.vue @@ -82,6 +82,7 @@ import type { PropType } from "vue"; import { ServiceListConfig } from "@/types/dashboard"; import { useSelectorStore } from "@/store/modules/selectors"; import { useDashboardStore } from "@/store/modules/dashboard"; +import { useAppStoreWithOut } from "@/store/modules/app"; import { Service } from "@/types/selector"; import { useQueryPodsMetrics, usePodsSource } from "@/hooks/useProcessor"; import { EntityType } from "../data"; @@ -111,6 +112,7 @@ const props = defineProps({ }); const selectorStore = useSelectorStore(); const dashboardStore = useDashboardStore(); +const appStore = useAppStoreWithOut(); const chartLoading = ref(false); const pageSize = 10; const services = ref([]); @@ -273,6 +275,14 @@ watch( queryServiceMetrics(services.value); } ); +watch( + () => appStore.durationTime, + () => { + if (dashboardStore.entity === EntityType[1].value) { + queryServices(); + } + } +);