[%# 1.0@bugzilla.org %]
[%# The contents of this file are subject to the Mozilla Public
  # License Version 1.1 (the "License"); you may not use this file
  # except in compliance with the License. You may obtain a copy of
  # the License at http://www.mozilla.org/MPL/
  #
  # Software distributed under the License is distributed on an "AS
  # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  # implied. See the License for the specific language governing
  # rights and limitations under the License.
  #
  # The Original Code is the Bugzilla Testopia System.
  #
  # The Initial Developer of the Original Code is Greg Hendricks.
  # Portions created by Greg Hendricks are Copyright (C) 2006
  # Greg Hendricks. All Rights Reserved.
  #
  # Contributor(s): Greg Hendricks <ghendricks@novell.com>
  #%]

<style type="text/css">
#completion_report td {
    font-weight: bold;
    width: 30px;
    text-align: center;
}
#completion_report a {
    color: black;
}
.report_header {
    font-weight: bold;
    background-color: #DCDCDC;
    text-align: left;
}

.passed_cell{
    border: 1px solid black;
    background-color: #56e871;
    padding-left: 5px;
    padding-right: 5px;
}
.failed_cell{
    border: 1px solid black;
    background-color: #ed3f58;
    padding-left: 5px;
    padding-right: 5px;
}
.blocked_cell{
    border: 1px solid black;
    background-color: #e17a56;
    padding-left: 5px;
    padding-right: 5px;
}
.complete_cell{
    border: 1px solid black;
    background-color: #B8A0D2;
    padding-left: 5px;
    padding-right: 5px;
}
.idle_cell{
    border: 1px solid black;
    background-color: #858aef;
    padding-left: 5px;
    padding-right: 5px;
}

</style>

<div id="completion_report">
  <table>
    <tr>
      <td>
        <table style="height:200px; cell-padding: 3px; margin-right: 10px; border: 1px solid black">
          <tr><th class="report_header">Total:</th><td colspan="2" align="center"><a href="tr_list_caseruns.cgi?run_id=[% runs FILTER url_quote %]&build_id=[% builds FILTER url_quote %]&isactive=1" target="_blank">[% total FILTER none %]</a></td></tr>
          <tr><th class="report_header">Completed:</th><td class="complete_cell"><a href="tr_list_caseruns.cgi?run_id=[% runs FILTER url_quote %]&build_id=[% builds FILTER url_quote %]&isactive=1&case_run_status=PASSED&case_run_status=FAILED&case_run_status=BLOCKED" target="_blank">[% completed FILTER none %]</a></td><td class="complete_cell">[% percent_completed || 0 FILTER none %]%</td></tr>
          <tr><th class="report_header">IDLE:</th><td class="idle_cell"><a href="tr_list_caseruns.cgi?run_id=[% runs FILTER url_quote %]&build_id=[% builds FILTER url_quote %]&isactive=1&case_run_status=IDLE" target="_blank">[% idle FILTER none %]</a></td><td class="idle_cell">[% percent_idle  || 0 FILTER none %]%</td></tr>
          <tr><th class="report_header">PASSED:</th><td class="passed_cell"><a href="tr_list_caseruns.cgi?run_id=[% runs FILTER url_quote %]&build_id=[% builds FILTER url_quote %]&isactive=1&case_run_status=PASSED" target="_blank">[% passed FILTER none %]</a></td><td class="passed_cell">[% percent_passed  || 0 FILTER none %]%</td></tr>
          <tr><th class="report_header">FAILED:</th><td class="failed_cell"><a href="tr_list_caseruns.cgi?run_id=[% runs FILTER url_quote %]&build_id=[% builds FILTER url_quote %]&isactive=1&case_run_status=FAILED" target="_blank">[% failed FILTER none %]</a></td><td class="failed_cell">[% percent_failed  || 0 FILTER none %]%</td></tr>
          <tr><th class="report_header">BLOCKED:</th><td class="blocked_cell"><a href="tr_list_caseruns.cgi?run_id=[% runs FILTER url_quote %]&build_id=[% builds FILTER url_quote %]&isactive=1&case_run_status=BLOCKED" target="_blank">[% blocked FILTER none %]</a></td><td class="blocked_cell">[% percent_blocked  || 0 FILTER none %]%</td></tr>
        </table>
      </td>
      <td><img src="tr_run_reports.cgi?type=bar&t=[% total FILTER none %]&c=[% completed FILTER none %]&p=[% passed FILTER none %]&f=[% failed FILTER none %]&b=[% blocked FILTER none %]"></td>
    </tr>
    <tr>
        <td><a href="buglist.cgi?bug_id=[% bugs FILTER none %]" target="_blank">[% bug_count FILTER none %]&nbsp;Bug[% bug_count == 1 ? '':'s' %] Found in Run(s)</a></td>
    </tr>
  </table>
</div>