summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-statistics/luasrc/statistics/rrdtool/definitions/wireless.lua
blob: 9bcbc069095a0c90bbd8cd037a0cb04b1a3a96e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
--[[

Luci statistics - wireless plugin diagram definition
(c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

$Id$

]]--

module("luci.statistics.rrdtool.definitions.wireless", package.seeall)

function rrdargs( graph, host, plugin, plugin_instance )

	--
	-- signal/noise diagram
	--
	local snr = {

		-- draw this diagram for each data instance
		per_instance = true,

		-- diagram data description
		data = {
			types = { "signal_noise", "signal_power" },

			-- special options for single data lines
			options = {
				signal_power = {
					overlay = true,		-- don't summarize
					color   = "0000ff"	-- power is blue
				},

				signal_noise = {
					overlay = true,		-- don't summarize
					color   = "ff0000"	-- noise is red
				}
			}
		}
	}


	--
	-- signal quality diagram
	--
	local quality = {

		-- draw this diagram for each data instance
		per_instance = true,

		-- diagram data description
		data = {
			types = { "signal_quality" },

			-- special options for single data lines
			options = {
				signal_quality = {
					noarea = true,		-- don't draw area
					color  = "0000ff"	-- quality is blue
				}
			}
		}
	}

	return { snr, quality }
end