mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-13 00:08:56 +00:00
fix: remove unused code
This commit is contained in:
parent
dfe9c54d8d
commit
fe28289bc0
@ -62,15 +62,6 @@ export const taskTimelineStore = defineStore({
|
||||
return res.data;
|
||||
}
|
||||
this.taskList = res.data.data.queryEBPFTasks || [];
|
||||
if (!this.taskList.length) {
|
||||
const networkProfilingStore = useNetworkProfilingStore();
|
||||
networkProfilingStore.seNodes([]);
|
||||
networkProfilingStore.setLinks([]);
|
||||
this.eBPFSchedules = [];
|
||||
this.analyzeTrees = [];
|
||||
this.selectedTask = {};
|
||||
return;
|
||||
}
|
||||
// this.selectedTask = this.taskList[0] || {};
|
||||
// await this.getGraphData();
|
||||
return res.data;
|
||||
@ -116,59 +107,6 @@ export const taskTimelineStore = defineStore({
|
||||
}
|
||||
return resp;
|
||||
},
|
||||
|
||||
async getEBPFSchedules(params: { taskId: string }) {
|
||||
if (!params.taskId) {
|
||||
return new Promise((resolve) => resolve({}));
|
||||
}
|
||||
// params.taskId = "71d96efb81b0be93b1322be1b17334c87d45d6216e299504a778264f94692d1b";
|
||||
const res: AxiosResponse = await graphql.query("getEBPFSchedules").params({ ...params });
|
||||
|
||||
if (res.data.errors) {
|
||||
this.eBPFSchedules = [];
|
||||
return res.data;
|
||||
}
|
||||
this.ebpftTips = "";
|
||||
const { eBPFSchedules } = res.data.data;
|
||||
|
||||
this.eBPFSchedules = eBPFSchedules;
|
||||
if (!eBPFSchedules.length) {
|
||||
this.eBPFSchedules = [];
|
||||
this.analyzeTrees = [];
|
||||
}
|
||||
return res.data;
|
||||
},
|
||||
async getEBPFAnalyze(params: {
|
||||
scheduleIdList: string[];
|
||||
timeRanges: Array<{ start: number; end: number }>;
|
||||
aggregateType: string;
|
||||
}) {
|
||||
this.aggregateType = params.aggregateType;
|
||||
if (!params.scheduleIdList.length) {
|
||||
return new Promise((resolve) => resolve({}));
|
||||
}
|
||||
if (!params.timeRanges.length) {
|
||||
return new Promise((resolve) => resolve({}));
|
||||
}
|
||||
const res: AxiosResponse = await graphql.query("getEBPFResult").params(params);
|
||||
|
||||
if (res.data.errors) {
|
||||
this.analyzeTrees = [];
|
||||
return res.data;
|
||||
}
|
||||
const { analysisEBPFResult } = res.data.data;
|
||||
this.ebpftTips = analysisEBPFResult.tip;
|
||||
if (!analysisEBPFResult) {
|
||||
this.analyzeTrees = [];
|
||||
return res.data;
|
||||
}
|
||||
if (analysisEBPFResult.tip) {
|
||||
this.analyzeTrees = [];
|
||||
return res.data;
|
||||
}
|
||||
this.analyzeTrees = analysisEBPFResult.trees;
|
||||
return res.data;
|
||||
},
|
||||
async preAnalyzeTask() {
|
||||
if (this.selectedStrategy.type === "NETWORK") {
|
||||
const networkProfilingStore = useNetworkProfilingStore();
|
||||
|
@ -82,7 +82,7 @@ limitations under the License. -->
|
||||
const taskList = taskTimelineStore.taskList.map((d: EBPFTaskList, index: number) => {
|
||||
return {
|
||||
id: index + 1,
|
||||
// content: d.triggerType,
|
||||
// content: d.targetType,
|
||||
start: new Date(Number(d.taskStartTime)),
|
||||
end: new Date(Number(d.taskStartTime + d.fixedTriggerDuration * 1000)),
|
||||
data: d,
|
||||
@ -107,8 +107,8 @@ limitations under the License. -->
|
||||
<div>Service Name: ${data.serviceName || ""}</div>
|
||||
<div>Service Instance Name: ${data.serviceInstanceName || ""}</div>
|
||||
<div>Service Process Name: ${data.processName || ""}</div>
|
||||
<div>Trigger Type: ${data.triggerType || ""}</div>
|
||||
<div>Target Type: ${data.targetType || ""}</div>
|
||||
<div>Trigger Type: ${data.triggerType || ""}</div>
|
||||
<div>Start Time: ${data.taskStartTime ? visDate(data.taskStartTime) : ""}</div>
|
||||
<div>End Time: ${end}</div>
|
||||
<div>Process Labels: ${data.processLabels.join("; ") || ""}</div>`;
|
||||
@ -150,7 +150,7 @@ limitations under the License. -->
|
||||
}
|
||||
}
|
||||
watch(
|
||||
() => selectorStore.currentPod,
|
||||
() => selectorStore.currentProcess,
|
||||
() => {
|
||||
init();
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user