fix:修改alertMes 点击查看不显示的问题

This commit is contained in:
zhangyu
2021-12-30 15:18:38 +08:00
parent 4731db2a43
commit f6225f3fe1
4 changed files with 6 additions and 0 deletions

View File

@@ -589,12 +589,14 @@ export default {
this.chartLoading = true
if (this.currentMsg.alertRule.type === 1) {
const chartInfo = lodash.cloneDeep(lineData)
chartInfo.elements = [{}]
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
this.showFullscreen(true, chartInfo)
} else if (this.currentMsg.alertRule.type === 2) {
const chartInfo = lodash.cloneDeep(logData)
chartInfo.elements = [{}]
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