Skip to content

Commit

Permalink
fix(ui): remove double negotiation
Browse files Browse the repository at this point in the history
  • Loading branch information
DlieBG committed Dec 4, 2024
1 parent 593b636 commit 784613e
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 37 deletions.
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ui",
"version": "0.1.3",
"version": "0.1.4",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ <h4>
</h4>

<div class="metadata">
<mat-checkbox [(ngModel)]="message_replay_request.no_rabbitmq_direct">No RabbitMQ Direct</mat-checkbox>
<mat-checkbox [(ngModel)]="rabbitmq_direct">RabbitMQ Direct</mat-checkbox>
<mat-form-field appearance="outline">
<mat-label>RabbitMQ Grouped</mat-label>
<input matInput type="number" [(ngModel)]="message_replay_request.rabbitmq_grouped">
@if (message_replay_request.rabbitmq_grouped) {
<button matSuffix mat-icon-button aria-label="Clear" (click)="message_replay_request.rabbitmq_grouped=null">
<input matInput type="number" [(ngModel)]="rabbitmq_grouped">
@if (rabbitmq_grouped) {
<button matSuffix mat-icon-button aria-label="Clear" (click)="rabbitmq_grouped=null">
<mat-icon>close</mat-icon>
</button>
}
</mat-form-field>
<mat-checkbox [(ngModel)]="message_replay_request.no_mongodb_log">No MongoDB Log</mat-checkbox>
<mat-checkbox [(ngModel)]="message_replay_request.no_mongodb_state">No MongoDB State</mat-checkbox>
<mat-checkbox [(ngModel)]="message_replay_request.no_mongodb_statistics">No MongoDB Statistics</mat-checkbox>
<mat-checkbox [(ngModel)]="message_replay_request.clear_mongodb">Clear MongoDB</mat-checkbox>
<mat-checkbox [(ngModel)]="mongodb_log">MongoDB Log</mat-checkbox>
<mat-checkbox [(ngModel)]="mongodb_state">MongoDB State</mat-checkbox>
<mat-checkbox [(ngModel)]="mongodb_statistics">MongoDB Statistics</mat-checkbox>
<mat-checkbox [(ngModel)]="clear_mongodb">Clear MongoDB</mat-checkbox>
<mat-form-field appearance="outline">
<mat-label>Playback Speed</mat-label>
<input matInput type="number" [(ngModel)]="message_replay_request.playback_speed">
@if (message_replay_request.rabbitmq_grouped) {
<button matSuffix mat-icon-button aria-label="Clear" (click)="message_replay_request.playback_speed=null">
<input matInput type="number" [(ngModel)]="playback_speed">
@if (playback_speed) {
<button matSuffix mat-icon-button aria-label="Clear" (click)="playback_speed=null">
<mat-icon>close</mat-icon>
</button>
}
Expand All @@ -35,11 +35,11 @@ <h4>
<div class="timespan">
<mat-form-field appearance="outline">
<mat-label>Start Time</mat-label>
<input matInput type="datetime-local" [(ngModel)]="message_replay_request.start_time">
<input matInput type="datetime-local" [(ngModel)]="start_time">
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>End Time</mat-label>
<input matInput type="datetime-local" [(ngModel)]="message_replay_request.end_time">
<input matInput type="datetime-local" [(ngModel)]="end_time">
</mat-form-field>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ mat-form-field {
align-items: center;
margin-top: 1em;
min-height: 48px;
}

button {
margin-right: 3em;
button {
margin-right: 3em;
}
}

.response {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@ import { MessageReplayService } from '../../../services/message-replay/message-r
styleUrl: './message-replay.component.scss'
})
export class MessageReplayComponent {
message_replay_request: MessageReplayRequest = {
no_rabbitmq_direct: false,
rabbitmq_grouped: null,
no_mongodb_log: false,
no_mongodb_state: false,
no_mongodb_statistics: false,
clear_mongodb: true,
playback_speed: null,
start_time: '2024-10-01T00:00',
end_time: '2024-12-01T00:00',
};
rabbitmq_direct = true;
rabbitmq_grouped = null;
mongodb_log = false;
mongodb_state = false;
mongodb_statistics = false;
clear_mongodb = true;
playback_speed = null;
start_time = '2024-10-01T00:00';
end_time = '2024-12-01T00:00';

messageReplayResponse$!: Observable<MessageReplayResponse>;

Expand All @@ -28,6 +26,16 @@ export class MessageReplayComponent {
) { }

startMessageReplay() {
this.messageReplayResponse$ = this.messageReplayService.startMessageReplay(this.message_replay_request);
this.messageReplayResponse$ = this.messageReplayService.startMessageReplay({
no_rabbitmq_direct: !this.rabbitmq_direct,
rabbitmq_grouped: this.rabbitmq_grouped,
no_mongodb_log: !this.mongodb_log,
no_mongodb_state: !this.mongodb_state,
no_mongodb_statistics: !this.mongodb_statistics,
clear_mongodb: this.clear_mongodb,
playback_speed: this.playback_speed,
start_time: this.start_time,
end_time: this.end_time,
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ <h4>{{ mrtScenario.name }}</h4>

<table>
<tr>
<td>No RabbitMQ Direct:</td>
<td>RabbitMQ Direct:</td>
<td>
<pre>{{ mrtScenario.no_rabbitmq_direct | json }}</pre>
<pre>{{ !mrtScenario.no_rabbitmq_direct | json }}</pre>
</td>
</tr>
<tr>
Expand All @@ -18,21 +18,21 @@ <h4>{{ mrtScenario.name }}</h4>
</td>
</tr>
<tr>
<td>No MongoDB Log:</td>
<td>MongoDB Log:</td>
<td>
<pre>{{ mrtScenario.no_mongodb_log | json }}</pre>
<pre>{{ !mrtScenario.no_mongodb_log | json }}</pre>
</td>
</tr>
<tr>
<td>No MongoDB State:</td>
<td>MongoDB State:</td>
<td>
<pre>{{ mrtScenario.no_mongodb_state | json }}</pre>
<pre>{{ !mrtScenario.no_mongodb_state | json }}</pre>
</td>
</tr>
<tr>
<td>No MongoDB Statistics:</td>
<td>MongoDB Statistics:</td>
<td>
<pre>{{ mrtScenario.no_mongodb_statistics | json }}</pre>
<pre>{{ !mrtScenario.no_mongodb_statistics | json }}</pre>
</td>
</tr>
<tr>
Expand Down

0 comments on commit 784613e

Please sign in to comment.