summaryrefslogtreecommitdiffstats
path: root/health-controller.lua
diff options
context:
space:
mode:
Diffstat (limited to 'health-controller.lua')
-rw-r--r--health-controller.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/health-controller.lua b/health-controller.lua
index 6ebc00e..ef08301 100644
--- a/health-controller.lua
+++ b/health-controller.lua
@@ -23,3 +23,20 @@ end
proc = function (self )
return self.model:get_proc()
end
+
+networkstats = function(self)
+ local retval = self.model.get_networkstats()
+ if self.clientdata.viewtype then
+ self.conf.viewtype = "ajax"
+ else
+ local intf = self:new("alpine-baselayout/interfaces")
+ local interfaces = intf.model.get_addresses()
+ intf:destroy()
+ for i,intf in ipairs(interfaces.value) do
+ if retval.value[intf.interface] then
+ retval.value[intf.interface].ipaddr = intf.ipaddr
+ end
+ end
+ end
+ return retval
+end