Details coming soon.

This commit is contained in:
Paulchen-Panther
2018-12-27 23:11:32 +01:00
parent e3be03ea73
commit d762aa2f3e
186 changed files with 6156 additions and 5444 deletions

View File

@@ -1,6 +1,5 @@
$(document).ready( function() {
var uiLock = false;
var prevSess = 0;
loadContentTo("#container_connection_lost","connection_lost");
loadContentTo("#container_restart","restart");
@@ -8,17 +7,28 @@ $(document).ready( function() {
$(hyperion).on("cmd-serverinfo",function(event){
serverInfo = event.response.info;
// protect components from serverinfo updates
if(!compsInited)
{
comps = event.response.info.components
compsInited = true;
}
if(!priosInited)
{
priosInited = true;
}
$(hyperion).trigger("ready");
if (serverInfo.hyperion.config_modified)
$("#hyperion_reload_notify").fadeIn("fast");
else
$("#hyperion_reload_notify").fadeOut("fast");
if (serverInfo.hyperion.off)
$("#hyperion_disabled_notify").fadeIn("fast");
else
if (serverInfo.hyperion.enabled)
$("#hyperion_disabled_notify").fadeOut("fast");
else
$("#hyperion_disabled_notify").fadeIn("fast");
if (!serverInfo.hyperion.config_writeable)
{
@@ -33,45 +43,32 @@ $(document).ready( function() {
uiLock = false;
}
var sess = serverInfo.hyperion.sessions;
if (sess.length != prevSess)
{
wSess = [];
prevSess = sess.length;
for(var i = 0; i<sess.length; i++)
{
if(sess[i].type == "_hyperiond-http._tcp.")
{
wSess.push(sess[i]);
}
}
if (wSess.length > 1)
$('#btn_instanceswitch').toggle(true);
else
$('#btn_instanceswitch').toggle(false);
}
updateSessions();
}); // end cmd-serverinfo
$(hyperion).on("cmd-sessions-update", function(event) {
serverInfo.sessions = event.response.data;
updateSessions();
});
$(hyperion).one("cmd-sysinfo", function(event) {
requestServerInfo();
sysInfo = event.response.info;
currentVersion = sysInfo.hyperion.version;
});
$(hyperion).one("cmd-config-getschema", function(event) {
serverSchema = event.response.result;
serverSchema = event.response.info;
requestServerConfig();
schema = serverSchema.properties;
});
$(hyperion).one("cmd-config-getconfig", function(event) {
serverConfig = event.response.result;
serverConfig = event.response.info;
requestSysInfo();
showOptHelp = serverConfig.general.showOptHelp;
});
@@ -82,15 +79,48 @@ $(document).ready( function() {
$(hyperion).on("open",function(event){
requestServerConfigSchema();
});
$(hyperion).one("ready", function(event) {
loadContent();
});
$(hyperion).on("cmd-adjustment-update", function(event) {
serverInfo.adjustment = event.response.data
});
$(hyperion).on("cmd-videomode-update", function(event) {
serverInfo.videomode = event.response.data.videomode
});
$(hyperion).on("cmd-components-update", function(event) {
let obj = event.response.data
// notfication in index
if (obj.name == "ALL")
{
if(obj.enable)
$("#hyperion_disabled_notify").fadeOut("fast");
else
$("#hyperion_disabled_notify").fadeIn("fast");
}
comps.forEach((entry, index) => {
if (entry.name === obj.name){
comps[index] = obj;
}
});
// notify the update
$(hyperion).trigger("components-updated");
});
$(hyperion).on("cmd-effects-update", function(event){
serverInfo.effects = event.response.data.effects
});
$("#btn_hyperion_reload").on("click", function(){
initRestart();
});
$(".mnava").bind('click.menu', function(e){
loadContent(e);
window.scrollTo(0, 0);
@@ -105,4 +135,3 @@ $(function(){
$(this).toggleClass('active inactive');
});
});