applications/luci-statistics: rework handling of index and detail graphs
[project/luci.git] / applications / luci-statistics / luasrc / statistics / rrdtool / definitions / iptables.lua
1 --[[
2
3 Luci statistics - iptables plugin diagram definition
4 (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id: ipt_bytes.lua 2276 2008-06-03 23:18:37Z jow $
13
14 ]]--
15
16 module("luci.statistics.rrdtool.definitions.iptables", package.seeall)
17
18 function rrdargs( graph, plugin, plugin_instance, dtype )
19
20 return {
21 {
22 title = "%H: Firewall: Processed bytes in %pi",
23 vlabel = "Bytes/s",
24 number_format = "%5.0lf%sB/s",
25 totals_format = "%5.0lf%sB",
26 data = {
27 types = { "ipt_bytes" },
28 options = {
29 ipt_bytes = {
30 total = true,
31 title = "%di"
32 }
33 }
34 }
35 },
36
37 {
38 title = "%H: Firewall: Processed packets in %pi",
39 vlabel = "Packets/s",
40 number_format = "%5.1lf P/s",
41 totals_format = "%5.0lf%s",
42 data = {
43 types = { "ipt_packets" },
44 options = {
45 ipt_packets = {
46 total = true,
47 title = "%di"
48 }
49 }
50 }
51 }
52 }
53 end