NEZ-2942 fix:告警静默-告警页面,ID和确认查询条件未生效

This commit is contained in:
zhangyu
2023-06-28 16:28:20 +08:00
parent 7fb5ec2c1f
commit 7e73403dc5

View File

@@ -246,6 +246,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
@@ -277,6 +307,12 @@ export default {
chartInfo: {}
}
},
created () {
console.log(this.from, fromRoute.alertSilence)
if (this.from === fromRoute.alertSilence) {
this.searchMsg = this.searchMsgSilence
}
},
methods: {
labelsSort (obj) {
const buildIn = ['asset', 'endpoint', 'module', 'cpu', 'project', 'datacenter', 'parent_asset', 'user']