fix: 修复link monitor有些图没数据时没显示nodata的问题
This commit is contained in:
@@ -231,6 +231,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.linkNoData = data.length === 0
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
item.totalBitsRate = item.egressBitsRate + item.ingressBitsRate
|
item.totalBitsRate = item.egressBitsRate + item.ingressBitsRate
|
||||||
})
|
})
|
||||||
@@ -246,7 +247,7 @@ export default {
|
|||||||
this.linkData = sorted
|
this.linkData = sorted
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.linkNoData = false
|
this.linkNoData = true
|
||||||
this.showError1 = true
|
this.showError1 = true
|
||||||
this.errorMsg1 = this.errorMsgHandler(res[0])
|
this.errorMsg1 = this.errorMsgHandler(res[0])
|
||||||
}
|
}
|
||||||
@@ -267,7 +268,7 @@ export default {
|
|||||||
directionArr = Array.from(new Set(directionArr))
|
directionArr = Array.from(new Set(directionArr))
|
||||||
|
|
||||||
const newNextHopData = []
|
const newNextHopData = []
|
||||||
|
this.nextHopNoData = directionArr.length === 0
|
||||||
directionArr.forEach((item1) => {
|
directionArr.forEach((item1) => {
|
||||||
const newObj = { egressBitsRate: 0, ingressBitsRate: 0, totalBitsRate: 0, linkDirection: item1 }
|
const newObj = { egressBitsRate: 0, ingressBitsRate: 0, totalBitsRate: 0, linkDirection: item1 }
|
||||||
nextHopData.forEach((item2) => {
|
nextHopData.forEach((item2) => {
|
||||||
@@ -309,7 +310,7 @@ export default {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.showError2 = true
|
this.showError2 = true
|
||||||
this.nextHopNoData = false
|
this.nextHopNoData = true
|
||||||
this.errorMsg2 = this.errorMsgHandler(res[1])
|
this.errorMsg2 = this.errorMsgHandler(res[1])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,10 +138,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.isLinkNoData = linkGridData.length === 0
|
||||||
this.linkGridData = linkGridData
|
this.linkGridData = linkGridData
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.isLinkNoData = false
|
this.isLinkNoData = true
|
||||||
this.isLinkShowError = true
|
this.isLinkShowError = true
|
||||||
this.linkErrorMsg = this.errorMsgHandler(res[0])
|
this.linkErrorMsg = this.errorMsgHandler(res[0])
|
||||||
}
|
}
|
||||||
@@ -227,10 +228,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.isNextNoData = nextGridData.length === 0
|
||||||
this.nextGridData = nextGridData
|
this.nextGridData = nextGridData
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.isNextNoData = false
|
this.isNextNoData = true
|
||||||
this.isNextShowError = true
|
this.isNextShowError = true
|
||||||
this.nextErrorMsg = this.errorMsgHandler(res[1])
|
this.nextErrorMsg = this.errorMsgHandler(res[1])
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user