NEZ-1849 feat :alert message列表页面 增加 acknowledge 状态及按钮
This commit is contained in:
@@ -71,5 +71,5 @@ module.exports = {
|
|||||||
// `npm run build --report`
|
// `npm run build --report`
|
||||||
// Set to `true` or `false` to always turn it on or off
|
// Set to `true` or `false` to always turn it on or off
|
||||||
bundleAnalyzerReport: process.env.npm_config_report
|
bundleAnalyzerReport: process.env.npm_config_report
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: "nz-icon"; /* Project id 2030432 */
|
font-family: "nz-icon"; /* Project id 2030432 */
|
||||||
src: url('iconfont.woff2?t=1649732646689') format('woff2'),
|
src: url('iconfont.woff2?t=1651733602600') format('woff2'),
|
||||||
url('iconfont.woff?t=1649732646689') format('woff'),
|
url('iconfont.woff?t=1651733602600') format('woff'),
|
||||||
url('iconfont.ttf?t=1649732646689') format('truetype');
|
url('iconfont.ttf?t=1651733602600') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.nz-icon {
|
.nz-icon {
|
||||||
@@ -13,6 +13,10 @@
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nz-icon-queren:before {
|
||||||
|
content: "\e771";
|
||||||
|
}
|
||||||
|
|
||||||
.nz-icon-tool:before {
|
.nz-icon-tool:before {
|
||||||
content: "\e76f";
|
content: "\e76f";
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -5,6 +5,13 @@
|
|||||||
"css_prefix_text": "nz-icon-",
|
"css_prefix_text": "nz-icon-",
|
||||||
"description": "",
|
"description": "",
|
||||||
"glyphs": [
|
"glyphs": [
|
||||||
|
{
|
||||||
|
"icon_id": "29460715",
|
||||||
|
"name": "确认",
|
||||||
|
"font_class": "queren",
|
||||||
|
"unicode": "e771",
|
||||||
|
"unicode_decimal": 59249
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "28893756",
|
"icon_id": "28893756",
|
||||||
"name": "Tool",
|
"name": "Tool",
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,8 +1,8 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: "nz-icon"; /* Project id 2030432 */
|
font-family: "nz-icon"; /* Project id 2030432 */
|
||||||
src: url('./font/iconfont.woff2?t=1649732646689') format('woff2'),
|
src: url('./font/iconfont.woff2?t=1651733602600') format('woff2'),
|
||||||
url('./font/iconfont.woff?t=1649732646689') format('woff'),
|
url('./font/iconfont.woff?t=1651733602600') format('woff'),
|
||||||
url('./font/iconfont.ttf?t=1649732646689') format('truetype');
|
url('./font/iconfont.ttf?t=1651733602600') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.nz-icon {
|
.nz-icon {
|
||||||
@@ -13,6 +13,10 @@
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nz-icon-queren:before {
|
||||||
|
content: "\e771";
|
||||||
|
}
|
||||||
|
|
||||||
.nz-icon-tool:before {
|
.nz-icon-tool:before {
|
||||||
content: "\e76f";
|
content: "\e76f";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -921,6 +921,8 @@ export default {
|
|||||||
objectInfo.operation = val.val
|
objectInfo.operation = val.val
|
||||||
} else if (val.label === 'state') {
|
} else if (val.label === 'state') {
|
||||||
objectInfo.state = val.val
|
objectInfo.state = val.val
|
||||||
|
} else if (val.label === 'acknowledge') {
|
||||||
|
objectInfo.acknowledge = val.val
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
objectInfo[val.label] = val.val
|
objectInfo[val.label] = val.val
|
||||||
|
|||||||
@@ -173,6 +173,16 @@ const searchSelectInfo = { // value: 传给后台的值;label:显示给用
|
|||||||
label: i18n.t('overall.disabled')
|
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: [
|
varType: [
|
||||||
{ value: '1', label: i18n.t('asset.asset') },
|
{ value: '1', label: i18n.t('asset.asset') },
|
||||||
{ value: '2', label: i18n.t('asset.endpoint') }
|
{ 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 :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="'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="'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-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -23,7 +23,28 @@
|
|||||||
type="button" @click="showExportDialog">
|
type="button" @click="showExportDialog">
|
||||||
<i class="nz-icon-download1 nz-icon"></i>
|
<i class="nz-icon-download1 nz-icon"></i>
|
||||||
</button>
|
</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>
|
||||||
<template v-slot:search >
|
<template v-slot:search >
|
||||||
<click-search ref="clickSearch" :select-value.sync="selectValue" :title-search-list="titleSearchList" @reload="reloadTable"/>
|
<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 lineData from '@/components/chart/defaultLineData'
|
||||||
import logData from '@/components/chart/defaultLogData'
|
import logData from '@/components/chart/defaultLogData'
|
||||||
import lodash from 'lodash'
|
import lodash from 'lodash'
|
||||||
|
import topToolMoreOptions from '@/components/common/popBox/topToolMoreOptions'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'alertMessage',
|
name: 'alertMessage',
|
||||||
@@ -172,7 +194,8 @@ export default {
|
|||||||
deleteButton,
|
deleteButton,
|
||||||
alertSilenceBox,
|
alertSilenceBox,
|
||||||
clickSearch,
|
clickSearch,
|
||||||
alertMessageInfo
|
alertMessageInfo,
|
||||||
|
topToolMoreOptions
|
||||||
},
|
},
|
||||||
mixins: [dataListMixin, routerPathParams],
|
mixins: [dataListMixin, routerPathParams],
|
||||||
data () {
|
data () {
|
||||||
@@ -250,6 +273,12 @@ export default {
|
|||||||
type: 'input',
|
type: 'input',
|
||||||
label: 'labels',
|
label: 'labels',
|
||||||
disabled: false
|
disabled: false
|
||||||
|
}, {
|
||||||
|
name: this.$t('overall.acknowledge'),
|
||||||
|
type: 'selectString',
|
||||||
|
label: 'acknowledge',
|
||||||
|
readonly: true,
|
||||||
|
disabled: false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -500,6 +529,26 @@ export default {
|
|||||||
// this.getTitleSearch()
|
// this.getTitleSearch()
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
labelsSort (obj) {
|
||||||
const buildIn = ['asset', 'endpoint', 'module', 'cpu', 'project', 'datacenter', 'parent_asset', 'user']
|
const buildIn = ['asset', 'endpoint', 'module', 'cpu', 'project', 'datacenter', 'parent_asset', 'user']
|
||||||
const labels = JSON.parse(JSON.stringify(obj))
|
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