| {% extends "base.html" %} |
| {% comment %} |
| |
| Copyright 2011 Google Inc. All Rights Reserved. |
| |
| This template builds a report showing Autotest test execution status. |
| {% endcomment %} |
| {% block title %}ChromeOS Test Report{% endblock %} |
| {% block body_block_header %}<body>{% endblock %} |
| {% block html_block %} |
| <!--Load the AJAX API--> |
| <script type="text/javascript" src="https://www.google.com/jsapi"></script> |
| <script type="text/javascript"> |
| // Load the Visualization API and the table package. |
| google.load('visualization', '1', {'packages':['table']}); |
| |
| // Set a callback to run when the Google Visualization API is loaded. |
| google.setOnLoadCallback(drawCharts); |
| |
| // Callback that creates and populates a data table, |
| // instantiates the charts, passes in the data and |
| // draws them. |
| function drawCharts() { |
| var table = new google.visualization.Table( |
| document.getElementById('testtable')); |
| var json_data = new google.visualization.DataTable( |
| {% autoescape off %} |
| {{ tpl_chart.gviz_data_table }} |
| {% endautoescape %}, 0.5); |
| table.draw(json_data, |
| {allowHtml: true, |
| showRowNumber: true, |
| sortAscending: false, |
| sortColumn: 1}); |
| google.visualization.events.addListener(table, 'select', function(){ |
| var selection = table.getSelection(); |
| alert('Try typing ' + json_data.getFormattedValue(selection[0].row, 0) + |
| ' in the Search box in the upper-left of the testdocs page.'); |
| window.open('http://cautotest/results/dashboard/testdocs'); |
| }); |
| } |
| </script> |
| <center> |
| <h2>Chrome OS Test Report</h2> |
| <span id="testtable"></span> |
| </center> |
| <hr> |
| {% endblock %} |