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 91e29593322..86733985511 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 @@ -190,7 +190,7 @@ export class MonitorEditComponent implements OnInit { let addMonitor = { detected: this.detected, monitor: info.monitor, - collector: this.collector, + collector: info.collector, params: info.params.concat(info.advancedParams) }; if (this.detected) { @@ -220,7 +220,7 @@ export class MonitorEditComponent implements OnInit { let detectMonitor = { detected: this.detected, monitor: info.monitor, - collector: this.collector, + collector: info.collector, params: info.params.concat(info.advancedParams) }; this.spinningTip = this.i18nSvc.fanyi('monitors.spinning-tip.detecting'); diff --git a/web-app/src/app/routes/monitor/monitor-form/monitor-form.component.ts b/web-app/src/app/routes/monitor/monitor-form/monitor-form.component.ts index 43fea450535..7c90e02df46 100644 --- a/web-app/src/app/routes/monitor/monitor-form/monitor-form.component.ts +++ b/web-app/src/app/routes/monitor/monitor-form/monitor-form.component.ts @@ -46,6 +46,7 @@ export class MonitorFormComponent implements OnChanges { @Output() readonly formCancel = new EventEmitter(); @Output() readonly formDetect = new EventEmitter(); @Output() readonly hostChange = new EventEmitter(); + @Output() readonly collectorChange = new EventEmitter(); hasAdvancedParams: boolean = false; @@ -97,7 +98,7 @@ export class MonitorFormComponent implements OnChanges { param.paramValue = (param.paramValue as string).trim(); } }); - this.formDetect.emit({ monitor: this.monitor, params: this.params, advancedParams: this.advancedParams }); + this.formDetect.emit({ monitor: this.monitor, params: this.params, advancedParams: this.advancedParams, collector: this.collector }); } onSubmit(formGroup: FormGroup) { @@ -126,7 +127,7 @@ export class MonitorFormComponent implements OnChanges { param.paramValue = (param.paramValue as string).trim(); } }); - this.formSubmit.emit({ monitor: this.monitor, params: this.params, advancedParams: this.advancedParams }); + this.formSubmit.emit({ monitor: this.monitor, params: this.params, advancedParams: this.advancedParams, collector: this.collector }); } onCancel() { diff --git a/web-app/src/app/routes/monitor/monitor-new/monitor-new.component.ts b/web-app/src/app/routes/monitor/monitor-new/monitor-new.component.ts index 6a39e154e13..6534f5adfae 100644 --- a/web-app/src/app/routes/monitor/monitor-new/monitor-new.component.ts +++ b/web-app/src/app/routes/monitor/monitor-new/monitor-new.component.ts @@ -165,7 +165,7 @@ export class MonitorNewComponent implements OnInit { let addMonitor = { detected: this.detected, monitor: info.monitor, - collector: this.collector, + collector: info.collector, params: info.params.concat(info.advancedParams) }; if (this.detected) { @@ -195,7 +195,7 @@ export class MonitorNewComponent implements OnInit { let detectMonitor = { detected: true, monitor: info.monitor, - collector: this.collector, + collector: info.collector, params: info.params.concat(info.advancedParams) }; this.spinningTip = this.i18nSvc.fanyi('monitors.spinning-tip.detecting');