diff options
author | Steven Barth <steven@midlink.org> | 2008-06-05 19:16:38 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-06-05 19:16:38 +0000 |
commit | dd9606825da5d73883b8313f5af905ea1b2a4d7d (patch) | |
tree | 1f853ae56dd8e3051698ac6d0a38d61bf6d6997f /applications/luci-statistics/luasrc | |
parent | 75f3dbaa6136a1288fbe92d80fc127f5228f5d64 (diff) |
* Merged Luci to use native UCI-library
Diffstat (limited to 'applications/luci-statistics/luasrc')
3 files changed, 7 insertions, 7 deletions
diff --git a/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua b/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua index ad3e05427..2f6807153 100644 --- a/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua +++ b/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua @@ -146,9 +146,9 @@ function statistics_render() local vars = luci.http.formvalues() local req = luci.dispatcher.request local path = luci.dispatcher.dispatched.path - local uci = luci.model.uci.Session() - local spans = luci.util.split( uci:get( "luci_statistics", "collectd_rrdtool", "RRATimespans" ), "%s+", nil, true ) - local span = vars.timespan or uci:get( "luci_statistics", "rrdtool", "default_timespan" ) or spans[1] + local uci = luci.model.uci + local spans = luci.util.split( uci.get( "luci_statistics", "collectd_rrdtool", "RRATimespans" ), "%s+", nil, true ) + local span = vars.timespan or uci.get( "luci_statistics", "rrdtool", "default_timespan" ) or spans[1] local graph = luci.statistics.rrdtool.Graph( luci.util.parse_units( span ) ) local plugin, instances diff --git a/applications/luci-statistics/luasrc/statistics/datatree.lua b/applications/luci-statistics/luasrc/statistics/datatree.lua index 03608b10b..5d3d63f99 100644 --- a/applications/luci-statistics/luasrc/statistics/datatree.lua +++ b/applications/luci-statistics/luasrc/statistics/datatree.lua @@ -18,8 +18,8 @@ module("luci.statistics.datatree", package.seeall) local util = require("luci.util") local sys = require("luci.sys") local fs = require("luci.fs") -local uci = require("luci.model.uci").Session() -local sections = uci:sections( "luci_statistics" ) +local uci = require("luci.model.uci") +local sections = uci.get_all( "luci_statistics" ) Instance = util.class() diff --git a/applications/luci-statistics/luasrc/statistics/rrdtool.lua b/applications/luci-statistics/luasrc/statistics/rrdtool.lua index 35f5c8727..69fb5cff6 100644 --- a/applications/luci-statistics/luasrc/statistics/rrdtool.lua +++ b/applications/luci-statistics/luasrc/statistics/rrdtool.lua @@ -31,8 +31,8 @@ function Graph.__init__( self, timespan, opts ) opts = opts or { } - local uci = luci.model.uci.Session() - local sections = uci:sections( "luci_statistics" ) + local uci = luci.model.uci + local sections = uci.get_all( "luci_statistics" ) -- helper classes self.colors = luci.statistics.rrdtool.colors.Instance() |