mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added restricted agent notice, show power state on device tab when sleeping/soft-off.
This commit is contained in:
parent
7850f6d359
commit
dceba48a27
5 changed files with 2227 additions and 2204 deletions
|
@ -2861,7 +2861,9 @@
|
|||
|
||||
// Show the notification
|
||||
if (n & 2) {
|
||||
if (((node.conn & 1) == 0) && ((message.event.conn & 1) != 0)) { addNotification({ text: "Agent connected", title: node.name, icon: node.icon, nodeid: node._id }); }
|
||||
var agentPrivilages = '';
|
||||
if ((node.agent != null) && (node.agent.root === false)) { agentPrivilages = ', <span title="' + "Agent is running on remote device with reduced privilages." + '">' + "Restricted" + '</span>'; }
|
||||
if (((node.conn & 1) == 0) && ((message.event.conn & 1) != 0)) { addNotification({ text: "Agent connected" + agentPrivilages, title: node.name, icon: node.icon, nodeid: node._id }); }
|
||||
if (((node.conn & 2) == 0) && ((message.event.conn & 2) != 0)) { addNotification({ text: "Intel® AMT detected", title: node.name, icon: node.icon, nodeid: node._id }); }
|
||||
if (((node.conn & 4) == 0) && ((message.event.conn & 4) != 0)) { addNotification({ text: "Intel® AMT CIRA connected", title: node.name, icon: node.icon, nodeid: node._id }); }
|
||||
if (((node.conn & 16) == 0) && ((message.event.conn & 16) != 0)) { addNotification({ text: "MQTT connected", title: node.name, icon: node.icon, nodeid: node._id }); }
|
||||
|
@ -5840,11 +5842,14 @@
|
|||
// Set the node power state
|
||||
var powerstate = PowerStateStr(node.state);
|
||||
//if (node.state == 0) { powerstate = 'Unknown State'; }
|
||||
if ((connectivity & 1) != 0) { if (powerstate.length > 0) { powerstate += '<br/>'; } powerstate += '<span style=font-size:12px title="' + "Agent connected" + '">' + "Agent connected" + '</span>'; }
|
||||
var agentPrivilages = '';
|
||||
if ((node.agent != null) && (node.agent.root === false)) { agentPrivilages = ', <span title="' + "Agent is running on remote device with reduced privilages." + '">' + "Restricted" + '</span>'; }
|
||||
if ((connectivity & 1) != 0) { if (powerstate.length > 0) { powerstate += '<br/>'; } powerstate += '<span style=font-size:12px title="' + "Agent connected" + '">' + "Agent connected" + '</span>' + agentPrivilages; }
|
||||
if ((connectivity & 2) != 0) { if (powerstate.length > 0) { powerstate += '<br/>'; } powerstate += '<span style=font-size:12px title="' + "Intel® AMT connected" + '">' + "Intel® AMT connected" + '</span>'; }
|
||||
else if ((connectivity & 4) != 0) { if (powerstate.length > 0) { powerstate += '<br/>'; } powerstate += '<span style=font-size:12px title="' + "Intel® AMT detected" + '">' + "Intel® AMT detected" + '</span>'; }
|
||||
if ((connectivity & 16) != 0) { if (powerstate.length > 0) { powerstate += '<br/>'; } powerstate += '<span style=font-size:12px title="' + "MQTT connected" + '">' + "MQTT channel connected" + '</span>'; }
|
||||
if ((powerstate == '') && node.lastconnect) { powerstate = '<span style=font-size:12px>' + "Last seen:" + '<br />' + printDateTime(new Date(node.lastconnect)) + '</span>'; }
|
||||
else { if ((node.pwr > 1) && (node.pwr != 7)) { powerstate += ('<br/>' + powerStateStrings[node.pwr]); } }
|
||||
QH('MainComputerState', powerstate);
|
||||
|
||||
// Set the node icon
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue