summaryrefslogtreecommitdiffstats
path: root/rrdtool-listgraphs-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'rrdtool-listgraphs-html.lsp')
-rw-r--r--rrdtool-listgraphs-html.lsp28
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 %>
+
+