{% extends "tcms_base.html" %}
{% load report_stats %}
{% load static %}

{% block subtitle %}Reporting - {{ product }}{% endblock %}

{% block custom_javascript %}
<script type="text/javascript" src="{% static "js/report.js" %}"></script>
<script type="text/javascript">
Nitrate.Utils.after_page_load(Nitrate.Report.List.on_load);
</script>
{% endblock %}

{% block contents %}
<div id="content">
	<div class="sprites crumble">
		<a href="{% url "nitrate-index" %}">Home</a>
		&gt;&gt;<a href="/report">Reporting</a>
		&gt;&gt;{{ product }}
	</div>
	{% include 'report/nav.html' %}
	<div class="Detailform border-1" style="background:#f1f1f1">
		<div class="report">
			<table class="report_tb" collspan="0" cellspacing="0" border="0">
				<tr class="attrib_line">
					<td  colspan="3">Testing Runs</td>
				</tr>
				<tr>
					<td>Finished</td>
					<td>{{ runs_count.finished }}</td>
					<td>{% groupby_result_percent runs_count "finished" %}%</td>
				</tr>
				<tr>
					<td>Running</td>
					<td>{{ runs_count.running }}</td>
					<td>{% groupby_result_percent runs_count "running" %}%</td>
				</tr>
				<tr class="attrib_line">
					<td colspan="3">Case Runs</td>
				</tr>
				<tr>
					<td>PASSED</td>
					<td>{{ case_run_count.PASSED }}</td>
					<td>{% groupby_result_percent case_run_count "PASSED" %}%</td>
				</tr>
				<tr>
					<td>FAILED</td>
					<td>{{ case_run_count.FAILED }}</td>
					<td>{% groupby_result_percent case_run_count "FAILED" %}%</td>
				</tr>
				<tr>
					<td>IDLE</td>
					<td>{{ case_run_count.IDLE }}</td>
					<td>{% groupby_result_percent case_run_count "IDLE" %}%</td>
				</tr>
				<tr>
					<td>ERROR</td>
					<td>{{ case_run_count.ERROR }}</td>
					<td>{% groupby_result_percent case_run_count "ERROR" %}%</td>
				</tr>
				<tr>
					<td>PAUSED</td>
					<td>{{ case_run_count.PAUSED }}</td>
					<td>{% groupby_result_percent case_run_count "PAUSED" %}%</td>
				</tr>
				<tr>
					<td>BLOCKED</td>
					<td>{{ case_run_count.BLOCKED }}</td>
					<td>{% groupby_result_percent case_run_count "BLOCKED" %}%</td>
				</tr>
				<tr>
					<td>RUNNING</td>
					<td>{{ case_run_count.RUNNING }}</td>
					<td>{% groupby_result_percent case_run_count "RUNNING" %}%</td>
				</tr>
				<tr>
					<td>WAIVED</td>
					<td>{{ case_run_count.WAIVED }}</td>
					<td>{% groupby_result_percent case_run_count "WAIVED" %}%</td>
				</tr>
			</table>
		</div>
	
	</div>
</div><!--content over -->
{% endblock %}
