NEZ-959 feat: 告警规则页面 列表新增type列,侧滑新增type下拉选择器

This commit is contained in:
@changcode
2021-09-03 16:37:11 +08:00
parent 9a37341d0b
commit b203bc7faf
3 changed files with 95 additions and 19 deletions

View File

@@ -46,6 +46,12 @@
{{scope.row.alertNum}}
</span>
</template>
<template v-else-if="item.prop === 'type'">
<span v-if="scope.row[item.prop] === 1">{{ $t('project.metrics.metrics') }}</span>
<span v-else-if="scope.row[item.prop] === 2">{{ $t('overall.logs') }}</span>
<span v-else-if="scope.row[item.prop] === 3">SNMP TRAP</span>
<span v-else>-</span>
</template>
<template v-else-if="item.prop === 'threshold'">{{formatThreshold(scope.row[item.prop], scope.row.unit)}}</template>
<template v-else-if="item.prop === 'method'">
<span v-if="scope.row.methods">{{scope.row.methods.map(label=>label.name).join(',')}}</span>
@@ -112,8 +118,13 @@ export default {
show: true,
minWidth: 200,
sortable: 'custom'
},
{
}, {
label: this.$t('overall.type'),
prop: 'type',
show: true,
minWidth: 200,
sortable: 'custom'
}, {
label: this.$t('alert.config.expr'),
prop: 'expr',
minWidth: 200,