projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
applications/luci-statistics: make host selectable if collectd-mod-network server...
[project/luci.git]
/
applications
/
luci-statistics
/
luasrc
/
statistics
/
datatree.lua
diff --git
a/applications/luci-statistics/luasrc/statistics/datatree.lua
b/applications/luci-statistics/luasrc/statistics/datatree.lua
index
b494dc1
..
d6de6fa
100644
(file)
--- 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
+