summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-statistics
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-08-26 23:00:44 +0000
committerSteven Barth <steven@midlink.org>2008-08-26 23:00:44 +0000
commit91ba7c42f5b45614c9f4c803d09399f08a8e27b1 (patch)
tree21d1e1d67b3bee82eb123c0c5dbb274f2fcb6b59 /applications/luci-statistics
parent43b3217e5595acc91ff6d7614a5c21c88696fbcc (diff)
UCI API changes
Diffstat (limited to 'applications/luci-statistics')
-rw-r--r--applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua6
-rw-r--r--applications/luci-statistics/luasrc/statistics/datatree.lua4
-rw-r--r--applications/luci-statistics/luasrc/statistics/rrdtool.lua4
-rwxr-xr-xapplications/luci-statistics/root/usr/bin/stat-genconfig4
4 files changed, 9 insertions, 9 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 f16a655dc..5167fe0a9 100644
--- a/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua
+++ b/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua
@@ -151,9 +151,9 @@ function statistics_render()
local vars = luci.http.formvalue()
local req = luci.dispatcher.context.request
local path = luci.dispatcher.context.dispatched.path
- 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 uci = luci.model.uci.cursor()
+ 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 5d3d63f99..637fcf466 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")
-local sections = uci.get_all( "luci_statistics" )
+local uci = require("luci.model.uci").cursor()
+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 433524583..23e017036 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
- local sections = uci.get_all( "luci_statistics" )
+ local uci = luci.model.uci.cursor()
+ local sections = uci:get_all( "luci_statistics" )
-- helper classes
self.colors = luci.statistics.rrdtool.colors.Instance()
diff --git a/applications/luci-statistics/root/usr/bin/stat-genconfig b/applications/luci-statistics/root/usr/bin/stat-genconfig
index 3159f6f7f..071cff2ca 100755
--- a/applications/luci-statistics/root/usr/bin/stat-genconfig
+++ b/applications/luci-statistics/root/usr/bin/stat-genconfig
@@ -21,8 +21,8 @@ require("luci.sys.iptparser")
require("luci.util")
local ipt = luci.sys.iptparser.IptParser()
-local uci = luci.model.uci
-local sections = uci.get_all( "luci_statistics" )
+local uci = luci.model.uci.cursor()
+local sections = uci:get_all( "luci_statistics" )
function section( plugin )