embedded webui + config modification detection (#240)

* implement embedded webui

* add detection for changed config, later on used for restart hyperion
This commit is contained in:
redPanther
2016-09-14 13:51:28 +02:00
committed by GitHub
parent ccc50899fb
commit 1cc2f72fa2
16 changed files with 103 additions and 30 deletions

View File

@@ -20,6 +20,12 @@ $(document).ready( function() {
parsedServerInfoJSON = event.response;
currentVersion = parsedServerInfoJSON.info.hyperion[0].version;
cleanCurrentVersion = currentVersion.replace(/\./g, '');
if (parsedServerInfoJSON.info.hyperion[0].config_modified)
$("#hyperion_restart_notify").fadeIn("fast");
else
$("#hyperion_restart_notify").fadeOut("fast");
// get active led device
var leddevice = parsedServerInfoJSON.info.ledDevices.active;
$('#dash_leddevice').html(leddevice);

View File

@@ -149,7 +149,7 @@ $(document).ready(function() {
isCurrentDevice = (server.info.ledDevices.active == $(this).val());
for(var key in parsedConfJSON.device){
if (key in generalOptions.properties)
if (key != "type" && key in generalOptions.properties)
values_general[key] = parsedConfJSON.device[key];
};
grabber_conf_editor.getEditor("root.generalOptions").setValue( values_general );

View File

@@ -1,13 +1,13 @@
function bindNavToContent(containerId, fileName, loadNow)
{
$("#page-wrapper").off();
$("#page-content").off();
$(containerId).on("click", function() {
$("#page-wrapper").load("/content/"+fileName+".html");
$("#page-content").load("/content/"+fileName+".html");
});
if (loadNow)
{
$("#page-wrapper").load("/content/"+fileName+".html");
$("#page-content").load("/content/"+fileName+".html");
}
}