refactor(dokploy): reorganize imports and simplify ulimitsSwarm assignment

- Moved the Tooltip imports to a more appropriate location for better readability.
- Simplified the assignment of ulimitsSwarm to ensure it directly accesses the data property.
This commit is contained in:
Mauricio Siu
2026-02-08 23:36:20 -06:00
parent 65ffc63da4
commit c039e638a6
@@ -21,17 +21,11 @@ import {
FormLabel, FormLabel,
FormMessage, FormMessage,
} from "@/components/ui/form"; } from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { import {
createConverter, createConverter,
NumberInputWithSteps, NumberInputWithSteps,
} from "@/components/ui/number-input"; } from "@/components/ui/number-input";
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { Input } from "@/components/ui/input";
import { import {
Select, Select,
SelectContent, SelectContent,
@@ -39,6 +33,12 @@ import {
SelectTrigger, SelectTrigger,
SelectValue, SelectValue,
} from "@/components/ui/select"; } from "@/components/ui/select";
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { api } from "@/utils/api"; import { api } from "@/utils/api";
const CPU_STEP = 0.25; const CPU_STEP = 0.25;
@@ -155,7 +155,7 @@ export const ShowResources = ({ id, type }: Props) => {
cpuReservation: data?.cpuReservation || undefined, cpuReservation: data?.cpuReservation || undefined,
memoryLimit: data?.memoryLimit || undefined, memoryLimit: data?.memoryLimit || undefined,
memoryReservation: data?.memoryReservation || undefined, memoryReservation: data?.memoryReservation || undefined,
ulimitsSwarm: (data as any)?.ulimitsSwarm || [], ulimitsSwarm: data?.ulimitsSwarm || [],
}); });
} }
}, [data, form, form.reset]); }, [data, form, form.reset]);