Add "Created at" column to database list table

This commit is contained in:
Luis Eduardo Jeréz Girón
2024-07-24 00:17:15 -06:00
parent d437c58933
commit ca68b8358a
2 changed files with 5 additions and 0 deletions
@@ -34,6 +34,7 @@ func indexPage() gomponents.Node {
html.Th(component.SpanText("Name")),
html.Th(component.SpanText("Version")),
html.Th(component.SpanText("Connection string")),
html.Th(component.SpanText("Created at")),
),
),
html.TBody(
@@ -9,6 +9,7 @@ import (
"github.com/eduardolat/pgbackweb/internal/service/databases"
"github.com/eduardolat/pgbackweb/internal/util/echoutil"
"github.com/eduardolat/pgbackweb/internal/util/paginateutil"
"github.com/eduardolat/pgbackweb/internal/util/timeutil"
"github.com/eduardolat/pgbackweb/internal/validate"
"github.com/eduardolat/pgbackweb/internal/view/web/component"
"github.com/eduardolat/pgbackweb/internal/view/web/htmx"
@@ -91,6 +92,9 @@ func listDatabases(
),
component.SpanText("****************"),
),
html.Td(component.SpanText(
database.CreatedAt.Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
)),
))
}