mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-27 02:41:53 +00:00
ignore current deps not in manifest
This commit is contained in:
committed by
Aiden McClelland
parent
4276e0675f
commit
c4baacf44f
@@ -87,10 +87,10 @@
|
||||
</ion-item>
|
||||
|
||||
<!-- ** dependencies ** -->
|
||||
<ng-container *ngIf="!(pkg.installed['current-dependencies'] | empty)">
|
||||
<ng-container *ngIf="!(currentDependencies | empty)">
|
||||
<ion-item-divider id="dependencies">Dependencies</ion-item-divider>
|
||||
<!-- A current-dependency is a subset of the pkg.manifest.dependencies that is currently required as determined by the service config. -->
|
||||
<ion-item *ngFor="let dep of pkg.installed['current-dependencies'] | keyvalue">
|
||||
<ion-item *ngFor="let dep of currentDependencies | keyvalue">
|
||||
<ion-thumbnail slot="start">
|
||||
<img [src]="pkg.installed['dependency-info'][dep.key].icon" />
|
||||
</ion-thumbnail>
|
||||
|
||||
@@ -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 { DependencyErrorConfigUnsatisfied, DependencyErrorType, MainStatus, PackageDataEntry, PackageMainStatus, PackageState } from 'src/app/services/patch-db/data-model'
|
||||
import { CurrentDependencyInfo, DependencyErrorConfigUnsatisfied, DependencyErrorType, MainStatus, PackageDataEntry, PackageMainStatus, PackageState } from 'src/app/services/patch-db/data-model'
|
||||
import { FEStatus, PkgStatusRendering, 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'
|
||||
@@ -29,6 +29,7 @@ export class AppShowPage {
|
||||
FeStatus = FEStatus
|
||||
PackageState = PackageState
|
||||
DependencyErrorType = DependencyErrorType
|
||||
currentDependencies: { [id: string]: CurrentDependencyInfo }
|
||||
rendering: PkgStatusRendering
|
||||
Math = Math
|
||||
mainStatus: MainStatus
|
||||
@@ -63,6 +64,13 @@ export class AppShowPage {
|
||||
.subscribe(pkg => {
|
||||
this.pkg = pkg
|
||||
this.installProgress = !isEmptyObject(pkg['install-progress']) ? this.packageLoadingService.transform(pkg['install-progress']) : undefined
|
||||
// we can safely ignore any current dependencies that are not defined in the service manifest
|
||||
this.currentDependencies = { }
|
||||
Object.entries(pkg.installed['current-dependencies']).forEach(([id, value]) => {
|
||||
if (pkg.manifest.dependencies[id]) {
|
||||
this.currentDependencies[id] = value
|
||||
}
|
||||
})
|
||||
this.rendering = renderPkgStatus(pkg.state, pkg.installed?.status)
|
||||
this.mainStatus = { ...pkg.installed?.status.main }
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user