mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-26 05:38:46 +00:00
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.
This commit is contained in:
@@ -126,6 +126,9 @@ export const HandleRegistry = ({ registryId }: Props) => {
|
|||||||
const registryName = form.watch("registryName");
|
const registryName = form.watch("registryName");
|
||||||
const imagePrefix = form.watch("imagePrefix");
|
const imagePrefix = form.watch("imagePrefix");
|
||||||
const serverId = form.watch("serverId");
|
const serverId = form.watch("serverId");
|
||||||
|
const selectedServer = servers?.find(
|
||||||
|
(server) => server.serverId === serverId,
|
||||||
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (registry) {
|
if (registry) {
|
||||||
@@ -313,8 +316,40 @@ export const HandleRegistry = ({ registryId }: Props) => {
|
|||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Server {!isCloud && "(Optional)"}</FormLabel>
|
<FormLabel>Server {!isCloud && "(Optional)"}</FormLabel>
|
||||||
<FormDescription>
|
<FormDescription>
|
||||||
Select a server to test the registry. this will run the
|
{!isCloud ? (
|
||||||
following command on the server
|
<>
|
||||||
|
{serverId && serverId !== "none" && selectedServer ? (
|
||||||
|
<>
|
||||||
|
Authentication will be performed on{" "}
|
||||||
|
<strong>{selectedServer.name}</strong>. This
|
||||||
|
registry will be available on this server.
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
Choose where to authenticate with the registry. By
|
||||||
|
default, authentication occurs on the Dokploy
|
||||||
|
server. Select a specific server to authenticate
|
||||||
|
from that server instead.
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
{serverId && serverId !== "none" && selectedServer ? (
|
||||||
|
<>
|
||||||
|
Authentication will be performed on{" "}
|
||||||
|
<strong>{selectedServer.name}</strong>. This
|
||||||
|
registry will be available on this server.
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
Select a server to authenticate with the registry.
|
||||||
|
The authentication will be performed from the
|
||||||
|
selected server.
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</FormDescription>
|
</FormDescription>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Select
|
<Select
|
||||||
|
|||||||
Reference in New Issue
Block a user