feat: add task list

This commit is contained in:
Fine
2023-05-23 15:29:47 +08:00
parent 2c38d9c1f8
commit 1864a648dc
6 changed files with 155 additions and 6 deletions

View File

@@ -49,8 +49,6 @@ export const ControlsTypes = [
"ContinuousProfiling",
];
export enum EBPFProfilingTriggerType {
// Appoint the task executing total duration
FIXED_TIME,
// Trigger by the reach the continuous profiling policy
CONTINUOUS_PROFILING,
FIXED_TIME = "FIXED_TIME",
CONTINUOUS_PROFILING = "CONTINUOUS_PROFILING",
}

View File

@@ -23,6 +23,7 @@ import type { AxiosResponse } from "axios";
import type { Call } from "@/types/topology";
import type { LayoutConfig } from "@/types/dashboard";
import type { DurationTime } from "@/types/app";
import { EBPFProfilingTriggerType } from "../data";
interface ContinousProfilingState {
strategyList: Array<Recordable<StrategyItem>>;
@@ -156,6 +157,11 @@ export const continousProfilingStore = defineStore({
};
});
this.setSelectedStrategy(this.strategyList[0] || {});
this.getContinousTaskList({
serviceId: params.serviceId,
targets: [this.selectedStrategy.type],
triggerType: EBPFProfilingTriggerType.CONTINUOUS_PROFILING,
});
if (!this.strategyList.length) {
this.nodes = [];
this.calls = [];