summaryrefslogtreecommitdiffstats
path: root/rrdtool-listgraphs-html.lsp
blob: 9d41cfc626b3793388db080cf3ec17691bf5b1b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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 %>