diff options
author | Mika Havela <mika.havela@gmail.com> | 2009-07-03 06:53:14 +0000 |
---|---|---|
committer | Mika Havela <mika.havela@gmail.com> | 2009-07-03 06:53:14 +0000 |
commit | 6ff6b53ee67698c433605cc3bd760c095b4b707f (patch) | |
tree | ceab123b6a43d631191de8b14d6d18fd746ad826 /rrdtool-model.lua | |
parent | b107185f3794c982ec0c988087232346e67a8203 (diff) | |
download | acf-rrdtool-6ff6b53ee67698c433605cc3bd760c095b4b707f.tar.bz2 acf-rrdtool-6ff6b53ee67698c433605cc3bd760c095b4b707f.tar.xz |
Adding functionallity to see 'rrdtool info' on the existing DBs.
Diffstat (limited to 'rrdtool-model.lua')
-rw-r--r-- | rrdtool-model.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rrdtool-model.lua b/rrdtool-model.lua index f85f08b..b4cbb97 100644 --- a/rrdtool-model.lua +++ b/rrdtool-model.lua @@ -125,3 +125,13 @@ function remove_file(self, path, userid) end return cfe({ value=success, label="Delete config file result", errtxt=errtxt }) end + +function rrd_info(self, path, userid) + local success, errtxt + if (validfilename(path)) then + local f = io.popen( "/usr/bin/rrdtool info ".. tostring(path) ) + success = f:read("*a") or "" + f:close() + end + return cfe({ value=success, label="rrdtool info ".. tostring(path) , errtxt=errtxt }) +end |