Skip to content

Commit

Permalink
[bugfix] Unable to specify collector when creating a monitor (#2311)
Browse files Browse the repository at this point in the history
Co-authored-by: tomsun28 <[email protected]>
Co-authored-by: Logic <[email protected]>
Co-authored-by: Kerwin Bryant <[email protected]>
  • Loading branch information
4 people authored Jul 24, 2024
1 parent f038ec5 commit f4685aa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export class MonitorFormComponent implements OnChanges {
@Output() readonly formCancel = new EventEmitter<any>();
@Output() readonly formDetect = new EventEmitter<any>();
@Output() readonly hostChange = new EventEmitter<string>();
@Output() readonly collectorChange = new EventEmitter<string>();

hasAdvancedParams: boolean = false;

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit f4685aa

Please sign in to comment.