diff --git a/js/settings/SettingsWindow.js b/js/settings/SettingsWindow.js index 19b2ab9..2488b7a 100644 --- a/js/settings/SettingsWindow.js +++ b/js/settings/SettingsWindow.js @@ -34,7 +34,8 @@ function SettingsWindow() { var _networkPanel = new NetworkPanel(); var _networkAPI = new NetworkAPI(); - var _restoreStateField + var _restoreStateField; + var _initialLogLevel; var self = this; @@ -123,6 +124,7 @@ function SettingsWindow() { _form.loadAllSettings(function(loadedSettings){ console.log("Settings:loaded settings: ",loadedSettings); settings = loadedSettings; + _initialLogLevel = loadedSettings['system.log.level']; _form.fillForm(settings); $(document).trigger(SettingsWindow.SETTINGS_LOADED); if(complete) complete(); @@ -180,6 +182,23 @@ function SettingsWindow() { this.openFileManager = function() { location.href = "filemanager/"+location.search; } + + this.logLevelChanged = function(elem) { + var showHideAnimDuration = 100; + if (_initialLogLevel != elem.value) { + $('#logging-restart-warning').show(showHideAnimDuration); + } else { + $('#logging-restart-warning').hide(showHideAnimDuration); + } + + switch (elem.value) { + case "info": case "verbose": case "bulk": + $('#logging-verbose-warning').show(showHideAnimDuration); + break; + default: + $('#logging-verbose-warning').hide(showHideAnimDuration); + } + } } /************************* diff --git a/less/settingsPopup.less b/less/settingsPopup.less index da8fe2d..d7746ad 100644 --- a/less/settingsPopup.less +++ b/less/settingsPopup.less @@ -3,6 +3,16 @@ SETTINGS POPUP */ +.warn-box { + color: #bb0; + border: 1px solid #bb0; + width: 99%; + border-radius: 5px; + margin: 7px 0; + padding: 2px; + display: none; +} + #popupSettings { top: 0; left: 0; diff --git a/www/helpcontent.html b/www/helpcontent.html index e55fb40..445f414 100644 --- a/www/helpcontent.html +++ b/www/helpcontent.html @@ -22,7 +22,7 @@
  • View saved doodles

    -

    Use the buttons '<' and '>' to flip through all the saved doodles on your Wi-Fi box.

    +

    Use the buttons '<' and '>' to flip through all the saved doodles on your Wi-Fi box.

  • Oops

    diff --git a/www/settings.html b/www/settings.html index 1e84aba..15d64f3 100644 --- a/www/settings.html +++ b/www/settings.html @@ -179,11 +179,27 @@ - +
    Debug - + +
    +
    + Restart the wifibox for a new log level to take effect. +
    +
    + Be careful: when setting a log level higher than info, the Wifibox may quickly run out of memory, causing crashes and other unwanted behaviour. +
    +
    +