From 0b8f40bab5b2211a5a704c9e75e27f8af0d57cbb Mon Sep 17 00:00:00 2001 From: Fine Date: Wed, 7 Jun 2023 07:42:28 +0800 Subject: [PATCH] feat: update --- src/store/modules/task-timeline.ts | 6 +++++- .../dashboard/related/continuous-profiling/Content.vue | 2 +- src/views/dashboard/related/network-profiling/Content.vue | 2 +- src/views/dashboard/related/task-timeline/Content.vue | 2 +- .../related/task-timeline/components/ProfilingPanel.vue | 4 ++-- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/store/modules/task-timeline.ts b/src/store/modules/task-timeline.ts index dcf3138e..b183a820 100644 --- a/src/store/modules/task-timeline.ts +++ b/src/store/modules/task-timeline.ts @@ -20,11 +20,11 @@ import graphql from "@/graphql"; import type { AxiosResponse } from "axios"; import type { EBPFTaskList } from "@/types/ebpf"; import { useNetworkProfilingStore } from "@/store/modules/network-profiling"; -// import { EBPFProfilingTriggerType } from "../data"; interface taskTimelineState { loading: boolean; taskList: EBPFTaskList[]; + selectedTask: Recordable; } export const taskTimelineStore = defineStore({ @@ -32,8 +32,12 @@ export const taskTimelineStore = defineStore({ state: (): taskTimelineState => ({ loading: false, taskList: [], + selectedTask: {}, }), actions: { + setSelectedTask(task: Recordable) { + this.selectedTask = task || {}; + }, async getContinousTaskList(params: { serviceId: string; serviceInstanceId: string; diff --git a/src/views/dashboard/related/continuous-profiling/Content.vue b/src/views/dashboard/related/continuous-profiling/Content.vue index b1b6554e..2c0ae63b 100644 --- a/src/views/dashboard/related/continuous-profiling/Content.vue +++ b/src/views/dashboard/related/continuous-profiling/Content.vue @@ -32,7 +32,7 @@ limitations under the License. --> defineProps({ config: { type: Object as PropType, - default: () => ({ graph: {} }), + default: () => ({}), }, }); diff --git a/src/views/dashboard/related/network-profiling/Content.vue b/src/views/dashboard/related/network-profiling/Content.vue index b08055fb..26488680 100644 --- a/src/views/dashboard/related/network-profiling/Content.vue +++ b/src/views/dashboard/related/network-profiling/Content.vue @@ -34,7 +34,7 @@ limitations under the License. --> defineProps({ config: { type: Object as PropType, - default: () => ({ graph: {} }), + default: () => ({}), }, }); const networkProfilingStore = useNetworkProfilingStore(); diff --git a/src/views/dashboard/related/task-timeline/Content.vue b/src/views/dashboard/related/task-timeline/Content.vue index 2332376c..ba478ce2 100644 --- a/src/views/dashboard/related/task-timeline/Content.vue +++ b/src/views/dashboard/related/task-timeline/Content.vue @@ -27,7 +27,7 @@ limitations under the License. --> defineProps({ config: { type: Object as PropType, - default: () => ({ graph: {} }), + default: () => ({}), }, }); diff --git a/src/views/dashboard/related/task-timeline/components/ProfilingPanel.vue b/src/views/dashboard/related/task-timeline/components/ProfilingPanel.vue index 16bc8362..c4dd2971 100644 --- a/src/views/dashboard/related/task-timeline/components/ProfilingPanel.vue +++ b/src/views/dashboard/related/task-timeline/components/ProfilingPanel.vue @@ -18,11 +18,11 @@ limitations under the License. -->