Initial dashboard

This commit is contained in:
Magnus Åhall 2026-08-20 07:05:54 +02:00
parent 1c697a028b
commit 1af3f59b1a
10 changed files with 380 additions and 3 deletions

11
main.go
View file

@ -405,6 +405,17 @@ func pageIndex(w http.ResponseWriter, r *http.Request) { // {{{
PAGE: "index",
CONFIG: smonConfig.Settings,
}
data := make(map[string]any)
data["Dashboard"] = Dashboard{
Widgets: []Widget{
{Type: 0, X: 1, Y: 1, Attributes: map[string]string{"Label":"Services"}},
{Type: 1, X: 1, Y: 2, DatapointID: 13, Attributes: map[string]string{"Label":"Borg"}},
{Type: 1, X: 1, Y: 3, DatapointID: 13, Attributes: map[string]string{"Label":"Databasus"}},
},
}
page.Data = data
page.Render(w, r)
} // }}}