NEZ-1705 fix:告警图表同时开启之前时间与堆栈图后查看图表界面显示数据出错

This commit is contained in:
zhangyu
2022-03-22 15:32:07 +08:00
parent ae02ca76c9
commit 907f361813
3 changed files with 6 additions and 5 deletions

View File

@@ -595,7 +595,8 @@ export default {
}
chartInfo.elements[0].expression = this.currentMsg.alertRule.expr.replace(/\"/g, '\'').replace(/\r|\n+/g, '')
chartInfo.elements[0].filter = encodeURIComponent(decodeURIComponent(this.promQueryParamLabels(this.currentMsg.labels)))
chartInfo.unit = this.currentMsg.unit
chartInfo.unit = this.currentMsg.alertRule.unit
console.log(chartInfo.unit)
this.showFullscreen(true, chartInfo)
} else if (this.currentMsg.alertRule.type === 2) {
const chartInfo = lodash.cloneDeep(logData)
@@ -609,7 +610,7 @@ export default {
}
chartInfo.elements[0].expression = encodeURIComponent(this.currentMsg.alertRule.expr.replace(/\"/g, '\'').replace(/\r|\n+/g, ''))
chartInfo.elements[0].filter = encodeURIComponent(decodeURIComponent(this.promQueryParamLabels(this.currentMsg.labels)))
chartInfo.unit = this.currentMsg.unit
chartInfo.unit = this.currentMsg.alertRule.unit
this.showFullscreen(true, chartInfo)
}
},