fix: update process widget and query process metrics (#145)

This commit is contained in:
Fine0830
2022-08-24 17:39:40 +08:00
committed by GitHub
parent e17562a766
commit 87a5553e6d
5 changed files with 91 additions and 50 deletions

View File

@@ -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<boolean>(false);
const pageSize = 10;
const services = ref<Service[]>([]);
@@ -273,6 +275,14 @@ watch(
queryServiceMetrics(services.value);
}
);
watch(
() => appStore.durationTime,
() => {
if (dashboardStore.entity === EntityType[1].value) {
queryServices();
}
}
);
</script>
<style lang="scss" scoped>
@import "./style.scss";