feat: filter tasks with current process ID (#282)

This commit is contained in:
Fine0830
2023-06-13 14:48:38 +08:00
committed by GitHub
parent 62a82590c9
commit 8c9c339417
6 changed files with 34 additions and 18 deletions

View File

@@ -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;