mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
update adjustments and ui (#384)
* update
* update
* testit
* Revert "testit"
This reverts commit b1cc645161
.
* update schema
* update
* add adjustment to serverinfo
* remove Adjustbool
* remove v4l2only
* fix json check for create effect
* update deb
* update
* update remote adjust
* update
* add eff schemas
This commit is contained in:
@@ -4,86 +4,25 @@ $(document).ready( function() {
|
||||
loadContentTo("#container_connection_lost","connection_lost");
|
||||
loadContentTo("#container_restart","restart");
|
||||
initWebSocket();
|
||||
bindNavToContent("#load_dashboard","dashboard",true);
|
||||
bindNavToContent("#load_remote","remote",false);
|
||||
bindNavToContent("#load_huebridge","huebridge",false);
|
||||
bindNavToContent("#load_support","support",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);
|
||||
bindNavToContent("#load_confNetwork","network",false);
|
||||
bindNavToContent("#load_effectsconfig","effects_configurator",false);
|
||||
bindNavToContent("#load_logging","logging",false);
|
||||
bindNavToContent("#load_webconfig","webconfig",false);
|
||||
|
||||
$(hyperion).on("cmd-serverinfo",function(event){
|
||||
showOptHelp = parsedConfJSON.general.showOptHelp;
|
||||
parsedServerInfoJSON = event.response;
|
||||
currentVersion = parsedServerInfoJSON.info.hyperion[0].version;
|
||||
cleanCurrentVersion = currentVersion.replace(/\./g, '');
|
||||
serverInfo = event.response;
|
||||
currentVersion = serverInfo.info.hyperion[0].version;
|
||||
$(hyperion).trigger("ready");
|
||||
|
||||
if (parsedServerInfoJSON.info.hyperion[0].config_modified)
|
||||
if (serverInfo.info.hyperion[0].config_modified)
|
||||
$("#hyperion_reload_notify").fadeIn("fast");
|
||||
else
|
||||
$("#hyperion_reload_notify").fadeOut("fast");
|
||||
|
||||
// get active led device
|
||||
var leddevice = parsedServerInfoJSON.info.ledDevices.active;
|
||||
if ($("#content_dashboard").length > 0)
|
||||
{
|
||||
$('#dash_leddevice').html(leddevice);
|
||||
}
|
||||
|
||||
// get host
|
||||
var hostname = parsedServerInfoJSON.info.hostname;
|
||||
if ($("#content_dashboard").length > 0)
|
||||
{
|
||||
$('#dash_systeminfo').html(hostname+':'+hyperionport);
|
||||
}
|
||||
|
||||
|
||||
if ($("#content_dashboard").length > 0)
|
||||
{
|
||||
var components = parsedServerInfoJSON.info.components;
|
||||
components_html = "";
|
||||
for ( idx=0; idx<components.length;idx++)
|
||||
{
|
||||
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>';
|
||||
}
|
||||
$("#tab_components").html(components_html);
|
||||
|
||||
$.get( "https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/version.json", function( data ) {
|
||||
parsedUpdateJSON = JSON.parse(data);
|
||||
latestVersion = parsedUpdateJSON[0].versionnr;
|
||||
cleanLatestVersion = latestVersion.replace(/\./g, '');
|
||||
|
||||
$('#currentversion').html(' V'+currentVersion);
|
||||
$('#latestversion').html(' V'+latestVersion);
|
||||
|
||||
if ( cleanCurrentVersion < cleanLatestVersion )
|
||||
{
|
||||
$('#versioninforesult').html('<div style="margin:0px;" class="alert alert-warning">'+$.i18n('dashboard_infobox_message_updatewarning', latestVersion)+'</div>');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#versioninforesult').html('<div style="margin:0px;" class="alert alert-success">'+$.i18n('dashboard_infobox_message_updatesuccess')+'</div>');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if ($("#logmessages").length == 0 && loggingStreamActive)
|
||||
{
|
||||
requestLoggingStop();
|
||||
loggingStreamActive = false;
|
||||
}
|
||||
|
||||
|
||||
$("#loading_overlay").removeClass("overlay");
|
||||
|
||||
if (!parsedServerInfoJSON.info.hyperion[0].config_writeable)
|
||||
if (!serverInfo.info.hyperion[0].config_writeable)
|
||||
{
|
||||
showInfoDialog('uilock',$.i18n('InfoDialog_nowrite_title'),$.i18n('InfoDialog_nowrite_text'));
|
||||
$('#wrapper').toggle(false);
|
||||
@@ -99,13 +38,17 @@ $(document).ready( function() {
|
||||
}); // end cmd-serverinfo
|
||||
|
||||
$(hyperion).one("cmd-config-getschema", function(event) {
|
||||
parsedConfSchemaJSON = event.response.result;
|
||||
serverSchema = event.response.result;
|
||||
requestServerConfig();
|
||||
|
||||
schema = serverSchema.properties;
|
||||
});
|
||||
|
||||
$(hyperion).one("cmd-config-getconfig", function(event) {
|
||||
parsedConfJSON = event.response.result;
|
||||
serverConfig = event.response.result;
|
||||
requestServerInfo();
|
||||
|
||||
showOptHelp = serverConfig.general.showOptHelp;
|
||||
});
|
||||
|
||||
$(hyperion).on("error",function(event){
|
||||
@@ -115,10 +58,19 @@ $(document).ready( function() {
|
||||
$(hyperion).on("open",function(event){
|
||||
requestServerConfigSchema();
|
||||
});
|
||||
|
||||
|
||||
$(hyperion).one("ready", function(event) {
|
||||
loadContent();
|
||||
});
|
||||
|
||||
$("#btn_hyperion_reload").on("click", function(){
|
||||
initRestart();
|
||||
});
|
||||
|
||||
$(".mnava").on('click', function(e){
|
||||
loadContent(e);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(function(){
|
||||
|
Reference in New Issue
Block a user