no longer display the 'deleted' state of a snapshot, while retrieving it

This commit is contained in:
Dragos 2021-05-31 11:17:07 +03:00
parent 96c76c845b
commit 447f167e4d

View File

@ -40,7 +40,11 @@ export class SnapshotsService
// Keep polling the snapshot until it reaches the expected state // Keep polling the snapshot until it reaches the expected state
return this.httpClient.get<Snapshot>(`/api/my/machines/${instance.id}/snapshots/${encodeURIComponent(snapshot.name)}`) return this.httpClient.get<Snapshot>(`/api/my/machines/${instance.id}/snapshots/${encodeURIComponent(snapshot.name)}`)
.pipe( .pipe(
tap(x => snapshot.state = x.state), tap(x =>
{
if (x.state !== 'deleted')
snapshot.state = x.state;
}),
repeatWhen(x => repeatWhen(x =>
{ {
let retries = 0; let retries = 0;