From bd8c624a034b9e2832b5bb2aa2fcdf415db5aa01 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 17 Apr 2023 15:41:02 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-2778=20fix=EF=BC=9A=20Alert=20message=20?= =?UTF-8?q?=E5=88=97=E8=A1=A8=EF=BC=8Crule=20=E6=82=AC=E6=B5=AE=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E6=A1=86=E5=86=85=E5=AE=B9=E6=9C=89=E8=AF=AF=EF=BC=88?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=E6=82=AC=E6=B5=AE=20rule.name=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/chart/chartDetail.vue | 1 - .../src/components/common/alert/alertRuleInfo.vue | 10 +++++----- .../components/common/globalSearch/searchItemInfo.vue | 1 - .../common/project/meta2d/meta2dSelectImage.vue | 1 - .../components/common/project/meta2d/meta2dTooltip.vue | 1 - .../src/components/common/rightBox/alertRuleBox.vue | 1 - .../src/components/page/alert/alertMessage.vue | 1 - 7 files changed, 5 insertions(+), 11 deletions(-) diff --git a/nezha-fronted/src/components/chart/chartDetail.vue b/nezha-fronted/src/components/chart/chartDetail.vue index db6e4c9bd..27a513177 100644 --- a/nezha-fronted/src/components/chart/chartDetail.vue +++ b/nezha-fronted/src/components/chart/chartDetail.vue @@ -230,7 +230,6 @@ export default { }) setTimeout(() => { this.alertDaysData = newWeekDays - console.log(this.alertDaysData) this.trendLoading = false }) return diff --git a/nezha-fronted/src/components/common/alert/alertRuleInfo.vue b/nezha-fronted/src/components/common/alert/alertRuleInfo.vue index 3faec45be..5a6506468 100644 --- a/nezha-fronted/src/components/common/alert/alertRuleInfo.vue +++ b/nezha-fronted/src/components/common/alert/alertRuleInfo.vue @@ -40,13 +40,13 @@ -- -
-
{{$t('alert.severity')}}
-
{{alertRuleData.severityId ? severityData.find(s => alertRuleData.severityId === s.id).name : '--'}}
-
+ + + +
{{$t('alert.config.expr')}}
-
{{alertRuleData.expr ? (alertRuleData.expr + alertRuleData.operator + formatThreshold(alertRuleData.threshold,alertRuleData.unit)) : '--'}}
+
{{alertRuleData.expr ? alertRuleData.expr : '--'}}
{{$t('alert.alertNum')}}
diff --git a/nezha-fronted/src/components/common/globalSearch/searchItemInfo.vue b/nezha-fronted/src/components/common/globalSearch/searchItemInfo.vue index 7861b8e93..235fe38cb 100644 --- a/nezha-fronted/src/components/common/globalSearch/searchItemInfo.vue +++ b/nezha-fronted/src/components/common/globalSearch/searchItemInfo.vue @@ -524,7 +524,6 @@ export default { }) return item }) - console.log(res.data.condition) this.alertLabelData = res.data } else { this.$message.error(res.msg) diff --git a/nezha-fronted/src/components/common/project/meta2d/meta2dSelectImage.vue b/nezha-fronted/src/components/common/project/meta2d/meta2dSelectImage.vue index 2485131ed..562a96421 100644 --- a/nezha-fronted/src/components/common/project/meta2d/meta2dSelectImage.vue +++ b/nezha-fronted/src/components/common/project/meta2d/meta2dSelectImage.vue @@ -337,7 +337,6 @@ export default { }, beforeAvatarUpload (file, fileList) { const this_ = this - console.log(file.raw.type) const isJPG = (file.raw.type === 'image/jpeg' || file.raw.type === 'image/png' || file.raw.type === 'image/gif') const isLt2M = (file.size / 1024 / 1024) < 2 if (!isJPG) { diff --git a/nezha-fronted/src/components/common/project/meta2d/meta2dTooltip.vue b/nezha-fronted/src/components/common/project/meta2d/meta2dTooltip.vue index 8ec16db4e..d2b1f41d6 100644 --- a/nezha-fronted/src/components/common/project/meta2d/meta2dTooltip.vue +++ b/nezha-fronted/src/components/common/project/meta2d/meta2dTooltip.vue @@ -81,7 +81,6 @@ export default { elements.push(element) } }) - console.log(chartData) if (chartData && this.$refs.panelChart) { this.chartInfo.elements = elements this.$refs.panelChart.chartData = chartData diff --git a/nezha-fronted/src/components/common/rightBox/alertRuleBox.vue b/nezha-fronted/src/components/common/rightBox/alertRuleBox.vue index 3170895c9..eb37d05b2 100644 --- a/nezha-fronted/src/components/common/rightBox/alertRuleBox.vue +++ b/nezha-fronted/src/components/common/rightBox/alertRuleBox.vue @@ -364,7 +364,6 @@ export default { mixins: [editRigthBox, promqlInputMixin], computed: { filterOperators () { - console.log(this.editAlertRule.type) if (this.editAlertRule.type != 3) { return this.operators.filter(item => item.value !== '=~') } else { diff --git a/nezha-fronted/src/components/page/alert/alertMessage.vue b/nezha-fronted/src/components/page/alert/alertMessage.vue index bc03b3e4f..dee29e866 100644 --- a/nezha-fronted/src/components/page/alert/alertMessage.vue +++ b/nezha-fronted/src/components/page/alert/alertMessage.vue @@ -720,7 +720,6 @@ export default { let chartInfo = {} const severityData = JSON.parse(localStorage.getItem('nz-severityDataWeight')) const conditionArr = JSON.parse(this.currentMsg.alertRule.condition) - console.log(this.currentMsg.alertRule.condition, this.severityData) if (this.currentMsg.alertRule.type === 1 || this.currentMsg.alertRule.type === 3) { chartInfo = lodash.cloneDeep(lineData) chartInfo.elements = [{}]