summaryrefslogtreecommitdiffstats
path: root/rrdtool-listgraphs-html.lsp
blob: a66192b1117f3c05893dceccfcebc6964a5cb419 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<% local data, viewlibrary, page_info, session = ... 
html = require("acf.html")
%>

<script type="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=800,height=600,scrollbars=no,resizable=yes');
return false;
}
//-->
</script>


<% if viewlibrary and viewlibrary.dispatch_component then
	viewlibrary.dispatch_component("status")
end %>

<% icon=html.html_escape(page_info.wwwprefix..page_info.staticdir) .. "/tango/16x16/apps/utilities-system-monitor.png" %>

<h1>Graphs</h1>
<% 
for grp,v in pairs(data) do
%>
<h2><% io.write(grp) %></h2>
	<% for k,graph in pairs(v) do %>
		<div class='item'><div class='left'>
		<a href="viewgraph?skinned=false&group=<%= grp %>&id=<%= k %>" onClick="return popup(this,'notes')"><img src='<%= icon %>' width='16' height='16'> <% io.write(graph.label or "Unknown") %></a></div>
		<div class='right'>
		<% io.write(graph.descr or "") %>
		</div></div><!-- end .item -->
	<% end %>
<% end %>