Initial version
This commit is contained in:
parent
03d7250cf6
commit
4de2a12aab
|
|
@ -42,6 +42,7 @@ type UserGroup struct {
|
||||||
type Config struct {
|
type Config struct {
|
||||||
UseSingleHTTPFrontend bool
|
UseSingleHTTPFrontend bool
|
||||||
ThemeName string
|
ThemeName string
|
||||||
|
HideNavigation bool
|
||||||
ListenAddressSingleHTTPFrontend string
|
ListenAddressSingleHTTPFrontend string
|
||||||
ListenAddressWebUI string
|
ListenAddressWebUI string
|
||||||
ListenAddressRestActions string
|
ListenAddressRestActions string
|
||||||
|
|
@ -59,6 +60,7 @@ type Config struct {
|
||||||
func DefaultConfig() *Config {
|
func DefaultConfig() *Config {
|
||||||
config := Config{}
|
config := Config{}
|
||||||
config.UseSingleHTTPFrontend = true
|
config.UseSingleHTTPFrontend = true
|
||||||
|
config.HideNavigation = false
|
||||||
config.ListenAddressSingleHTTPFrontend = "0.0.0.0:1337"
|
config.ListenAddressSingleHTTPFrontend = "0.0.0.0:1337"
|
||||||
config.ListenAddressRestActions = "localhost:1338"
|
config.ListenAddressRestActions = "localhost:1338"
|
||||||
config.ListenAddressGrpcActions = "localhost:1339"
|
config.ListenAddressGrpcActions = "localhost:1339"
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import (
|
||||||
type webUISettings struct {
|
type webUISettings struct {
|
||||||
Rest string
|
Rest string
|
||||||
ThemeName string
|
ThemeName string
|
||||||
|
HideNavigation bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func findWebuiDir() string {
|
func findWebuiDir() string {
|
||||||
|
|
@ -44,6 +45,7 @@ func generateWebUISettings(w http.ResponseWriter, r *http.Request) {
|
||||||
jsonRet, _ := json.Marshal(webUISettings{
|
jsonRet, _ := json.Marshal(webUISettings{
|
||||||
Rest: restAddress + "/api/",
|
Rest: restAddress + "/api/",
|
||||||
ThemeName: cfg.ThemeName,
|
ThemeName: cfg.ThemeName,
|
||||||
|
HideNavigation: cfg.HideNavigation,
|
||||||
})
|
})
|
||||||
|
|
||||||
w.Write([]byte(jsonRet))
|
w.Write([]byte(jsonRet))
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,10 @@ function processWebuiSettingsJson (settings) {
|
||||||
|
|
||||||
document.head.appendChild(themeCss);
|
document.head.appendChild(themeCss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (settings.HideNavigation) {
|
||||||
|
document.querySelector('#switcher').display = 'none';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setupSections();
|
setupSections();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue