[%# 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) 2001
  # Novell. All Rights Reserved.
  #
  # Contributor(s): Greg Hendricks <ghendricks@novell.com>
  #%]

<link rel="stylesheet" type="text/css" href="testopia/extjs/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="testopia/extjs/resources/css/xtheme-default.css" />

<!-- LIBS -->     
<script type="text/javascript" src="testopia/extjs/adapter/ext/ext-base.js"></script>     
<script type="text/javascript" src="testopia/extjs/ext-all-debug.js"></script>
<script type="text/javascript">

Ext.onReady(function(){
   Ext.get('statusreport').on('contextmenu',function(){
      Ext.get('status_image').src = "tr_product_reports.cgi?product_id=" + product_id + "&type=passrate&action=draw";
      console.log(Ext.get('status_image').src);
   });
});

</script>  
<style type="text/css">
.chartbox{
    border: solid 1px black;
    width: 350px;
    height: 150px;

}
#dashboard-container{
    position: relative;
    margin: 20px;
}
#completionreport{
    position: absolute;
    left: 25px;
    top: 25px;
    
}
#statusreport{
    position: absolute;
    left: 400px;
    top: 25px;    
}
#breakdown{
    position: absolute;
    left: 25px;
    top: 200px;    
}

</style>
<div id="dashboard-container">
    <div id="completionreport" class="chartbox">
        <img id="completion_image" src="tr_product_reports.cgi?product_id=[% product.id FILTER none %]&type=completion&action=draw"/>
    </div>
    
    <div id="statusreport" class="chartbox">
        <img id="status_image" src="tr_product_reports.cgi?product_id=[% product.id FILTER none %]&type=passrate&action=draw"/>
    </div>

    <div id="breakdown" class="chartbox">
        <img id="breakdown_image" src="tr_product_reports.cgi?product_id=[% product.id FILTER none %]&type=breakdown&action=draw"/>
    </div>

</div>