NEZ-1257 fix: 去除表达是所有空白字符
This commit is contained in:
@@ -740,7 +740,7 @@ export default {
|
|||||||
this.getAlerScreetList()
|
this.getAlerScreetList()
|
||||||
},
|
},
|
||||||
promQueryParamConvert (obj) {
|
promQueryParamConvert (obj) {
|
||||||
let r = '(' + obj.alertRule.expr.replace(/\"/g, '\'') + ')'
|
let r = '(' + obj.alertRule.expr.replace(/\"/g, '\'').replace(/\s+/g, '') + ')'
|
||||||
let intoLabels = false
|
let intoLabels = false
|
||||||
obj.labels = JSON.parse(obj.labels)
|
obj.labels = JSON.parse(obj.labels)
|
||||||
if (Object.keys(obj.labels).length > 0) {
|
if (Object.keys(obj.labels).length > 0) {
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ export default {
|
|||||||
},
|
},
|
||||||
promQueryParamConvert (alert) {
|
promQueryParamConvert (alert) {
|
||||||
const obj = { ...alert }
|
const obj = { ...alert }
|
||||||
let r = '(' + obj.alertRule.expr.replace(/\"/g, '\'') + ')'
|
let r = '(' + obj.alertRule.expr.replace(/\"/g, '\'').replace(/\s+/g, '') + ')'
|
||||||
let intoLabels = false
|
let intoLabels = false
|
||||||
obj.labels = JSON.parse(obj.labels)
|
obj.labels = JSON.parse(obj.labels)
|
||||||
if (Object.keys(obj.labels).length > 0) {
|
if (Object.keys(obj.labels).length > 0) {
|
||||||
|
|||||||
@@ -895,7 +895,7 @@ export default {
|
|||||||
},
|
},
|
||||||
promQueryParamConvert (alert) {
|
promQueryParamConvert (alert) {
|
||||||
const obj = { ...alert }
|
const obj = { ...alert }
|
||||||
let r = '(' + obj.alertRule.expr.replace(/\"/g, '\'') + ')'
|
let r = '(' + obj.alertRule.expr.replace(/\"/g, '\'').replace(/\s+/g, '') + ')'
|
||||||
let intoLabels = false
|
let intoLabels = false
|
||||||
obj.labels = JSON.parse(obj.labels)
|
obj.labels = JSON.parse(obj.labels)
|
||||||
if (Object.keys(obj.labels).length > 0) {
|
if (Object.keys(obj.labels).length > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user