X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=applications%2Fluci-statistics%2Fluasrc%2Fcontroller%2Fluci_statistics%2Fluci_statistics.lua;h=5167fe0a911acb4af570cecfb4f29af79be78b7f;hb=91ba7c42f5b45614c9f4c803d09399f08a8e27b1;hp=67ea8a6f0c1b23c904e87ef6ec6b2eb64b52c617;hpb=eae0e447989a1a37ce6cb8df9f1f353738aab4f6;p=project%2Fluci.git 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 67ea8a6f0..5167fe0a9 100644 --- a/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua +++ b/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua @@ -80,7 +80,7 @@ function index() page.setuser = "nobody" page.setgroup = "nogroup" - local vars = luci.http.formvalue() + local vars = luci.http.formvalue(nil, true) local span = vars.timespan or nil for i, plugin in luci.util.vspairs( tree:plugins() ) do @@ -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