[manager,webapp]bugfix website monitor path Illegal character in path at index

This commit is contained in:
tomsun28
2022-03-04 13:54:30 +08:00
parent f3557b2859
commit 35f5bda51a
5 changed files with 30 additions and 1 deletions

View File

@@ -112,11 +112,16 @@ export class MonitorEditComponent implements OnInit {
});
return;
}
this.monitor.host = this.monitor.host.trim();
this.monitor.name = this.monitor.name.trim();
// todo 暂时单独设置host属性值
this.params.forEach(param => {
if (param.field === 'host') {
param.value = this.monitor.host;
}
if (param.value != null && typeof param.value == 'string') {
param.value = (param.value as string).trim();
}
});
let addMonitor = {
detected: this.detected,
@@ -151,11 +156,16 @@ export class MonitorEditComponent implements OnInit {
});
return;
}
this.monitor.host = this.monitor.host.trim();
this.monitor.name = this.monitor.name.trim();
// todo 暂时单独设置host属性值
this.params.forEach(param => {
if (param.field === 'host') {
param.value = this.monitor.host;
}
if (param.value != null && typeof param.value == 'string') {
param.value = (param.value as string).trim();
}
});
let detectMonitor = {
detected: this.detected,

View File

@@ -93,11 +93,16 @@ export class MonitorNewComponent implements OnInit {
});
return;
}
this.monitor.host = this.monitor.host.trim();
this.monitor.name = this.monitor.name.trim();
// todo 暂时单独设置host属性值
this.params.forEach(param => {
if (param.field === 'host') {
param.value = this.monitor.host;
}
if (param.value != null && typeof param.value == 'string') {
param.value = (param.value as string).trim();
}
});
let addMonitor = {
detected: this.detected,
@@ -132,11 +137,16 @@ export class MonitorNewComponent implements OnInit {
});
return;
}
this.monitor.host = this.monitor.host.trim();
this.monitor.name = this.monitor.name.trim();
// todo 暂时单独设置host属性值
this.params.forEach(param => {
if (param.field === 'host') {
param.value = this.monitor.host;
}
if (param.value != null && typeof param.value == 'string') {
param.value = (param.value as string).trim();
}
});
let detectMonitor = {
detected: true,