mirror of
https://github.com/openwrt/luci.git
synced 2025-02-12 05:48:12 +00:00
Adjust the defaults shown in the LuCI user interface to match the real default values in the default config file. (If a plugin is disabled and config values get deleted from the config file, user has been offered incorrect default values from UI defaults when the plugin is later re-enabled.) * dns: set br-lan as the interface * email: socket in /var/run/collectd/ dir * interface: set br-lan as the interface * ping: TTL 127, interval 30 * rrdtool: 1hour as shortest period, 144 RRArows * tcpconns: Do not monitor all, only 22 80 * unixsock: socket in /var/run/collectd/ dir Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
37 lines
1.0 KiB
JavaScript
37 lines
1.0 KiB
JavaScript
'use strict';
|
|
'require baseclass';
|
|
'require form';
|
|
'require tools.widgets as widgets';
|
|
|
|
return baseclass.extend({
|
|
title: _('Unixsock Plugin Configuration'),
|
|
description: _('The unixsock plugin creates a unix socket which can be used to read collected data from a running collectd instance.'),
|
|
|
|
addFormOptions: function(s) {
|
|
var o;
|
|
|
|
o = s.option(form.Flag, 'enable', _('Enable this plugin'));
|
|
|
|
o = s.option(form.Value, 'SocketFile', _('Socket path'));
|
|
o.default = '/var/run/collectd/query.sock';
|
|
o.depends('enable', '1');
|
|
|
|
o = s.option(widgets.GroupSelect, 'SocketGroup', _('Socket group'), _('Change the ownership of the socket file to the specified group.'));
|
|
o.placeholder = 'nogroup';
|
|
o.optional = true;
|
|
o.rmempty = true;
|
|
o.depends('enable', '1');
|
|
|
|
o = s.option(form.Value, 'SocketPerms', _('Socket permissions'));
|
|
o.placeholder = '0770';
|
|
o.optional = true;
|
|
o.rmempty = true;
|
|
o.depends('enable', '1');
|
|
},
|
|
|
|
configSummary: function(section) {
|
|
if (section.SocketFile)
|
|
return _('Socket %s active').format(section.SocketFile);
|
|
}
|
|
});
|