mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
clean up tech debt, bump dependencies
This commit is contained in:
@@ -211,5 +211,5 @@ export class ServiceRoute {
|
||||
function toHealthCheck(status: T.MainStatus): T.NamedHealthCheckResult[] {
|
||||
return status.main !== 'running' || isEmptyObject(status.health)
|
||||
? []
|
||||
: Object.values(status.health)
|
||||
: Object.values(status.health).filter(h => !!h)
|
||||
}
|
||||
|
||||
@@ -103,12 +103,14 @@ export class DepErrorService {
|
||||
|
||||
// action required
|
||||
if (
|
||||
Object.values(pkg.tasks).some(
|
||||
t =>
|
||||
t.active &&
|
||||
t.task.packageId === depId &&
|
||||
t.task.severity === 'critical',
|
||||
)
|
||||
Object.values(pkg.tasks)
|
||||
.filter(t => !!t)
|
||||
.some(
|
||||
t =>
|
||||
t.active &&
|
||||
t.task.packageId === depId &&
|
||||
t.task.severity === 'critical',
|
||||
)
|
||||
) {
|
||||
return {
|
||||
type: 'actionRequired',
|
||||
|
||||
@@ -19,13 +19,13 @@ export class GatewayService {
|
||||
.pipe(
|
||||
map(gateways =>
|
||||
Object.entries(gateways)
|
||||
.filter(([_, val]) => !!val.ipInfo)
|
||||
.filter(([_, val]) => !!val?.ipInfo)
|
||||
.map(
|
||||
([id, val]) =>
|
||||
({
|
||||
...val,
|
||||
id,
|
||||
lanIpv4: val.ipInfo?.subnets
|
||||
lanIpv4: val?.ipInfo?.subnets
|
||||
.filter(s => !s.includes('::'))
|
||||
.map(s => s.split('/')[0]),
|
||||
}) as GatewayPlus,
|
||||
|
||||
@@ -25,9 +25,9 @@ export function getInstalledPrimaryStatus({
|
||||
tasks,
|
||||
status,
|
||||
}: T.PackageDataEntry): PrimaryStatus {
|
||||
return Object.values(tasks).some(
|
||||
t => t.active && t.task.severity === 'critical',
|
||||
)
|
||||
return Object.values(tasks)
|
||||
.filter(t => !!t)
|
||||
.some(t => t.active && t.task.severity === 'critical')
|
||||
? 'actionRequired'
|
||||
: status.main
|
||||
}
|
||||
@@ -37,7 +37,7 @@ function getHealthStatus(status: T.MainStatus): T.HealthStatus | null {
|
||||
return null
|
||||
}
|
||||
|
||||
const values = Object.values(status.health)
|
||||
const values = Object.values(status.health).filter(h => !!h)
|
||||
|
||||
if (values.some(h => h.result === 'failure')) {
|
||||
return 'failure'
|
||||
|
||||
Reference in New Issue
Block a user