refactor(multi-server): adapt paths on server and in dokploy ui

This commit is contained in:
Mauricio Siu
2024-09-16 23:49:24 -06:00
parent c84d39a20f
commit 9b312cd9d7
43 changed files with 255 additions and 159 deletions

View File

@@ -22,7 +22,7 @@ export const ShowDeployment = ({ logPath, open, onClose, serverId }: Props) => {
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
const wsUrl = `${protocol}//${window.location.host}/listen-deployment?logPath=${logPath}&serverId=${serverId}`;
const wsUrl = `${protocol}//${window.location.host}/listen-deployment?logPath=${logPath}${serverId ? `&serverId=${serverId}` : ""}`;
const ws = new WebSocket(wsUrl);
ws.onmessage = (e) => {

View File

@@ -29,6 +29,12 @@ import {
SelectValue,
} from "@/components/ui/select";
import { Textarea } from "@/components/ui/textarea";
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { slugify } from "@/lib/slug";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
@@ -37,12 +43,6 @@ import { useEffect } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";
const AddComposeSchema = z.object({
composeType: z.enum(["docker-compose", "stack"]).optional(),

View File

@@ -161,6 +161,7 @@ export const SetupServer = ({ serverId }: Props) => {
))}
</div>
)}
<ShowDeployment
open={activeLog !== null}
onClose={() => setActiveLog(null)}