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

View File

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