testHistory.vm
2.32 KB
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
#set ($page_title="Test History")
#parse("pageHead.vm")
#set($noHistory = true)
<table style="border:none;background:none">
<tr>
<td style="border:none; width:400px">
<form action="" method="get">
<input type="hidden" value="overview" name="responder"/>
<input type="submit" VALUE="View as Overview"/>
</form>
</td>
<td style="border:none">
<form action="" method="get">
<input type="hidden" value="purgeHistory" name="responder"/>
<input type="hidden" value="30" name="days"/>
<input type="submit" VALUE="Purge >30days"/>
</form>
</td>
<td style="border:none">
<form action="" method="get">
<input type="hidden" value="purgeHistory" name="responder"/>
<input type="hidden" value="7" name="days"/>
<input type="submit" VALUE="Purge >7days"/>
</form>
</td>
<td style="border:none">
<form action="" method="get">
<input type="hidden" value="purgeHistory" name="responder"/>
<input type="hidden" value="0" name="days"/>
<input type="submit" VALUE="Purge All"/>
</form>
</td>
</tr>
</table>
<table>
<tr>
<th>Page</th>
<th>Pass</th>
<th>Fail</th>
<th>Latest</th>
<th colspan="20">Last 20 Results</th>
</tr>
#foreach ($page in $testHistory.pageNames)
#set ($pageHistory = $testHistory.getPageHistory($page))
#if($pageHistory)
#set($noHistory = false)
<tr>
#set ($barGraph = $pageHistory.getBarGraph())
#if($pageHistory.passes==0) #set ($passClass = "ignore")
#else #set ($passClass = "pass")
#end
#if($pageHistory.failures==0) #set ($failClass = "ignore")
#else #set ($failClass = "fail")
#end
<td><a href="/$page?pageHistory">$page</a></td>
<td class="$passClass">$pageHistory.passes</td>
<td class="$failClass">$pageHistory.failures</td>
<td>$barGraph.formatEndingDate("dd MMM, yy HH:mm")</td>
#foreach($passFail in $barGraph.passFailArray())
#if($passFail.Pass)
<td class="pass"><a style="text-decoration:none" href="$page?pageHistory&resultDate=$passFail.Date">+</a></td>
#else
<td class="fail"><a style="text-decoration:none" href="$page?pageHistory&resultDate=$passFail.Date">-</a></td>
</td>
#end
#end
</tr>
#end
#end
</table>
#if ($noHistory)No History#end
#parse("pageFooter.vm")