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(); },