Merge branch 'dev-3.7' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.8

This commit is contained in:
zhangyu
2023-06-28 16:28:58 +08:00

View File

@@ -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']