Skip to content

Commit bc00760

Browse files
authored
fix: fix home monitor chart loading (#12591)
1 parent e57dc12 commit bc00760

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

frontend/src/views/home/index.vue

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@
7676
<CardWithHeader
7777
:header="$t('menu.monitor')"
7878
class="card-interval chart-card"
79-
v-loading="!chartsOption['networkChart']"
8079
@mouseenter="refreshOptionsOnHover"
8180
>
8281
<template #header-r>
@@ -145,7 +144,6 @@
145144
id="ioChart"
146145
type="line"
147146
:option="chartsOption['ioChart']"
148-
v-if="chartsOption['ioChart']"
149147
:dataZoom="true"
150148
/>
151149
</div>
@@ -155,7 +153,6 @@
155153
id="networkChart"
156154
type="line"
157155
:option="chartsOption['networkChart']"
158-
v-if="chartsOption['networkChart']"
159156
:dataZoom="true"
160157
/>
161158
</div>
@@ -604,7 +601,18 @@ const currentChartInfo = reactive({
604601
});
605602
const skipNextCurrentInfoDelta = ref(false);
606603
607-
const chartsOption = ref({ ioChart1: null, networkChart: null });
604+
const chartsOption = ref({
605+
ioChart: {
606+
xData: [],
607+
yData: [],
608+
formatStr: 'MB',
609+
},
610+
networkChart: {
611+
xData: [],
612+
yData: [],
613+
formatStr: 'KB/s',
614+
},
615+
});
608616
609617
const updateCurrentInfo = (data: Dashboard.CurrentInfo) => {
610618
currentInfo.value = {

0 commit comments

Comments
 (0)