diff options
author | Florian Eckert <fe@dev.tdt.de> | 2019-03-04 16:07:11 +0100 |
---|---|---|
committer | Florian Eckert <fe@dev.tdt.de> | 2019-03-07 15:14:11 +0100 |
commit | b42465f3fc6e282cf10627f0bc7c0c0cecc7d3c8 (patch) | |
tree | 213a52dad3bcc44a747446bbddc267a1bfb322c7 /applications/luci-app-statistics/luasrc | |
parent | 61ea3ed1ee94bebf41fc9254a78f026c938b36c9 (diff) |
luci-app-statistics: rrdtool add canvas height option
Added configuration parameters to also configure the height of the rrd images.
config statistics 'rrdtool'
option image_height '200'
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'applications/luci-app-statistics/luasrc')
-rw-r--r-- | applications/luci-app-statistics/luasrc/statistics/rrdtool.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua index b9f48a45b..f827e9230 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua @@ -26,6 +26,7 @@ function Graph.__init__( self, timespan, opts ) opts.rramax = opts.rramax or ( sections.collectd_rrdtool.RRAMax == "1" ) opts.host = opts.host or sections.collectd.Hostname or sys.hostname() opts.width = opts.width or sections.rrdtool.image_width or 400 + opts.height = opts.height or sections.rrdtool.image_height or 100 opts.rrdpath = opts.rrdpath or sections.collectd_rrdtool.DataDir or "/tmp/rrd" opts.imgpath = opts.imgpath or sections.rrdtool.image_path or "/tmp/rrdimg" opts.rrdpath = opts.rrdpath:gsub("/$","") @@ -40,7 +41,8 @@ function Graph.__init__( self, timespan, opts ) self.args = { "-a", "PNG", "-s", "NOW-" .. opts.timespan, - "-w", opts.width + "-w", opts.width, + "-h", opts.height } -- store options |