summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-05-22 13:17:33 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-05-22 13:17:33 +0000
commitf738eb786e3d30028310c7bcc447e7e7b63767e0 (patch)
tree7d8c8440344424716bf44e3597c0dcc46514af3a
parent41f224a2fa3f4c6f47bf990481df0a0f5cafb6ee (diff)
* ffluci/statistics: fixes for interface, netlink, dns and email plugin cbi models
-rw-r--r--applications/luci-statistics/src/model/cbi/admin_statistics/dns.lua8
-rw-r--r--applications/luci-statistics/src/model/cbi/admin_statistics/email.lua2
-rw-r--r--applications/luci-statistics/src/model/cbi/admin_statistics/interface.lua9
-rw-r--r--applications/luci-statistics/src/model/cbi/admin_statistics/netlink.lua4
4 files changed, 11 insertions, 12 deletions
diff --git a/applications/luci-statistics/src/model/cbi/admin_statistics/dns.lua b/applications/luci-statistics/src/model/cbi/admin_statistics/dns.lua
index 02896d8e44..ed71a55a3a 100644
--- a/applications/luci-statistics/src/model/cbi/admin_statistics/dns.lua
+++ b/applications/luci-statistics/src/model/cbi/admin_statistics/dns.lua
@@ -13,7 +13,7 @@ $Id$
]]--
-require("ffluci.model.uci")
+require("ffluci.sys")
m = Map("luci_statistics", "DNS Plugin",
@@ -30,10 +30,8 @@ enable.default = 0
interfaces = s:option( ListValue, "Interface", "Folgende Schnittstelle überwachen:" )
interfaces:depends( "enable", 1 )
interfaces:value("any")
-for k, v in pairs(ffluci.model.uci.sections("network")) do
- if v[".type"] == "interface" and k ~= "loopback" then
- interfaces:value(k)
- end
+for k, v in pairs(ffluci.sys.net.devices()) do
+ interfaces:value(v)
end
-- collectd_dns.ignoresources (IgnoreSource)
diff --git a/applications/luci-statistics/src/model/cbi/admin_statistics/email.lua b/applications/luci-statistics/src/model/cbi/admin_statistics/email.lua
index 49c11de11f..7b259e8297 100644
--- a/applications/luci-statistics/src/model/cbi/admin_statistics/email.lua
+++ b/applications/luci-statistics/src/model/cbi/admin_statistics/email.lua
@@ -27,7 +27,7 @@ enable.default = 0
-- collectd_email.socketfile (SocketFile)
socketfile = s:option( Value, "SocketFile", "Pfad für den Unix-Socket" )
-socketfile.default = "/var/run/collect-email.socket"
+socketfile.default = "/var/run/collect-email.sock"
socketfile:depends( "enable", 1 )
-- collectd_email.socketgroup (SocketGroup)
diff --git a/applications/luci-statistics/src/model/cbi/admin_statistics/interface.lua b/applications/luci-statistics/src/model/cbi/admin_statistics/interface.lua
index e7e3042a95..5acd4e93ca 100644
--- a/applications/luci-statistics/src/model/cbi/admin_statistics/interface.lua
+++ b/applications/luci-statistics/src/model/cbi/admin_statistics/interface.lua
@@ -13,6 +13,9 @@ $Id$
]]--
+require("ffluci.sys")
+
+
m = Map("luci_statistics", "Interface Plugin",
[[Das Interface-Plugin sammelt Informationen zum Netzwerkverkehr auf den einzelnen Schnittstellen.]])
@@ -27,10 +30,8 @@ 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.model.uci.sections("network")) do
- if v[".type"] == "interface" and k ~= "loopback" then
- interfaces:value(k)
- end
+for k, v in pairs(ffluci.sys.net.devices()) do
+ interfaces:value(v)
end
-- collectd_interface.ignoreselected (IgnoreSelected)
diff --git a/applications/luci-statistics/src/model/cbi/admin_statistics/netlink.lua b/applications/luci-statistics/src/model/cbi/admin_statistics/netlink.lua
index 9e1b86d4dd..478560f973 100644
--- a/applications/luci-statistics/src/model/cbi/admin_statistics/netlink.lua
+++ b/applications/luci-statistics/src/model/cbi/admin_statistics/netlink.lua
@@ -33,7 +33,7 @@ interfaces.optional = true
interfaces:depends( "enable", 1 )
interfaces:value("")
for i, v in ipairs(ffluci.sys.net.devices()) do
- interfaces:value(v)
+ interfaces:value(v)
end
-- collectd_netlink.verboseinterfaces (VerboseInterface)
@@ -43,7 +43,7 @@ verboseinterfaces.optional = true
verboseinterfaces:depends( "enable", 1 )
verboseinterfaces:value("")
for i, v in ipairs(ffluci.sys.net.devices()) do
- verboseinterfaces:value(v)
+ verboseinterfaces:value(v)
end
-- collectd_netlink.qdiscs (QDisc)