From c72a593a9b9b88fce34bc77055f923725a4b4481 Mon Sep 17 00:00:00 2001 From: Nicolas Hart Date: Sat, 2 Apr 2016 22:13:57 +0200 Subject: [PATCH] [Web UI] Add public IP address --- glances/outputs/static/html/plugins/ip.html | 2 +- .../outputs/static/js/services/plugins/glances_ip.js | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/glances/outputs/static/html/plugins/ip.html b/glances/outputs/static/html/plugins/ip.html index 45566436..5e075618 100644 --- a/glances/outputs/static/html/plugins/ip.html +++ b/glances/outputs/static/html/plugins/ip.html @@ -1 +1 @@ - - IP {{ statsIp.address }}/{{ statsIp.maskCidr }} + - IP {{ statsIp.address }}/{{ statsIp.maskCidr }} Pub {{ statsIp.publicAddress }} diff --git a/glances/outputs/static/js/services/plugins/glances_ip.js b/glances/outputs/static/js/services/plugins/glances_ip.js index f45d08d5..a13add6c 100644 --- a/glances/outputs/static/js/services/plugins/glances_ip.js +++ b/glances/outputs/static/js/services/plugins/glances_ip.js @@ -5,13 +5,15 @@ glancesApp.service('GlancesPluginIp', function() { this.gateway = null; this.mask = null; this.maskCidr = null; + this.publicAddress = null; this.setData = function(data, views) { data = data[_pluginName]; - this.address = data['address']; - this.gateway = data['gateway']; - this.mask = data['mask']; - this.maskCidr = data['mask_cidr']; + this.address = data.address; + this.gateway = data.gateway; + this.mask = data.mask; + this.maskCidr = data.mask_cidr; + this.publicAddress = data.public_address }; });