diff --git a/internal/database/create.go b/internal/database/create.go index e7d7772..c5ecce7 100644 --- a/internal/database/create.go +++ b/internal/database/create.go @@ -17,6 +17,8 @@ func CreateConnection(c *gin.Context) { name string = c.PostForm("db-conn-name") ) + fmt.Println(name, ": ", url) + session := sessions.Default(c) var connections map[string]string diff --git a/web/static/scripts/modal.js b/web/static/scripts/modal.js index 99e0980..d1349f3 100644 --- a/web/static/scripts/modal.js +++ b/web/static/scripts/modal.js @@ -17,9 +17,10 @@ function HideModal() { modal.classList.add("hidden"); modal.classList.add("opacity-0"); - // Clear the inputs for (const key in input) { - input[key].value = ""; + if (key != "driver") { + input[key].value = ""; + } } } @@ -75,6 +76,8 @@ for (const key in input) { input[key].addEventListener("input", () => { ParseURL(input); }) + } else if (key == "name") { + continue; } else { // If the input changed is the database name, update the connection name as well. // This will create a default connection name based on the database name. diff --git a/web/templates/index.html b/web/templates/index.html index f20f1c2..b107656 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -201,8 +201,15 @@