973c0858f3f7309140ae791ac90a1f452cebbb58
[project/luci.git] / applications / luci-app-statistics / htdocs / luci-static / resources / view / statistics / plugins / olsrd.js
1 'use strict';
2 'require form';
3
4 return L.Class.extend({
5 title: _('OLSRd Plugin Configuration'),
6 description: _('The OLSRd plugin reads information about meshed networks from the txtinfo plugin of OLSRd.'),
7
8 addFormOptions: function(s) {
9 var o;
10
11 o = s.option(form.Flag, 'enable', _('Enable this plugin'));
12
13 o = s.option(form.Value, 'Host', _('Host'),
14 _('IP or hostname where to get the txtinfo output from'));
15 o.datatype = 'host';
16
17 o = s.option(form.Value, 'Port', _('Port'));
18 o.datatype = 'port';
19
20 o = s.option(form.ListValue, 'CollectLinks', _('CollectLinks'),
21 _('Specifies what information to collect about links.'));
22 o.default = 'Detail';
23 o.value('No');
24 o.value('Summary');
25 o.value('Detail');
26
27 o = s.option(form.ListValue, 'CollectRoutes', _('CollectRoutes'),
28 _('Specifies what information to collect about routes.'));
29 o.default = 'Summary';
30 o.value('No');
31 o.value('Summary');
32 o.value('Detail');
33
34 o = s.option(form.ListValue, 'CollectTopology', _('CollectTopology'),
35 _('Specifies what information to collect about the global topology.'));
36 o.default = 'Summary';
37 o.value('No');
38 o.value('Summary');
39 o.value('Detail');
40 },
41
42 configSummary: function(section) {
43 return _('Monitoring OLSRd status at %s:%d').format(
44 section.Host || 'localhost',
45 section.Port || 2006
46 );
47 }
48 });