guid and new alert flow

This commit is contained in:
Drew Ansbacher
2021-11-01 15:07:43 -06:00
committed by Aiden McClelland
parent a5266c2e41
commit 7576b30a6b
15 changed files with 157 additions and 81 deletions

View File

@@ -24,19 +24,19 @@ export class BackupService {
try {
const drives = await this.embassyApi.getDrives({ })
this.drives = drives
.filter(d => !d.internal)
.map(d => {
const partionInfo: MappedPartitionInfo[] = d.partitions.map(p => {
.filter(d => !d.guid)
.map(d => {
const partionInfo: MappedPartitionInfo[] = d.partitions.map(p => {
return {
...p,
hasBackup: [0, 1].includes(this.emver.compare(p['embassy-os']?.version, '0.3.0')),
}
})
return {
...p,
hasBackup: [0, 1].includes(this.emver.compare(p['embassy-os']?.version, '0.3.0')),
...d,
partitions: partionInfo,
}
})
return {
...d,
partitions: partionInfo,
}
})
} catch (e) {
this.loadingError = getErrorMessage(e)
} finally {

View File

@@ -990,7 +990,7 @@ export module Mock {
},
],
capacity: 1000000000000,
internal: true,
guid: 'asdfasdf',
},
{
logicalname: '/dev/sdb',
@@ -1016,7 +1016,7 @@ export module Mock {
},
],
capacity: 10000000000,
internal: false,
guid: null,
},
]

View File

@@ -300,7 +300,7 @@ export interface DriveInfo {
model: string | null
partitions: PartitionInfo[]
capacity: number
internal: boolean
guid: string | null
}
export interface PartitionInfo {