pageHistory.vm
1.66 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
#set ($page_title="Page History")
#parse("pageHead.vm")
#if($pageHistory)
<table>
<tr>
<th>Compare</th>
<th>Time</th>
<th>Pass</th>
<th>Fail</th>
<th colspan="50">0..$pageHistory.maxAssertions()</th>
</tr>
#set($dates = $pageHistory.datesInChronologicalOrder())
<form action= "" method="get" name="compareHistory">
<input type="hidden" value="compareHistory" name="responder"/>
<input type="submit" VALUE="Compare"/>
#foreach($date in $dates)
<tr id="pageHistoryRow_$pageHistory.formatDate("yyyyMMddHHmmss",$date)">
<td><input type="checkbox" name="TestResult_$pageHistory.getPageFileName($date)"/></td>
#set($bar = $pageHistory.getPassFailBar($date, 50))
<td id="date_field" class=#if($bar.Fail>0)"fail"#elseif($bar.Pass>0)"pass"#else"ignore"#end>
<a href="$pageHistory.FullPageName?pageHistory&resultDate=$pageHistory.formatDate("yyyyMMddHHmmss",$date)">$pageHistory.formatDate("dd MMM, yy HH:mm", $date)</a>
</td>
<td id="pass_count" class=#if($bar.Pass==0)"ignore"#else"pass"#end>$bar.Pass</td>
<td id="fail_count" class=#if($bar.Fail==0)"ignore"#else"fail"#end>$bar.Fail</td>
#if($bar.PassUnits > 0)#foreach($barsegment in [1..$bar.PassUnits])<td id="element" class="pass"> </td>#end#end
#if($bar.FailUnits > 0)#foreach($barsegment in [1..$bar.FailUnits])<td id="element" class="fail"> </td>#end#end
#set($ignores=50-($bar.PassUnits+$bar.FailUnits))
#if($ignores > 0)#foreach($barsegment in [1..$ignores])<td id="element" class="ignore"> </td>#end#end
</tr>
#end
</form>
</table>
#else
<h2>No history for page: $pageTitle.Title</h2>
#end
#parse("pageFooter.vm")