Skip to content

Commit 973b544

Browse files
authored
Merge pull request #1027 from Dokploy/canary
v0.16.1
2 parents eb7bae2 + 638fbe1 commit 973b544

File tree

234 files changed

+1657
-974
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+1657
-974
lines changed

apps/dokploy/components/dashboard/application/advanced/cluster/modify-swarm-settings.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ export const AddSwarmSettings = ({ applicationId }: Props) => {
259259
refetch();
260260
})
261261
.catch(() => {
262-
toast.error("Error to update the swarm settings");
262+
toast.error("Error updating the swarm settings");
263263
});
264264
};
265265
return (

apps/dokploy/components/dashboard/application/advanced/cluster/show-cluster-settings.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export const ShowClusterSettings = ({ applicationId }: Props) => {
9494
});
9595
})
9696
.catch(() => {
97-
toast.error("Error to update the command");
97+
toast.error("Error updating the command");
9898
});
9999
};
100100

apps/dokploy/components/dashboard/application/advanced/general/add-command.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const AddCommand = ({ applicationId }: Props) => {
7171
});
7272
})
7373
.catch(() => {
74-
toast.error("Error to update the command");
74+
toast.error("Error updating the command");
7575
});
7676
};
7777

apps/dokploy/components/dashboard/application/advanced/ports/add-port.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export const AddPort = ({
8686
setIsOpen(false);
8787
})
8888
.catch(() => {
89-
toast.error("Error to create the port");
89+
toast.error("Error creating the port");
9090
});
9191
};
9292

apps/dokploy/components/dashboard/application/advanced/ports/delete-port.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ export const DeletePort = ({ portId }: Props) => {
4747
applicationId: data?.applicationId,
4848
});
4949

50-
toast.success("Port delete succesfully");
50+
toast.success("Port delete successfully");
5151
})
5252
.catch(() => {
53-
toast.error("Error to delete the port");
53+
toast.error("Error deleting the port");
5454
});
5555
}}
5656
>

apps/dokploy/components/dashboard/application/advanced/ports/update-port.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export const UpdatePort = ({ portId }: Props) => {
9393
setIsOpen(false);
9494
})
9595
.catch(() => {
96-
toast.error("Error to update the port");
96+
toast.error("Error updating the port");
9797
});
9898
};
9999

apps/dokploy/components/dashboard/application/advanced/redirects/add-redirect.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export const AddRedirect = ({
124124
onDialogToggle(false);
125125
})
126126
.catch(() => {
127-
toast.error("Error to create the redirect");
127+
toast.error("Error creating the redirect");
128128
});
129129
};
130130

apps/dokploy/components/dashboard/application/advanced/redirects/delete-redirect.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ export const DeleteRedirect = ({ redirectId }: Props) => {
5050
utils.application.readTraefikConfig.invalidate({
5151
applicationId: data?.applicationId,
5252
});
53-
toast.success("Redirect delete succesfully");
53+
toast.success("Redirect delete successfully");
5454
})
5555
.catch(() => {
56-
toast.error("Error to delete the redirect");
56+
toast.error("Error deleting the redirect");
5757
});
5858
}}
5959
>

apps/dokploy/components/dashboard/application/advanced/redirects/update-redirect.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const UpdateRedirect = ({ redirectId }: Props) => {
8888
setIsOpen(false);
8989
})
9090
.catch(() => {
91-
toast.error("Error to update the redirect");
91+
toast.error("Error updating the redirect");
9292
});
9393
};
9494

apps/dokploy/components/dashboard/application/advanced/security/add-security.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const AddSecurity = ({
7575
setIsOpen(false);
7676
})
7777
.catch(() => {
78-
toast.error("Error to create the security");
78+
toast.error("Error creating security");
7979
});
8080
};
8181

apps/dokploy/components/dashboard/application/advanced/security/delete-security.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ export const DeleteSecurity = ({ securityId }: Props) => {
5050
utils.application.readTraefikConfig.invalidate({
5151
applicationId: data?.applicationId,
5252
});
53-
toast.success("Security delete succesfully");
53+
toast.success("Security delete successfully");
5454
})
5555
.catch(() => {
56-
toast.error("Error to delete the security");
56+
toast.error("Error deleting the security");
5757
});
5858
}}
5959
>

apps/dokploy/components/dashboard/application/advanced/security/update-security.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const UpdateSecurity = ({ securityId }: Props) => {
8383
setIsOpen(false);
8484
})
8585
.catch(() => {
86-
toast.error("Error to update the security");
86+
toast.error("Error updating the security");
8787
});
8888
};
8989

apps/dokploy/components/dashboard/application/advanced/show-application-advanced-settings.tsx

+90-24
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ import React, { useEffect } from "react";
2222
import { useForm } from "react-hook-form";
2323
import { toast } from "sonner";
2424
import { z } from "zod";
25+
import {
26+
Tooltip,
27+
TooltipContent,
28+
TooltipProvider,
29+
TooltipTrigger,
30+
} from "@/components/ui/tooltip";
31+
import { InfoIcon } from "lucide-react";
2532

2633
const addResourcesApplication = z.object({
2734
memoryReservation: z.number().nullable().optional(),
@@ -72,7 +79,7 @@ export const ShowApplicationResources = ({ applicationId }: Props) => {
7279
await refetch();
7380
})
7481
.catch(() => {
75-
toast.error("Error to Update the resources");
82+
toast.error("Error updating the resources");
7683
});
7784
};
7885
return (
@@ -101,10 +108,25 @@ export const ShowApplicationResources = ({ applicationId }: Props) => {
101108
name="memoryReservation"
102109
render={({ field }) => (
103110
<FormItem>
104-
<FormLabel>Memory Reservation</FormLabel>
111+
<div className="flex items-center gap-2">
112+
<FormLabel>Memory Reservation</FormLabel>
113+
<TooltipProvider>
114+
<Tooltip delayDuration={0}>
115+
<TooltipTrigger>
116+
<InfoIcon className="h-4 w-4 text-muted-foreground" />
117+
</TooltipTrigger>
118+
<TooltipContent>
119+
<p>
120+
Memory soft limit in bytes. Example: 256MB =
121+
268435456 bytes
122+
</p>
123+
</TooltipContent>
124+
</Tooltip>
125+
</TooltipProvider>
126+
</div>
105127
<FormControl>
106128
<Input
107-
placeholder="256 MB"
129+
placeholder="268435456 (256MB in bytes)"
108130
{...field}
109131
value={field.value?.toString() || ""}
110132
onChange={(e) => {
@@ -120,7 +142,6 @@ export const ShowApplicationResources = ({ applicationId }: Props) => {
120142
}}
121143
/>
122144
</FormControl>
123-
124145
<FormMessage />
125146
</FormItem>
126147
)}
@@ -132,10 +153,25 @@ export const ShowApplicationResources = ({ applicationId }: Props) => {
132153
render={({ field }) => {
133154
return (
134155
<FormItem>
135-
<FormLabel>Memory Limit</FormLabel>
156+
<div className="flex items-center gap-2">
157+
<FormLabel>Memory Limit</FormLabel>
158+
<TooltipProvider>
159+
<Tooltip delayDuration={0}>
160+
<TooltipTrigger>
161+
<InfoIcon className="h-4 w-4 text-muted-foreground" />
162+
</TooltipTrigger>
163+
<TooltipContent>
164+
<p>
165+
Memory hard limit in bytes. Example: 1GB =
166+
1073741824 bytes
167+
</p>
168+
</TooltipContent>
169+
</Tooltip>
170+
</TooltipProvider>
171+
</div>
136172
<FormControl>
137173
<Input
138-
placeholder={"1024 MB"}
174+
placeholder="1073741824 (1GB in bytes)"
139175
{...field}
140176
value={field.value?.toString() || ""}
141177
onChange={(e) => {
@@ -163,21 +199,36 @@ export const ShowApplicationResources = ({ applicationId }: Props) => {
163199
render={({ field }) => {
164200
return (
165201
<FormItem>
166-
<FormLabel>Cpu Limit</FormLabel>
202+
<div className="flex items-center gap-2">
203+
<FormLabel>CPU Limit</FormLabel>
204+
<TooltipProvider>
205+
<Tooltip delayDuration={0}>
206+
<TooltipTrigger>
207+
<InfoIcon className="h-4 w-4 text-muted-foreground" />
208+
</TooltipTrigger>
209+
<TooltipContent>
210+
<p>
211+
CPU quota in units of 10^-9 CPUs. Example: 2
212+
CPUs = 2000000000
213+
</p>
214+
</TooltipContent>
215+
</Tooltip>
216+
</TooltipProvider>
217+
</div>
167218
<FormControl>
168219
<Input
169-
placeholder={"2"}
220+
placeholder="2000000000 (2 CPUs)"
170221
{...field}
171-
type="number"
172222
value={field.value?.toString() || ""}
173223
onChange={(e) => {
174224
const value = e.target.value;
175-
if (
176-
value === "" ||
177-
/^[0-9]*\.?[0-9]*$/.test(value)
178-
) {
179-
const float = Number.parseFloat(value);
180-
field.onChange(float);
225+
if (value === "") {
226+
field.onChange(null);
227+
} else {
228+
const number = Number.parseInt(value, 10);
229+
if (!Number.isNaN(number)) {
230+
field.onChange(number);
231+
}
181232
}
182233
}}
183234
/>
@@ -193,21 +244,36 @@ export const ShowApplicationResources = ({ applicationId }: Props) => {
193244
render={({ field }) => {
194245
return (
195246
<FormItem>
196-
<FormLabel>Cpu Reservation</FormLabel>
247+
<div className="flex items-center gap-2">
248+
<FormLabel>CPU Reservation</FormLabel>
249+
<TooltipProvider>
250+
<Tooltip delayDuration={0}>
251+
<TooltipTrigger>
252+
<InfoIcon className="h-4 w-4 text-muted-foreground" />
253+
</TooltipTrigger>
254+
<TooltipContent>
255+
<p>
256+
CPU shares (relative weight). Example: 1 CPU =
257+
1000000000
258+
</p>
259+
</TooltipContent>
260+
</Tooltip>
261+
</TooltipProvider>
262+
</div>
197263
<FormControl>
198264
<Input
199-
placeholder={"1"}
265+
placeholder="1000000000 (1 CPU)"
200266
{...field}
201-
type="number"
202267
value={field.value?.toString() || ""}
203268
onChange={(e) => {
204269
const value = e.target.value;
205-
if (
206-
value === "" ||
207-
/^[0-9]*\.?[0-9]*$/.test(value)
208-
) {
209-
const float = Number.parseFloat(value);
210-
field.onChange(float);
270+
if (value === "") {
271+
field.onChange(null);
272+
} else {
273+
const number = Number.parseInt(value, 10);
274+
if (!Number.isNaN(number)) {
275+
field.onChange(number);
276+
}
211277
}
212278
}}
213279
/>

apps/dokploy/components/dashboard/application/advanced/traefik/update-traefik-config.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export const UpdateTraefikConfig = ({ applicationId }: Props) => {
105105
form.reset();
106106
})
107107
.catch(() => {
108-
toast.error("Error to update the traefik config");
108+
toast.error("Error updating the Traefik config");
109109
});
110110
};
111111

apps/dokploy/components/dashboard/application/advanced/volumes/add-volumes.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export const AddVolumes = ({
107107
setIsOpen(false);
108108
})
109109
.catch(() => {
110-
toast.error("Error to create the Bind mount");
110+
toast.error("Error creating the Bind mount");
111111
});
112112
} else if (data.type === "volume") {
113113
await mutateAsync({
@@ -122,7 +122,7 @@ export const AddVolumes = ({
122122
setIsOpen(false);
123123
})
124124
.catch(() => {
125-
toast.error("Error to create the Volume mount");
125+
toast.error("Error creating the Volume mount");
126126
});
127127
} else if (data.type === "file") {
128128
await mutateAsync({
@@ -138,7 +138,7 @@ export const AddVolumes = ({
138138
setIsOpen(false);
139139
})
140140
.catch(() => {
141-
toast.error("Error to create the File mount");
141+
toast.error("Error creating the File mount");
142142
});
143143
}
144144

apps/dokploy/components/dashboard/application/advanced/volumes/delete-volume.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ export const DeleteVolume = ({ mountId, refetch }: Props) => {
4545
})
4646
.then(() => {
4747
refetch();
48-
toast.success("Mount deleted succesfully");
48+
toast.success("Mount deleted successfully");
4949
})
5050
.catch(() => {
51-
toast.error("Error to delete the mount");
51+
toast.error("Error deleting the mount");
5252
});
5353
}}
5454
>

apps/dokploy/components/dashboard/application/advanced/volumes/update-volume.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export const UpdateVolume = ({
139139
setIsOpen(false);
140140
})
141141
.catch(() => {
142-
toast.error("Error to update the Bind mount");
142+
toast.error("Error updating the Bind mount");
143143
});
144144
} else if (data.type === "volume") {
145145
await mutateAsync({
@@ -153,7 +153,7 @@ export const UpdateVolume = ({
153153
setIsOpen(false);
154154
})
155155
.catch(() => {
156-
toast.error("Error to update the Volume mount");
156+
toast.error("Error updating the Volume mount");
157157
});
158158
} else if (data.type === "file") {
159159
await mutateAsync({
@@ -168,7 +168,7 @@ export const UpdateVolume = ({
168168
setIsOpen(false);
169169
})
170170
.catch(() => {
171-
toast.error("Error to update the File mount");
171+
toast.error("Error updating the File mount");
172172
});
173173
}
174174
refetch();

apps/dokploy/components/dashboard/application/build/show.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export const ShowBuildChooseForm = ({ applicationId }: Props) => {
126126
await refetch();
127127
})
128128
.catch(() => {
129-
toast.error("Error to save the build type");
129+
toast.error("Error saving the build type");
130130
});
131131
};
132132

apps/dokploy/components/dashboard/application/deployments/refresh-token.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const RefreshToken = ({ applicationId }: Props) => {
4747
toast.success("Refresh updated");
4848
})
4949
.catch(() => {
50-
toast.error("Error to update the refresh token");
50+
toast.error("Error updating the refresh token");
5151
});
5252
}}
5353
>

0 commit comments

Comments
 (0)