This repository has been archived by the owner on Apr 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCREAMCE.html
85 lines (68 loc) · 1.52 KB
/
CREAMCE.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
## HTML Template
<%inherit file="/module_base.html" />
<%def name="content()">
<script>
function toggle(id) {
element = document.getElementById(id);
if (element.style.display == 'none')
element.style.display = '';
else
element.style.display = 'none';
}
</script>
<%def name="table(title, list, secondaryColumn=None, secondaryName=None, subtable=None)">
<%def name="printRow(key,value)">
<tr>
% if subtable and key in subtable:
<td><a href="javascript: void(0);" onclick="toggle('${key}');">${key[:50]}</a></td>
% else:
<td>${key[:50]}</td>
% endif
% if secondaryColumn:
<td>${value[secondaryColumn]}</td>
% endif
% for t in type_list:
<td>
${value.get(t['type'],0)}
</td>
% endfor
<td>${value['total']}</td>
</tr>
% if subtable and key in subtable:
<tr id="${key}" style="display:none;">
<td colspan=13>
% for i in subtable[key]:
${type_list[i]['name']}: <br />
%for j in subtable[key][i]:
${j['job_id']}:${j['lrmsJobId']}:${j['time_stamp']} <br />
% endfor
% endfor
</td>
</tr>
% endif
</%def>
<table class="TableData">
<tr class="TableHeader">
<th>${title}</th>
% if secondaryColumn:
<th>${secondaryName}</th>
% endif
% for t in type_list:
<th>${t['name']}</th>
% endfor
<th>Total</th>
</tr>
% for k,v in iter(sorted(list.iteritems())):
% if k:
${printRow(k,v)}
% endif
% endfor
${printRow('Total',list[None])}
</table>
</%def>
${table('Queue',queue_list)}
<br />
${table('User',user_list, 'local_name', 'Local User')}
<br />
${table('Node',node_list, subtable=job_list)}
</%def>