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