From 0b22b694e6c81b6439399b5437fb92094dbb309c Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Fri, 20 Sep 2024 01:33:06 -0600 Subject: [PATCH] refactor: add conditional to prevent access to terminal when is not server --- .../components/dashboard/docker/terminal/docker-terminal.tsx | 2 +- apps/dokploy/pages/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/dokploy/components/dashboard/docker/terminal/docker-terminal.tsx b/apps/dokploy/components/dashboard/docker/terminal/docker-terminal.tsx index 94985b81b..4008d6fd5 100644 --- a/apps/dokploy/components/dashboard/docker/terminal/docker-terminal.tsx +++ b/apps/dokploy/components/dashboard/docker/terminal/docker-terminal.tsx @@ -38,7 +38,7 @@ export const DockerTerminal: React.FC = ({ const protocol = window.location.protocol === "https:" ? "wss:" : "ws:"; - const wsUrl = `${protocol}//${window.location.host}/docker-container-terminal?containerId=${containerId}&activeWay=${activeWay}&serverId=${serverId}`; + const wsUrl = `${protocol}//${window.location.host}/docker-container-terminal?containerId=${containerId}&activeWay=${activeWay}${serverId ? `&serverId=${serverId}` : ""}`; const ws = new WebSocket(wsUrl); diff --git a/apps/dokploy/pages/index.tsx b/apps/dokploy/pages/index.tsx index 350d29a02..f41ce2fa7 100644 --- a/apps/dokploy/pages/index.tsx +++ b/apps/dokploy/pages/index.tsx @@ -69,8 +69,8 @@ export default function Home({ hasAdmin }: Props) { const router = useRouter(); const form = useForm({ defaultValues: { - email: "user1@hotmail.com", - password: "Password123", + email: "", + password: "", }, resolver: zodResolver(loginSchema), });