From 0bf79914fe0a8a6d10d551bb27c2f0cbf1547eb2 Mon Sep 17 00:00:00 2001 From: Fine Date: Mon, 12 Jun 2023 20:43:28 +0800 Subject: [PATCH] feat: update tasks --- src/store/modules/task-timeline.ts | 5 ++++- .../dashboard/related/task-timeline/components/Timeline.vue | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/store/modules/task-timeline.ts b/src/store/modules/task-timeline.ts index 14272164..25a411a7 100644 --- a/src/store/modules/task-timeline.ts +++ b/src/store/modules/task-timeline.ts @@ -64,7 +64,10 @@ export const taskTimelineStore = defineStore({ if (res.data.errors) { return res.data; } - this.taskList = res.data.data.queryEBPFTasks || []; + const selectorStore = useSelectorStore(); + this.taskList = (res.data.data.queryEBPFTasks || []).filter( + (d: EBPFTaskList) => selectorStore.currentProcess && d.processId === selectorStore.currentProcess.id, + ); // this.selectedTask = this.taskList[0] || {}; // await this.getGraphData(); return res.data; diff --git a/src/views/dashboard/related/task-timeline/components/Timeline.vue b/src/views/dashboard/related/task-timeline/components/Timeline.vue index c9d376fb..8e4fdb66 100644 --- a/src/views/dashboard/related/task-timeline/components/Timeline.vue +++ b/src/views/dashboard/related/task-timeline/components/Timeline.vue @@ -154,7 +154,7 @@ limitations under the License. --> taskTimelineStore.setTaskList([]); }); watch( - () => selectorStore.currentPod, + () => selectorStore.currentProcess, () => { init(); },