NEZ-2207 feat:alert rule 批量导入页面开发
This commit is contained in:
@@ -240,20 +240,44 @@ export default {
|
||||
language () { return this.$store.getters.getLanguage },
|
||||
// 显示新版导入
|
||||
importType () {
|
||||
// asset module endpoint dc cabinet model
|
||||
const arr = ['/asset/asset/import', '/monitor/module/import', '/monitor/endpoint/import', '/dc/import', '/dc/cabinet/import', '/asset/model/import']
|
||||
// asset module endpoint dc cabinet model alertRule
|
||||
const arr = [
|
||||
'/asset/asset/import',
|
||||
'/monitor/module/import',
|
||||
'/monitor/endpoint/import',
|
||||
'/dc/import',
|
||||
'/dc/cabinet/import',
|
||||
'/asset/model/import',
|
||||
'/alert/rule/import'
|
||||
]
|
||||
return arr.some(item => item === this.importUrl)
|
||||
},
|
||||
// 已存在的内容处理方式
|
||||
showEexisted () {
|
||||
// asset module endpoint dc cabinet model
|
||||
const arr = ['/asset/asset/import', '/monitor/module/import', '/monitor/endpoint/import', '/dc/import', '/dc/cabinet/import', '/asset/model/import']
|
||||
// asset module endpoint dc cabinet model alertRule
|
||||
const arr = [
|
||||
'/asset/asset/import',
|
||||
'/monitor/module/import',
|
||||
'/monitor/endpoint/import',
|
||||
'/dc/import',
|
||||
'/dc/cabinet/import',
|
||||
'/asset/model/import',
|
||||
'/alert/rule/import'
|
||||
]
|
||||
return arr.some(item => item === this.importUrl)
|
||||
},
|
||||
// 遇到错误是否继续导入
|
||||
showIgnoreError () {
|
||||
// asset module endpoint dc cabinet model
|
||||
const arr = ['/asset/asset/import', '/monitor/module/import', '/monitor/endpoint/import', '/dc/import', '/dc/cabinet/import', '/asset/model/import']
|
||||
// asset module endpoint dc cabinet model alertRule
|
||||
const arr = [
|
||||
'/asset/asset/import',
|
||||
'/monitor/module/import',
|
||||
'/monitor/endpoint/import',
|
||||
'/dc/import',
|
||||
'/dc/cabinet/import',
|
||||
'/asset/model/import',
|
||||
'/alert/rule/import'
|
||||
]
|
||||
return arr.some(item => item === this.importUrl)
|
||||
},
|
||||
// 是否同步更新关联的dashboard
|
||||
|
||||
@@ -76,8 +76,7 @@
|
||||
</div>
|
||||
<transition name="el-zoom-in-top">
|
||||
<el-row v-show="expressionsShow[index-1].show" style="margin-bottom: 10px">
|
||||
<el-form-item :prop="'elements.' + (index -1) + '.expression'"
|
||||
:rules="{ required: true, message: $t('validate.required'), trigger: 'blur'}">
|
||||
<el-form-item :prop="'elements.' + (index -1) + '.expression'" :rules="{ required: true, message: $t('validate.required'), trigger: 'blur'}">
|
||||
<promql-input
|
||||
:from-father-data="true"
|
||||
:metricOptionsParent="metricOptions"
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</template>
|
||||
<template slot-scope="scope" :column="item">
|
||||
<span v-if="item.prop === 'severity'&&scope.row[item.prop]" class="severity">
|
||||
<i class="nz-icon nz-icon-circle" :style="{color:scope.row[item.prop].color,'font-size':'12px','margin-right':'5px'}"></i> {{scope.row[item.prop].name}}
|
||||
<i class="nz-icon nz-icon-circle" :style="{color:scope.row[item.prop].color,'font-size':'12px','margin-right':'5px'}"></i> {{scope.row[item.prop].name}}
|
||||
</span>
|
||||
<template v-else-if="item.prop === 'alertNum'">
|
||||
<span style="cursor: pointer" @click="queryMessage(scope.row)">
|
||||
@@ -157,7 +157,7 @@
|
||||
</div>
|
||||
</el-table-column>
|
||||
<template slot="empty">
|
||||
<div v-if="!loading" class="table-no-data">
|
||||
<div v-if="!loading" class="table-no-data">
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#nz-icon-no-data-list"></use>
|
||||
</svg>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
>
|
||||
<template>
|
||||
<el-input-number ref="jumpInput" v-model="pageObj.pageNo" :controls="false" :min="1" :max="pageObj.pages" class="jump-input" @change="getTableData" @keyup.enter.native="getTableData" size="mini"/>
|
||||
<span class="jump-pages">/ {{pageObj.pages}}</span>
|
||||
<span class="jump-pages">/ {{pageObj.pages}}</span>
|
||||
</template>
|
||||
</el-pagination>
|
||||
</template>
|
||||
@@ -81,8 +81,7 @@
|
||||
@getTableData="getTableData"
|
||||
>
|
||||
<template v-slot:top-tool-right>
|
||||
<button id="alert-add" v-has="'alertRule_add'" :title="$t('overall.createAlertRule')" class="top-tool-btn"
|
||||
@click="add">
|
||||
<button id="alert-add" v-has="'alertRule_add'" :title="$t('overall.createAlertRule')" class="top-tool-btn" @click="add">
|
||||
<i class="nz-icon-create-square nz-icon"></i>
|
||||
</button>
|
||||
<top-tool-more-options
|
||||
|
||||
@@ -712,6 +712,7 @@ export default {
|
||||
this.codeMirrorValue[this.index] = ''
|
||||
// this.expressionList[this.index] = ''
|
||||
this.$set(this.expressionList, this.index, '')
|
||||
this.$emit('change', '')
|
||||
}
|
||||
},
|
||||
newDoc (val) {
|
||||
|
||||
Reference in New Issue
Block a user