NEZ-1849 feat :alert message列表页面 增加 acknowledge 状态及按钮
This commit is contained in:
@@ -71,5 +71,5 @@ module.exports = {
|
||||
// `npm run build --report`
|
||||
// Set to `true` or `false` to always turn it on or off
|
||||
bundleAnalyzerReport: process.env.npm_config_report
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
@font-face {
|
||||
font-family: "nz-icon"; /* Project id 2030432 */
|
||||
src: url('iconfont.woff2?t=1649732646689') format('woff2'),
|
||||
url('iconfont.woff?t=1649732646689') format('woff'),
|
||||
url('iconfont.ttf?t=1649732646689') format('truetype');
|
||||
src: url('iconfont.woff2?t=1651733602600') format('woff2'),
|
||||
url('iconfont.woff?t=1651733602600') format('woff'),
|
||||
url('iconfont.ttf?t=1651733602600') format('truetype');
|
||||
}
|
||||
|
||||
.nz-icon {
|
||||
@@ -13,6 +13,10 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.nz-icon-queren:before {
|
||||
content: "\e771";
|
||||
}
|
||||
|
||||
.nz-icon-tool:before {
|
||||
content: "\e76f";
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -5,6 +5,13 @@
|
||||
"css_prefix_text": "nz-icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "29460715",
|
||||
"name": "确认",
|
||||
"font_class": "queren",
|
||||
"unicode": "e771",
|
||||
"unicode_decimal": 59249
|
||||
},
|
||||
{
|
||||
"icon_id": "28893756",
|
||||
"name": "Tool",
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,8 +1,8 @@
|
||||
@font-face {
|
||||
font-family: "nz-icon"; /* Project id 2030432 */
|
||||
src: url('./font/iconfont.woff2?t=1649732646689') format('woff2'),
|
||||
url('./font/iconfont.woff?t=1649732646689') format('woff'),
|
||||
url('./font/iconfont.ttf?t=1649732646689') format('truetype');
|
||||
src: url('./font/iconfont.woff2?t=1651733602600') format('woff2'),
|
||||
url('./font/iconfont.woff?t=1651733602600') format('woff'),
|
||||
url('./font/iconfont.ttf?t=1651733602600') format('truetype');
|
||||
}
|
||||
|
||||
.nz-icon {
|
||||
@@ -13,6 +13,10 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.nz-icon-queren:before {
|
||||
content: "\e771";
|
||||
}
|
||||
|
||||
.nz-icon-tool:before {
|
||||
content: "\e76f";
|
||||
}
|
||||
|
||||
@@ -921,6 +921,8 @@ export default {
|
||||
objectInfo.operation = val.val
|
||||
} else if (val.label === 'state') {
|
||||
objectInfo.state = val.val
|
||||
} else if (val.label === 'acknowledge') {
|
||||
objectInfo.acknowledge = val.val
|
||||
}
|
||||
} else {
|
||||
objectInfo[val.label] = val.val
|
||||
|
||||
@@ -173,6 +173,16 @@ const searchSelectInfo = { // value: 传给后台的值;label:显示给用
|
||||
label: i18n.t('overall.disabled')
|
||||
}
|
||||
],
|
||||
acknowledge: [
|
||||
{
|
||||
value: 'success',
|
||||
label: i18n.t('config.system.reset.yes')
|
||||
},
|
||||
{
|
||||
value: 'fail',
|
||||
label: i18n.t('config.system.reset.no')
|
||||
}
|
||||
],
|
||||
varType: [
|
||||
{ value: '1', label: i18n.t('asset.asset') },
|
||||
{ value: '2', label: i18n.t('asset.endpoint') }
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
<!-- <el-dropdown-item :command="['showText', scope.row]"><i class="nz-icon nz-icon-guzhangshuju"></i><span class="operation-dropdown-text">{{$t('alert.config.trbShot')}}</span></el-dropdown-item>-->
|
||||
<el-dropdown-item v-has="'alertMessage_view'" :command="['delete', scope.row]"><i class="nz-icon nz-icon-delete"></i><span class="operation-dropdown-text">{{$t('overall.delete')}}</span></el-dropdown-item>
|
||||
<el-dropdown-item v-has="'alertSilence_add'" :command="['fastSilence', scope.row, 'alertMessage']"><i class="nz-icon nz-icon-fast-silence"></i><span class="operation-dropdown-text">{{$t('overall.silenceAlert')}}</span></el-dropdown-item>
|
||||
<el-dropdown-item v-has="'alertMessage_expired'" :disabled="scope.row.ack === 1"><i class="nz-icon nz-icon-queren"></i><span class="operation-dropdown-text">{{$t('overall.acknowledge')}}</span></el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,28 @@
|
||||
type="button" @click="showExportDialog">
|
||||
<i class="nz-icon-download1 nz-icon"></i>
|
||||
</button>
|
||||
<delete-button id="alert-msg-batch-delete" v-has="'alertMessage_expired'" :api="url" :clickFunction="batchDel" :delete-objs="batchDeleteObjs" @after="getTableData" @before="delFlag=true"></delete-button>
|
||||
<top-tool-more-options
|
||||
:delete-objs="batchDeleteObjs"
|
||||
ref="export"
|
||||
id="model"
|
||||
:params="searchLabel"
|
||||
:params2="searchCheckBox"
|
||||
export-file-name="AlertMessage"
|
||||
class="top-tool-export margin-r-10"
|
||||
@afterImport="getTableData"
|
||||
>
|
||||
<template v-slot:before>
|
||||
<div>
|
||||
<el-dropdown-item>
|
||||
<delete-button id="alert-msg-batch-delete" v-has="'alertMessage_expired'" :api="url" :clickFunction="batchDel" :delete-objs="batchDeleteObjs" @after="getTableData" @before="delFlag=true" :title="$t('overall.batchDel')" :type="'link'"></delete-button>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<div id="alert-msg-batch-ack" v-has="'alertMessage_expired'" @click="batchAck"><i class="nz-icon nz-icon-queren"></i>{{$t('overall.batchAck')}}</div>
|
||||
</el-dropdown-item>
|
||||
</div>
|
||||
</template>
|
||||
</top-tool-more-options>
|
||||
|
||||
</template>
|
||||
<template v-slot:search >
|
||||
<click-search ref="clickSearch" :select-value.sync="selectValue" :title-search-list="titleSearchList" @reload="reloadTable"/>
|
||||
@@ -161,6 +182,7 @@ import alertMessageInfo from '@/components/common/alert/alertMessageInfo'
|
||||
import lineData from '@/components/chart/defaultLineData'
|
||||
import logData from '@/components/chart/defaultLogData'
|
||||
import lodash from 'lodash'
|
||||
import topToolMoreOptions from '@/components/common/popBox/topToolMoreOptions'
|
||||
|
||||
export default {
|
||||
name: 'alertMessage',
|
||||
@@ -172,7 +194,8 @@ export default {
|
||||
deleteButton,
|
||||
alertSilenceBox,
|
||||
clickSearch,
|
||||
alertMessageInfo
|
||||
alertMessageInfo,
|
||||
topToolMoreOptions
|
||||
},
|
||||
mixins: [dataListMixin, routerPathParams],
|
||||
data () {
|
||||
@@ -250,6 +273,12 @@ export default {
|
||||
type: 'input',
|
||||
label: 'labels',
|
||||
disabled: false
|
||||
}, {
|
||||
name: this.$t('overall.acknowledge'),
|
||||
type: 'selectString',
|
||||
label: 'acknowledge',
|
||||
readonly: true,
|
||||
disabled: false
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -500,6 +529,26 @@ export default {
|
||||
// this.getTitleSearch()
|
||||
},
|
||||
methods: {
|
||||
batchAck () {
|
||||
const params = []
|
||||
const obj = {}
|
||||
this.batchDeleteObjs.forEach(item => {
|
||||
obj.id = item.id
|
||||
obj.ack = item.ack
|
||||
params.push(obj)
|
||||
})
|
||||
if (params.length === 0) {
|
||||
this.$message({ type: 'error', message: this.$t('tip.SelectAlertMessages') })
|
||||
} else {
|
||||
this.$put('alert/message/ack', params).then(response => {
|
||||
if (response.code == 200) {
|
||||
this.$message({ duration: 1000, type: 'success', message: this.$t('tip.ackSuccess') })
|
||||
} else {
|
||||
this.$message.error(response.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
labelsSort (obj) {
|
||||
const buildIn = ['asset', 'endpoint', 'module', 'cpu', 'project', 'datacenter', 'parent_asset', 'user']
|
||||
const labels = JSON.parse(JSON.stringify(obj))
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
{"baseUrl":"/", "version": "21.04"}
|
||||
{"baseUrl":"http://192.168.40.42:8080/", "version": "21.04"}
|
||||
|
||||
Reference in New Issue
Block a user