Update deployment and backup components for improved handling and user experience

- Refined the `ShowDeployments` component to conditionally render `CancelQueues` and `RefreshToken` based on deployment type, enhancing flexibility.
- Removed unnecessary console logging in `RestoreBackup` and updated input field to disable when the database type is "web-server", improving user guidance.
- Enhanced logging in `runWebServerBackup` to provide clearer output during backup operations, ensuring better traceability of actions.
This commit is contained in:
Mauricio Siu
2025-05-04 13:19:45 -06:00
parent 06c9e43143
commit 9aa56870b0
6 changed files with 64 additions and 143 deletions

View File

@@ -140,8 +140,6 @@ const RestoreBackupSchema = z
});
}
console.log(data.backupType, { metadata: data.metadata });
if (data.backupType === "compose" && !data.metadata?.serviceName) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
@@ -532,7 +530,11 @@ export const RestoreBackup = ({
<FormItem>
<FormLabel>Database Name</FormLabel>
<FormControl>
<Input placeholder="Enter database name" {...field} />
<Input
placeholder="Enter database name"
{...field}
disabled={databaseType === "web-server"}
/>
</FormControl>
<FormMessage />
</FormItem>
@@ -789,10 +791,10 @@ export const RestoreBackup = ({
isLoading={isDeploying}
form="hook-form-restore-backup"
type="submit"
disabled={
!form.watch("backupFile") ||
(backupType === "compose" && !form.watch("databaseType"))
}
// disabled={
// !form.watch("backupFile") ||
// (backupType === "compose" && !form.watch("databaseType"))
// }
>
Restore
</Button>