diff --git a/src/store/modules/continous-profiling.ts b/src/store/modules/continous-profiling.ts index 7d77b1f2..94979a33 100644 --- a/src/store/modules/continous-profiling.ts +++ b/src/store/modules/continous-profiling.ts @@ -29,7 +29,7 @@ interface ContinousProfilingState { strategyList: Array>; selectedStrategy: Recordable; taskList: Array>; - selectedContinousTask: Recordable; + selectedTask: Recordable; errorTip: string; errorReason: string; processes: Process[]; @@ -47,7 +47,7 @@ export const continousProfilingStore = defineStore({ strategyList: [], selectedStrategy: {}, taskList: [], - selectedContinousTask: {}, + selectedTask: {}, errorReason: "", errorTip: "", ebpfTips: "", @@ -62,8 +62,8 @@ export const continousProfilingStore = defineStore({ setSelectedStrategy(task: Recordable) { this.selectedStrategy = task || {}; }, - setSelectedContinousTask(task: Recordable) { - this.selectedContinousTask = task || {}; + setselectedTask(task: Recordable) { + this.selectedTask = task || {}; }, setCurrentSchedule(s: EBPFProfilingSchedule) { this.currentSchedule = s; @@ -134,8 +134,8 @@ export const continousProfilingStore = defineStore({ return res.data; } this.taskList = res.data.data.queryEBPFTasks || []; - this.selectedContinousTask = this.taskList[0] || {}; - this.setSelectedContinousTask(this.selectedContinousTask); + this.selectedTask = this.taskList[0] || {}; + this.setselectedTask(this.selectedTask); if (!this.taskList.length) { const networkProfilingStore = useNetworkProfilingStore(); networkProfilingStore.seNodes([]); diff --git a/src/views/dashboard/related/continuous-profiling/components/GraphPanel.vue b/src/views/dashboard/related/continuous-profiling/components/GraphPanel.vue index 121c9f4c..78371970 100644 --- a/src/views/dashboard/related/continuous-profiling/components/GraphPanel.vue +++ b/src/views/dashboard/related/continuous-profiling/components/GraphPanel.vue @@ -41,7 +41,7 @@ limitations under the License. -->
@@ -98,14 +98,14 @@ limitations under the License. --> } async function analyzeTask() { - if (continousProfilingStore.selectedContinousTask.type === TargetTypes[2].value) { - await networkProfilingStore.setSelectedNetworkTask(continousProfilingStore.selectedContinousTask); + if (continousProfilingStore.selectedTask.type === TargetTypes[2].value) { + await networkProfilingStore.setSelectedNetworkTask(continousProfilingStore.selectedTask); await getTopology(); return; } const res = await continousProfilingStore.getEBPFSchedules({ - taskId: continousProfilingStore.selectedContinousTask.taskId, + taskId: continousProfilingStore.selectedTask.taskId, }); if (res.errors) { ElMessage.error(res.errors); diff --git a/src/views/dashboard/related/continuous-profiling/components/TaskList.vue b/src/views/dashboard/related/continuous-profiling/components/TaskList.vue index a0ade23b..0681eea8 100644 --- a/src/views/dashboard/related/continuous-profiling/components/TaskList.vue +++ b/src/views/dashboard/related/continuous-profiling/components/TaskList.vue @@ -30,7 +30,7 @@ limitations under the License. -->
@@ -70,7 +70,7 @@ limitations under the License. --> const viewDetail = ref(false); async function changeTask(item: EBPFTaskList) { - continousProfilingStore.setSelectedContinousTask(item); + continousProfilingStore.setselectedTask(item); }