refetch after backup / delete / update
This commit is contained in:
parent
93c042d0eb
commit
d17241d8d7
|
@ -100,6 +100,7 @@
|
||||||
appId: app.instance._id,
|
appId: app.instance._id,
|
||||||
name,
|
name,
|
||||||
})
|
})
|
||||||
|
await fetchBackups(trigger, page)
|
||||||
notifications.success(response.message)
|
notifications.success(response.message)
|
||||||
} catch {
|
} catch {
|
||||||
notifications.error("Unable to create backup")
|
notifications.error("Unable to create backup")
|
||||||
|
@ -112,20 +113,21 @@
|
||||||
appId: app.instance._id,
|
appId: app.instance._id,
|
||||||
backupId: detail.backupId,
|
backupId: detail.backupId,
|
||||||
})
|
})
|
||||||
await fetchBackups(app.instance._id, trigger, page)
|
await fetchBackups(trigger, page)
|
||||||
} else if (detail.type === "backupRestore") {
|
} else if (detail.type === "backupRestore") {
|
||||||
await backups.restoreBackup({
|
await backups.restoreBackup({
|
||||||
appId: app.instance._id,
|
appId: app.instance._id,
|
||||||
backupId: detail.backupId,
|
backupId: detail.backupId,
|
||||||
name: detail.restoreBackupName,
|
name: detail.restoreBackupName,
|
||||||
})
|
})
|
||||||
|
await fetchBackups(trigger, page)
|
||||||
} else if (detail.type === "backupUpdate") {
|
} else if (detail.type === "backupUpdate") {
|
||||||
await backups.updateBackup({
|
await backups.updateBackup({
|
||||||
appId: app.instance._id,
|
appId: app.instance._id,
|
||||||
backupId: detail.backupId,
|
backupId: detail.backupId,
|
||||||
name: detail.name,
|
name: detail.name,
|
||||||
})
|
})
|
||||||
await fetchBackups(app.instance._id, trigger, page)
|
await fetchBackups(trigger, page)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -138,6 +140,8 @@
|
||||||
placeholder="All"
|
placeholder="All"
|
||||||
label="Trigger"
|
label="Trigger"
|
||||||
options={Object.values(triggers)}
|
options={Object.values(triggers)}
|
||||||
|
getOptionLabel={trigger =>
|
||||||
|
trigger.charAt(0).toUpperCase() + trigger.slice(1)}
|
||||||
bind:value={trigger}
|
bind:value={trigger}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,6 +5,11 @@
|
||||||
$: status = value?.charAt(0).toUpperCase() + value?.slice(1)
|
$: status = value?.charAt(0).toUpperCase() + value?.slice(1)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Badge green={value === "complete"} red={value === "failed"} size="S">
|
<Badge
|
||||||
|
grey={value === "started"}
|
||||||
|
green={value === "complete"}
|
||||||
|
red={value === "failed"}
|
||||||
|
size="S"
|
||||||
|
>
|
||||||
{status}
|
{status}
|
||||||
</Badge>
|
</Badge>
|
||||||
|
|
Loading…
Reference in New Issue