Skip to content

Commit

Permalink
fixed connecting message showing after connected (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-aschlackman authored Feb 20, 2024
1 parent 91e03e7 commit 0c235ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/components/wmks/wmks.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h1>Shutting Down... Please wait...</h1>
svgIcon="ic_lock_outline_black_48px"
alt="Unauthorized"
></mat-icon>
} @else if (this.vmService.disconnected$ | async) {
} @else if (!(this.vmService.connectionStatus$ | async).connected) {
<div
class="align-items-center center align-content-center"
style="width: 70%"
Expand Down
6 changes: 6 additions & 0 deletions src/app/state/vsphere/vsphere.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ export class VsphereService {
});

private connectedSubject = new BehaviorSubject<boolean>(false);

public connectionStatus$ = this.connectedSubject.asObservable().pipe(
map((x) => {
return { connected: x };
}),
);
public connected$ = this.connectedSubject.asObservable().pipe(
filter((x) => x),
map(() => true),
Expand Down

0 comments on commit 0c235ce

Please sign in to comment.