Added Device Group Summary Panel, other fixes.
This commit is contained in:
parent
c1d422af07
commit
1a92a47882
|
@ -732,7 +732,7 @@ function CreateMeshCentralServer(config, args) {
|
|||
if (obj.config.domains == null) { obj.config.domains = {}; }
|
||||
if (obj.config.domains[''] == null) { obj.config.domains[''] = {}; }
|
||||
if (obj.config.domains[''].dns != null) { console.log("ERROR: Default domain can't have a DNS name."); return; }
|
||||
var xdomains = {}; for (i in obj.config.domains) { if (obj.config.domains[i].title == null) { obj.config.domains[i].title = 'MeshCentral'; } if (obj.config.domains[i].title2 == null) { obj.config.domains[i].title2 = '2.0'; } xdomains[i.toLowerCase()] = obj.config.domains[i]; } obj.config.domains = xdomains;
|
||||
var xdomains = {}; for (i in obj.config.domains) { xdomains[i.toLowerCase()] = obj.config.domains[i]; } obj.config.domains = xdomains;
|
||||
var bannedDomains = ['public', 'private', 'images', 'scripts', 'styles', 'views']; // List of banned domains
|
||||
for (i in obj.config.domains) { for (var j in bannedDomains) { if (i == bannedDomains[j]) { console.log("ERROR: Domain '" + i + "' is not allowed domain name in config.json."); return; } } }
|
||||
for (i in obj.config.domains) {
|
||||
|
|
|
@ -38,8 +38,8 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
|||
//obj.debug = function (msg) { console.log(msg); }
|
||||
|
||||
obj.Start = function (nodeid) {
|
||||
var url2, url = window.location.protocol.replace("http", "ws") + "//" + window.location.host + window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/')) + "/meshrelay.ashx?browser=1&p=" + obj.protocol + "&nodeid=" + nodeid + "&id=" + obj.tunnelid;
|
||||
//if (serverPublicNamePort) { url2 = window.location.protocol.replace("http", "ws") + "//" + serverPublicNamePort + "/meshrelay.ashx?id=" + obj.tunnelid; } else { url2 = url; }
|
||||
var url2, url = window.location.protocol.replace('http', 'ws') + '//' + window.location.host + window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/')) + '/meshrelay.ashx?browser=1&p=' + obj.protocol + '&nodeid=' + nodeid + '&id=' + obj.tunnelid;
|
||||
//if (serverPublicNamePort) { url2 = window.location.protocol.replace('http', 'ws') + '//' + serverPublicNamePort + '/meshrelay.ashx?id=' + obj.tunnelid; } else { url2 = url; }
|
||||
if ((authCookie != null) && (authCookie != '')) { url += '&auth=' + authCookie; }
|
||||
obj.nodeid = nodeid;
|
||||
obj.connectstate = 0;
|
||||
|
@ -51,15 +51,15 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
|||
obj.socket.onclose = obj.xxOnSocketClosed;
|
||||
obj.xxStateChange(1);
|
||||
//obj.meshserver.send({ action: 'msg', type: 'tunnel', nodeid: obj.nodeid, value: url2 });
|
||||
var rurl = "*" + domainUrl + "meshrelay.ashx?p=" + obj.protocol + "&nodeid=" + nodeid + "&id=" + obj.tunnelid;
|
||||
var rurl = '*' + domainUrl + 'meshrelay.ashx?p=' + obj.protocol + '&nodeid=' + nodeid + '&id=' + obj.tunnelid;
|
||||
if ((rauthCookie != null) && (rauthCookie != '')) { rurl += ('&rauth=' + rauthCookie); }
|
||||
obj.meshserver.send({ action: 'msg', type: 'tunnel', nodeid: obj.nodeid, value: rurl, usage: obj.protocol });
|
||||
//obj.debug("Agent Redir Start: " + url);
|
||||
//obj.debug('Agent Redir Start: ' + url);
|
||||
}
|
||||
|
||||
obj.xxOnSocketConnected = function () {
|
||||
if (obj.debugmode == 1) { console.log('onSocketConnected'); }
|
||||
//obj.debug("Agent Redir Socket Connected");
|
||||
//obj.debug('Agent Redir Socket Connected');
|
||||
obj.xxStateChange(2);
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
|||
obj.webSwitchOk = true; // Other side is ready for switch over
|
||||
performWebRtcSwitch();
|
||||
} else if (controlMsg.type == 'webrtc1') {
|
||||
obj.sendCtrlMsg("{\"ctrlChannel\":\"102938\",\"type\":\"webrtc2\"}"); // Confirm we got end of data marker, indicates data will no longer be received on websocket.
|
||||
obj.sendCtrlMsg('{"ctrlChannel":"102938","type":"webrtc2"}'); // Confirm we got end of data marker, indicates data will no longer be received on websocket.
|
||||
} else if (controlMsg.type == 'webrtc2') {
|
||||
// TODO: Resume/Start sending data over WebRTC
|
||||
}
|
||||
|
@ -91,8 +91,8 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
|||
|
||||
function performWebRtcSwitch() {
|
||||
if ((obj.webSwitchOk == true) && (obj.webRtcActive == true)) {
|
||||
obj.sendCtrlMsg("{\"ctrlChannel\":\"102938\",\"type\":\"webrtc0\"}"); // Indicate to the meshagent that it can start traffic switchover
|
||||
obj.sendCtrlMsg("{\"ctrlChannel\":\"102938\",\"type\":\"webrtc1\"}"); // Indicate to the meshagent that data traffic will no longer be sent over websocket.
|
||||
obj.sendCtrlMsg('{"ctrlChannel":"102938","type":"webrtc0"}'); // Indicate to the meshagent that it can start traffic switchover
|
||||
obj.sendCtrlMsg('{"ctrlChannel":"102938","type":"webrtc1"}'); // Indicate to the meshagent that data traffic will no longer be sent over websocket.
|
||||
// TODO: Hold/Stop sending data over websocket
|
||||
if (obj.onStateChanged != null) { obj.onStateChanged(obj, obj.State); }
|
||||
}
|
||||
|
@ -112,8 +112,8 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
|||
var configuration = null; //{ "iceServers": [ { 'urls': 'stun:stun.services.mozilla.com' }, { 'urls': 'stun:stun.l.google.com:19302' } ] };
|
||||
if (typeof RTCPeerConnection !== 'undefined') { obj.webrtc = new RTCPeerConnection(configuration); }
|
||||
else if (typeof webkitRTCPeerConnection !== 'undefined') { obj.webrtc = new webkitRTCPeerConnection(configuration); }
|
||||
if (obj.webrtc != null) {
|
||||
obj.webchannel = obj.webrtc.createDataChannel("DataChannel", {}); // { ordered: false, maxRetransmits: 2 }
|
||||
if ((obj.webrtc != null) && (obj.webrtc.createDataChannel)) {
|
||||
obj.webchannel = obj.webrtc.createDataChannel('DataChannel', {}); // { ordered: false, maxRetransmits: 2 }
|
||||
obj.webchannel.onmessage = obj.xxOnMessage;
|
||||
//obj.webchannel.onmessage = function (e) { console.log('WebRTC data', e.data); obj.xxOnMessage(e); }
|
||||
obj.webchannel.onopen = function () { obj.webRtcActive = true; performWebRtcSwitch(); };
|
||||
|
@ -122,7 +122,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
|||
if (e.candidate == null) {
|
||||
try { obj.sendCtrlMsg(JSON.stringify(obj.webrtcoffer)); } catch (ex) { } // End of candidates, send the offer
|
||||
} else {
|
||||
obj.webrtcoffer.sdp += ("a=" + e.candidate.candidate + "\r\n"); // New candidate, add it to the SDP
|
||||
obj.webrtcoffer.sdp += ('a=' + e.candidate.candidate + '\r\n'); // New candidate, add it to the SDP
|
||||
}
|
||||
}
|
||||
obj.webrtc.oniceconnectionstatechange = function () {
|
||||
|
@ -161,7 +161,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
|||
f.readAsArrayBuffer(e.data);
|
||||
} else {
|
||||
// IE10, readAsBinaryString does not exist, use an alternative.
|
||||
var binary = "";
|
||||
var binary = '';
|
||||
var bytes = new Uint8Array(e.data);
|
||||
var length = bytes.byteLength;
|
||||
for (var i = 0; i < length; i++) { binary += String.fromCharCode(bytes[i]); }
|
||||
|
@ -185,7 +185,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
|||
fileReader.readAsArrayBuffer(e.data);
|
||||
} else {
|
||||
// IE10, readAsBinaryString does not exist, use an alternative.
|
||||
var binary = "", bytes = new Uint8Array(e.data), length = bytes.byteLength;
|
||||
var binary = '', bytes = new Uint8Array(e.data), length = bytes.byteLength;
|
||||
for (var i = 0; i < length; i++) { binary += String.fromCharCode(bytes[i]); }
|
||||
obj.xxOnSocketData(binary);
|
||||
}
|
||||
|
@ -210,12 +210,12 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
|||
if (!data || obj.connectstate == -1) return;
|
||||
if (typeof data === 'object') {
|
||||
// This is an ArrayBuffer, convert it to a string array (used in IE)
|
||||
var binary = "", bytes = new Uint8Array(data), length = bytes.byteLength;
|
||||
var binary = '', bytes = new Uint8Array(data), length = bytes.byteLength;
|
||||
for (var i = 0; i < length; i++) { binary += String.fromCharCode(bytes[i]); }
|
||||
data = binary;
|
||||
}
|
||||
else if (typeof data !== 'string') return;
|
||||
//console.log("xxOnSocketData", rstr2hex(data));
|
||||
//console.log('xxOnSocketData', rstr2hex(data));
|
||||
if ((typeof args != 'undefined') && args.redirtrace) { console.log('RedirRecv', typeof data, data.length, (data[0] == '{')?data:rstr2hex(data).substring(0, 64)); }
|
||||
return obj.m.ProcessData(data);
|
||||
}
|
||||
|
@ -226,8 +226,8 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
|||
}
|
||||
|
||||
obj.send = function (x) {
|
||||
//obj.debug("Agent Redir Send(" + obj.webRtcActive + ", " + x.length + "): " + rstr2hex(x));
|
||||
//console.log("Agent Redir Send(" + obj.webRtcActive + ", " + x.length + "): " + ((typeof x == 'string')?x:rstr2hex(x)));
|
||||
//obj.debug('Agent Redir Send(' + obj.webRtcActive + ', ' + x.length + '): ' + rstr2hex(x));
|
||||
//console.log('Agent Redir Send(' + obj.webRtcActive + ', ' + x.length + '): ' + ((typeof x == 'string')?x:rstr2hex(x)));
|
||||
if ((typeof args != 'undefined') && args.redirtrace) { console.log('RedirSend', typeof x, x.length, (x[0] == '{') ? x : rstr2hex(x).substring(0, 64)); }
|
||||
try {
|
||||
if (obj.socket != null && obj.socket.readyState == WebSocket.OPEN) {
|
||||
|
@ -251,7 +251,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
|||
}
|
||||
|
||||
obj.xxOnSocketClosed = function () {
|
||||
//obj.debug("Agent Redir Socket Closed");
|
||||
//obj.debug('Agent Redir Socket Closed');
|
||||
//if (obj.debugmode == 1) { console.log('onSocketClosed'); }
|
||||
obj.Stop(1);
|
||||
}
|
||||
|
@ -276,10 +276,10 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
|||
// Clean up WebRTC
|
||||
obj.xxCloseWebRTC();
|
||||
|
||||
//obj.debug("Agent Redir Socket Stopped");
|
||||
//obj.debug('Agent Redir Socket Stopped');
|
||||
obj.connectstate = -1;
|
||||
if (obj.socket != null) {
|
||||
try { if (obj.socket.readyState == 1) { obj.sendCtrlMsg("{\"ctrlChannel\":\"102938\",\"type\":\"close\"}"); obj.socket.close(); } } catch (e) { }
|
||||
try { if (obj.socket.readyState == 1) { obj.sendCtrlMsg('{"ctrlChannel":"102938","type":"close"}'); obj.socket.close(); } } catch (e) { }
|
||||
obj.socket = null;
|
||||
}
|
||||
obj.xxStateChange(0);
|
||||
|
|
|
@ -4003,7 +4003,7 @@
|
|||
],
|
||||
"pt": "Área de Trabalho",
|
||||
"ja": "デスクトップ",
|
||||
"nl": "bureaublad"
|
||||
"nl": "Bureaublad"
|
||||
},
|
||||
{
|
||||
"en": "Desktop -",
|
||||
|
@ -4023,7 +4023,7 @@
|
|||
"pt": "Notificação na área de trabalho",
|
||||
"ja": "デスクトップ通知",
|
||||
"cs": "Informovat na ploše",
|
||||
"nl": "bureaublad melding"
|
||||
"nl": "Bureaublad melding"
|
||||
},
|
||||
{
|
||||
"en": "Desktop Prompt",
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -146,6 +146,7 @@
|
|||
<table id=MeshSubMenu cellpadding=0 cellspacing=0 class=style1>
|
||||
<tr>
|
||||
<td tabindex=0 id=MeshGeneral class="topbar_td style3x" onclick=go(20,event) onkeypress="if (event.key == 'Enter') go(20)">General</td>
|
||||
<td tabindex=0 id=MeshSummary class="topbar_td style3x" onclick=go(21,event) onkeypress="if (event.key == 'Enter') go(21)">Summary</td>
|
||||
<td class="topbar_td_end style3"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -246,7 +247,7 @@
|
|||
<div id=NoMeshesPanel style="display:none">
|
||||
<table>
|
||||
<tr>
|
||||
<td valign="top" style="width: 50px">
|
||||
<td valign="top" style="width:50px">
|
||||
<img src="images/info.png" />
|
||||
</td>
|
||||
<td>
|
||||
|
@ -779,6 +780,28 @@
|
|||
<h1>General - <span id=p20meshName></span></h1>
|
||||
<p id=p20info></p>
|
||||
</div>
|
||||
<div id=p21 style="display:none">
|
||||
<div style="float:left"><div class="backButton" tabindex=0 onclick=goBack() title="Back" onkeypress="if (event.key == 'Enter') goBack()"><div class="backButtonEx"></div></div></div>
|
||||
<h1>Summary - <span id=p21meshName></span></h1>
|
||||
<div style="width:100%">
|
||||
<div style="display:table;margin:0 auto;">
|
||||
<div style="width:250px;height:250px;display:inline-block;text-align:center">
|
||||
<div style="margin:10px;font-size:16px">Power States</div>
|
||||
<canvas id="meshPowerChart" style="width:250px;height:250px"></canvas>
|
||||
</div>
|
||||
<div id="meshOsChartDiv" style="width:250px;height:250px;display:inline-block;text-align:center">
|
||||
<div style="margin:10px;font-size:16px">Agent Types</div>
|
||||
<canvas id="meshOsChart" style="width:250px;height:250px"></canvas>
|
||||
</div>
|
||||
<div style="width:250px;height:250px;display:inline-block;text-align:center">
|
||||
<div style="margin:10px;font-size:16px">Connectivity</div>
|
||||
<canvas id="meshConnChart" style="width:250px;height:250px"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br /><br />
|
||||
<p id=p21info></p>
|
||||
</div>
|
||||
<div id=p30 style="display:none">
|
||||
<table style="width:100%" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
|
@ -1028,6 +1051,7 @@
|
|||
var autoReconnect = true;
|
||||
var powerStatetable = ['', "Powered", "Sleep", "Sleep", "Sleep", "Hibernating", "Power off", "Present"];
|
||||
var StatusStrs = ["Disconnected", "Connecting...", "Setup...", "Connected", "Intel® AMT Connected"];
|
||||
var agentsStr = ["Unknown", "Windows 32bit console", "Windows 64bit console", "Windows 32bit service", "Windows 64bit service", "Linux 32bit", "Linux 64bit", "MIPS", "XENx86", "Android ARM", "Linux ARM", "MacOS 32bit", "Android x86", "PogoPlug ARM", "Android APK", "Linux Poky x86-32bit", "MacOS 64bit", "ChromeOS", "Linux Poky x86-64bit", "Linux NoKVM x86-32bit", "Linux NoKVM x86-64bit", "Windows MinCore console", "Windows MinCore service", "NodeJS", "ARM-Linaro", "ARMv6l / ARMv7l", "ARMv8 64bit", "ARMv6l / ARMv7l / NoKVM", "Unknown", "Unknown", "FreeBSD x86-64"];
|
||||
var sort = 0;
|
||||
var searchFocus = 0;
|
||||
var mapSearchFocus = 0;
|
||||
|
@ -1234,6 +1258,9 @@
|
|||
// Setup the user interface in the right mode
|
||||
userInterfaceSelectMenu();
|
||||
|
||||
// Setup Mesh summary panel
|
||||
setupMeshSummaryStats();
|
||||
|
||||
// If SSPI or LDAP authentication not used, allow batch account creation.
|
||||
QV('p4UserBatchCreate', (features & 0x00080000) == 0);
|
||||
|
||||
|
@ -1427,7 +1454,7 @@
|
|||
if (updateNaggleFlags & 1) { onSearchInputChanged(); }
|
||||
if (updateNaggleFlags & 2) { onSortSelectChange(false); }
|
||||
if (updateNaggleFlags & 128) { updateMeshes(); }
|
||||
if (updateNaggleFlags & 4) { updateDevices(); }
|
||||
if (updateNaggleFlags & 4) { updateDevices(); if (xxcurrentView == 21) { p21updateMesh(); } }
|
||||
if (updateNaggleFlags & 8) { drawNotifications(); }
|
||||
{{{StartGeoLocationJS}}}if (updateNaggleFlags & 16) { updateMapMarkers(); }{{{EndGeoLocationJS}}}
|
||||
if (updateNaggleFlags & 32) { eventsUpdate(); }
|
||||
|
@ -2640,7 +2667,7 @@
|
|||
var oldviewmode = 0;
|
||||
function updateDevices() {
|
||||
if (nodes == null) { return; }
|
||||
var r = '', c = 0, current = null, count = 0, displayedMeshes = {}, view = Q('viewselect').value, groups = {}, groupCount = {};
|
||||
var r = '', c = 0, current = null, count = 0, scount = 0, displayedMeshes = {}, view = Q('viewselect').value, groups = {}, groupCount = {};
|
||||
QV('xdevices', view < 4);
|
||||
QV('xdevicesmap', view == 4);
|
||||
QV('devListToolbar', view < 3);
|
||||
|
@ -2680,10 +2707,6 @@
|
|||
var deviceBoxWidth = Math.floor(totalDeviceViewWidth / 301);
|
||||
deviceBoxWidth = 301 + Math.floor((totalDeviceViewWidth - (deviceBoxWidth * 301)) / deviceBoxWidth);
|
||||
|
||||
if ((view == 2) && (sort != 3)) {
|
||||
r += '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "User" + '<th style=color:gray;width:120px>' + "Address" + '<th style=color:gray;width:100px>' + "Connectivity"; //<th style=color:gray;width:100px>State';
|
||||
}
|
||||
|
||||
// Go thru the list of nodes and display them
|
||||
for (var i in nodes) {
|
||||
var node = nodes[i];
|
||||
|
@ -2792,8 +2815,6 @@
|
|||
|
||||
// If displaying devices by groups, sort the group names and display the devices.
|
||||
if (sort == 3) {
|
||||
if (view == 2) { r = '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "User" + '<th style=color:gray;width:120px>' + "Address" + '<th style=color:gray;width:100px>' + "Connectivity"; }
|
||||
|
||||
var groupNames = [];
|
||||
for (var i in groups) { groupNames.push(i); }
|
||||
groupNames.sort(function (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase()); });
|
||||
|
@ -2844,7 +2865,15 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
r += '</tr></table><div style=height:1px></div>'; // This height of 1 div fixes a problem in Linux firefox browsers
|
||||
|
||||
if (r != '') {
|
||||
if (view == 2) {
|
||||
// This height of 1 div at the end to fix a problem in Linux firefox browsers
|
||||
r = '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "User" + '<th style=color:gray;width:120px>' + "Address" + '<th style=color:gray;width:100px>' + "Connectivity" + r + '</tr></table><div style=height:1px></div>'; //<th style=color:gray;width:100px>State';
|
||||
}
|
||||
} else {
|
||||
if (sort == 3) { r = '<div style="margin:10px"><i>' + "No devices with tags found." + '</i></div>'; }
|
||||
}
|
||||
|
||||
// Add a "Add Device Group" option
|
||||
r += '<div style=border-top-style:solid;border-top-width:1px;border-top-color:#DDDDDD;cursor:pointer;font-size:10px>';
|
||||
|
@ -4388,7 +4417,6 @@
|
|||
}
|
||||
|
||||
// Attribute: Mesh Agent
|
||||
var agentsStr = ["Unknown", "Windows 32bit console", "Windows 64bit console", "Windows 32bit service", "Windows 64bit service", "Linux 32bit", "Linux 64bit", "MIPS", "XENx86", "Android ARM", "Linux ARM", "MacOS 32bit", "Android x86", "PogoPlug ARM", "Android APK", "Linux Poky x86-32bit", "MacOS 64bit", "ChromeOS", "Linux Poky x86-64bit", "Linux NoKVM x86-32bit", "Linux NoKVM x86-64bit", "Windows MinCore console", "Windows MinCore service", "NodeJS", "ARM-Linaro", "ARMv6l / ARMv7l", "ARMv8 64bit", "ARMv6l / ARMv7l / NoKVM", "Unknown", "Unknown", "FreeBSD x86-64"];
|
||||
if ((node.agent != null) && (node.agent.id != null) && (node.agent.ver != null)) {
|
||||
var str = '';
|
||||
if (node.agent.id <= agentsStr.length) { str = agentsStr[node.agent.id]; } else { str = agentsStr[0]; }
|
||||
|
@ -7853,6 +7881,91 @@
|
|||
meshserver.send({ action: 'changemeshnotify', meshid: currentMesh._id, notify: meshNotify });
|
||||
}
|
||||
|
||||
//
|
||||
// Mesh Summary
|
||||
//
|
||||
|
||||
function setupMeshSummaryStats() {
|
||||
window.meshPowerChart = new Chart(document.getElementById('meshPowerChart').getContext('2d'), {
|
||||
type: 'doughnut',
|
||||
data: { datasets: [{ data: [0, 0], backgroundColor: ['#20F', '#40D', '#60B', '#809', '#A07', '#C05'] }] },
|
||||
options: { responsive: true, legend: { position: 'none' }, animation: { animateScale: true, animateRotate: true } }
|
||||
});
|
||||
window.meshOsChart = new Chart(document.getElementById('meshOsChart').getContext('2d'), {
|
||||
type: 'doughnut',
|
||||
data: { datasets: [{ data: [0, 0], backgroundColor: ['#20F', '#40D', '#60B', '#809', '#A07', '#C05'] }] },
|
||||
options: { responsive: true, legend: { position: 'none' }, animation: { animateScale: true, animateRotate: true } }
|
||||
});
|
||||
window.meshConnChart = new Chart(document.getElementById('meshConnChart').getContext('2d'), {
|
||||
type: 'doughnut',
|
||||
data: { datasets: [{ data: [0, 0], backgroundColor: ['#20F', '#40D', '#60B', '#809', '#A07', '#C05'] }], labels: ["Not Connected", "Agent", "Intel AMT", "Agent + Intel AMT"] },
|
||||
options: { responsive: true, legend: { position: 'none' }, animation: { animateScale: true, animateRotate: true } }
|
||||
});
|
||||
}
|
||||
|
||||
function p21updateMesh() {
|
||||
if (currentMesh == null) return;
|
||||
QH('p21meshName', EscapeHtml(currentMesh.name));
|
||||
|
||||
// Update charts
|
||||
var power = {};
|
||||
var conn = {};
|
||||
var agentTypes = {};
|
||||
var powerStates = {};
|
||||
var connectivityStates = [ 0, 0, 0, 0 ]; // None, Agent, AMT, Agent + AMT
|
||||
for (var i in nodes) {
|
||||
if (nodes[i].meshid == currentMesh._id) {
|
||||
if (nodes[i].agent) { if (agentTypes[nodes[i].agent.id] == null) { agentTypes[nodes[i].agent.id] = 1; } else { agentTypes[nodes[i].agent.id]++; } }
|
||||
if (nodes[i].pwr) { if (powerStates[nodes[i].pwr] == null) { powerStates[nodes[i].pwr] = 1; } else { powerStates[nodes[i].pwr]++; } }
|
||||
if (nodes[i].conn == 0) {
|
||||
connectivityStates[0]++; }
|
||||
else if ((nodes[i].conn & 6) != 0) { if ((nodes[i].conn & 1) != 0) { connectivityStates[3]++; } else { connectivityStates[2]++; } }
|
||||
else if ((nodes[i].conn & 1) != 0) { connectivityStates[1]++; }
|
||||
}
|
||||
}
|
||||
|
||||
var agentsData = [], agentsLabels = [], powerData = [], powerLabels = [];
|
||||
for (var i in agentTypes) { agentsData.push(agentTypes[i]); agentsLabels.push(agentsStr[i]); }
|
||||
for (var i in powerStates) { powerData.push(powerStates[i]); powerLabels.push(powerStatetable[i]); }
|
||||
window.meshPowerChart.config.data.datasets[0].data = powerData;
|
||||
window.meshPowerChart.config.data.labels = powerLabels;
|
||||
window.meshPowerChart.update();
|
||||
if (currentMesh.mtype == 2) {
|
||||
window.meshOsChart.config.data.datasets[0].data = agentsData;
|
||||
window.meshOsChart.config.data.labels = agentsLabels;
|
||||
window.meshOsChart.update();
|
||||
}
|
||||
window.meshConnChart.config.data.datasets[0].data = connectivityStates;
|
||||
window.meshConnChart.update();
|
||||
|
||||
// Only show the OS chart if the mesh is agent type.
|
||||
QS('meshOsChartDiv')['display'] = (currentMesh.mtype == 2)?'inline-block':'none';
|
||||
|
||||
// Update tables
|
||||
var x = '<br />', count = 0;
|
||||
if (powerData.length > 0) {
|
||||
count = 0;
|
||||
x += '<table style="margin-top:10px;color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>' + "Power States" + '</th><th scope=col style=text-align:left></th></tr>';
|
||||
for (var i in powerStates) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + powerStatetable[i] + '<div></div></div></td><td><div style=float:right>' + powerStates[i] + ' </div><div></div></td></tr>'; }
|
||||
x += '</tbody></table>';
|
||||
}
|
||||
|
||||
if ((agentsData.length > 0) && (currentMesh.mtype == 2)) {
|
||||
x += '<table style="margin-top:10px;color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>' + "Agent Types" + '</th><th scope=col style=text-align:left></th></tr>';
|
||||
for (var i in agentTypes) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + agentsStr[i] + '<div></div></div></td><td><div style=float:right>' + agentTypes[i] + ' </div><div></div></td></tr>'; }
|
||||
x += '</tbody></table>';
|
||||
}
|
||||
|
||||
count = 0;
|
||||
x += '<table style="margin-top:10px;color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>' + "Power States" + '</th><th scope=col style=text-align:left></th></tr>';
|
||||
if (connectivityStates[0] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Not Connected" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[0] + ' </div><div></div></td></tr>'; }
|
||||
if (connectivityStates[1] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Agent" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[1] + ' </div><div></div></td></tr>'; }
|
||||
if (connectivityStates[2] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Intel AMT" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[2] + ' </div><div></div></td></tr>'; }
|
||||
if (connectivityStates[3] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Agent + Intel AMT" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[3] + ' </div><div></div></td></tr>'; }
|
||||
x += '</tbody></table>';
|
||||
QH('p21info', x);
|
||||
}
|
||||
|
||||
//
|
||||
// MY FILES
|
||||
//
|
||||
|
@ -8335,8 +8448,8 @@
|
|||
if (sessions != null) {
|
||||
gray = '';
|
||||
if (self) {
|
||||
msg = '<span style=float:right;margin-top:1px;margin-right:4px title=' + "Chat" + '><a href=# onclick=userChat(event,\"" + encodeURIComponent(user._id) + "\",\"" + encodeURIComponent(user.name) + "\")><img src=\'images/icon-chat.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
msg += '<span style=float:right;margin-top:1px;margin-left:4px;margin-right:4px title=Notify><a href=# onclick=\'return showUserAlertDialog(event,\"" + encodeURIComponent(user._id) + "\")\'><img src=\'images/icon-notify.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
msg = '<span style=float:right;margin-top:1px;margin-right:4px title=' + "Chat" + '><a href=# onclick=userChat(event,\"' + encodeURIComponent(user._id) + '\",\"' + encodeURIComponent(user.name) + '\")><img src=\'images/icon-chat.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
msg += '<span style=float:right;margin-top:1px;margin-left:4px;margin-right:4px title=Notify><a href=# onclick=\'return showUserAlertDialog(event,\"' + encodeURIComponent(user._id) + '\")\'><img src=\'images/icon-notify.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
}
|
||||
if (sessions == 1) { lastAccess += nobreak("1 session"); } else { lastAccess += nobreak(format("{0} sessions", sessions)); }
|
||||
} else {
|
||||
|
@ -9540,7 +9653,7 @@
|
|||
QV('MeshSubMenuSpan', x >= 20 && x < 30);
|
||||
QV('UserSubMenuSpan', x >= 30 && x < 40);
|
||||
QV('ServerSubMenuSpan', x == 6 || x == 115 || x == 40 || x == 41 || x == 42 || x == 43);
|
||||
var panels = { 10: 'MainDev', 11: 'MainDevDesktop', 12: 'MainDevTerminal', 13: 'MainDevFiles', 14: 'MainDevAmt', 15: 'MainDevConsole', 16: 'MainDevEvents', 17: 'MainDevInfo', 19: 'MainDevPlugins', 20: 'MeshGeneral', 30: 'UserGeneral', 31: 'UserEvents', 6: 'ServerGeneral', 40: 'ServerStats', 41: 'ServerTrace', 42: 'ServerPlugins', 115: 'ServerConsole' };
|
||||
var panels = { 10: 'MainDev', 11: 'MainDevDesktop', 12: 'MainDevTerminal', 13: 'MainDevFiles', 14: 'MainDevAmt', 15: 'MainDevConsole', 16: 'MainDevEvents', 17: 'MainDevInfo', 19: 'MainDevPlugins', 20: 'MeshGeneral', 21: 'MeshSummary', 30: 'UserGeneral', 31: 'UserEvents', 6: 'ServerGeneral', 40: 'ServerStats', 41: 'ServerTrace', 42: 'ServerPlugins', 115: 'ServerConsole' };
|
||||
for (var i in panels) {
|
||||
QC(panels[i]).remove('style3x');
|
||||
QC(panels[i]).remove('style3sel');
|
||||
|
@ -9567,6 +9680,9 @@
|
|||
// MyServer Plugins
|
||||
if (x == 42) { refreshPluginLatest(); }
|
||||
|
||||
// Update Mesh Summary
|
||||
if (x == 21) { p21updateMesh(); }
|
||||
|
||||
// Update the web page title
|
||||
if ((currentNode) && (x >= 10) && (x < 20)) {
|
||||
document.title = decodeURIComponent('{{{extitle}}}') + ' - ' + currentNode.name + ' - ' + meshes[currentNode.meshid].name;
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -144,6 +144,7 @@
|
|||
<table id="MeshSubMenu" cellpadding="0" cellspacing="0" class="style1">
|
||||
<tbody><tr>
|
||||
<td tabindex="0" id="MeshGeneral" class="topbar_td style3x" onclick="go(20,event)" onkeypress="if (event.key == 'Enter') go(20)">Obecné</td>
|
||||
<td tabindex="0" id="MeshSummary" class="topbar_td style3x" onclick="go(21,event)" onkeypress="if (event.key == 'Enter') go(21)">Summary</td>
|
||||
<td class="topbar_td_end style3"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
@ -244,7 +245,7 @@
|
|||
<div id="NoMeshesPanel" style="display:none">
|
||||
<table>
|
||||
<tbody><tr>
|
||||
<td valign="top" style="width: 50px">
|
||||
<td valign="top" style="width:50px">
|
||||
<img src="images/info.png">
|
||||
</td>
|
||||
<td>
|
||||
|
@ -777,6 +778,28 @@
|
|||
<h1>Obecné - <span id="p20meshName"></span></h1>
|
||||
<p id="p20info"></p>
|
||||
</div>
|
||||
<div id="p21" style="display:none">
|
||||
<div style="float:left"><div class="backButton" tabindex="0" onclick="goBack()" title="Zpět" onkeypress="if (event.key == 'Enter') goBack()"><div class="backButtonEx"></div></div></div>
|
||||
<h1>Summary - <span id="p21meshName"></span></h1>
|
||||
<div style="width:100%">
|
||||
<div style="display:table;margin:0 auto;">
|
||||
<div style="width:250px;height:250px;display:inline-block;text-align:center">
|
||||
<div style="margin:10px;font-size:16px">Power States</div>
|
||||
<canvas id="meshPowerChart" style="width:250px;height:250px"></canvas>
|
||||
</div>
|
||||
<div id="meshOsChartDiv" style="width:250px;height:250px;display:inline-block;text-align:center">
|
||||
<div style="margin:10px;font-size:16px">Agent Types</div>
|
||||
<canvas id="meshOsChart" style="width:250px;height:250px"></canvas>
|
||||
</div>
|
||||
<div style="width:250px;height:250px;display:inline-block;text-align:center">
|
||||
<div style="margin:10px;font-size:16px">Konektivita</div>
|
||||
<canvas id="meshConnChart" style="width:250px;height:250px"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br><br>
|
||||
<p id="p21info"></p>
|
||||
</div>
|
||||
<div id="p30" style="display:none">
|
||||
<table style="width:100%" cellpadding="0" cellspacing="0">
|
||||
<tbody><tr>
|
||||
|
@ -1026,6 +1049,7 @@
|
|||
var autoReconnect = true;
|
||||
var powerStatetable = ['', "Zapnuto", "Spánek", "Spánek", "Spánek", "Hibernuji", "Vypnout", "Současnost"];
|
||||
var StatusStrs = ["Odpojeno", "Připojování...", "Nastavení...", "Připojeno", "Intel® AMT připojeno"];
|
||||
var agentsStr = ["Neznámý", "Windows 32bit konzole", "Windows 64bit konzole", "Windows 32bit služba", "Windows 64bit služba", "Linux 32bit", "Linux 64bit", "MIPS", "XENx86", "Android ARM", "Linux ARM", "MacOS 32bit", "Android x86", "PogoPlug ARM", "Android APK", "Linux Poky x86-32bit", "MacOS 64bit", "ChromeOS", "Linux Poky x86-64bit", "Linux NoKVM x86-32bit", "Linux NoKVM x86-64bit", "Windows MinCore konzole", "Windows MinCore služba", "NodeJS", "ARM-Linaro", "ARMv6l / ARMv7l", "ARMv8 64bit", "ARMv6l / ARMv7l / NoKVM", "Neznámý", "Neznámý", "FreeBSD x86-64"];
|
||||
var sort = 0;
|
||||
var searchFocus = 0;
|
||||
var mapSearchFocus = 0;
|
||||
|
@ -1232,6 +1256,9 @@
|
|||
// Setup the user interface in the right mode
|
||||
userInterfaceSelectMenu();
|
||||
|
||||
// Setup Mesh summary panel
|
||||
setupMeshSummaryStats();
|
||||
|
||||
// If SSPI or LDAP authentication not used, allow batch account creation.
|
||||
QV('p4UserBatchCreate', (features & 0x00080000) == 0);
|
||||
|
||||
|
@ -1425,7 +1452,7 @@
|
|||
if (updateNaggleFlags & 1) { onSearchInputChanged(); }
|
||||
if (updateNaggleFlags & 2) { onSortSelectChange(false); }
|
||||
if (updateNaggleFlags & 128) { updateMeshes(); }
|
||||
if (updateNaggleFlags & 4) { updateDevices(); }
|
||||
if (updateNaggleFlags & 4) { updateDevices(); if (xxcurrentView == 21) { p21updateMesh(); } }
|
||||
if (updateNaggleFlags & 8) { drawNotifications(); }
|
||||
{{{StartGeoLocationJS}}}if (updateNaggleFlags & 16) { updateMapMarkers(); }{{{EndGeoLocationJS}}}
|
||||
if (updateNaggleFlags & 32) { eventsUpdate(); }
|
||||
|
@ -2638,7 +2665,7 @@
|
|||
var oldviewmode = 0;
|
||||
function updateDevices() {
|
||||
if (nodes == null) { return; }
|
||||
var r = '', c = 0, current = null, count = 0, displayedMeshes = {}, view = Q('viewselect').value, groups = {}, groupCount = {};
|
||||
var r = '', c = 0, current = null, count = 0, scount = 0, displayedMeshes = {}, view = Q('viewselect').value, groups = {}, groupCount = {};
|
||||
QV('xdevices', view < 4);
|
||||
QV('xdevicesmap', view == 4);
|
||||
QV('devListToolbar', view < 3);
|
||||
|
@ -2678,10 +2705,6 @@
|
|||
var deviceBoxWidth = Math.floor(totalDeviceViewWidth / 301);
|
||||
deviceBoxWidth = 301 + Math.floor((totalDeviceViewWidth - (deviceBoxWidth * 301)) / deviceBoxWidth);
|
||||
|
||||
if ((view == 2) && (sort != 3)) {
|
||||
r += '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "Uživatel" + '<th style=color:gray;width:120px>' + "Adresa" + '<th style=color:gray;width:100px>' + "Konektivita"; //<th style=color:gray;width:100px>State';
|
||||
}
|
||||
|
||||
// Go thru the list of nodes and display them
|
||||
for (var i in nodes) {
|
||||
var node = nodes[i];
|
||||
|
@ -2790,8 +2813,6 @@
|
|||
|
||||
// If displaying devices by groups, sort the group names and display the devices.
|
||||
if (sort == 3) {
|
||||
if (view == 2) { r = '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "Uživatel" + '<th style=color:gray;width:120px>' + "Adresa" + '<th style=color:gray;width:100px>' + "Konektivita"; }
|
||||
|
||||
var groupNames = [];
|
||||
for (var i in groups) { groupNames.push(i); }
|
||||
groupNames.sort(function (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase()); });
|
||||
|
@ -2842,7 +2863,15 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
r += '</tr></table><div style=height:1px></div>'; // This height of 1 div fixes a problem in Linux firefox browsers
|
||||
|
||||
if (r != '') {
|
||||
if (view == 2) {
|
||||
// This height of 1 div at the end to fix a problem in Linux firefox browsers
|
||||
r = '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "Uživatel" + '<th style=color:gray;width:120px>' + "Adresa" + '<th style=color:gray;width:100px>' + "Konektivita" + r + '</tr></table><div style=height:1px></div>'; //<th style=color:gray;width:100px>State';
|
||||
}
|
||||
} else {
|
||||
if (sort == 3) { r = '<div style="margin:10px"><i>' + "No devices with tags found." + '</i></div>'; }
|
||||
}
|
||||
|
||||
// Add a "Add Device Group" option
|
||||
r += '<div style=border-top-style:solid;border-top-width:1px;border-top-color:#DDDDDD;cursor:pointer;font-size:10px>';
|
||||
|
@ -4386,7 +4415,6 @@
|
|||
}
|
||||
|
||||
// Attribute: Mesh Agent
|
||||
var agentsStr = ["Neznámý", "Windows 32bit konzole", "Windows 64bit konzole", "Windows 32bit služba", "Windows 64bit služba", "Linux 32bit", "Linux 64bit", "MIPS", "XENx86", "Android ARM", "Linux ARM", "MacOS 32bit", "Android x86", "PogoPlug ARM", "Android APK", "Linux Poky x86-32bit", "MacOS 64bit", "ChromeOS", "Linux Poky x86-64bit", "Linux NoKVM x86-32bit", "Linux NoKVM x86-64bit", "Windows MinCore konzole", "Windows MinCore služba", "NodeJS", "ARM-Linaro", "ARMv6l / ARMv7l", "ARMv8 64bit", "ARMv6l / ARMv7l / NoKVM", "Neznámý", "Neznámý", "FreeBSD x86-64"];
|
||||
if ((node.agent != null) && (node.agent.id != null) && (node.agent.ver != null)) {
|
||||
var str = '';
|
||||
if (node.agent.id <= agentsStr.length) { str = agentsStr[node.agent.id]; } else { str = agentsStr[0]; }
|
||||
|
@ -7851,6 +7879,91 @@
|
|||
meshserver.send({ action: 'changemeshnotify', meshid: currentMesh._id, notify: meshNotify });
|
||||
}
|
||||
|
||||
//
|
||||
// Mesh Summary
|
||||
//
|
||||
|
||||
function setupMeshSummaryStats() {
|
||||
window.meshPowerChart = new Chart(document.getElementById('meshPowerChart').getContext('2d'), {
|
||||
type: 'doughnut',
|
||||
data: { datasets: [{ data: [0, 0], backgroundColor: ['#20F', '#40D', '#60B', '#809', '#A07', '#C05'] }] },
|
||||
options: { responsive: true, legend: { position: 'none' }, animation: { animateScale: true, animateRotate: true } }
|
||||
});
|
||||
window.meshOsChart = new Chart(document.getElementById('meshOsChart').getContext('2d'), {
|
||||
type: 'doughnut',
|
||||
data: { datasets: [{ data: [0, 0], backgroundColor: ['#20F', '#40D', '#60B', '#809', '#A07', '#C05'] }] },
|
||||
options: { responsive: true, legend: { position: 'none' }, animation: { animateScale: true, animateRotate: true } }
|
||||
});
|
||||
window.meshConnChart = new Chart(document.getElementById('meshConnChart').getContext('2d'), {
|
||||
type: 'doughnut',
|
||||
data: { datasets: [{ data: [0, 0], backgroundColor: ['#20F', '#40D', '#60B', '#809', '#A07', '#C05'] }], labels: ["Not Connected", "Agent", "Intel AMT", "Agent + Intel AMT"] },
|
||||
options: { responsive: true, legend: { position: 'none' }, animation: { animateScale: true, animateRotate: true } }
|
||||
});
|
||||
}
|
||||
|
||||
function p21updateMesh() {
|
||||
if (currentMesh == null) return;
|
||||
QH('p21meshName', EscapeHtml(currentMesh.name));
|
||||
|
||||
// Update charts
|
||||
var power = {};
|
||||
var conn = {};
|
||||
var agentTypes = {};
|
||||
var powerStates = {};
|
||||
var connectivityStates = [ 0, 0, 0, 0 ]; // None, Agent, AMT, Agent + AMT
|
||||
for (var i in nodes) {
|
||||
if (nodes[i].meshid == currentMesh._id) {
|
||||
if (nodes[i].agent) { if (agentTypes[nodes[i].agent.id] == null) { agentTypes[nodes[i].agent.id] = 1; } else { agentTypes[nodes[i].agent.id]++; } }
|
||||
if (nodes[i].pwr) { if (powerStates[nodes[i].pwr] == null) { powerStates[nodes[i].pwr] = 1; } else { powerStates[nodes[i].pwr]++; } }
|
||||
if (nodes[i].conn == 0) {
|
||||
connectivityStates[0]++; }
|
||||
else if ((nodes[i].conn & 6) != 0) { if ((nodes[i].conn & 1) != 0) { connectivityStates[3]++; } else { connectivityStates[2]++; } }
|
||||
else if ((nodes[i].conn & 1) != 0) { connectivityStates[1]++; }
|
||||
}
|
||||
}
|
||||
|
||||
var agentsData = [], agentsLabels = [], powerData = [], powerLabels = [];
|
||||
for (var i in agentTypes) { agentsData.push(agentTypes[i]); agentsLabels.push(agentsStr[i]); }
|
||||
for (var i in powerStates) { powerData.push(powerStates[i]); powerLabels.push(powerStatetable[i]); }
|
||||
window.meshPowerChart.config.data.datasets[0].data = powerData;
|
||||
window.meshPowerChart.config.data.labels = powerLabels;
|
||||
window.meshPowerChart.update();
|
||||
if (currentMesh.mtype == 2) {
|
||||
window.meshOsChart.config.data.datasets[0].data = agentsData;
|
||||
window.meshOsChart.config.data.labels = agentsLabels;
|
||||
window.meshOsChart.update();
|
||||
}
|
||||
window.meshConnChart.config.data.datasets[0].data = connectivityStates;
|
||||
window.meshConnChart.update();
|
||||
|
||||
// Only show the OS chart if the mesh is agent type.
|
||||
QS('meshOsChartDiv')['display'] = (currentMesh.mtype == 2)?'inline-block':'none';
|
||||
|
||||
// Update tables
|
||||
var x = '<br />', count = 0;
|
||||
if (powerData.length > 0) {
|
||||
count = 0;
|
||||
x += '<table style="margin-top:10px;color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>' + "Power States" + '</th><th scope=col style=text-align:left></th></tr>';
|
||||
for (var i in powerStates) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + powerStatetable[i] + '<div></div></div></td><td><div style=float:right>' + powerStates[i] + ' </div><div></div></td></tr>'; }
|
||||
x += '</tbody></table>';
|
||||
}
|
||||
|
||||
if ((agentsData.length > 0) && (currentMesh.mtype == 2)) {
|
||||
x += '<table style="margin-top:10px;color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>' + "Agent Types" + '</th><th scope=col style=text-align:left></th></tr>';
|
||||
for (var i in agentTypes) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + agentsStr[i] + '<div></div></div></td><td><div style=float:right>' + agentTypes[i] + ' </div><div></div></td></tr>'; }
|
||||
x += '</tbody></table>';
|
||||
}
|
||||
|
||||
count = 0;
|
||||
x += '<table style="margin-top:10px;color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>' + "Power States" + '</th><th scope=col style=text-align:left></th></tr>';
|
||||
if (connectivityStates[0] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Not Connected" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[0] + ' </div><div></div></td></tr>'; }
|
||||
if (connectivityStates[1] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Agent" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[1] + ' </div><div></div></td></tr>'; }
|
||||
if (connectivityStates[2] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Intel AMT" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[2] + ' </div><div></div></td></tr>'; }
|
||||
if (connectivityStates[3] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Agent + Intel AMT" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[3] + ' </div><div></div></td></tr>'; }
|
||||
x += '</tbody></table>';
|
||||
QH('p21info', x);
|
||||
}
|
||||
|
||||
//
|
||||
// MY FILES
|
||||
//
|
||||
|
@ -8333,8 +8446,8 @@
|
|||
if (sessions != null) {
|
||||
gray = '';
|
||||
if (self) {
|
||||
msg = '<span style=float:right;margin-top:1px;margin-right:4px title=' + "Chat" + '><a href=# onclick=userChat(event,\"" + encodeURIComponent(user._id) + "\",\"" + encodeURIComponent(user.name) + "\")><img src=\'images/icon-chat.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
msg += '<span style=float:right;margin-top:1px;margin-left:4px;margin-right:4px title=Notify><a href=# onclick=\'return showUserAlertDialog(event,\"" + encodeURIComponent(user._id) + "\")\'><img src=\'images/icon-notify.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
msg = '<span style=float:right;margin-top:1px;margin-right:4px title=' + "Chat" + '><a href=# onclick=userChat(event,\"' + encodeURIComponent(user._id) + '\",\"' + encodeURIComponent(user.name) + '\")><img src=\'images/icon-chat.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
msg += '<span style=float:right;margin-top:1px;margin-left:4px;margin-right:4px title=Notify><a href=# onclick=\'return showUserAlertDialog(event,\"' + encodeURIComponent(user._id) + '\")\'><img src=\'images/icon-notify.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
}
|
||||
if (sessions == 1) { lastAccess += nobreak("1 session"); } else { lastAccess += nobreak(format("{0} spojení", sessions)); }
|
||||
} else {
|
||||
|
@ -9538,7 +9651,7 @@
|
|||
QV('MeshSubMenuSpan', x >= 20 && x < 30);
|
||||
QV('UserSubMenuSpan', x >= 30 && x < 40);
|
||||
QV('ServerSubMenuSpan', x == 6 || x == 115 || x == 40 || x == 41 || x == 42 || x == 43);
|
||||
var panels = { 10: 'MainDev', 11: 'MainDevDesktop', 12: 'MainDevTerminal', 13: 'MainDevFiles', 14: 'MainDevAmt', 15: 'MainDevConsole', 16: 'MainDevEvents', 17: 'MainDevInfo', 19: 'MainDevPlugins', 20: 'MeshGeneral', 30: 'UserGeneral', 31: 'UserEvents', 6: 'ServerGeneral', 40: 'ServerStats', 41: 'ServerTrace', 42: 'ServerPlugins', 115: 'ServerConsole' };
|
||||
var panels = { 10: 'MainDev', 11: 'MainDevDesktop', 12: 'MainDevTerminal', 13: 'MainDevFiles', 14: 'MainDevAmt', 15: 'MainDevConsole', 16: 'MainDevEvents', 17: 'MainDevInfo', 19: 'MainDevPlugins', 20: 'MeshGeneral', 21: 'MeshSummary', 30: 'UserGeneral', 31: 'UserEvents', 6: 'ServerGeneral', 40: 'ServerStats', 41: 'ServerTrace', 42: 'ServerPlugins', 115: 'ServerConsole' };
|
||||
for (var i in panels) {
|
||||
QC(panels[i]).remove('style3x');
|
||||
QC(panels[i]).remove('style3sel');
|
||||
|
@ -9565,6 +9678,9 @@
|
|||
// MyServer Plugins
|
||||
if (x == 42) { refreshPluginLatest(); }
|
||||
|
||||
// Update Mesh Summary
|
||||
if (x == 21) { p21updateMesh(); }
|
||||
|
||||
// Update the web page title
|
||||
if ((currentNode) && (x >= 10) && (x < 20)) {
|
||||
document.title = decodeURIComponent('{{{extitle}}}') + ' - ' + currentNode.name + ' - ' + meshes[currentNode.meshid].name;
|
||||
|
|
|
@ -144,6 +144,7 @@
|
|||
<table id="MeshSubMenu" cellpadding="0" cellspacing="0" class="style1">
|
||||
<tbody><tr>
|
||||
<td tabindex="0" id="MeshGeneral" class="topbar_td style3x" onclick="go(20,event)" onkeypress="if (event.key == 'Enter') go(20)">Général</td>
|
||||
<td tabindex="0" id="MeshSummary" class="topbar_td style3x" onclick="go(21,event)" onkeypress="if (event.key == 'Enter') go(21)">Summary</td>
|
||||
<td class="topbar_td_end style3"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
@ -244,7 +245,7 @@
|
|||
<div id="NoMeshesPanel" style="display:none">
|
||||
<table>
|
||||
<tbody><tr>
|
||||
<td valign="top" style="width: 50px">
|
||||
<td valign="top" style="width:50px">
|
||||
<img src="images/info.png">
|
||||
</td>
|
||||
<td>
|
||||
|
@ -777,6 +778,28 @@
|
|||
<h1>Général - <span id="p20meshName"></span></h1>
|
||||
<p id="p20info"></p>
|
||||
</div>
|
||||
<div id="p21" style="display:none">
|
||||
<div style="float:left"><div class="backButton" tabindex="0" onclick="goBack()" title="Retour" onkeypress="if (event.key == 'Enter') goBack()"><div class="backButtonEx"></div></div></div>
|
||||
<h1>Summary - <span id="p21meshName"></span></h1>
|
||||
<div style="width:100%">
|
||||
<div style="display:table;margin:0 auto;">
|
||||
<div style="width:250px;height:250px;display:inline-block;text-align:center">
|
||||
<div style="margin:10px;font-size:16px">Power States</div>
|
||||
<canvas id="meshPowerChart" style="width:250px;height:250px"></canvas>
|
||||
</div>
|
||||
<div id="meshOsChartDiv" style="width:250px;height:250px;display:inline-block;text-align:center">
|
||||
<div style="margin:10px;font-size:16px">Agent Types</div>
|
||||
<canvas id="meshOsChart" style="width:250px;height:250px"></canvas>
|
||||
</div>
|
||||
<div style="width:250px;height:250px;display:inline-block;text-align:center">
|
||||
<div style="margin:10px;font-size:16px">Connectivity</div>
|
||||
<canvas id="meshConnChart" style="width:250px;height:250px"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br><br>
|
||||
<p id="p21info"></p>
|
||||
</div>
|
||||
<div id="p30" style="display:none">
|
||||
<table style="width:100%" cellpadding="0" cellspacing="0">
|
||||
<tbody><tr>
|
||||
|
@ -1026,6 +1049,7 @@
|
|||
var autoReconnect = true;
|
||||
var powerStatetable = ['', "Alimenté", "Endormir", "Endormir", "Endormir", "Hibernation", "Éteindre", "Présent"];
|
||||
var StatusStrs = ["Débranché", "Connecting...", "Traitement...", "Connected", "Intel® AMT Connected"];
|
||||
var agentsStr = ["Inconnue", "Windows 32bit console", "Windows 64bit console", "Windows 32bit service", "Windows 64bit service", "Linux 32bit", "Linux 64bit", "MIPS", "XENx86", "Android ARM", "Linux ARM", "MacOS 32bit", "Android x86", "PogoPlug ARM", "Android APK", "Linux Poky x86-32bit", "MacOS 64bit", "ChromeOS", "Linux Poky x86-64bit", "Linux NoKVM x86-32bit", "Linux NoKVM x86-64bit", "Windows MinCore console", "Windows MinCore service", "NodeJS", "ARM-Linaro", "ARMv6l / ARMv7l", "ARMv8 64bit", "ARMv6l / ARMv7l / NoKVM", "Inconnue", "Inconnue", "FreeBSD x86-64"];
|
||||
var sort = 0;
|
||||
var searchFocus = 0;
|
||||
var mapSearchFocus = 0;
|
||||
|
@ -1232,6 +1256,9 @@
|
|||
// Setup the user interface in the right mode
|
||||
userInterfaceSelectMenu();
|
||||
|
||||
// Setup Mesh summary panel
|
||||
setupMeshSummaryStats();
|
||||
|
||||
// If SSPI or LDAP authentication not used, allow batch account creation.
|
||||
QV('p4UserBatchCreate', (features & 0x00080000) == 0);
|
||||
|
||||
|
@ -1425,7 +1452,7 @@
|
|||
if (updateNaggleFlags & 1) { onSearchInputChanged(); }
|
||||
if (updateNaggleFlags & 2) { onSortSelectChange(false); }
|
||||
if (updateNaggleFlags & 128) { updateMeshes(); }
|
||||
if (updateNaggleFlags & 4) { updateDevices(); }
|
||||
if (updateNaggleFlags & 4) { updateDevices(); if (xxcurrentView == 21) { p21updateMesh(); } }
|
||||
if (updateNaggleFlags & 8) { drawNotifications(); }
|
||||
{{{StartGeoLocationJS}}}if (updateNaggleFlags & 16) { updateMapMarkers(); }{{{EndGeoLocationJS}}}
|
||||
if (updateNaggleFlags & 32) { eventsUpdate(); }
|
||||
|
@ -2638,7 +2665,7 @@
|
|||
var oldviewmode = 0;
|
||||
function updateDevices() {
|
||||
if (nodes == null) { return; }
|
||||
var r = '', c = 0, current = null, count = 0, displayedMeshes = {}, view = Q('viewselect').value, groups = {}, groupCount = {};
|
||||
var r = '', c = 0, current = null, count = 0, scount = 0, displayedMeshes = {}, view = Q('viewselect').value, groups = {}, groupCount = {};
|
||||
QV('xdevices', view < 4);
|
||||
QV('xdevicesmap', view == 4);
|
||||
QV('devListToolbar', view < 3);
|
||||
|
@ -2678,10 +2705,6 @@
|
|||
var deviceBoxWidth = Math.floor(totalDeviceViewWidth / 301);
|
||||
deviceBoxWidth = 301 + Math.floor((totalDeviceViewWidth - (deviceBoxWidth * 301)) / deviceBoxWidth);
|
||||
|
||||
if ((view == 2) && (sort != 3)) {
|
||||
r += '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "Utilisateur" + '<th style=color:gray;width:120px>' + "Address" + '<th style=color:gray;width:100px>' + "Connectivity"; //<th style=color:gray;width:100px>State';
|
||||
}
|
||||
|
||||
// Go thru the list of nodes and display them
|
||||
for (var i in nodes) {
|
||||
var node = nodes[i];
|
||||
|
@ -2790,8 +2813,6 @@
|
|||
|
||||
// If displaying devices by groups, sort the group names and display the devices.
|
||||
if (sort == 3) {
|
||||
if (view == 2) { r = '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "Utilisateur" + '<th style=color:gray;width:120px>' + "Address" + '<th style=color:gray;width:100px>' + "Connectivity"; }
|
||||
|
||||
var groupNames = [];
|
||||
for (var i in groups) { groupNames.push(i); }
|
||||
groupNames.sort(function (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase()); });
|
||||
|
@ -2842,7 +2863,15 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
r += '</tr></table><div style=height:1px></div>'; // This height of 1 div fixes a problem in Linux firefox browsers
|
||||
|
||||
if (r != '') {
|
||||
if (view == 2) {
|
||||
// This height of 1 div at the end to fix a problem in Linux firefox browsers
|
||||
r = '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "Utilisateur" + '<th style=color:gray;width:120px>' + "Address" + '<th style=color:gray;width:100px>' + "Connectivity" + r + '</tr></table><div style=height:1px></div>'; //<th style=color:gray;width:100px>State';
|
||||
}
|
||||
} else {
|
||||
if (sort == 3) { r = '<div style="margin:10px"><i>' + "No devices with tags found." + '</i></div>'; }
|
||||
}
|
||||
|
||||
// Add a "Add Device Group" option
|
||||
r += '<div style=border-top-style:solid;border-top-width:1px;border-top-color:#DDDDDD;cursor:pointer;font-size:10px>';
|
||||
|
@ -4386,7 +4415,6 @@
|
|||
}
|
||||
|
||||
// Attribute: Mesh Agent
|
||||
var agentsStr = ["Inconnue", "Windows 32bit console", "Windows 64bit console", "Windows 32bit service", "Windows 64bit service", "Linux 32bit", "Linux 64bit", "MIPS", "XENx86", "Android ARM", "Linux ARM", "MacOS 32bit", "Android x86", "PogoPlug ARM", "Android APK", "Linux Poky x86-32bit", "MacOS 64bit", "ChromeOS", "Linux Poky x86-64bit", "Linux NoKVM x86-32bit", "Linux NoKVM x86-64bit", "Windows MinCore console", "Windows MinCore service", "NodeJS", "ARM-Linaro", "ARMv6l / ARMv7l", "ARMv8 64bit", "ARMv6l / ARMv7l / NoKVM", "Inconnue", "Inconnue", "FreeBSD x86-64"];
|
||||
if ((node.agent != null) && (node.agent.id != null) && (node.agent.ver != null)) {
|
||||
var str = '';
|
||||
if (node.agent.id <= agentsStr.length) { str = agentsStr[node.agent.id]; } else { str = agentsStr[0]; }
|
||||
|
@ -7851,6 +7879,91 @@
|
|||
meshserver.send({ action: 'changemeshnotify', meshid: currentMesh._id, notify: meshNotify });
|
||||
}
|
||||
|
||||
//
|
||||
// Mesh Summary
|
||||
//
|
||||
|
||||
function setupMeshSummaryStats() {
|
||||
window.meshPowerChart = new Chart(document.getElementById('meshPowerChart').getContext('2d'), {
|
||||
type: 'doughnut',
|
||||
data: { datasets: [{ data: [0, 0], backgroundColor: ['#20F', '#40D', '#60B', '#809', '#A07', '#C05'] }] },
|
||||
options: { responsive: true, legend: { position: 'none' }, animation: { animateScale: true, animateRotate: true } }
|
||||
});
|
||||
window.meshOsChart = new Chart(document.getElementById('meshOsChart').getContext('2d'), {
|
||||
type: 'doughnut',
|
||||
data: { datasets: [{ data: [0, 0], backgroundColor: ['#20F', '#40D', '#60B', '#809', '#A07', '#C05'] }] },
|
||||
options: { responsive: true, legend: { position: 'none' }, animation: { animateScale: true, animateRotate: true } }
|
||||
});
|
||||
window.meshConnChart = new Chart(document.getElementById('meshConnChart').getContext('2d'), {
|
||||
type: 'doughnut',
|
||||
data: { datasets: [{ data: [0, 0], backgroundColor: ['#20F', '#40D', '#60B', '#809', '#A07', '#C05'] }], labels: ["Not Connected", "Agent", "Intel AMT", "Agent + Intel AMT"] },
|
||||
options: { responsive: true, legend: { position: 'none' }, animation: { animateScale: true, animateRotate: true } }
|
||||
});
|
||||
}
|
||||
|
||||
function p21updateMesh() {
|
||||
if (currentMesh == null) return;
|
||||
QH('p21meshName', EscapeHtml(currentMesh.name));
|
||||
|
||||
// Update charts
|
||||
var power = {};
|
||||
var conn = {};
|
||||
var agentTypes = {};
|
||||
var powerStates = {};
|
||||
var connectivityStates = [ 0, 0, 0, 0 ]; // None, Agent, AMT, Agent + AMT
|
||||
for (var i in nodes) {
|
||||
if (nodes[i].meshid == currentMesh._id) {
|
||||
if (nodes[i].agent) { if (agentTypes[nodes[i].agent.id] == null) { agentTypes[nodes[i].agent.id] = 1; } else { agentTypes[nodes[i].agent.id]++; } }
|
||||
if (nodes[i].pwr) { if (powerStates[nodes[i].pwr] == null) { powerStates[nodes[i].pwr] = 1; } else { powerStates[nodes[i].pwr]++; } }
|
||||
if (nodes[i].conn == 0) {
|
||||
connectivityStates[0]++; }
|
||||
else if ((nodes[i].conn & 6) != 0) { if ((nodes[i].conn & 1) != 0) { connectivityStates[3]++; } else { connectivityStates[2]++; } }
|
||||
else if ((nodes[i].conn & 1) != 0) { connectivityStates[1]++; }
|
||||
}
|
||||
}
|
||||
|
||||
var agentsData = [], agentsLabels = [], powerData = [], powerLabels = [];
|
||||
for (var i in agentTypes) { agentsData.push(agentTypes[i]); agentsLabels.push(agentsStr[i]); }
|
||||
for (var i in powerStates) { powerData.push(powerStates[i]); powerLabels.push(powerStatetable[i]); }
|
||||
window.meshPowerChart.config.data.datasets[0].data = powerData;
|
||||
window.meshPowerChart.config.data.labels = powerLabels;
|
||||
window.meshPowerChart.update();
|
||||
if (currentMesh.mtype == 2) {
|
||||
window.meshOsChart.config.data.datasets[0].data = agentsData;
|
||||
window.meshOsChart.config.data.labels = agentsLabels;
|
||||
window.meshOsChart.update();
|
||||
}
|
||||
window.meshConnChart.config.data.datasets[0].data = connectivityStates;
|
||||
window.meshConnChart.update();
|
||||
|
||||
// Only show the OS chart if the mesh is agent type.
|
||||
QS('meshOsChartDiv')['display'] = (currentMesh.mtype == 2)?'inline-block':'none';
|
||||
|
||||
// Update tables
|
||||
var x = '<br />', count = 0;
|
||||
if (powerData.length > 0) {
|
||||
count = 0;
|
||||
x += '<table style="margin-top:10px;color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>' + "Power States" + '</th><th scope=col style=text-align:left></th></tr>';
|
||||
for (var i in powerStates) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + powerStatetable[i] + '<div></div></div></td><td><div style=float:right>' + powerStates[i] + ' </div><div></div></td></tr>'; }
|
||||
x += '</tbody></table>';
|
||||
}
|
||||
|
||||
if ((agentsData.length > 0) && (currentMesh.mtype == 2)) {
|
||||
x += '<table style="margin-top:10px;color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>' + "Agent Types" + '</th><th scope=col style=text-align:left></th></tr>';
|
||||
for (var i in agentTypes) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + agentsStr[i] + '<div></div></div></td><td><div style=float:right>' + agentTypes[i] + ' </div><div></div></td></tr>'; }
|
||||
x += '</tbody></table>';
|
||||
}
|
||||
|
||||
count = 0;
|
||||
x += '<table style="margin-top:10px;color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>' + "Power States" + '</th><th scope=col style=text-align:left></th></tr>';
|
||||
if (connectivityStates[0] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Not Connected" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[0] + ' </div><div></div></td></tr>'; }
|
||||
if (connectivityStates[1] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Agent" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[1] + ' </div><div></div></td></tr>'; }
|
||||
if (connectivityStates[2] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Intel AMT" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[2] + ' </div><div></div></td></tr>'; }
|
||||
if (connectivityStates[3] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Agent + Intel AMT" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[3] + ' </div><div></div></td></tr>'; }
|
||||
x += '</tbody></table>';
|
||||
QH('p21info', x);
|
||||
}
|
||||
|
||||
//
|
||||
// MY FILES
|
||||
//
|
||||
|
@ -8333,8 +8446,8 @@
|
|||
if (sessions != null) {
|
||||
gray = '';
|
||||
if (self) {
|
||||
msg = '<span style=float:right;margin-top:1px;margin-right:4px title=' + "Chat" + '><a href=# onclick=userChat(event,\"" + encodeURIComponent(user._id) + "\",\"" + encodeURIComponent(user.name) + "\")><img src=\'images/icon-chat.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
msg += '<span style=float:right;margin-top:1px;margin-left:4px;margin-right:4px title=Notify><a href=# onclick=\'return showUserAlertDialog(event,\"" + encodeURIComponent(user._id) + "\")\'><img src=\'images/icon-notify.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
msg = '<span style=float:right;margin-top:1px;margin-right:4px title=' + "Chat" + '><a href=# onclick=userChat(event,\"' + encodeURIComponent(user._id) + '\",\"' + encodeURIComponent(user.name) + '\")><img src=\'images/icon-chat.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
msg += '<span style=float:right;margin-top:1px;margin-left:4px;margin-right:4px title=Notify><a href=# onclick=\'return showUserAlertDialog(event,\"' + encodeURIComponent(user._id) + '\")\'><img src=\'images/icon-notify.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
}
|
||||
if (sessions == 1) { lastAccess += nobreak("1 session"); } else { lastAccess += nobreak(format("{0} sessions", sessions)); }
|
||||
} else {
|
||||
|
@ -9538,7 +9651,7 @@
|
|||
QV('MeshSubMenuSpan', x >= 20 && x < 30);
|
||||
QV('UserSubMenuSpan', x >= 30 && x < 40);
|
||||
QV('ServerSubMenuSpan', x == 6 || x == 115 || x == 40 || x == 41 || x == 42 || x == 43);
|
||||
var panels = { 10: 'MainDev', 11: 'MainDevDesktop', 12: 'MainDevTerminal', 13: 'MainDevFiles', 14: 'MainDevAmt', 15: 'MainDevConsole', 16: 'MainDevEvents', 17: 'MainDevInfo', 19: 'MainDevPlugins', 20: 'MeshGeneral', 30: 'UserGeneral', 31: 'UserEvents', 6: 'ServerGeneral', 40: 'ServerStats', 41: 'ServerTrace', 42: 'ServerPlugins', 115: 'ServerConsole' };
|
||||
var panels = { 10: 'MainDev', 11: 'MainDevDesktop', 12: 'MainDevTerminal', 13: 'MainDevFiles', 14: 'MainDevAmt', 15: 'MainDevConsole', 16: 'MainDevEvents', 17: 'MainDevInfo', 19: 'MainDevPlugins', 20: 'MeshGeneral', 21: 'MeshSummary', 30: 'UserGeneral', 31: 'UserEvents', 6: 'ServerGeneral', 40: 'ServerStats', 41: 'ServerTrace', 42: 'ServerPlugins', 115: 'ServerConsole' };
|
||||
for (var i in panels) {
|
||||
QC(panels[i]).remove('style3x');
|
||||
QC(panels[i]).remove('style3sel');
|
||||
|
@ -9565,6 +9678,9 @@
|
|||
// MyServer Plugins
|
||||
if (x == 42) { refreshPluginLatest(); }
|
||||
|
||||
// Update Mesh Summary
|
||||
if (x == 21) { p21updateMesh(); }
|
||||
|
||||
// Update the web page title
|
||||
if ((currentNode) && (x >= 10) && (x < 20)) {
|
||||
document.title = decodeURIComponent('{{{extitle}}}') + ' - ' + currentNode.name + ' - ' + meshes[currentNode.meshid].name;
|
||||
|
|
|
@ -144,6 +144,7 @@
|
|||
<table id="MeshSubMenu" cellpadding="0" cellspacing="0" class="style1">
|
||||
<tbody><tr>
|
||||
<td tabindex="0" id="MeshGeneral" class="topbar_td style3x" onclick="go(20,event)" onkeypress="if (event.key == 'Enter') go(20)">全般</td>
|
||||
<td tabindex="0" id="MeshSummary" class="topbar_td style3x" onclick="go(21,event)" onkeypress="if (event.key == 'Enter') go(21)">Summary</td>
|
||||
<td class="topbar_td_end style3"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
@ -244,7 +245,7 @@
|
|||
<div id="NoMeshesPanel" style="display:none">
|
||||
<table>
|
||||
<tbody><tr>
|
||||
<td valign="top" style="width: 50px">
|
||||
<td valign="top" style="width:50px">
|
||||
<img src="images/info.png">
|
||||
</td>
|
||||
<td>
|
||||
|
@ -777,6 +778,28 @@
|
|||
<h1>全般- <span id="p20meshName"></span></h1>
|
||||
<p id="p20info"></p>
|
||||
</div>
|
||||
<div id="p21" style="display:none">
|
||||
<div style="float:left"><div class="backButton" tabindex="0" onclick="goBack()" title="バック" onkeypress="if (event.key == 'Enter') goBack()"><div class="backButtonEx"></div></div></div>
|
||||
<h1>Summary - <span id="p21meshName"></span></h1>
|
||||
<div style="width:100%">
|
||||
<div style="display:table;margin:0 auto;">
|
||||
<div style="width:250px;height:250px;display:inline-block;text-align:center">
|
||||
<div style="margin:10px;font-size:16px">Power States</div>
|
||||
<canvas id="meshPowerChart" style="width:250px;height:250px"></canvas>
|
||||
</div>
|
||||
<div id="meshOsChartDiv" style="width:250px;height:250px;display:inline-block;text-align:center">
|
||||
<div style="margin:10px;font-size:16px">Agent Types</div>
|
||||
<canvas id="meshOsChart" style="width:250px;height:250px"></canvas>
|
||||
</div>
|
||||
<div style="width:250px;height:250px;display:inline-block;text-align:center">
|
||||
<div style="margin:10px;font-size:16px">接続性</div>
|
||||
<canvas id="meshConnChart" style="width:250px;height:250px"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br><br>
|
||||
<p id="p21info"></p>
|
||||
</div>
|
||||
<div id="p30" style="display:none">
|
||||
<table style="width:100%" cellpadding="0" cellspacing="0">
|
||||
<tbody><tr>
|
||||
|
@ -1026,6 +1049,7 @@
|
|||
var autoReconnect = true;
|
||||
var powerStatetable = ['', "パワード", "睡眠", "睡眠", "睡眠", "冬眠", "電源を切る", "プレゼント"];
|
||||
var StatusStrs = ["切断されました", "接続しています...", "セットアップ...", "接続済み", "Intel&reg;接続されたAMT"];
|
||||
var agentsStr = ["未知の", "Windows 32ビットコンソール", "Windows 64ビットコンソール", "Windows 32ビットサービス", "Windows 64ビットサービス", "Linux 32ビット", "Linux 64ビット", "MIPS", "XENx86", "Android ARM", "Linux ARM", "MacOS 32ビット", "Android x86", "PogoPlug ARM", "Android APK", "Linux Poky x86-32bit", "MacOS 64ビット", "ChromeOS", "Linux Poky x86-64bit", "Linux NoKVM x86-32bit", "Linux NoKVM x86-64ビット", "Windows MinCoreコンソール", "Windows MinCoreサービス", "NodeJS", "ARM-リナロ", "ARMv6l / ARMv7l", "ARMv8 64ビット", "ARMv6l / ARMv7l / NoKVM", "未知の", "未知の", "FreeBSD x86-64"];
|
||||
var sort = 0;
|
||||
var searchFocus = 0;
|
||||
var mapSearchFocus = 0;
|
||||
|
@ -1232,6 +1256,9 @@
|
|||
// Setup the user interface in the right mode
|
||||
userInterfaceSelectMenu();
|
||||
|
||||
// Setup Mesh summary panel
|
||||
setupMeshSummaryStats();
|
||||
|
||||
// If SSPI or LDAP authentication not used, allow batch account creation.
|
||||
QV('p4UserBatchCreate', (features & 0x00080000) == 0);
|
||||
|
||||
|
@ -1425,7 +1452,7 @@
|
|||
if (updateNaggleFlags & 1) { onSearchInputChanged(); }
|
||||
if (updateNaggleFlags & 2) { onSortSelectChange(false); }
|
||||
if (updateNaggleFlags & 128) { updateMeshes(); }
|
||||
if (updateNaggleFlags & 4) { updateDevices(); }
|
||||
if (updateNaggleFlags & 4) { updateDevices(); if (xxcurrentView == 21) { p21updateMesh(); } }
|
||||
if (updateNaggleFlags & 8) { drawNotifications(); }
|
||||
{{{StartGeoLocationJS}}}if (updateNaggleFlags & 16) { updateMapMarkers(); }{{{EndGeoLocationJS}}}
|
||||
if (updateNaggleFlags & 32) { eventsUpdate(); }
|
||||
|
@ -2638,7 +2665,7 @@
|
|||
var oldviewmode = 0;
|
||||
function updateDevices() {
|
||||
if (nodes == null) { return; }
|
||||
var r = '', c = 0, current = null, count = 0, displayedMeshes = {}, view = Q('viewselect').value, groups = {}, groupCount = {};
|
||||
var r = '', c = 0, current = null, count = 0, scount = 0, displayedMeshes = {}, view = Q('viewselect').value, groups = {}, groupCount = {};
|
||||
QV('xdevices', view < 4);
|
||||
QV('xdevicesmap', view == 4);
|
||||
QV('devListToolbar', view < 3);
|
||||
|
@ -2678,10 +2705,6 @@
|
|||
var deviceBoxWidth = Math.floor(totalDeviceViewWidth / 301);
|
||||
deviceBoxWidth = 301 + Math.floor((totalDeviceViewWidth - (deviceBoxWidth * 301)) / deviceBoxWidth);
|
||||
|
||||
if ((view == 2) && (sort != 3)) {
|
||||
r += '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "ユーザー" + '<th style=color:gray;width:120px>' + "住所" + '<th style=color:gray;width:100px>' + "接続性"; //<th style=color:gray;width:100px>State';
|
||||
}
|
||||
|
||||
// Go thru the list of nodes and display them
|
||||
for (var i in nodes) {
|
||||
var node = nodes[i];
|
||||
|
@ -2790,8 +2813,6 @@
|
|||
|
||||
// If displaying devices by groups, sort the group names and display the devices.
|
||||
if (sort == 3) {
|
||||
if (view == 2) { r = '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "ユーザー" + '<th style=color:gray;width:120px>' + "住所" + '<th style=color:gray;width:100px>' + "接続性"; }
|
||||
|
||||
var groupNames = [];
|
||||
for (var i in groups) { groupNames.push(i); }
|
||||
groupNames.sort(function (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase()); });
|
||||
|
@ -2842,7 +2863,15 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
r += '</tr></table><div style=height:1px></div>'; // This height of 1 div fixes a problem in Linux firefox browsers
|
||||
|
||||
if (r != '') {
|
||||
if (view == 2) {
|
||||
// This height of 1 div at the end to fix a problem in Linux firefox browsers
|
||||
r = '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "ユーザー" + '<th style=color:gray;width:120px>' + "住所" + '<th style=color:gray;width:100px>' + "接続性" + r + '</tr></table><div style=height:1px></div>'; //<th style=color:gray;width:100px>State';
|
||||
}
|
||||
} else {
|
||||
if (sort == 3) { r = '<div style="margin:10px"><i>' + "No devices with tags found." + '</i></div>'; }
|
||||
}
|
||||
|
||||
// Add a "Add Device Group" option
|
||||
r += '<div style=border-top-style:solid;border-top-width:1px;border-top-color:#DDDDDD;cursor:pointer;font-size:10px>';
|
||||
|
@ -4386,7 +4415,6 @@
|
|||
}
|
||||
|
||||
// Attribute: Mesh Agent
|
||||
var agentsStr = ["未知の", "Windows 32ビットコンソール", "Windows 64ビットコンソール", "Windows 32ビットサービス", "Windows 64ビットサービス", "Linux 32ビット", "Linux 64ビット", "MIPS", "XENx86", "Android ARM", "Linux ARM", "MacOS 32ビット", "Android x86", "PogoPlug ARM", "Android APK", "Linux Poky x86-32bit", "MacOS 64ビット", "ChromeOS", "Linux Poky x86-64bit", "Linux NoKVM x86-32bit", "Linux NoKVM x86-64ビット", "Windows MinCoreコンソール", "Windows MinCoreサービス", "NodeJS", "ARM-リナロ", "ARMv6l / ARMv7l", "ARMv8 64ビット", "ARMv6l / ARMv7l / NoKVM", "未知の", "未知の", "FreeBSD x86-64"];
|
||||
if ((node.agent != null) && (node.agent.id != null) && (node.agent.ver != null)) {
|
||||
var str = '';
|
||||
if (node.agent.id <= agentsStr.length) { str = agentsStr[node.agent.id]; } else { str = agentsStr[0]; }
|
||||
|
@ -7851,6 +7879,91 @@
|
|||
meshserver.send({ action: 'changemeshnotify', meshid: currentMesh._id, notify: meshNotify });
|
||||
}
|
||||
|
||||
//
|
||||
// Mesh Summary
|
||||
//
|
||||
|
||||
function setupMeshSummaryStats() {
|
||||
window.meshPowerChart = new Chart(document.getElementById('meshPowerChart').getContext('2d'), {
|
||||
type: 'doughnut',
|
||||
data: { datasets: [{ data: [0, 0], backgroundColor: ['#20F', '#40D', '#60B', '#809', '#A07', '#C05'] }] },
|
||||
options: { responsive: true, legend: { position: 'none' }, animation: { animateScale: true, animateRotate: true } }
|
||||
});
|
||||
window.meshOsChart = new Chart(document.getElementById('meshOsChart').getContext('2d'), {
|
||||
type: 'doughnut',
|
||||
data: { datasets: [{ data: [0, 0], backgroundColor: ['#20F', '#40D', '#60B', '#809', '#A07', '#C05'] }] },
|
||||
options: { responsive: true, legend: { position: 'none' }, animation: { animateScale: true, animateRotate: true } }
|
||||
});
|
||||
window.meshConnChart = new Chart(document.getElementById('meshConnChart').getContext('2d'), {
|
||||
type: 'doughnut',
|
||||
data: { datasets: [{ data: [0, 0], backgroundColor: ['#20F', '#40D', '#60B', '#809', '#A07', '#C05'] }], labels: ["Not Connected", "エージェント", "Intel AMT", "Agent + Intel AMT"] },
|
||||
options: { responsive: true, legend: { position: 'none' }, animation: { animateScale: true, animateRotate: true } }
|
||||
});
|
||||
}
|
||||
|
||||
function p21updateMesh() {
|
||||
if (currentMesh == null) return;
|
||||
QH('p21meshName', EscapeHtml(currentMesh.name));
|
||||
|
||||
// Update charts
|
||||
var power = {};
|
||||
var conn = {};
|
||||
var agentTypes = {};
|
||||
var powerStates = {};
|
||||
var connectivityStates = [ 0, 0, 0, 0 ]; // None, Agent, AMT, Agent + AMT
|
||||
for (var i in nodes) {
|
||||
if (nodes[i].meshid == currentMesh._id) {
|
||||
if (nodes[i].agent) { if (agentTypes[nodes[i].agent.id] == null) { agentTypes[nodes[i].agent.id] = 1; } else { agentTypes[nodes[i].agent.id]++; } }
|
||||
if (nodes[i].pwr) { if (powerStates[nodes[i].pwr] == null) { powerStates[nodes[i].pwr] = 1; } else { powerStates[nodes[i].pwr]++; } }
|
||||
if (nodes[i].conn == 0) {
|
||||
connectivityStates[0]++; }
|
||||
else if ((nodes[i].conn & 6) != 0) { if ((nodes[i].conn & 1) != 0) { connectivityStates[3]++; } else { connectivityStates[2]++; } }
|
||||
else if ((nodes[i].conn & 1) != 0) { connectivityStates[1]++; }
|
||||
}
|
||||
}
|
||||
|
||||
var agentsData = [], agentsLabels = [], powerData = [], powerLabels = [];
|
||||
for (var i in agentTypes) { agentsData.push(agentTypes[i]); agentsLabels.push(agentsStr[i]); }
|
||||
for (var i in powerStates) { powerData.push(powerStates[i]); powerLabels.push(powerStatetable[i]); }
|
||||
window.meshPowerChart.config.data.datasets[0].data = powerData;
|
||||
window.meshPowerChart.config.data.labels = powerLabels;
|
||||
window.meshPowerChart.update();
|
||||
if (currentMesh.mtype == 2) {
|
||||
window.meshOsChart.config.data.datasets[0].data = agentsData;
|
||||
window.meshOsChart.config.data.labels = agentsLabels;
|
||||
window.meshOsChart.update();
|
||||
}
|
||||
window.meshConnChart.config.data.datasets[0].data = connectivityStates;
|
||||
window.meshConnChart.update();
|
||||
|
||||
// Only show the OS chart if the mesh is agent type.
|
||||
QS('meshOsChartDiv')['display'] = (currentMesh.mtype == 2)?'inline-block':'none';
|
||||
|
||||
// Update tables
|
||||
var x = '<br />', count = 0;
|
||||
if (powerData.length > 0) {
|
||||
count = 0;
|
||||
x += '<table style="margin-top:10px;color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>' + "Power States" + '</th><th scope=col style=text-align:left></th></tr>';
|
||||
for (var i in powerStates) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + powerStatetable[i] + '<div></div></div></td><td><div style=float:right>' + powerStates[i] + ' </div><div></div></td></tr>'; }
|
||||
x += '</tbody></table>';
|
||||
}
|
||||
|
||||
if ((agentsData.length > 0) && (currentMesh.mtype == 2)) {
|
||||
x += '<table style="margin-top:10px;color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>' + "Agent Types" + '</th><th scope=col style=text-align:left></th></tr>';
|
||||
for (var i in agentTypes) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + agentsStr[i] + '<div></div></div></td><td><div style=float:right>' + agentTypes[i] + ' </div><div></div></td></tr>'; }
|
||||
x += '</tbody></table>';
|
||||
}
|
||||
|
||||
count = 0;
|
||||
x += '<table style="margin-top:10px;color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>' + "Power States" + '</th><th scope=col style=text-align:left></th></tr>';
|
||||
if (connectivityStates[0] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Not Connected" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[0] + ' </div><div></div></td></tr>'; }
|
||||
if (connectivityStates[1] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "エージェント" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[1] + ' </div><div></div></td></tr>'; }
|
||||
if (connectivityStates[2] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Intel AMT" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[2] + ' </div><div></div></td></tr>'; }
|
||||
if (connectivityStates[3] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Agent + Intel AMT" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[3] + ' </div><div></div></td></tr>'; }
|
||||
x += '</tbody></table>';
|
||||
QH('p21info', x);
|
||||
}
|
||||
|
||||
//
|
||||
// MY FILES
|
||||
//
|
||||
|
@ -8333,8 +8446,8 @@
|
|||
if (sessions != null) {
|
||||
gray = '';
|
||||
if (self) {
|
||||
msg = '<span style=float:right;margin-top:1px;margin-right:4px title=' + "チャット" + '><a href=# onclick=userChat(event,\"" + encodeURIComponent(user._id) + "\",\"" + encodeURIComponent(user.name) + "\")><img src=\'images/icon-chat.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
msg += '<span style=float:right;margin-top:1px;margin-left:4px;margin-right:4px title=Notify><a href=# onclick=\'return showUserAlertDialog(event,\"" + encodeURIComponent(user._id) + "\")\'><img src=\'images/icon-notify.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
msg = '<span style=float:right;margin-top:1px;margin-right:4px title=' + "チャット" + '><a href=# onclick=userChat(event,\"' + encodeURIComponent(user._id) + '\",\"' + encodeURIComponent(user.name) + '\")><img src=\'images/icon-chat.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
msg += '<span style=float:right;margin-top:1px;margin-left:4px;margin-right:4px title=Notify><a href=# onclick=\'return showUserAlertDialog(event,\"' + encodeURIComponent(user._id) + '\")\'><img src=\'images/icon-notify.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
}
|
||||
if (sessions == 1) { lastAccess += nobreak("1セッション"); } else { lastAccess += nobreak(format("{0}セッション", sessions)); }
|
||||
} else {
|
||||
|
@ -9538,7 +9651,7 @@
|
|||
QV('MeshSubMenuSpan', x >= 20 && x < 30);
|
||||
QV('UserSubMenuSpan', x >= 30 && x < 40);
|
||||
QV('ServerSubMenuSpan', x == 6 || x == 115 || x == 40 || x == 41 || x == 42 || x == 43);
|
||||
var panels = { 10: 'MainDev', 11: 'MainDevDesktop', 12: 'MainDevTerminal', 13: 'MainDevFiles', 14: 'MainDevAmt', 15: 'MainDevConsole', 16: 'MainDevEvents', 17: 'MainDevInfo', 19: 'MainDevPlugins', 20: 'MeshGeneral', 30: 'UserGeneral', 31: 'UserEvents', 6: 'ServerGeneral', 40: 'ServerStats', 41: 'ServerTrace', 42: 'ServerPlugins', 115: 'ServerConsole' };
|
||||
var panels = { 10: 'MainDev', 11: 'MainDevDesktop', 12: 'MainDevTerminal', 13: 'MainDevFiles', 14: 'MainDevAmt', 15: 'MainDevConsole', 16: 'MainDevEvents', 17: 'MainDevInfo', 19: 'MainDevPlugins', 20: 'MeshGeneral', 21: 'MeshSummary', 30: 'UserGeneral', 31: 'UserEvents', 6: 'ServerGeneral', 40: 'ServerStats', 41: 'ServerTrace', 42: 'ServerPlugins', 115: 'ServerConsole' };
|
||||
for (var i in panels) {
|
||||
QC(panels[i]).remove('style3x');
|
||||
QC(panels[i]).remove('style3sel');
|
||||
|
@ -9565,6 +9678,9 @@
|
|||
// MyServer Plugins
|
||||
if (x == 42) { refreshPluginLatest(); }
|
||||
|
||||
// Update Mesh Summary
|
||||
if (x == 21) { p21updateMesh(); }
|
||||
|
||||
// Update the web page title
|
||||
if ((currentNode) && (x >= 10) && (x < 20)) {
|
||||
document.title = decodeURIComponent('{{{extitle}}}') + ' - ' + currentNode.name + ' - ' + meshes[currentNode.meshid].name;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<!-- right click menu -->
|
||||
<div id="contextMenu" class="contextMenu noselect" style="display:none">
|
||||
<div id="cxinfo" class="cmtext" onclick="cmaction(1,event)"><b>Informatie</b></div>
|
||||
<div id="cxdesktop" class="cmtext" onclick="cmaction(3,event)">bureaublad</div>
|
||||
<div id="cxdesktop" class="cmtext" onclick="cmaction(3,event)">Bureaublad</div>
|
||||
<div id="cxterminal" class="cmtext" onclick="cmaction(2,event)">Terminal</div>
|
||||
<div id="cxfiles" class="cmtext" onclick="cmaction(4,event)">Bestanden</div>
|
||||
<div id="cxevents" class="cmtext" onclick="cmaction(5,event)">Gebeurtenissen</div>
|
||||
|
@ -128,7 +128,7 @@
|
|||
<table id="MainSubMenu" cellpadding="0" cellspacing="0" class="style1">
|
||||
<tbody><tr>
|
||||
<td tabindex="0" id="MainDev" class="topbar_td style3x" onclick="go(10,event)" onkeypress="if (event.key == 'Enter') go(10)">Algemeen</td>
|
||||
<td tabindex="0" id="MainDevDesktop" class="topbar_td style3x" onclick="go(11,event)" onkeypress="if (event.key == 'Enter') go(11)">bureaublad</td>
|
||||
<td tabindex="0" id="MainDevDesktop" class="topbar_td style3x" onclick="go(11,event)" onkeypress="if (event.key == 'Enter') go(11)">Bureaublad</td>
|
||||
<td tabindex="0" id="MainDevTerminal" class="topbar_td style3x" onclick="go(12,event)" onkeypress="if (event.key == 'Enter') go(12)">Terminal</td>
|
||||
<td tabindex="0" id="MainDevFiles" class="topbar_td style3x" onclick="go(13,event)" onkeypress="if (event.key == 'Enter') go(13)">Bestanden</td>
|
||||
<td tabindex="0" id="MainDevEvents" class="topbar_td style3x" onclick="go(16,event)" onkeypress="if (event.key == 'Enter') go(16)">Gebeurtenissen</td>
|
||||
|
@ -144,6 +144,7 @@
|
|||
<table id="MeshSubMenu" cellpadding="0" cellspacing="0" class="style1">
|
||||
<tbody><tr>
|
||||
<td tabindex="0" id="MeshGeneral" class="topbar_td style3x" onclick="go(20,event)" onkeypress="if (event.key == 'Enter') go(20)">Algemeen</td>
|
||||
<td tabindex="0" id="MeshSummary" class="topbar_td style3x" onclick="go(21,event)" onkeypress="if (event.key == 'Enter') go(21)">Summary</td>
|
||||
<td class="topbar_td_end style3"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
@ -244,7 +245,7 @@
|
|||
<div id="NoMeshesPanel" style="display:none">
|
||||
<table>
|
||||
<tbody><tr>
|
||||
<td valign="top" style="width: 50px">
|
||||
<td valign="top" style="width:50px">
|
||||
<img src="images/info.png">
|
||||
</td>
|
||||
<td>
|
||||
|
@ -777,6 +778,28 @@
|
|||
<h1>Algemeen - <span id="p20meshName"></span></h1>
|
||||
<p id="p20info"></p>
|
||||
</div>
|
||||
<div id="p21" style="display:none">
|
||||
<div style="float:left"><div class="backButton" tabindex="0" onclick="goBack()" title="Terug" onkeypress="if (event.key == 'Enter') goBack()"><div class="backButtonEx"></div></div></div>
|
||||
<h1>Summary - <span id="p21meshName"></span></h1>
|
||||
<div style="width:100%">
|
||||
<div style="display:table;margin:0 auto;">
|
||||
<div style="width:250px;height:250px;display:inline-block;text-align:center">
|
||||
<div style="margin:10px;font-size:16px">Power States</div>
|
||||
<canvas id="meshPowerChart" style="width:250px;height:250px"></canvas>
|
||||
</div>
|
||||
<div id="meshOsChartDiv" style="width:250px;height:250px;display:inline-block;text-align:center">
|
||||
<div style="margin:10px;font-size:16px">Agent Types</div>
|
||||
<canvas id="meshOsChart" style="width:250px;height:250px"></canvas>
|
||||
</div>
|
||||
<div style="width:250px;height:250px;display:inline-block;text-align:center">
|
||||
<div style="margin:10px;font-size:16px">connectiviteit</div>
|
||||
<canvas id="meshConnChart" style="width:250px;height:250px"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br><br>
|
||||
<p id="p21info"></p>
|
||||
</div>
|
||||
<div id="p30" style="display:none">
|
||||
<table style="width:100%" cellpadding="0" cellspacing="0">
|
||||
<tbody><tr>
|
||||
|
@ -1026,6 +1049,7 @@
|
|||
var autoReconnect = true;
|
||||
var powerStatetable = ['', "ingeschakeld", "Slaap", "Slaap", "Slaap", "Slaapstand", "Uitzetten", "Aanwezig"];
|
||||
var StatusStrs = ["Verbroken", "Verbinden...", "Setup...", "Verbonden", "Intel® AMT verbonden"];
|
||||
var agentsStr = ["Onbekend", "Windows 32bit console", "Windows 64bit console", "Windows 32bit service", "Windows 64bit service", "Linux 32bit", "Linux 64bit", "MIPS", "XENx86", "Android ARM", "Linux ARM", "MacOS 32bit", "Android x86", "PogoPlug ARM", "Android APK", "Linux Poky x86-32bit", "MacOS 64bit", "ChromeOS", "Linux Poky x86-64bit", "Linux NoKVM x86-32bit", "Linux NoKVM x86-64bit", "Windows MinCore console", "Windows MinCore service", "NodeJS", "ARM-Linaro", "ARMv6l / ARMv7l", "ARMv8 64bit", "ARMv6l / ARMv7l / NoKVM", "Onbekend", "Onbekend", "FreeBSD x86-64"];
|
||||
var sort = 0;
|
||||
var searchFocus = 0;
|
||||
var mapSearchFocus = 0;
|
||||
|
@ -1232,6 +1256,9 @@
|
|||
// Setup the user interface in the right mode
|
||||
userInterfaceSelectMenu();
|
||||
|
||||
// Setup Mesh summary panel
|
||||
setupMeshSummaryStats();
|
||||
|
||||
// If SSPI or LDAP authentication not used, allow batch account creation.
|
||||
QV('p4UserBatchCreate', (features & 0x00080000) == 0);
|
||||
|
||||
|
@ -1425,7 +1452,7 @@
|
|||
if (updateNaggleFlags & 1) { onSearchInputChanged(); }
|
||||
if (updateNaggleFlags & 2) { onSortSelectChange(false); }
|
||||
if (updateNaggleFlags & 128) { updateMeshes(); }
|
||||
if (updateNaggleFlags & 4) { updateDevices(); }
|
||||
if (updateNaggleFlags & 4) { updateDevices(); if (xxcurrentView == 21) { p21updateMesh(); } }
|
||||
if (updateNaggleFlags & 8) { drawNotifications(); }
|
||||
{{{StartGeoLocationJS}}}if (updateNaggleFlags & 16) { updateMapMarkers(); }{{{EndGeoLocationJS}}}
|
||||
if (updateNaggleFlags & 32) { eventsUpdate(); }
|
||||
|
@ -2638,7 +2665,7 @@
|
|||
var oldviewmode = 0;
|
||||
function updateDevices() {
|
||||
if (nodes == null) { return; }
|
||||
var r = '', c = 0, current = null, count = 0, displayedMeshes = {}, view = Q('viewselect').value, groups = {}, groupCount = {};
|
||||
var r = '', c = 0, current = null, count = 0, scount = 0, displayedMeshes = {}, view = Q('viewselect').value, groups = {}, groupCount = {};
|
||||
QV('xdevices', view < 4);
|
||||
QV('xdevicesmap', view == 4);
|
||||
QV('devListToolbar', view < 3);
|
||||
|
@ -2678,10 +2705,6 @@
|
|||
var deviceBoxWidth = Math.floor(totalDeviceViewWidth / 301);
|
||||
deviceBoxWidth = 301 + Math.floor((totalDeviceViewWidth - (deviceBoxWidth * 301)) / deviceBoxWidth);
|
||||
|
||||
if ((view == 2) && (sort != 3)) {
|
||||
r += '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "Gebruiker" + '<th style=color:gray;width:120px>' + "Adres" + '<th style=color:gray;width:100px>' + "connectiviteit"; //<th style=color:gray;width:100px>State';
|
||||
}
|
||||
|
||||
// Go thru the list of nodes and display them
|
||||
for (var i in nodes) {
|
||||
var node = nodes[i];
|
||||
|
@ -2790,8 +2813,6 @@
|
|||
|
||||
// If displaying devices by groups, sort the group names and display the devices.
|
||||
if (sort == 3) {
|
||||
if (view == 2) { r = '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "Gebruiker" + '<th style=color:gray;width:120px>' + "Adres" + '<th style=color:gray;width:100px>' + "connectiviteit"; }
|
||||
|
||||
var groupNames = [];
|
||||
for (var i in groups) { groupNames.push(i); }
|
||||
groupNames.sort(function (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase()); });
|
||||
|
@ -2842,7 +2863,15 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
r += '</tr></table><div style=height:1px></div>'; // This height of 1 div fixes a problem in Linux firefox browsers
|
||||
|
||||
if (r != '') {
|
||||
if (view == 2) {
|
||||
// This height of 1 div at the end to fix a problem in Linux firefox browsers
|
||||
r = '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "Gebruiker" + '<th style=color:gray;width:120px>' + "Adres" + '<th style=color:gray;width:100px>' + "connectiviteit" + r + '</tr></table><div style=height:1px></div>'; //<th style=color:gray;width:100px>State';
|
||||
}
|
||||
} else {
|
||||
if (sort == 3) { r = '<div style="margin:10px"><i>' + "No devices with tags found." + '</i></div>'; }
|
||||
}
|
||||
|
||||
// Add a "Add Device Group" option
|
||||
r += '<div style=border-top-style:solid;border-top-width:1px;border-top-color:#DDDDDD;cursor:pointer;font-size:10px>';
|
||||
|
@ -3755,7 +3784,7 @@
|
|||
// Build a context menu for a feature
|
||||
var map_cm_nodemenu_items = [
|
||||
{ text: "Algemene informatie", callback: function (obj) { if (obj.data !=null) { gotoDevice(obj.data, 10); } } },
|
||||
{ text: "bureaublad", callback: function (obj) { if (obj.data !=null) { gotoDevice(obj.data, 11); } } },
|
||||
{ text: "Bureaublad", callback: function (obj) { if (obj.data !=null) { gotoDevice(obj.data, 11); } } },
|
||||
{ text: "Terminal", callback: function (obj) { if (obj.data !=null) { gotoDevice(obj.data, 12); } } },
|
||||
{ text: "Intel® AMT", callback: function (obj) { if (obj.data !=null) { gotoDevice(obj.data, 14); } } },
|
||||
'-',
|
||||
|
@ -4386,7 +4415,6 @@
|
|||
}
|
||||
|
||||
// Attribute: Mesh Agent
|
||||
var agentsStr = ["Onbekend", "Windows 32bit console", "Windows 64bit console", "Windows 32bit service", "Windows 64bit service", "Linux 32bit", "Linux 64bit", "MIPS", "XENx86", "Android ARM", "Linux ARM", "MacOS 32bit", "Android x86", "PogoPlug ARM", "Android APK", "Linux Poky x86-32bit", "MacOS 64bit", "ChromeOS", "Linux Poky x86-64bit", "Linux NoKVM x86-32bit", "Linux NoKVM x86-64bit", "Windows MinCore console", "Windows MinCore service", "NodeJS", "ARM-Linaro", "ARMv6l / ARMv7l", "ARMv8 64bit", "ARMv6l / ARMv7l / NoKVM", "Onbekend", "Onbekend", "FreeBSD x86-64"];
|
||||
if ((node.agent != null) && (node.agent.id != null) && (node.agent.ver != null)) {
|
||||
var str = '';
|
||||
if (node.agent.id <= agentsStr.length) { str = agentsStr[node.agent.id]; } else { str = agentsStr[0]; }
|
||||
|
@ -7360,7 +7388,7 @@
|
|||
var consent = 0;
|
||||
if (currentMesh.consent) { consent = currentMesh.consent; }
|
||||
if (serverinfo.consent) { consent |= serverinfo.consent; }
|
||||
if ((consent & 0x0040) && (consent & 0x0008)) { meshFeatures.push("Bureaublad vraag en werkbalk"); } else if (consent & 0x0040) { meshFeatures.push("Bureaublad werkbalk"); } else if (consent & 0x0008) { meshFeatures.push("Bureaublad vraag"); } else { if (consent & 0x0001) { meshFeatures.push("bureaublad melding"); } }
|
||||
if ((consent & 0x0040) && (consent & 0x0008)) { meshFeatures.push("Bureaublad vraag en werkbalk"); } else if (consent & 0x0040) { meshFeatures.push("Bureaublad werkbalk"); } else if (consent & 0x0008) { meshFeatures.push("Bureaublad vraag"); } else { if (consent & 0x0001) { meshFeatures.push("Bureaublad melding"); } }
|
||||
if (consent & 0x0010) { meshFeatures.push("Terminal Prompt"); } else { if (consent & 0x0002) { meshFeatures.push("Terminal melding"); } }
|
||||
if (consent & 0x0020) { meshFeatures.push("Bestanden vragen"); } else { if (consent & 0x0004) { meshFeatures.push("Bestanden Melden"); } }
|
||||
if (consent == 7) { meshFeatures = ["Altijd informeren"]; }
|
||||
|
@ -7559,7 +7587,7 @@
|
|||
function p20editmeshconsent() {
|
||||
if (xxdialogMode) return;
|
||||
var x = '', consent = (currentMesh.consent) ? currentMesh.consent : 0;
|
||||
x += '<div style="width:100%;border-bottom:1px solid gray;margin-bottom:5px"><b>' + "bureaublad" + '</b></div>';
|
||||
x += '<div style="width:100%;border-bottom:1px solid gray;margin-bottom:5px"><b>' + "Bureaublad" + '</b></div>';
|
||||
x += '<div><label><input type=checkbox id=d20flag1 ' + ((consent & 0x0001) ? 'checked' : '') + '>' + "Gebruiker informeren" + '</label></div>';
|
||||
x += '<div><label><input type=checkbox id=d20flag2 ' + ((consent & 0x0008) ? 'checked' : '') + '>' + "Vragen gebruikerstoestemming" + '</label></div>';
|
||||
x += '<div><label><input type=checkbox id=d20flag7 ' + ((consent & 0x0040) ? 'checked' : '') + '>' + "Toon verbindingswerkbalk" + '</label></div>';
|
||||
|
@ -7851,6 +7879,91 @@
|
|||
meshserver.send({ action: 'changemeshnotify', meshid: currentMesh._id, notify: meshNotify });
|
||||
}
|
||||
|
||||
//
|
||||
// Mesh Summary
|
||||
//
|
||||
|
||||
function setupMeshSummaryStats() {
|
||||
window.meshPowerChart = new Chart(document.getElementById('meshPowerChart').getContext('2d'), {
|
||||
type: 'doughnut',
|
||||
data: { datasets: [{ data: [0, 0], backgroundColor: ['#20F', '#40D', '#60B', '#809', '#A07', '#C05'] }] },
|
||||
options: { responsive: true, legend: { position: 'none' }, animation: { animateScale: true, animateRotate: true } }
|
||||
});
|
||||
window.meshOsChart = new Chart(document.getElementById('meshOsChart').getContext('2d'), {
|
||||
type: 'doughnut',
|
||||
data: { datasets: [{ data: [0, 0], backgroundColor: ['#20F', '#40D', '#60B', '#809', '#A07', '#C05'] }] },
|
||||
options: { responsive: true, legend: { position: 'none' }, animation: { animateScale: true, animateRotate: true } }
|
||||
});
|
||||
window.meshConnChart = new Chart(document.getElementById('meshConnChart').getContext('2d'), {
|
||||
type: 'doughnut',
|
||||
data: { datasets: [{ data: [0, 0], backgroundColor: ['#20F', '#40D', '#60B', '#809', '#A07', '#C05'] }], labels: ["Not Connected", "Agent", "Intel AMT", "Agent + Intel AMT"] },
|
||||
options: { responsive: true, legend: { position: 'none' }, animation: { animateScale: true, animateRotate: true } }
|
||||
});
|
||||
}
|
||||
|
||||
function p21updateMesh() {
|
||||
if (currentMesh == null) return;
|
||||
QH('p21meshName', EscapeHtml(currentMesh.name));
|
||||
|
||||
// Update charts
|
||||
var power = {};
|
||||
var conn = {};
|
||||
var agentTypes = {};
|
||||
var powerStates = {};
|
||||
var connectivityStates = [ 0, 0, 0, 0 ]; // None, Agent, AMT, Agent + AMT
|
||||
for (var i in nodes) {
|
||||
if (nodes[i].meshid == currentMesh._id) {
|
||||
if (nodes[i].agent) { if (agentTypes[nodes[i].agent.id] == null) { agentTypes[nodes[i].agent.id] = 1; } else { agentTypes[nodes[i].agent.id]++; } }
|
||||
if (nodes[i].pwr) { if (powerStates[nodes[i].pwr] == null) { powerStates[nodes[i].pwr] = 1; } else { powerStates[nodes[i].pwr]++; } }
|
||||
if (nodes[i].conn == 0) {
|
||||
connectivityStates[0]++; }
|
||||
else if ((nodes[i].conn & 6) != 0) { if ((nodes[i].conn & 1) != 0) { connectivityStates[3]++; } else { connectivityStates[2]++; } }
|
||||
else if ((nodes[i].conn & 1) != 0) { connectivityStates[1]++; }
|
||||
}
|
||||
}
|
||||
|
||||
var agentsData = [], agentsLabels = [], powerData = [], powerLabels = [];
|
||||
for (var i in agentTypes) { agentsData.push(agentTypes[i]); agentsLabels.push(agentsStr[i]); }
|
||||
for (var i in powerStates) { powerData.push(powerStates[i]); powerLabels.push(powerStatetable[i]); }
|
||||
window.meshPowerChart.config.data.datasets[0].data = powerData;
|
||||
window.meshPowerChart.config.data.labels = powerLabels;
|
||||
window.meshPowerChart.update();
|
||||
if (currentMesh.mtype == 2) {
|
||||
window.meshOsChart.config.data.datasets[0].data = agentsData;
|
||||
window.meshOsChart.config.data.labels = agentsLabels;
|
||||
window.meshOsChart.update();
|
||||
}
|
||||
window.meshConnChart.config.data.datasets[0].data = connectivityStates;
|
||||
window.meshConnChart.update();
|
||||
|
||||
// Only show the OS chart if the mesh is agent type.
|
||||
QS('meshOsChartDiv')['display'] = (currentMesh.mtype == 2)?'inline-block':'none';
|
||||
|
||||
// Update tables
|
||||
var x = '<br />', count = 0;
|
||||
if (powerData.length > 0) {
|
||||
count = 0;
|
||||
x += '<table style="margin-top:10px;color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>' + "Power States" + '</th><th scope=col style=text-align:left></th></tr>';
|
||||
for (var i in powerStates) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + powerStatetable[i] + '<div></div></div></td><td><div style=float:right>' + powerStates[i] + ' </div><div></div></td></tr>'; }
|
||||
x += '</tbody></table>';
|
||||
}
|
||||
|
||||
if ((agentsData.length > 0) && (currentMesh.mtype == 2)) {
|
||||
x += '<table style="margin-top:10px;color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>' + "Agent Types" + '</th><th scope=col style=text-align:left></th></tr>';
|
||||
for (var i in agentTypes) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + agentsStr[i] + '<div></div></div></td><td><div style=float:right>' + agentTypes[i] + ' </div><div></div></td></tr>'; }
|
||||
x += '</tbody></table>';
|
||||
}
|
||||
|
||||
count = 0;
|
||||
x += '<table style="margin-top:10px;color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>' + "Power States" + '</th><th scope=col style=text-align:left></th></tr>';
|
||||
if (connectivityStates[0] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Not Connected" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[0] + ' </div><div></div></td></tr>'; }
|
||||
if (connectivityStates[1] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Agent" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[1] + ' </div><div></div></td></tr>'; }
|
||||
if (connectivityStates[2] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Intel AMT" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[2] + ' </div><div></div></td></tr>'; }
|
||||
if (connectivityStates[3] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Agent + Intel AMT" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[3] + ' </div><div></div></td></tr>'; }
|
||||
x += '</tbody></table>';
|
||||
QH('p21info', x);
|
||||
}
|
||||
|
||||
//
|
||||
// MY FILES
|
||||
//
|
||||
|
@ -8333,8 +8446,8 @@
|
|||
if (sessions != null) {
|
||||
gray = '';
|
||||
if (self) {
|
||||
msg = '<span style=float:right;margin-top:1px;margin-right:4px title=' + "Chat" + '><a href=# onclick=userChat(event,\"" + encodeURIComponent(user._id) + "\",\"" + encodeURIComponent(user.name) + "\")><img src=\'images/icon-chat.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
msg += '<span style=float:right;margin-top:1px;margin-left:4px;margin-right:4px title=Notify><a href=# onclick=\'return showUserAlertDialog(event,\"" + encodeURIComponent(user._id) + "\")\'><img src=\'images/icon-notify.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
msg = '<span style=float:right;margin-top:1px;margin-right:4px title=' + "Chat" + '><a href=# onclick=userChat(event,\"' + encodeURIComponent(user._id) + '\",\"' + encodeURIComponent(user.name) + '\")><img src=\'images/icon-chat.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
msg += '<span style=float:right;margin-top:1px;margin-left:4px;margin-right:4px title=Notify><a href=# onclick=\'return showUserAlertDialog(event,\"' + encodeURIComponent(user._id) + '\")\'><img src=\'images/icon-notify.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
}
|
||||
if (sessions == 1) { lastAccess += nobreak("1 sessie"); } else { lastAccess += nobreak(format("{0} sessies", sessions)); }
|
||||
} else {
|
||||
|
@ -9538,7 +9651,7 @@
|
|||
QV('MeshSubMenuSpan', x >= 20 && x < 30);
|
||||
QV('UserSubMenuSpan', x >= 30 && x < 40);
|
||||
QV('ServerSubMenuSpan', x == 6 || x == 115 || x == 40 || x == 41 || x == 42 || x == 43);
|
||||
var panels = { 10: 'MainDev', 11: 'MainDevDesktop', 12: 'MainDevTerminal', 13: 'MainDevFiles', 14: 'MainDevAmt', 15: 'MainDevConsole', 16: 'MainDevEvents', 17: 'MainDevInfo', 19: 'MainDevPlugins', 20: 'MeshGeneral', 30: 'UserGeneral', 31: 'UserEvents', 6: 'ServerGeneral', 40: 'ServerStats', 41: 'ServerTrace', 42: 'ServerPlugins', 115: 'ServerConsole' };
|
||||
var panels = { 10: 'MainDev', 11: 'MainDevDesktop', 12: 'MainDevTerminal', 13: 'MainDevFiles', 14: 'MainDevAmt', 15: 'MainDevConsole', 16: 'MainDevEvents', 17: 'MainDevInfo', 19: 'MainDevPlugins', 20: 'MeshGeneral', 21: 'MeshSummary', 30: 'UserGeneral', 31: 'UserEvents', 6: 'ServerGeneral', 40: 'ServerStats', 41: 'ServerTrace', 42: 'ServerPlugins', 115: 'ServerConsole' };
|
||||
for (var i in panels) {
|
||||
QC(panels[i]).remove('style3x');
|
||||
QC(panels[i]).remove('style3sel');
|
||||
|
@ -9565,6 +9678,9 @@
|
|||
// MyServer Plugins
|
||||
if (x == 42) { refreshPluginLatest(); }
|
||||
|
||||
// Update Mesh Summary
|
||||
if (x == 21) { p21updateMesh(); }
|
||||
|
||||
// Update the web page title
|
||||
if ((currentNode) && (x >= 10) && (x < 20)) {
|
||||
document.title = decodeURIComponent('{{{extitle}}}') + ' - ' + currentNode.name + ' - ' + meshes[currentNode.meshid].name;
|
||||
|
|
|
@ -144,6 +144,7 @@
|
|||
<table id="MeshSubMenu" cellpadding="0" cellspacing="0" class="style1">
|
||||
<tbody><tr>
|
||||
<td tabindex="0" id="MeshGeneral" class="topbar_td style3x" onclick="go(20,event)" onkeypress="if (event.key == 'Enter') go(20)">Geral</td>
|
||||
<td tabindex="0" id="MeshSummary" class="topbar_td style3x" onclick="go(21,event)" onkeypress="if (event.key == 'Enter') go(21)">Summary</td>
|
||||
<td class="topbar_td_end style3"> </td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
@ -244,7 +245,7 @@
|
|||
<div id="NoMeshesPanel" style="display:none">
|
||||
<table>
|
||||
<tbody><tr>
|
||||
<td valign="top" style="width: 50px">
|
||||
<td valign="top" style="width:50px">
|
||||
<img src="images/info.png">
|
||||
</td>
|
||||
<td>
|
||||
|
@ -777,6 +778,28 @@
|
|||
<h1>Geral - <span id="p20meshName"></span></h1>
|
||||
<p id="p20info"></p>
|
||||
</div>
|
||||
<div id="p21" style="display:none">
|
||||
<div style="float:left"><div class="backButton" tabindex="0" onclick="goBack()" title="Voltar" onkeypress="if (event.key == 'Enter') goBack()"><div class="backButtonEx"></div></div></div>
|
||||
<h1>Summary - <span id="p21meshName"></span></h1>
|
||||
<div style="width:100%">
|
||||
<div style="display:table;margin:0 auto;">
|
||||
<div style="width:250px;height:250px;display:inline-block;text-align:center">
|
||||
<div style="margin:10px;font-size:16px">Power States</div>
|
||||
<canvas id="meshPowerChart" style="width:250px;height:250px"></canvas>
|
||||
</div>
|
||||
<div id="meshOsChartDiv" style="width:250px;height:250px;display:inline-block;text-align:center">
|
||||
<div style="margin:10px;font-size:16px">Agent Types</div>
|
||||
<canvas id="meshOsChart" style="width:250px;height:250px"></canvas>
|
||||
</div>
|
||||
<div style="width:250px;height:250px;display:inline-block;text-align:center">
|
||||
<div style="margin:10px;font-size:16px">Conectividade</div>
|
||||
<canvas id="meshConnChart" style="width:250px;height:250px"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br><br>
|
||||
<p id="p21info"></p>
|
||||
</div>
|
||||
<div id="p30" style="display:none">
|
||||
<table style="width:100%" cellpadding="0" cellspacing="0">
|
||||
<tbody><tr>
|
||||
|
@ -1026,6 +1049,7 @@
|
|||
var autoReconnect = true;
|
||||
var powerStatetable = ['', "Ligado", "Hibernar", "Hibernar", "Hibernar", "Hibernando", "Desligar", "Presente"];
|
||||
var StatusStrs = ["Desconectado", "Conectando...", "Configurando...", "Conectado", "Intel® AMT conectado"];
|
||||
var agentsStr = ["Desconhecido", "Windows 32 Bits console", "Windows 64 Bits console", "Serviço Windows 32 Bits", "Serviço Windows 64 Bits", "Linux 32 bits", "Linux 64 bits", "MIPS", "XENx86", "Android ARM", "Linux ARM", "MacOS 32 bits", "Android x86", "PogoPlug ARM", "Android APK", "Linux Poky x86-32 bits", "MacOS 64 bits", "ChromeOS", "Linux Poky x86-64 bits", "Linux NoKVM x86-32 bits", "Linux NoKVM x86-64 bits", "Windows MinCore console", "Windows MinCore service", "NodeJS", "ARM-Linaro", "ARMv6l / ARMv7l", "ARMv8 64bit", "ARMv6l / ARMv7l / NoKVM", "Desconhecido", "Desconhecido", "FreeBSD x86-64"];
|
||||
var sort = 0;
|
||||
var searchFocus = 0;
|
||||
var mapSearchFocus = 0;
|
||||
|
@ -1232,6 +1256,9 @@
|
|||
// Setup the user interface in the right mode
|
||||
userInterfaceSelectMenu();
|
||||
|
||||
// Setup Mesh summary panel
|
||||
setupMeshSummaryStats();
|
||||
|
||||
// If SSPI or LDAP authentication not used, allow batch account creation.
|
||||
QV('p4UserBatchCreate', (features & 0x00080000) == 0);
|
||||
|
||||
|
@ -1425,7 +1452,7 @@
|
|||
if (updateNaggleFlags & 1) { onSearchInputChanged(); }
|
||||
if (updateNaggleFlags & 2) { onSortSelectChange(false); }
|
||||
if (updateNaggleFlags & 128) { updateMeshes(); }
|
||||
if (updateNaggleFlags & 4) { updateDevices(); }
|
||||
if (updateNaggleFlags & 4) { updateDevices(); if (xxcurrentView == 21) { p21updateMesh(); } }
|
||||
if (updateNaggleFlags & 8) { drawNotifications(); }
|
||||
{{{StartGeoLocationJS}}}if (updateNaggleFlags & 16) { updateMapMarkers(); }{{{EndGeoLocationJS}}}
|
||||
if (updateNaggleFlags & 32) { eventsUpdate(); }
|
||||
|
@ -2638,7 +2665,7 @@
|
|||
var oldviewmode = 0;
|
||||
function updateDevices() {
|
||||
if (nodes == null) { return; }
|
||||
var r = '', c = 0, current = null, count = 0, displayedMeshes = {}, view = Q('viewselect').value, groups = {}, groupCount = {};
|
||||
var r = '', c = 0, current = null, count = 0, scount = 0, displayedMeshes = {}, view = Q('viewselect').value, groups = {}, groupCount = {};
|
||||
QV('xdevices', view < 4);
|
||||
QV('xdevicesmap', view == 4);
|
||||
QV('devListToolbar', view < 3);
|
||||
|
@ -2678,10 +2705,6 @@
|
|||
var deviceBoxWidth = Math.floor(totalDeviceViewWidth / 301);
|
||||
deviceBoxWidth = 301 + Math.floor((totalDeviceViewWidth - (deviceBoxWidth * 301)) / deviceBoxWidth);
|
||||
|
||||
if ((view == 2) && (sort != 3)) {
|
||||
r += '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "Do utilizador" + '<th style=color:gray;width:120px>' + "Endereço" + '<th style=color:gray;width:100px>' + "Conectividade"; //<th style=color:gray;width:100px>State';
|
||||
}
|
||||
|
||||
// Go thru the list of nodes and display them
|
||||
for (var i in nodes) {
|
||||
var node = nodes[i];
|
||||
|
@ -2790,8 +2813,6 @@
|
|||
|
||||
// If displaying devices by groups, sort the group names and display the devices.
|
||||
if (sort == 3) {
|
||||
if (view == 2) { r = '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "Do utilizador" + '<th style=color:gray;width:120px>' + "Endereço" + '<th style=color:gray;width:100px>' + "Conectividade"; }
|
||||
|
||||
var groupNames = [];
|
||||
for (var i in groups) { groupNames.push(i); }
|
||||
groupNames.sort(function (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase()); });
|
||||
|
@ -2842,7 +2863,15 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
r += '</tr></table><div style=height:1px></div>'; // This height of 1 div fixes a problem in Linux firefox browsers
|
||||
|
||||
if (r != '') {
|
||||
if (view == 2) {
|
||||
// This height of 1 div at the end to fix a problem in Linux firefox browsers
|
||||
r = '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "Do utilizador" + '<th style=color:gray;width:120px>' + "Endereço" + '<th style=color:gray;width:100px>' + "Conectividade" + r + '</tr></table><div style=height:1px></div>'; //<th style=color:gray;width:100px>State';
|
||||
}
|
||||
} else {
|
||||
if (sort == 3) { r = '<div style="margin:10px"><i>' + "No devices with tags found." + '</i></div>'; }
|
||||
}
|
||||
|
||||
// Add a "Add Device Group" option
|
||||
r += '<div style=border-top-style:solid;border-top-width:1px;border-top-color:#DDDDDD;cursor:pointer;font-size:10px>';
|
||||
|
@ -4386,7 +4415,6 @@
|
|||
}
|
||||
|
||||
// Attribute: Mesh Agent
|
||||
var agentsStr = ["Desconhecido", "Windows 32 Bits console", "Windows 64 Bits console", "Serviço Windows 32 Bits", "Serviço Windows 64 Bits", "Linux 32 bits", "Linux 64 bits", "MIPS", "XENx86", "Android ARM", "Linux ARM", "MacOS 32 bits", "Android x86", "PogoPlug ARM", "Android APK", "Linux Poky x86-32 bits", "MacOS 64 bits", "ChromeOS", "Linux Poky x86-64 bits", "Linux NoKVM x86-32 bits", "Linux NoKVM x86-64 bits", "Windows MinCore console", "Windows MinCore service", "NodeJS", "ARM-Linaro", "ARMv6l / ARMv7l", "ARMv8 64bit", "ARMv6l / ARMv7l / NoKVM", "Desconhecido", "Desconhecido", "FreeBSD x86-64"];
|
||||
if ((node.agent != null) && (node.agent.id != null) && (node.agent.ver != null)) {
|
||||
var str = '';
|
||||
if (node.agent.id <= agentsStr.length) { str = agentsStr[node.agent.id]; } else { str = agentsStr[0]; }
|
||||
|
@ -7851,6 +7879,91 @@
|
|||
meshserver.send({ action: 'changemeshnotify', meshid: currentMesh._id, notify: meshNotify });
|
||||
}
|
||||
|
||||
//
|
||||
// Mesh Summary
|
||||
//
|
||||
|
||||
function setupMeshSummaryStats() {
|
||||
window.meshPowerChart = new Chart(document.getElementById('meshPowerChart').getContext('2d'), {
|
||||
type: 'doughnut',
|
||||
data: { datasets: [{ data: [0, 0], backgroundColor: ['#20F', '#40D', '#60B', '#809', '#A07', '#C05'] }] },
|
||||
options: { responsive: true, legend: { position: 'none' }, animation: { animateScale: true, animateRotate: true } }
|
||||
});
|
||||
window.meshOsChart = new Chart(document.getElementById('meshOsChart').getContext('2d'), {
|
||||
type: 'doughnut',
|
||||
data: { datasets: [{ data: [0, 0], backgroundColor: ['#20F', '#40D', '#60B', '#809', '#A07', '#C05'] }] },
|
||||
options: { responsive: true, legend: { position: 'none' }, animation: { animateScale: true, animateRotate: true } }
|
||||
});
|
||||
window.meshConnChart = new Chart(document.getElementById('meshConnChart').getContext('2d'), {
|
||||
type: 'doughnut',
|
||||
data: { datasets: [{ data: [0, 0], backgroundColor: ['#20F', '#40D', '#60B', '#809', '#A07', '#C05'] }], labels: ["Not Connected", "Agente", "Intel AMT", "Agent + Intel AMT"] },
|
||||
options: { responsive: true, legend: { position: 'none' }, animation: { animateScale: true, animateRotate: true } }
|
||||
});
|
||||
}
|
||||
|
||||
function p21updateMesh() {
|
||||
if (currentMesh == null) return;
|
||||
QH('p21meshName', EscapeHtml(currentMesh.name));
|
||||
|
||||
// Update charts
|
||||
var power = {};
|
||||
var conn = {};
|
||||
var agentTypes = {};
|
||||
var powerStates = {};
|
||||
var connectivityStates = [ 0, 0, 0, 0 ]; // None, Agent, AMT, Agent + AMT
|
||||
for (var i in nodes) {
|
||||
if (nodes[i].meshid == currentMesh._id) {
|
||||
if (nodes[i].agent) { if (agentTypes[nodes[i].agent.id] == null) { agentTypes[nodes[i].agent.id] = 1; } else { agentTypes[nodes[i].agent.id]++; } }
|
||||
if (nodes[i].pwr) { if (powerStates[nodes[i].pwr] == null) { powerStates[nodes[i].pwr] = 1; } else { powerStates[nodes[i].pwr]++; } }
|
||||
if (nodes[i].conn == 0) {
|
||||
connectivityStates[0]++; }
|
||||
else if ((nodes[i].conn & 6) != 0) { if ((nodes[i].conn & 1) != 0) { connectivityStates[3]++; } else { connectivityStates[2]++; } }
|
||||
else if ((nodes[i].conn & 1) != 0) { connectivityStates[1]++; }
|
||||
}
|
||||
}
|
||||
|
||||
var agentsData = [], agentsLabels = [], powerData = [], powerLabels = [];
|
||||
for (var i in agentTypes) { agentsData.push(agentTypes[i]); agentsLabels.push(agentsStr[i]); }
|
||||
for (var i in powerStates) { powerData.push(powerStates[i]); powerLabels.push(powerStatetable[i]); }
|
||||
window.meshPowerChart.config.data.datasets[0].data = powerData;
|
||||
window.meshPowerChart.config.data.labels = powerLabels;
|
||||
window.meshPowerChart.update();
|
||||
if (currentMesh.mtype == 2) {
|
||||
window.meshOsChart.config.data.datasets[0].data = agentsData;
|
||||
window.meshOsChart.config.data.labels = agentsLabels;
|
||||
window.meshOsChart.update();
|
||||
}
|
||||
window.meshConnChart.config.data.datasets[0].data = connectivityStates;
|
||||
window.meshConnChart.update();
|
||||
|
||||
// Only show the OS chart if the mesh is agent type.
|
||||
QS('meshOsChartDiv')['display'] = (currentMesh.mtype == 2)?'inline-block':'none';
|
||||
|
||||
// Update tables
|
||||
var x = '<br />', count = 0;
|
||||
if (powerData.length > 0) {
|
||||
count = 0;
|
||||
x += '<table style="margin-top:10px;color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>' + "Power States" + '</th><th scope=col style=text-align:left></th></tr>';
|
||||
for (var i in powerStates) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + powerStatetable[i] + '<div></div></div></td><td><div style=float:right>' + powerStates[i] + ' </div><div></div></td></tr>'; }
|
||||
x += '</tbody></table>';
|
||||
}
|
||||
|
||||
if ((agentsData.length > 0) && (currentMesh.mtype == 2)) {
|
||||
x += '<table style="margin-top:10px;color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>' + "Agent Types" + '</th><th scope=col style=text-align:left></th></tr>';
|
||||
for (var i in agentTypes) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + agentsStr[i] + '<div></div></div></td><td><div style=float:right>' + agentTypes[i] + ' </div><div></div></td></tr>'; }
|
||||
x += '</tbody></table>';
|
||||
}
|
||||
|
||||
count = 0;
|
||||
x += '<table style="margin-top:10px;color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>' + "Power States" + '</th><th scope=col style=text-align:left></th></tr>';
|
||||
if (connectivityStates[0] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Not Connected" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[0] + ' </div><div></div></td></tr>'; }
|
||||
if (connectivityStates[1] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Agente" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[1] + ' </div><div></div></td></tr>'; }
|
||||
if (connectivityStates[2] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Intel AMT" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[2] + ' </div><div></div></td></tr>'; }
|
||||
if (connectivityStates[3] > 0) { x += '<tr style=' + (((++count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><divclass=m2></div><div> ' + "Agent + Intel AMT" + '<div></div></div></td><td><div style=float:right>' + connectivityStates[3] + ' </div><div></div></td></tr>'; }
|
||||
x += '</tbody></table>';
|
||||
QH('p21info', x);
|
||||
}
|
||||
|
||||
//
|
||||
// MY FILES
|
||||
//
|
||||
|
@ -8333,8 +8446,8 @@
|
|||
if (sessions != null) {
|
||||
gray = '';
|
||||
if (self) {
|
||||
msg = '<span style=float:right;margin-top:1px;margin-right:4px title=' + "Chat" + '><a href=# onclick=userChat(event,\"" + encodeURIComponent(user._id) + "\",\"" + encodeURIComponent(user.name) + "\")><img src=\'images/icon-chat.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
msg += '<span style=float:right;margin-top:1px;margin-left:4px;margin-right:4px title=Notify><a href=# onclick=\'return showUserAlertDialog(event,\"" + encodeURIComponent(user._id) + "\")\'><img src=\'images/icon-notify.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
msg = '<span style=float:right;margin-top:1px;margin-right:4px title=' + "Chat" + '><a href=# onclick=userChat(event,\"' + encodeURIComponent(user._id) + '\",\"' + encodeURIComponent(user.name) + '\")><img src=\'images/icon-chat.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
msg += '<span style=float:right;margin-top:1px;margin-left:4px;margin-right:4px title=Notify><a href=# onclick=\'return showUserAlertDialog(event,\"' + encodeURIComponent(user._id) + '\")\'><img src=\'images/icon-notify.png\' height=16 width=16 style=padding-top:2px /></a></span>';
|
||||
}
|
||||
if (sessions == 1) { lastAccess += nobreak("1 sessão"); } else { lastAccess += nobreak(format("{0} sessões", sessions)); }
|
||||
} else {
|
||||
|
@ -9538,7 +9651,7 @@
|
|||
QV('MeshSubMenuSpan', x >= 20 && x < 30);
|
||||
QV('UserSubMenuSpan', x >= 30 && x < 40);
|
||||
QV('ServerSubMenuSpan', x == 6 || x == 115 || x == 40 || x == 41 || x == 42 || x == 43);
|
||||
var panels = { 10: 'MainDev', 11: 'MainDevDesktop', 12: 'MainDevTerminal', 13: 'MainDevFiles', 14: 'MainDevAmt', 15: 'MainDevConsole', 16: 'MainDevEvents', 17: 'MainDevInfo', 19: 'MainDevPlugins', 20: 'MeshGeneral', 30: 'UserGeneral', 31: 'UserEvents', 6: 'ServerGeneral', 40: 'ServerStats', 41: 'ServerTrace', 42: 'ServerPlugins', 115: 'ServerConsole' };
|
||||
var panels = { 10: 'MainDev', 11: 'MainDevDesktop', 12: 'MainDevTerminal', 13: 'MainDevFiles', 14: 'MainDevAmt', 15: 'MainDevConsole', 16: 'MainDevEvents', 17: 'MainDevInfo', 19: 'MainDevPlugins', 20: 'MeshGeneral', 21: 'MeshSummary', 30: 'UserGeneral', 31: 'UserEvents', 6: 'ServerGeneral', 40: 'ServerStats', 41: 'ServerTrace', 42: 'ServerPlugins', 115: 'ServerConsole' };
|
||||
for (var i in panels) {
|
||||
QC(panels[i]).remove('style3x');
|
||||
QC(panels[i]).remove('style3sel');
|
||||
|
@ -9565,6 +9678,9 @@
|
|||
// MyServer Plugins
|
||||
if (x == 42) { refreshPluginLatest(); }
|
||||
|
||||
// Update Mesh Summary
|
||||
if (x == 21) { p21updateMesh(); }
|
||||
|
||||
// Update the web page title
|
||||
if ((currentNode) && (x >= 10) && (x < 20)) {
|
||||
document.title = decodeURIComponent('{{{extitle}}}') + ' - ' + currentNode.name + ' - ' + meshes[currentNode.meshid].name;
|
||||
|
|
27
webserver.js
27
webserver.js
|
@ -4000,15 +4000,24 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||
}
|
||||
|
||||
// Return the correct render page arguments.
|
||||
function getRenderArgs(args, domain) {
|
||||
args.titlehtml = domain.titlehtml;
|
||||
args.title = domain.title;
|
||||
args.title1 = (domain.titlehtml == null) ? domain.title : '';
|
||||
args.title2 = (domain.titlehtml == null) ? domain.title2 : '';
|
||||
args.extitle = encodeURIComponent(domain.title);
|
||||
args.extitle2 = encodeURIComponent(domain.title2);
|
||||
args.domainurl = domain.url;
|
||||
return args;
|
||||
function getRenderArgs(xargs, domain) {
|
||||
xargs.titlehtml = domain.titlehtml;
|
||||
xargs.title = (domain.title != null) ? domain.title : 'MeshCentral';
|
||||
if ((domain.titlepicture == null) && (domain.titlehtml == null)) {
|
||||
if (domain.title == null) {
|
||||
xargs.title1 = 'MeshCentral';
|
||||
xargs.title2 = '2.0';
|
||||
} else {
|
||||
xargs.title1 = domain.title;
|
||||
xargs.title2 = domain.title2 ? domain.title2 : '';
|
||||
}
|
||||
} else {
|
||||
xargs.title1 = domain.title1 ? domain.title1 : '';
|
||||
xargs.title2 = (args.title1 && domain.title2) ? domain.title2 : '';
|
||||
}
|
||||
xargs.extitle = encodeURIComponent(xargs.title);
|
||||
xargs.domainurl = domain.url;
|
||||
return xargs;
|
||||
}
|
||||
|
||||
// Route a command from a agent. domainid, nodeid and meshid are the values of the source agent.
|
||||
|
|
Loading…
Reference in New Issue