applications/luci-statistics: make host selectable if collectd-mod-network server...
[project/luci.git] / applications / luci-statistics / luasrc / statistics / datatree.lua
index b494dc10843fc437eba88ef686168226e9ceb5c1..d6de6fa2178b08a15d526d41db6f81f31a2bfcb0 100644 (file)
@@ -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
+