move 'name' to new config section general. (#345)

* move name to general
add a version for config file

* start impl. config migrator

* fix typo amd set access level

* fix schemaa name

* fix schema

* add structure for config migrator
This commit is contained in:
redPanther
2016-12-23 19:37:35 +01:00
committed by GitHub
parent be90981388
commit 0825937a3e
21 changed files with 1822 additions and 1261 deletions

View File

@@ -0,0 +1,15 @@
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h2 class="page-header"><i class="fa fa-play-wrench-o fa-fw"></i><span data-i18n="conf_general_label_title">General</span></h2>
<div class="introd">
<h4 data-i18n="conf_general_label_intro"></h4>
</div>
<hr />
<div id='editor_container'/>
<button class="btn btn-success" id='btn_submit' data-i18n="general_button_savesettings">Save Settings</button>
</div>
</div>
</div>
<script src="/js/content_general.js"></script>

View File

@@ -47,6 +47,7 @@
"dashboard_alert_message_confedit" : "Deine Hyperion Konfiguration wurde verändert. Um die Änderungen anzuwenden, starte Hyperion neu.",
"main_menu_dashboard_token" : "Dashboard",
"main_menu_configuration_token" : "Konfiguration",
"main_menu_general_conf_token" : "Allgemein",
"main_menu_leds_conf_token" : "LED Hardware",
"main_menu_grabber_conf_token" : "Aufnahme Hardware",
"main_menu_effect_conf_token" : "Effekte",
@@ -60,7 +61,9 @@
"main_menu_system_token" : "System",
"main_menu_input_selection_token" : "Eingabeauswahl",
"main_menu_logging_token" : "Protokoll",
"main_menu_webconfig_token" : "Webkonfiguration",
"main_menu_webconfig_token" : "Web konfiguration",
"conf_general_label_title" : "All Einstellungen",
"conf_general_label_intro" : " ",
"conf_helptable_option" : "Option",
"conf_helptable_expl" : "Erklärung",
"conf_effects_label_intro" : "Stelle einen Effekt oder Farbe ein, der beim Starten sichtbar sein soll. Stelle einen Hintergrundeffekt/Farbe ein der erst sichtbar wird, wenn alle Bildquellen abgeschaltet sind (Das gilt ebenfalls für temporäres abschalten mithilfe der Kodi Überwachung).",
@@ -206,11 +209,12 @@
"InfoDialog_lang_text" : "Sollte dir die Vorauswahl der automatischen Spracherkennung nicht gefallen, kannst du die Sprache hier manuell festlegen.",
"InfoDialog_access_title" : "Zugriffsstufe",
"InfoDialog_access_text" : "Abhängig von der Stufe hast du Zugriff auf mehr oder weniger Einstellungen. Empfohlen ist 'Standard'.",
"edt_general_heading_title" : "Allgemeine Einstellungen",
"edt_general_name_title" : "Name der Konfiguration",
"InfoDialog_nowrite_title" : "Fehler beim Schreibzugriff!",
"InfoDialog_nowrite_text" : "Hyperion hat keinen Schreibzugriff auf die aktuell geladene Konfiguration. Bitte korrigiere die Dateizugriffsrechte um fortzufahren.",
"InfoDialog_nowrite_foottext" : "Die Webkonfiguration wird automatisch wieder freigegeben, sobald das Problem behoben wurde!",
"edt_dev_general_heading_title" : "Allgemeine Einstellungen",
"edt_dev_general_name_title" : "Name der Konfiguration",
"edt_dev_general_ledCount_title" : "Anzahl Hardware LEDs",
"edt_dev_general_colorOrder_title" : "RGB Byte Reihenfolge",
"edt_dev_general_rewriteTime_title" : "Aktualisierungszeit",

View File

@@ -47,6 +47,7 @@
"dashboard_alert_message_confedit" : "Your Hyperion configuration has been modified. To apply it, restart Hyperion.",
"main_menu_dashboard_token" : "Dashboard",
"main_menu_configuration_token" : "Configuration",
"main_menu_general_conf_token" : "General",
"main_menu_leds_conf_token" : "LED Hardware",
"main_menu_grabber_conf_token" : "Capturing Hardware",
"main_menu_effect_conf_token" : "Effects",
@@ -58,9 +59,11 @@
"main_menu_support_token" : "Support",
"main_menu_update_token" : "Update",
"main_menu_system_token" : "System",
"main_menu_input_selection_token" : "Eingabeauswahl",
"main_menu_input_selection_token" : "Input Selection",
"main_menu_logging_token" : "Log",
"main_menu_webconfig_token" : "Webconfiguration",
"main_menu_webconfig_token" : "Web configuration",
"conf_general_label_title" : "General setings",
"conf_general_label_intro" : " ",
"conf_helptable_option" : "Option",
"conf_helptable_expl" : "Explanation",
"conf_effects_label_intro" : "Setting up a booteffect/color that is visible after Hyperion startup. Configure a background effect/color which is active, when all capture sources are disabled (also temporarily via Kodi Watch)",
@@ -206,6 +209,8 @@
"InfoDialog_lang_text" : "If you don't like the result of the automatic language detection you could overwrite it here.",
"InfoDialog_access_title" : "Level setting",
"InfoDialog_access_text" : "Depending on settings level you could change more or less settings. Recommended is the default level.",
"edt_general_heading_title" : "General Settings",
"edt_general_name_title" : "Configuration name",
"InfoDialog_nowrite_title" : "write permission error!",
"InfoDialog_nowrite_text" : "Hyperion can't write to your current loaded configuration file. Please repair the file permissions to proceed.",
"InfoDialog_nowrite_foottext" : "The WebUI will be unlocked automatically after you solved the problem!",

View File

@@ -185,6 +185,7 @@
<li>
<a class="inactive"><i class="fa fa-cog fa-fw"></i><span data-i18n="main_menu_configuration_token">Configuration</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li> <a class="inactive" id="load_confGeneral"><i class="fa fa-wrench fa-fw"></i><span data-i18n="main_menu_general_conf_token">General</span></a> </li>
<li> <a class="inactive" id="load_confLeds"><i class="fa fa-lightbulb-o fa-fw"></i><span data-i18n="main_menu_leds_conf_token">LED Hardware</span></a> </li>
<li> <a class="inactive" id="load_confGrabber"><i class="fa fa-camera fa-fw"></i><span data-i18n="main_menu_grabber_conf_token">Capturing Hardware</span></a> </li>
<li> <a class="inactive" id="load_confEffects"><i class="fa fa-spinner fa-fw"></i><span data-i18n="main_menu_effect_conf_token">Effects</span></a> </li>

View File

@@ -0,0 +1,21 @@
var conf_editor = null;
$(hyperion).one("cmd-config-getschema", function(event) {
schema = parsedConfSchemaJSON.properties;
conf_editor = createJsonEditor('editor_container', {
general: schema.general
}, true);
$('#editor_container h3').remove();
$('#btn_submit').off().on('click',function() {
requestWriteConfig(conf_editor.getValue());
});
});
$(document).ready( function() {
performTranslation();
requestServerConfigSchema();
});

View File

@@ -9,9 +9,10 @@ $(document).ready( function() {
bindNavToContent("#load_remote","remote",false);
bindNavToContent("#load_huebridge","huebridge",false);
bindNavToContent("#load_support","support",false);
bindNavToContent("#load_confKodi","kodiconf",false);
bindNavToContent("#load_update","update",false);
bindNavToContent("#load_confGeneral","general",false);
bindNavToContent("#load_confEffects","effects",false);
bindNavToContent("#load_confKodi","kodiconf",false);
bindNavToContent("#load_confLeds","leds",false);
bindNavToContent("#load_confGrabber","grabber",false);
bindNavToContent("#load_confColors","colors",false);