commit 4f6198094cf4134179d1f9c9fa8f79759a27c87e
[project/luci.git] / applications / luci-statistics / luasrc / statistics / rrdtool / definitions / iptables / ipt_packets.lua
1 module("luci.statistics.rrdtool.definitions.iptables.ipt_packets", package.seeall)
2
3 function rrdargs( graph, host, plugin, plugin_instance, dtype )
4
5 dtype_instances = graph.tree:data_instances( plugin, plugin_instance, dtype )
6 opts = { }
7
8 for i, inst in ipairs(dtype_instances) do
9
10 opts[i] = { }
11 opts[i].image = graph:mkpngpath( host, plugin, plugin_instance, dtype, inst )
12 opts[i].title = host .. ": Firewall - " .. inst:gsub("_"," ")
13 opts[i].rrd = { "-v", "Pakete/s" }
14
15 opts[i].colors = {
16
17 }
18
19 opts[i].sources = { {
20 name = inst,
21 rrd = graph:mkrrdpath( host, plugin, plugin_instance, dtype, inst )
22 } }
23 end
24
25 return opts
26 end