Skip to content

Commit

Permalink
Renaming versionBranch and JSONEditor Enhancement
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
janpfischer committed Jul 12, 2019
1 parent 73d487e commit 0f2d72f
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 17 deletions.
4 changes: 2 additions & 2 deletions assets/webconfig/content/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ <h3 class="page-header"><i class="fa fa-dashboard fa-fw"></i><span data-i18n="m
<td id="dash_currv">unknown</td>
</tr>
<tr>
<td data-i18n="dashboard_infobox_label_versionbranch">Version Branch:</td>
<td id="dash_versionbranch">unknown</td>
<td data-i18n="dashboard_infobox_label_watchedversionbranch">Watched version branch:</td>
<td id="dash_watchedversionbranch">unknown</td>
</tr>
<tr>
<td data-i18n="dashboard_infobox_label_latesthyp">Latest version:</td>
Expand Down
2 changes: 1 addition & 1 deletion assets/webconfig/content/update.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h4 id="update_currver"></h4>
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;
}
Expand Down
6 changes: 3 additions & 3 deletions assets/webconfig/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"dashboard_infobox_label_platform": "Plattform:",
"dashboard_infobox_label_instance": "Instanz:",
"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_updatesuccess": "Du nutzt die aktuellste Version von Hyperion.",
"dashboard_infobox_label_statush": "Hyperion Status:",
Expand Down Expand Up @@ -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_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_versionBranch_title": "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_title": "Ausgewählter Versionszweig",
"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_channelAdjustment_header_itemtitle": "Profil",
"edt_conf_color_channelAdjustment_header_title": "Anpassung Farbkanäle",
Expand Down
6 changes: 3 additions & 3 deletions assets/webconfig/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"dashboard_infobox_label_platform" : "Platform:",
"dashboard_infobox_label_instance" : "Instance:",
"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_updatesuccess" : "You run the latest version of Hyperion.",
"dashboard_infobox_label_statush" : "Hyperion status:",
Expand Down Expand Up @@ -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_showOptHelp_title" : "Show explanations",
"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_versionBranch_expl" : "Selects which version branch should be used for searching new Hyperion versions.",
"edt_conf_gen_watchedVersionBranch_title" : "Watched version branch",
"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_channelAdjustment_header_itemtitle" : "Profile",
"edt_conf_color_channelAdjustment_header_title" : "Color channel adjustments",
Expand Down
2 changes: 1 addition & 1 deletion assets/webconfig/js/content_dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ $(document).ready( function() {
$('#dash_currv').html(window.currentChannel+' '+window.currentVersion);
$('#dash_instance').html(window.serverConfig.general.name);
$('#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){
if(callback)
Expand Down
9 changes: 7 additions & 2 deletions assets/webconfig/js/lib/jsoneditor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion assets/webconfig/js/ui_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,8 @@ function createHelpTable(list, phead){
// 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))
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');
tbody.appendChild(createTableRow([$.i18n(list[key].title), $.i18n(text)], false, false));

Expand All @@ -604,6 +606,8 @@ function createHelpTable(list, phead){
// 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))
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');
tbody.appendChild(createTableRow([$.i18n(ilist[ikey].title), $.i18n(itext)], false, false));
}
Expand Down Expand Up @@ -743,7 +747,7 @@ function getReleases(callback)
{
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;
}
Expand Down
2 changes: 1 addition & 1 deletion config/hyperion.config.json.commented
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"general" :
{
"name" : "MyHyperionConfig",
"versionBranch" : "Stable",
"watchedVersionBranch" : "Stable",
"showOptHelp" : true
},
/// set log level: silent warn verbose debug
Expand Down
2 changes: 1 addition & 1 deletion config/hyperion.config.json.default
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"general" :
{
"name" : "My Hyperion Config",
"versionBranch" : "Stable",
"watchedVersionBranch" : "Stable",
"showOptHelp" : true
},
"logger" :
Expand Down
4 changes: 2 additions & 2 deletions libsrc/hyperion/schema/schema-general.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"required" : true,
"propertyOrder" : 1
},
"versionBranch" :
"watchedVersionBranch" :
{
"type" : "string",
"title" : "edt_conf_gen_versionBranch_title",
"title" : "edt_conf_gen_watchedVersionBranch_title",
"enum" : ["Stable", "Beta"],
"required" : true,
"access" : "expert",
Expand Down

0 comments on commit 0f2d72f

Please sign in to comment.