From 5f81fbf0fc013f382fd40894a6ab14efa471bed0 Mon Sep 17 00:00:00 2001 From: tomsun28 Date: Fri, 3 Dec 2021 14:18:48 +0800 Subject: [PATCH] =?UTF-8?q?[web-app]=20bugfix-boolean=E5=9E=8B=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E5=8F=82=E6=95=B0=E5=9B=9E=E6=98=BE=E6=97=A0=E6=95=88?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../monitor/monitor-edit/monitor-edit.component.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web-app/src/app/routes/monitor/monitor-edit/monitor-edit.component.ts b/web-app/src/app/routes/monitor/monitor-edit/monitor-edit.component.ts index 3044010..b558bf1 100644 --- a/web-app/src/app/routes/monitor/monitor-edit/monitor-edit.component.ts +++ b/web-app/src/app/routes/monitor/monitor-edit/monitor-edit.component.ts @@ -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); })