NEZ-2380 feat :APM setting页面增加 interface name 配置项
This commit is contained in:
@@ -81,7 +81,8 @@ export default {
|
||||
metrics_storage_s3_endpoint: '',
|
||||
metrics_storage_s3_secret_access_key: '',
|
||||
metrics_storage_type: '',
|
||||
prometheus_federation_enabled: ''
|
||||
prometheus_federation_enabled: '',
|
||||
interface_name: []
|
||||
},
|
||||
monitorRules: {
|
||||
// alert_api: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
||||
@@ -253,6 +254,13 @@ export default {
|
||||
this.$refs.emailForm.clearValidate()
|
||||
}
|
||||
if (type == 'monitor') {
|
||||
if(response.data.interface_name){
|
||||
let arr = response.data.interface_name.split(',')
|
||||
this.monitor.interface_name = arr.map(item=>{
|
||||
return {text: item}
|
||||
|
||||
})
|
||||
}
|
||||
localStorage.setItem('nz-prometheus-federation-enabled', this.monitor.prometheus_federation_enabled)
|
||||
}
|
||||
this[type + 'Copy'] = Object.assign({}, this[type])
|
||||
@@ -270,6 +278,12 @@ export default {
|
||||
param.map_center_config = JSON.stringify(mapConfig)
|
||||
param.pin_policy = JSON.stringify(this.basic.pin_policy)
|
||||
}
|
||||
if(type == 'monitor') {
|
||||
let str = this.monitor.interface_name.map(item=>{
|
||||
return item.text
|
||||
})
|
||||
param.interface_name = str.join(',')
|
||||
}
|
||||
const postParam = Object.assign({}, param)
|
||||
for (const key in postParam[type]) {
|
||||
postParam[type][key] = postParam[type][key] + ''
|
||||
|
||||
Reference in New Issue
Block a user