From 7363c3a227da3fb3904277d8118fd16463cdd111 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 11 Jul 2022 13:48:46 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=20alertRule=20to?= =?UTF-8?q?oltip=E7=9A=84=E7=9B=B8=E5=85=B3class=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/common/alert/alertLabel.scss | 11 ++++ .../components/common/alert/alertRuleInfo.vue | 56 +++++++++---------- .../common/alert/alertRuleInfo2.vue | 56 +++++++++---------- 3 files changed, 67 insertions(+), 56 deletions(-) diff --git a/nezha-fronted/src/assets/css/components/common/alert/alertLabel.scss b/nezha-fronted/src/assets/css/components/common/alert/alertLabel.scss index 6e8ebcc2d..964dacbf9 100644 --- a/nezha-fronted/src/assets/css/components/common/alert/alertLabel.scss +++ b/nezha-fronted/src/assets/css/components/common/alert/alertLabel.scss @@ -63,6 +63,17 @@ color: $--color-text-primary; letter-spacing: 0; line-height: 23px; + padding-right: 5px; + .nz-icon-guzhangshuju { + color: $--color-primary; + vertical-align: middle; + } + .nz-icon-overview-alert{ + vertical-align: middle; + } + .alert-days-info{ + vertical-align: middle; + } } .danger{ background-color: $--color-danger; diff --git a/nezha-fronted/src/components/common/alert/alertRuleInfo.vue b/nezha-fronted/src/components/common/alert/alertRuleInfo.vue index a442666b8..7a70ea340 100644 --- a/nezha-fronted/src/components/common/alert/alertRuleInfo.vue +++ b/nezha-fronted/src/components/common/alert/alertRuleInfo.vue @@ -9,22 +9,22 @@ {{alertRuleData && alertRuleData.name ? alertRuleData.name : '--'}} -
-
-
ID
-
{{alertRuleData.id ? alertRuleData.id : '--'}}
+
+
+
ID
+
{{alertRuleData.id ? alertRuleData.id : '--'}}
-
-
{{$t('overall.name')}}
-
{{alertRuleData.name ? alertRuleData.name : '--'}}
+
+
{{$t('overall.name')}}
+
{{alertRuleData.name ? alertRuleData.name : '--'}}
- - - + + + -
-
{{$t('overall.type')}}
-
+
+
{{$t('overall.type')}}
+
{{$t('overall.metric')}} @@ -35,17 +35,17 @@ --
-
-
{{$t('alert.severity')}}
-
{{alertRuleData.severityId ? severityData.find(s => alertRuleData.severityId === s.id).name : '--'}}
+
+
{{$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)) : '--'}}
+
+
{{$t('alert.config.expr')}}
+
{{alertRuleData.expr ? (alertRuleData.expr + alertRuleData.operator + formatThreshold(alertRuleData.threshold,alertRuleData.unit)) : '--'}}
-
-
{{$t('alert.alertNum')}}
-
+
+
{{$t('alert.alertNum')}}
+
{{$t('project.topology.alert')}}({{$t('overall.active')}})
@@ -60,13 +60,13 @@ />
-
-
{{$t('alert.config.trbShot')}}
-
+
+
{{$t('alert.config.trbShot')}}
+
-
-
{{$t('overall.state')}}
-
+
+
{{$t('overall.state')}}
+
{{ $t('overall.enabled') }} diff --git a/nezha-fronted/src/components/common/alert/alertRuleInfo2.vue b/nezha-fronted/src/components/common/alert/alertRuleInfo2.vue index 7ff336035..418b99175 100644 --- a/nezha-fronted/src/components/common/alert/alertRuleInfo2.vue +++ b/nezha-fronted/src/components/common/alert/alertRuleInfo2.vue @@ -8,22 +8,22 @@ {{alertRuleData && alertRuleData.name ? alertRuleData.name : '--'}}
-
-
-
ID
-
{{alertRuleData.id ? alertRuleData.id : '--'}}
+
+
+
ID
+
{{alertRuleData.id ? alertRuleData.id : '--'}}
-
-
{{$t('overall.name')}}
-
{{alertRuleData.name ? alertRuleData.name : '--'}}
+
+
{{$t('overall.name')}}
+
{{alertRuleData.name ? alertRuleData.name : '--'}}
- - - + + + -
-
{{$t('overall.type')}}
-
+
+
{{$t('overall.type')}}
+
{{$t('overall.metric')}} @@ -34,17 +34,17 @@ --
-
-
{{$t('alert.severity')}}
-
{{alertRuleData.severityId ? severityData.find(s => alertRuleData.severityId === s.id).name : '--'}}
+
+
{{$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)) : '--'}}
+
+
{{$t('alert.config.expr')}}
+
{{alertRuleData.expr ? (alertRuleData.expr + alertRuleData.operator + formatThreshold(alertRuleData.threshold,alertRuleData.unit)) : '--'}}
-
-
{{$t('alert.alertNum')}}
-
+
+
{{$t('alert.alertNum')}}
+
{{$t('project.topology.alert')}}({{$t('overall.active')}})
@@ -59,13 +59,13 @@ />
-
-
{{$t('alert.config.trbShot')}}
-
+
+
{{$t('alert.config.trbShot')}}
+
-
-
{{$t('overall.state')}}
-
+
+
{{$t('overall.state')}}
+
{{ $t('overall.enabled') }}