mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 18:31:52 +00:00
addHealthCheck instead of additionalHealthChecks for Daemons (#2962)
* addHealthCheck on Daemons * fix bug that prevents domains without protocols from being deleted * fixes from testing * version bump * add sdk version to UI * fix useEntrypoint * fix dependency health check error display * minor fixes * beta.29 * fixes from testing * beta.30 * set /etc/os-release (#2918) * remove check-monitor from kiosk (#2059) * add units for progress (#2693) * use new progress type * alpha.7 * fix up pwa stuff * fix wormhole-squashfs and prune boot (#2964) * don't exit on expected errors * use bash --------- Co-authored-by: Matt Hill <mattnine@protonmail.com>
This commit is contained in:
@@ -12,15 +12,10 @@ export function formatProgress({ phases, overall }: T.FullProgress): {
|
||||
p,
|
||||
): p is {
|
||||
name: string
|
||||
progress:
|
||||
| false
|
||||
| {
|
||||
done: number
|
||||
total: number | null
|
||||
}
|
||||
progress: false | ProgressDetails
|
||||
} => p.progress !== true && p.progress !== null,
|
||||
)
|
||||
.map(p => `<b>${p.name}</b>${getPhaseBytes(p.progress)}`)
|
||||
.map(p => `<b>${p.name}</b>${getDetails(p.progress)}`)
|
||||
.join(', '),
|
||||
}
|
||||
}
|
||||
@@ -35,13 +30,14 @@ function getDecimal(progress: T.Progress): number {
|
||||
}
|
||||
}
|
||||
|
||||
function getPhaseBytes(
|
||||
progress:
|
||||
| false
|
||||
| {
|
||||
done: number
|
||||
total: number | null
|
||||
},
|
||||
) {
|
||||
return progress ? `: ${progress.done}/${progress.total}` : ''
|
||||
function getDetails(progress: false | ProgressDetails) {
|
||||
return progress
|
||||
? `: ${progress.done}/${progress.total} ${progress.units || ''}`
|
||||
: ''
|
||||
}
|
||||
|
||||
type ProgressDetails = {
|
||||
done: number
|
||||
total: number | null
|
||||
units: T.ProgressUnits | null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user