Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 58e0bf1

Browse files
committed
Set the name of the connection from the container's name
1 parent 3e3867e commit 58e0bf1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ui/src/components/NewDatabaseDialog.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,17 @@ export const NewDatabaseDialog = (props: DialogProps) => {
105105
port: port.split(":")[0],
106106
});
107107

108+
let name = "";
109+
try {
110+
const result = await ddClient.docker.cli.exec("inspect", ["-f", "{{.Name}}", containerID]);
111+
name = result.stdout.trim().replaceAll("/", "");
112+
} catch (e) {
113+
console.log(e)
114+
}
115+
108116
const connection: IDBConnection = {
109117
id: containerID,
110-
name: "to fill later",
118+
name,
111119
connectionString,
112120
image,
113121
}

0 commit comments

Comments
 (0)