feature: Dashboards, at long last (#224)

* feature: Dashboards, at long last

* fmt: action button IDs now use hypens. Removed ;
This commit is contained in:
James Read
2024-02-07 08:54:22 +00:00
committed by GitHub
parent 1b13a2bc4b
commit 6892a679ee
11 changed files with 452 additions and 88 deletions
+18 -16
View File
@@ -12,14 +12,15 @@ import (
)
type webUISettings struct {
Rest string
ThemeName string
ShowFooter bool
ShowNavigation bool
ShowNewVersions bool
AvailableVersion string
CurrentVersion string
PageTitle string
Rest string
ThemeName string
ShowFooter bool
ShowNavigation bool
ShowNewVersions bool
AvailableVersion string
CurrentVersion string
PageTitle string
SectionNavigationStyle string
}
func findWebuiDir() string {
@@ -49,14 +50,15 @@ func findWebuiDir() string {
func generateWebUISettings(w http.ResponseWriter, r *http.Request) {
jsonRet, _ := json.Marshal(webUISettings{
Rest: cfg.ExternalRestAddress + "/api/",
ThemeName: cfg.ThemeName,
ShowFooter: cfg.ShowFooter,
ShowNavigation: cfg.ShowNavigation,
ShowNewVersions: cfg.ShowNewVersions,
AvailableVersion: updatecheck.AvailableVersion,
CurrentVersion: updatecheck.CurrentVersion,
PageTitle: cfg.PageTitle,
Rest: cfg.ExternalRestAddress + "/api/",
ThemeName: cfg.ThemeName,
ShowFooter: cfg.ShowFooter,
ShowNavigation: cfg.ShowNavigation,
ShowNewVersions: cfg.ShowNewVersions,
AvailableVersion: updatecheck.AvailableVersion,
CurrentVersion: updatecheck.CurrentVersion,
PageTitle: cfg.PageTitle,
SectionNavigationStyle: cfg.SectionNavigationStyle,
})
_, err := w.Write([]byte(jsonRet))