206
217
alt="Valid XHTML 1.1" height="31" width="88"
207
218
style="border-width:0px" /></a>
209
<p style="font-size:smaller"><a href="source">source</a></p>
220
<p style="font-size:smaller">Source: <a href="https://code.launchpad.net/lp-ftbfs-report">lp:lp-ftbfs-report</a></p>
221
<script type="text/javascript" src="source/wz_tooltip.js"></script>
222
<script type="text/javascript" src="source/jquery.min.js"></script>
223
<script type="text/javascript" src="source/jquery.flot.min.js"></script>
224
<script type="text/javascript">
225
/* Return the currently selected architecture, by querying the input
228
function selected_arch() {
229
var arch = $('#historical-arch option:selected').text();
233
/* Fill in all the missing 0 data points in json_data.
234
* The SQL query is a COUNT(*), so timestamps with no build failures won't
236
* We find all reported timestamps, and add 0s to the missing timestamps in
237
* each component/pset.
239
function fill_in_data() {
241
$.each(json_data, function(arch, by_arch) {
242
$.each(by_arch, function(pset, by_pset) {
243
$.each(by_pset, function(i, row) {
244
timestamps.push(row[0]);
249
// Eliminate duplicates:
251
for(i = 1; i < timestamps.length; i++) {
252
if (timestamps[i] == timestamps[i-1]) {
253
timestamps.splice(i, 1);
258
$.each(json_data, function(arch, by_arch) {
259
$.each(by_arch, function(pset, data) {
260
for (i = 0; i < timestamps.length; i++) {
261
if (i == data.length) {
262
data.push([timestamps[i], 0]);
263
} else if (timestamps[i] < data[i][0]) {
264
data.splice(i, 0, [timestamps[i], 0]);
272
/* Add checkboxes for each component and packageset present in json_data
274
function add_show_controls() {
275
$.each(json_data[selected_arch()], function(component) {
276
var button = document.createElement('input');
277
button.type = 'checkbox';
278
button.name = component;
279
button.id = component;
280
button.value = component;
281
var components=["main", "universe", "multiverse", "restricted"];
282
if ($.inArray(component, components) >= 0) {
283
button.checked = true;
285
$(button).click(function() {
288
var label = document.createElement('label');
289
label['for'] = component;
290
label.setAttribute('text', component);
291
label.appendChild(document.createTextNode(component));
292
$('#historical-components').append(button);
293
$('#historical-components').append(label);
295
var button = document.createElement('input');
296
button.type = 'button';
297
button.value = 'Clear';
298
$(button).click(function() {
299
$.each($('#historical-components input:checkbox'), function(i, checkbox) {
300
checkbox.checked = false;
304
$('#historical-components').append(button);
310
var data = json_data[selected_arch()];
313
var components = ["main", "universe", "multiverse", "restricted"];
316
$.each($('#historical-components :checkbox'), function(i, checkbox) {
317
var component = checkbox.value;
318
var color = $.inArray(component, components);
321
if (!checkbox.checked)
323
var series_data = data[component];
333
points: {show: true},
346
$.plot($("#historical-graph"), series, options);
349
/* Main function, run when things have settled down. */
353
$("#historical-arch").change(draw);
357
/* Build failures raw data */
358
var json_data={{ historical_json }};