diff --git a/apps/dokploy/components/dashboard/application/deployments/show-deployment.tsx b/apps/dokploy/components/dashboard/application/deployments/show-deployment.tsx index 39b09d0c..e6fdb38b 100644 --- a/apps/dokploy/components/dashboard/application/deployments/show-deployment.tsx +++ b/apps/dokploy/components/dashboard/application/deployments/show-deployment.tsx @@ -17,8 +17,15 @@ interface Props { open: boolean; onClose: () => void; serverId?: string; + errorMessage?: string; } -export const ShowDeployment = ({ logPath, open, onClose, serverId }: Props) => { +export const ShowDeployment = ({ + logPath, + open, + onClose, + serverId, + errorMessage, +}: Props) => { const [data, setData] = useState(""); const [showExtraLogs, setShowExtraLogs] = useState(false); const [filteredLogs, setFilteredLogs] = useState([]); @@ -99,6 +106,8 @@ export const ShowDeployment = ({ logPath, open, onClose, serverId }: Props) => { } }, [filteredLogs, autoScroll]); + const optionalErrors = parseLogs(errorMessage || ""); + return ( { )) ) : ( -
- -
+ <> + {optionalErrors.length > 0 ? ( + optionalErrors.map((log: LogLine, index: number) => ( + + )) + ) : ( +
+ +
+ )} + )} diff --git a/apps/dokploy/components/dashboard/application/deployments/show-deployments.tsx b/apps/dokploy/components/dashboard/application/deployments/show-deployments.tsx index a767350f..b5ece6e7 100644 --- a/apps/dokploy/components/dashboard/application/deployments/show-deployments.tsx +++ b/apps/dokploy/components/dashboard/application/deployments/show-deployments.tsx @@ -8,7 +8,7 @@ import { CardHeader, CardTitle, } from "@/components/ui/card"; -import { api } from "@/utils/api"; +import { api, type RouterOutputs } from "@/utils/api"; import { RocketIcon } from "lucide-react"; import React, { useEffect, useState } from "react"; import { CancelQueues } from "./cancel-queues"; @@ -18,8 +18,11 @@ import { ShowDeployment } from "./show-deployment"; interface Props { applicationId: string; } + export const ShowDeployments = ({ applicationId }: Props) => { - const [activeLog, setActiveLog] = useState(null); + const [activeLog, setActiveLog] = useState< + RouterOutputs["deployment"]["all"][number] | null + >(null); const { data } = api.application.one.useQuery({ applicationId }); const { data: deployments } = api.deployment.all.useQuery( { applicationId }, @@ -100,7 +103,7 @@ export const ShowDeployments = ({ applicationId }: Props) => {
); diff --git a/apps/dokploy/components/dashboard/compose/deployments/show-deployment-compose.tsx b/apps/dokploy/components/dashboard/compose/deployments/show-deployment-compose.tsx index 45869ed2..7c191a14 100644 --- a/apps/dokploy/components/dashboard/compose/deployments/show-deployment-compose.tsx +++ b/apps/dokploy/components/dashboard/compose/deployments/show-deployment-compose.tsx @@ -17,12 +17,14 @@ interface Props { serverId?: string; open: boolean; onClose: () => void; + errorMessage?: string; } export const ShowDeploymentCompose = ({ logPath, open, onClose, serverId, + errorMessage, }: Props) => { const [data, setData] = useState(""); const [filteredLogs, setFilteredLogs] = useState([]); @@ -105,6 +107,8 @@ export const ShowDeploymentCompose = ({ } }, [filteredLogs, autoScroll]); + const optionalErrors = parseLogs(errorMessage || ""); + return ( )) ) : ( -
- -
+ <> + {optionalErrors.length > 0 ? ( + optionalErrors.map((log: LogLine, index: number) => ( + + )) + ) : ( +
+ +
+ )} + )} diff --git a/apps/dokploy/components/dashboard/compose/deployments/show-deployments-compose.tsx b/apps/dokploy/components/dashboard/compose/deployments/show-deployments-compose.tsx index 54c0ad2e..60833d43 100644 --- a/apps/dokploy/components/dashboard/compose/deployments/show-deployments-compose.tsx +++ b/apps/dokploy/components/dashboard/compose/deployments/show-deployments-compose.tsx @@ -8,7 +8,7 @@ import { CardHeader, CardTitle, } from "@/components/ui/card"; -import { api } from "@/utils/api"; +import { api, type RouterOutputs } from "@/utils/api"; import { RocketIcon } from "lucide-react"; import React, { useEffect, useState } from "react"; import { CancelQueuesCompose } from "./cancel-queues-compose"; @@ -19,7 +19,9 @@ interface Props { composeId: string; } export const ShowDeploymentsCompose = ({ composeId }: Props) => { - const [activeLog, setActiveLog] = useState(null); + const [activeLog, setActiveLog] = useState< + RouterOutputs["deployment"]["all"][number] | null + >(null); const { data } = api.compose.one.useQuery({ composeId }); const { data: deployments } = api.deployment.allByCompose.useQuery( { composeId }, @@ -100,7 +102,7 @@ export const ShowDeploymentsCompose = ({ composeId }: Props) => {