Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Postgres and MySQL databases support #335

Merged
merged 12 commits into from
Sep 20, 2024
Prev Previous commit
Next Next commit
Update admin config dump
  • Loading branch information
thomiceli committed Sep 16, 2024
commit 3626262f5f0de15b66df2961cdc82bee32598a91
3 changes: 3 additions & 0 deletions internal/web/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ func adminConfig(ctx echo.Context) error {
setData(ctx, "htmlTitle", trH(ctx, "admin.configuration")+" - "+trH(ctx, "admin.admin_panel"))
setData(ctx, "adminHeaderPage", "config")

setData(ctx, "dbtype", db.DatabaseInfo.Type.String())
setData(ctx, "dbname", db.DatabaseInfo.Database)

return html(ctx, "admin_config.html")
}

Expand Down
4 changes: 2 additions & 2 deletions templates/pages/admin_config.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<dt>Log output</dt><dd>{{ .c.LogOutput }}</dd>
<dt>External URL</dt><dd>{{ .c.ExternalUrl }}</dd>
<dt>Opengist home</dt><dd>{{ .c.OpengistHome }}</dd>
<dt>DB filename</dt><dd>{{ .c.DBFilename }}</dd>
<dt>DB type</dt><dd>{{ .dbtype }}{{ if eq .dbtype "SQLite" }} ({{ .c.SqliteJournalMode }}){{ end }}</dd>
<dt>DB name</dt><dd>{{ .dbname }}</dd>
<dt>Index Enabled</dt><dd>{{ .c.IndexEnabled }}</dd>
<dt>Index Dirname</dt><dd>{{ .c.IndexDirname }}</dd>
<dt>Git default branch</dt><dd>{{ .c.GitDefaultBranch }}</dd>
<dt>SQLite Journal Mode</dt><dd>{{ .c.SqliteJournalMode }}</dd>
<div class="relative col-span-3 mt-4">
<div class="absolute inset-0 flex items-center" aria-hidden="true">
<div class="w-full border-t border-gray-300"></div>
Expand Down