-
-
Notifications
You must be signed in to change notification settings - Fork 552
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #989 from Dokploy/refactor/add-no-trunc
Refactor/add no trunc
- Loading branch information
Showing
4 changed files
with
95 additions
and
8 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
apps/dokploy/components/dashboard/docker/logs/show-docker-modal-stack-logs.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { | ||
Dialog, | ||
DialogContent, | ||
DialogDescription, | ||
DialogHeader, | ||
DialogTitle, | ||
DialogTrigger, | ||
} from "@/components/ui/dialog"; | ||
import { DropdownMenuItem } from "@/components/ui/dropdown-menu"; | ||
import dynamic from "next/dynamic"; | ||
import type React from "react"; | ||
export const DockerLogsId = dynamic( | ||
() => | ||
import("@/components/dashboard/docker/logs/docker-logs-id").then( | ||
(e) => e.DockerLogsId, | ||
), | ||
{ | ||
ssr: false, | ||
}, | ||
); | ||
|
||
interface Props { | ||
containerId: string; | ||
children?: React.ReactNode; | ||
serverId?: string | null; | ||
} | ||
|
||
export const ShowDockerModalStackLogs = ({ | ||
containerId, | ||
children, | ||
serverId, | ||
}: Props) => { | ||
return ( | ||
<Dialog> | ||
<DialogTrigger asChild> | ||
<DropdownMenuItem | ||
className="w-full cursor-pointer space-x-3" | ||
onSelect={(e) => e.preventDefault()} | ||
> | ||
{children} | ||
</DropdownMenuItem> | ||
</DialogTrigger> | ||
<DialogContent className="max-h-screen overflow-y-auto sm:max-w-7xl"> | ||
<DialogHeader> | ||
<DialogTitle>View Logs</DialogTitle> | ||
<DialogDescription>View the logs for {containerId}</DialogDescription> | ||
</DialogHeader> | ||
<div className="flex flex-col gap-4 pt-2.5"> | ||
<DockerLogsId | ||
containerId={containerId || ""} | ||
serverId={serverId} | ||
runType="swarm" | ||
/> | ||
</div> | ||
</DialogContent> | ||
</Dialog> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters