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

81 lines
2.3 KiB
Plaintext
Raw Normal View History

#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")