From 315adef695616ee80f3da80eeee7a9414a838416 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Thu, 31 Jan 2019 15:21:28 -0800 Subject: [PATCH] Improved IP geolocation ui. --- views/default.handlebars | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/views/default.handlebars b/views/default.handlebars index 9e6f033d..05f842b3 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -1276,18 +1276,16 @@ QH('d2netinfo', 'No network interface information available for this device.'); } else { var x = '
'; - if (currentNode.publicip) { - x += addHtmlValue2('Public IP address', currentNode.publicip); - } else { - if (currentNode.lastconnect) { x += addHtmlValue2('Last agent connection', new Date(currentNode.lastconnect).toLocaleString()); } - if (currentNode.lastaddr) { - if (isPrivateIP(currentNode.lastaddr)) { - x += addHtmlValue2('Last agent address:port', currentNode.lastaddr); - } else { - x += addHtmlValue2('Last agent address:port', '' + currentNode.lastaddr + ''); - } + + if (currentNode.lastconnect) { x += addHtmlValue2('Last agent connection', new Date(currentNode.lastconnect).toLocaleString()); } + if (currentNode.lastaddr) { + if (isPrivateIP(currentNode.lastaddr)) { + x += addHtmlValue2('Last agent address', currentNode.lastaddr.split(':')[0]); + } else { + x += addHtmlValue2('Last agent address', '' + currentNode.lastaddr.split(':')[0] + ''); } } + x += addHtmlValue2('Last interfaces update', new Date(message.updateTime).toLocaleString()); for (var i in message.netif) { var net = message.netif[i];