From 643083779c71c09fd758bebb4086363a2e864cbd Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 4 May 2021 13:44:05 -0700 Subject: [PATCH] Added OS column to device view. #2580 --- views/default.handlebars | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/views/default.handlebars b/views/default.handlebars index 5815c3e2..044481de 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -3470,6 +3470,7 @@ // Display the dialog box var x = ''; + x += '
'; x += '
'; x += '
'; x += '
'; @@ -3483,6 +3484,7 @@ if (Q('d2c2').checked) { cols.push('user'); } if (Q('d2c3').checked) { cols.push('ip'); } if (Q('d2c4').checked) { cols.push('conn'); } + if (Q('d2c5').checked) { cols.push('os'); } deviceViewSettings.devsCols = cols; putstore('_deviceViewSettings', JSON.stringify(deviceViewSettings)); mainUpdate(4); @@ -3893,6 +3895,7 @@ if (!Array.isArray(deviceViewSettings.devsCols)) { deviceViewSettings.devsCols = ['user','ip','conn']; } // Display configured columns + if (deviceViewSettings.devsCols.indexOf('os') >= 0) { colums += '' + "OS"; } if (deviceViewSettings.devsCols.indexOf('links') >= 0) { colums += '' + "Links"; } if (deviceViewSettings.devsCols.indexOf('user') >= 0) { colums += '' + "User"; } if (deviceViewSettings.devsCols.indexOf('ip') >= 0) { colums += '' + "Address"; } @@ -4149,6 +4152,7 @@ if (!Array.isArray(deviceViewSettings.devsCols)) { deviceViewSettings.devsCols = ['user','ip','conn']; } // Display configured columns + if (deviceViewSettings.devsCols.indexOf('os') >= 0) { r += '' + EscapeHtml(node.osdesc?node.osdesc:''); } // Operating System if (deviceViewSettings.devsCols.indexOf('links') >= 0) { r += '' + getShortRouterLinks(node); } // Links if (deviceViewSettings.devsCols.indexOf('user') >= 0) { r += '' + getUserShortStr(node); } // User if (deviceViewSettings.devsCols.indexOf('ip') >= 0) { r += '' + (node.ip != null ? node.ip : ''); } // IP address