health check success (#1267)

* health check success

Co-authored-by: Drew Ansbacher <drew@start9labs.com>
This commit is contained in:
Drew Ansbacher
2022-02-24 12:55:30 -07:00
committed by GitHub
parent 16de45e4fd
commit 3f26f20e85
4 changed files with 17 additions and 32 deletions

View File

@@ -15,11 +15,7 @@
</ion-item>
</ng-container>
<ng-template #connected>
<ion-item
*ngFor="let health of checks"
button
(click)="presentAlertDescription(health.key)"
>
<ion-item *ngFor="let health of checks">
<ng-container *ngIf="health.value?.result as result; else noResult">
<ion-spinner
*ngIf="isLoading(result)"
@@ -59,6 +55,17 @@
<span *ngIf="result === HealthResult.Loading">
{{ $any(health.value).message }}
</span>
<span
*ngIf="
result === HealthResult.Success &&
pkg.manifest['health-checks'][health.key]['success-message']
"
>
:
{{
pkg.manifest['health-checks'][health.key]['success-message']
}}
</span>
</p>
</ion-text>
</ion-label>
@@ -70,7 +77,9 @@
slot="start"
></ion-spinner>
<ion-label>
<h2 class="bold">{{ pkg.manifest['health-checks'][health.key].name }}</h2>
<h2 class="bold">
{{ pkg.manifest['health-checks'][health.key].name }}
</h2>
<p>Awaiting result...</p>
</ion-label>
</ng-template>

View File

@@ -30,26 +30,6 @@ export class AppShowHealthChecksComponent {
return result !== HealthResult.Failure && result !== HealthResult.Loading
}
async presentAlertDescription(id: string) {
const health = this.pkg.manifest['health-checks'][id]
const alert = await this.alertCtrl.create({
header: 'Health Check',
subHeader: health.name,
message: health.description,
buttons: [
{
text: `OK`,
handler: () => {
alert.dismiss()
},
cssClass: 'enter-click',
},
],
})
await alert.present()
}
asIsOrder() {
return 0
}