NEZ-1032 fix: Endpoint 新增页面 切换 project,module,asset 重置 metrics,logs配置
This commit is contained in:
@@ -58,6 +58,7 @@
|
||||
show-field="name"
|
||||
v-model="editEndpoint.assetId"
|
||||
class="form-control"
|
||||
ref="sp"
|
||||
:result-format="resultFormat"
|
||||
></v-selectpage>
|
||||
</el-form-item>
|
||||
@@ -121,7 +122,7 @@
|
||||
</el-form-item>
|
||||
<!--path-->
|
||||
<el-form-item :label='$t("project.endpoint.path")' class="half-form-item" prop="configs.metrics_path">
|
||||
<el-input id="module-box-input-path" v-model="editEndpoint.configs[0].config.metrics_path" placeholder="" size="small" disabled></el-input>
|
||||
<el-input id="module-box-input-path" v-model="editEndpoint.configs[0].config.metrics_path" placeholder="" size="small" :disabled="editEndpoint.configs[0].config.protocol != 'http'"></el-input>
|
||||
</el-form-item>
|
||||
<!--port-->
|
||||
<el-form-item :label='$t("project.endpoint.port")' class="half-form-item" prop="configs.0.config.port" :rules="[
|
||||
@@ -619,6 +620,7 @@ export default {
|
||||
activeName: 'Basic',
|
||||
activeNameLogs: ['Basic'],
|
||||
expandedWalkData: [],
|
||||
editEndpointReset: {},
|
||||
language: localStorage.getItem('nz-language'),
|
||||
radio: 'password',
|
||||
editEndpoint: {},
|
||||
@@ -1093,6 +1095,10 @@ export default {
|
||||
this.getModuleList()
|
||||
if (this.editEndpoint.moduleId) {
|
||||
this.editEndpoint.moduleId = ''
|
||||
this.editEndpoint.name = ''
|
||||
this.editEndpoint.assetName = ''
|
||||
this.editEndpoint.assetId = ''
|
||||
this.$refs.sp.remove()
|
||||
this.$refs.moduleForm.clearValidate('moduleId')
|
||||
}
|
||||
},
|
||||
@@ -1351,7 +1357,6 @@ export default {
|
||||
}
|
||||
if (this.editEndpoint.moduleId && this.editEndpoint.assetId) {
|
||||
this.$post('/monitor/endpoint/render', { moduleIds: this.editEndpoint.moduleId, assetIds: this.editEndpoint.assetId }).then(res => {
|
||||
if (JSON.stringify(this.editEndpoint.configs) === JSON.stringify(this.blankObject.configs)) {
|
||||
this.editEndpoint.configs = JSON.parse(res.data.list[0].configs)
|
||||
this.activeNameLogs = this.editEndpoint.configs[1].config.map(() => 'Basic')
|
||||
this.editEndpoint.configs[1].config.forEach(item => {
|
||||
@@ -1420,10 +1425,7 @@ export default {
|
||||
} else {
|
||||
this.editEndpoint.paramObj.push({ key: '', value: [] })
|
||||
}
|
||||
}
|
||||
if (!this.editEndpoint.name) {
|
||||
this.editEndpoint.name = res.data.list[0].name
|
||||
}
|
||||
// if (!this.editEndpoint.chartIds) {
|
||||
// this.editEndpoint.chartIds = res.data.list[0].module.chartIds
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user