mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 16:45:24 +00:00
add loading
This commit is contained in:
parent
059bd9fedb
commit
c29ce4e187
@ -35,6 +35,7 @@ interface NetworkProfilingState {
|
||||
selectedMetric: Nullable<LayoutConfig>;
|
||||
activeMetricIndex: string;
|
||||
aliveNetwork: boolean;
|
||||
loadNodes: boolean;
|
||||
}
|
||||
|
||||
export const networkProfilingStore = defineStore({
|
||||
@ -51,6 +52,7 @@ export const networkProfilingStore = defineStore({
|
||||
selectedMetric: null,
|
||||
activeMetricIndex: "",
|
||||
aliveNetwork: false,
|
||||
loadNodes: false,
|
||||
}),
|
||||
actions: {
|
||||
setSelectedNetworkTask(task: EBPFTaskList) {
|
||||
@ -160,9 +162,11 @@ export const networkProfilingStore = defineStore({
|
||||
duration: any;
|
||||
serviceInstanceId: string;
|
||||
}) {
|
||||
this.loadNodes = true;
|
||||
const res: AxiosResponse = await graphql
|
||||
.query("getProcessTopology")
|
||||
.params(params);
|
||||
this.loadNodes = false;
|
||||
if (res.data.errors) {
|
||||
this.nodes = [];
|
||||
this.calls = [];
|
||||
|
@ -15,10 +15,16 @@ limitations under the License. -->
|
||||
<template>
|
||||
<div class="flex-h content">
|
||||
<Tasks />
|
||||
<div class="vis-graph ml-5" v-if="networkProfilingStore.nodes.length">
|
||||
<div
|
||||
class="vis-graph ml-5"
|
||||
v-if="networkProfilingStore.nodes.length"
|
||||
v-loading="networkProfilingStore.loadNodes"
|
||||
>
|
||||
<process-topology />
|
||||
</div>
|
||||
<div class="text" v-else>{{ t("noData") }}</div>
|
||||
<div class="text" v-else v-loading="networkProfilingStore.loadNodes">
|
||||
{{ t("noData") }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
|
Loading…
Reference in New Issue
Block a user