From fb548e420794e78a2d54cb44a5b244a21adc1251 Mon Sep 17 00:00:00 2001 From: Azpect3120 <104033825+Azpect3120@users.noreply.github.com> Date: Wed, 7 Aug 2024 17:18:51 -0700 Subject: [PATCH] FEAT: Displays database name in tree view --- internal/templates/connections.go | 7 ++++++- web/templates/index.html | 11 ++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/internal/templates/connections.go b/internal/templates/connections.go index 760c6b5..0390a3f 100644 --- a/internal/templates/connections.go +++ b/internal/templates/connections.go @@ -2,10 +2,13 @@ package templates import "fmt" +// List item templates const LIST_OPEN string = `` +const TREE_VIEW_NAME string = `%s` + // Generate a list of connections to display in the drop-down. // Current connection will be toggled as selected func ConnectionsList(connections map[string]string, current string) string { @@ -24,6 +27,8 @@ func ConnectionsList(connections map[string]string, current string) string { } } + treeName := fmt.Sprintf(TREE_VIEW_NAME, current) + html += LIST_CLOSE - return html + return html + treeName } diff --git a/web/templates/index.html b/web/templates/index.html index c111076..c72707a 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -34,7 +34,7 @@
-

Database 1 Tables

+

database Tables