From faab80bee194ab529f0517e40d55277d4bd93dff Mon Sep 17 00:00:00 2001 From: vicke4 Date: Mon, 3 Mar 2025 01:02:46 +0530 Subject: [PATCH] feat(ui): add keep the latest input on backups dialog --- .../database/backups/update-backup.tsx | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/apps/dokploy/components/dashboard/database/backups/update-backup.tsx b/apps/dokploy/components/dashboard/database/backups/update-backup.tsx index 99f7692a..397ca7f0 100644 --- a/apps/dokploy/components/dashboard/database/backups/update-backup.tsx +++ b/apps/dokploy/components/dashboard/database/backups/update-backup.tsx @@ -47,6 +47,7 @@ const UpdateBackupSchema = z.object({ prefix: z.string().min(1, "Prefix required"), enabled: z.boolean(), database: z.string().min(1, "Database required"), + keepLatestCount: z.number(), }); type UpdateBackup = z.infer; @@ -78,6 +79,7 @@ export const UpdateBackup = ({ backupId, refetch }: Props) => { enabled: true, prefix: "/", schedule: "", + keepLatestCount: undefined, }, resolver: zodResolver(UpdateBackupSchema), }); @@ -253,7 +255,7 @@ export const UpdateBackup = ({ backupId, refetch }: Props) => { - Use if you want to storage in a specific path of your + Use if you want to back up in a specific path of your destination/bucket @@ -262,6 +264,24 @@ export const UpdateBackup = ({ backupId, refetch }: Props) => { ); }} /> + { + return ( + + Keep the latest + + + + + Optional. If provided, only keeps the latest N backups in the cloud. + + + + ); + }} + />