CN-856 fix: 修复Dashboard - network overview Metric下拉默认不是第一个时,折线图无法加载

This commit is contained in:
@changcode
2023-01-09 18:40:43 +08:00
parent d84483c0dc
commit a31c408327

View File

@@ -703,10 +703,14 @@ export default {
this.chartOption = null
this.timer = setTimeout(() => {
if (this.lineTab) {
if (this.lineTab === 'total' && this.metric === 'Sessions/s') {
this.init()
} else {
const data = this.mpackets.find(t => t.class === this.lineTab)
if (data && data.positioning) {
this.activeChange(data, data.positioning)
}
}
} else {
this.init()
}