mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
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:
@@ -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);
|
||||
|
@@ -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 );
|
||||
|
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user