Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Side by Side Diff: appengine/findit/templates/build_failure.html

Issue 1836003002: [Findit] Rewrite UI page. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@0323-result_page_html
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <head> 2 <head>
3 <title>Build Failure</title> 3 <title>Build Failure</title>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <link rel="stylesheet" href="/common.css"> 5 <link rel="stylesheet" href="/common.css">
6 <style> 6 <style>
7 .running { 7 .running {
8 color: #666666; 8 color: #666666;
9 background-color: #fffc6c; 9 background-color: #fffc6c;
10 border-color: #c5c56d; 10 border-color: #c5c56d;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 <script> 87 <script>
88 var findit = {}; 88 var findit = {};
89 findit.analysisCompleted = '{{analysis_completed}}' == 'True'; 89 findit.analysisCompleted = '{{analysis_completed}}' == 'True';
90 findit.analysisFailed = '{{analysis_failed}}' == 'True'; 90 findit.analysisFailed = '{{analysis_failed}}' == 'True';
91 findit.builderUrl = 'https://build.chromium.org/p/{{master_name}}/builders/{ {builder_name}}'; 91 findit.builderUrl = 'https://build.chromium.org/p/{{master_name}}/builders/{ {builder_name}}';
92 findit.buildUrl = findit.builderUrl + '/builds/{{build_number}}'; 92 findit.buildUrl = findit.builderUrl + '/builds/{{build_number}}';
93 findit.analysisCorrect = '{{analysis_correct}}'; // Possible values: 'None' , 'True', or 'False'. 93 findit.analysisCorrect = '{{analysis_correct}}'; // Possible values: 'None' , 'True', or 'False'.
94 findit.showTriageHelpButton = '{{show_triage_help_button}}' == 'True'; 94 findit.showTriageHelpButton = '{{show_triage_help_button}}' == 'True';
95 findit.showDebugInfo = '{{show_debug_info}}' == 'True'; 95 findit.showDebugInfo = '{{show_debug_info}}' == 'True';
96 findit.analysisResult = {{analysis_result | tojson | safe}}; 96 findit.analysisResult = {{analysis_result | tojson | safe}};
97 97 findit.tryjobStatusMessageTable = {{status_message_map | tojson | safe}}
stgao 2016/03/29 00:26:06 nit: table -> map. In a html, table has its speci
chanli 2016/03/29 01:36:08 Done.
98 function generateStringForSingleCL(cl) {
99 var clString = '';
100 clString += '<td><a href="' + findit.builderUrl + '/builds/' + cl.build_nu mber + '">' + cl.build_number + '</a></td>';
101 clString += '<td>' + cl.repo_name + '</td>';
102 clString += '<td><a href="' + cl.url + '">' + cl.commit_position || cl.rev ision + '</a></td>';
103 clString += '<td>' + cl.score + '</td>';
104 clString += '<td>';
105
106 var sortedHintsList = Object.keys(cl.hints).sort(function(a, b) {
107 return cl.hints[b] - cl.hints[a];
108 }); // Sorts hints by score in descending order.
109 $.each(sortedHintsList, function(index, hint) {
110 clString += '<li>' + hint + '</li>';
111 });
112 clString += '</td>';
113 return clString;
114 }
115
116 function addRowToResultTable(stepIndex, testIndex, failure, type) {
117 var rowString;
118 var failureWithLink;
119 if (type == 'step') {
120 rowString = '<tr id="' + stepIndex.toString() +'">';
121 var stepUrl = findit.buildUrl + '/steps/' + failure.step_name;
122 var arrowImg = '';
123 if (failure.tests && failure.tests.length > 0) {
124 arrowImg = '<a class="collapsed"> <img class="toggle-img" src="https:/ /www.gstatic.com/images/icons/material/system/1x/keyboard_arrow_right_black_24dp .png"> </a>';
125 }
126
127 if (findit.showDebugInfo) {
128 failureWithLink = arrowImg + '<a href="./failure-log?url=' + stepUrl + '"><font class="valign-middle">' + failure.step_name + '</font></a>';
129 } else {
130 failureWithLink = arrowImg + '<a href="' + stepUrl + '">' + failure.st ep_name + '</a>';
131 }
132
133 } else {
134 rowString = '<tr id="' + stepIndex.toString() + '-' + testIndex.toString () + '-0" class="hidden-row">';
135 failureWithLink = '<i>' + failure.test_name + '</i>';
136 }
137
138 var rowsSpan = failure.suspected_cls.length > 0 ? failure.suspected_cls.le ngth : 1;
139 rowString += '<td valigh="middle" rowspan="' + rowsSpan + '">' + failureWi thLink + '</td>';
140 rowString += '<td rowspan="' + rowsSpan + '"><a href="' + findit.builderUr l + '/builds/' + failure.first_failure + '">' + failure.first_failure + '</a></t d>';
141 if (failure.last_pass) {
142 rowString += '<td rowspan="' + rowsSpan + '"><a href="' + findit.builder Url + '/builds/' + failure.last_pass + '">' + failure.last_pass + '</a></td>';
143 } else {
144 rowString += '<td rowspan="' + rowsSpan + '">N/A</td>';
145 }
146 if (failure.suspected_cls.length > 0) {
147 clString = generateStringForSingleCL(failure.suspected_cls[0]);
148 rowString += clString + '</tr>';
149 $('#failures tbody').append(rowString);
150
151 for (var i = 1; i < failure.suspected_cls.length; i++) {
152 if (type == 'step') {
153 rowString = '<tr>';
154 } else {
155 rowString = '<tr id="' + stepIndex.toString() + '-' + testIndex.toSt ring() + '-' + i.toString() + '" class="hidden-row">';
156 }
157
158 clString = generateStringForSingleCL(failure.suspected_cls[i]);
159 rowString += clString + '</tr>';
160 $('#failures tbody').append(rowString);
161 }
162 } else {
163 rowString += '<td colspan="5">';
164 if(type == 'step' && failure.supported == false) {
165 rowString += 'Not Supported</td>';
166 } else {
167 rowString += 'Not Found</td>';
168 }
169 rowString += '</tr>';
170 $('#failures tbody').append(rowString);
171 }
172
173 if(type == 'step' && failure.tests && failure.tests.length > 0) {
174 $.each(failure.tests, function(testIndex, value) {
175 addRowToResultTable(stepIndex, testIndex, value, 'test');
176 });
177 }
178 }
179
180 function displayAnalysisResult() {
181 $.each(findit.analysisResult.failures, function(index, value) {
182 addRowToResultTable(index, -1, value, 'step');
183 });
184 }
185 98
186 function triageAnalysisResult(e) { 99 function triageAnalysisResult(e) {
187 var target = $(this); 100 var target = $(this);
188 if (target.hasClass('triaged')) 101 if (target.hasClass('triaged'))
189 return; 102 return;
190 103
191 var correct = target.hasClass('thumb-up'); 104 var correct = target.hasClass('thumb-up');
192 $.getJSON('triage-analysis?correct=' + correct + '&url=' + findit.buildUrl , function(data) { 105 $.getJSON('triage-analysis?correct=' + correct + '&url=' + findit.buildUrl , function(data) {
193 if (data['success']) { 106 if (data['success']) {
194 $('.triaged').addClass('triage').removeClass('triaged'); 107 $('.triaged').addClass('triage').removeClass('triaged');
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 140 }
228 $('#triage_help_button').prop('disabled', false); 141 $('#triage_help_button').prop('disabled', false);
229 }).error(function(xhr) { 142 }).error(function(xhr) {
230 // Replace the whole page with errors from server side. 143 // Replace the whole page with errors from server side.
231 document.body.outerHTML = xhr.responseText; 144 document.body.outerHTML = xhr.responseText;
232 }); 145 });
233 146
234 e.preventDefault(); 147 e.preventDefault();
235 } 148 }
236 149
237 function toggleTests(thisobj) {
238 var imgDirection;
239 var rowAddedClass;
240 var rowRemovedClass;
241 if (thisobj.hasClass("collapsed")) {
242 thisobj.removeClass("collapsed").addClass("expanded");
243 imgDirection = 'down';
244 rowAddedClass = "displayed-row";
245 rowRemovedClass = "hidden-row";
246 } else {
247 thisobj.removeClass("expanded").addClass("collapsed");
248 imgDirection = 'right';
249 rowAddedClass = "hidden-row";
250 rowRemovedClass = "displayed-row";
251 }
252 thisobj.html('<img class="toggle-img" src="https://www.gstatic.com/images/ icons/material/system/1x/keyboard_arrow_' + imgDirection + '_black_24dp.png">');
253 var stepRowId = thisobj.closest("tr").attr("id");
254 var testRowId = stepRowId + "-" + "0";
255 var i = 0;
256 while ($("#" + testRowId + "-" + "0").length) {
257 var clRowId = testRowId + "-" + "0";
258 var j = 0;
259 while ($("#" + clRowId).length) {
260 $( "#" + clRowId ).addClass(rowAddedClass).removeClass(rowRemovedClass );
261 j++;
262 clRowId = testRowId + "-" + j;
263 }
264 i++;
265 testRowId = stepRowId + "-" + i;
266 }
267 }
268
269 function toggleList(thisobj) { 150 function toggleList(thisobj) {
270 var thisObjId = thisobj.attr("id"); 151 var thisObjId = thisobj.attr("id");
271 if (thisobj.hasClass("collapsed_list")) { 152 if (thisobj.hasClass("collapsed_list")) {
272 thisobj.removeClass("collapsed_list").addClass("expanded_list"); 153 thisobj.removeClass("collapsed_list").addClass("expanded_list");
273 thisobj.html('<a href="#" id="' + thisObjId + '"class="expanded_list">Sh ow less</a>'); 154 thisobj.html('<a href="#" id="' + thisObjId + '"class="expanded_list">Sh ow less</a>');
274 $('#list-' + thisObjId).removeClass("not-display"); 155 $('#list-' + thisObjId).removeClass("not-display");
275 } else { 156 } else {
276 thisobj.removeClass("expanded_list").addClass("collapsed_list"); 157 thisobj.removeClass("expanded_list").addClass("collapsed_list");
277 thisobj.html('<a href="#" class="collapsed_list">Show more</a>'); 158 thisobj.html('<a href="#" class="collapsed_list">Show more</a>');
278 $('#list-' + thisObjId).addClass("not-display"); 159 $('#list-' + thisObjId).addClass("not-display");
279 } 160 }
280 } 161 }
281 162
282 function displaySwarmingTask() { 163 function displayCommonCells(step_name, category, index, tests, first_failure , last_pass, rowspan) {
stgao 2016/03/29 00:26:06 name nit: displayCommonCells -> generateCommonCles
chanli 2016/03/29 01:36:07 Done.
283 $.getJSON('swarming-task?url=' + findit.buildUrl, function(data) { 164 var rowString = '<td rowspan="' + rowspan + '">' + step_name + '</td>';
284 if (! jQuery.isEmptyObject(data) ) {
285 var tableString = '<table><tr><th>Step</th><th>Test(s)</th><th>Statu s</th><th>Task</th></tr>';
286 var hasTaskData = false;
287 $.each(data, function(step, task_info) {
288 var tasks = task_info.swarming_tasks;
289 if (tasks.length == 0) {
290 return true; // Broken data, continue to next one.
291 }
292 for (var i = 0; i < tasks.length; i++) {
293 hasTaskData = true;
294 task = tasks[i];
295 tableString += '<tr>';
296 tableString += '<td>' + step + '</td><td>';
297 165
298 var j = 0; 166 rowString += '<td rowspan="' + rowspan + '">';
299 for (; j < (task.tests.length > 5 ? 5 : task.tests.length); j++) { 167 var j = 0;
300 tableString += '<li><div title="' + task.tests[j] + '" class=" truncate">' + task.tests[j] + '</div></li>'; 168 for (; j < (tests.length > 5 ? 5 : tests.length); j++) {
301 } 169 rowString += '<li><div title="' + tests[j] + '" class="truncate">' + tes ts[j] + '</div></li>';
stgao 2016/03/29 00:26:06 Why an div? Could it be just an <li>?
chanli 2016/03/29 01:36:07 This div is to truncate the test name if it's too
170 }
171 if(tests.length > 5) {
lijeffrey 2016/03/29 00:49:44 nit: space after if
chanli 2016/03/29 01:36:07 Done.
172 rowString += '<div id="list-' + category + '-' + index + '" class="not -display">';
lijeffrey 2016/03/29 00:49:44 nit: + index + <remove 1 space>
chanli 2016/03/29 01:36:07 Done.
173 for (; j < tests.length; j++) {
174 rowString += '<li><div title="' + tests[j] + '" class="truncate">' + t ests[j] + '</div></li>';
175 }
176 rowString += '</div><a id="' + category + '-' + index + '"href="#" class ="collapsed_list">Show more</a>';
177 }
178 rowString += '</td>';
302 179
303 if(task.tests.length > 5) { 180 rowString += '<td rowspan="' + rowspan + '"><a href="' + findit.builderUrl + '/builds/' + first_failure + '">' + first_failure + '</a></td>';
304 tableString += '<div id="list-' + i + '"class="not-display">'; 181 if (last_pass) {
305 for (; j < task.tests.length; j++) { 182 rowString += '<td rowspan="' + rowspan + '"><a href="' + findit.builderU rl + '/builds/' + last_pass + '">' + last_pass + '</a></td>';
306 tableString += '<li><div title="' + task.tests[j] + '" class ="truncate">' + task.tests[j] + '</div></li>'; 183 } else {
307 } 184 rowString += '<td rowspan="' + rowspan + '">N/A</td>';
308 tableString += '</div><a id="' + i + '"href="#" class="collaps ed_list">Show more</a>'; 185 }
309 }
310 186
311 tableString += '</td>'; 187 return rowString;
312 if (task.status == 'Completed') {
313 status_class = 'completed';
314 } else if (task.status == 'Error') {
315 status_class = 'error';
316 } else {
317 // If status is either 'Pending' or 'Running', add 'running' s tyle.
318 status_class = 'running';
319 }
320 tableString += '<td><span class="' + status_class + '">' + task. status + '</span></td>';
321 if (task.task_id) {
322 tableString += '<td><a href="' + task.task_url + '">' + task.t ask_id + '</a></td>';
323 } else {
324 tableString += '<td></td>';
325 }
326 tableString += '</tr>';
327 }
328 });
329 tableString += '</table>';
330 if (hasTaskData) {
331 $('#swarming_task_table').html(tableString);
332 $('#swarming_task').removeClass('not-display');
333 }
334 }
335 });
336 } 188 }
337 189
338 function displayTryJobResult() { 190 function generateStringForSingleCL(cl) {
339 $.getJSON('try-job-result?url=' + findit.buildUrl, function(data) { 191 var clString = '<td><a href="' + findit.builderUrl + '/builds/' + cl.build _number + '">' + cl.build_number + '</a></td>';
340 if (! jQuery.isEmptyObject(data)) { 192 clString += '<td>' + cl.repo_name + '</td>';
stgao 2016/03/29 00:26:06 We don't show the repo_name above, so let's do the
chanli 2016/03/29 01:36:08 Done.
341 var tableString = '<table><tr><th>Step</th><th>Test</th><th>Link</th ><th>Status</th><th>Culprit</th></tr>'; 193 clString += '<td><a href="' + cl.url + '">' + cl.commit_position || cl.rev ision + '</a></td>';
342 var hasTryJobData = false; 194 clString += '<td>' + cl.score + '</td>';
343 $.each(data, function(key, value) { 195 clString += '<td>';
344 tableString += '<tr>';
345 tableString += '<td>' + value.step_name + '</td>';
346 tableString += '<td><li><div title="' + value.test_name + '" class ="truncate">' + value.test_name + '</div></li></td>';
347 if (value.try_job_url) {
348 tableString += '<td><a href="' + value.try_job_url + '">' + valu e.try_job_build_number + '</a></td>';
349 } else {
350 tableString += '<td></td>';
351 }
352 196
353 if (value.status) { 197 var sortedHintsList = Object.keys(cl.hints).sort(function(a, b) {
354 hasTryJobData = true; 198 return cl.hints[b] - cl.hints[a];
355 } else { 199 }); // Sorts hints by score in descending order.
356 return true; // Broken data, continue to next one. 200 $.each(sortedHintsList, function(index, hint) {
357 } 201 clString += '<li>' + hint + '</li>';
358 var status;
359 var revision;
360 noTryJobStatuses = ['Flaky', 'Skipped'];
361 if (noTryJobStatuses.indexOf(value.status) > -1) {
362 status = '';
363 revision = value.status;
364 } else if (value.status == 'Completed'){
365 status = value.status;
366 revision = value.commit_position || value.revision || 'Not Found ';
367 } else {
368 status = value.status;
369 revision = '';
370 }
371 if (status == 'Completed') {
372 status_class = 'completed';
373 } else if (status == 'Error') {
374 status_class = 'error';
375 } else {
376 // If status is either 'Scheduled' or 'Running', add 'running' s tyle.
377 status_class = 'running';
378 }
379 tableString += '<td><span class="' + status_class + '">' + status + '</span></td>';
380 if (value.review_url) {
381 tableString += '<td><a href="' + value.review_url + '">' + revis ion + '</a></td>';
382 } else {
383 var tdWithTitleMap = {
384 'Flaky': '<td title="The test is flaky based on swarming tas k result.">',
385 'Skipped': '<td title="There is no result from swarming task to identify flakiness so skip the step to avoid false positive.">'
386 };
387 tableString += tdWithTitleMap[revision] || '<td>';
388 tableString += revision + '</td>';
389 }
390 tableString += '</tr>';
391 });
392 tableString += '</table>';
393 if (hasTryJobData) {
394 $('#try_job_result').html(tableString);
395 $('#try_job').removeClass('not-display');
396 }
397 }
398 }); 202 });
203 clString += '</td>';
204 return clString;
205 }
206
207 function displayHeuristicCulpritCls(suspectedCls, supported){
stgao 2016/03/29 00:26:05 name nit: no display in this func yet.
chanli 2016/03/29 01:36:07 Done.
208 var cellTableString = '';
209
210 if (suspectedCls.length > 0){
stgao 2016/03/29 00:26:06 style nit: space ") {"
chanli 2016/03/29 01:36:07 Done.
211 cellTableString += generateStringForSingleCL(suspectedCls[0]);
212 for (var i = 1; i < suspectedCls.length; i++) {
213 cellTableString += '<tr>' + generateStringForSingleCL(suspectedCls[i]) + '</tr>';
214 }
215 } else {
216 cellTableString += '<td colspan="5">';
217 if(supported == false) {
lijeffrey 2016/03/29 00:49:44 why not if (!supported)?
lijeffrey 2016/03/29 00:49:45 nit: space after if
chanli 2016/03/29 01:36:07 Done.
chanli 2016/03/29 01:36:07 Done.
218 cellTableString += 'Not Supported</td>';
219 } else {
220 cellTableString += 'Not Found</td>';
221 }
222 }
223 return cellTableString;
224 }
225
226 function displayDeterminedResult(step_name, results) {
stgao 2016/03/29 00:26:06 nit: DeterminedResult-> ReliableFailures
chanli 2016/03/29 01:36:08 Done.
227 var tableString = '';
228 $.each(results, function(index, result){
lijeffrey 2016/03/29 00:49:44 nit: space before {
chanli 2016/03/29 01:36:07 Done.
229 tableString += '<tr>';
230 var rowspan = result.heuristic_analysis.suspected_cls.length > 0 ? resul t.heuristic_analysis.suspected_cls.length : 1;
231
232 tableString += displayCommonCells(step_name, 'determined', index, result .tests, result.first_failure, result.last_failure, rowspan);
233
234 var tryJob = result.try_job;
235 var tryJobCulprit = tryJob.culprit;
236 if (! jQuery.isEmptyObject(tryJobCulprit)) {
237 var build_number = result.try_job.try_job_key.split('/')[2];
stgao 2016/03/29 00:26:05 A comment on example of the try_job_key and what d
chanli 2016/03/29 01:36:07 Done.
238 tableString += '<td rowspan="' + rowspan + '"><a href="' + findit.buil derUrl + '/builds/' + build_number + '">' + build_number + '</a></td>';
239 tableString += '<td rowspan="' + rowspan + '"><a href="' + tryJobCulpr it.review_url + '">' + tryJobCulprit.commit_position || tryJobCulprit.revision + '</a></td>';
stgao 2016/03/29 00:26:06 Is it review_url? If no review url, we default to
chanli 2016/03/29 01:36:07 Done.
240
241 tableString += '<td rowspan="' + rowspan + '">';
242 tableString += '<li>Tests are reliable based on result of swarming rerun <a href="' + tryJob.task_url+ '">' + tryJob.task_id + '</a></li>';
stgao 2016/03/29 00:26:06 The message seems a bit long, we'd better shorten
chanli 2016/03/29 01:36:07 Done.
243 tableString += '<li>For try job details: <a href="' + tryJob.try_job_url + '">' + tryJob.try_job_build_number + '</a></li></td>';
244 } else {
245 tableString += '<td colspan="3" rowspan="' + rowspan + '">' + findit.t ryjobStatusMessageTable[tryJob.status] + '</td>';
246 }
247
248 tableString += displayHeuristicCulpritCls(result.heuristic_analysis.susp ected_cls, result.supported);
249 tableString += '</tr>';
250 });
251
252 if (!jQuery.isEmptyObject(results)) {
stgao 2016/03/29 00:26:06 Should we check this at the beginning instead? Sa
chanli 2016/03/29 01:36:07 Done.
253 $('#determined_results_table tbody').append(tableString);
254 $('#determined_results').removeClass('not-display');
255 }
256 }
257
258 function displayFlakyResult(step_name, results) {
stgao 2016/03/29 00:26:06 name nit: FlakyResult -> flakyfailures.
chanli 2016/03/29 01:36:07 Done.
259 var tableString = '';
260 $.each(results, function(index, result){
261 tableString += '<tr>';
262 var rowspan = result.heuristic_analysis.suspected_cls.length > 0 ? resul t.heuristic_analysis.suspected_cls.length : 1;
263 tableString += displayCommonCells(step_name, 'flaky', index, result.test s, result.first_failure, result.last_failure, rowspan);
264
265 tableString += '<td rowspan="' + rowspan + '"><a href="' + result.try_jo b.task_url + '">' + result.try_job.task_id + '</a></td>';
266
267 tableString += displayHeuristicCulpritCls(result.heuristic_analysis.susp ected_cls, result.supported);
268
269 tableString += '</tr>';
270 });
271
272 if (!jQuery.isEmptyObject(results)) {
273 $('#flaky_results_table tbody').append(tableString);
274 $('#flaky_results').removeClass('not-display');
275 }
276 }
277
278 function displayUndeterminedResult(step_name, results) {
stgao 2016/03/29 00:26:06 name nit: UnderterminedResult -> UnclassifiedFailu
chanli 2016/03/29 01:36:07 I'll go with unreliableFailures.
279 var tableString = '';
280 $.each(results, function(index, result){
281 tableString += '<tr>';
282 var rowspan = result.heuristic_analysis.suspected_cls.length > 0 ? resul t.heuristic_analysis.suspected_cls.length : 1;
283 tableString += displayCommonCells(step_name, 'undetermined', index, resu lt.tests, result.first_failure, result.last_failure, rowspan);
284
285 tableString += '<td rowspan="' + rowspan + '">' + findit.tryjobStatusMes sageTable[result.try_job.status] + '</td>';
286
287 tableString += displayHeuristicCulpritCls(result.heuristic_analysis.susp ected_cls, result.supported);
288 tableString += '</tr>';
289 });
290
291 if (!jQuery.isEmptyObject(results)) {
292 $('#undetermined_results_table tbody').append(tableString);
293 $('#undetermined_results').removeClass('not-display');
294 }
399 } 295 }
400 296
401 $(document).ready(function() { 297 $(document).ready(function() {
402 if (!findit.analysisCompleted) { 298 if (!findit.analysisCompleted) {
403 $('#status_message').text('running, will refresh in 5 seconds...'); 299 $('#status_message').text('running, will refresh in 5 seconds...');
404 $('#status_message').attr('class', 'running'); 300 $('#status_message').attr('class', 'running');
405 setTimeout(function() { 301 setTimeout(function() {
406 {% if show_debug_info %} 302 {% if show_debug_info %}
407 window.location.href = 'build-failure?url=' + findit.buildUrl + '&debu g=1'; 303 window.location.href = 'build-failure?url=' + findit.buildUrl + '&debu g=1';
408 {% else %} 304 {% else %}
409 window.location.href = 'build-failure?url=' + findit.buildUrl; 305 window.location.href = 'build-failure?url=' + findit.buildUrl;
410 {% endif %} 306 {% endif %}
411 }, 5000); 307 }, 5000);
412 } else { 308 } else {
413 if (findit.analysisFailed) { 309 if (findit.analysisFailed) {
414 $('#status_message').text('error'); 310 $('#status_message').text('error');
415 $('#status_message').attr('class', 'error'); 311 $('#status_message').attr('class', 'error');
416 } else { 312 } else {
417 // TODO: use another style when no culprit CL is found. 313 // TODO: use another style when no culprit CL is found.
418 $('#status_message').text('completed'); 314 $('#status_message').text('completed');
419 $('#status_message').attr('class', 'completed'); 315 $('#status_message').attr('class', 'completed');
420 316
421 $('.triage').click(triageAnalysisResult); 317 $('.triage').click(triageAnalysisResult);
422 318
423 if (findit.analysisResult.failures.length > 0) { 319 if (!jQuery.isEmptyObject(findit.analysisResult)) {
424 displayAnalysisResult(); 320 $.each(findit.analysisResult, function(step_name, step_results) {
321 $.each(step_results.results, function(category, results) {
322 if (category == 'determined_results') {
323 displayDeterminedResult(step_name, results);
324 } else if (category == 'undetermined_results') {
325 displayUndeterminedResult(step_name, results);
326 } else if (category == 'flaky_results'){
327 displayFlakyResult(step_name, results);
328 }
stgao 2016/03/29 00:26:06 Give an alert to file bug for the "else" case?
chanli 2016/03/29 01:36:07 Done.
329 });
330 });
425 } else { 331 } else {
426 $('#triage-and-table').text('no failure is found'); 332 $('#triage-and-table').text('no failure is found');
427 } 333 }
428 $(document).on("click",".expanded, .collapsed",function() {
429 toggleTests($(this));
430 });
431 334
432 if (findit.showTriageHelpButton) { 335 if (findit.showTriageHelpButton) {
433 $('#triage_help_button').click(triageHelp); 336 $('#triage_help_button').click(triageHelp);
434 } 337 }
435 if (findit.analysisCorrect == 'True') {
436 $('.thumb-up').addClass('triaged').removeClass('triage');
437 } else if (findit.analysisCorrect == 'False') {
438 $('.thumb-down').addClass('triaged').removeClass('triage');
439 }
440 } 338 }
441 } 339 }
442 340
443 $('#score-explanation-dialog').dialog({ 341 $('#score-explanation-dialog').dialog({
444 autoOpen: false, 342 autoOpen: false,
445 modal: true, 343 modal: true,
446 width: 600, 344 width: 600,
447 }); 345 });
448 $('#score-info').click(function() { 346 $('#score-info').click(function() {
449 $('#score-explanation-dialog').dialog('open'); 347 $('#score-explanation-dialog').dialog('open');
450 }); 348 });
451 349
452 // Displays Swarming task if any.
453 displaySwarmingTask();
454
455 // Displays Try Job Result if any.
456 displayTryJobResult();
457
458 $(document).on("click",".collapsed_list, .expanded_list",function() { 350 $(document).on("click",".collapsed_list, .expanded_list",function() {
459 toggleList($(this)); 351 toggleList($(this));
460 }); 352 });
461 }); 353 });
462 </script> 354 </script>
463 </head> 355 </head>
464 <body> 356 <body>
465 Findit now provides results from both heuristics and try-jobs. (<a href="https ://code.google.com/p/chromium/issues/entry?status=Unconfirmed&labels=Pri-2,findi t&summary=Findit%20bug%20or%20reature%20request&comment=Url%20to%20the%20build%2 0Failure:%0Ahttps://build.chromium.org/p/{{master_name}}/builders/{{builder_name }}/builds/{{build_number}}%0A%0AWhat%20is%20the%20bug%20or%20feature:%0A">File a Findit bug</a>) 357 Findit now provides results from both heuristics and try-jobs. (<a href="https ://code.google.com/p/chromium/issues/entry?status=Unconfirmed&labels=Pri-2,findi t&summary=Findit%20bug%20or%20reature%20request&comment=Url%20to%20the%20build%2 0Failure:%0Ahttps://build.chromium.org/p/{{master_name}}/builders/{{builder_name }}/builds/{{build_number}}%0A%0AWhat%20is%20the%20bug%20or%20feature:%0A">File a Findit bug</a>)
466 <br> 358 <br>
467 <br> 359 <br>
468 360
469 <b>Build info:</b> 361 <b>Build info:</b>
470 <div> 362 <div>
471 Master: {{master_name}}<br> 363 Master: {{master_name}}<br>
472 Builder: <a href="https://build.chromium.org/p/{{master_name}}/builders/{{bu ilder_name}}">{{builder_name}}</a><br> 364 Builder: <a href="https://build.chromium.org/p/{{master_name}}/builders/{{bu ilder_name}}">{{builder_name}}</a><br>
473 Build Number: <a href="https://build.chromium.org/p/{{master_name}}/builders /{{builder_name}}/builds/{{build_number}}">{{build_number}}</a> 365 Build Number: <a href="https://build.chromium.org/p/{{master_name}}/builders /{{builder_name}}/builds/{{build_number}}">{{build_number}}</a>
474 </div> 366 </div>
475 <br> 367 <br>
476 368
477 <div id='swarming_task' class='not-display'>
478 <b> Swarming Task:</b>
479 <div id='swarming_task_table'></div>
480 <br>
481 </div>
482 <br>
483
484 <div id='try_job' class='not-display'>
485 <b> Try job or Swarming Task Result:</b>
486 <div id='try_job_result'></div>
487 <br>
488 </div>
489 <br>
490
491 <b>Analysis info:</b> 369 <b>Analysis info:</b>
492 <div id="analysis_info"> 370 <div id="analysis_info">
493 status: <span id="status_message"></span> 371 status: <span id="status_message"></span>
494 {% if show_debug_info %} 372 {% if show_debug_info %}
495 {% if pipeline_status_path %} 373 {% if pipeline_status_path %}
496 <a href="{{pipeline_status_path}}">pipeline</a> 374 <a href="{{pipeline_status_path}}">pipeline</a>
497 {% endif %} 375 {% endif %}
498 <br> 376 <br>
499 Requested: {{analysis_request_time | default('N/A', true)}}<br> 377 Requested: {{analysis_request_time | default('N/A', true)}}<br>
500 {% if analysis_duration %} 378 {% if analysis_duration %}
(...skipping 10 matching lines...) Expand all
511 <b>Analysis result:</b> 389 <b>Analysis result:</b>
512 {% if analysis_failed %} 390 {% if analysis_failed %}
513 <br> 391 <br>
514 <span class="error">No result because of some error in analysis!</span> 392 <span class="error">No result because of some error in analysis!</span>
515 {% else %} 393 {% else %}
516 <div id="triage-and-table"> 394 <div id="triage-and-table">
517 <div class="thumbs-up-down"> 395 <div class="thumbs-up-down">
518 <div class="triage thumb-up">Correct <img src="https://www.gstatic.com /images/icons/material/system/1x/thumb_up_black_24dp.png"/></div> 396 <div class="triage thumb-up">Correct <img src="https://www.gstatic.com /images/icons/material/system/1x/thumb_up_black_24dp.png"/></div>
519 <div class="triage thumb-down"><img src="https://www.gstatic.com/image s/icons/material/system/1x/thumb_down_black_24dp.png"/> Incorrect</div> 397 <div class="triage thumb-down"><img src="https://www.gstatic.com/image s/icons/material/system/1x/thumb_down_black_24dp.png"/> Incorrect</div>
520 </div> 398 </div>
399 <br>
521 <div id="analysis_result"> 400 <div id="analysis_result">
522 <table id="failures"> 401 <div id="determined_results" class='not-display'>
523 <thead> 402 <b>Determined Results</b>
stgao 2016/03/29 00:26:06 Reliable failures
chanli 2016/03/29 01:36:07 Done.
524 <tr> 403 <table id="determined_results_table">
525 <th rowspan="2" title="Failed step/test name">Step/<font class=" header-test">Test</font></th> 404 <thead>
526 <th rowspan="2" title="The build cycle in which the step started to fail">First Failure</th> 405 <tr>
527 <th rowspan="2" title="The last build cycle in which the step pa ssed">Last Pass<br>Before Failure</th> 406 <th rowspan="3" title="Failed step name">Step</th>
528 <th colspan="7">Suspected CLs</th> 407 <th rowspan="3" title="Failed test name">Test(s)</th>
stgao 2016/03/29 00:26:06 How about setting the width of the tests?
chanli 2016/03/29 01:36:07 Done.
529 </tr> 408 <th rowspan="3" title="The build cycle in which the step start ed to fail">First Failure</th>
530 <tr> 409 <th rowspan="3" title="The last build cycle in which the step passed">Last Pass<br>Before Failure</th>
531 <th title="The build cycle in which the CL was built or tested f or the first time">Build Number</th> 410 <th colspan="8">Suspected CLs</th>
532 <th title="The Git repo name of the CL">Repo Name</th> 411 </tr>
533 <th title="Git commit position/hash">Commit</th> 412 <tr>
534 <th title="The higher score, the more suspected">Score (<a id="s core-info" href="javascript:">?</a>)</th> 413 <th colspan="3">Try Job Result</th>
535 <th title="Why this CL is related to the failure">Hints</th> 414 <th colspan="5">Heuristic Analysis Result</th>
536 </tr> 415 </tr>
537 </thead> 416 <tr>
538 <tbody> 417 <th title="The build cycle in which the CL was built or tested for the first time">Build Number</th>
539 </tbody> 418 <th title="Git commit position/hash">Commit</th>
540 </table> 419 <th title="Information about related swarming rerun and try jo b">Swarming rerun and Try Job Info</th>
420 <th title="The build cycle in which the CL was built or tested for the first time">Build Number</th>
421 <th title="The Git repo name of the CL">Repo Name</th>
422 <th title="Git commit position/hash">Commit</th>
423 <th title="The higher score, the more suspected">Score (<a id= "score-info" href="javascript:">?</a>)</th>
424 <th title="Why this CL is related to the failure">Hints</th>
425 </tr>
426 </thead>
427 <tbody>
428 </tbody>
429 </table>
430 </div>
431
432 <div id="flaky_results" class='not-display'>
433 <br>
434 <b>Flaky Results</b>
stgao 2016/03/29 00:26:06 Flaky failures.
chanli 2016/03/29 01:36:07 Done.
435 <table id="flaky_results_table">
436 <thead>
437 <tr>
438 <th rowspan="2" title="Failed step name">Step</th>
439 <th rowspan="2" title="Failed test name">Test(s)</th>
440 <th rowspan="2" title="The build cycle in which the step start ed to fail">First Failure</th>
441 <th rowspan="2" title="The last build cycle in which the step passed">Last Pass<br>Before Failure</th>
442 <th rowspan="2" title="link to swarming rerun">Swaring Rerun</ th>
lijeffrey 2016/03/29 00:49:45 Swaring -> Swarming
chanli 2016/03/29 01:36:07 Done.
443 <th colspan="5">Suspected CLs</th>
lijeffrey 2016/03/29 00:49:44 Maybe also add "Heuristic Analysis Result" under S
chanli 2016/03/29 01:36:08 Done.
444 </tr>
445 <tr>
446 <th title="The build cycle in which the CL was built or tested for the first time">Build Number</th>
447 <th title="The Git repo name of the CL">Repo Name</th>
448 <th title="Git commit position/hash">Commit</th>
449 <th title="The higher score, the more suspected">Score (<a id= "score-info" href="javascript:">?</a>)</th>
450 <th title="Why this CL is related to the failure">Hints</th>
451 </tr>
452 </thead>
453 <tbody>
454 </tbody>
455 </table>
456 </div>
457
458 <div id="undetermined_results" class='not-display'>
459 <br>
460 <b>Undetermined Results</b>
stgao 2016/03/29 00:26:06 Unclassified failures.
chanli 2016/03/29 01:36:07 Done.
461 <table id="undetermined_results_table">
462 <thead>
463 <tr>
464 <th rowspan="2" title="Failed step name">Step</th>
465 <th rowspan="2" title="Failed test name">Test(s)</th>
466 <th rowspan="2" title="The build cycle in which the step start ed to fail">First Failure</th>
467 <th rowspan="2" title="The last build cycle in which the step passed">Last Pass<br>Before Failure</th>
468 <th rowspan="2" title="The reason why we're not sure about thi s result">Reason</th>
469 <th colspan="5">Suspected CLs</th>
470 </tr>
471 <tr>
472 <th title="The build cycle in which the CL was built or tested for the first time">Build Number</th>
473 <th title="The Git repo name of the CL">Repo Name</th>
474 <th title="Git commit position/hash">Commit</th>
475 <th title="The higher score, the more suspected">Score (<a id= "score-info" href="javascript:">?</a>)</th>
476 <th title="Why this CL is related to the failure">Hints</th>
477 </tr>
478 </thead>
479 <tbody>
480 </tbody>
481 </table>
482 </div>
541 </div> 483 </div>
542 </div> 484 </div>
543 {% endif %} 485 {% endif %}
544 {% endif %} 486 {% endif %}
545 487
546 {% if show_triage_help_button %} 488 {% if show_triage_help_button %}
547 <br><br> 489 <br><br>
548 <div id="triage_help"> 490 <div id="triage_help">
549 <button id="triage_help_button">Triage Help</button> 491 <button id="triage_help_button">Triage Help</button>
550 <br> 492 <br>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 appearing in the failure log. (eg: file.h was changed and 525 appearing in the failure log. (eg: file.h was changed and
584 file_unittest.cc or file_impl.cc appeared in the log.)</li> 526 file_unittest.cc or file_impl.cc appeared in the log.)</li>
585 <li>1: The CL rolled a dependency within src/DEPS and a file of that 527 <li>1: The CL rolled a dependency within src/DEPS and a file of that
586 dependency appears in the failure log. (eg: third_party/dep 528 dependency appears in the failure log. (eg: third_party/dep
587 was changed in src/DEPS and third_party/dep/f.cpp appeared 529 was changed in src/DEPS and third_party/dep/f.cpp appeared
588 in the log.)</li> 530 in the log.)</li>
589 </ul> 531 </ul>
590 (More rules will be added when implemented.) 532 (More rules will be added when implemented.)
591 </div> 533 </div>
592 </body> 534 </body>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698