mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 14:45:25 +00:00
process tree
This commit is contained in:
parent
509ecfa82f
commit
68122c0a28
@ -122,12 +122,6 @@ export const ebpfStore = defineStore({
|
|||||||
|
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
// if (eBPFSchedules[0]) {
|
|
||||||
// this.currentSchedule = eBPFSchedules[0];
|
|
||||||
// this.getEBPFAnalyze({ scheduleIdList: eBPFSchedules[0].segmentId });
|
|
||||||
// } else {
|
|
||||||
// this.currentSchedule = null;
|
|
||||||
// }
|
|
||||||
return res.data;
|
return res.data;
|
||||||
},
|
},
|
||||||
async getEBPFAnalyze(params: {
|
async getEBPFAnalyze(params: {
|
||||||
@ -142,17 +136,17 @@ export const ebpfStore = defineStore({
|
|||||||
this.analyzeTrees = [];
|
this.analyzeTrees = [];
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
const { analyze, tip } = res.data.data;
|
const { analysisEBPFResult, tip } = res.data.data;
|
||||||
if (tip) {
|
if (tip) {
|
||||||
this.analyzeTrees = [];
|
this.analyzeTrees = [];
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!analyze) {
|
if (!analysisEBPFResult) {
|
||||||
this.analyzeTrees = [];
|
this.analyzeTrees = [];
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
this.analyzeTrees = analyze.trees;
|
this.analyzeTrees = analysisEBPFResult.trees[0].elements;
|
||||||
return res.data;
|
return res.data;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -17,14 +17,14 @@ limitations under the License. -->
|
|||||||
<TaskList />
|
<TaskList />
|
||||||
<div class="vis-graph ml-5">
|
<div class="vis-graph ml-5">
|
||||||
<EBPFSchedules />
|
<EBPFSchedules />
|
||||||
<EBPFTree />
|
<EBPFStack />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import TaskList from "./components/TaskList.vue";
|
import TaskList from "./components/TaskList.vue";
|
||||||
import EBPFSchedules from "./components/EBPFSchedules.vue";
|
import EBPFSchedules from "./components/EBPFSchedules.vue";
|
||||||
import EBPFTree from "./components/EBPFTree.vue";
|
import EBPFStack from "./components/EBPFStack.vue";
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.content {
|
.content {
|
||||||
|
@ -65,7 +65,7 @@ import { useEbpfStore } from "@/store/modules/ebpf";
|
|||||||
import { EBPFProfilingSchedule, Process } from "@/types/ebpf";
|
import { EBPFProfilingSchedule, Process } from "@/types/ebpf";
|
||||||
import { DataSet, Timeline } from "vis-timeline/standalone";
|
import { DataSet, Timeline } from "vis-timeline/standalone";
|
||||||
import "vis-timeline/styles/vis-timeline-graph2d.css";
|
import "vis-timeline/styles/vis-timeline-graph2d.css";
|
||||||
import type { ElTable } from "element-plus";
|
import { ElMessage, ElTable } from "element-plus";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const ebpfStore = useEbpfStore();
|
const ebpfStore = useEbpfStore();
|
||||||
@ -133,6 +133,13 @@ async function analyzeEBPF() {
|
|||||||
scheduleIdList,
|
scheduleIdList,
|
||||||
timeRanges,
|
timeRanges,
|
||||||
});
|
});
|
||||||
|
if (res.data.errors) {
|
||||||
|
ElMessage.error(res.data.errors);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (res.data.analysisEBPFResult.tip) {
|
||||||
|
ElMessage.info(res.data.analysisEBPFResult.tip);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function visTimeline() {
|
function visTimeline() {
|
||||||
|
58
src/views/dashboard/related/ebpf/components/EBPFStack.vue
Normal file
58
src/views/dashboard/related/ebpf/components/EBPFStack.vue
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<!-- Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License. -->
|
||||||
|
<template>
|
||||||
|
<div>tree</div>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { watch } from "vue";
|
||||||
|
import { useEbpfStore } from "@/store/modules/ebpf";
|
||||||
|
|
||||||
|
const ebpfStore = useEbpfStore();
|
||||||
|
|
||||||
|
function sortArr(arr: any[]) {
|
||||||
|
const copyArr = JSON.parse(JSON.stringify(arr));
|
||||||
|
const obj: any = {};
|
||||||
|
const res = [];
|
||||||
|
for (const item of copyArr) {
|
||||||
|
obj[item.id] = item;
|
||||||
|
}
|
||||||
|
for (const item of copyArr) {
|
||||||
|
if (item.parentId === "0") {
|
||||||
|
item.name = item.symbol;
|
||||||
|
item.value = item.dumpCount;
|
||||||
|
res.push(item);
|
||||||
|
}
|
||||||
|
for (const key in obj) {
|
||||||
|
if (item.id === obj[key].parentId) {
|
||||||
|
obj[key].name = obj[key].symbol;
|
||||||
|
obj[key].value = obj[key].dumpCount;
|
||||||
|
if (item.children) {
|
||||||
|
item.children.push(obj[key]);
|
||||||
|
} else {
|
||||||
|
item.children = [obj[key]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(res);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
watch(
|
||||||
|
() => ebpfStore.analyzeTrees,
|
||||||
|
() => {
|
||||||
|
sortArr(ebpfStore.analyzeTrees);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
</script>
|
@ -1,17 +0,0 @@
|
|||||||
<!-- Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License. -->
|
|
||||||
<template>
|
|
||||||
<div>tree</div>
|
|
||||||
</template>
|
|
Loading…
Reference in New Issue
Block a user