luci-app-statistics: Adjust UI defaults to match config file
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>
This commit is contained in:
parent
c052818ee9
commit
f7e5b56649
7 changed files with 10 additions and 7 deletions
|
@ -16,6 +16,7 @@ return baseclass.extend({
|
|||
_('When none selected, all interfaces will be monitored.'));
|
||||
o.multiple = true;
|
||||
o.noaliases = true;
|
||||
o.default = 'br-lan';
|
||||
o.depends('enable', '1');
|
||||
|
||||
o = s.option(form.DynamicList, 'IgnoreSources', _('Ignore source addresses'));
|
||||
|
|
|
@ -13,7 +13,7 @@ return baseclass.extend({
|
|||
o = s.option(form.Flag, 'enable', _('Enable this plugin'));
|
||||
|
||||
o = s.option(form.Value, 'SocketFile', _('Socket file'));
|
||||
o.default = '/var/run/collect-email.sock';
|
||||
o.default = '/var/run/collectd/email.sock';
|
||||
o.depends('enable', '1');
|
||||
|
||||
o = s.option(widgets.GroupSelect, 'SocketGroup', _('Socket group'));
|
||||
|
|
|
@ -15,6 +15,7 @@ return baseclass.extend({
|
|||
o = s.option(widgets.DeviceSelect, 'Interfaces', _('Monitor interfaces'));
|
||||
o.multiple = true;
|
||||
o.noaliases = true;
|
||||
o.default = 'br-lan';
|
||||
o.depends('enable', '1');
|
||||
|
||||
o = s.option(form.Flag, 'IgnoreSelected', _('Monitor all except specified'));
|
||||
|
|
|
@ -24,12 +24,12 @@ return baseclass.extend({
|
|||
o.value('ipv6');
|
||||
|
||||
o = s.option(form.Value, 'TTL', _('TTL for ping packets'));
|
||||
o.default = '128';
|
||||
o.default = '127';
|
||||
o.datatype = 'range(0, 255)';
|
||||
o.depends('enable', '1');
|
||||
|
||||
o = s.option(form.Value, 'Interval', _('Interval for pings'), _('Seconds'));
|
||||
o.default = '1.0';
|
||||
o.default = '30';
|
||||
o.datatype = 'ufloat';
|
||||
o.depends('enable', '1');
|
||||
},
|
||||
|
|
|
@ -36,7 +36,7 @@ return baseclass.extend({
|
|||
o.depends('RRASingle', '0');
|
||||
|
||||
o = s.option(form.DynamicList, 'RRATimespans', _('Stored timespans'));
|
||||
o.default = '10min 1day 1week 1month 1year';
|
||||
o.default = '1hour 1day 1week 1month 1year';
|
||||
o.depends('enable', '1');
|
||||
o.validate = function(section_id, value) {
|
||||
if (value == '')
|
||||
|
@ -49,7 +49,7 @@ return baseclass.extend({
|
|||
};
|
||||
|
||||
o = s.option(form.Value, 'RRARows', _('Rows per RRA'));
|
||||
o.placeholder = '1200';
|
||||
o.default = '144';
|
||||
o.datatype = 'min(1)';
|
||||
o.depends('enable', '1');
|
||||
|
||||
|
|
|
@ -14,11 +14,12 @@ return baseclass.extend({
|
|||
o = s.option(form.Flag, 'ListeningPorts', _('Monitor all local listen ports'));
|
||||
o.depends('enable', '1');
|
||||
o.rmempty = false;
|
||||
o.default = '1';
|
||||
o.default = '0';
|
||||
|
||||
o = s.option(form.DynamicList, 'LocalPorts', _('Monitor local ports'));
|
||||
o.optional = true;
|
||||
o.datatype = 'port';
|
||||
o.default = '22 80';
|
||||
o.depends({ enable: '1', ListeningPorts: '0' });
|
||||
|
||||
o = s.option(form.DynamicList, 'RemotePorts', _('Monitor remote ports'));
|
||||
|
|
|
@ -13,7 +13,7 @@ return baseclass.extend({
|
|||
o = s.option(form.Flag, 'enable', _('Enable this plugin'));
|
||||
|
||||
o = s.option(form.Value, 'SocketFile', _('Socket path'));
|
||||
o.default = '/var/run/collect-query.socket';
|
||||
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.'));
|
||||
|
|
Loading…
Reference in a new issue