From 29d89ee6e408d5f3d85d2b7508745cd5940b40d3 Mon Sep 17 00:00:00 2001 From: "@changcode" Date: Fri, 4 Nov 2022 10:31:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=BB=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=EF=BC=8C=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=8A=98=E7=BA=BF=E5=9B=BEReference=20line=E9=97=AA=E5=8A=A8?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../charts/dnsInsight/DnsTrafficLine.vue | 1 + .../charts/linkMonitor/LinkTrafficLine.vue | 20 +- .../LinkTrafficDrillDownLine.vue | 430 ------------------ .../networkOverview/NetworkOverviewLine.vue | 2 + 4 files changed, 17 insertions(+), 436 deletions(-) delete mode 100644 src/views/charts2/charts/linkMonitor/localComponents/LinkTrafficDrillDownLine.vue diff --git a/src/views/charts2/charts/dnsInsight/DnsTrafficLine.vue b/src/views/charts2/charts/dnsInsight/DnsTrafficLine.vue index 473395b1..fc4080db 100644 --- a/src/views/charts2/charts/dnsInsight/DnsTrafficLine.vue +++ b/src/views/charts2/charts/dnsInsight/DnsTrafficLine.vue @@ -227,6 +227,7 @@ export default { if (this.lineTab === e.class) { if (e.analysis.avg <= 0) { this.lineTab = '' + this.lineRefer = '' this.init() } } diff --git a/src/views/charts2/charts/linkMonitor/LinkTrafficLine.vue b/src/views/charts2/charts/linkMonitor/LinkTrafficLine.vue index ea561ad9..f8fcd275 100644 --- a/src/views/charts2/charts/linkMonitor/LinkTrafficLine.vue +++ b/src/views/charts2/charts/linkMonitor/LinkTrafficLine.vue @@ -112,7 +112,11 @@ export default { label: 'Packets/s' } ], - mpackets: [], + mpackets: [ + { analysis: {}, name: 'network.total', class: 'total', show: true, invertTab: true, positioning: 0, data: [], unitType: '' }, + { analysis: {}, name: 'linkMonitor.ingress', class: 'ingress', show: true, invertTab: true, positioning: 1, data: [], unitType: '' }, + { analysis: {}, name: 'linkMonitor.egress', class: 'egress', show: true, invertTab: true, positioning: 2, data: [], unitType: '' } + ], unitConvert, unitTypes, chartDateObject: [], @@ -173,11 +177,13 @@ export default { get(api.linkMonitor.totalTrafficAnalysis, params).then((res) => { if (res.code === 200) { this.isNoData = res.data.result.length === 0 - this.mpackets = [ - { analysis: {}, name: 'network.total', class: 'total', show: true, invertTab: true, positioning: 0, data: [], unitType: '' }, - { analysis: {}, name: 'linkMonitor.ingress', class: 'ingress', show: true, invertTab: true, positioning: 1, data: [], unitType: '' }, - { analysis: {}, name: 'linkMonitor.egress', class: 'egress', show: true, invertTab: true, positioning: 2, data: [], unitType: '' } - ] + if (this.isNoData) { + this.mpackets = [ + { analysis: {}, name: 'network.total', class: 'total', show: true, invertTab: true, positioning: 0, data: [], unitType: '' }, + { analysis: {}, name: 'linkMonitor.ingress', class: 'ingress', show: true, invertTab: true, positioning: 1, data: [], unitType: '' }, + { analysis: {}, name: 'linkMonitor.egress', class: 'egress', show: true, invertTab: true, positioning: 2, data: [], unitType: '' } + ] + } res.data.result.forEach((t, i) => { if (t.type === 'bytes' && val === 'Bits/s') { const mpackets = _.cloneDeep(this.mpackets) @@ -202,6 +208,7 @@ export default { if (this.lineTab === e.class) { if (e.analysis.avg <= 0) { this.lineTab = '' + this.lineRefer = '' this.init() } } @@ -242,6 +249,7 @@ export default { if (this.lineTab === e.class) { if (e.analysis.avg <= 0) { this.lineTab = '' + this.lineRefer = '' this.init() } } diff --git a/src/views/charts2/charts/linkMonitor/localComponents/LinkTrafficDrillDownLine.vue b/src/views/charts2/charts/linkMonitor/localComponents/LinkTrafficDrillDownLine.vue deleted file mode 100644 index e05c4c98..00000000 --- a/src/views/charts2/charts/linkMonitor/localComponents/LinkTrafficDrillDownLine.vue +++ /dev/null @@ -1,430 +0,0 @@ - - - diff --git a/src/views/charts2/charts/networkOverview/NetworkOverviewLine.vue b/src/views/charts2/charts/networkOverview/NetworkOverviewLine.vue index 9923b977..1a073290 100644 --- a/src/views/charts2/charts/networkOverview/NetworkOverviewLine.vue +++ b/src/views/charts2/charts/networkOverview/NetworkOverviewLine.vue @@ -220,6 +220,7 @@ export default { if (this.lineTab === e.class) { if (e.analysis.avg <= 0) { this.lineTab = '' + this.lineRefer = '' this.init() } } @@ -267,6 +268,7 @@ export default { if (this.lineTab === e.class) { if (e.analysis.avg <= 0) { this.lineTab = '' + this.lineRefer = '' this.init() } }