fix:修改 silence rule endpoint显示 以及添加 alertRule的上滑
This commit is contained in:
@@ -56,6 +56,8 @@
|
||||
<panel-tab-new v-if="from === fromRoute.endpoint && targetTab === 'panel'" v-show="subResizeShow" :detail="detail" :from="from" :tabs="tabs.endpoint.endpointTabTitle" :obj="obj" :targetTab.sync="targetTab" @changeTab="changeTab"></panel-tab-new>
|
||||
<!--chartTemp的Tab-->
|
||||
<panel-tab-new v-if="from === fromRoute.chartTemp && targetTab === 'panel'" v-show="subResizeShow" :detail="detail" :from="from" :tabs="tabs.chartTemp.chartTempTabTitle" :obj="obj" :targetTab.sync="targetTab" @changeTab="changeTab"></panel-tab-new>
|
||||
<!--alertRule Tab-->
|
||||
<alertMessageTabNew v-if="from === fromRoute.alertRule && targetTab === 'alertRuleAlertMessage'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.alertRule.alertRule" @changeTab="changeTab" :targetTab="targetTab"></alertMessageTabNew>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -170,6 +172,11 @@ export default {
|
||||
{ prop: 'panel', name: 'Template preview' }
|
||||
]
|
||||
},
|
||||
alertRule: {
|
||||
alertRule: [
|
||||
{ prop: 'alertRuleAlertMessage', name: 'Alerts' }
|
||||
]
|
||||
},
|
||||
dc: {
|
||||
cabinet: [
|
||||
{ prop: 'cabinet', name: this.$t('config.dc.cabinets'), active: true },
|
||||
|
||||
@@ -294,12 +294,15 @@ export default {
|
||||
delete this.searchLabel.endAt
|
||||
}
|
||||
this.tools.loading = true
|
||||
console.log(this.obj,123123123123)
|
||||
if (this.from === fromRoute.module) {
|
||||
this.searchLabel.moduleIds = this.obj.id
|
||||
} else if (this.from === fromRoute.endpoint) {
|
||||
this.searchLabel.endpointIds = this.obj.id
|
||||
} else if (this.from === fromRoute.asset) {
|
||||
this.searchLabel.assetIds = this.obj.id
|
||||
} else if (this.from === fromRoute.alertRule) {
|
||||
this.searchLabel.ruleIds = this.obj.id
|
||||
}
|
||||
this.$get(this.url, this.searchLabel).then(response => {
|
||||
this.tools.loading = false
|
||||
|
||||
@@ -1057,6 +1057,7 @@ const cn = {
|
||||
alertList: '告警信息',
|
||||
alertConfig: '告警规则',
|
||||
alertName: '告警名称',
|
||||
method: 'Method',
|
||||
severity: '等级',
|
||||
description: '描述',
|
||||
summary: '概要',
|
||||
|
||||
@@ -1075,6 +1075,7 @@ const en = {
|
||||
alertMessage: 'Alert message', // "告警信息"
|
||||
alertRule: 'Alert rule', // "告警规则"
|
||||
alertName: 'Name', // "告警名称"
|
||||
method: 'Method', // "告警名称"
|
||||
severity: 'Priority', // "等级"
|
||||
description: 'Description', // "描述"
|
||||
summary: 'Summary', // "概要"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="right-box right-box-alert-config" v-clickoutside="{obj:editAlertSilence,func:clickOutside}">
|
||||
<!-- begin--标题-->
|
||||
<div class="right-box__header">
|
||||
<div class="header__title">{{editAlertSilence.id ? $t("alert.silence.edit") + " ID:" + editAlertSilence.id : $t("alert.silence.create")}}</div>
|
||||
<div class="header__title">{{editAlertSilence.id ? $t("alert.silence.edit") : $t("alert.silence.create")}}</div>
|
||||
<div class="header__operation">
|
||||
<span v-cancel="{obj: editAlertSilence, func: esc}"><i class="nz-icon nz-icon-close"></i></span>
|
||||
</div>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
fixed="right">
|
||||
<div slot="header" class="table-operation-title">{{$t('overall.option')}}</div>
|
||||
<div slot-scope="scope" class="table-operation-items">
|
||||
<button class="table-operation-item" @click="showBottomBox('detail', scope.row)"><i class="nz-icon nz-icon-view1"></i></button>
|
||||
<button class="table-operation-item" @click="queryMessage(scope.row)"><i class="nz-icon nz-icon-view1"></i></button>
|
||||
<el-dropdown size="medium" trigger="hover" @command="tableOperation">
|
||||
<div class="table-operation-item table-operation-item--more">
|
||||
<span>…</span><i class="nz-icon nz-icon-arrow-down"></i>
|
||||
@@ -92,6 +92,11 @@ export default {
|
||||
prop: 'name',
|
||||
show: true,
|
||||
sortable: 'custom'
|
||||
},
|
||||
{
|
||||
label: this.$t('alert.method'),
|
||||
prop: 'method',
|
||||
show: true,
|
||||
}, {
|
||||
label: this.$t('alert.config.expr'),
|
||||
prop: 'expr',
|
||||
|
||||
@@ -121,6 +121,12 @@ export default {
|
||||
show: true,
|
||||
width: 80,
|
||||
sortable: 'custom'
|
||||
},
|
||||
{
|
||||
label: 'Name',
|
||||
prop: 'name',
|
||||
show: true,
|
||||
width: 150
|
||||
}, {
|
||||
label: 'Matchers',
|
||||
prop: 'matchers',
|
||||
@@ -138,7 +144,7 @@ export default {
|
||||
show: true,
|
||||
width: 120
|
||||
}, {
|
||||
label: 'Reason',
|
||||
label: this.$t('alert.silence.reason'),
|
||||
prop: 'reason',
|
||||
show: true,
|
||||
width: 120
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'alerts'">
|
||||
<span class="alert-num" @click="showBottomBox('endpointAlertMessage', scope.row)">
|
||||
<i class="nz-icon nz-icon-overview-alert" :class="scope.row[item.prop]>0?'colorEF7458':'color23BF9A'"/>
|
||||
<i class="nz-icon nz-icon-overview-alert" :class="scope.row.alertNum>0?'colorEF7458':'color23BF9A'"/>
|
||||
{{scope.row.alertNum}}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
@@ -120,22 +120,22 @@ export default {
|
||||
mixins: [dataListMixin],
|
||||
data () {
|
||||
return {
|
||||
tablist:[
|
||||
tablist: [
|
||||
{
|
||||
state:'1',
|
||||
name:'Active'
|
||||
state: '1',
|
||||
name: 'Active'
|
||||
},
|
||||
{
|
||||
state:'2',
|
||||
name:'Silebt'
|
||||
state: '2',
|
||||
name: 'Silebt'
|
||||
},
|
||||
{
|
||||
state:'3',
|
||||
name:'Expired'
|
||||
state: '3',
|
||||
name: 'Expired'
|
||||
}
|
||||
],
|
||||
isActive:0,
|
||||
ind:0,
|
||||
isActive: 0,
|
||||
ind: 0,
|
||||
url: 'alert/message',
|
||||
// 导出相关
|
||||
importBox: { show: false, title: this.$t('overall.exportExcel') },
|
||||
@@ -376,13 +376,13 @@ export default {
|
||||
}
|
||||
},
|
||||
getTableData (ind) {
|
||||
if(ind ==undefined){
|
||||
ind=this.ind
|
||||
}else{
|
||||
this.ind =ind
|
||||
if (ind == undefined) {
|
||||
ind = this.ind
|
||||
} else {
|
||||
this.ind = ind
|
||||
}
|
||||
const ii =ind+1
|
||||
this.isActive=ind
|
||||
const ii = ind + 1
|
||||
this.isActive = ind
|
||||
this.$set(this.searchLabel, 'pageNo', this.pageObj.pageNo)
|
||||
this.$set(this.searchLabel, 'pageSize', this.pageObj.pageSize)
|
||||
if (this.searchTime && this.searchTime.length > 1) {
|
||||
@@ -393,11 +393,11 @@ export default {
|
||||
delete this.searchLabel.endAt
|
||||
}
|
||||
this.tools.loading = true
|
||||
if(ind===0 || ind ===1 || ind ===2){
|
||||
if (ind === 0 || ind === 1 || ind === 2) {
|
||||
delete this.searchLabel.startAt
|
||||
delete this.searchLabel.endAt
|
||||
}
|
||||
this.$get(this.url+'?state='+ii, this.searchLabel).then(response => {
|
||||
this.$get(this.url + '?state=' + ii, this.searchLabel).then(response => {
|
||||
console.log(this.searchLabel)
|
||||
this.tools.loading = false
|
||||
if (response.code == 200) {
|
||||
@@ -613,7 +613,7 @@ export default {
|
||||
this.$refs.dataTable.$refs.dataTable.bodyWrapper.scrollTop = 0
|
||||
}
|
||||
this.getTableData()
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -119,7 +119,7 @@ export default {
|
||||
if (!this.hasButton('alertMessage_view')) {
|
||||
return
|
||||
}
|
||||
this.$refs.dataList.showBottomBox('alertMessage', alertRule)
|
||||
this.$refs.dataList.showBottomBox('alertRuleAlertMessage', alertRule)
|
||||
},
|
||||
getTableData () {
|
||||
this.$set(this.searchLabel, 'pageNo', this.pageObj.pageNo)
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"baseUrl":"http://192.168.40.42:8080/nz-admin/", "version": "1.2.2020.11.10.14.10"}
|
||||
{"baseUrl":"http://192.168.40.42:8080/nz-admin/", "version": "2.0.2021.05.08.18.07"}
|
||||
|
||||
Reference in New Issue
Block a user