mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-10 00:15:28 +02:00
fix: update volume backup components for improved functionality
- Refactored HandleVolumeBackups to use consistent naming for mount items. - Added an AlertBlock to RestoreVolumeBackups to inform users about potential volume name conflicts. - Updated mount retrieval logic in the mount router to enhance accuracy and efficiency in fetching volume mounts.
This commit is contained in:
@@ -550,11 +550,8 @@ export const HandleVolumeBackups = ({
|
||||
</FormControl>
|
||||
<SelectContent>
|
||||
{mounts?.map((mount) => (
|
||||
<SelectItem
|
||||
key={mount.mountId}
|
||||
value={mount.volumeName || ""}
|
||||
>
|
||||
{mount.volumeName}
|
||||
<SelectItem key={mount.Name} value={mount.Name || ""}>
|
||||
{mount.Name}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
|
||||
@@ -44,6 +44,7 @@ import { toast } from "sonner";
|
||||
import { z } from "zod";
|
||||
import { type LogLine, parseLogs } from "../../docker/logs/utils";
|
||||
import { formatBytes } from "../../database/backups/restore-backup";
|
||||
import { AlertBlock } from "@/components/shared/alert-block";
|
||||
|
||||
interface Props {
|
||||
id: string;
|
||||
@@ -169,6 +170,9 @@ export const RestoreVolumeBackups = ({ id, type, serverId }: Props) => {
|
||||
<DialogDescription>
|
||||
Select a destination and search for volume backup files
|
||||
</DialogDescription>
|
||||
<AlertBlock>
|
||||
Make sure the volume name is not being used by another container.
|
||||
</AlertBlock>
|
||||
</DialogHeader>
|
||||
|
||||
<Form {...form}>
|
||||
|
||||
Reference in New Issue
Block a user