diff options
author | Mika Havela <mika.havela@gmail.com> | 2009-07-09 12:03:41 +0000 |
---|---|---|
committer | Mika Havela <mika.havela@gmail.com> | 2009-07-09 12:03:41 +0000 |
commit | 2df04e390768d4bb94764dd7a4db805605011624 (patch) | |
tree | 3af80ee907b053c6b0043bcf1a1ba3da4867975e | |
parent | a08c1bd2894983d7453af0118795edf85788cf0f (diff) | |
download | acf-rrdtool-2df04e390768d4bb94764dd7a4db805605011624.tar.bz2 acf-rrdtool-2df04e390768d4bb94764dd7a4db805605011624.tar.xz |
Show default config when creating a new graph
-rw-r--r-- | rrdtool-model.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rrdtool-model.lua b/rrdtool-model.lua index e915a4a..98bd807 100644 --- a/rrdtool-model.lua +++ b/rrdtool-model.lua @@ -232,6 +232,14 @@ function getgraphfile(path) path = nil end local filedetails = modelfunctions.getfiledetails(path) + -- If we create a new file, we want to help the user to know what variables he should use + if not (path) then + filedetails.value.filecontent.value = [[label=Example name for this graph +group=General +descr=Some describing text that helps the user to know what this graph is all about +value=--start now-3600s --end now --width 680 --height 400 --step 300 DEF... +]] + end local output = {value={filename=filedetails.value.filename, filecontent=filedetails.value.filecontent,}} -- output.value.filecontent.rows="30" -- FIXME: For some reason I can't control the size of a textarea |