remove time from health check and add loading message to health check

This commit is contained in:
Matt Hill
2021-09-30 12:58:57 -06:00
committed by Aiden McClelland
parent f5f6b92d1b
commit a17e81ece5
2 changed files with 2 additions and 6 deletions

View File

@@ -62,13 +62,14 @@
<ng-container *ngIf="!connectionFailure">
<ion-item *ngFor="let health of healthChecks | keyvalue : asIsOrder">
<ng-container *ngIf="$any(health.value).result as result">
<ion-spinner class="icon-spinner" color="warning" slot="start" *ngIf="['starting', 'loading'] | includes : result"></ion-spinner>
<ion-spinner class="icon-spinner" color="primary" slot="start" *ngIf="['starting', 'loading'] | includes : result"></ion-spinner>
<ion-icon slot="start" *ngIf="result === 'success'" name="checkmark" color="success"></ion-icon>
<ion-icon slot="start" *ngIf="result === 'failure'" name="warning" color="warning"></ion-icon>
<ion-icon slot="start" *ngIf="result === 'disabled'" name="remove" color="dark"></ion-icon>
<ion-label>
<h2 style="font-weight: bold;">{{ health.key }}</h2>
<h2>Result: {{ result | titlecase }}</h2>
<p *ngIf="result === 'loading'"><ion-text color="primary">{{ $any(health.value).message }}</ion-text></p>
<p *ngIf="result === 'failure'"><ion-text color="warning">{{ $any(health.value).error }}</ion-text></p>
</ion-label>
</ng-container>

View File

@@ -272,28 +272,23 @@ export enum HealthResult {
}
export interface HealthCheckResultStarting {
time: string // UTC date string
result: HealthResult.Starting
}
export interface HealthCheckResultDisabled {
time: string // UTC date string
result: HealthResult.Disabled
}
export interface HealthCheckResultSuccess {
time: string // UTC date string
result: HealthResult.Success
}
export interface HealthCheckResultLoading {
time: string // UTC date string
result: HealthResult.Loading
message: string
}
export interface HealthCheckResultFailure {
time: string // UTC date string
result: HealthResult.Failure
error: string
}