mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 23:44:09 +00:00
update
This commit is contained in:
parent
447936e0bb
commit
eb58ff1d62
@ -113,7 +113,7 @@ export const networkProfilingStore = defineStore({
|
|||||||
if (res.data.errors) {
|
if (res.data.errors) {
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
this.getTaskList({
|
await this.getTaskList({
|
||||||
...param,
|
...param,
|
||||||
targets: ["NETWORK"],
|
targets: ["NETWORK"],
|
||||||
});
|
});
|
||||||
|
@ -15,17 +15,20 @@ limitations under the License. -->
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex-h content">
|
<div class="flex-h content">
|
||||||
<Tasks />
|
<Tasks />
|
||||||
<div class="vis-graph ml-5" v-show="networkProfilingStore.nodes.length">
|
<div class="vis-graph ml-5" v-if="networkProfilingStore.nodes.length">
|
||||||
<process-topology />
|
<process-topology />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="text" v-else>{{ t("noData") }}</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
import Tasks from "./components/Tasks.vue";
|
import Tasks from "./components/Tasks.vue";
|
||||||
import ProcessTopology from "./components/ProcessTopology.vue";
|
import ProcessTopology from "./components/ProcessTopology.vue";
|
||||||
import { useNetworkProfilingStore } from "@/store/modules/network-profiling";
|
import { useNetworkProfilingStore } from "@/store/modules/network-profiling";
|
||||||
|
|
||||||
const networkProfilingStore = useNetworkProfilingStore();
|
const networkProfilingStore = useNetworkProfilingStore();
|
||||||
|
const { t } = useI18n();
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.content {
|
.content {
|
||||||
@ -41,4 +44,10 @@ const networkProfilingStore = useNetworkProfilingStore();
|
|||||||
position: relative;
|
position: relative;
|
||||||
width: calc(100% - 300px);
|
width: calc(100% - 300px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
width: calc(100% - 300px);
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -133,7 +133,6 @@ async function getTopology() {
|
|||||||
fixedTriggerDuration > 1800
|
fixedTriggerDuration > 1800
|
||||||
? taskStartTime + fixedTriggerDuration * 1000 - 30 * 60 * 1000
|
? taskStartTime + fixedTriggerDuration * 1000 - 30 * 60 * 1000
|
||||||
: taskStartTime;
|
: taskStartTime;
|
||||||
|
|
||||||
const resp = await networkProfilingStore.getProcessTopology({
|
const resp = await networkProfilingStore.getProcessTopology({
|
||||||
serviceInstanceId,
|
serviceInstanceId,
|
||||||
duration: {
|
duration: {
|
||||||
@ -169,10 +168,14 @@ async function createTask() {
|
|||||||
if (!serviceInstanceId) {
|
if (!serviceInstanceId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
networkProfilingStore.createNetworkTask({
|
const res = await networkProfilingStore.createNetworkTask({
|
||||||
serviceId,
|
serviceId,
|
||||||
serviceInstanceId,
|
serviceInstanceId,
|
||||||
});
|
});
|
||||||
|
if (res.errors) {
|
||||||
|
ElMessage.error(res.errors);
|
||||||
|
}
|
||||||
|
await getTopology();
|
||||||
}
|
}
|
||||||
function enableInterval() {
|
function enableInterval() {
|
||||||
enableTasks.value = !enableTasks.value;
|
enableTasks.value = !enableTasks.value;
|
||||||
@ -202,7 +205,7 @@ async function fetchTasks() {
|
|||||||
enableTasks.value = false;
|
enableTasks.value = false;
|
||||||
return intervalFn.value && clearInterval(intervalFn.value);
|
return intervalFn.value && clearInterval(intervalFn.value);
|
||||||
}
|
}
|
||||||
getTopology();
|
await getTopology();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
Loading…
Reference in New Issue
Block a user