Renaming versionBranch and JSONEditor Enhancement

- versionBranch was renamed to watchedVersionBranch (including all variables and strings. even config)
- Enhancements for JSON Editor. Detection of advanced was not so good. Now you can see advaced if advanced or expert is selected. expert is the highest and should also make advanced visible.
- The levels default, advanced, expert are now also respected in the information tabs. Same logic as for the forms itself. Expert is highest and will also show all advanced settings.
This commit is contained in:
birdhouse 2019-07-13 00:06:58 +02:00
parent 73d487e6b9
commit 0f2d72fc0a
10 changed files with 26 additions and 17 deletions

View File

@ -38,8 +38,8 @@
<td id="dash_currv">unknown</td> <td id="dash_currv">unknown</td>
</tr> </tr>
<tr> <tr>
<td data-i18n="dashboard_infobox_label_versionbranch">Version Branch:</td> <td data-i18n="dashboard_infobox_label_watchedversionbranch">Watched version branch:</td>
<td id="dash_versionbranch">unknown</td> <td id="dash_watchedversionbranch">unknown</td>
</tr> </tr>
<tr> <tr>
<td data-i18n="dashboard_infobox_label_latesthyp">Latest version:</td> <td data-i18n="dashboard_infobox_label_latesthyp">Latest version:</td>

View File

@ -25,7 +25,7 @@ $(document).ready( function(error) {
for (var key in window.gitHubVersionList) for (var key in window.gitHubVersionList)
{ {
if(window.gitHubVersionList[key].name == null || (window.serverConfig.general.versionBranch == "Stable" && window.gitHubVersionList[key].prerelease == true)) if(window.gitHubVersionList[key].name == null || (window.serverConfig.general.watchedVersionBranch == "Stable" && window.gitHubVersionList[key].prerelease == true))
{ {
continue; continue;
} }

View File

@ -50,7 +50,7 @@
"dashboard_infobox_label_platform": "Plattform:", "dashboard_infobox_label_platform": "Plattform:",
"dashboard_infobox_label_instance": "Instanz:", "dashboard_infobox_label_instance": "Instanz:",
"dashboard_infobox_label_ports": "Ports (flat|proto):", "dashboard_infobox_label_ports": "Ports (flat|proto):",
"dashboard_infobox_label_versionbranch": "Versionszweig:", "dashboard_infobox_label_watchedversionbranch": "Ausgewählter Versionszweig:",
"dashboard_infobox_message_updatewarning": "Eine aktuellere Version von Hyperion ist verfügbar! (V$1)", "dashboard_infobox_message_updatewarning": "Eine aktuellere Version von Hyperion ist verfügbar! (V$1)",
"dashboard_infobox_message_updatesuccess": "Du nutzt die aktuellste Version von Hyperion.", "dashboard_infobox_message_updatesuccess": "Du nutzt die aktuellste Version von Hyperion.",
"dashboard_infobox_label_statush": "Hyperion Status:", "dashboard_infobox_label_statush": "Hyperion Status:",
@ -441,8 +441,8 @@
"edt_conf_gen_name_expl": "Der Name wird verwendet, um Hyperion besser zu identifizieren. (Hilfreich bei mehreren Instanzen)", "edt_conf_gen_name_expl": "Der Name wird verwendet, um Hyperion besser zu identifizieren. (Hilfreich bei mehreren Instanzen)",
"edt_conf_gen_showOptHelp_title": "Zeige Erklärungen", "edt_conf_gen_showOptHelp_title": "Zeige Erklärungen",
"edt_conf_gen_showOptHelp_expl": "Zeige alle verfügbaren Options-Erklärungen. Empfohlen für Anfänger", "edt_conf_gen_showOptHelp_expl": "Zeige alle verfügbaren Options-Erklärungen. Empfohlen für Anfänger",
"edt_conf_gen_versionBranch_title": "Versionszweig", "edt_conf_gen_watchedVersionBranch_title": "Ausgewählter Versionszweig",
"edt_conf_gen_versionBranch_expl": "Gibt an, welcher Versionszweig für die Suche von neuen Hyperion Versionen genutzt werden soll.", "edt_conf_gen_watchedVersionBranch_expl": "Gibt an, welcher Versionszweig für die Suche von neuen Hyperion Versionen genutzt werden soll.",
"edt_conf_color_heading_title": "Farbkalibrierung", "edt_conf_color_heading_title": "Farbkalibrierung",
"edt_conf_color_channelAdjustment_header_itemtitle": "Profil", "edt_conf_color_channelAdjustment_header_itemtitle": "Profil",
"edt_conf_color_channelAdjustment_header_title": "Anpassung Farbkanäle", "edt_conf_color_channelAdjustment_header_title": "Anpassung Farbkanäle",

View File

@ -50,7 +50,7 @@
"dashboard_infobox_label_platform" : "Platform:", "dashboard_infobox_label_platform" : "Platform:",
"dashboard_infobox_label_instance" : "Instance:", "dashboard_infobox_label_instance" : "Instance:",
"dashboard_infobox_label_ports" : "Ports (flat|proto):", "dashboard_infobox_label_ports" : "Ports (flat|proto):",
"dashboard_infobox_label_versionbranch" : "Version Branch:", "dashboard_infobox_label_watchedversionbranch" : "Watched version branch:",
"dashboard_infobox_message_updatewarning" : "A newer version of Hyperion is available! ($1)", "dashboard_infobox_message_updatewarning" : "A newer version of Hyperion is available! ($1)",
"dashboard_infobox_message_updatesuccess" : "You run the latest version of Hyperion.", "dashboard_infobox_message_updatesuccess" : "You run the latest version of Hyperion.",
"dashboard_infobox_label_statush" : "Hyperion status:", "dashboard_infobox_label_statush" : "Hyperion status:",
@ -441,8 +441,8 @@
"edt_conf_gen_name_expl" : "A user defined name which is used to detect Hyperion. (Helpful with more than one Hyperion instance)", "edt_conf_gen_name_expl" : "A user defined name which is used to detect Hyperion. (Helpful with more than one Hyperion instance)",
"edt_conf_gen_showOptHelp_title" : "Show explanations", "edt_conf_gen_showOptHelp_title" : "Show explanations",
"edt_conf_gen_showOptHelp_expl" : "Show all available explanations in each section. Highly recommended for beginners!", "edt_conf_gen_showOptHelp_expl" : "Show all available explanations in each section. Highly recommended for beginners!",
"edt_conf_gen_versionBranch_title" : "Version Branch", "edt_conf_gen_watchedVersionBranch_title" : "Watched version branch",
"edt_conf_gen_versionBranch_expl" : "Selects which version branch should be used for searching new Hyperion versions.", "edt_conf_gen_watchedVersionBranch_expl" : "Selects which version branch should be used for searching new Hyperion versions.",
"edt_conf_color_heading_title" : "Color Calibration", "edt_conf_color_heading_title" : "Color Calibration",
"edt_conf_color_channelAdjustment_header_itemtitle" : "Profile", "edt_conf_color_channelAdjustment_header_itemtitle" : "Profile",
"edt_conf_color_channelAdjustment_header_title" : "Color channel adjustments", "edt_conf_color_channelAdjustment_header_title" : "Color channel adjustments",

View File

@ -78,7 +78,7 @@ $(document).ready( function() {
$('#dash_currv').html(window.currentChannel+' '+window.currentVersion); $('#dash_currv').html(window.currentChannel+' '+window.currentVersion);
$('#dash_instance').html(window.serverConfig.general.name); $('#dash_instance').html(window.serverConfig.general.name);
$('#dash_ports').html(window.serverConfig.flatbufServer.port+' | '+window.serverConfig.protoServer.port); $('#dash_ports').html(window.serverConfig.flatbufServer.port+' | '+window.serverConfig.protoServer.port);
$('#dash_versionbranch').html(window.serverConfig.general.versionBranch); $('#dash_watchedversionbranch').html(window.serverConfig.general.watchedVersionBranch);
getReleases(function(callback){ getReleases(function(callback){
if(callback) if(callback)

View File

@ -1541,7 +1541,12 @@ JSONEditor.AbstractEditor = Class.extend({
if(this.schema.access){ if(this.schema.access){
if(this.schema.access == 'system') if(this.schema.access == 'system')
this.container.style.display = "none"; this.container.style.display = "none";
else if(this.schema.access == 'expert' && storedAccess != 'expert'){ else if(this.schema.access == 'advanced' && storedAccess == 'default')
{
this.container.style.display = "none";
}
else if(this.schema.access == 'expert' && storedAccess != 'expert')
{
this.container.style.display = "none"; this.container.style.display = "none";
//this.disable(); //this.disable();
} }

View File

@ -593,6 +593,8 @@ function createHelpTable(list, phead){
// break one iteration (in the loop), if the schema has the entry hidden=true // break one iteration (in the loop), if the schema has the entry hidden=true
if ("options" in list[key] && "hidden" in list[key].options && (list[key].options.hidden)) if ("options" in list[key] && "hidden" in list[key].options && (list[key].options.hidden))
continue; continue;
if ("access" in list[key] && ((list[key].access == "advanced" && storedAccess == "default") || (list[key].access == "expert" && storedAccess != "expert")))
continue;
var text = list[key].title.replace('title', 'expl'); var text = list[key].title.replace('title', 'expl');
tbody.appendChild(createTableRow([$.i18n(list[key].title), $.i18n(text)], false, false)); tbody.appendChild(createTableRow([$.i18n(list[key].title), $.i18n(text)], false, false));
@ -604,6 +606,8 @@ function createHelpTable(list, phead){
// break one iteration (in the loop), if the schema has the entry hidden=true // break one iteration (in the loop), if the schema has the entry hidden=true
if ("options" in ilist[ikey] && "hidden" in ilist[ikey].options && (ilist[ikey].options.hidden)) if ("options" in ilist[ikey] && "hidden" in ilist[ikey].options && (ilist[ikey].options.hidden))
continue; continue;
if ("access" in ilist[ikey] && ((ilist[ikey].access == "advanced" && storedAccess == "default") || (ilist[ikey].access == "expert" && storedAccess != "expert")))
continue;
var itext = ilist[ikey].title.replace('title', 'expl'); var itext = ilist[ikey].title.replace('title', 'expl');
tbody.appendChild(createTableRow([$.i18n(ilist[ikey].title), $.i18n(itext)], false, false)); tbody.appendChild(createTableRow([$.i18n(ilist[ikey].title), $.i18n(itext)], false, false));
} }
@ -743,7 +747,7 @@ function getReleases(callback)
{ {
window.latestStableVersion = latest; window.latestStableVersion = latest;
if(window.serverConfig.general.versionBranch == "Beta" && window.latestStableVersion.tag_name.replace(/\./g, '') <= window.latestBetaVersion.tag_name.replace(/\./g, '')) if(window.serverConfig.general.watchedVersionBranch == "Beta" && window.latestStableVersion.tag_name.replace(/\./g, '') <= window.latestBetaVersion.tag_name.replace(/\./g, ''))
{ {
window.latestVersion = window.latestBetaVersion; window.latestVersion = window.latestBetaVersion;
} }

View File

@ -11,7 +11,7 @@
"general" : "general" :
{ {
"name" : "MyHyperionConfig", "name" : "MyHyperionConfig",
"versionBranch" : "Stable", "watchedVersionBranch" : "Stable",
"showOptHelp" : true "showOptHelp" : true
}, },
/// set log level: silent warn verbose debug /// set log level: silent warn verbose debug

View File

@ -2,7 +2,7 @@
"general" : "general" :
{ {
"name" : "My Hyperion Config", "name" : "My Hyperion Config",
"versionBranch" : "Stable", "watchedVersionBranch" : "Stable",
"showOptHelp" : true "showOptHelp" : true
}, },
"logger" : "logger" :

View File

@ -14,10 +14,10 @@
"required" : true, "required" : true,
"propertyOrder" : 1 "propertyOrder" : 1
}, },
"versionBranch" : "watchedVersionBranch" :
{ {
"type" : "string", "type" : "string",
"title" : "edt_conf_gen_versionBranch_title", "title" : "edt_conf_gen_watchedVersionBranch_title",
"enum" : ["Stable", "Beta"], "enum" : ["Stable", "Beta"],
"required" : true, "required" : true,
"access" : "expert", "access" : "expert",