summaryrefslogtreecommitdiff
path: root/pkg/webui/states.go
diff options
context:
space:
mode:
authorJulien Dessaux2025-01-26 00:04:38 +0100
committerJulien Dessaux2025-01-26 00:04:38 +0100
commit4e029fb83a1e70495330eaac94981a97de24682e (patch)
treefb041970dcbf38daf06de5034cf6fd567c586069 /pkg/webui/states.go
parentfeat(webui): implement states list (diff)
downloadtfstated-4e029fb83a1e70495330eaac94981a97de24682e.tar.gz
tfstated-4e029fb83a1e70495330eaac94981a97de24682e.tar.bz2
tfstated-4e029fb83a1e70495330eaac94981a97de24682e.zip
feat(webui): bootstrap a proper UI
Diffstat (limited to 'pkg/webui/states.go')
-rw-r--r--pkg/webui/states.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/webui/states.go b/pkg/webui/states.go
index 3633cb8..9e3ce27 100644
--- a/pkg/webui/states.go
+++ b/pkg/webui/states.go
@@ -12,6 +12,7 @@ var statesTemplates = template.Must(template.ParseFS(htmlFS, "html/base.html", "
func handleStatesGET(db *database.DB) http.Handler {
type StatesData struct {
+ Page
States []model.State
}
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
@@ -23,6 +24,7 @@ func handleStatesGET(db *database.DB) http.Handler {
return
}
render(w, statesTemplates, http.StatusOK, StatesData{
+ Page: Page{Title: "States", Section: "states"},
States: states,
})
})