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