mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-12-04 23:02:25 -05:00
Version 0.6.0
This commit is contained in:
@@ -3696,15 +3696,19 @@
|
||||
function showDeviceMessages(nodeid, force, e) {
|
||||
if (e) haltEvent(e);
|
||||
if (xxdialogMode && !force) return false;
|
||||
var node = null, x = '';
|
||||
var node = null, x = '<div style=max-height:200px;overflow-y:auto>', count = 0;
|
||||
if (nodeid == null) { node = currentNode; } else { node = getNodeFromId(nodeid); }
|
||||
if ((node == null) || (node.sessions == null) || (node.sessions.msg == null)) { setDialogMode(0); return false; }
|
||||
for (var i in node.sessions.msg) {
|
||||
var msg = i;
|
||||
var msg = i, icon = 5;
|
||||
if (typeof node.sessions.msg[i].msg == 'string') { msg = node.sessions.msg[i].msg; }
|
||||
x += '<div style="border-radius:5px;background-color:#BBB;width:100%;padding:4px;margin-bottom:4px">' + EscapeHtml(i) + '</div>';
|
||||
if (typeof node.sessions.msg[i].icon == 'number') { icon = node.sessions.msg[i].icon; }
|
||||
if ((icon < 1) || (icon > 9)) { icon = 5; }
|
||||
x += '<table style=width:96%><td style=width:24px><div class=NotifyIconSmall' + icon + '></div><td><div style="border-radius:5px;background-color:#BBB;width:100%;padding:8px">' + EscapeHtml(msg) + '</div></table>';
|
||||
count++;
|
||||
}
|
||||
if (x != '') setDialogMode(2, "Agent Messages" + ' - ' + EscapeHtml(node.name), 1, null, x, 'MESSAGES-' + node._id);
|
||||
x += '</div>';
|
||||
if (count > 0) setDialogMode(2, "Agent Messages" + ' - ' + EscapeHtml(node.name), 1, null, x, 'MESSAGES-' + node._id);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user