Skip to content

Commit

Permalink
fix(#2112): Properly update broker configs (#2114)
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikriemer authored Nov 1, 2023
1 parent 0497444 commit 79e7d18
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,23 @@
<div>
<mat-form-field class="form-field" fxFlex="100" color="accent">
<mat-label>Host</mat-label>
<input matInput [(ngModel)]="host" type="text" />
<input
matInput
[(ngModel)]="host"
(ngModelChange)="hostChange.emit($event)"
type="text"
/>
</mat-form-field>
</div>
<div>
<mat-form-field class="form-field" fxFlex="100" color="accent">
<mat-label>Port</mat-label>
<input matInput [(ngModel)]="port" type="number" />
<input
matInput
[(ngModel)]="port"
(ngModelChange)="portChange.emit($event)"
type="number"
/>
</mat-form-field>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
*/

import { Component, Input } from '@angular/core';
import { Component, EventEmitter, Input, Output } from '@angular/core';

@Component({
selector: 'sp-messaging-broker-config',
Expand All @@ -31,4 +31,10 @@ export class SpMessagingBrokerConfigComponent {

@Input()
port: number;

@Output()
hostChange = new EventEmitter<string>();

@Output()
portChange = new EventEmitter<number>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -171,26 +171,27 @@
<sp-split-section
title="Messaging layers"
subtitle="Manage messaging layer connectivity"
*ngIf="loadingCompleted"
>
<sp-messaging-broker-config
title="JMS"
[host]="messagingSettings.jmsHost"
[port]="messagingSettings.jmsPort"
[(host)]="messagingSettings.jmsHost"
[(port)]="messagingSettings.jmsPort"
></sp-messaging-broker-config>
<sp-messaging-broker-config
title="Kafka"
[host]="messagingSettings.kafkaHost"
[port]="messagingSettings.kafkaPort"
[(host)]="messagingSettings.kafkaHost"
[(port)]="messagingSettings.kafkaPort"
></sp-messaging-broker-config>
<sp-messaging-broker-config
title="MQTT"
[host]="messagingSettings.mqttHost"
[port]="messagingSettings.mqttPort"
[(host)]="messagingSettings.mqttHost"
[(port)]="messagingSettings.mqttPort"
></sp-messaging-broker-config>
<sp-messaging-broker-config
title="Nats"
[host]="messagingSettings.natsHost"
[port]="messagingSettings.natsPort"
[(host)]="messagingSettings.natsHost"
[(port)]="messagingSettings.natsPort"
></sp-messaging-broker-config>
<div fxLayout="column">
<div class="subsection-title">Pulsar</div>
Expand All @@ -205,8 +206,8 @@
</div>
<sp-messaging-broker-config
title="Zookeeper"
[host]="messagingSettings.zookeeperHost"
[port]="messagingSettings.zookeeperPort"
[(host)]="messagingSettings.zookeeperHost"
[(port)]="messagingSettings.zookeeperPort"
></sp-messaging-broker-config>
<div fxLayoutAlign="start center" class="mt-10">
<button
Expand Down

0 comments on commit 79e7d18

Please sign in to comment.