diff --git a/src/views/charts2/charts/dnsInsight/DnsTrafficLine.vue b/src/views/charts2/charts/dnsInsight/DnsTrafficLine.vue index da3ddeb2..80b6c0c2 100644 --- a/src/views/charts2/charts/dnsInsight/DnsTrafficLine.vue +++ b/src/views/charts2/charts/dnsInsight/DnsTrafficLine.vue @@ -125,7 +125,11 @@ export default { label: 'Maximum' } ], - mpackets: [], + mpackets: [ + { analysis: {}, name: 'network.total', class: 'total', show: true, invertTab: true, positioning: 0, data: [], unitType: '' }, + { analysis: {}, name: 'network.inbound', class: 'inbound', show: true, invertTab: true, positioning: 1, data: [], unitType: '' }, + { analysis: {}, name: 'network.outbound', class: 'outbound', show: true, invertTab: true, positioning: 2, data: [], unitType: '' } + ], unitConvert, unitTypes, chartDateObject: [], @@ -192,11 +196,13 @@ export default { get(url, 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: 'network.inbound', class: 'inbound', show: true, invertTab: true, positioning: 1, data: [], unitType: '' }, - { analysis: {}, name: 'network.outbound', class: 'outbound', 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: 'network.inbound', class: 'inbound', show: true, invertTab: true, positioning: 1, data: [], unitType: '' }, + { analysis: {}, name: 'network.outbound', class: 'outbound', 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) diff --git a/src/views/charts2/charts/linkMonitor/localComponents/LinkTrafficDrillDownLine.vue b/src/views/charts2/charts/linkMonitor/localComponents/LinkTrafficDrillDownLine.vue index c6cb813d..8132c836 100644 --- a/src/views/charts2/charts/linkMonitor/localComponents/LinkTrafficDrillDownLine.vue +++ b/src/views/charts2/charts/linkMonitor/localComponents/LinkTrafficDrillDownLine.vue @@ -101,7 +101,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: [], @@ -162,11 +166,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) diff --git a/src/views/charts2/charts/networkOverview/NetworkOverviewLine.vue b/src/views/charts2/charts/networkOverview/NetworkOverviewLine.vue index d75a272b..f2cbe295 100644 --- a/src/views/charts2/charts/networkOverview/NetworkOverviewLine.vue +++ b/src/views/charts2/charts/networkOverview/NetworkOverviewLine.vue @@ -105,7 +105,14 @@ export default { label: 'Maximum' } ], - mpackets: [], + mpackets: [ + { analysis: {}, name: 'network.total', class: 'total', show: true, invertTab: true, positioning: 0, data: [], unitType: '' }, + { analysis: {}, name: 'network.inbound', class: 'inbound', show: true, invertTab: true, positioning: 1, data: [], unitType: '' }, + { analysis: {}, name: 'network.outbound', class: 'outbound', show: true, invertTab: true, positioning: 2, data: [], unitType: '' }, + { analysis: {}, name: 'network.internal', class: 'internal', show: true, invertTab: true, positioning: 3, data: [], unitType: '' }, + { analysis: {}, name: 'network.through', class: 'through', show: true, invertTab: true, positioning: 4, data: [], unitType: '' }, + { analysis: {}, name: 'network.other', class: 'other', show: true, invertTab: true, positioning: 5, data: [], unitType: '' } + ], unitConvert, unitTypes, chartDateObject: [], @@ -174,14 +181,16 @@ export default { get(api.netWorkOverview.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: 'network.inbound', class: 'inbound', show: true, invertTab: true, positioning: 1, data: [], unitType: '' }, - { analysis: {}, name: 'network.outbound', class: 'outbound', show: true, invertTab: true, positioning: 2, data: [], unitType: '' }, - { analysis: {}, name: 'network.internal', class: 'internal', show: true, invertTab: true, positioning: 3, data: [], unitType: '' }, - { analysis: {}, name: 'network.through', class: 'through', show: true, invertTab: true, positioning: 4, data: [], unitType: '' }, - { analysis: {}, name: 'network.other', class: 'other', show: true, invertTab: true, positioning: 5, data: [], unitType: '' } - ] + if (this.isNoData) { + this.mpackets = [ + { analysis: {}, name: 'network.total', class: 'total', show: true, invertTab: true, positioning: 0, data: [], unitType: '' }, + { analysis: {}, name: 'network.inbound', class: 'inbound', show: true, invertTab: true, positioning: 1, data: [], unitType: '' }, + { analysis: {}, name: 'network.outbound', class: 'outbound', show: true, invertTab: true, positioning: 2, data: [], unitType: '' }, + { analysis: {}, name: 'network.internal', class: 'internal', show: true, invertTab: true, positioning: 3, data: [], unitType: '' }, + { analysis: {}, name: 'network.through', class: 'through', show: true, invertTab: true, positioning: 4, data: [], unitType: '' }, + { analysis: {}, name: 'network.other', class: 'other', show: true, invertTab: true, positioning: 5, data: [], unitType: '' } + ] + } res.data.result.forEach((t, i) => { if (t.type === 'bytes' && val === 'Bits/s') { const mpackets = _.cloneDeep(this.mpackets) diff --git a/src/views/charts2/charts/npm/NpmTrafficLine.vue b/src/views/charts2/charts/npm/NpmTrafficLine.vue index 252237f7..2bb53814 100644 --- a/src/views/charts2/charts/npm/NpmTrafficLine.vue +++ b/src/views/charts2/charts/npm/NpmTrafficLine.vue @@ -63,8 +63,21 @@ export default { unitConvert, unitTypes, side: '', - mpackets: [], - npmQuantity: [], + mpackets: [ + { 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: 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: [ { @@ -160,21 +173,23 @@ export default { get(api.npm.overview.trafficGraph, params).then((res) => { if (res.code === 200) { this.isNoData = res.data.result.length === 0 - this.mpackets = [ - { 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' } - ] - this.npmQuantity = [ - { 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 } - ] + if (this.isNoData) { + this.mpackets = [ + { 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' } + ] + this.npmQuantity = [ + { 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 } + ] + } res.data.result.forEach((t, i) => { if (t.type === 'bytes' && val === 'Bits/s') { const mpackets = _.cloneDeep(this.mpackets) @@ -288,14 +303,16 @@ export default { get(api.npm.overview.totalTrafficAnalysis, params).then(res => { if (res.code === 200) { this.isNoData = res.data.result.length === 0 - this.mpackets = [ - { 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' } - ] + if (this.isNoData) { + this.mpackets = [ + { 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' } + ] + } res.data.result.forEach((t, i) => { if (t.type === 'bytes' && val === 'Bits/s') { const mpackets = _.cloneDeep(this.mpackets) @@ -346,11 +363,13 @@ export default { get(api.npm.overview.totalNetworkAnalysis, params).then(res => { if (res.code === 200) { this.isNoData = res.data.result.length === 0 - this.npmQuantity = [ - { name: 'networkAppPerformance.tcpConnectionEstablishLatency', 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 } - ] + if (this.isNoData) { + this.npmQuantity = [ + { name: 'networkAppPerformance.tcpConnectionEstablishLatency', 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 } + ] + } res.data.result.forEach((t, i) => { if (t.type === 'establishLatencyMs' && val === 'establishLatencyMs') { const npmQuantity = _.cloneDeep(this.npmQuantity) @@ -401,9 +420,11 @@ export default { get(api.npm.overview.totalHttpResponseDelay, params).then(res => { if (res.code === 200) { this.isNoData = res.data.length === 0 - this.npmQuantity = [ - { name: 'networkAppPerformance.httpResponse', show: true, positioning: 0, data: [], unitType: unitTypes.time } - ] + if (this.isNoData) { + this.npmQuantity = [ + { name: 'networkAppPerformance.httpResponse', show: true, positioning: 0, data: [], unitType: unitTypes.time } + ] + } res.data.result.forEach(t => { if (t.type === 'httpResponseLatency' && val === 'httpResponseLatency') { const npmQuantity = _.cloneDeep(this.npmQuantity) @@ -430,9 +451,11 @@ export default { get(api.npm.overview.totalSslConDelay, params).then(res => { if (res.code === 200) { this.isNoData = res.data.length === 0 - this.npmQuantity = [ - { name: 'networkAppPerformance.sslResponseLatency', show: true, positioning: 0, data: [], unitType: unitTypes.time } - ] + if (this.isNoData) { + this.npmQuantity = [ + { name: 'networkAppPerformance.sslResponseLatency', show: true, positioning: 0, data: [], unitType: unitTypes.time } + ] + } res.data.result.forEach(t => { if (t.type === 'sslConLatency' && val === 'sslConLatency') { const npmQuantity = _.cloneDeep(this.npmQuantity)