summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua88
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/collectd.lua32
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/cpu.lua6
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/csv.lua13
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/df.lua17
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/disk.lua11
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/dns.lua11
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/email.lua14
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/exec.lua27
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/interface.lua9
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/iptables.lua40
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/irq.lua12
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/load.lua8
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/netlink.lua19
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/network.lua41
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/ping.lua13
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/processes.lua11
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua36
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/tcpconns.lua15
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/unixsock.lua9
-rw-r--r--applications/luci-statistics/luasrc/model/cbi/luci_statistics/wireless.lua9
21 files changed, 308 insertions, 133 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 817622c434..ed6363f9fb 100644
--- a/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua
+++ b/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua
@@ -37,10 +37,33 @@ function index()
end
end
- -- override i18n(): try to translate stat_<str> or fall back to <str>
- function _i18n( str )
- return luci.i18n.translate( "stat_" .. str, str )
- end
+ local translate = luci.i18n.translate
+
+ local labels = {
+ s_output = translate("Output plugins"),
+ s_system = translate("System plugins"),
+ s_network = translate("Network plugins"),
+
+ rrdtool = translate("RRDTool"),
+ network = translate("Network"),
+ unixsock = translate("UnixSock"),
+ csv = translate("CSV Output"),
+ exec = translate("Exec"),
+ email = translate("Email"),
+ cpu = translate("Processor"),
+ df = translate("Disk Space Usage"),
+ disk = translate("Disk Usage"),
+ irq = translate("Interrupts"),
+ processes = translate("Processes"),
+ load = translate("System Load"),
+ interface = translate("Interfaces"),
+ netlink = translate("Netlink"),
+ iptables = translate("Firewall"),
+ tcpconns = translate("TCP Connections"),
+ ping = translate("Ping"),
+ dns = translate("DNS"),
+ wireless = translate("Wireless")
+ }
-- our collectd menu
local collectd_menu = {
@@ -50,11 +73,11 @@ function index()
}
-- create toplevel menu nodes
- local st = entry({"admin", "statistics"}, call("statistics_index"), _i18n("Statistics"), 80)
+ local st = entry({"admin", "statistics"}, call("statistics_index"), translate("Statistics"), 80)
st.i18n = "statistics"
st.index = true
- entry({"admin", "statistics", "collectd"}, cbi("luci_statistics/collectd"), _i18n("collectd"), 10).subindex = true
+ entry({"admin", "statistics", "collectd"}, cbi("luci_statistics/collectd"), translate("Collectd"), 10).subindex = true
-- populate collectd plugin menu
@@ -63,16 +86,14 @@ function index()
entry(
{ "admin", "statistics", "collectd", section },
call( "statistics_" .. section .. "plugins" ),
- _i18n( section .. "plugins" ),
- index * 10
+ labels["s_"..section], index * 10
).index = true
for j, plugin in luci.util.vspairs( plugins ) do
_entry(
{ "admin", "statistics", "collectd", section, plugin },
cbi("luci_statistics/" .. plugin ),
- _i18n( plugin ),
- j * 10
+ labels[plugin], j * 10
)
end
@@ -80,7 +101,7 @@ function index()
end
-- output views
- local page = entry( { "admin", "statistics", "graph" }, call("statistics_index"), _i18n("graphs"), 80)
+ local page = entry( { "admin", "statistics", "graph" }, call("statistics_index"), translate("Graphs"), 80)
page.i18n = "statistics"
page.setuser = "nobody"
page.setgroup = "nogroup"
@@ -96,7 +117,7 @@ function index()
-- plugin menu entry
entry(
{ "admin", "statistics", "graph", plugin },
- call("statistics_render"), _i18n( plugin ), i
+ call("statistics_render"), labels[plugin], i
).query = { timespan = span }
-- if more then one instance is found then generate submenu
@@ -117,31 +138,44 @@ function statistics_index()
end
function statistics_outputplugins()
- local plugins = { }
-
- for i, p in ipairs({ "rrdtool", "network", "unixsock", "csv" }) do
- plugins[p] = luci.i18n.translate( "stat_" .. p, p )
- end
+ local translate = luci.i18n.translate
+ local plugins = {
+ rrdtool = translate("RRDTool"),
+ network = translate("Network"),
+ unixsock = translate("UnixSock"),
+ csv = translate("CSV Output")
+ }
luci.template.render("admin_statistics/outputplugins", {plugins=plugins})
end
function statistics_systemplugins()
- local plugins = { }
-
- for i, p in ipairs({ "exec", "email", "df", "disk", "irq", "processes", "cpu" }) do
- plugins[p] = luci.i18n.translate( "stat_" .. p, p )
- end
+ local translate = luci.i18n.translate
+ local plugins = {
+ exec = translate("Exec"),
+ email = translate("Email"),
+ cpu = translate("Processor"),
+ df = translate("Disk Space Usage"),
+ disk = translate("Disk Usage"),
+ irq = translate("Interrupts"),
+ processes = translate("Processes"),
+ load = translate("System Load"),
+ }
luci.template.render("admin_statistics/systemplugins", {plugins=plugins})
end
function statistics_networkplugins()
- local plugins = { }
-
- for i, p in ipairs({ "interface", "netlink", "iptables", "tcpconns", "ping", "dns", "wireless" }) do
- plugins[p] = luci.i18n.translate( "stat_" .. p, p )
- end
+ local translate = luci.i18n.translate
+ local plugins = {
+ interface = translate("Interfaces"),
+ netlink = translate("Netlink"),
+ iptables = translate("Firewall"),
+ tcpconns = translate("TCP Connections"),
+ ping = translate("Ping"),
+ dns = translate("DNS"),
+ wireless = translate("Wireless")
+ }
luci.template.render("admin_statistics/networkplugins", {plugins=plugins})
end
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/collectd.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/collectd.lua
index ebd2641540..c1fd7a331a 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/collectd.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/collectd.lua
@@ -16,54 +16,54 @@ $Id$
require("luci.sys")
---[[
-m = Map("luci_statistics", "Collector Daemon",
-Collectd ist ein kleiner und flexibler Dienst zum Sammeln und Abfragen von Daten
-aus verschieden Quellen. Zur weiteren Verarbeitung werden die Daten in RRD Datenbanken
-gespeichert oder per Multicast Relaying über das Netzwerk versendet.)
-]]--
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("Collectd Settings"),
+ translate(
+ "Collectd is a small daeomon for collecting data from " ..
+ "various sources through different plugins. On this page " ..
+ "you can change general settings for the collectd daemon."
+ ))
-- general config section
s = m:section( NamedSection, "collectd", "luci_statistics" )
-- general.hostname (Hostname)
-hostname = s:option( Value, "Hostname" )
+hostname = s:option( Value, "Hostname", translate("Hostname") )
hostname.default = luci.sys.hostname()
hostname.optional = true
-- general.basedir (BaseDir)
-basedir = s:option( Value, "BaseDir" )
+basedir = s:option( Value, "BaseDir", translate("Base Directory") )
basedir.default = "/var/run/collectd"
-- general.include (Include)
-include = s:option( Value, "Include" )
+include = s:option( Value, "Include", translate("Directory for sub-configurations") )
include.default = "/etc/collectd/conf.d/*.conf"
-- general.plugindir (PluginDir)
-plugindir = s:option( Value, "PluginDir" )
+plugindir = s:option( Value, "PluginDir", translate("Directory for collectd plugins") )
plugindir.default = "/usr/lib/collectd/"
-- general.pidfile (PIDFile)
-pidfile = s:option( Value, "PIDFile" )
+pidfile = s:option( Value, "PIDFile", translate("Used PID file") )
pidfile.default = "/var/run/collectd.pid"
-- general.typesdb (TypesDB)
-typesdb = s:option( Value, "TypesDB" )
+typesdb = s:option( Value, "TypesDB", translate("Datasets definition file") )
typesdb.default = "/etc/collectd/types.db"
-- general.interval (Interval)
-interval = s:option( Value, "Interval" )
+interval = s:option( Value, "Interval", translate("Data collection interval"), translate("Seconds") )
interval.default = 60
interval.isnumber = true
-- general.readthreads (ReadThreads)
-readthreads = s:option( Value, "ReadThreads" )
+readthreads = s:option( Value, "ReadThreads", translate("Number of threads for data collection") )
readthreads.default = 5
readthreads.isnumber = true
-- general.fqdnlookup (FQDNLookup)
-fqdnlookup = s:option( Flag, "FQDNLookup" )
+fqdnlookup = s:option( Flag, "FQDNLookup", translate("Try to lookup fully qualified hostname") )
fqdnlookup.enabled = "true"
fqdnlookup.disabled = "false"
fqdnlookup.default = "false"
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/cpu.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/cpu.lua
index 2cd0e6430c..26d5f07c84 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/cpu.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/cpu.lua
@@ -13,13 +13,15 @@ $Id$
]]--
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("CPU Plugin Configuration"),
+ translate("The cpu plugin collects basic statistics about the processor usage."))
-- collectd_cpu config section
s = m:section( NamedSection, "collectd_cpu", "luci_statistics" )
-- collectd_cpu.enable
-enable = s:option( Flag, "enable" )
+enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
return m
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/csv.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/csv.lua
index 43c9006ee9..4f5aeef1d0 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/csv.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/csv.lua
@@ -13,22 +13,27 @@ $Id$
]]--
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("CSV Plugin Configuration"),
+ translate(
+ "The csv plugin stores collected data in csv file format " ..
+ "for further processing by external programs."
+ ))
-- collectd_csv config section
s = m:section( NamedSection, "collectd_csv", "luci_statistics" )
-- collectd_csv.enable
-enable = s:option( Flag, "enable" )
+enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
-- collectd_csv.datadir (DataDir)
-datadir = s:option( Value, "DataDir" )
+datadir = s:option( Value, "DataDir", translate("Storage directory for the csv files") )
datadir.default = "127.0.0.1"
datadir:depends( "enable", 1 )
-- collectd_csv.storerates (StoreRates)
-storerates = s:option( Flag, "StoreRates" )
+storerates = s:option( Flag, "StoreRates", translate("Store data values as rates instead of absolute values") )
storerates.default = 0
storerates:depends( "enable", 1 )
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/df.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/df.lua
index 905ebaeacf..be7ab0c5ec 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/df.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/df.lua
@@ -13,29 +13,34 @@ $Id$
]]--
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("DF Plugin Configuration"),
+ translate(
+ "The df plugin collects statistics about the disk space " ..
+ "usage on different devices, mount points or filesystem types."
+ ))
-- collectd_df config section
s = m:section( NamedSection, "collectd_df", "luci_statistics" )
-- collectd_df.enable
-enable = s:option( Flag, "enable" )
+enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
-- collectd_df.devices (Device)
-devices = s:option( Value, "Devices" )
+devices = s:option( Value, "Devices", translate("Monitor devices") )
devices.default = "/dev/mtdblock/4"
devices.optional = true
devices:depends( "enable", 1 )
-- collectd_df.mountpoints (MountPoint)
-mountpoints = s:option( Value, "MountPoints" )
-mountpoints.default = "/jffs"
+mountpoints = s:option( Value, "MountPoints", translate("Monitor mount points") )
+mountpoints.default = "/overlay"
mountpoints.optional = true
mountpoints:depends( "enable", 1 )
-- collectd_df.fstypes (FSType)
-fstypes = s:option( Value, "FSTypes" )
+fstypes = s:option( Value, "FSTypes", translate("Monitor filesystem types") )
fstypes.default = "tmpfs"
fstypes.optional = true
fstypes:depends( "enable", 1 )
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/disk.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/disk.lua
index 8cb921adf2..0dfa1ba975 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/disk.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/disk.lua
@@ -13,17 +13,22 @@ $Id$
]]--
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("Disk Plugin Configuration"),
+ translate(
+ "The disk plugin collects detailled usage statistics " ..
+ "for selected partitions or whole disks."
+ ))
-- collectd_disk config section
s = m:section( NamedSection, "collectd_disk", "luci_statistics" )
-- collectd_disk.enable
-enable = s:option( Flag, "enable" )
+enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
-- collectd_disk.disks (Disk)
-devices = s:option( Value, "Disks" )
+devices = s:option( Value, "Disks", translate("Monitor disks and partitions") )
devices.default = "hda1 hdb"
devices.rmempty = true
devices:depends( "enable", 1 )
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/dns.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/dns.lua
index 02fa4cb0b1..bfaeb423c2 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/dns.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/dns.lua
@@ -16,13 +16,18 @@ $Id$
require("luci.sys")
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("DNS Plugin Configuration"),
+ translate(
+ "The dns plugin collects detailled statistics about dns " ..
+ "related traffic on selected interfaces."
+ ))
-- collectd_dns config section
s = m:section( NamedSection, "collectd_dns", "luci_statistics" )
-- collectd_dns.enable
-enable = s:option( Flag, "enable" )
+enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
-- collectd_dns.interfaces (Interface)
@@ -36,7 +41,7 @@ for k, v in pairs(luci.sys.net.devices()) do
end
-- collectd_dns.ignoresources (IgnoreSource)
-ignoresources = s:option( Value, "IgnoreSources" )
+ignoresources = s:option( Value, "IgnoreSources", translate("Ignore source addresses") )
ignoresources.default = "127.0.0.1"
ignoresources:depends( "enable", 1 )
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/email.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/email.lua
index b2caa579a7..37d2cdf467 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/email.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/email.lua
@@ -13,13 +13,21 @@ $Id$
]]--
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("E-Mail Plugin Configuration"),
+ translate(
+ "The email plugin creates a unix socket which can be used " ..
+ "to transmit email-statistics to a running collectd daemon. " ..
+ "This plugin is primarily intended to be used in conjunction " ..
+ "with Mail::SpamAssasin::Plugin::Collectd but can be used in " ..
+ "other ways as well."
+ ))
-- collectd_email config section
s = m:section( NamedSection, "collectd_email", "luci_statistics" )
-- collectd_email.enable
-enable = s:option( Flag, "enable" )
+enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
-- collectd_email.socketfile (SocketFile)
@@ -42,7 +50,7 @@ socketperms.optional = true
socketperms:depends( "enable", 1 )
-- collectd_email.maxconns (MaxConns)
-maxconns = s:option( Value, "MaxConns" )
+maxconns = s:option( Value, "MaxConns", translate("Maximum allowed connections") )
maxconns.default = 5
maxconns.isinteger = true
maxconns.rmempty = true
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/exec.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/exec.lua
index ce97f7391a..7609f24583 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/exec.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/exec.lua
@@ -13,18 +13,30 @@ $Id$
]]--
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("Exec Plugin Configuration"),
+ translate(
+ "The exec plugin starts external commands to read values " ..
+ "from or to notify external processes when certain threshold " ..
+ "values have been reached."
+ ))
-- collectd_exec config section
s = m:section( NamedSection, "collectd_exec", "luci_statistics" )
-- collectd_exec.enable
-enable = s:option( Flag, "enable" )
+enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
-- collectd_exec_input config section (Exec directives)
-exec = m:section( TypedSection, "collectd_exec_input" )
+exec = m:section( TypedSection, "collectd_exec_input",
+ translate("Add command for reading values"),
+ translate(
+ "Here you can define external commands which will be " ..
+ "started by collectd in order to read certain values. " ..
+ "The values will be read from stdout."
+ ))
exec.addremove = true
exec.anonymous = true
@@ -46,7 +58,14 @@ exec_cmdgroup.optional = true
-- collectd_exec_notify config section (NotifyExec directives)
-notify = m:section( TypedSection, "collectd_exec_notify" )
+notify = m:section( TypedSection, "collectd_exec_notify",
+ translate("Add notification command"),
+ translate(
+ "Here you can define external commands which will be " ..
+ "started by collectd when certain threshold values have " ..
+ "been reached. The values leading to invokation will be " ..
+ "feeded to the the called programs stdin."
+ ))
notify.addremove = true
notify.anonymous = true
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/interface.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/interface.lua
index cdc3a10849..8e34e72bed 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/interface.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/interface.lua
@@ -16,13 +16,18 @@ $Id$
require("luci.sys")
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("Interface Plugin Configuration"),
+ translate(
+ "The interface plugin collects traffic statistics on " ..
+ "selected interfaces."
+ ))
-- collectd_interface config section
s = m:section( NamedSection, "collectd_interface", "luci_statistics" )
-- collectd_interface.enable
-enable = s:option( Flag, "enable" )
+enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
-- collectd_interface.interfaces (Interface)
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/iptables.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/iptables.lua
index 686d0088cb..f353d8b533 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/iptables.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/iptables.lua
@@ -25,27 +25,38 @@ for i, rule in ipairs( ip:find() ) do
end
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("Iptables Plugin Configuration"),
+ translate(
+ "The iptables plugin will monitor selected firewall rules and " ..
+ "collect informations about processed bytes and packets per rule."
+ ))
-- collectd_iptables config section
s = m:section( NamedSection, "collectd_iptables", "luci_statistics" )
-- collectd_iptables.enable
-enable = s:option( Flag, "enable" )
+enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
-- collectd_iptables_match config section (Chain directives)
-rule = m:section( TypedSection, "collectd_iptables_match" )
+rule = m:section( TypedSection, "collectd_iptables_match",
+ translate("Add matching rule"),
+ translate(
+ "Here you can define various criteria by which the monitored " ..
+ "iptables rules are selected."
+ ))
rule.addremove = true
rule.anonymous = true
-- collectd_iptables_match.name
-rule_table = rule:option( Value, "name" )
+rule_table = rule:option( Value, "name",
+ translate("Name of the rule"), translate("max. 16 chars") )
-- collectd_iptables_match.table
-rule_table = rule:option( ListValue, "table" )
+rule_table = rule:option( ListValue, "table", translate("Table") )
rule_table.default = "filter"
rule_table.rmempty = true
rule_table.optional = true
@@ -56,7 +67,7 @@ rule_table:value("mangle")
-- collectd_iptables_match.chain
-rule_chain = rule:option( ListValue, "chain" )
+rule_chain = rule:option( ListValue, "chain", translate("Chain") )
rule_chain.rmempty = true
rule_chain.optional = true
rule_chain:value("")
@@ -67,7 +78,7 @@ end
-- collectd_iptables_match.target
-rule_target = rule:option( ListValue, "target" )
+rule_target = rule:option( ListValue, "target", translate("Action (target)") )
rule_target.rmempty = true
rule_target.optional = true
rule_target:value("")
@@ -78,7 +89,7 @@ end
-- collectd_iptables_match.protocol
-rule_protocol = rule:option( ListValue, "protocol" )
+rule_protocol = rule:option( ListValue, "protocol", translate("Network protocol") )
rule_protocol.rmempty = true
rule_protocol.optional = true
rule_protocol:value("")
@@ -87,29 +98,32 @@ rule_protocol:value("udp")
rule_protocol:value("icmp")
-- collectd_iptables_match.source
-rule_source = rule:option( Value, "source" )
+rule_source = rule:option( Value, "source", translate("Source ip range") )
rule_source.default = "0.0.0.0/0"
rule_source.rmempty = true
rule_source.optional = true
-- collectd_iptables_match.destination
-rule_destination = rule:option( Value, "destination" )
+rule_destination = rule:option( Value, "destination", translate("Destination ip range") )
rule_destination.default = "0.0.0.0/0"
rule_destination.rmempty = true
rule_destination.optional = true
-- collectd_iptables_match.inputif
-rule_inputif = rule:option( Value, "inputif" )
+rule_inputif = rule:option( Value, "inputif",
+ translate("Incoming interface"), translate("e.g. br-lan") )
rule_inputif.rmempty = true
rule_inputif.optional = true
-- collectd_iptables_match.outputif
-rule_outputif = rule:option( Value, "outputif" )
+rule_outputif = rule:option( Value, "outputif",
+ translate("Outgoing interface"), translate("e.g. br-ff") )
rule_outputif.rmempty = true
rule_outputif.optional = true
-- collectd_iptables_match.options
-rule_options = rule:option( Value, "options" )
+rule_options = rule:option( Value, "options",
+ translate("Options"), translate("e.g. reject-with tcp-reset") )
rule_options.rmempty = true
rule_options.optional = true
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/irq.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/irq.lua
index 7e73a2b9fc..ea5f716e09 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/irq.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/irq.lua
@@ -13,17 +13,23 @@ $Id$
]]--
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("IRQ Plugin Configuration"),
+ translate(
+ "The irq plugin will monitor the rate of issues per second for " ..
+ "each selected interrupt. If no interrupt is selected then all " ..
+ "interrupts are monitored."
+ ))
-- collectd_irq config section
s = m:section( NamedSection, "collectd_irq", "luci_statistics" )
-- collectd_irq.enable
-enable = s:option( Flag, "enable" )
+enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
-- collectd_irq.irqs (Irq)
-irqs = s:option( Value, "Irqs" )
+irqs = s:option( Value, "Irqs", translate("Monitor interrupts") )
irqs.optional = true
irqs:depends( "enable", 1 )
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/load.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/load.lua
index a58c3ec79a..e59a4b8f7e 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/load.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/load.lua
@@ -13,13 +13,17 @@ $Id$
]]--
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("Load Plugin Configuration"),
+ translate(
+ "The load plugin collects statistics about the general system load."
+ ))
-- collectd_wireless config section
s = m:section( NamedSection, "collectd_load", "luci_statistics" )
-- collectd_wireless.enable
-enable = s:option( Flag, "enable" )
+enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
return m
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/netlink.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/netlink.lua
index 71d21dd74d..7447668b21 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/netlink.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/netlink.lua
@@ -18,17 +18,22 @@ require("luci.sys")
local devices = luci.sys.net.devices()
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("Netlink Plugin Configuration"),
+ translate(
+ "The netlink plugin collects extended informations like " ..
+ "qdisc-, class- and filter-statistics for selected interfaces."
+ ))
-- collectd_netlink config section
s = m:section( NamedSection, "collectd_netlink", "luci_statistics" )
-- collectd_netlink.enable
-enable = s:option( Flag, "enable" )
+enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
-- collectd_netlink.interfaces (Interface)
-interfaces = s:option( MultiValue, "Interfaces" )
+interfaces = s:option( MultiValue, "Interfaces", translate("Basic monitoring") )
interfaces.widget = "select"
interfaces.optional = true
interfaces.size = #devices + 1
@@ -39,7 +44,7 @@ for i, v in ipairs(devices) do
end
-- collectd_netlink.verboseinterfaces (VerboseInterface)
-verboseinterfaces = s:option( MultiValue, "VerboseInterfaces" )
+verboseinterfaces = s:option( MultiValue, "VerboseInterfaces", translate("Verbose monitoring") )
verboseinterfaces.widget = "select"
verboseinterfaces.optional = true
verboseinterfaces.size = #devices + 1
@@ -50,7 +55,7 @@ for i, v in ipairs(devices) do
end
-- collectd_netlink.qdiscs (QDisc)
-qdiscs = s:option( MultiValue, "QDiscs" )
+qdiscs = s:option( MultiValue, "QDiscs", translate("Qdisc monitoring") )
qdiscs.widget = "select"
qdiscs.optional = true
qdiscs.size = #devices + 1
@@ -61,7 +66,7 @@ for i, v in ipairs(devices) do
end
-- collectd_netlink.classes (Class)
-classes = s:option( MultiValue, "Classes" )
+classes = s:option( MultiValue, "Classes", translate("Shaping class monitoring") )
classes.widget = "select"
classes.optional = true
classes.size = #devices + 1
@@ -72,7 +77,7 @@ for i, v in ipairs(devices) do
end
-- collectd_netlink.filters (Filter)
-filters = s:option( MultiValue, "Filters" )
+filters = s:option( MultiValue, "Filters", translate("Filter class monitoring") )
filters.widget = "select"
filters.optional = true
filters.size = #devices + 1
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/network.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/network.lua
index f6302abc0c..8a0068973e 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/network.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/network.lua
@@ -14,62 +14,81 @@ $Id$
]]--
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("Network Plugin Configuration"),
+ translate(
+ "The network plugin provides network based communication between " ..
+ "different collectd instances. Collectd can operate both in client " ..
+ "and server mode. In client mode locally collected date is " ..
+ "transferred to a collectd server instance, in server mode the " ..
+ "local instance receives data from other hosts."
+ ))
-- collectd_network config section
s = m:section( NamedSection, "collectd_network", "luci_statistics" )
-- collectd_network.enable
-enable = s:option( Flag, "enable" )
+enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
-- collectd_network_listen config section (Listen)
-listen = m:section( TypedSection, "collectd_network_listen" )
+listen = m:section( TypedSection, "collectd_network_listen",
+ translate("Listener interfaces"),
+ translate(
+ "This section defines on which interfaces collectd will wait " ..
+ "for incoming connections."
+ ))
listen.addremove = true
listen.anonymous = true
-- collectd_network_listen.host
-listen_host = listen:option( Value, "host" )
+listen_host = listen:option( Value, "host", translate("Listen host") )
listen_host.default = "0.0.0.0"
-- collectd_network_listen.port
-listen_port = listen:option( Value, "port" )
+listen_port = listen:option( Value, "port", translate("Listen port") )
listen_port.default = 25826
listen_port.isinteger = true
listen_port.optional = true
-- collectd_network_server config section (Server)
-server = m:section( TypedSection, "collectd_network_server" )
+server = m:section( TypedSection, "collectd_network_server",
+ translate("server interfaces"),
+ translate(
+ "This section defines to which servers the locally collected " ..
+ "data is sent to."
+ ))
server.addremove = true
server.anonymous = true
-- collectd_network_server.host
-server_host = server:option( Value, "host" )
+server_host = server:option( Value, "host", translate("Server host") )
server_host.default = "0.0.0.0"
-- collectd_network_server.port
-server_port = server:option( Value, "port" )
+server_port = server:option( Value, "port", translate("Server port") )
server_port.default = 25826
server_port.isinteger = true
server_port.optional = true
-- collectd_network.timetolive (TimeToLive)
-ttl = s:option( Value, "TimeToLive" )
+ttl = s:option( Value, "TimeToLive", translate("TTL for network packets") )
ttl.default = 128
ttl.isinteger = true
ttl.optional = true
ttl:depends( "enable", 1 )
-- collectd_network.forward (Forward)
-forward = s:option( Flag, "Forward" )
+forward = s:option( Flag, "Forward", translate("Forwarding between listen and server addresses") )
forward.default = 0
forward.optional = true
forward:depends( "enable", 1 )
-- collectd_network.cacheflush (CacheFlush)
-cacheflush = s:option( Value, "CacheFlush" )
+cacheflush = s:option( Value, "CacheFlush",
+ translate("Cache flush interval"), translate("Seconds") )
cacheflush.default = 86400
cacheflush.isinteger = true
cacheflush.optional = true
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/ping.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/ping.lua
index a391d64e41..56d6a93d02 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/ping.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/ping.lua
@@ -13,22 +13,27 @@ $Id$
]]--
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("Ping Plugin Configuration"),
+ translate(
+ "The ping plugin will send icmp echo replies to selected " ..
+ "hosts and measure the roundtrip time for each host."
+ ))
-- collectd_ping config section
s = m:section( NamedSection, "collectd_ping", "luci_statistics" )
-- collectd_ping.enable
-enable = s:option( Flag, "enable" )
+enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
-- collectd_ping.hosts (Host)
-hosts = s:option( Value, "Hosts" )
+hosts = s:option( Value, "Hosts", translate("Monitor hosts") )
hosts.default = "127.0.0.1"
hosts:depends( "enable", 1 )
-- collectd_ping.ttl (TTL)
-ttl = s:option( Value, "TTL" )
+ttl = s:option( Value, "TTL", translate("TTL for ping packets") )
ttl.isinteger = true
ttl.default = 128
ttl:depends( "enable", 1 )
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/processes.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/processes.lua
index b2bc04fb21..6607b36406 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/processes.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/processes.lua
@@ -13,17 +13,22 @@ $Id$
]]--
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("Processes Plugin Configuration"),
+ translate(
+ "The processes plugin collects informations like cpu time, " ..
+ "page faults and memory usage of selected processes."
+ ))
-- collectd_processes config section
s = m:section( NamedSection, "collectd_processes", "luci_statistics" )
-- collectd_processes.enable
-enable = s:option( Flag, "enable" )
+enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
-- collectd_processes.processes (Process)
-processes = s:option( Value, "Processes" )
+processes = s:option( Value, "Processes", translate("Monitor processes") )
processes.default = "olsrd bmxd httpd dnsmasq dropbear tinc"
processes:depends( "enable", 1 )
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua
index ba78bb4ef3..75716341c8 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua
@@ -13,24 +13,33 @@ $Id$
]]--
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("RRDTool Plugin Configuration"),
+ translate(
+ "The rrdtool plugin stores the collected data in rrd database " ..
+ "files, the foundation of the diagrams.<br /><br />" ..
+ "<strong>Warning: Setting the wrong values will result in a very " ..
+ "high memory consumption in the temporary directory. " ..
+ "This can render the device unusable!</strong>"
+ ))
-- collectd_rrdtool config section
s = m:section( NamedSection, "collectd_rrdtool", "luci_statistics" )
-- collectd_rrdtool.enable
-enable = s:option( Flag, "enable" )
+enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 1
-- collectd_rrdtool.datadir (DataDir)
-datadir = s:option( Value, "DataDir" )
+datadir = s:option( Value, "DataDir", translate("Storage directory") )
datadir.default = "/tmp"
datadir.rmempty = true
datadir.optional = true
datadir:depends( "enable", 1 )
-- collectd_rrdtool.stepsize (StepSize)
-stepsize = s:option( Value, "StepSize" )
+stepsize = s:option( Value, "StepSize",
+ translate("RRD step interval"), translate("Seconds") )
stepsize.default = 30
stepsize.isinteger = true
stepsize.rmempty = true
@@ -38,7 +47,8 @@ stepsize.optional = true
stepsize:depends( "enable", 1 )
-- collectd_rrdtool.heartbeat (HeartBeat)
-heartbeat = s:option( Value, "HeartBeat" )
+heartbeat = s:option( Value, "HeartBeat",
+ translate("RRD heart beat interval"), translate("Seconds") )
heartbeat.default = 60
heartbeat.isinteger = true
heartbeat.rmempty = true
@@ -46,21 +56,23 @@ heartbeat.optional = true
heartbeat:depends( "enable", 1 )
-- collectd_rrdtool.rrasingle (RRASingle)
-rrasingle = s:option( Flag, "RRASingle" )
+rrasingle = s:option( Flag, "RRASingle",
+ translate("Only create average RRAs"), translate("reduces rrd size") )
rrasingle.default = true
rrasingle.rmempty = true
rrasingle.optional = true
rrasingle:depends( "enable", 1 )
-- collectd_rrdtool.rratimespans (RRATimespan)
-rratimespans = s:option( Value, "RRATimespans" )
+rratimespans = s:option( Value, "RRATimespans",
+ translate("Stored timespans"), translate("seconds; multiple separated by space") )
rratimespans.default = "600 86400 604800 2678400 31622400"
rratimespans.rmempty = true
rratimespans.optional = true
rratimespans:depends( "enable", 1 )
-- collectd_rrdtool.rrarows (RRARows)
-rrarows = s:option( Value, "RRARows" )
+rrarows = s:option( Value, "RRARows", translate("Rows per RRA") )
rrarows.isinteger = true
rrarows.default = 100
rrarows.rmempty = true
@@ -68,7 +80,7 @@ rrarows.optional = true
rrarows:depends( "enable", 1 )
-- collectd_rrdtool.xff (XFF)
-xff = s:option( Value, "XFF" )
+xff = s:option( Value, "XFF", translate("RRD XFiles Factor") )
xff.default = 0.1
xff.isnumber = true
xff.rmempty = true
@@ -76,7 +88,8 @@ xff.optional = true
xff:depends( "enable", 1 )
-- collectd_rrdtool.cachetimeout (CacheTimeout)
-cachetimeout = s:option( Value, "CacheTimeout" )
+cachetimeout = s:option( Value, "CacheTimeout",
+ translate("Cache collected data for"), translate("Seconds") )
cachetimeout.isinteger = true
cachetimeout.default = 100
cachetimeout.rmempty = true
@@ -84,7 +97,8 @@ cachetimeout.optional = true
cachetimeout:depends( "enable", 1 )
-- collectd_rrdtool.cacheflush (CacheFlush)
-cacheflush = s:option( Value, "CacheFlush" )
+cacheflush = s:option( Value, "CacheFlush",
+ translate("Flush cache after"), translate("Seconds") )
cacheflush.isinteger = true
cacheflush.default = 100
cacheflush.rmempty = true
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/tcpconns.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/tcpconns.lua
index c60de5efa3..9d0f6e137c 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/tcpconns.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/tcpconns.lua
@@ -13,27 +13,32 @@ $Id$
]]--
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("TCPConns Plugin Configuration"),
+ translate(
+ "The tcpconns plugin collects informations about open tcp " ..
+ "connections on selected ports."
+ ))
-- collectd_tcpconns config section
s = m:section( NamedSection, "collectd_tcpconns", "luci_statistics" )
-- collectd_tcpconns.enable
-enable = s:option( Flag, "enable" )
+enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
-- collectd_tcpconns.listeningports (ListeningPorts)
-listeningports = s:option( Flag, "ListeningPorts" )
+listeningports = s:option( Flag, "ListeningPorts", translate("Monitor all local listen ports") )
listeningports.default = 1
listeningports:depends( "enable", 1 )
-- collectd_tcpconns.localports (LocalPort)
-localports = s:option( Value, "LocalPorts" )
+localports = s:option( Value, "LocalPorts", translate("Monitor local ports") )
localports.optional = true
localports:depends( "enable", 1 )
-- collectd_tcpconns.remoteports (RemotePort)
-remoteports = s:option( Value, "RemotePorts" )
+remoteports = s:option( Value, "RemotePorts", translate("Monitor remote ports") )
remoteports.optional = true
remoteports:depends( "enable", 1 )
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/unixsock.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/unixsock.lua
index eb97a3e2fa..cbd52ec1fe 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/unixsock.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/unixsock.lua
@@ -13,13 +13,18 @@ $Id$
]]--
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("Unixsock Plugin Configuration"),
+ translate(
+ "The unixsock plugin creates a unix socket which can be used " ..
+ "to read collected data from a running collectd instance."
+ ))
-- collectd_unixsock config section
s = m:section( NamedSection, "collectd_unixsock", "luci_statistics" )
-- collectd_unixsock.enable
-enable = s:option( Flag, "enable" )
+enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
-- collectd_unixsock.socketfile (SocketFile)
diff --git a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/wireless.lua b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/wireless.lua
index c03dea3a97..f971c8cfc4 100644
--- a/applications/luci-statistics/luasrc/model/cbi/luci_statistics/wireless.lua
+++ b/applications/luci-statistics/luasrc/model/cbi/luci_statistics/wireless.lua
@@ -13,13 +13,18 @@ $Id$
]]--
-m = Map("luci_statistics")
+m = Map("luci_statistics",
+ translate("Wireless Plugin Configuration"),
+ translate(
+ "The wireless plugin collects statistics about wireless signal " ..
+ "strength, noise and quality."
+ ))
-- collectd_wireless config section
s = m:section( NamedSection, "collectd_wireless", "luci_statistics" )
-- collectd_wireless.enable
-enable = s:option( Flag, "enable" )
+enable = s:option( Flag, "enable", translate("Enable this plugin") )
enable.default = 0
return m