From c36129bb2a4ce128c812ccdff894c6ec250fc135 Mon Sep 17 00:00:00 2001 From: likexuan Date: Fri, 2 Sep 2022 14:38:28 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-2167=20fix=20:=20record=20=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=E9=9D=A2=20labels=20=E5=88=97=E5=8F=96?= =?UTF-8?q?=E6=B6=88=20=E9=BC=A0=E6=A0=87=E6=82=AC=E6=B5=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/common/alert/alertLabel.vue | 50 ------------------- .../common/table/settings/recordRuleTable.vue | 39 ++++++--------- 2 files changed, 14 insertions(+), 75 deletions(-) diff --git a/nezha-fronted/src/components/common/alert/alertLabel.vue b/nezha-fronted/src/components/common/alert/alertLabel.vue index be446cc9b..2a0b932ec 100644 --- a/nezha-fronted/src/components/common/alert/alertLabel.vue +++ b/nezha-fronted/src/components/common/alert/alertLabel.vue @@ -712,56 +712,6 @@ - - -
-
-
ID
-
- {{ alertLabelData && alertLabelData.id ? alertLabelData.id : "--" }} -
-
-
-
{{$t('overall.name')}}
-
{{alertLabelData && alertLabelData.name ? alertLabelData.name : '--'}}
- -
-
-
{{ $t("overall.type") }}
-
- {{ alertLabelData && alertLabelData.type == "1" ? $t('overall.metric') : $t("overall.logs")}} -
-
-
-
{{ $t("config.exprTemp.expression") }}
-
- {{ alertLabelData && alertLabelData.expr ? alertLabelData.expr : "--" }} -
-
-
-
{{ $t("config.assetLabel.interval") }}
-
- {{ alertLabelData && alertLabelData.inr ? alertLabelData.inr : "--" }} -
-
-
-
{{ $t("overall.remark") }}
-
- {{ alertLabelData && alertLabelData.remark ? alertLabelData.remark : "--" }} -
-
-
-
{{ $t("overall.state") }}
-
-
- {{ alertLabelData && alertLabelData.state == "1" ? $t("overall.enabled") : $t("overall.disabled")}} -
-
-
diff --git a/nezha-fronted/src/components/common/table/settings/recordRuleTable.vue b/nezha-fronted/src/components/common/table/settings/recordRuleTable.vue index 09a1f603b..1260c71ff 100644 --- a/nezha-fronted/src/components/common/table/settings/recordRuleTable.vue +++ b/nezha-fronted/src/components/common/table/settings/recordRuleTable.vue @@ -61,12 +61,11 @@ + + @@ -123,14 +132,6 @@
 
- - @@ -139,14 +140,13 @@ import lodash from 'lodash' import copy from '@/components/common/copy' import table from '@/components/common/mixin/table' import nzAlertTag from '../../../page/alert/nzAlertTag' -import alertLabelMixin from '@/components/common/mixin/alertLabelMixin' export default { name: 'recordRuleTable', components: { nzAlertTag, copy }, - mixins: [table, alertLabelMixin], + mixins: [table], props: { loading: Boolean }, @@ -210,17 +210,6 @@ export default { ] } }, - computed: { - tagType () { - return (key) => { - if (key == 'asset' || key == 'module' || key == 'project' || key == 'dc' || key == 'endpoint') { - return 'normal' - } else { - return 'info' - } - } - } - }, methods: { labelsSort (obj) { if (typeof obj != 'object') {