Skip to content

Commit 31cdae1

Browse files
committed
feat(registry): improve server selection guidance in registry settings
- Enhanced the user interface for server selection in the registry settings, providing clearer instructions based on whether the server is cloud-based or not. - Added conditional messaging to inform users about authentication processes related to the selected server, improving overall user experience.
1 parent 702af64 commit 31cdae1

File tree

1 file changed

+37
-2
lines changed

1 file changed

+37
-2
lines changed

apps/dokploy/components/dashboard/settings/cluster/registry/handle-registry.tsx

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ export const HandleRegistry = ({ registryId }: Props) => {
126126
const registryName = form.watch("registryName");
127127
const imagePrefix = form.watch("imagePrefix");
128128
const serverId = form.watch("serverId");
129+
const selectedServer = servers?.find(
130+
(server) => server.serverId === serverId,
131+
);
129132

130133
useEffect(() => {
131134
if (registry) {
@@ -313,8 +316,40 @@ export const HandleRegistry = ({ registryId }: Props) => {
313316
<FormItem>
314317
<FormLabel>Server {!isCloud && "(Optional)"}</FormLabel>
315318
<FormDescription>
316-
Select a server to test the registry. this will run the
317-
following command on the server
319+
{!isCloud ? (
320+
<>
321+
{serverId && serverId !== "none" && selectedServer ? (
322+
<>
323+
Authentication will be performed on{" "}
324+
<strong>{selectedServer.name}</strong>. This
325+
registry will be available on this server.
326+
</>
327+
) : (
328+
<>
329+
Choose where to authenticate with the registry. By
330+
default, authentication occurs on the Dokploy
331+
server. Select a specific server to authenticate
332+
from that server instead.
333+
</>
334+
)}
335+
</>
336+
) : (
337+
<>
338+
{serverId && serverId !== "none" && selectedServer ? (
339+
<>
340+
Authentication will be performed on{" "}
341+
<strong>{selectedServer.name}</strong>. This
342+
registry will be available on this server.
343+
</>
344+
) : (
345+
<>
346+
Select a server to authenticate with the registry.
347+
The authentication will be performed from the
348+
selected server.
349+
</>
350+
)}
351+
</>
352+
)}
318353
</FormDescription>
319354
<FormControl>
320355
<Select

0 commit comments

Comments
 (0)