blob: c56993ab82473893bb39d3dece65831b4db661e6 [file] [log] [blame]
{% extends "base.html" %}
{% comment %}
Copyright 2011 Google Inc. All Rights Reserved.
This template builds a report showing Autotest LabTest execution status.
{% endcomment %}
{% block title %}ChromeOS LabTest 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':['corechart', '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 users_table = new google.visualization.BarChart(
document.getElementById('labtestusers'));
var users_json_data = new google.visualization.DataTable(
{% autoescape off %}
{{ tpl_chart.gviz_data_table.users }}
{% endautoescape %}, 0.5);
users_table.draw(users_json_data,
{chartArea: {top:5,
height:"90%"},
width: 1200,
height: 800,
hAxis: {'title': '#Tests'},
vAxis: {'title': 'Owner'}});
var jobs_table = new google.visualization.Table(
document.getElementById('labtestjobs'));
var jobs_json_data = new google.visualization.DataTable(
{% autoescape off %}
{{ tpl_chart.gviz_data_table.jobs }}
{% endautoescape %}, 0.5);
jobs_table.draw(jobs_json_data,
{allowHtml: true,
showRowNumber: true,
sortAscending: false,
sortColumn: 2});
google.visualization.events.addListener(jobs_table, 'select', function(){
var selection = jobs_table.getSelection();
var job_name = jobs_json_data.getFormattedValue(selection[0].row, 0);
window.open('http://cautotest/new_tko/#tab_id=spreadsheet_view&' +
'row=job_name&column=test_name&content=&show_incomplete=true&' +
'show_only_latest=false&condition=job_name+%253D+%2527' +
job_name + '%2527+and+not+test_name+regexp+%2527' +
'(CLIENT%257CSERVER)_JOB.*%2527+and+not+test_name+regexp+' +
'%2527boot%255C..*%2527');
});
}
</script>
<center>
<h2>Chrome OS LabTest Report</h2>
<table>
<tr>
<td>
<span id="labtestusers"></span>
</td>
</tr>
<tr>
<td>
<span id="labtestjobs"></span>
</td>
</tr>
</table>
</center>
<hr>
{% endblock %}