Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] Unable to specify collector when creating a monitor #2311

Merged
merged 8 commits into from
Jul 24, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
[extra]="{collectors}"
[name]="'collector'"
[(ngModel)]="collector"
(ngModelChange)="onCollectorChange($event)"
kerwin612 marked this conversation as resolved.
Show resolved Hide resolved
/>
</nz-form-control>
</nz-form-item>
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 @@ -137,6 +138,10 @@ export class MonitorFormComponent implements OnChanges {
this.hostChange.emit(host);
}

onCollectorChange(host: string) {
this.collectorChange.emit(host);
}

onParamBooleanChanged(booleanValue: boolean, field: string) {
// 对SSL的端口联动处理, 不开启SSL默认80端口,开启SSL默认443
if (field === 'ssl') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
[advancedParamDefines]="advancedParamDefines"
[collector]="collector"
[collectors]="collectors"
(collectorChange)="onCollectorChange($event)"
(hostChange)="onHostChange($event)"
(formCancel)="onCancel()"
(formSubmit)="onSubmit($event)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ export class MonitorNewComponent implements OnInit {
}
}

onCollectorChange(collector: string) {
this.collector = collector;
}

onSubmit(info: any) {
let addMonitor = {
detected: this.detected,
Expand Down
Loading