* luc/statistics: add file/license headers
[project/luci.git] / applications / luci-statistics / luasrc / statistics / rrdtool / definitions / wireless.lua
1 --[[
2
3 Luci statistics - wireless 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$
13
14 ]]--
15
16 module("luci.statistics.rrdtool.definitions.wireless", package.seeall)
17
18 function rrdargs( graph, host, plugin, plugin_instance )
19
20         --
21         -- signal/noise diagram
22         --
23         local snr = {
24
25                 -- draw this diagram for each data instance
26                 per_instance = true,
27
28                 -- diagram data description
29                 data = {
30                         types = { "signal_noise", "signal_power" },
31
32                         -- special options for single data lines
33                         options = {
34                                 signal_power = {
35                                         overlay = true,         -- don't summarize
36                                         color   = "0000ff"      -- power is blue
37                                 },
38
39                                 signal_noise = {
40                                         overlay = true,         -- don't summarize
41                                         color   = "ff0000"      -- noise is red
42                                 }
43                         }
44                 }
45         }
46
47
48         --
49         -- signal quality diagram
50         --
51         local quality = {
52
53                 -- draw this diagram for each data instance
54                 per_instance = true,
55
56                 -- diagram data description
57                 data = {
58                         types = { "signal_quality" },
59
60                         -- special options for single data lines
61                         options = {
62                                 signal_quality = {
63                                         noarea = true,          -- don't draw area
64                                         color  = "0000ff"       -- quality is blue
65                                 }
66                         }
67                 }
68         }
69
70         return { snr, quality }
71 end