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
|
'use strict';
'require baseclass';
'require form';
return baseclass.extend({
title: _('OLSRd Plugin Configuration'),
description: _('The OLSRd plugin reads information about meshed networks from the txtinfo plugin of OLSRd.'),
addFormOptions(s) {
let o;
o = s.option(form.Flag, 'enable', _('Enable this plugin'));
o = s.option(form.Value, 'Host', _('Host'),
_('IP or hostname where to get the txtinfo output from'));
o.datatype = 'host';
o = s.option(form.Value, 'Port', _('Port'));
o.datatype = 'port';
o = s.option(form.ListValue, 'CollectLinks', _('CollectLinks'),
_('Specifies what information to collect about links.'));
o.default = 'Detail';
o.value('No');
o.value('Summary');
o.value('Detail');
o = s.option(form.ListValue, 'CollectRoutes', _('CollectRoutes'),
_('Specifies what information to collect about routes.'));
o.default = 'Summary';
o.value('No');
o.value('Summary');
o.value('Detail');
o = s.option(form.ListValue, 'CollectTopology', _('CollectTopology'),
_('Specifies what information to collect about the global topology.'));
o.default = 'Summary';
o.value('No');
o.value('Summary');
o.value('Detail');
},
configSummary(section) {
return _('Monitoring OLSRd status at %s:%d').format(
section.Host || 'localhost',
section.Port || 2006
);
}
});
|