/
latest_runs.tt
94 lines (87 loc) · 2.82 KB
/
latest_runs.tt
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
86
87
88
89
90
91
92
[% META title = "Latest QC Runs"; META tab_name = 'QC' %]
[% INCLUDE 'pagination.tt' pageset = pageset %]
<link href="[% c.uri_for( '/static/css/jquery.qtip.min.css' ) %]" rel="stylesheet">
<style type="text/css">
.table-striped tbody tr td.failed { background-color: #FF8080; }
.table-striped tbody tr td.successful { background-color: #80FF80; }
</style>
<script type="text/javascript" src="[% c.uri_for( "/static/js/jquery.qtip.min.js" ) %]"></script>
<script type="text/javascript">
//load tooltips for all last stage links
$(document).ready(function() {
$('.laststage').qtip({
content: {
attr: 'title',
},
position: {
my: 'top left',
at: 'bottom center'
},
hide: {
fixed: true,
delay: 500
},
style: {
classes: 'qtip-blue'
}
});
});
</script>
<table class="table table-striped">
<thead>
<tr>
<th>QC Run ID</th>
<th>Run Inititated</th>
<th>Profile</th>
<th>Sequencing Projects</th>
<th>Template Plate</th>
<th>Last Stage</th>
<th>Last Stage Executed</th>
<th>Kill Unfinished Processes</th>
</tr>
</thead>
<tbody>
[% FOREACH l IN latest -%]
[% IF l.failed %]
[% td_class = "class='failed'" %]
[% ELSIF l.ended %]
[% td_class = "class='successful'" %]
[% ELSE %]
[% td_class = "" %]
[% END %]
<tr>
<td [% td_class %]>[% l.qc_run_id %]</td>
<td [% td_class %]>[% l.created %]</td>
<td [% td_class %]>[% l.profile %]</td>
<td [% td_class %]>[% l.seq_projects %]</td>
<td [% td_class %]>[% l.template_plate %]</td>
<td [% td_class %]>
[%# the code below stores text in the title attribute of each link,
to create the tooltips on the page. (I'm sorry) %]
<a
href="[%c.uri_for( "/user/qc_farm_error_rpt/${l.qc_run_id}___${l.last_stage}" ) %]"
class="laststage"
title='
[% IF l.previous_stages && l.previous_stages.size %]
[% FOREACH stage IN l.previous_stages -%]
<a href="[%c.uri_for( "/user/qc_farm_error_rpt/${l.qc_run_id}___${stage}" ) %]">[% stage %]</a><br/>
[% END -%]
[% ELSE %]
No previous stages.
[% END %]
'
>[% l.last_stage %]</a><br/>
</td>
<td [% td_class %]>[% l.last_stage_time %]</td>
<td align="center" [% td_class %]>
[% IF l.ended %]
Finished
[% ELSE %]
<a href="[%c.uri_for( "/user/kill_farm_jobs/${l.qc_run_id}" ) %]" class="button link">Kill Farm Jobs</a>
[% END %]
</td>
</tr>
[% END -%]
</tbody>
</table>
</div>