summaryrefslogtreecommitdiffstats
path: root/rrdtool-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'rrdtool-model.lua')
-rw-r--r--rrdtool-model.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/rrdtool-model.lua b/rrdtool-model.lua
index b3f6dee..16ba2be 100644
--- a/rrdtool-model.lua
+++ b/rrdtool-model.lua
@@ -228,12 +228,16 @@ function getgraphlist()
end
function getgraphfile(path)
+ if (path) then
+ path = graphpath .. "/" .. path
+ end
if (path) and not (validfilename(path)) then
path = nil
end
local filedetails = modelfunctions.getfiledetails(path)
local output = {value={filename=filedetails.value.filename,
filecontent=filedetails.value.filecontent,}}
+ output.value.filename.value = string.gsub(filedetails.value.filename.value, "^.*/", "")
-- output.value.filecontent.rows="30" -- FIXME: For some reason I can't control the size of a textarea
if not (path) then
output.value.filename.errtxt=nil