diff --git a/nezha-fronted/src/assets/css/common.scss b/nezha-fronted/src/assets/css/common.scss index b66e76bf4..2bd0c8f84 100644 --- a/nezha-fronted/src/assets/css/common.scss +++ b/nezha-fronted/src/assets/css/common.scss @@ -73,6 +73,9 @@ .green-bg { background-color:$--color-success !important; } +.yellow-bg { + background-color:$--color-silence !important; +} .gray-bg { background-color: $--color-suspended !important; } diff --git a/nezha-fronted/src/assets/css/components/common/table/alert/alertMessageTable.scss b/nezha-fronted/src/assets/css/components/common/table/alert/alertMessageTable.scss index e79e19333..5c380bfa0 100644 --- a/nezha-fronted/src/assets/css/components/common/table/alert/alertMessageTable.scss +++ b/nezha-fronted/src/assets/css/components/common/table/alert/alertMessageTable.scss @@ -101,3 +101,8 @@ .nz-message .el-textarea textarea{ height: 108px !important; } +.alert-message-state{ + padding: 3px 5px; + border-radius: 4px; + color: $--color-text-primary; +} diff --git a/nezha-fronted/src/assets/css/themes/theme-dark.scss b/nezha-fronted/src/assets/css/themes/theme-dark.scss index 95bdc1a69..11ef03a7e 100644 --- a/nezha-fronted/src/assets/css/themes/theme-dark.scss +++ b/nezha-fronted/src/assets/css/themes/theme-dark.scss @@ -69,6 +69,8 @@ $--color-info: #999998; $--color-suspended: #9e9c98; // 监控色 $--color-monitor: #98AEC5; +// silence +$--color-silence: #FFC107; /* 6.table */ // 表头字色 diff --git a/nezha-fronted/src/assets/css/themes/theme-light.scss b/nezha-fronted/src/assets/css/themes/theme-light.scss index 413cd8ff3..8ceb5e38a 100644 --- a/nezha-fronted/src/assets/css/themes/theme-light.scss +++ b/nezha-fronted/src/assets/css/themes/theme-light.scss @@ -69,6 +69,8 @@ $--color-info: #999998; $--color-suspended: #9e9c98; // 监控色 $--color-monitor: #98AEC5; +// sliences +$--color-silence: #FFC107; /* 6.table */ // 表头字色 diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue index 611c9ea88..ecfedb583 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue @@ -19,7 +19,7 @@ - + - - {{scope.row['state'] == 1 ? "Pending" : ""}} - {{scope.row['state'] == 2 ? "Expired" : ""}} - + + + {{$t(stateOptions.find(state=>state.value == scope.row['state']).label)}} + + {{scope.row[item.prop]}} @@ -141,6 +142,7 @@ import chartDataFormat from '../../../charts/chartDataFormat' import alertRuleInfo from '../../alert/alertRuleInfo' import alertLabel from '../../alert/alertLabel' import { calcDurationByStringTimeB } from '../../js/tools' +import {alertMessage as alertMessageConstant} from "@/components/common/js/constants"; export default { name: 'alertMessageTable', components: { @@ -166,7 +168,7 @@ export default { /* 二级列表相关 */ tabList: [], // 二级列表的标签 tabDetailList: [], // 多个详情 - + stateOptions: alertMessageConstant.states, // 详情相关 graphShow: false, chartDatas: [], @@ -178,6 +180,7 @@ export default { chartUnit: 5, severityData: [], tableTitle: [ + { label: 'ID', prop: 'id', @@ -213,6 +216,12 @@ export default { prop: 'description', show: true, minWidth: 200 + }, { + label: this.$t('alert.list.state'), + prop: 'state', + show: true, + width: 100, + sortable: 'custom' }, { label: this.$t('alert.startAt'), prop: 'startAt', diff --git a/nezha-fronted/src/components/common/timePicker.vue b/nezha-fronted/src/components/common/timePicker.vue index 15a2c5ee3..88d10e969 100644 --- a/nezha-fronted/src/components/common/timePicker.vue +++ b/nezha-fronted/src/components/common/timePicker.vue @@ -305,6 +305,7 @@ export default { const showTime = this.timeData.find(item => item.id == n) if (showTime) { this.showTime = Object.assign({}, showTime) + this.searchTime = this.$parent.searchTime } if (this.showEmpty && this.defaultPick === 12) { this.searchTime = [] diff --git a/nezha-fronted/src/components/page/alert/alertMessage.vue b/nezha-fronted/src/components/page/alert/alertMessage.vue index 216719baa..d8c8165e8 100644 --- a/nezha-fronted/src/components/page/alert/alertMessage.vue +++ b/nezha-fronted/src/components/page/alert/alertMessage.vue @@ -18,7 +18,7 @@ - +