mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
health check name and description
This commit is contained in:
committed by
Aiden McClelland
parent
1ef8691571
commit
223aaf76aa
@@ -66,14 +66,14 @@
|
||||
</ion-item>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!connectionFailure">
|
||||
<ion-item *ngFor="let health of healthChecks | keyvalue : asIsOrder">
|
||||
<ion-item button (click)="presentModalDescription(pkg.manifest['health-checks'][health.key].name, pkg.manifest['health-checks'][health.key].description)" *ngFor="let health of healthChecks | keyvalue : asIsOrder">
|
||||
<ng-container *ngIf="health.value?.result as result; else noResult">
|
||||
<ion-spinner class="icon-spinner" color="primary" slot="start" *ngIf="[HealthResult.Starting, HealthResult.Loading] | includes : result"></ion-spinner>
|
||||
<ion-icon slot="start" *ngIf="result === HealthResult.Success" name="checkmark" color="success"></ion-icon>
|
||||
<ion-icon slot="start" *ngIf="result === HealthResult.Failure" name="warning-outline" color="warning"></ion-icon>
|
||||
<ion-icon slot="start" *ngIf="result === HealthResult.Disabled" name="remove" color="dark"></ion-icon>
|
||||
<ion-label>
|
||||
<h2 style="font-weight: bold;">{{ health.key }}</h2>
|
||||
<h2 style="font-weight: bold;">{{ pkg.manifest['health-checks'][health.key].name }}</h2>
|
||||
<h2>Result: {{ result | titlecase }}</h2>
|
||||
<p *ngIf="result === HealthResult.Loading"><ion-text color="primary">{{ $any(health.value).message }}</ion-text></p>
|
||||
<p *ngIf="result === HealthResult.Failure"><ion-text color="warning">{{ $any(health.value).error }}</ion-text></p>
|
||||
|
||||
@@ -231,6 +231,23 @@ export class AppShowPage {
|
||||
await modal.present()
|
||||
}
|
||||
|
||||
async presentModalDescription (name: string, description: string) {
|
||||
const alert = await this.alertCtrl.create({
|
||||
header: name,
|
||||
message: description,
|
||||
buttons: [
|
||||
{
|
||||
text: `OK`,
|
||||
handler: () => {
|
||||
this.modalCtrl.dismiss()
|
||||
},
|
||||
cssClass: 'enter-click',
|
||||
},
|
||||
],
|
||||
})
|
||||
await alert.present()
|
||||
}
|
||||
|
||||
private setDepValues (id: string, errors: { [id: string]: DependencyError }): DependencyInfo {
|
||||
let errorText = ''
|
||||
let actionText = 'View'
|
||||
|
||||
@@ -121,7 +121,7 @@ export interface Manifest {
|
||||
stop: string | null
|
||||
}
|
||||
main: ActionImpl
|
||||
'health-checks': { [id: string]: ActionImpl & { severity: HealthCheckSeverity } }
|
||||
'health-checks': { [id: string]: ActionImpl & { severity: HealthCheckSeverity, name: string, description: string } }
|
||||
config: ConfigActions | null
|
||||
volumes: { [id: string]: Volume }
|
||||
'min-os-version': string
|
||||
|
||||
Reference in New Issue
Block a user