[web-app] bugfix-boolean型监控参数回显无效问题

This commit is contained in:
tomsun28
2021-12-03 14:18:48 +08:00
parent bf8d8dff29
commit 582dccbfb5

View File

@@ -51,6 +51,7 @@ export class MonitorEditComponent implements OnInit {
});
}
this.params = message.data.params;
this.detected = message.data.detected;
} else {
console.warn(message.msg);
this.notifySvc.error("查询异常,此监控不存在", message.msg);
@@ -72,6 +73,14 @@ export class MonitorEditComponent implements OnInit {
if (param.field === "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);
})