get schedules

This commit is contained in:
Qiuxia Fan 2022-05-22 10:43:25 +08:00
parent 6ffd2a4673
commit a9a4a94e4e
2 changed files with 5 additions and 5 deletions

View File

@ -22,7 +22,6 @@ import {
EBPFTaskList,
AnalyzationTrees,
} from "@/types/ebpf";
import { Trace, Span } from "@/types/trace";
import { store } from "@/store";
import graphql from "@/graphql";
import { AxiosResponse } from "axios";
@ -54,7 +53,7 @@ export const ebpfStore = defineStore({
setSelectedTask(task: EBPFTaskList) {
this.selectedTask = task;
},
setCurrentSchedule(s: Trace) {
setCurrentSchedule(s: EBPFProfilingSchedule) {
this.currentSchedule = s;
},
setAnalyzeTrees(tree: AnalyzationTrees[]) {
@ -123,8 +122,8 @@ export const ebpfStore = defineStore({
this.eBPFSchedules = eBPFSchedules;
if (!eBPFSchedules.length) {
this.eBPFSchedules = [];
}
this.analyzeTrees = [];
}
return res.data;
},
async getEBPFAnalyze(params: {

View File

@ -179,7 +179,7 @@ async function analyzeEBPF() {
}
}
function visTimeline() {
function getSchedules() {
labels.value = [{ label: "All", value: "0" }];
selectedLabels.value = ["0"];
processes.value = [];
@ -199,6 +199,7 @@ function visTimeline() {
duration.value = [];
}
searchProcesses(0);
analyzeEBPF();
}
function changePage(pageIndex: number) {
@ -240,7 +241,7 @@ function searchAttribute(
watch(
() => ebpfStore.eBPFSchedules,
() => {
visTimeline();
getSchedules();
}
);
</script>