mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
update adjustments and ui (#384)
* 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
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
|
||||
// global vars
|
||||
var webPrio = 1;
|
||||
var showOptHelp = true;
|
||||
var showOptHelp;
|
||||
var currentVersion;
|
||||
var cleanCurrentVersion;
|
||||
var latestVersion;
|
||||
var cleanLatestVersion;
|
||||
var parsedServerInfoJSON = {};
|
||||
var serverInfo = {};
|
||||
var parsedUpdateJSON = {};
|
||||
var parsedConfSchemaJSON = {};
|
||||
var parsedConfJSON = {};
|
||||
var hyperionport = 19444;
|
||||
var serverSchema = {};
|
||||
var serverConfig = {};
|
||||
var schema;
|
||||
var jsonPort = 19444;
|
||||
var websocket = null;
|
||||
var hyperion = {};
|
||||
var wsTan = 1;
|
||||
@@ -71,7 +70,7 @@ function initWebSocket()
|
||||
if (websocket == null)
|
||||
{
|
||||
$.ajax({ url: "/cgi/cfg_jsonserver" }).done(function(data) {
|
||||
hyperionport = data.substr(1);
|
||||
jsonPort = data.substr(1);
|
||||
websocket = new WebSocket('ws://'+document.location.hostname+data);
|
||||
|
||||
websocket.onopen = function (event) {
|
||||
@@ -104,6 +103,8 @@ function initWebSocket()
|
||||
default: reason = "Unknown reason";
|
||||
}
|
||||
$(hyperion).trigger({type:"close", reason:reason});
|
||||
watchdog = 10;
|
||||
connectionLostDetection();
|
||||
};
|
||||
|
||||
websocket.onmessage = function (event) {
|
||||
@@ -243,15 +244,15 @@ function requestSetSource(prio)
|
||||
function requestWriteConfig(config, full)
|
||||
{
|
||||
if(full === true)
|
||||
parsedConfJSON = config;
|
||||
serverConfig = config;
|
||||
else
|
||||
{
|
||||
jQuery.each(config, function(i, val) {
|
||||
parsedConfJSON[i] = val;
|
||||
serverConfig[i] = val;
|
||||
});
|
||||
}
|
||||
|
||||
var config_str = escape(encode_utf8(JSON.stringify(parsedConfJSON)));
|
||||
var config_str = escape(encode_utf8(JSON.stringify(serverConfig)));
|
||||
|
||||
$.post( "/cgi/cfg_set", { cfg: config_str })
|
||||
.done(function( data ) {
|
||||
@@ -295,3 +296,10 @@ function requestMappingType(type)
|
||||
sendToHyperion("processing", "", '"mappingType": "'+type+'"');
|
||||
}
|
||||
|
||||
function requestAdjustment(type, value, complete)
|
||||
{
|
||||
if(complete === true)
|
||||
sendToHyperion("adjustment", "", '"adjustment": '+type+'');
|
||||
else
|
||||
sendToHyperion("adjustment", "", '"adjustment": {"'+type+'": '+value+'}');
|
||||
}
|
||||
|
Reference in New Issue
Block a user