Mercurial > mozilla > hg > talosnames
comparison talosnames/templates/tbpl.html @ 57:253abacf6bdf
print out buildbot suites
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Mon, 13 Aug 2012 22:40:45 -0700 |
parents | 6c54a5e40f63 |
children | 8892d6cb7a4d |
comparison
equal
deleted
inserted
replaced
56:6c54a5e40f63 | 57:253abacf6bdf |
---|---|
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <title>Talos names: TBPL</title> | 3 <title>Talos names: TBPL View</title> |
4 <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | 4 <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> |
5 | 5 |
6 <script> | 6 <script> |
7 // In order to get anything working with Config.js | 7 // In order to get anything working with Config.js |
8 // We have to stub a bunch of stuff for no reason | 8 // We have to stub a bunch of stuff for no reason |
19 $(selector).html(''); | 19 $(selector).html(''); |
20 } | 20 } |
21 | 21 |
22 $(document).ready(function() { | 22 $(document).ready(function() { |
23 | 23 |
24 // map letter names to TBPL long names | |
24 var reverse_mapping = {}; | 25 var reverse_mapping = {}; |
25 | |
26 for (var i in Config.testNames) { | 26 for (var i in Config.testNames) { |
27 reverse_mapping[Config.testNames[i]] = i; | 27 reverse_mapping[Config.testNames[i]] = i; |
28 } | |
29 | |
30 // buildbot suites | |
31 var buildbot_suites = {}; | |
32 for (var suite in data.tbpl) { | |
33 var tbpl_name = data.tbpl[suite]; | |
34 if (buildbot_suites[tbpl_name] == undefined) { | |
35 buildbot_suites[tbpl_name] = []; | |
36 } | |
37 buildbot_suites[tbpl_name].push(suite); | |
28 } | 38 } |
29 | 39 |
30 $(".letter").each(function() { | 40 $(".letter").each(function() { |
31 var text = $(this).text() | 41 var text = $(this).text() |
32 if (text.length && reverse_mapping[text]) { | 42 if (text.length && reverse_mapping[text]) { |
40 | 50 |
41 var letter = $(that).text(); | 51 var letter = $(that).text(); |
42 var title = $(that).attr('title'); | 52 var title = $(that).attr('title'); |
43 | 53 |
44 var html = '<h1>' + title + '</h1>'; | 54 var html = '<h1>' + title + '</h1>'; |
55 var bbsuite = buildbot_suites[title]; | |
56 if (bbsuite) { | |
57 html += '<div class="buildbot">'; | |
58 for (var suite in bbsuite) { | |
59 html += '<h2>' + bbsuite[suite] + '</h2>'; | |
60 } | |
61 html += '</div>'; | |
62 | |
63 } | |
45 | 64 |
46 $("#content").html(html); | 65 $("#content").html(html); |
47 }); | 66 }); |
48 | 67 |
49 } | 68 } |