luci-app-statistics: add missing ACL rules
[project/luci.git] / applications / luci-app-statistics / luasrc / statistics / rrdtool / definitions / openvpn.lua
1 -- Copyright 2015 Jo-Philipp Wich <jow@openwrt.org>
2 -- Licensed to the public under the Apache License 2.0.
3
4 module("luci.statistics.rrdtool.definitions.openvpn", package.seeall)
5
6 function item()
7 return luci.i18n.translate("OpenVPN")
8 end
9
10 function rrdargs( graph, plugin, plugin_instance )
11 local inst = plugin_instance:gsub("^openvpn%.(.+)%.status$", "%1")
12
13 return {
14 {
15 title = "%%H: OpenVPN \"%s\" - Traffic" % inst,
16 vlabel = "Bytes/s",
17 data = {
18 instances = {
19 if_octets = { "traffic", "overhead" }
20 },
21 sources = {
22 if_octets = { "tx", "rx" }
23 },
24 options = {
25 if_octets_traffic_tx = { weight = 0, title = "Bytes (TX)", total = true, color = "00ff00" },
26 if_octets_overhead_tx = { weight = 1, title = "Overhead (TX)", total = true, color = "ff9900" },
27 if_octets_overhead_rx = { weight = 2, title = "Overhead (RX)", total = true, flip = true, color = "ff00ff" },
28 if_octets_traffic_rx = { weight = 3, title = "Bytes (RX)", total = true, flip = true, color = "0000ff" }
29 }
30 }
31 },
32
33 {
34 title = "%%H: OpenVPN \"%s\" - Compression" % inst,
35 vlabel = "Bytes/s",
36 data = {
37 instances = {
38 compression = { "data_out", "data_in" }
39 },
40 sources = {
41 compression = { "uncompressed", "compressed" }
42 },
43 options = {
44 compression_data_out_uncompressed = { weight = 0, title = "Uncompressed (TX)", total = true, color = "00ff00" },
45 compression_data_out_compressed = { weight = 1, title = "Compressed (TX)", total = true, color = "008800" },
46 compression_data_in_compressed = { weight = 2, title = "Compressed (RX)", total = true, flip = true, color = "000088" },
47 compression_data_in_uncompressed = { weight = 3, title = "Uncompressed (RX)", total = true, flip = true, color = "0000ff" }
48 }
49 }
50 }
51 }
52 end