diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue index 051b0368a..39a200c6c 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTabNew.vue @@ -247,6 +247,36 @@ export default { } ] }, + searchMsgSilence: { // 给搜索框子组件传递的信息 + searchLabelList: [ + { + name: this.$t('alert.alertRule'), + type: 'input', + label: 'ruleName', + disabled: false + }, { + name: this.$t('asset.asset'), + type: 'input', + label: 'assetName', + disabled: false + }, { + name: this.$t('asset.endpoint'), + type: 'input', + label: 'endpointName', + disabled: false + }, { + name: this.$t('alert.summary'), + type: 'input', + label: 'summary', + disabled: false + }, { + name: this.$t('alert.list.labels'), + type: 'input', + label: 'labels', + disabled: false + } + ] + }, rightBox: { editShow: false, show: false @@ -278,6 +308,11 @@ export default { chartInfo: {} } }, + created () { + if (this.from === fromRoute.alertSilence) { + this.searchMsg = this.searchMsgSilence + } + }, methods: { labelsSort (obj) { const buildIn = ['asset', 'endpoint', 'module', 'cpu', 'project', 'datacenter', 'parent_asset', 'user']