summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-statistics
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-statistics')
-rw-r--r--applications/luci-statistics/luasrc/statistics/rrdtool.lua9
-rw-r--r--applications/luci-statistics/luasrc/statistics/rrdtool/definitions.lua1
-rw-r--r--applications/luci-statistics/luasrc/view/admin_statistics/networkplugins.htm2
-rw-r--r--applications/luci-statistics/luasrc/view/admin_statistics/outputplugins.htm2
-rw-r--r--applications/luci-statistics/luasrc/view/admin_statistics/systemplugins.htm2
5 files changed, 8 insertions, 8 deletions
diff --git a/applications/luci-statistics/luasrc/statistics/rrdtool.lua b/applications/luci-statistics/luasrc/statistics/rrdtool.lua
index 911b38bff..eb5c266b0 100644
--- a/applications/luci-statistics/luasrc/statistics/rrdtool.lua
+++ b/applications/luci-statistics/luasrc/statistics/rrdtool.lua
@@ -22,7 +22,8 @@ require("luci.statistics.i18n")
require("luci.model.uci")
require("luci.util")
require("luci.sys")
-require("luci.fs")
+
+local fs = require "nixio.fs"
Graph = luci.util.class()
@@ -96,7 +97,7 @@ function Graph._rrdtool( self, def, rrd )
-- prepare directory
local dir = def[1]:gsub("/[^/]+$","")
- luci.fs.mkdir( dir, true )
+ fs.mkdirr( dir )
-- construct commandline
local cmdline = "rrdtool graph"
@@ -500,7 +501,7 @@ function Graph.render( self, plugin, plugin_instance )
-- check for a whole graph handler
local plugin_def = "luci.statistics.rrdtool.definitions." .. plugin
- local stat, def = luci.util.copcall( require, plugin_def )
+ local stat, def = pcall( require, plugin_def )
if stat and def and type(def.rrdargs) == "function" then
@@ -539,7 +540,7 @@ function Graph.render( self, plugin, plugin_instance )
-- check for data type handler
local dtype_def = plugin_def .. "." .. dtype
- local stat, def = luci.util.copcall( require, dtype_def )
+ local stat, def = pcall( require, dtype_def )
if stat and def and type(def.rrdargs) == "function" then
diff --git a/applications/luci-statistics/luasrc/statistics/rrdtool/definitions.lua b/applications/luci-statistics/luasrc/statistics/rrdtool/definitions.lua
index 7e0b60534..883261351 100644
--- a/applications/luci-statistics/luasrc/statistics/rrdtool/definitions.lua
+++ b/applications/luci-statistics/luasrc/statistics/rrdtool/definitions.lua
@@ -16,7 +16,6 @@ $Id$
module("luci.statistics.rrdtool.definitions", package.seeall)
require("luci.util")
-require("luci.fs")
Instance = luci.util.class()
diff --git a/applications/luci-statistics/luasrc/view/admin_statistics/networkplugins.htm b/applications/luci-statistics/luasrc/view/admin_statistics/networkplugins.htm
index 54ba2b0e2..13e52257e 100644
--- a/applications/luci-statistics/luasrc/view/admin_statistics/networkplugins.htm
+++ b/applications/luci-statistics/luasrc/view/admin_statistics/networkplugins.htm
@@ -22,7 +22,7 @@ about open tcp connections, interface traffic, iptables rules etc.%></p>
<p><%:stat_networkplugins_installed Installed network plugins:%>
<ul>
<% for plugin, desc in pairs(plugins) do %>
- <% if luci.fs.access("/usr/lib/collectd/" .. plugin .. ".so") then %>
+ <% if nixio.fs.access("/usr/lib/collectd/" .. plugin .. ".so") then %>
<li><a href="<%=controller%>/admin/statistics/collectd/network/<%=plugin%>"><%=desc%></a></li>
<% end %>
<% end %>
diff --git a/applications/luci-statistics/luasrc/view/admin_statistics/outputplugins.htm b/applications/luci-statistics/luasrc/view/admin_statistics/outputplugins.htm
index e79e2f49f..ef9ae23b5 100644
--- a/applications/luci-statistics/luasrc/view/admin_statistics/outputplugins.htm
+++ b/applications/luci-statistics/luasrc/view/admin_statistics/outputplugins.htm
@@ -23,7 +23,7 @@ and to transmit the data over the network to other collectd instances.%></p>
<p><%:stat_outputplugins_installed Installed output plugins:%>
<ul>
<% for plugin, desc in pairs(plugins) do %>
- <% if luci.fs.access("/usr/lib/collectd/" .. plugin .. ".so") then %>
+ <% if nixio.fs.access("/usr/lib/collectd/" .. plugin .. ".so") then %>
<li><a href="<%=controller%>/admin/statistics/collectd/output/<%=plugin%>"><%=desc%></a></li>
<% end %>
<% end %>
diff --git a/applications/luci-statistics/luasrc/view/admin_statistics/systemplugins.htm b/applications/luci-statistics/luasrc/view/admin_statistics/systemplugins.htm
index 0c1b2b52b..0e801c791 100644
--- a/applications/luci-statistics/luasrc/view/admin_statistics/systemplugins.htm
+++ b/applications/luci-statistics/luasrc/view/admin_statistics/systemplugins.htm
@@ -19,7 +19,7 @@ $Id$
<p><%:stat_systemplugins_desc System plugins collecting values about system state and ressource usage on the device.:%>
<ul>
<% for plugin, desc in pairs(plugins) do %>
- <% if luci.fs.access("/usr/lib/collectd/" .. plugin .. ".so") then %>
+ <% if nixio.fs.access("/usr/lib/collectd/" .. plugin .. ".so") then %>
<li><a href="<%=controller%>/admin/statistics/collectd/system/<%=plugin%>"><%=desc%></a></li>
<% end %>
<% end %>