mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-13 07:53:20 -05:00
Added last seen column
This commit is contained in:
parent
b3be0120fa
commit
c4f8426da3
@ -3555,6 +3555,7 @@
|
||||
x += '<label><input id=d2c2 type=checkbox' + ((deviceViewSettings.devsCols.indexOf('user') >= 0)?' checked':'') + '>' + "Logged in users" + '</label><br />';
|
||||
x += '<label><input id=d2c3 type=checkbox' + ((deviceViewSettings.devsCols.indexOf('ip') >= 0)?' checked':'') + '>' + "Agent IP address" + '</label><br />';
|
||||
x += '<label><input id=d2c4 type=checkbox' + ((deviceViewSettings.devsCols.indexOf('conn') >= 0)?' checked':'') + '>' + "Server Connectivity" + '</label><br />';
|
||||
x += '<label><input id=d2c7 type=checkbox' + ((deviceViewSettings.devsCols.indexOf('lastseen') >= 0)?' checked':'') + '>' + "Last Seen" + '</label><br />';
|
||||
setDialogMode(2, "Device View Columns", 3, onDeviceViewSettingsEx, x);
|
||||
}
|
||||
|
||||
@ -3566,6 +3567,7 @@
|
||||
if (Q('d2c4').checked) { cols.push('conn'); }
|
||||
if (Q('d2c5').checked) { cols.push('os'); }
|
||||
if (Q('d2c6').checked) { cols.push('desc'); }
|
||||
if (Q('d2c7').checked) { cols.push('lastseen'); }
|
||||
deviceViewSettings.devsCols = cols;
|
||||
putstore('_deviceViewSettings', JSON.stringify(deviceViewSettings));
|
||||
mainUpdate(4);
|
||||
@ -3981,6 +3983,7 @@
|
||||
if (deviceViewSettings.devsCols.indexOf('user') >= 0) { colums += '<th style=color:gray;width:120px>' + "User"; }
|
||||
if (deviceViewSettings.devsCols.indexOf('ip') >= 0) { colums += '<th style=color:gray;width:120px>' + "Address"; }
|
||||
if (deviceViewSettings.devsCols.indexOf('conn') >= 0) { colums += '<th style=color:gray;width:100px>' + "Connectivity"; }
|
||||
if (deviceViewSettings.devsCols.indexOf('lastseen') >= 0) { colums += '<th style=color:gray;width:120px>' + "Last Seen"; }
|
||||
|
||||
// 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>' + colums + r + '</tr></table><div style=height:1px></div>';
|
||||
@ -4240,6 +4243,7 @@
|
||||
if (deviceViewSettings.devsCols.indexOf('user') >= 0) { r += '<td style=text-align:center>' + getUserShortStr(node); } // User
|
||||
if (deviceViewSettings.devsCols.indexOf('ip') >= 0) { r += '<td style=text-align:center>' + (node.ip != null ? node.ip : ''); } // IP address
|
||||
if (deviceViewSettings.devsCols.indexOf('conn') >= 0) { r += '<td style=text-align:center>' + states.join(' + '); } // Connectivity
|
||||
if (deviceViewSettings.devsCols.indexOf('lastseen') >= 0) { r += '<td style=text-align:center;font-size:x-small>' + ((node.conn & 23 > 0) ? '' : printDateTime(new Date(node.lastconnect))); }
|
||||
|
||||
div.innerHTML = r;
|
||||
} else if ((view == 3) || (view == 5)) {
|
||||
|
Loading…
Reference in New Issue
Block a user