summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-statistics/luasrc/statistics/datatree.lua
diff options
context:
space:
mode:
authorPatrick Grimm <patrick@lunatiki.de>2012-02-19 15:11:23 +0000
committerPatrick Grimm <patrick@lunatiki.de>2012-02-19 15:11:23 +0000
commitad7aecad88399b917b6a96952f3645c475e73c59 (patch)
treed582023a76a305ef0150eaa670c92d9ca6fb012b /applications/luci-statistics/luasrc/statistics/datatree.lua
parent2ff0ec12ac2acc140680f457f0699b88676d8cfb (diff)
applications/luci-statistics: make host selectable if collectd-mod-network server is on
Diffstat (limited to 'applications/luci-statistics/luasrc/statistics/datatree.lua')
-rw-r--r--applications/luci-statistics/luasrc/statistics/datatree.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/applications/luci-statistics/luasrc/statistics/datatree.lua b/applications/luci-statistics/luasrc/statistics/datatree.lua
index b494dc1084..d6de6fa217 100644
--- a/applications/luci-statistics/luasrc/statistics/datatree.lua
+++ b/applications/luci-statistics/luasrc/statistics/datatree.lua
@@ -192,3 +192,16 @@ function Instance.data_instances( self, plugin, instance, dtype )
return rv
end
+
+function Instance.host_instances( self )
+ local hosts_path = fs.glob(self._rrddir..'/*')
+ local hosts = { }
+ k = 1
+ for v in hosts_path do
+ hosts[k] = fs.basename(v)
+ k=k+1
+ end
+
+ return hosts
+end
+