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>
|
<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-->
|
<!--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>
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -170,6 +172,11 @@ export default {
|
|||||||
{ prop: 'panel', name: 'Template preview' }
|
{ prop: 'panel', name: 'Template preview' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
alertRule: {
|
||||||
|
alertRule: [
|
||||||
|
{ prop: 'alertRuleAlertMessage', name: 'Alerts' }
|
||||||
|
]
|
||||||
|
},
|
||||||
dc: {
|
dc: {
|
||||||
cabinet: [
|
cabinet: [
|
||||||
{ prop: 'cabinet', name: this.$t('config.dc.cabinets'), active: true },
|
{ prop: 'cabinet', name: this.$t('config.dc.cabinets'), active: true },
|
||||||
|
|||||||
@@ -294,12 +294,15 @@ export default {
|
|||||||
delete this.searchLabel.endAt
|
delete this.searchLabel.endAt
|
||||||
}
|
}
|
||||||
this.tools.loading = true
|
this.tools.loading = true
|
||||||
|
console.log(this.obj,123123123123)
|
||||||
if (this.from === fromRoute.module) {
|
if (this.from === fromRoute.module) {
|
||||||
this.searchLabel.moduleIds = this.obj.id
|
this.searchLabel.moduleIds = this.obj.id
|
||||||
} else if (this.from === fromRoute.endpoint) {
|
} else if (this.from === fromRoute.endpoint) {
|
||||||
this.searchLabel.endpointIds = this.obj.id
|
this.searchLabel.endpointIds = this.obj.id
|
||||||
} else if (this.from === fromRoute.asset) {
|
} else if (this.from === fromRoute.asset) {
|
||||||
this.searchLabel.assetIds = this.obj.id
|
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.$get(this.url, this.searchLabel).then(response => {
|
||||||
this.tools.loading = false
|
this.tools.loading = false
|
||||||
|
|||||||
@@ -1057,6 +1057,7 @@ const cn = {
|
|||||||
alertList: '告警信息',
|
alertList: '告警信息',
|
||||||
alertConfig: '告警规则',
|
alertConfig: '告警规则',
|
||||||
alertName: '告警名称',
|
alertName: '告警名称',
|
||||||
|
method: 'Method',
|
||||||
severity: '等级',
|
severity: '等级',
|
||||||
description: '描述',
|
description: '描述',
|
||||||
summary: '概要',
|
summary: '概要',
|
||||||
|
|||||||
@@ -1075,6 +1075,7 @@ const en = {
|
|||||||
alertMessage: 'Alert message', // "告警信息"
|
alertMessage: 'Alert message', // "告警信息"
|
||||||
alertRule: 'Alert rule', // "告警规则"
|
alertRule: 'Alert rule', // "告警规则"
|
||||||
alertName: 'Name', // "告警名称"
|
alertName: 'Name', // "告警名称"
|
||||||
|
method: 'Method', // "告警名称"
|
||||||
severity: 'Priority', // "等级"
|
severity: 'Priority', // "等级"
|
||||||
description: 'Description', // "描述"
|
description: 'Description', // "描述"
|
||||||
summary: 'Summary', // "概要"
|
summary: 'Summary', // "概要"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="right-box right-box-alert-config" v-clickoutside="{obj:editAlertSilence,func:clickOutside}">
|
<div class="right-box right-box-alert-config" v-clickoutside="{obj:editAlertSilence,func:clickOutside}">
|
||||||
<!-- begin--标题-->
|
<!-- begin--标题-->
|
||||||
<div class="right-box__header">
|
<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">
|
<div class="header__operation">
|
||||||
<span v-cancel="{obj: editAlertSilence, func: esc}"><i class="nz-icon nz-icon-close"></i></span>
|
<span v-cancel="{obj: editAlertSilence, func: esc}"><i class="nz-icon nz-icon-close"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
fixed="right">
|
fixed="right">
|
||||||
<div slot="header" class="table-operation-title">{{$t('overall.option')}}</div>
|
<div slot="header" class="table-operation-title">{{$t('overall.option')}}</div>
|
||||||
<div slot-scope="scope" class="table-operation-items">
|
<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">
|
<el-dropdown size="medium" trigger="hover" @command="tableOperation">
|
||||||
<div class="table-operation-item table-operation-item--more">
|
<div class="table-operation-item table-operation-item--more">
|
||||||
<span>…</span><i class="nz-icon nz-icon-arrow-down"></i>
|
<span>…</span><i class="nz-icon nz-icon-arrow-down"></i>
|
||||||
@@ -92,6 +92,11 @@ export default {
|
|||||||
prop: 'name',
|
prop: 'name',
|
||||||
show: true,
|
show: true,
|
||||||
sortable: 'custom'
|
sortable: 'custom'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: this.$t('alert.method'),
|
||||||
|
prop: 'method',
|
||||||
|
show: true,
|
||||||
}, {
|
}, {
|
||||||
label: this.$t('alert.config.expr'),
|
label: this.$t('alert.config.expr'),
|
||||||
prop: 'expr',
|
prop: 'expr',
|
||||||
|
|||||||
@@ -121,6 +121,12 @@ export default {
|
|||||||
show: true,
|
show: true,
|
||||||
width: 80,
|
width: 80,
|
||||||
sortable: 'custom'
|
sortable: 'custom'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Name',
|
||||||
|
prop: 'name',
|
||||||
|
show: true,
|
||||||
|
width: 150
|
||||||
}, {
|
}, {
|
||||||
label: 'Matchers',
|
label: 'Matchers',
|
||||||
prop: 'matchers',
|
prop: 'matchers',
|
||||||
@@ -138,7 +144,7 @@ export default {
|
|||||||
show: true,
|
show: true,
|
||||||
width: 120
|
width: 120
|
||||||
}, {
|
}, {
|
||||||
label: 'Reason',
|
label: this.$t('alert.silence.reason'),
|
||||||
prop: 'reason',
|
prop: 'reason',
|
||||||
show: true,
|
show: true,
|
||||||
width: 120
|
width: 120
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="item.prop === 'alerts'">
|
<template v-else-if="item.prop === 'alerts'">
|
||||||
<span class="alert-num" @click="showBottomBox('endpointAlertMessage', scope.row)">
|
<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}}
|
{{scope.row.alertNum}}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -613,7 +613,7 @@ export default {
|
|||||||
this.$refs.dataTable.$refs.dataTable.bodyWrapper.scrollTop = 0
|
this.$refs.dataTable.$refs.dataTable.bodyWrapper.scrollTop = 0
|
||||||
}
|
}
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ export default {
|
|||||||
if (!this.hasButton('alertMessage_view')) {
|
if (!this.hasButton('alertMessage_view')) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$refs.dataList.showBottomBox('alertMessage', alertRule)
|
this.$refs.dataList.showBottomBox('alertRuleAlertMessage', alertRule)
|
||||||
},
|
},
|
||||||
getTableData () {
|
getTableData () {
|
||||||
this.$set(this.searchLabel, 'pageNo', this.pageObj.pageNo)
|
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