FIX: Removed temporary password
This commit is contained in:
parent
97daa346bc
commit
84d0236c2c
2
go.mod
2
go.mod
@ -8,6 +8,7 @@ require (
|
|||||||
github.com/gin-gonic/gin v1.10.0
|
github.com/gin-gonic/gin v1.10.0
|
||||||
github.com/go-sql-driver/mysql v1.8.1
|
github.com/go-sql-driver/mysql v1.8.1
|
||||||
github.com/lib/pq v1.10.9
|
github.com/lib/pq v1.10.9
|
||||||
|
github.com/mattn/go-sqlite3 v1.14.22
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
@ -30,7 +31,6 @@ require (
|
|||||||
github.com/kr/text v0.2.0 // indirect
|
github.com/kr/text v0.2.0 // indirect
|
||||||
github.com/leodido/go-urn v1.4.0 // indirect
|
github.com/leodido/go-urn v1.4.0 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||||
github.com/mattn/go-sqlite3 v1.14.22 // indirect
|
|
||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
|
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
|
||||||
|
|||||||
@ -20,9 +20,13 @@
|
|||||||
<p class="text-sm text-gray-600">Connect and query your databases effortlessly.</p>
|
<p class="text-sm text-gray-600">Connect and query your databases effortlessly.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center justify-end space-x-4 flex-wrap">
|
<div class="flex items-center justify-end space-x-4 flex-wrap">
|
||||||
<form hx-post="/v1/api/connections/connect" hx-trigger="change" hx-swap="outerHTML" hx-target="#connected-database" hx-indicator="#table-loading" hx-encoding="multipart/form-data" class="flex items-center justify-end space-x-2 flex-wrap">
|
<form hx-post="/v1/api/connections/connect" hx-trigger="change" hx-swap="outerHTML"
|
||||||
|
hx-target="#connected-database" hx-indicator="#table-loading" hx-encoding="multipart/form-data"
|
||||||
|
class="flex items-center justify-end space-x-2 flex-wrap">
|
||||||
<label for="connected-database" class="block text-sm font-medium text-gray-700">Connected Database:</label>
|
<label for="connected-database" class="block text-sm font-medium text-gray-700">Connected Database:</label>
|
||||||
<select hx-get="/v1/web/connections" hx-trigger="load, change" hx-swap="outerHTML" id="connected-database" name="connected-database" hx-params="none" class="mt-1 block p-2 border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 text-sm md:text-base"></select>
|
<select hx-get="/v1/web/connections" hx-trigger="load, change" hx-swap="outerHTML" id="connected-database"
|
||||||
|
name="connected-database" hx-params="none"
|
||||||
|
class="mt-1 block p-2 border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 text-sm md:text-base"></select>
|
||||||
</form>
|
</form>
|
||||||
<button onclick="ShowModal();" class="bg-blue-500 text-white px-4 py-2 my-2 rounded-md text-sm md:text-base">
|
<button onclick="ShowModal();" class="bg-blue-500 text-white px-4 py-2 my-2 rounded-md text-sm md:text-base">
|
||||||
Add Connection
|
Add Connection
|
||||||
@ -41,7 +45,8 @@
|
|||||||
<h2 class="text-lg font-bold">
|
<h2 class="text-lg font-bold">
|
||||||
<span id="database-name-tree">database</span>
|
<span id="database-name-tree">database</span>
|
||||||
</h2>
|
</h2>
|
||||||
<button hx-get="/v1/web/connections/tree" hx-trigger="click" hx-swap="none" class="hover:bg-gray-100 p-2 rounded-md" hx-indicator="#table-loading">
|
<button hx-get="/v1/web/connections/tree" hx-trigger="click" hx-swap="none"
|
||||||
|
class="hover:bg-gray-100 p-2 rounded-md" hx-indicator="#table-loading">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="ionicon h-4 w-4" viewBox="0 0 512 512">
|
<svg xmlns="http://www.w3.org/2000/svg" class="ionicon h-4 w-4" viewBox="0 0 512 512">
|
||||||
<path
|
<path
|
||||||
d="M400 148l-21.12-24.57A191.43 191.43 0 00240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 00181.07-128"
|
d="M400 148l-21.12-24.57A191.43 191.43 0 00240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 00181.07-128"
|
||||||
@ -51,7 +56,8 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-4 max-h-full" hx-get="/v1/web/connections/tree/table" hx-trigger="load" hx-params="none" hx-indicator="#table-loading" hx-target="#database-table-tree">
|
<div class="p-4 max-h-full" hx-get="/v1/web/connections/tree/table" hx-trigger="load" hx-params="none"
|
||||||
|
hx-indicator="#table-loading" hx-target="#database-table-tree">
|
||||||
<div class="w-full flex items-center justify-between border-b pb-4 pt-2">
|
<div class="w-full flex items-center justify-between border-b pb-4 pt-2">
|
||||||
<h2 class="text-lg text-gray-700">Tables</h2>
|
<h2 class="text-lg text-gray-700">Tables</h2>
|
||||||
<p id="table-loading" class="text-xs font-light htmx-indicator">Loading...</p>
|
<p id="table-loading" class="text-xs font-light htmx-indicator">Loading...</p>
|
||||||
@ -59,7 +65,8 @@
|
|||||||
<ul hx-swap-oob="outerHTML" id="database-table-tree" class="space-y-2"></ul>
|
<ul hx-swap-oob="outerHTML" id="database-table-tree" class="space-y-2"></ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="p-4 max-h-full" hx-get="/v1/web/connections/tree/enum" hx-trigger="load" hx-params="none" hx-indicator="#enum-loading" hx-target="#database-enum-tree">
|
<div class="p-4 max-h-full" hx-get="/v1/web/connections/tree/enum" hx-trigger="load" hx-params="none"
|
||||||
|
hx-indicator="#enum-loading" hx-target="#database-enum-tree">
|
||||||
<div class="w-full flex items-center justify-between border-b pb-4 pt-2">
|
<div class="w-full flex items-center justify-between border-b pb-4 pt-2">
|
||||||
<h2 class="text-lg text-gray-700">Enums</h2>
|
<h2 class="text-lg text-gray-700">Enums</h2>
|
||||||
<p id="enum-loading" class="text-xs font-light htmx-indicator">Loading...</p>
|
<p id="enum-loading" class="text-xs font-light htmx-indicator">Loading...</p>
|
||||||
@ -76,13 +83,17 @@
|
|||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<label for="sql" class="block text-sm font-medium text-gray-700">SQL Query </label>
|
<label for="sql" class="block text-sm font-medium text-gray-700">SQL Query </label>
|
||||||
<div class="flex items-center space-x-6">
|
<div class="flex items-center space-x-6">
|
||||||
<form class="flex items-center space-x-2" hx-get="/v1/web/query/auto" hx-swap="outerHTML" hx-target="#query-main" hx-trigger="input">
|
<form class="flex items-center space-x-2" hx-get="/v1/web/query/auto" hx-swap="outerHTML"
|
||||||
|
hx-target="#query-main" hx-trigger="input">
|
||||||
<label for="auto-toggle" class="text-sm font-medium text-gray-700">Auto-Run</label>
|
<label for="auto-toggle" class="text-sm font-medium text-gray-700">Auto-Run</label>
|
||||||
<input type="checkbox" name="toggle" class="toggle-checkbox" title="Toggle auto-query functionality. Note: This will send whatever query is in the input and clear the box.">
|
<input type="checkbox" name="toggle" class="toggle-checkbox"
|
||||||
|
title="Toggle auto-query functionality. Note: This will send whatever query is in the input and clear the box.">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- Manual Query Button -->
|
<!-- Manual Query Button -->
|
||||||
<button hx-post="/v1/api/query" hx-trigger="click" hx-swap="outerHTML" hx-target="#query-results" hx-indicator="#spinner" hx-include="#sql" class="bg-blue-500 text-white py-2 px-3 rounded-md text-xs md:text-sm">Run Query</button>
|
<button hx-post="/v1/api/query" hx-trigger="click" hx-swap="outerHTML" hx-target="#query-results"
|
||||||
|
hx-indicator="#spinner" hx-include="#sql"
|
||||||
|
class="bg-blue-500 text-white py-2 px-3 rounded-md text-xs md:text-sm">Run Query</button>
|
||||||
|
|
||||||
<!-- Auto Query Button -->
|
<!-- Auto Query Button -->
|
||||||
<!-- <button class="bg-blue-500 text-white py-2 px-3 rounded-md text-xs md:text-sm opacity-60 cursor-default" title="Disable Auto-Run to use manual queries." disabled>Run Query</button> -->
|
<!-- <button class="bg-blue-500 text-white py-2 px-3 rounded-md text-xs md:text-sm opacity-60 cursor-default" title="Disable Auto-Run to use manual queries." disabled>Run Query</button> -->
|
||||||
@ -90,7 +101,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Manual Query Input -->
|
<!-- Manual Query Input -->
|
||||||
<textarea id="sql" name="sql" rows="4" class="mt-1 block w-full p-2 border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm"></textarea>
|
<textarea id="sql" name="sql" rows="4"
|
||||||
|
class="mt-1 block w-full p-2 border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm"></textarea>
|
||||||
|
|
||||||
<!-- Auto Query Input -->
|
<!-- Auto Query Input -->
|
||||||
<!-- <textarea id="sql" name="sql" rows="4" class="mt-1 block w-full p-2 border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm" hx-post="/v1/api/query" hx-trigger="input delay:500ms" hx-swap="outerHTML" hx-target="#query-results" hx-indicator="#spinner"></textarea> -->
|
<!-- <textarea id="sql" name="sql" rows="4" class="mt-1 block w-full p-2 border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm" hx-post="/v1/api/query" hx-trigger="input delay:500ms" hx-swap="outerHTML" hx-target="#query-results" hx-indicator="#spinner"></textarea> -->
|
||||||
@ -193,7 +205,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="db-driver" class="block text-sm font-medium text-gray-700">Driver/Type of Database</label>
|
<label for="db-driver" class="block text-sm font-medium text-gray-700">Driver/Type of Database</label>
|
||||||
<select id="db-driver" name="db-driver" class="mt-1 block w-full p-2 border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
|
<select id="db-driver" name="db-driver"
|
||||||
|
class="mt-1 block w-full p-2 border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
|
||||||
<option value="postgres">PostgreSQL</option>
|
<option value="postgres">PostgreSQL</option>
|
||||||
<option value="mysql">MySQL</option>
|
<option value="mysql">MySQL</option>
|
||||||
<option value="sqlite3">SQLite</option>
|
<option value="sqlite3">SQLite</option>
|
||||||
@ -235,7 +248,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<input id="db-url" name="db-url" type="password"
|
<input id="db-url" name="db-url" type="password"
|
||||||
placeholder="postgresql://admin:password@127.0.0.1:5432/master_database"
|
placeholder="postgresql://admin:password@127.0.0.1:5432/master_database"
|
||||||
value="postgresql://azpect:Panther4487!!!!@127.0.0.1:5432/azpect?sslmode=disable"
|
value="postgresql://user:password@127.0.0.1:5432/database?sslmode=disable"
|
||||||
class="mt-1 block w-full p-2 border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
|
class="mt-1 block w-full p-2 border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
|
||||||
<span id="db-url-invalid" class="text-xs text-red-500 hidden">Connection URL is incomplete or
|
<span id="db-url-invalid" class="text-xs text-red-500 hidden">Connection URL is incomplete or
|
||||||
invalid.</span>
|
invalid.</span>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user