mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
* 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
84 lines
1.9 KiB
JavaScript
84 lines
1.9 KiB
JavaScript
$(document).ready( function() {
|
|
var uiLock = false;
|
|
|
|
loadContentTo("#container_connection_lost","connection_lost");
|
|
loadContentTo("#container_restart","restart");
|
|
initWebSocket();
|
|
|
|
$(hyperion).on("cmd-serverinfo",function(event){
|
|
serverInfo = event.response;
|
|
currentVersion = serverInfo.info.hyperion[0].version;
|
|
$(hyperion).trigger("ready");
|
|
|
|
if (serverInfo.info.hyperion[0].config_modified)
|
|
$("#hyperion_reload_notify").fadeIn("fast");
|
|
else
|
|
$("#hyperion_reload_notify").fadeOut("fast");
|
|
|
|
|
|
if ($("#logmessages").length == 0 && loggingStreamActive)
|
|
{
|
|
requestLoggingStop();
|
|
loggingStreamActive = false;
|
|
}
|
|
|
|
if (!serverInfo.info.hyperion[0].config_writeable)
|
|
{
|
|
showInfoDialog('uilock',$.i18n('InfoDialog_nowrite_title'),$.i18n('InfoDialog_nowrite_text'));
|
|
$('#wrapper').toggle(false);
|
|
uiLock = true;
|
|
}
|
|
else if (uiLock)
|
|
{
|
|
$("#modal_dialog").modal('hide');
|
|
$('#wrapper').toggle(true);
|
|
uiLock = false;
|
|
}
|
|
|
|
}); // end cmd-serverinfo
|
|
|
|
$(hyperion).one("cmd-config-getschema", function(event) {
|
|
serverSchema = event.response.result;
|
|
requestServerConfig();
|
|
|
|
schema = serverSchema.properties;
|
|
});
|
|
|
|
$(hyperion).one("cmd-config-getconfig", function(event) {
|
|
serverConfig = event.response.result;
|
|
requestServerInfo();
|
|
|
|
showOptHelp = serverConfig.general.showOptHelp;
|
|
});
|
|
|
|
$(hyperion).on("error",function(event){
|
|
showInfoDialog("error","Error", event.reason);
|
|
});
|
|
|
|
$(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(){
|
|
var sidebar = $('#side-menu'); // cache sidebar to a variable for performance
|
|
sidebar.delegate('a.inactive','click',function(){
|
|
sidebar.find('.active').toggleClass('active inactive');
|
|
$(this).toggleClass('active inactive');
|
|
});
|
|
});
|
|
|