Mercurial > mozilla > hg > talosnames
comparison talosnames/templates/index.html @ 36:c945731f06d0
better default value
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Mon, 23 Jul 2012 14:50:55 -0700 |
parents | b51b0d750086 |
children | ef8590b55605 |
comparison
equal
deleted
inserted
replaced
35:88d280049e2f | 36:c945731f06d0 |
---|---|
42 | 42 |
43 .false { | 43 .false { |
44 background-color: red; | 44 background-color: red; |
45 } | 45 } |
46 | 46 |
47 .fold { | |
48 color: blue; | |
49 } | |
50 | |
47 </style> | 51 </style> |
48 <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | 52 <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> |
49 | 53 |
50 <script> | 54 <script> |
51 // In order to get anything working with Config.js | 55 // In order to get anything working with Config.js |
57 | 61 |
58 | 62 |
59 <script> | 63 <script> |
60 $(document).ready(function() { | 64 $(document).ready(function() { |
61 | 65 |
66 // color paint/chrome boxes appropriately | |
62 function mark_boolean(selector) { | 67 function mark_boolean(selector) { |
63 $(selector).each(function() { | 68 $(selector).each(function() { |
64 var text = $(this).text(); | 69 var text = $(this).text(); |
65 if (text == 'True') { | 70 if (text == 'True') { |
66 $(this).addClass('true'); | 71 $(this).addClass('true'); |
67 } else if (text == 'False') { | 72 } else if (text == 'False') { |
68 $(this).addClass('false'); | 73 $(this).addClass('false'); |
69 } | 74 } |
70 }); | 75 }); |
71 } | 76 } |
72 | |
73 // color paint/chrome boxes appropriately | |
74 mark_boolean('td.paint'); | 77 mark_boolean('td.paint'); |
75 mark_boolean('td.chrome'); | 78 mark_boolean('td.chrome'); |
76 | 79 |
77 // add TBPL initials to TBPL names from Config.js | 80 // add TBPL initials to TBPL names from Config.js |
78 $('td.tbpl').each(function() { | 81 $('td.tbpl').each(function() { |
79 var text = $(this).text(); | 82 var text = $(this).text(); |
80 if (text.length && Config.testNames[text]) { | 83 if (text.length && Config.testNames[text]) { |
81 $(this).html(text + '(<span class="tbpl_initial">' + Config.testNames[text] + '</span>)'); | 84 $(this).html(text + '(<span class="tbpl_initial">' + Config.testNames[text] + '</span>)'); |
85 } | |
86 }); | |
87 | |
88 // add a hide/unhide button | |
89 $('div.testname').after('<a class="fold">[+]</a>'); | |
90 $('dl.testattributes').hide(); | |
91 $('.fold').click(function() { | |
92 var text = $(this).text(); | |
93 if (text == '[+]') { | |
94 $(this).next('.testattributes').show(); | |
95 $(this).text('[-]'); | |
96 } else if (text == '[-]') { | |
97 $(this).next('.testattributes').hide(); | |
98 $(this).text('[+]'); | |
82 } | 99 } |
83 }); | 100 }); |
84 | 101 |
85 }); | 102 }); |
86 </script> | 103 </script> |
110 <th>Graphserver Name</th> | 127 <th>Graphserver Name</th> |
111 </tr> | 128 </tr> |
112 | 129 |
113 {{for test in sorted(tests[suite].keys())}} | 130 {{for test in sorted(tests[suite].keys())}} |
114 <tr> | 131 <tr> |
115 <td><div class="header">{{test}}</div> | 132 <td> |
116 <dl> | 133 <div class="header testname">{{test}}</div> |
134 <dl class="testattributes"> | |
117 {{for attr in sorted(tests.get(suite, {})[test].keys())}} | 135 {{for attr in sorted(tests.get(suite, {})[test].keys())}} |
118 <dt>{{attr}}</dt> | 136 <dt>{{attr}}</dt> |
119 <dd>{{tests[suite][test][attr]}}</dd> | 137 <dd>{{tests[suite][test][attr]}}</dd> |
120 {{endfor}} | 138 {{endfor}} |
121 </dl> | 139 </dl> |