Feature/backup fs (#2665)

* port 040 config, WIP

* update fixtures

* use taiga modal for backups too

* fix: update Taiga UI and refactor everything to work

* chore: package-lock

* fix interfaces and mocks for interfaces

* better mocks

* function to transform old spec to new

* delete unused fns

* delete unused FE config utils

* fix exports from sdk

* reorganize exports

* functions to translate config

* rename unionSelectKey and unionValueKey

* new backup fs

* update sdk types

* change types, include fuse module

* fix casing

* rework setup wiz

* rework UI

* only fuse3

* fix arm build

* misc fixes

* fix duplicate server select

* fix: fix throwing inside dialog

---------

Co-authored-by: Matt Hill <mattnine@protonmail.com>
Co-authored-by: waterplea <alexander@inkin.ru>
Co-authored-by: Matt Hill <MattDHill@users.noreply.github.com>
This commit is contained in:
Aiden McClelland
2024-07-11 11:32:46 -06:00
committed by GitHub
parent f2a02b392e
commit 87322744d4
67 changed files with 880 additions and 563 deletions

View File

@@ -34,7 +34,7 @@ export class BackupService {
.map(([id, cifs]) => {
return {
id,
hasValidBackup: this.hasValidBackup(cifs),
hasAnyBackup: this.hasAnyBackup(cifs),
entry: cifs as CifsBackupTarget,
}
})
@@ -44,7 +44,7 @@ export class BackupService {
.map(([id, drive]) => {
return {
id,
hasValidBackup: this.hasValidBackup(drive),
hasAnyBackup: this.hasAnyBackup(drive),
entry: drive as DiskBackupTarget,
}
})
@@ -55,8 +55,16 @@ export class BackupService {
}
}
hasValidBackup(target: BackupTarget): boolean {
const backup = target.startOs
return !!backup && this.emver.compare(backup.version, '0.3.0') !== -1
hasAnyBackup(target: BackupTarget): boolean {
return Object.values(target.startOs).some(
s => this.emver.compare(s.version, '0.3.6') !== -1,
)
}
async hasThisBackup(target: BackupTarget, id: string): Promise<boolean> {
return (
target.startOs[id] &&
this.emver.compare(target.startOs[id].version, '0.3.6') !== -1
)
}
}