[Web UI] Add public IP address

This commit is contained in:
Nicolas Hart 2016-04-02 22:13:57 +02:00
parent 3d59773a5e
commit c72a593a9b
2 changed files with 7 additions and 5 deletions

View File

@ -1 +1 @@
&nbsp;-&nbsp;<span class="title">IP</span> <span>{{ statsIp.address }}/{{ statsIp.maskCidr }}</span> &nbsp;-&nbsp;<span class="title">IP</span>&nbsp;<span>{{ statsIp.address }}/{{ statsIp.maskCidr }}</span>&nbsp;<span class="title">Pub</span>&nbsp;<span>{{ statsIp.publicAddress }}</span>

View File

@ -5,13 +5,15 @@ glancesApp.service('GlancesPluginIp', function() {
this.gateway = null; this.gateway = null;
this.mask = null; this.mask = null;
this.maskCidr = null; this.maskCidr = null;
this.publicAddress = null;
this.setData = function(data, views) { this.setData = function(data, views) {
data = data[_pluginName]; data = data[_pluginName];
this.address = data['address']; this.address = data.address;
this.gateway = data['gateway']; this.gateway = data.gateway;
this.mask = data['mask']; this.mask = data.mask;
this.maskCidr = data['mask_cidr']; this.maskCidr = data.mask_cidr;
this.publicAddress = data.public_address
}; };
}); });