mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +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
|
||||
}
|
||||
|
||||
@@ -82,23 +82,19 @@ export const mockPatchData: DataModel = {
|
||||
'health-checks': {
|
||||
'chain-state': {
|
||||
name: 'Chain State',
|
||||
description: 'Checks the chainstate',
|
||||
},
|
||||
'ephemeral-health-check': {
|
||||
name: 'Ephemeral Health Check',
|
||||
description: `Checks to see if your new user registrations are on. If they are but you're not expecting any new user signups, you should disable this in Config, as anyone who knows your onion URL can create accounts on your server.`,
|
||||
},
|
||||
'p2p-interface': {
|
||||
name: 'P2P Interface',
|
||||
description: `Checks to see if your new user registrations are on. If they are but you're not expecting any new user signups, you should disable this in Config, as anyone who knows your onion URL can create accounts on your server.`,
|
||||
'success-message': 'the health check ran succesfully',
|
||||
},
|
||||
'rpc-interface': {
|
||||
name: 'RPC Interface',
|
||||
description: 'Checks the RPC Interface',
|
||||
},
|
||||
'unnecessary-health-check': {
|
||||
name: 'Unneccessary Health Check',
|
||||
description: 'Is totally not necessary to do this health check.',
|
||||
},
|
||||
} as any,
|
||||
config: {
|
||||
|
||||
@@ -128,7 +128,7 @@ export interface Manifest {
|
||||
main: ActionImpl
|
||||
'health-checks': Record<
|
||||
string,
|
||||
ActionImpl & { name: string; description: string }
|
||||
ActionImpl & { name: string; 'success-message': string | null }
|
||||
>
|
||||
config: ConfigActions | null
|
||||
volumes: Record<string, Volume>
|
||||
|
||||
Reference in New Issue
Block a user