From 5c4b263809dcea5a9cc4bacc671b488ecb748018 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 28 Mar 2022 10:42:31 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-1740=20fix=EF=BC=9A=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E5=88=97=20=E6=9C=80=E8=BF=91=E5=91=8A=E8=AD=A6=E6=9F=B1?= =?UTF-8?q?=E5=BD=A2=E5=9B=BE=20=E6=A0=B9=E6=8D=AE=20=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=90=8C=E9=AB=98?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/alert/alertDaysInfo.vue | 9 ++++----- .../src/components/common/bottomBox/tabs/endpointTab.vue | 2 +- .../common/detailView/list/alertRule/alertRuleDetail.vue | 2 +- .../common/detailView/list/asset/assetDetail.vue | 2 +- .../components/common/detailView/list/dc/dcDetail.vue | 1 + .../common/detailView/list/endpoint/endpointDetail.vue | 2 +- .../common/detailView/list/module/moduleDetail.vue | 2 +- .../src/components/common/project/popData/assetTable.vue | 2 +- .../src/components/common/table/alert/alertRuleTable.vue | 2 +- .../src/components/common/table/asset/assetTable.vue | 4 ++-- .../src/components/common/table/settings/dcTable.vue | 1 + .../components/common/table/settings/endpointTable.vue | 2 +- .../src/components/common/table/settings/moduleTable.vue | 2 +- .../components/common/table/settings/projectTable.vue | 2 +- .../src/components/page/monitor/project/project.vue | 2 +- 15 files changed, 19 insertions(+), 18 deletions(-) diff --git a/nezha-fronted/src/components/common/alert/alertDaysInfo.vue b/nezha-fronted/src/components/common/alert/alertDaysInfo.vue index bf62e8658..a2721bd17 100644 --- a/nezha-fronted/src/components/common/alert/alertDaysInfo.vue +++ b/nezha-fronted/src/components/common/alert/alertDaysInfo.vue @@ -47,18 +47,17 @@ export default { methods: { showPriority (daysData) { let style = {} - // let sum = 0 + let sum = 0 this.severityDataWeight.forEach(item => { - // sum += Number(daysData[item.name]) + sum += Number(daysData[item.name]) if (daysData[item.name] && !style.background) { style = { background: item.color } } }) - // const height = sum > 0 ? (sum < 10 ? 20 : 24) : 16 - // console.log(sum, height) - // style.height = (height + 'px') + const width = sum > 0 ? (sum <= 10 ? 12 : 14) : 10 + style.width = (width + 'px') return style }, tooltipHover (item, flag, e) { diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/endpointTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/endpointTab.vue index 544e47c72..09ecaa88c 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/endpointTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/endpointTab.vue @@ -249,7 +249,7 @@ export default { label: this.$t('project.endpoint.alerts'), prop: 'alerts', show: true, - width: 150 + width: 180 }, /* { label: this.$t("project.endpoint.lastUpdate"), diff --git a/nezha-fronted/src/components/common/detailView/list/alertRule/alertRuleDetail.vue b/nezha-fronted/src/components/common/detailView/list/alertRule/alertRuleDetail.vue index 13b9fbe66..c7c691c16 100644 --- a/nezha-fronted/src/components/common/detailView/list/alertRule/alertRuleDetail.vue +++ b/nezha-fronted/src/components/common/detailView/list/alertRule/alertRuleDetail.vue @@ -134,7 +134,7 @@ export default { label: this.$t('alert.alert'), prop: 'alertNum', show: true, - width: 150, + minWidth: 170, sortable: 'custom' }, { label: this.$t('alert.config.receiver'), diff --git a/nezha-fronted/src/components/common/detailView/list/asset/assetDetail.vue b/nezha-fronted/src/components/common/detailView/list/asset/assetDetail.vue index 09fc8a854..849b24131 100644 --- a/nezha-fronted/src/components/common/detailView/list/asset/assetDetail.vue +++ b/nezha-fronted/src/components/common/detailView/list/asset/assetDetail.vue @@ -119,7 +119,7 @@ export default { label: this.$t('asset.alertNum'), prop: 'alertNum', show: true, - minWidth: 140, + minWidth: 170, sortable: 'custom' }, { label: this.$t('asset.endpointNum2'), diff --git a/nezha-fronted/src/components/common/detailView/list/dc/dcDetail.vue b/nezha-fronted/src/components/common/detailView/list/dc/dcDetail.vue index 55d7ca2f5..54943c904 100644 --- a/nezha-fronted/src/components/common/detailView/list/dc/dcDetail.vue +++ b/nezha-fronted/src/components/common/detailView/list/dc/dcDetail.vue @@ -91,6 +91,7 @@ export default { }, { label: this.$t('config.dc.alert'), prop: 'alertNum', + minWidth: 170, show: true }, { label: this.$t('asset.tel'), diff --git a/nezha-fronted/src/components/common/detailView/list/endpoint/endpointDetail.vue b/nezha-fronted/src/components/common/detailView/list/endpoint/endpointDetail.vue index f312ee811..7fb683510 100644 --- a/nezha-fronted/src/components/common/detailView/list/endpoint/endpointDetail.vue +++ b/nezha-fronted/src/components/common/detailView/list/endpoint/endpointDetail.vue @@ -101,7 +101,7 @@ export default { label: this.$t('project.endpoint.alerts'), prop: 'alerts', show: true, - minWidth: 150, + minWidth: 180, sortable: 'custom' }, { diff --git a/nezha-fronted/src/components/common/detailView/list/module/moduleDetail.vue b/nezha-fronted/src/components/common/detailView/list/module/moduleDetail.vue index 3fcda7304..344f411c8 100644 --- a/nezha-fronted/src/components/common/detailView/list/module/moduleDetail.vue +++ b/nezha-fronted/src/components/common/detailView/list/module/moduleDetail.vue @@ -89,7 +89,7 @@ export default { label: this.$t('project.module.alerts'), prop: 'alertNum', show: true, - width: 200, + minWidth: 170, sortable: 'custom' }, { diff --git a/nezha-fronted/src/components/common/project/popData/assetTable.vue b/nezha-fronted/src/components/common/project/popData/assetTable.vue index 0196b01ab..d98dbf352 100644 --- a/nezha-fronted/src/components/common/project/popData/assetTable.vue +++ b/nezha-fronted/src/components/common/project/popData/assetTable.vue @@ -114,7 +114,7 @@ export default { label: this.$t('asset.alertNum'), prop: 'alertNum', show: true, - width: 140 + width: 180 }, { label: this.$t('asset.endpointNum2'), prop: 'endpointNum', diff --git a/nezha-fronted/src/components/common/table/alert/alertRuleTable.vue b/nezha-fronted/src/components/common/table/alert/alertRuleTable.vue index 131ff72dc..9181d7fc0 100644 --- a/nezha-fronted/src/components/common/table/alert/alertRuleTable.vue +++ b/nezha-fronted/src/components/common/table/alert/alertRuleTable.vue @@ -228,7 +228,7 @@ export default { label: this.$t('alert.alert'), prop: 'alertNum', show: true, - width: 150, + minWidth: 170, sortable: 'custom' }, { label: this.$t('alert.config.receiver'), diff --git a/nezha-fronted/src/components/common/table/asset/assetTable.vue b/nezha-fronted/src/components/common/table/asset/assetTable.vue index 34974c744..75960d05f 100644 --- a/nezha-fronted/src/components/common/table/asset/assetTable.vue +++ b/nezha-fronted/src/components/common/table/asset/assetTable.vue @@ -48,7 +48,7 @@
-
Alert message (active)
+
{{$t('project.topology.alert')}}({{$t('asset.pingActive')}})
{{$t('overall.result.total')}}
{{scope.row.alertNum}}
@@ -253,7 +253,7 @@ export default { label: this.$t('asset.alertNum'), prop: 'alertNum', show: true, - minWidth: 140, + minWidth: 170, sortable: 'custom' }, { label: this.$t('asset.endpointNum2'), diff --git a/nezha-fronted/src/components/common/table/settings/dcTable.vue b/nezha-fronted/src/components/common/table/settings/dcTable.vue index a3f41b6e9..37c79827d 100644 --- a/nezha-fronted/src/components/common/table/settings/dcTable.vue +++ b/nezha-fronted/src/components/common/table/settings/dcTable.vue @@ -173,6 +173,7 @@ export default { }, { label: this.$t('config.dc.alert'), prop: 'alertNum', + minWidth: 170, show: true }, { label: this.$t('asset.tel'), diff --git a/nezha-fronted/src/components/common/table/settings/endpointTable.vue b/nezha-fronted/src/components/common/table/settings/endpointTable.vue index 76e52c4e5..731780ab6 100644 --- a/nezha-fronted/src/components/common/table/settings/endpointTable.vue +++ b/nezha-fronted/src/components/common/table/settings/endpointTable.vue @@ -261,7 +261,7 @@ export default { label: this.$t('project.endpoint.alerts'), prop: 'alerts', show: true, - minWidth: 150, + minWidth: 180, sortable: 'custom' }, { diff --git a/nezha-fronted/src/components/common/table/settings/moduleTable.vue b/nezha-fronted/src/components/common/table/settings/moduleTable.vue index 693d21aa1..9c32804bb 100644 --- a/nezha-fronted/src/components/common/table/settings/moduleTable.vue +++ b/nezha-fronted/src/components/common/table/settings/moduleTable.vue @@ -147,7 +147,7 @@ export default { label: this.$t('project.module.alerts'), prop: 'alertNum', show: true, - width: 200, + width: 170, sortable: 'custom' }, { diff --git a/nezha-fronted/src/components/common/table/settings/projectTable.vue b/nezha-fronted/src/components/common/table/settings/projectTable.vue index 4608328bd..9025e014c 100644 --- a/nezha-fronted/src/components/common/table/settings/projectTable.vue +++ b/nezha-fronted/src/components/common/table/settings/projectTable.vue @@ -148,7 +148,7 @@ export default { label: this.$t('project.endpoint.alerts'), prop: 'alertNum', show: true, - width: 120, + width: 170, sortable: 'custom' } ] diff --git a/nezha-fronted/src/components/page/monitor/project/project.vue b/nezha-fronted/src/components/page/monitor/project/project.vue index c50761d59..9b69ecc56 100644 --- a/nezha-fronted/src/components/page/monitor/project/project.vue +++ b/nezha-fronted/src/components/page/monitor/project/project.vue @@ -137,7 +137,7 @@ export default { label: this.$t('project.endpoint.alerts'), prop: 'alerts', show: true, - width: 150 + width: 180 }, // { // label: this.$t("project.endpoint.lastUpdate"),