Merge remote-tracking branch 'upstream/master' into fadecandy

This commit is contained in:
Paulchen-Panther 2019-07-02 19:42:42 +02:00
commit fb850bb40b
No known key found for this signature in database
GPG Key ID: 84E3B692456B6840
15 changed files with 212 additions and 103 deletions

View File

@ -30,7 +30,7 @@
lang = lang.toString().replace(/,/g,", ");
var fc = ['<span id="danger_trig">'+$.i18n("about_version")+'<span>',$.i18n("about_build"),$.i18n("about_builddate"),$.i18n("about_translations"),$.i18n("about_resources", $.i18n("general_webui_title"))];
var sc = [currentVersion,si.build,si.time,'('+availLang.length+')<p>'+lang+'</p><p><a href="https://hyperion-project.org/contribute/?pk_campaign=WebUI&pk_kwd=about_contribute" target="_blank">'+$.i18n("about_contribute")+'</a></p>',libh];
var sc = [currentVersion,si.build,si.time,'('+availLang.length+')<p>'+lang+'</p><p><a href="https://github.com/hyperion-project/hyperion.ng" target="_blank">'+$.i18n("about_contribute")+'</a></p>',libh];
createTable("","atb","about_cont");
for(var i = 0; i<fc.length; i++)

View File

@ -7,6 +7,7 @@
<hr />
<div id="log_content"><span style="font-weight:bold;font-size:17px" data-i18n="conf_logging_nomessage"></span></div>
<hr>
<div style="display:none">
<h4 style="font-weight:bold"><i class="fa fa-reorder fa-fw"></i><span data-i18n="conf_logging_report">Bericht</span></h4>
<button class="btn btn-primary" id="btn_logupload"><i class="fa fa-upload fa-fw"></i><span data-i18n="conf_logging_btn_pbupload"></span></button>
<div id="log_upl_pol"></div>
@ -14,6 +15,7 @@
<div id="prev_reports"></div>
</div>
</div>
</div>
</div>
<script src="/js/content_logging.js"></script>

View File

@ -37,6 +37,10 @@
<td data-i18n="dashboard_infobox_label_currenthyp">Hyperion version:</td>
<td id="dash_currv">unknown</td>
</tr>
<tr>
<td data-i18n="dashboard_infobox_label_versionbranch">Version Branch:</td>
<td id="dash_versionbranch">unknown</td>
</tr>
<tr>
<td data-i18n="dashboard_infobox_label_latesthyp">Latest version:</td>
<td id="dash_latev">unknown</td>
@ -71,7 +75,7 @@
</div>
</div>
</div>
<div class="col-md-12 col-xxl-5">
<div class="col-md-12 col-xxl-5" style="display:none">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-newspaper-o fa-fw"></i>

View File

@ -3,6 +3,7 @@
<div class="col-xs-12">
<h3 class="page-header"><i class="fa fa-info fa-fw"></i><span data-i18n="support_label_title">Support Hyperion</span></h3>
<div id="supp_intro"></div>
<div style="display:none">
<h4 style="font-weight: bold" data-i18n="support_label_spreadtheword">Spread the word</h4>
<a href="https://www.facebook.com/Hyperion-1415088231896140/" target="_blank" class="unlink">
<div class="col-xs-12 col-sm-6 col-lg-3 support-container">
@ -40,7 +41,8 @@
</div>
</a>
</div>
<div class="col-xs-12">
</div>
<div class="col-xs-12" style="display:none">
<hr>
<h4 style="font-weight: bold" data-i18n="support_label_donate">Donate or use our affiliate links</h4>
<ol>
@ -125,4 +127,5 @@
<script type="text/javascript">
performTranslation();
createHintH("intro", $.i18n('support_label_intro'), "supp_intro");
removeOverlay();
</script>

View File

@ -4,6 +4,7 @@
<h3 class="page-header"><i class="fa fa-download fa-fw"></i><span data-i18n="main_menu_update_token">Update</span></h3>
<div class="introd">
<h4 data-i18n="update_label_intro">Overview about all available Hyperion versions. On top you could update or downgrade your version of Hyperion whenever you want. Sorted from newest to oldest</h4>
<h4> At the moment the install buttons are not working. Development is still ongoing here. </h4>
<hr />
</div>
<h4 id="update_currver"></h4>
@ -15,12 +16,29 @@
</div>
<script>
// performTranslation('trans_update');
performTranslation();
$(document).ready( function(error) {
performTranslation();
getReleases(function (callback){
for (key in parsedUpdateJSON)
if(callback)
{
$('#versionlist').append('<div class="col-lg-6"><div class="panel panel-default"><div class="panel-heading"><i class="fa fa-television fa-fw"></i>Hyperion V'+parsedUpdateJSON[key].versionnr+'</div><div class="panel-body"><p><span style="font-weight:bold;">'+$.i18n('update_label_type')+'</span> '+ parsedUpdateJSON[key].channel +'</p><p><span style="font-weight:bold;">'+$.i18n('update_label_description')+'</span> '+parsedUpdateJSON[key].versiondesc+'</p><hr><a class="btn btn-primary" href="'+ parsedUpdateJSON[key].versionchangelog +'" target="_blank"><i class="fa fa-list fa-fw"></i><span style="font-weight:bold;">'+$.i18n('update_button_changelog')+'</span></a><button type="button" class="btn btn-warning pull-right"><i class="fa fa-download fa-fw"></i>'+$.i18n('update_button_install')+'</button></div></div></div>');
for (var key in window.gitHubVersionList)
{
if(window.gitHubVersionList[key].name == null || (window.serverConfig.general.versionBranch == "Stable" && window.gitHubVersionList[key].prerelease == true))
{
continue;
}
$('#versionlist').append('<div class="col-lg-6"><div class="panel panel-'+ (window.gitHubVersionList[key].prerelease == true ? "danger" : "default") +'"><div class="panel-heading"><i class="fa fa-television fa-fw"></i>Hyperion V'+window.gitHubVersionList[key].tag_name+'</div><div class="panel-body"><p><span style="font-weight:bold;">'+$.i18n('update_label_type') + '</span> ' + (window.gitHubVersionList[key].prerelease == true ? "Beta" : "Stable") + '</p><p><span style="font-weight:bold;">'+$.i18n('update_label_description')+'</span> '+window.gitHubVersionList[key].body+'</p><hr><a class="btn btn-primary" href="'+ window.gitHubVersionList[key].html_url +'" target="_blank"><i class="fa fa-list fa-fw"></i><span style="font-weight:bold;">'+$.i18n('update_button_changelog')+'</span></a><button type="button" class="btn btn-warning pull-right" ' + (window.gitHubVersionList[key].tag_name == window.currentVersion ? "disabled":"") + '><i class="fa fa-download fa-fw"></i>'+$.i18n('update_button_install')+'</button></div></div></div>');
}
$('#update_currver').append($.i18n('update_versreminder', currentVersion));
}
else
{
$('#versionlist').append($.i18n('update_error_getting_versions'));
}
});
removeOverlay();
});
</script>

View File

@ -50,6 +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_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:",
@ -255,12 +256,13 @@
"update_button_changelog" : "Zeige Änderungsprotokoll",
"update_label_type" : "Art:",
"update_versreminder" : "Deine Version: $1",
"update_error_getting_versions" : "Wir hatten Probleme die verfügbaren Versionen zu ermitteln.",
"about_version" : "Version",
"about_build" : "Build",
"about_builddate" : "Build Datum",
"about_translations" : "Übersetzungen",
"about_resources" : "$1 Bibliotheken",
"about_contribute" : "Übersetze Hyperion in weitere Sprachen!",
"about_contribute" : "Entwickel Hyperion mit uns weiter!",
"about_credits" : "Einen Dank an alle Entwickler!",
"info_conlost_label_title" : "Verbindung zum Hyperion Service unterbrochen!",
"info_conlost_label_reason" : "Mögliche Ursachen:",
@ -438,6 +440,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_color_heading_title" : "Farbkalibrierung",
"edt_conf_color_channelAdjustment_header_title" : "Anpassung Farbkanäle",
"edt_conf_color_channelAdjustment_header_itemtitle" : "Profil",

View File

@ -50,6 +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_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:",
@ -255,12 +256,13 @@
"update_button_changelog" : "Full changelog",
"update_label_type" : "Type:",
"update_versreminder" : "Your version: $1",
"update_error_getting_versions" : "We had trouble to determinate the available Versions.",
"about_version" : "Version",
"about_build" : "Build",
"about_builddate" : "Build date",
"about_translations" : "Translations",
"about_resources" : "$1 libraries",
"about_contribute" : "Add more languages to Hyperion!",
"about_contribute" : "Develop Hyperion further with us!",
"about_credits" : "Credits to all these developers!",
"info_conlost_label_title" : "Lost connection to Hyperion service!",
"info_conlost_label_reason" : "Possible reasons:",
@ -439,6 +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_color_heading_title" : "Color Calibration",
"edt_conf_color_channelAdjustment_header_itemtitle" : "Profile",
"edt_conf_color_channelAdjustment_header_title" : "Color channel adjustments",

View File

@ -179,11 +179,8 @@
<ul class="nav nav-second-level">
<li> <a class="inactive mnava" href="#conf_webconfig" id="load_webconfig"><i class="fa fa-wrench fa-fw"></i><span data-i18n="main_menu_webconfig_token">Webconfiguration</span></a> </li>
<li> <a class="inactive mnava" href="#conf_logging"><i class="fa fa-reorder fa-fw"></i><span data-i18n="main_menu_logging_token">Log</span></a> </li>
<!-- Update is disabled
<li> <a class="inactive mnava" href="#update"><i class="fa fa-download fa-fw"></i><span data-i18n="main_menu_update_token">Update</span></a> </li>
-->
<li> <a class="inactive mnava" href="#about"><i class="fa fa-info-circle fa-fw"></i><span data-i18n="main_menu_about_token">Update</span></a> </li>
<li> <a class="inactive mnava" href="#about"><i class="fa fa-info-circle fa-fw"></i><span data-i18n="main_menu_about_token">About</span></a> </li>
</ul>
</li>
</ul>

View File

@ -52,7 +52,7 @@ $(document).ready( function() {
{
var components = window.comps;
var components_html = "";
for ( var idx=0; idx<components.length;idx++)
for (var idx=0; idx<components.length;idx++)
{
if(components[idx].name != "ALL")
components_html += '<tr><td>'+$.i18n('general_comp_'+components[idx].name)+'</td><td><i class="fa fa-circle component-'+(components[idx].enabled?"on":"off")+'"></i></td></tr>';
@ -78,22 +78,26 @@ $(document).ready( function() {
$('#dash_currv').html(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);
$.get( "https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/version.json", function( data ) {
window.parsedUpdateJSON = JSON.parse(data);
window.latestVersion = window.parsedUpdateJSON[0].versionnr;
// var cleanLatestVersion = window.latestVersion.replace(/\./g, '');
// var cleanCurrentVersion = window.currentVersion.replace(/\./g, '');
getReleases(function(callback){
if(callback)
{
var cleanLatestVersion = window.latestVersion.tag_name.replace(/\./g, '');
var cleanCurrentVersion = window.currentVersion.replace(/\./g, '');
$('#dash_latev').html(window.currentVersion);
// $('#dash_latev').html(window.latestVersion);
$('#dash_latev').html(window.latestVersion.tag_name + ' (' + (window.latestVersion.prerelease == true ? "Beta" : "Stable") + ')');
// if ( cleanCurrentVersion < cleanLatestVersion )
// $('#versioninforesult').html('<div class="bs-callout bs-callout-warning" style="margin:0px">'+$.i18n('dashboard_infobox_message_updatewarning', window.latestVersion)+'</div>');
// else
if ( cleanCurrentVersion < cleanLatestVersion )
$('#versioninforesult').html('<div class="bs-callout bs-callout-warning" style="margin:0px">'+$.i18n('dashboard_infobox_message_updatewarning', window.latestVersion.tag_name) + ' (' + (window.latestVersion.prerelease == true ? "Beta" : "Stable") + ')</div>');
else
$('#versioninforesult').html('<div class="bs-callout bs-callout-success" style="margin:0px">'+$.i18n('dashboard_infobox_message_updatesuccess')+'</div>');
}
});
//determine platform
var grabbers = window.serverInfo.grabbers.available;
var html = "";

View File

@ -2,10 +2,13 @@
window.webPrio = 1;
window.webOrigin = "Web Configuration";
window.showOptHelp = true;
window.gitHubReleaseApiUrl = "https://api.github.com/repos/hyperion-project/hyperion.ng/releases";
window.currentVersion = null;
window.latestVersion = null;
window.latestStableVersion = null;
window.latestBetaVersion = null;
window.gitHubVersionList = null;
window.serverInfo = {};
window.parsedUpdateJSON = {};
window.serverSchema = {};
window.serverConfig = {};
window.schema = {};

View File

@ -124,9 +124,15 @@ $(document).ready( function() {
for (var i = 0; i<window.wSess.length; i++)
{
if(lsys != window.wSess[i].host+':'+window.wSess[i].port)
$('#id_select').append(createSelOpt('http://'+window.wSess[i].address+':'+window.wSess[i].port, window.wSess[i].name))
var hyperionAddress
if (window.wSess[i].address.indexOf(':') > -1 && window.wSess[i].address.length == 36)
hyperionAddress = 'http://['+window.wSess[i].address+']:'+window.wSess[i].port
else
hyperionAddress = 'http://'+window.wSess[i].address+':'+window.wSess[i].port
$('#id_select').append(createSelOpt(hyperionAddress, window.wSess[i].host))
}
$('#id_btn_saveset').off().on('click',function() {

View File

@ -709,3 +709,51 @@ function encode_utf8(s)
{
return unescape(encodeURIComponent(s));
}
function getReleases(callback)
{
$.ajax({
url: window.gitHubReleaseApiUrl,
method: 'get',
error: function(XMLHttpRequest, textStatus, errorThrown)
{
callback(false);
},
success: function(releases)
{
window.gitHubVersionList = releases;
for(var i in releases)
{
if(releases[i].prerelease == true)
{
window.latestBetaVersion = releases[i];
break;
}
}
$.ajax({
url: window.gitHubReleaseApiUrl + "/latest",
method: 'get',
error: function(XMLHttpRequest, textStatus, errorThrown)
{
callback(false);
},
success: function(latest)
{
window.latestStableVersion = latest;
if(window.serverConfig.general.versionBranch == "Beta" && window.latestStableVersion.tag_name.replace(/\./g, '') <= window.latestBetaVersion.tag_name.replace(/\./g, ''))
{
window.latestVersion = window.latestBetaVersion;
}
else
{
window.latestVersion = window.latestStableVersion;
}
callback(true);
}
});
}
})
}

View File

@ -6,10 +6,12 @@
{
/// general Settings
/// * 'name' : The user friendly name of the hyperion instance (used for network things)
/// * 'versionBranch' : Which branch should be used for hyperion version
/// * 'showOptHelp' : Show option expanations at the webui. Highly recommended for beginners.
"general" :
{
"name" : "MyHyperionConfig",
"versionBranch" : "Stable",
"showOptHelp" : true
},
/// set log level: silent warn verbose debug

View File

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

View File

@ -14,13 +14,26 @@
"required" : true,
"propertyOrder" : 1
},
"versionBranch" :
{
"type" : "string",
"title" : "edt_conf_gen_versionBranch_title",
"enum" : ["Stable", "Beta"],
"required" : true,
"access" : "expert",
"default" : "Stable",
"options" : {
"enum_titles" : ["Stable", "Beta"]
},
"propertyOrder" : 2
},
"showOptHelp" :
{
"type" : "boolean",
"title" : "edt_conf_gen_showOptHelp_title",
"default" : true,
"required" : true,
"propertyOrder" : 2
"propertyOrder" : 3
}
},
"additionalProperties" : false