mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
removing severity
This commit is contained in:
committed by
Aiden McClelland
parent
71f1432cee
commit
628a269274
@@ -8,7 +8,7 @@ import { wizardModal } from 'src/app/components/install-wizard/install-wizard.co
|
||||
import { WizardBaker } from 'src/app/components/install-wizard/prebaked-wizards'
|
||||
import { ConfigService } from 'src/app/services/config.service'
|
||||
import { PatchDbService } from 'src/app/services/patch-db/patch-db.service'
|
||||
import { DependencyError, DependencyErrorType, DependencySeverity, HealthCheckResult, HealthResult, PackageDataEntry, PackageMainStatus, PackageState } from 'src/app/services/patch-db/data-model'
|
||||
import { DependencyError, DependencyErrorType, HealthCheckResult, HealthResult, PackageDataEntry, PackageMainStatus, PackageState } from 'src/app/services/patch-db/data-model'
|
||||
import { DependencyStatus, HealthStatus, PrimaryRendering, PrimaryStatus, renderPkgStatus } from 'src/app/services/pkg-status-rendering.service'
|
||||
import { ConnectionFailure, ConnectionService } from 'src/app/services/connection.service'
|
||||
import { ErrorToastService } from 'src/app/services/error-toast.service'
|
||||
@@ -39,7 +39,6 @@ export class AppShowPage {
|
||||
dependencies: DependencyInfo[] = []
|
||||
statuses: {
|
||||
primary: PrimaryStatus
|
||||
dependency: DependencyStatus
|
||||
health: HealthStatus
|
||||
} = { } as any
|
||||
connectionFailure: boolean
|
||||
@@ -286,14 +285,6 @@ export class AppShowPage {
|
||||
}
|
||||
}
|
||||
|
||||
if (errorText) {
|
||||
if (this.pkg.manifest.dependencies[id].severity === DependencySeverity.Critical) {
|
||||
errorText = `Critical: ${errorText}. ${this.pkg.manifest.title} cannot be started until this dependency is satisfied, as it may cause harm to your system.`
|
||||
} else if (this.pkg.manifest.dependencies[id].severity === DependencySeverity.Warning) {
|
||||
errorText = `${errorText}. ${this.pkg.manifest.title} will not work as expected.`
|
||||
}
|
||||
}
|
||||
|
||||
const depInfo = this.pkg.installed['dependency-info'][id]
|
||||
|
||||
return {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { DependencyErrorType, DependencySeverity, DockerIoFormat, Manifest, PackageDataEntry, PackageMainStatus, PackageState } from 'src/app/services/patch-db/data-model'
|
||||
import { DependencyErrorType, DockerIoFormat, Manifest, PackageDataEntry, PackageMainStatus, PackageState } from 'src/app/services/patch-db/data-model'
|
||||
import { Log, MarketplacePkg, Metric, NotificationLevel, RR, ServerNotifications } from './api.types'
|
||||
import { Operation } from 'fast-json-patch'
|
||||
|
||||
export module Mock {
|
||||
|
||||
@@ -458,7 +457,6 @@ export module Mock {
|
||||
'how': 'You can use an external node from your Embassy if you prefer.',
|
||||
},
|
||||
'config': null,
|
||||
'severity': DependencySeverity.Critical,
|
||||
},
|
||||
'btc-rpc-proxy': {
|
||||
'version': '>=0.2.2',
|
||||
@@ -468,7 +466,6 @@ export module Mock {
|
||||
'how': 'To use Proxy\'s user management system, go to LND config and select Bitcoin Proxy under Bitcoin config.',
|
||||
},
|
||||
'config': null,
|
||||
'severity': DependencySeverity.Critical,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -561,7 +558,6 @@ export module Mock {
|
||||
requirement: {
|
||||
type: 'required',
|
||||
},
|
||||
severity: DependencySeverity.Warning,
|
||||
config: {
|
||||
check: {
|
||||
type: 'docker',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DataModel, DependencyErrorType, DependencySeverity, DockerIoFormat, HealthResult, Manifest, PackageMainStatus, PackageState, ServerStatus } from 'src/app/services/patch-db/data-model'
|
||||
import { DataModel, DependencyErrorType, DockerIoFormat, HealthResult, Manifest, PackageMainStatus, PackageState, ServerStatus } from 'src/app/services/patch-db/data-model'
|
||||
|
||||
export const mockPatchData: DataModel = {
|
||||
'ui': {
|
||||
@@ -543,7 +543,6 @@ export const mockPatchData: DataModel = {
|
||||
'how': 'You can use an external node from your Embassy if you prefer.',
|
||||
},
|
||||
'config': null,
|
||||
'severity': DependencySeverity.Critical,
|
||||
},
|
||||
'btc-rpc-proxy': {
|
||||
'version': '>=0.2.2',
|
||||
@@ -553,7 +552,6 @@ export const mockPatchData: DataModel = {
|
||||
'how': 'To use Proxy\'s user management system, go to LND config and select Bitcoin Proxy under Bitcoin config.',
|
||||
},
|
||||
'config': null,
|
||||
'severity': DependencySeverity.Warning,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -121,7 +121,7 @@ export interface Manifest {
|
||||
stop: string | null
|
||||
}
|
||||
main: ActionImpl
|
||||
'health-checks': { [id: string]: ActionImpl & { severity: HealthCheckSeverity, name: string, description: string } }
|
||||
'health-checks': { [id: string]: ActionImpl & { name: string, description: string } }
|
||||
config: ConfigActions | null
|
||||
volumes: { [id: string]: Volume }
|
||||
'min-os-version': string
|
||||
@@ -366,21 +366,10 @@ export interface DependencyEntry {
|
||||
type: 'required'
|
||||
}
|
||||
description: string | null
|
||||
severity: DependencySeverity,
|
||||
config: {
|
||||
check: ActionImpl,
|
||||
'auto-configure': ActionImpl
|
||||
}
|
||||
}
|
||||
|
||||
export enum HealthCheckSeverity {
|
||||
Critical = 'critical',
|
||||
Warning = 'warning',
|
||||
}
|
||||
|
||||
export enum DependencySeverity {
|
||||
Critical = 'critical',
|
||||
Warning = 'warning',
|
||||
}
|
||||
|
||||
export type URL = string
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { isEmptyObject } from '../util/misc.util'
|
||||
import { DependencySeverity, PackageDataEntry, PackageMainStatus, PackageState, Status } from './patch-db/data-model'
|
||||
import { PackageDataEntry, PackageMainStatus, PackageState, Status } from './patch-db/data-model'
|
||||
|
||||
export function renderPkgStatus (pkg: PackageDataEntry): {
|
||||
primary: PrimaryStatus,
|
||||
@@ -36,12 +36,6 @@ function getDependencyStatus (pkg: PackageDataEntry): DependencyStatus {
|
||||
const depErrors = installed.status['dependency-errors']
|
||||
const depIds = Object.keys(depErrors).filter(key => !!depErrors[key])
|
||||
|
||||
for (let pkgId of depIds) {
|
||||
if (pkg.manifest.dependencies[pkgId].severity === DependencySeverity.Critical) {
|
||||
return DependencyStatus.Critical
|
||||
}
|
||||
}
|
||||
|
||||
return depIds.length ? DependencyStatus.Warning : DependencyStatus.Satisfied
|
||||
}
|
||||
|
||||
@@ -84,7 +78,6 @@ export enum PrimaryStatus {
|
||||
|
||||
export enum DependencyStatus {
|
||||
Warning = 'warning',
|
||||
Critical = 'critical',
|
||||
Satisfied = 'satisfied',
|
||||
}
|
||||
|
||||
@@ -110,7 +103,6 @@ export const PrimaryRendering: { [key: string]: StatusRendering } = {
|
||||
|
||||
export const DependencyRendering: { [key: string]: StatusRendering } = {
|
||||
[DependencyStatus.Warning]: { display: 'Issue', color: 'warning' },
|
||||
[DependencyStatus.Critical]: { display: 'Critical Issue', color: 'danger' },
|
||||
[DependencyStatus.Satisfied]: { display: 'Satisfied', color: 'success' },
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@ export function getPackageInfo (entry: PackageDataEntry): PkgInfo {
|
||||
: undefined,
|
||||
error:
|
||||
statuses.health === HealthStatus.Failure ||
|
||||
statuses.dependency === DependencyStatus.Warning ||
|
||||
statuses.dependency === DependencyStatus.Critical,
|
||||
statuses.dependency === DependencyStatus.Warning,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user