summaryrefslogtreecommitdiffstats
path: root/rrdtool-model.lua
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2009-07-09 07:23:16 +0000
committerMika Havela <mika.havela@gmail.com>2009-07-09 07:23:16 +0000
commitc6b5228ab2bdf1578a32ffb9cb06b2962cfcb5c6 (patch)
tree8ada6d764f2f5059629e45a956152a7faf877267 /rrdtool-model.lua
parentf220daa661084dba964801f174ceb8013eae41cd (diff)
downloadacf-rrdtool-c6b5228ab2bdf1578a32ffb9cb06b2962cfcb5c6.tar.bz2
acf-rrdtool-c6b5228ab2bdf1578a32ffb9cb06b2962cfcb5c6.tar.xz
Hide path to .graph files
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