From 179f3818f09c0178290d87263b537b1603de9c16 Mon Sep 17 00:00:00 2001 From: Nicholas Penree Date: Wed, 11 Dec 2024 22:50:32 -0500 Subject: [PATCH] feat(docker): use code editor when displaying container config --- .../dashboard/docker/config/show-container-config.tsx | 11 +++++++++-- apps/dokploy/components/shared/code-editor.tsx | 4 +++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/apps/dokploy/components/dashboard/docker/config/show-container-config.tsx b/apps/dokploy/components/dashboard/docker/config/show-container-config.tsx index 25d78dd7..1f1591c9 100644 --- a/apps/dokploy/components/dashboard/docker/config/show-container-config.tsx +++ b/apps/dokploy/components/dashboard/docker/config/show-container-config.tsx @@ -1,3 +1,4 @@ +import { CodeEditor } from "@/components/shared/code-editor"; import { Dialog, DialogContent, @@ -34,7 +35,7 @@ export const ShowContainerConfig = ({ containerId, serverId }: Props) => { View Config - + Container Config @@ -44,7 +45,13 @@ export const ShowContainerConfig = ({ containerId, serverId }: Props) => {
-							{JSON.stringify(data, null, 2)}
+							
 						
diff --git a/apps/dokploy/components/shared/code-editor.tsx b/apps/dokploy/components/shared/code-editor.tsx index c071f542..3dcf5267 100644 --- a/apps/dokploy/components/shared/code-editor.tsx +++ b/apps/dokploy/components/shared/code-editor.tsx @@ -12,12 +12,14 @@ interface Props extends ReactCodeMirrorProps { disabled?: boolean; language?: "yaml" | "json" | "properties"; lineWrapping?: boolean; + lineNumbers?: boolean; } export const CodeEditor = ({ className, wrapperClassName, language = "yaml", + lineNumbers = true, ...props }: Props) => { const { resolvedTheme } = useTheme(); @@ -25,7 +27,7 @@ export const CodeEditor = ({