From 223aaf76aa27d4fcaf6a7d85f52ceba6983f2025 Mon Sep 17 00:00:00 2001 From: Drew Ansbacher Date: Fri, 26 Nov 2021 13:08:08 -0700 Subject: [PATCH] health check name and description --- .../apps-routes/app-show/app-show.page.html | 4 ++-- .../pages/apps-routes/app-show/app-show.page.ts | 17 +++++++++++++++++ ui/src/app/services/patch-db/data-model.ts | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ui/src/app/pages/apps-routes/app-show/app-show.page.html b/ui/src/app/pages/apps-routes/app-show/app-show.page.html index 0c4b260c1..5d610ddab 100644 --- a/ui/src/app/pages/apps-routes/app-show/app-show.page.html +++ b/ui/src/app/pages/apps-routes/app-show/app-show.page.html @@ -66,14 +66,14 @@ - + -

{{ health.key }}

+

{{ pkg.manifest['health-checks'][health.key].name }}

Result: {{ result | titlecase }}

{{ $any(health.value).message }}

{{ $any(health.value).error }}

diff --git a/ui/src/app/pages/apps-routes/app-show/app-show.page.ts b/ui/src/app/pages/apps-routes/app-show/app-show.page.ts index 1e0ec27bb..5a0de4cdc 100644 --- a/ui/src/app/pages/apps-routes/app-show/app-show.page.ts +++ b/ui/src/app/pages/apps-routes/app-show/app-show.page.ts @@ -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' diff --git a/ui/src/app/services/patch-db/data-model.ts b/ui/src/app/services/patch-db/data-model.ts index 06f5de04c..a743864a5 100644 --- a/ui/src/app/services/patch-db/data-model.ts +++ b/ui/src/app/services/patch-db/data-model.ts @@ -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