summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-statistics/htdocs/luci-static/resources/statistics
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2021-11-10 22:27:43 +0200
committerHannu Nyman <hannu.nyman@iki.fi>2021-11-10 22:27:43 +0200
commit5b3fa3cdc7530887898f5dc38d6dd15b88c66b5f (patch)
tree179b43b198ca788de7499d030c8afd73544d153b /applications/luci-app-statistics/htdocs/luci-static/resources/statistics
parent153287336264a2520e233f40e90131d815fd4492 (diff)
luci-app-statistics: adjust graph size fallback to defaults
Adjust the fallback timespan and graph width to the current config defaults. (The default width in /etc/config/luci_statistics has been 600 already since commit 7ab8b51bd in March 2010.) Expose the graph height in the config file and increase it from 100 to 150 to keep the original aspect ratio. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Diffstat (limited to 'applications/luci-app-statistics/htdocs/luci-static/resources/statistics')
-rw-r--r--applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool.js b/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool.js
index 19e34e4bc6..0e8414ff2f 100644
--- a/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool.js
+++ b/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool.js
@@ -149,9 +149,9 @@ return baseclass.extend({
hostname = data[1];
this.opts.host = uci.get('luci_statistics', 'collectd', 'Hostname') || hostname;
- this.opts.timespan = uci.get('luci_statistics', 'rrdtool', 'default_timespan') || 900;
- this.opts.width = uci.get('luci_statistics', 'rrdtool', 'image_width') || 400;
- this.opts.height = uci.get('luci_statistics', 'rrdtool', 'image_height') || 100;
+ this.opts.timespan = uci.get('luci_statistics', 'rrdtool', 'default_timespan') || 3600;
+ this.opts.width = uci.get('luci_statistics', 'rrdtool', 'image_width') || 600;
+ this.opts.height = uci.get('luci_statistics', 'rrdtool', 'image_height') || 150;
this.opts.rrdpath = (uci.get('luci_statistics', 'collectd_rrdtool', 'DataDir') || '/tmp/rrd').replace(/\/$/, '');
this.opts.rrasingle = (uci.get('luci_statistics', 'collectd_rrdtool', 'RRASingle') == '1');
this.opts.rramax = (uci.get('luci_statistics', 'collectd_rrdtool', 'RRAMax') == '1');