diff options
author | Mika Havela <mika.havela@gmail.com> | 2009-07-07 14:29:33 +0000 |
---|---|---|
committer | Mika Havela <mika.havela@gmail.com> | 2009-07-07 14:29:33 +0000 |
commit | edeb226c2a079510abd99e86fd9a6304de0e6246 (patch) | |
tree | f32395e788ca339c4eff0e59ed88687a00c2dc6a /rrdtool-listgraphs-html.lsp | |
parent | 4000a354bdabce4cfaaac2c672a689d9bab8b910 (diff) | |
download | acf-rrdtool-edeb226c2a079510abd99e86fd9a6304de0e6246.tar.bz2 acf-rrdtool-edeb226c2a079510abd99e86fd9a6304de0e6246.tar.xz |
Prepare a view to list available graphs.
Graphs are sectioned into groups. Each group has a heading.
Under each group you get a list of available graphs.
Diffstat (limited to 'rrdtool-listgraphs-html.lsp')
-rw-r--r-- | rrdtool-listgraphs-html.lsp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/rrdtool-listgraphs-html.lsp b/rrdtool-listgraphs-html.lsp new file mode 100644 index 0000000..9d41cfc --- /dev/null +++ b/rrdtool-listgraphs-html.lsp @@ -0,0 +1,28 @@ +<% local data, viewlibrary, page_info, session = ... +require("viewfunctions") +%> + +<% +--[[ DEBUG INFORMATION +io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>") +io.write(html.cfe_unpack(data)) +io.write("</span>") +--]] +%> + +<% icon="/skins/static/tango/16x16/apps/utilities-system-monitor.png" %> + +<H1>Graphs</H1> +<% +for grp,v in pairs(data) do +%> +<H2><% if (#v.label > 0) then io.write(tostring(v.label)) else io.write(grp) end %></H2> + <% for k,graph in pairs(v.value) do %> + <DL><DT> + <A HREF="viewgraph?group=<%= grp %>&id=<%= k %>"><IMG SRC='<%= icon %>' width='16' height='16'> <% io.write(graph.label or "Unknown") %></A></DT> + <DD><% io.write(graph.descr or "") %></DD> + </DL> + <% end %> +<% end %> + + |