-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmonitor.html
60 lines (49 loc) · 1.84 KB
/
monitor.html
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<style type="text/css" title="currentStyle">
@import "css/jquery.dataTables.css";
</style>
<script type="text/javascript" src="jslibs/jquery.js"></script>
<script type="text/javascript" src="jslibs/jquery.dataTables.js"></script>
<head>
<title>test</title>
</head>
<body style="font-family:'Courier'">
<h1>glideinWMS Pool Data</h1>
<h2>Analysis Operations Pool</h2>
<table cellpadding="1" cellspacing="0" border="0" class="display" id="anaops_table">
</table>
<h2>Production Pool</h2>
<table cellpadding="1" cellspacing="0" border="0" class="display" id="production_table">
</table>
<h2>Global Pool</h2>
<table cellpadding="1" cellspacing="0" border="0" class="display" id="global_table">
</table>
<h2>Site Table</h2>
<table cellpadding="1" cellspacing="0" border="0" class="display" id="site_table">
</table>
<script type="text/javascript">
function create_header(data) {
var dic=[];
$.each( data["header"], function( key, val ) {
dic.push({ "title" : val} );
});
return dic;
}
function create_table(table_name, data) {
var mdata=data["data"];
var hdr=create_header(data);
$(table_name).DataTable({"data" : mdata, "columns" : hdr});
}
{
$.getJSON( "./latest.json",
function( data ) {
create_table("#site_table",data["Site Table"]);
create_table("#anaops_table",data["glideinWMS Analysis Operations Pool"]["Summary Table"]);
create_table("#production_table",data["glideinWMS Production Pool"]["Summary Table"]);
create_table("#global_table",data["glideinWMS Global Pool"]["Summary Table"]);
});
}
</script>
</body>
</html>