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

UI - Header: changed state 'info' for every non-admin to 'checkmark' #1454

Merged
merged 7 commits into from
Apr 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 17 additions & 18 deletions ui/src/app/shared/header/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,26 @@
</ion-title>
<ng-container *ngIf="service.currentEdge | async as edge">
<ion-buttons slot="end">
<ng-container *ngIf="edge.roleIsAtLeast('admin')">
<ng-container *ngIf="edge.currentData | async as currentData">
<ng-container *ngIf="currentData.summary.system as sum">
<ion-button (click)="presentSingleStatusModal()"
*ngIf="currentPage == 'IndexLive' || currentPage == 'IndexHistory' || currentPage == 'EdgeSettings'"
color="light" fill="solid" shape="round">
<ng-container [ngSwitch]="sum.state">
<ion-icon *ngSwitchCase="0" color="success" name="checkmark-circle-outline"></ion-icon>
<ion-icon *ngSwitchCase="1" color="success" name="information-outline"></ion-icon>
<ion-icon *ngSwitchCase="2" color="warning" name="alert-outline"></ion-icon>
<ion-icon *ngSwitchCase="3" color="danger" name="alert-outline"></ion-icon>
</ng-container>
</ion-button>
</ng-container>
</ng-container>
<ng-container *ngIf="env.debugMode && edge.roleIsAtLeast('owner')">
<ion-button (click)="isSystemLogEnabled = !isSystemLogEnabled">
<ion-icon name="bug-outline"></ion-icon>
<ng-container *ngIf="edge.currentData | async as currentData">
<ng-container *ngIf="currentData.summary.system as sum">
<ion-button (click)="presentSingleStatusModal()"
*ngIf="currentPage == 'IndexLive' || currentPage == 'IndexHistory' || currentPage == 'EdgeSettings'"
color="light" fill="solid" shape="round">
<ng-container [ngSwitch]="sum.state">
<ion-icon *ngSwitchCase="0" color="success" name="checkmark-circle-outline"></ion-icon>
<ion-icon *ngSwitchCase="1" color="success"
[name]="edge.roleIsAtLeast('admin') ? 'information-outline' : 'checkmark-circle-outline'"></ion-icon>
<ion-icon *ngSwitchCase="2" color="warning" name="alert-outline"></ion-icon>
<ion-icon *ngSwitchCase="3" color="danger" name="alert-outline"></ion-icon>
</ng-container>
</ion-button>
</ng-container>
</ng-container>
<ng-container *ngIf="env.debugMode && edge.roleIsAtLeast('owner')">
<ion-button (click)="isSystemLogEnabled = !isSystemLogEnabled">
<ion-icon name="bug-outline"></ion-icon>
</ion-button>
</ng-container>
</ion-buttons>
</ng-container>
</ion-toolbar>
Expand Down