[web-app] bugfix-boolean型监控参数回显无效问题
This commit is contained in:
@@ -51,6 +51,7 @@ export class MonitorEditComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.params = message.data.params;
|
this.params = message.data.params;
|
||||||
|
this.detected = message.data.detected;
|
||||||
} else {
|
} else {
|
||||||
console.warn(message.msg);
|
console.warn(message.msg);
|
||||||
this.notifySvc.error("查询异常,此监控不存在", message.msg);
|
this.notifySvc.error("查询异常,此监控不存在", message.msg);
|
||||||
@@ -72,6 +73,14 @@ export class MonitorEditComponent implements OnInit {
|
|||||||
if (param.field === "host") {
|
if (param.field === "host") {
|
||||||
param.value = this.monitor.host;
|
param.value = this.monitor.host;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (define.type === "boolean") {
|
||||||
|
if (param.value != null) {
|
||||||
|
param.value = param.value.toLowerCase() == 'true';
|
||||||
|
} else {
|
||||||
|
param.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.params.push(param);
|
this.params.push(param);
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user