From c4f8426da35ef3c0d061277abe9fd7c3cf595805 Mon Sep 17 00:00:00 2001 From: Noah Zalev Date: Sun, 25 Jul 2021 01:23:37 -0400 Subject: [PATCH] Added last seen column --- views/default.handlebars | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/views/default.handlebars b/views/default.handlebars index b47fd4c1..c62ce9e4 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -3555,6 +3555,7 @@ x += '
'; x += '
'; x += '
'; + x += '
'; 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 += '' + "User"; } if (deviceViewSettings.devsCols.indexOf('ip') >= 0) { colums += '' + "Address"; } if (deviceViewSettings.devsCols.indexOf('conn') >= 0) { colums += '' + "Connectivity"; } + if (deviceViewSettings.devsCols.indexOf('lastseen') >= 0) { colums += '' + "Last Seen"; } // This height of 1 div at the end to fix a problem in Linux firefox browsers r = '
' + colums + r + '
'; @@ -4240,6 +4243,7 @@ if (deviceViewSettings.devsCols.indexOf('user') >= 0) { r += '' + getUserShortStr(node); } // User if (deviceViewSettings.devsCols.indexOf('ip') >= 0) { r += '' + (node.ip != null ? node.ip : ''); } // IP address if (deviceViewSettings.devsCols.indexOf('conn') >= 0) { r += '' + states.join(' + '); } // Connectivity + if (deviceViewSettings.devsCols.indexOf('lastseen') >= 0) { r += '' + ((node.conn & 23 > 0) ? '' : printDateTime(new Date(node.lastconnect))); } div.innerHTML = r; } else if ((view == 3) || (view == 5)) {