summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-statistics/luasrc/statistics/datatree.lua
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-05-28 17:51:15 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-05-28 17:51:15 +0000
commitbb5ecfde728c8f2e503fc28780aada78301ba6e4 (patch)
tree349036a75af740e84f483a802fc691115013bff6 /applications/luci-statistics/luasrc/statistics/datatree.lua
parent4365fbe2a373b73af5578d0ed6eddfb2ba9901ef (diff)
* luci/statistics: implement a more advanced diagram generator in rrdtool.lua, simplified diagram models, fix bug in datatree.lua
Diffstat (limited to 'applications/luci-statistics/luasrc/statistics/datatree.lua')
-rw-r--r--applications/luci-statistics/luasrc/statistics/datatree.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/applications/luci-statistics/luasrc/statistics/datatree.lua b/applications/luci-statistics/luasrc/statistics/datatree.lua
index 957b230a96..82e7a281d5 100644
--- a/applications/luci-statistics/luasrc/statistics/datatree.lua
+++ b/applications/luci-statistics/luasrc/statistics/datatree.lua
@@ -123,11 +123,13 @@ function Instance.data_types( self, plugin, instance )
return rv
end
-function Instance.data_instances( self, plugin, instance, type )
+function Instance.data_instances( self, plugin, instance, dtype )
local rv = { }
- for i, instance in ipairs( self._plugins[plugin][instance][type] ) do
- table.insert( rv, instance )
+ if type(self._plugins[plugin][instance][dtype]) == "table" then
+ for i, instance in ipairs( self._plugins[plugin][instance][dtype] ) do
+ table.insert( rv, instance )
+ end
end
return rv