CN-1362 fix: 更改折线图隐藏Tab的逻辑
This commit is contained in:
@@ -464,7 +464,7 @@ export default {
|
|||||||
|
|
||||||
dnsData.forEach(e => {
|
dnsData.forEach(e => {
|
||||||
e.unitType = type
|
e.unitType = type
|
||||||
if (parseFloat(e.analysis.avg) === 0 || isNaN(parseFloat(e.analysis.avg))) {
|
if (parseFloat(e.analysis.max) === 0 || isNaN(parseFloat(e.analysis.max))) {
|
||||||
e.show = false
|
e.show = false
|
||||||
num += 1
|
num += 1
|
||||||
} else {
|
} else {
|
||||||
@@ -474,7 +474,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.lineTab === e.class) {
|
if (this.lineTab === e.class) {
|
||||||
if (parseFloat(e.analysis.avg) <= 0) {
|
if (parseFloat(e.analysis.max) <= 0) {
|
||||||
this.lineTab = ''
|
this.lineTab = ''
|
||||||
this.lineRefer = ''
|
this.lineRefer = ''
|
||||||
this.init()
|
this.init()
|
||||||
@@ -489,10 +489,10 @@ export default {
|
|||||||
let ingressAvg = 0
|
let ingressAvg = 0
|
||||||
let egressAvg = 0
|
let egressAvg = 0
|
||||||
if (ingressObj) {
|
if (ingressObj) {
|
||||||
ingressAvg = parseFloat(ingressObj.analysis.avg) || 0
|
ingressAvg = parseFloat(ingressObj.analysis.max) || 0
|
||||||
}
|
}
|
||||||
if (egressObj) {
|
if (egressObj) {
|
||||||
egressAvg = parseFloat(egressObj.analysis.avg) || 0
|
egressAvg = parseFloat(egressObj.analysis.max) || 0
|
||||||
}
|
}
|
||||||
if ((ingressAvg + egressAvg) === 0) {
|
if ((ingressAvg + egressAvg) === 0) {
|
||||||
const totalObj = dnsData.find(d => d.name === 'network.total')
|
const totalObj = dnsData.find(d => d.name === 'network.total')
|
||||||
|
|||||||
@@ -544,7 +544,7 @@ export default {
|
|||||||
const self = this
|
const self = this
|
||||||
tabs.forEach(e => {
|
tabs.forEach(e => {
|
||||||
e.unitType = type
|
e.unitType = type
|
||||||
if (e.name !== 'network.total' && parseFloat(e.analysis.avg) === 0) {
|
if (e.name !== 'network.total' && parseFloat(e.analysis.max) === 0) {
|
||||||
e.show = false
|
e.show = false
|
||||||
num += 1
|
num += 1
|
||||||
} else {
|
} else {
|
||||||
@@ -554,7 +554,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (self.lineTab === e.class) {
|
if (self.lineTab === e.class) {
|
||||||
if (parseFloat(e.analysis.avg) <= 0) {
|
if (parseFloat(e.analysis.max) <= 0) {
|
||||||
self.lineTab = ''
|
self.lineTab = ''
|
||||||
self.lineRefer = ''
|
self.lineRefer = ''
|
||||||
self.init()
|
self.init()
|
||||||
|
|||||||
@@ -387,7 +387,7 @@ export default {
|
|||||||
let num = 0
|
let num = 0
|
||||||
linkData.forEach(e => {
|
linkData.forEach(e => {
|
||||||
e.unitType = type
|
e.unitType = type
|
||||||
if (parseFloat(e.analysis.avg) === 0 || isNaN(parseFloat(e.analysis.avg))) {
|
if (parseFloat(e.analysis.max) === 0 || isNaN(parseFloat(e.analysis.max))) {
|
||||||
e.show = false
|
e.show = false
|
||||||
num += 1
|
num += 1
|
||||||
} else {
|
} else {
|
||||||
@@ -397,7 +397,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.lineTab === e.class) {
|
if (this.lineTab === e.class) {
|
||||||
if (parseFloat(e.analysis.avg) <= 0) {
|
if (parseFloat(e.analysis.max) <= 0) {
|
||||||
this.lineTab = ''
|
this.lineTab = ''
|
||||||
this.lineRefer = ''
|
this.lineRefer = ''
|
||||||
this.init()
|
this.init()
|
||||||
@@ -411,10 +411,10 @@ export default {
|
|||||||
let ingressAvg = 0
|
let ingressAvg = 0
|
||||||
let egressAvg = 0
|
let egressAvg = 0
|
||||||
if (ingressObj) {
|
if (ingressObj) {
|
||||||
ingressAvg = parseFloat(ingressObj.analysis.avg) || 0
|
ingressAvg = parseFloat(ingressObj.analysis.max) || 0
|
||||||
}
|
}
|
||||||
if (egressObj) {
|
if (egressObj) {
|
||||||
egressAvg = parseFloat(egressObj.analysis.avg) || 0
|
egressAvg = parseFloat(egressObj.analysis.max) || 0
|
||||||
}
|
}
|
||||||
if ((ingressAvg + egressAvg) === 0) {
|
if ((ingressAvg + egressAvg) === 0) {
|
||||||
const totalObj = linkData.find(d => d.name === 'network.total')
|
const totalObj = linkData.find(d => d.name === 'network.total')
|
||||||
|
|||||||
@@ -512,7 +512,7 @@ export default {
|
|||||||
const self = this
|
const self = this
|
||||||
tabs.forEach(e => {
|
tabs.forEach(e => {
|
||||||
e.unitType = type
|
e.unitType = type
|
||||||
if (e.name !== 'network.total' && parseFloat(e.analysis.avg) === 0) {
|
if (e.name !== 'network.total' && parseFloat(e.analysis.max) === 0) {
|
||||||
e.show = false
|
e.show = false
|
||||||
num += 1
|
num += 1
|
||||||
} else {
|
} else {
|
||||||
@@ -522,7 +522,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (self.lineTab === e.class) {
|
if (self.lineTab === e.class) {
|
||||||
if (parseFloat(e.analysis.avg) <= 0) {
|
if (parseFloat(e.analysis.max) <= 0) {
|
||||||
self.lineTab = ''
|
self.lineTab = ''
|
||||||
self.lineRefer = ''
|
self.lineRefer = ''
|
||||||
self.init()
|
self.init()
|
||||||
|
|||||||
Reference in New Issue
Block a user