diff options
author | Martin Surovcak <martin@surovcak.cz> | 2019-04-04 00:32:13 +0200 |
---|---|---|
committer | Martin Surovcak <martin@surovcak.cz> | 2019-04-04 00:36:05 +0200 |
commit | 7bab4a3ef23397991c7f2296508cd52be20b4e49 (patch) | |
tree | c55e200c3c2ad41d675a47c4119e50995c52dca3 | |
parent | d679b93bad9ce0ee529b78c791de39a751a78006 (diff) |
luci-app-statistics - allow rrd files to contain :
Fixes situations where RRD file name contains ":" (eg. _ping/ipv6_) in `rrdtool` it's unescaped - thus not able to render image. Adding simple escaping of `:` to `\\:` fixes the situation.
Might be a solution for #958.
-rw-r--r-- | applications/luci-app-statistics/luasrc/statistics/rrdtool.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua index f827e9230..29090eed8 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua @@ -62,7 +62,7 @@ function Graph._mkpath( self, plugin, plugin_instance, dtype, dtype_instance ) end function Graph.mkrrdpath( self, ... ) - return string.format( "%s/%s.rrd", self.opts.rrdpath, self:_mkpath( ... ) ) + return string.format( "%s/%s.rrd", self.opts.rrdpath, string.gsub(self:_mkpath( ... ), ":", "\\:") ) end function Graph.mkpngpath( self, ... ) |