* luci/statistics: ffluci -> luci conversation
This commit is contained in:
parent
4a80f37832
commit
bf907eafda
20 changed files with 62 additions and 62 deletions
|
@ -1,9 +1,9 @@
|
|||
module("ffluci.controller.luci_statistics.luci_statistics", package.seeall)
|
||||
module("luci.controller.luci_statistics.luci_statistics", package.seeall)
|
||||
|
||||
local fs = require("ffluci.fs")
|
||||
local tpl = require("ffluci.template")
|
||||
local rrd = require("ffluci.statistics.rrdtool")
|
||||
local data = require("ffluci.statistics.datatree").Instance()
|
||||
local fs = require("luci.fs")
|
||||
local tpl = require("luci.template")
|
||||
local rrd = require("luci.statistics.rrdtool")
|
||||
local data = require("luci.statistics.datatree").Instance()
|
||||
|
||||
|
||||
function _entry( path, ... )
|
||||
|
@ -93,7 +93,7 @@ end
|
|||
|
||||
|
||||
function statistics_render()
|
||||
local plugin = ffluci.dispatcher.request[3]
|
||||
local plugin = luci.dispatcher.request[3]
|
||||
local images = { }
|
||||
|
||||
for i, inst in ipairs( data:plugin_instances( plugin ) ) do
|
||||
|
|
|
@ -13,7 +13,7 @@ $Id$
|
|||
|
||||
]]--
|
||||
|
||||
require("ffluci.sys")
|
||||
require("luci.sys")
|
||||
|
||||
|
||||
m = Map("luci_statistics", "Collector Daemon",
|
||||
|
@ -56,7 +56,7 @@ readthreads.isnumber = true
|
|||
|
||||
-- general.hostname (Hostname)
|
||||
hostname = s:option( Value, "Hostname", "Hostname zur Identifikation des Collector Dienstes (leer lassen um den Namen automatisch zu bestimmen)" )
|
||||
hostname.default = ffluci.sys.hostname()
|
||||
hostname.default = luci.sys.hostname()
|
||||
hostname.optional = true
|
||||
|
||||
-- general.fqdnlookup (FQDNLookup)
|
||||
|
|
|
@ -13,7 +13,7 @@ $Id$
|
|||
|
||||
]]--
|
||||
|
||||
require("ffluci.sys")
|
||||
require("luci.sys")
|
||||
|
||||
|
||||
m = Map("luci_statistics", "DNS Plugin",
|
||||
|
@ -30,7 +30,7 @@ enable.default = 0
|
|||
interfaces = s:option( ListValue, "Interface", "Folgende Schnittstelle überwachen:" )
|
||||
interfaces:depends( "enable", 1 )
|
||||
interfaces:value("any")
|
||||
for k, v in pairs(ffluci.sys.net.devices()) do
|
||||
for k, v in pairs(luci.sys.net.devices()) do
|
||||
interfaces:value(v)
|
||||
end
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ $Id$
|
|||
|
||||
]]--
|
||||
|
||||
require("ffluci.sys")
|
||||
require("luci.sys")
|
||||
|
||||
|
||||
m = Map("luci_statistics", "Interface Plugin",
|
||||
|
@ -30,7 +30,7 @@ enable.default = 0
|
|||
interfaces = s:option( MultiValue, "Interfaces", "Überwachte Schnittstellen", "mehrere Einträge mit Strg selektieren" )
|
||||
interfaces.widget = "select"
|
||||
interfaces:depends( "enable", 1 )
|
||||
for k, v in pairs(ffluci.sys.net.devices()) do
|
||||
for k, v in pairs(luci.sys.net.devices()) do
|
||||
interfaces:value(v)
|
||||
end
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ $Id$
|
|||
|
||||
]]--
|
||||
|
||||
require("ffluci.sys.iptparser")
|
||||
require("luci.sys.iptparser")
|
||||
|
||||
ip = ffluci.sys.iptparser.IptParser()
|
||||
ip = luci.sys.iptparser.IptParser()
|
||||
chains = { }
|
||||
targets = { }
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ $Id$
|
|||
|
||||
]]--
|
||||
|
||||
require("ffluci.sys")
|
||||
require("luci.sys")
|
||||
|
||||
|
||||
m = Map("luci_statistics", "Interface Plugin",
|
||||
|
@ -32,7 +32,7 @@ interfaces.widget = "select"
|
|||
interfaces.optional = true
|
||||
interfaces:depends( "enable", 1 )
|
||||
interfaces:value("")
|
||||
for i, v in ipairs(ffluci.sys.net.devices()) do
|
||||
for i, v in ipairs(luci.sys.net.devices()) do
|
||||
interfaces:value(v)
|
||||
end
|
||||
|
||||
|
@ -42,7 +42,7 @@ verboseinterfaces.widget = "select"
|
|||
verboseinterfaces.optional = true
|
||||
verboseinterfaces:depends( "enable", 1 )
|
||||
verboseinterfaces:value("")
|
||||
for i, v in ipairs(ffluci.sys.net.devices()) do
|
||||
for i, v in ipairs(luci.sys.net.devices()) do
|
||||
verboseinterfaces:value(v)
|
||||
end
|
||||
|
||||
|
@ -52,7 +52,7 @@ qdiscs.widget = "select"
|
|||
qdiscs.optional = true
|
||||
qdiscs:depends( "enable", 1 )
|
||||
qdiscs:value("")
|
||||
for i, v in ipairs(ffluci.sys.net.devices()) do
|
||||
for i, v in ipairs(luci.sys.net.devices()) do
|
||||
qdiscs:value(v)
|
||||
end
|
||||
|
||||
|
@ -62,7 +62,7 @@ classs.widget = "select"
|
|||
classs.optional = true
|
||||
classs:depends( "enable", 1 )
|
||||
classs:value("")
|
||||
for i, v in ipairs(ffluci.sys.net.devices()) do
|
||||
for i, v in ipairs(luci.sys.net.devices()) do
|
||||
classs:value(v)
|
||||
end
|
||||
|
||||
|
@ -72,7 +72,7 @@ filters.widget = "select"
|
|||
filters.optional = true
|
||||
filters:depends( "enable", 1 )
|
||||
filters:value("")
|
||||
for i, v in ipairs(ffluci.sys.net.devices()) do
|
||||
for i, v in ipairs(luci.sys.net.devices()) do
|
||||
filters:value(v)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
module("ffluci.statistics.datatree", package.seeall)
|
||||
module("luci.statistics.datatree", package.seeall)
|
||||
|
||||
local util = require("ffluci.util")
|
||||
local sys = require("ffluci.sys")
|
||||
local fs = require("ffluci.fs")
|
||||
local uci = require("ffluci.model.uci").Session()
|
||||
local util = require("luci.util")
|
||||
local sys = require("luci.sys")
|
||||
local fs = require("luci.fs")
|
||||
local uci = require("luci.model.uci").Session()
|
||||
local sections, names = uci:sections( "luci_statistics" )
|
||||
|
||||
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
module("ffluci.statistics.rrdtool", package.seeall)
|
||||
module("luci.statistics.rrdtool", package.seeall)
|
||||
|
||||
require("ffluci.statistics.datatree")
|
||||
require("ffluci.statistics.rrdtool.colors")
|
||||
require("ffluci.statistics.rrdtool.definitions")
|
||||
require("ffluci.util")
|
||||
require("ffluci.bits")
|
||||
require("ffluci.fs")
|
||||
require("luci.statistics.datatree")
|
||||
require("luci.statistics.rrdtool.colors")
|
||||
require("luci.statistics.rrdtool.definitions")
|
||||
require("luci.util")
|
||||
require("luci.bits")
|
||||
require("luci.fs")
|
||||
|
||||
|
||||
Graph = ffluci.util.class()
|
||||
Graph = luci.util.class()
|
||||
|
||||
function Graph.__init__( self, timespan, opts )
|
||||
|
||||
opts = opts or { }
|
||||
opts.width = opts.width or "400"
|
||||
|
||||
self.colors = ffluci.statistics.rrdtool.colors.Instance()
|
||||
self.defs = ffluci.statistics.rrdtool.definitions.Instance()
|
||||
self.tree = ffluci.statistics.datatree.Instance()
|
||||
self.colors = luci.statistics.rrdtool.colors.Instance()
|
||||
self.defs = luci.statistics.rrdtool.definitions.Instance()
|
||||
self.tree = luci.statistics.datatree.Instance()
|
||||
|
||||
-- rrdtool defalt args
|
||||
self.args = {
|
||||
|
@ -77,7 +77,7 @@ function Graph._rrdtool( self, png, rrd )
|
|||
|
||||
-- prepare directory
|
||||
local dir = png:gsub("/[^/]+$","")
|
||||
ffluci.fs.mkdir( dir, true )
|
||||
luci.fs.mkdir( dir, true )
|
||||
|
||||
-- construct commandline
|
||||
local cmdline = "rrdtool graph " .. png
|
||||
|
@ -195,7 +195,7 @@ function Graph.render( self, host, plugin, plugin_instance )
|
|||
local pngs = { }
|
||||
|
||||
-- check for a whole graph handler
|
||||
local plugin_def = "ffluci.statistics.rrdtool.definitions." .. plugin
|
||||
local plugin_def = "luci.statistics.rrdtool.definitions." .. plugin
|
||||
local stat, def = pcall( require, plugin_def )
|
||||
|
||||
if stat and def and type(def.rrdargs) == "function" then
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
module("ffluci.statistics.rrdtool.colors", package.seeall)
|
||||
module("luci.statistics.rrdtool.colors", package.seeall)
|
||||
|
||||
require("ffluci.util")
|
||||
require("ffluci.bits")
|
||||
require("luci.util")
|
||||
require("luci.bits")
|
||||
|
||||
|
||||
Instance = ffluci.util.class()
|
||||
Instance = luci.util.class()
|
||||
|
||||
function Instance.from_string( self, s )
|
||||
return {
|
||||
ffluci.bits.Hex2Dec(s:sub(1,2)),
|
||||
ffluci.bits.Hex2Dec(s:sub(3,4)),
|
||||
ffluci.bits.Hex2Dec(s:sub(5,6))
|
||||
luci.bits.Hex2Dec(s:sub(1,2)),
|
||||
luci.bits.Hex2Dec(s:sub(3,4)),
|
||||
luci.bits.Hex2Dec(s:sub(5,6))
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
module("ffluci.statistics.rrdtool.definitions", package.seeall)
|
||||
module("luci.statistics.rrdtool.definitions", package.seeall)
|
||||
|
||||
require("ffluci.util")
|
||||
require("ffluci.fs")
|
||||
require("luci.util")
|
||||
require("luci.fs")
|
||||
|
||||
|
||||
Instance = ffluci.util.class()
|
||||
Instance = luci.util.class()
|
||||
|
||||
function Instance.__init__( self, ... )
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module("ffluci.statistics.rrdtool.definitions.cpu.cpu",package.seeall)
|
||||
module("luci.statistics.rrdtool.definitions.cpu.cpu",package.seeall)
|
||||
|
||||
function rrdargs( graph, host, plugin, plugin_instance, dtype )
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module("ffluci.statistics.rrdtool.definitions.iptables.ipt_packets", package.seeall)
|
||||
module("luci.statistics.rrdtool.definitions.iptables.ipt_packets", package.seeall)
|
||||
|
||||
function rrdargs( graph, host, plugin, plugin_instance, dtype )
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module("ffluci.statistics.rrdtool.definitions.netlink", package.seeall)
|
||||
module("luci.statistics.rrdtool.definitions.netlink", package.seeall)
|
||||
|
||||
function rrdargs( graph, host, plugin, plugin_instance )
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module("ffluci.statistics.rrdtool.definitions.ping.ping", package.seeall)
|
||||
module("luci.statistics.rrdtool.definitions.ping.ping", package.seeall)
|
||||
|
||||
function rrdargs( graph, host, plugin, plugin_instance, dtype )
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module("ffluci.statistics.rrdtool.definitions.processes.ps_state", package.seeall)
|
||||
module("luci.statistics.rrdtool.definitions.processes.ps_state", package.seeall)
|
||||
|
||||
function rrdargs( graph, host, plugin, plugin_instance, dtype )
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module("ffluci.statistics.rrdtool.definitions.tcpconns.tcp_connections", package.seeall)
|
||||
module("luci.statistics.rrdtool.definitions.tcpconns.tcp_connections", package.seeall)
|
||||
|
||||
function rrdargs( graph, host, plugin, plugin_instance, dtype )
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module("ffluci.statistics.rrdtool.definitions.wireless", package.seeall)
|
||||
module("luci.statistics.rrdtool.definitions.wireless", package.seeall)
|
||||
|
||||
function rrdargs( graph, host, plugin, plugin_instance )
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ auf verschiedenen Schnittstellen, DNS-Verkehr u.v.m.%></p>
|
|||
<p><%:stat_networkplugins_installed Installierte Netzwerkplugins:%>
|
||||
<ul>
|
||||
<% for plugin, desc in pairs(plugins) do %>
|
||||
<% if ffluci.fs.isfile("/usr/lib/collectd/" .. plugin .. ".so") then %>
|
||||
<li><a href="/cgi-bin/ffluci/admin/statistics/network/<%=plugin%>"><%=desc%></a></li>
|
||||
<% if luci.fs.isfile("/usr/lib/collectd/" .. plugin .. ".so") then %>
|
||||
<li><a href="/cgi-bin/luci/admin/statistics/network/<%=plugin%>"><%=desc%></a></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
|
@ -9,8 +9,8 @@ die gesammelten Werte in RRD-Datenbanken zu sichern und zusätzlich über das Ne
|
|||
<p><%:stat_outputplugins_installed Installierte Ausgabeplugins:%>
|
||||
<ul>
|
||||
<% for plugin, desc in pairs(plugins) do %>
|
||||
<% if ffluci.fs.isfile("/usr/lib/collectd/" .. plugin .. ".so") then %>
|
||||
<li><a href="/cgi-bin/ffluci/admin/statistics/output/<%=plugin%>"><%=desc%></a></li>
|
||||
<% if luci.fs.isfile("/usr/lib/collectd/" .. plugin .. ".so") then %>
|
||||
<li><a href="/cgi-bin/luci/admin/statistics/output/<%=plugin%>"><%=desc%></a></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
|
@ -8,8 +8,8 @@ auf dem Gerät.%></p>
|
|||
<p><%:stat_systemplugins_installed Installierte Systemplugins:%>
|
||||
<ul>
|
||||
<% for plugin, desc in pairs(plugins) do %>
|
||||
<% if ffluci.fs.isfile("/usr/lib/collectd/" .. plugin .. ".so") then %>
|
||||
<li><a href="/cgi-bin/ffluci/admin/statistics/system/<%=plugin%>"><%=desc%></a></li>
|
||||
<% if luci.fs.isfile("/usr/lib/collectd/" .. plugin .. ".so") then %>
|
||||
<li><a href="/cgi-bin/luci/admin/statistics/system/<%=plugin%>"><%=desc%></a></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in a new issue