summaryrefslogtreecommitdiffstats
path: root/modules/luci-mod-dsl/htdocs/luci-static/resources/view/status/dsl/spectrum.js
blob: 02b38ceaa1c5c1986768c93c36621a30003ff668 (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
72
73
74
75
76
'use strict';
'require view';
'require fs';
'require ui';
'require rpc';

const callDSLStatistics = rpc.declare({
	object: 'dsl',
	method: 'statistics',
	expect: { '': {} }
});

return view.extend({
	load() {
		return Promise.all([
			callDSLStatistics()
		]);
	},

	render(data) {
		window.json = data[0];

		const v = E('div', {'class': 'cbi-map'}, [
			E('h2', {'style': "height: 40px"}, [ _('DSL line spectrum') ]),
			E('div', {'class': 'cbi-map-descr'}, _('The following diagrams show graphically prepared DSL characteristics that are important for evaluating the DSL connection.')),

			E('div', {'class': 'cbi-section'}, [
				E('div', {'style': "height: 360px; width: 1024px"},
					E('canvas', {
						'id': 'dbChart',
						'height': 360,
						'width': 1024},
						["chart"])
				),
				E('div', {'class': 'cbi-section-descr', 'style': 'text-align:center'}, _('The graph shows the signal to noise ratio (SNR) per subcarrier in the uplink and downlink direction')),
			]),
			E('div', {'class': 'cbi-section'}, [
				E('div', {'style': "height: 360px; width:1024px"},
					E('canvas', {
						'id': 'bitsChart',
						'height': 360,
						'width': 1024},
						["chart2"])
				),
				E('div', {'class': 'cbi-section-descr', 'style': 'text-align:center'}, _('The graph shows the amount of bits actually allocated per subcarrier in the uplink and downlink direction')),
			]),
			E('div', {'class': 'cbi-section'}, [
				E('div', {'style': "height: 360px; width:1024px"},
					E('canvas', {
						'id': 'qlnChart',
						'height': 360,
						'width': 1024},
						["chart2"])
				),
				E('div', {'class': 'cbi-section-descr', 'style': 'text-align:center'}, _('The diagram shows the quiet line noise (QLN) per subcarrier in uplink and downlink direction')),
			]),
			E('div', {'class': 'cbi-section'}, [
				E('div', {'style': "height: 360px; width:1024px"},
					E('canvas', {
						'id': 'hlogChart',
						'height': 360,
						'width': 1024},
						["chart2"])
				),
				E('div', {'class': 'cbi-section-descr', 'style': 'text-align:center'}, _('The diagram shows the Channel Characteristics Function (HLOG) per subcarrier in uplink and downlink direction')),
			]),
			E('script', {'src':'/luci-static/resources/view/status/dsl/graph.js'}, {})
		]);

		return v;
	},

	handleSaveApply: null,
	handleSave: null,
	handleReset: null
});