NEZ-2207 feat:alert rule 批量导入页面开发
This commit is contained in:
@@ -240,20 +240,44 @@ export default {
|
|||||||
language () { return this.$store.getters.getLanguage },
|
language () { return this.$store.getters.getLanguage },
|
||||||
// 显示新版导入
|
// 显示新版导入
|
||||||
importType () {
|
importType () {
|
||||||
// asset module endpoint dc cabinet model
|
// 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']
|
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)
|
return arr.some(item => item === this.importUrl)
|
||||||
},
|
},
|
||||||
// 已存在的内容处理方式
|
// 已存在的内容处理方式
|
||||||
showEexisted () {
|
showEexisted () {
|
||||||
// asset module endpoint dc cabinet model
|
// 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']
|
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)
|
return arr.some(item => item === this.importUrl)
|
||||||
},
|
},
|
||||||
// 遇到错误是否继续导入
|
// 遇到错误是否继续导入
|
||||||
showIgnoreError () {
|
showIgnoreError () {
|
||||||
// asset module endpoint dc cabinet model
|
// 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']
|
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)
|
return arr.some(item => item === this.importUrl)
|
||||||
},
|
},
|
||||||
// 是否同步更新关联的dashboard
|
// 是否同步更新关联的dashboard
|
||||||
|
|||||||
@@ -76,8 +76,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<transition name="el-zoom-in-top">
|
<transition name="el-zoom-in-top">
|
||||||
<el-row v-show="expressionsShow[index-1].show" style="margin-bottom: 10px">
|
<el-row v-show="expressionsShow[index-1].show" style="margin-bottom: 10px">
|
||||||
<el-form-item :prop="'elements.' + (index -1) + '.expression'"
|
<el-form-item :prop="'elements.' + (index -1) + '.expression'" :rules="{ required: true, message: $t('validate.required'), trigger: 'blur'}">
|
||||||
:rules="{ required: true, message: $t('validate.required'), trigger: 'blur'}">
|
|
||||||
<promql-input
|
<promql-input
|
||||||
:from-father-data="true"
|
:from-father-data="true"
|
||||||
:metricOptionsParent="metricOptions"
|
:metricOptionsParent="metricOptions"
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
>
|
>
|
||||||
<template>
|
<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"/>
|
<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>
|
</template>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</template>
|
</template>
|
||||||
@@ -81,8 +81,7 @@
|
|||||||
@getTableData="getTableData"
|
@getTableData="getTableData"
|
||||||
>
|
>
|
||||||
<template v-slot:top-tool-right>
|
<template v-slot:top-tool-right>
|
||||||
<button id="alert-add" v-has="'alertRule_add'" :title="$t('overall.createAlertRule')" class="top-tool-btn"
|
<button id="alert-add" v-has="'alertRule_add'" :title="$t('overall.createAlertRule')" class="top-tool-btn" @click="add">
|
||||||
@click="add">
|
|
||||||
<i class="nz-icon-create-square nz-icon"></i>
|
<i class="nz-icon-create-square nz-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
<top-tool-more-options
|
<top-tool-more-options
|
||||||
|
|||||||
@@ -712,6 +712,7 @@ export default {
|
|||||||
this.codeMirrorValue[this.index] = ''
|
this.codeMirrorValue[this.index] = ''
|
||||||
// this.expressionList[this.index] = ''
|
// this.expressionList[this.index] = ''
|
||||||
this.$set(this.expressionList, this.index, '')
|
this.$set(this.expressionList, this.index, '')
|
||||||
|
this.$emit('change', '')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
newDoc (val) {
|
newDoc (val) {
|
||||||
|
|||||||
Reference in New Issue
Block a user