luci/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/plugins/olsrd.js
Jo-Philipp Wich d4a475163e luci-app-statistics: clean and fix plugin configurations
- Remove redundant form flags
 - Fix various default values
 - Add some new collect options and remove options that do not exist anymore

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-22 23:26:49 +01:00

48 lines
1.3 KiB
JavaScript

'use strict';
'require form';
return L.Class.extend({
title: _('OLSRd Plugin Configuration'),
description: _('The OLSRd plugin reads information about meshed networks from the txtinfo plugin of OLSRd.'),
addFormOptions: function(s) {
var 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: function(section) {
return _('Monitoring OLSRd status at %s:%d').format(
section.Host || 'localhost',
section.Port || 2006
);
}
});