Merge pull request #50 from jonesrussell/rej_shownavigation
bugfix: Rename "HideNavigation" to "ShowNavigation"
This commit is contained in:
commit
bb96072682
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
listenAddressSingleHTTPFrontend: 0.0.0.0:1337
|
||||
|
||||
hideNavigation: true
|
||||
showNavigation: false
|
||||
checkForUpdates: false
|
||||
|
||||
# Actions (buttons) to show up on the WebUI:
|
||||
|
|
|
|||
|
|
@ -60,8 +60,6 @@ type UserGroup struct {
|
|||
type Config struct {
|
||||
UseSingleHTTPFrontend bool
|
||||
ThemeName string
|
||||
HideNavigation bool
|
||||
ShowFooter bool
|
||||
ListenAddressSingleHTTPFrontend string
|
||||
ListenAddressWebUI string
|
||||
ListenAddressRestActions string
|
||||
|
|
@ -71,6 +69,8 @@ type Config struct {
|
|||
Actions []Action `mapstructure:"actions"`
|
||||
Entities []Entity `mapstructure:"entities"`
|
||||
CheckForUpdates bool
|
||||
ShowFooter bool
|
||||
ShowNavigation bool
|
||||
ShowNewVersions bool
|
||||
Usergroups []UserGroup
|
||||
DefaultPermissions DefaultPermissions
|
||||
|
|
@ -80,15 +80,15 @@ type Config struct {
|
|||
func DefaultConfig() *Config {
|
||||
config := Config{}
|
||||
config.UseSingleHTTPFrontend = true
|
||||
config.HideNavigation = false
|
||||
config.ShowFooter = true
|
||||
config.ShowNavigation = true
|
||||
config.ShowNewVersions = true
|
||||
config.ListenAddressSingleHTTPFrontend = "0.0.0.0:1337"
|
||||
config.ListenAddressRestActions = "localhost:1338"
|
||||
config.ListenAddressGrpcActions = "localhost:1339"
|
||||
config.ListenAddressWebUI = "localhost:1340"
|
||||
config.LogLevel = "INFO"
|
||||
config.CheckForUpdates = true
|
||||
config.ShowNewVersions = true
|
||||
config.DefaultPermissions.Exec = true
|
||||
config.DefaultPermissions.View = true
|
||||
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@ import (
|
|||
type webUISettings struct {
|
||||
Rest string
|
||||
ThemeName string
|
||||
HideNavigation bool
|
||||
ShowFooter bool
|
||||
ShowNavigation bool
|
||||
ShowNewVersions bool
|
||||
AvailableVersion string
|
||||
CurrentVersion string
|
||||
ShowNewVersions bool
|
||||
}
|
||||
|
||||
func findWebuiDir() string {
|
||||
|
|
@ -53,11 +53,12 @@ func generateWebUISettings(w http.ResponseWriter, r *http.Request) {
|
|||
jsonRet, _ := json.Marshal(webUISettings{
|
||||
Rest: restAddress + "/api/",
|
||||
ThemeName: cfg.ThemeName,
|
||||
HideNavigation: cfg.HideNavigation,
|
||||
ShowFooter: cfg.ShowFooter,
|
||||
ShowNavigation: cfg.ShowNavigation,
|
||||
ShowNewVersions: cfg.ShowNewVersions,
|
||||
AvailableVersion: updatecheck.AvailableVersion,
|
||||
CurrentVersion: updatecheck.CurrentVersion,
|
||||
ShowNewVersions: cfg.ShowNewVersions,
|
||||
|
||||
})
|
||||
|
||||
_, err := w.Write([]byte(jsonRet))
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ function processWebuiSettingsJson (settings) {
|
|||
document.querySelector('#available-version').hidden = false
|
||||
}
|
||||
|
||||
document.querySelector('#section-switcher').hidden = settings.HideNavigation
|
||||
document.querySelector('#section-switcher').hidden = !settings.ShowNavigation
|
||||
document.querySelector('footer[title="footer"]').hidden = !settings.ShowFooter
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue