9eeb1d0016127918072b84ae47b5a8f59ae68656
[project/luci.git] /
1 /* Licensed to the public under the Apache License 2.0. */
2
3 'use strict';
4
5 return L.Class.extend({
6 title: _('Wireless'),
7
8 rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
9 /*
10 * signal/noise diagram
11 */
12 var snr = {
13 title: "%H: Signal and noise on %pi",
14 detail: true,
15 vlabel: "dBm",
16 number_format: "%5.1lf dBm",
17 data: {
18 types: [ "signal_noise", "signal_power" ],
19 options: {
20 signal_power: {
21 title : "Signal",
22 overlay: true,
23 color : "0000ff"
24 },
25 signal_noise: {
26 title : "Noise",
27 overlay: true,
28 color : "ff0000"
29 }
30 }
31 }
32 };
33
34 /*
35 * signal quality diagram
36 */
37 var quality = {
38 title: "%H: Signal quality on %pi",
39 vlabel: "Quality",
40 number_format: "%3.0lf",
41 data: {
42 types: [ "signal_quality" ],
43 options: {
44 signal_quality: {
45 title : "Quality",
46 noarea: true,
47 color : "0000ff"
48 }
49 }
50 }
51 };
52
53 /*
54 * phy rate diagram
55 */
56 var bitrate = {
57 title: "%H: Average phy rate on %pi",
58 detail: true,
59 vlabel: "MBit/s",
60 number_format: "%5.1lf%sBit/s",
61 data: {
62 types: [ "bitrate" ],
63 options: {
64 bitrate: {
65 title: "Rate",
66 color: "00ff00"
67 }
68 }
69 }
70 };
71
72 /*
73 * associated stations
74 */
75 var stations = {
76 title: "%H: Associated stations on %pi",
77 detail: true,
78 vlabel: "Stations",
79 y_min: "0",
80 alt_autoscale_max: true,
81 number_format: "%3.0lf",
82 data: {
83 types: [ "stations" ],
84 options: {
85 stations: {
86 title: "Stations",
87 color: "0000ff"
88 }
89 }
90 }
91 };
92
93 return [ quality, snr, bitrate, stations ];
94 }
95 });