* luci/statistics: implement flip, overlay and total options for diagram models,...
[project/luci.git] / applications / luci-statistics / luasrc / statistics / rrdtool / definitions / wireless.lua
1 module("luci.statistics.rrdtool.definitions.wireless", package.seeall)
2
3 function rrdargs( graph, host, plugin, plugin_instance )
4
5         dtypes = { "signal_noise", "signal_power" }
6
7         opts = { }
8         opts.sources    = { }
9         opts.image      = graph:mkpngpath( host, plugin, plugin_instance, "wireless" )
10         opts.title      = host .. ": WLAN Signal"
11         opts.rrd        = { "-v", "dBm" }
12         opts.colors     = {
13                 signal_power = '0000ff',
14                 signal_noise = 'ff0000'
15         }
16
17         for i, dtype in ipairs(dtypes) do
18                 opts.sources[i] = {
19                         name    = dtype,
20                         rrd     = graph:mkrrdpath( host, plugin, plugin_instance, dtype ),
21                         overlay = true  -- don't summarize values
22                 }
23         end
24
25         return opts
26 end