Webui: view led configuration + lights (#223)

* make hyperion websocket api event based

* implement new websocket handling for generalconf

* migrate all webui stuff to new event based websocket api
some cleanup ... now all html templates are in content
refactoring of web stuff

* add hyperionport to global
start impl. removing advanced key

* separate dashboard
serverinfo is updated every 3 seconds automatily
add input selection
cleanup and remove not needed stuff

* prepare infrastructure for server sided file execution

* webui minor fixes

* fix compile

* implement led layout view with live colors

* live led vies

* fix general conf
unrigister ledcolors request, when not on leds.html

* fix compiler warning

* prepare realtime ledview and enhance ui
This commit is contained in:
redPanther
2016-09-05 17:26:29 +02:00
committed by GitHub
parent b99e75d7e4
commit bbffa078fd
14 changed files with 292 additions and 52 deletions

View File

@@ -17,7 +17,8 @@
<script>
function removeAdvanced(obj)
/*
function removeAdvanced(obj,searchStack)
{
searchStack = [];
$.each(obj, function(key, val) {
@@ -35,33 +36,33 @@
});
return false;
}
*/
$(hyperion).on("cmd-config-getschema", function(event) {
parsedConfSchemaJSON = event.response.result;
// remove all "advanced" options from schema
//removeAdvanced(parsedConfSchemaJSON); // not working atm
//removeAdvanced(parsedConfSchemaJSON, []); // not working atm
//console.log(JSON.stringify(parsedConfSchemaJSON));
schema_smoothing = parsedConfSchemaJSON.properties.smoothing;
schema_kodiVideoChecker = parsedConfSchemaJSON.properties.kodiVideoChecker;
schema_initialEffect = parsedConfSchemaJSON.properties.initialEffect;
//schema_grabber-v4l2 = parsedConfSchemaJSON.properties.grabber-v4l2;
schema_framegrabber = parsedConfSchemaJSON.properties.framegrabber;
schema_forwarder = parsedConfSchemaJSON.properties.forwarder;
schema_effects = parsedConfSchemaJSON.properties.effects;
schema_device = parsedConfSchemaJSON.properties.device;
schema_color = parsedConfSchemaJSON.properties.color;
schema_blackborderdetector = parsedConfSchemaJSON.properties.blackborderdetector;
schema_logger = parsedConfSchemaJSON.properties.logger;
schema_jsonServer = parsedConfSchemaJSON.properties.jsonServer;
schema_protoServer = parsedConfSchemaJSON.properties.protoServer;
schema_boblightServer = parsedConfSchemaJSON.properties.boblightServer;
schema_udpListener = parsedConfSchemaJSON.properties.udpListener;
schema_webConfig = parsedConfSchemaJSON.properties.webConfig;
schema = parsedConfSchemaJSON.properties;
schema_blackborderdetector = schema.blackborderdetector;
schema_color = schema.color,
schema_device = schema.device,
schema_effects = schema.effects,
schema_forwarder = schema.forwarder,
schema_framegrabber = schema.framegrabber,
//schema_grabber-v4l2 = schema.grabber-v4l2,
schema_initialEffect = schema.initialEffect,
schema_kodiVideoChecker = schema.kodiVideoChecker,
schema_smoothing = schema.smoothing,
schema_logger = schema.logger,
schema_jsonServer = schema.jsonServer,
schema_protoServer = schema.protoServer,
schema_boblightServer = schema.boblightServer,
schema_udpListener = schema.udpListener,
schema_webConfig = schema.webConfig
var element = document.getElementById('editor_holder');
//JSONEditor.defaults.options.theme = 'bootstrap3';
var general_conf_editor = new JSONEditor(element,{
theme: 'bootstrap3',
disable_collapse: 'true',
@@ -98,7 +99,7 @@
document.getElementById('submit').addEventListener('click',function() {
// Get the value from the editor
console.log(general_conf_editor.getValue());
//console.log(general_conf_editor.getValue());
});
// $("[type='checkbox']").bootstrapSwitch();
});