core-jgi/fitnesse/FitNesseRoot/files/templates/pageHistory.vm

38 lines
1.7 KiB
Plaintext

#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">&nbsp</td>#end#end
#if($bar.FailUnits > 0)#foreach($barsegment in [1..$bar.FailUnits])<td id="element" class="fail">&nbsp</td>#end#end
#set($ignores=50-($bar.PassUnits+$bar.FailUnits))
#if($ignores > 0)#foreach($barsegment in [1..$ignores])<td id="element" class="ignore">&nbsp</td>#end#end
</tr>
#end
</form>
</table>
#else
<h2>No history for page: $pageTitle.Title</h2>
#end
#parse("pageFooter.vm")