From bb81059529a48726d5e81f6925163baef1f58b6b Mon Sep 17 00:00:00 2001 From: "@changcode" Date: Thu, 20 Oct 2022 14:41:48 +0800 Subject: [PATCH] =?UTF-8?q?CN-758=20fix:=20=E4=BF=AE=E5=A4=8DNPM=E4=B8=8B?= =?UTF-8?q?=E9=92=BB=E6=8A=98=E7=BA=BF=E5=9B=BEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../charts2/charts/npm/NpmTrafficLine.vue | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/views/charts2/charts/npm/NpmTrafficLine.vue b/src/views/charts2/charts/npm/NpmTrafficLine.vue index b3ce4f6f..92215357 100644 --- a/src/views/charts2/charts/npm/NpmTrafficLine.vue +++ b/src/views/charts2/charts/npm/NpmTrafficLine.vue @@ -64,19 +64,19 @@ export default { unitTypes, side: '', mpackets: [ - { name: 'network.total', show: true, positioning: 0, data: [], unitType: '' }, - { name: 'network.inbound', show: true, positioning: 1, data: [], unitType: '' }, - { name: 'network.outbound', show: true, positioning: 2, data: [], unitType: '' }, - { name: 'network.internal', show: true, positioning: 3, data: [], unitType: '' }, - { name: 'network.through', show: true, positioning: 4, data: [], unitType: '' }, - { name: 'network.other', show: true, positioning: 5, data: [], unitType: '' } + { name: 'network.total', show: true, positioning: 0, data: [], unitType: 'number' }, + { name: 'network.inbound', show: true, positioning: 1, data: [], unitType: 'number' }, + { name: 'network.outbound', show: true, positioning: 2, data: [], unitType: 'number' }, + { name: 'network.internal', show: true, positioning: 3, data: [], unitType: 'number' }, + { name: 'network.through', show: true, positioning: 4, data: [], unitType: 'number' }, + { name: 'network.other', show: true, positioning: 5, data: [], unitType: 'number' } ], npmQuantity: [ - { name: 'networkAppPerformance.tcpConnectionEstablishLatency', show: true, positioning: 0, data: [], unitType: '' }, - { name: 'networkAppPerformance.httpResponse', show: true, positioning: 0, data: [], unitType: '' }, - { name: 'networkAppPerformance.sslResponseLatency', show: true, positioning: 0, data: [], unitType: '' }, - { name: 'networkAppPerformance.packetLoss', show: true, positioning: 0, data: [], unitType: '' }, - { name: 'overall.packetRetrans', show: true, positioning: 0, data: [], unitType: '' } + { name: 'networkAppPerformance.tcpConnectionEstablishLatency', show: true, positioning: 0, data: [], unitType: unitTypes.time }, + { name: 'networkAppPerformance.httpResponse', show: true, positioning: 0, data: [], unitType: unitTypes.time }, + { name: 'networkAppPerformance.sslResponseLatency', show: true, positioning: 0, data: [], unitType: unitTypes.time }, + { name: 'networkAppPerformance.packetLoss', show: true, positioning: 0, data: [], unitType: unitTypes.percent }, + { name: 'overall.packetRetrans', show: true, positioning: 0, data: [], unitType: unitTypes.percent } ], chartData: {}, metricOptions: [ @@ -307,7 +307,7 @@ export default { } ]) }, - data: t.data.map(v => [Number(v[0]) * 1000, Number(v[1]), 'number']) + data: t.data.map(v => [Number(v[0]) * 1000, Number(v[1]), t.unitType]) } }) this.chartOption.tooltip.formatter = (params) => {