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 02de67c17..adb8cbedf 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 @@ -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 { diff --git a/ui/src/app/services/api/api.fixures.ts b/ui/src/app/services/api/api.fixures.ts index 4972ad1be..d0eeb8f65 100644 --- a/ui/src/app/services/api/api.fixures.ts +++ b/ui/src/app/services/api/api.fixures.ts @@ -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', diff --git a/ui/src/app/services/api/mock-patch.ts b/ui/src/app/services/api/mock-patch.ts index c4654fae7..d5d2cf219 100644 --- a/ui/src/app/services/api/mock-patch.ts +++ b/ui/src/app/services/api/mock-patch.ts @@ -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, }, }, }, diff --git a/ui/src/app/services/patch-db/data-model.ts b/ui/src/app/services/patch-db/data-model.ts index a743864a5..2051345bf 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, 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 diff --git a/ui/src/app/services/pkg-status-rendering.service.ts b/ui/src/app/services/pkg-status-rendering.service.ts index 8570b67c9..50b333695 100644 --- a/ui/src/app/services/pkg-status-rendering.service.ts +++ b/ui/src/app/services/pkg-status-rendering.service.ts @@ -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' }, } diff --git a/ui/src/app/util/get-package-info.ts b/ui/src/app/util/get-package-info.ts index 3416ab11b..4dbe06540 100644 --- a/ui/src/app/util/get-package-info.ts +++ b/ui/src/app/util/get-package-info.ts @@ -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, } }