|
@ -1,7 +1,6 @@ |
|
|
var websock; |
|
|
var websock; |
|
|
var password = false; |
|
|
var password = false; |
|
|
var maxNetworks; |
|
|
var maxNetworks; |
|
|
var useWhite = false; |
|
|
|
|
|
var messages = []; |
|
|
var messages = []; |
|
|
var webhost; |
|
|
var webhost; |
|
|
|
|
|
|
|
@ -10,6 +9,8 @@ var numReset = 0; |
|
|
var numReconnect = 0; |
|
|
var numReconnect = 0; |
|
|
var numReload = 0; |
|
|
var numReload = 0; |
|
|
|
|
|
|
|
|
|
|
|
var useWhite = false; |
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
// -----------------------------------------------------------------------------
|
|
|
// Messages
|
|
|
// Messages
|
|
|
// -----------------------------------------------------------------------------
|
|
|
// -----------------------------------------------------------------------------
|
|
@ -280,12 +281,6 @@ function doReconnect(ask) { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function doToggle(element, value) { |
|
|
|
|
|
var relayID = parseInt(element.attr("data")); |
|
|
|
|
|
websock.send(JSON.stringify({'action': 'relay', 'data': { 'id': relayID, 'status': value ? 1 : 0 }})); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function doBackup() { |
|
|
function doBackup() { |
|
|
document.getElementById('downloader').src = webhost + 'config'; |
|
|
document.getElementById('downloader').src = webhost + 'config'; |
|
|
return false; |
|
|
return false; |
|
@ -325,6 +320,12 @@ function doRestore() { |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function doToggle(element, value) { |
|
|
|
|
|
var relayID = parseInt(element.attr("data")); |
|
|
|
|
|
websock.send(JSON.stringify({'action': 'relay', 'data': { 'id': relayID, 'status': value ? 1 : 0 }})); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
// -----------------------------------------------------------------------------
|
|
|
// Visualization
|
|
|
// Visualization
|
|
|
// -----------------------------------------------------------------------------
|
|
|
// -----------------------------------------------------------------------------
|
|
@ -609,10 +610,10 @@ function rfbSend() { |
|
|
function processData(data) { |
|
|
function processData(data) { |
|
|
|
|
|
|
|
|
// title
|
|
|
// title
|
|
|
if ("app" in data) { |
|
|
|
|
|
var title = data.app; |
|
|
|
|
|
if ("version" in data) { |
|
|
|
|
|
title = title + " " + data.version; |
|
|
|
|
|
|
|
|
if ("app_name" in data) { |
|
|
|
|
|
var title = data.app_name; |
|
|
|
|
|
if ("app_version" in data) { |
|
|
|
|
|
title = title + " " + data.app_version; |
|
|
} |
|
|
} |
|
|
$(".pure-menu-heading").html(title); |
|
|
$(".pure-menu-heading").html(title); |
|
|
if ("hostname" in data) { |
|
|
if ("hostname" in data) { |
|
|