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.)

* email: socket in /var/run/collectd/ dir
* ping: TTL 127
* rrdtool: 3600 sec (1hour) as shortest period, 144 RRArows
* unixsock: socket in /var/run/collectd/ dir

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(Backported and adapted from commit f7e5b56649)
This commit is contained in:
Hannu Nyman 2020-12-13 12:39:24 +02:00
parent 4a08cb912b
commit caae7adfaa
4 changed files with 5 additions and 5 deletions

View file

@ -20,7 +20,7 @@ enable.default = 0
-- collectd_email.socketfile (SocketFile)
socketfile = s:option( Value, "SocketFile", translate("Socket file") )
socketfile.default = "/var/run/collect-email.sock"
socketfile.default = "/var/run/collectd/email.sock"
socketfile:depends( "enable", 1 )
-- collectd_email.socketgroup (SocketGroup)

View file

@ -31,7 +31,7 @@ addressfamily:depends( "enable", 1 )
-- collectd_ping.ttl (TTL)
ttl = s:option( Value, "TTL", translate("TTL for ping packets") )
ttl.isinteger = true
ttl.default = 128
ttl.default = 127
ttl:depends( "enable", 1 )
-- collectd_ping.interval (Interval)

View file

@ -65,7 +65,7 @@ rramax:depends( "RRASingle", 0 )
-- collectd_rrdtool.rratimespans (RRATimespan)
rratimespans = s:option( Value, "RRATimespans",
translate("Stored timespans"), translate("seconds; multiple separated by space") )
rratimespans.default = "600 86400 604800 2678400 31622400"
rratimespans.default = "3600 86400 604800 2678400 31622400"
rratimespans.rmempty = true
rratimespans.optional = true
rratimespans:depends( "enable", 1 )
@ -73,7 +73,7 @@ rratimespans:depends( "enable", 1 )
-- collectd_rrdtool.rrarows (RRARows)
rrarows = s:option( Value, "RRARows", translate("Rows per RRA") )
rrarows.isinteger = true
rrarows.default = 100
rrarows.default = 144
rrarows.rmempty = true
rrarows.optional = true
rrarows:depends( "enable", 1 )

View file

@ -17,7 +17,7 @@ enable.default = 0
-- collectd_unixsock.socketfile (SocketFile)
socketfile = s:option( Value, "SocketFile" )
socketfile.default = "/var/run/collect-query.socket"
socketfile.default = "/var/run/collectd/query.sock"
socketfile:depends( "enable", 1 )
-- collectd_unixsock.socketgroup (SocketGroup)