add some indirection around make targets of module.mk, so you can combine it more...
[project/luci.git] / applications / luci-statistics / src / 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_power", "signal_noise" }
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 }
22 end
23
24 return opts
25 end