fix: 修复折线图表tab反选错误
This commit is contained in:
@@ -125,7 +125,11 @@ export default {
|
|||||||
label: 'Maximum'
|
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,
|
unitConvert,
|
||||||
unitTypes,
|
unitTypes,
|
||||||
chartDateObject: [],
|
chartDateObject: [],
|
||||||
@@ -192,11 +196,13 @@ export default {
|
|||||||
get(url, params).then((res) => {
|
get(url, params).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.isNoData = res.data.result.length === 0
|
this.isNoData = res.data.result.length === 0
|
||||||
|
if (this.isNoData) {
|
||||||
this.mpackets = [
|
this.mpackets = [
|
||||||
{ analysis: {}, name: 'network.total', class: 'total', show: true, invertTab: true, positioning: 0, data: [], unitType: '' },
|
{ 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.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.outbound', class: 'outbound', show: true, invertTab: true, positioning: 2, data: [], unitType: '' }
|
||||||
]
|
]
|
||||||
|
}
|
||||||
res.data.result.forEach((t, i) => {
|
res.data.result.forEach((t, i) => {
|
||||||
if (t.type === 'bytes' && val === 'Bits/s') {
|
if (t.type === 'bytes' && val === 'Bits/s') {
|
||||||
const mpackets = _.cloneDeep(this.mpackets)
|
const mpackets = _.cloneDeep(this.mpackets)
|
||||||
|
|||||||
@@ -101,7 +101,11 @@ export default {
|
|||||||
label: 'Packets/s'
|
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,
|
unitConvert,
|
||||||
unitTypes,
|
unitTypes,
|
||||||
chartDateObject: [],
|
chartDateObject: [],
|
||||||
@@ -162,11 +166,13 @@ export default {
|
|||||||
get(api.linkMonitor.totalTrafficAnalysis, params).then((res) => {
|
get(api.linkMonitor.totalTrafficAnalysis, params).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.isNoData = res.data.result.length === 0
|
this.isNoData = res.data.result.length === 0
|
||||||
|
if (this.isNoData) {
|
||||||
this.mpackets = [
|
this.mpackets = [
|
||||||
{ analysis: {}, name: 'network.total', class: 'total', show: true, invertTab: true, positioning: 0, data: [], unitType: '' },
|
{ 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.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: '' }
|
{ analysis: {}, name: 'linkMonitor.egress', class: 'egress', show: true, invertTab: true, positioning: 2, data: [], unitType: '' }
|
||||||
]
|
]
|
||||||
|
}
|
||||||
res.data.result.forEach((t, i) => {
|
res.data.result.forEach((t, i) => {
|
||||||
if (t.type === 'bytes' && val === 'Bits/s') {
|
if (t.type === 'bytes' && val === 'Bits/s') {
|
||||||
const mpackets = _.cloneDeep(this.mpackets)
|
const mpackets = _.cloneDeep(this.mpackets)
|
||||||
|
|||||||
@@ -105,7 +105,14 @@ export default {
|
|||||||
label: 'Maximum'
|
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,
|
unitConvert,
|
||||||
unitTypes,
|
unitTypes,
|
||||||
chartDateObject: [],
|
chartDateObject: [],
|
||||||
@@ -174,6 +181,7 @@ export default {
|
|||||||
get(api.netWorkOverview.totalTrafficAnalysis, params).then((res) => {
|
get(api.netWorkOverview.totalTrafficAnalysis, params).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.isNoData = res.data.result.length === 0
|
this.isNoData = res.data.result.length === 0
|
||||||
|
if (this.isNoData) {
|
||||||
this.mpackets = [
|
this.mpackets = [
|
||||||
{ analysis: {}, name: 'network.total', class: 'total', show: true, invertTab: true, positioning: 0, data: [], unitType: '' },
|
{ 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.inbound', class: 'inbound', show: true, invertTab: true, positioning: 1, data: [], unitType: '' },
|
||||||
@@ -182,6 +190,7 @@ export default {
|
|||||||
{ analysis: {}, name: 'network.through', class: 'through', show: true, invertTab: true, positioning: 4, 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: '' }
|
{ analysis: {}, name: 'network.other', class: 'other', show: true, invertTab: true, positioning: 5, data: [], unitType: '' }
|
||||||
]
|
]
|
||||||
|
}
|
||||||
res.data.result.forEach((t, i) => {
|
res.data.result.forEach((t, i) => {
|
||||||
if (t.type === 'bytes' && val === 'Bits/s') {
|
if (t.type === 'bytes' && val === 'Bits/s') {
|
||||||
const mpackets = _.cloneDeep(this.mpackets)
|
const mpackets = _.cloneDeep(this.mpackets)
|
||||||
|
|||||||
@@ -63,8 +63,21 @@ export default {
|
|||||||
unitConvert,
|
unitConvert,
|
||||||
unitTypes,
|
unitTypes,
|
||||||
side: '',
|
side: '',
|
||||||
mpackets: [],
|
mpackets: [
|
||||||
npmQuantity: [],
|
{ 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: {},
|
chartData: {},
|
||||||
metricOptions: [
|
metricOptions: [
|
||||||
{
|
{
|
||||||
@@ -160,6 +173,7 @@ export default {
|
|||||||
get(api.npm.overview.trafficGraph, params).then((res) => {
|
get(api.npm.overview.trafficGraph, params).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.isNoData = res.data.result.length === 0
|
this.isNoData = res.data.result.length === 0
|
||||||
|
if (this.isNoData) {
|
||||||
this.mpackets = [
|
this.mpackets = [
|
||||||
{ name: 'network.total', show: true, positioning: 0, data: [], unitType: 'number' },
|
{ name: 'network.total', show: true, positioning: 0, data: [], unitType: 'number' },
|
||||||
{ name: 'network.inbound', show: true, positioning: 1, data: [], unitType: 'number' },
|
{ name: 'network.inbound', show: true, positioning: 1, data: [], unitType: 'number' },
|
||||||
@@ -175,6 +189,7 @@ export default {
|
|||||||
{ name: 'networkAppPerformance.packetLoss', show: true, positioning: 0, data: [], unitType: unitTypes.percent },
|
{ name: 'networkAppPerformance.packetLoss', show: true, positioning: 0, data: [], unitType: unitTypes.percent },
|
||||||
{ name: 'overall.packetRetrans', 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) => {
|
res.data.result.forEach((t, i) => {
|
||||||
if (t.type === 'bytes' && val === 'Bits/s') {
|
if (t.type === 'bytes' && val === 'Bits/s') {
|
||||||
const mpackets = _.cloneDeep(this.mpackets)
|
const mpackets = _.cloneDeep(this.mpackets)
|
||||||
@@ -288,6 +303,7 @@ export default {
|
|||||||
get(api.npm.overview.totalTrafficAnalysis, params).then(res => {
|
get(api.npm.overview.totalTrafficAnalysis, params).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.isNoData = res.data.result.length === 0
|
this.isNoData = res.data.result.length === 0
|
||||||
|
if (this.isNoData) {
|
||||||
this.mpackets = [
|
this.mpackets = [
|
||||||
{ name: 'network.total', show: true, positioning: 0, data: [], unitType: 'number' },
|
{ name: 'network.total', show: true, positioning: 0, data: [], unitType: 'number' },
|
||||||
{ name: 'network.inbound', show: true, positioning: 1, data: [], unitType: 'number' },
|
{ name: 'network.inbound', show: true, positioning: 1, data: [], unitType: 'number' },
|
||||||
@@ -296,6 +312,7 @@ export default {
|
|||||||
{ name: 'network.through', show: true, positioning: 4, data: [], unitType: 'number' },
|
{ name: 'network.through', show: true, positioning: 4, data: [], unitType: 'number' },
|
||||||
{ name: 'network.other', show: true, positioning: 5, data: [], unitType: 'number' }
|
{ name: 'network.other', show: true, positioning: 5, data: [], unitType: 'number' }
|
||||||
]
|
]
|
||||||
|
}
|
||||||
res.data.result.forEach((t, i) => {
|
res.data.result.forEach((t, i) => {
|
||||||
if (t.type === 'bytes' && val === 'Bits/s') {
|
if (t.type === 'bytes' && val === 'Bits/s') {
|
||||||
const mpackets = _.cloneDeep(this.mpackets)
|
const mpackets = _.cloneDeep(this.mpackets)
|
||||||
@@ -346,11 +363,13 @@ export default {
|
|||||||
get(api.npm.overview.totalNetworkAnalysis, params).then(res => {
|
get(api.npm.overview.totalNetworkAnalysis, params).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.isNoData = res.data.result.length === 0
|
this.isNoData = res.data.result.length === 0
|
||||||
|
if (this.isNoData) {
|
||||||
this.npmQuantity = [
|
this.npmQuantity = [
|
||||||
{ name: 'networkAppPerformance.tcpConnectionEstablishLatency', show: true, positioning: 0, data: [], unitType: unitTypes.time },
|
{ name: 'networkAppPerformance.tcpConnectionEstablishLatency', show: true, positioning: 0, data: [], unitType: unitTypes.time },
|
||||||
{ name: 'networkAppPerformance.packetLoss', show: true, positioning: 0, data: [], unitType: unitTypes.percent },
|
{ name: 'networkAppPerformance.packetLoss', show: true, positioning: 0, data: [], unitType: unitTypes.percent },
|
||||||
{ name: 'overall.packetRetrans', 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) => {
|
res.data.result.forEach((t, i) => {
|
||||||
if (t.type === 'establishLatencyMs' && val === 'establishLatencyMs') {
|
if (t.type === 'establishLatencyMs' && val === 'establishLatencyMs') {
|
||||||
const npmQuantity = _.cloneDeep(this.npmQuantity)
|
const npmQuantity = _.cloneDeep(this.npmQuantity)
|
||||||
@@ -401,9 +420,11 @@ export default {
|
|||||||
get(api.npm.overview.totalHttpResponseDelay, params).then(res => {
|
get(api.npm.overview.totalHttpResponseDelay, params).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.isNoData = res.data.length === 0
|
this.isNoData = res.data.length === 0
|
||||||
|
if (this.isNoData) {
|
||||||
this.npmQuantity = [
|
this.npmQuantity = [
|
||||||
{ name: 'networkAppPerformance.httpResponse', show: true, positioning: 0, data: [], unitType: unitTypes.time }
|
{ name: 'networkAppPerformance.httpResponse', show: true, positioning: 0, data: [], unitType: unitTypes.time }
|
||||||
]
|
]
|
||||||
|
}
|
||||||
res.data.result.forEach(t => {
|
res.data.result.forEach(t => {
|
||||||
if (t.type === 'httpResponseLatency' && val === 'httpResponseLatency') {
|
if (t.type === 'httpResponseLatency' && val === 'httpResponseLatency') {
|
||||||
const npmQuantity = _.cloneDeep(this.npmQuantity)
|
const npmQuantity = _.cloneDeep(this.npmQuantity)
|
||||||
@@ -430,9 +451,11 @@ export default {
|
|||||||
get(api.npm.overview.totalSslConDelay, params).then(res => {
|
get(api.npm.overview.totalSslConDelay, params).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.isNoData = res.data.length === 0
|
this.isNoData = res.data.length === 0
|
||||||
|
if (this.isNoData) {
|
||||||
this.npmQuantity = [
|
this.npmQuantity = [
|
||||||
{ name: 'networkAppPerformance.sslResponseLatency', show: true, positioning: 0, data: [], unitType: unitTypes.time }
|
{ name: 'networkAppPerformance.sslResponseLatency', show: true, positioning: 0, data: [], unitType: unitTypes.time }
|
||||||
]
|
]
|
||||||
|
}
|
||||||
res.data.result.forEach(t => {
|
res.data.result.forEach(t => {
|
||||||
if (t.type === 'sslConLatency' && val === 'sslConLatency') {
|
if (t.type === 'sslConLatency' && val === 'sslConLatency') {
|
||||||
const npmQuantity = _.cloneDeep(this.npmQuantity)
|
const npmQuantity = _.cloneDeep(this.npmQuantity)
|
||||||
|
|||||||
Reference in New Issue
Block a user