mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-02 05:23:14 +00:00
health check success (#1267)
* health check success Co-authored-by: Drew Ansbacher <drew@start9labs.com>
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user