| OLD | NEW |
| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 findit.analysisResult = {{analysis_result | tojson | safe}}; | 96 findit.analysisResult = {{analysis_result | tojson | safe}}; |
| 97 findit.tryjobStatusMessageMap = {{status_message_map | tojson | safe}}; | 97 findit.tryjobStatusMessageMap = {{status_message_map | tojson | safe}}; |
| 98 findit.defaultGitBaseUrl = 'https://chromium.googlesource.com/chromium/src.g
it/+/'; | 98 findit.defaultGitBaseUrl = 'https://chromium.googlesource.com/chromium/src.g
it/+/'; |
| 99 | 99 |
| 100 function triageAnalysisResult(e) { | 100 function triageAnalysisResult(e) { |
| 101 var target = $(this); | 101 var target = $(this); |
| 102 if (target.hasClass('triaged')) | 102 if (target.hasClass('triaged')) |
| 103 return; | 103 return; |
| 104 | 104 |
| 105 var correct = target.hasClass('thumb-up'); | 105 var correct = target.hasClass('thumb-up'); |
| 106 $.getJSON('triage-analysis?correct=' + correct + '&url=' + findit.buildUrl
, function(data) { | 106 $.getJSON('/waterfall/triage-analysis?correct=' + correct + '&url=' + find
it.buildUrl, function(data) { |
| 107 if (data['success']) { | 107 if (data['success']) { |
| 108 $('.triaged').addClass('triage').removeClass('triaged'); | 108 $('.triaged').addClass('triage').removeClass('triaged'); |
| 109 target.addClass('triaged').removeClass('triage'); | 109 target.addClass('triaged').removeClass('triage'); |
| 110 } else { | 110 } else { |
| 111 alert('Failed to update datastore. Please refresh and try again.'); | 111 alert('Failed to update datastore. Please refresh and try again.'); |
| 112 } | 112 } |
| 113 }).error(function(xhr) { | 113 }).error(function(xhr) { |
| 114 // Replace the whole page with errors from server side. | 114 // Replace the whole page with errors from server side. |
| 115 document.body.outerHTML = xhr.responseText; | 115 document.body.outerHTML = xhr.responseText; |
| 116 }); | 116 }); |
| 117 | 117 |
| 118 e.preventDefault(); | 118 e.preventDefault(); |
| 119 } | 119 } |
| 120 | 120 |
| 121 function triageHelp(e) { | 121 function triageHelp(e) { |
| 122 $('#triage_help_button').prop('disabled', true); | 122 $('#triage_help_button').prop('disabled', true); |
| 123 $('#triage_help_result').html("Checking..."); | 123 $('#triage_help_result').html("Checking..."); |
| 124 $.getJSON('help-triage?url=' + findit.buildUrl, function(data) { | 124 $.getJSON('/waterfall/help-triage?url=' + findit.buildUrl, function(data)
{ |
| 125 if (! jQuery.isEmptyObject(data)) { | 125 if (! jQuery.isEmptyObject(data)) { |
| 126 tableString = '<table><tr><th width="150">Build Number</th><th width="
150">Culprit CL</th>' | 126 tableString = '<table><tr><th width="150">Build Number</th><th width="
150">Culprit CL</th>' |
| 127 tableString += '<th width="150">Fix Build Number</th><th width="150">P
ossible Fixing CL</th><th width="100">Action</th></tr>'; | 127 tableString += '<th width="150">Fix Build Number</th><th width="150">P
ossible Fixing CL</th><th width="100">Action</th></tr>'; |
| 128 $.each(data, function(key, value) { | 128 $.each(data, function(key, value) { |
| 129 tableString += '<tr>'; | 129 tableString += '<tr>'; |
| 130 tableString += '<td><a href="' + value.fixed_build_url + '">' + valu
e.fixed_build_number +'</a></td>'; | 130 tableString += '<td><a href="' + value.fixed_build_url + '">' + valu
e.fixed_build_number +'</a></td>'; |
| 131 tableString += '<td><a href="' + value.fixed_cl_review_url + '">' +
value.fixed_cl_commit_position +'</a></td>'; | 131 tableString += '<td><a href="' + value.fixed_cl_review_url + '">' +
value.fixed_cl_commit_position +'</a></td>'; |
| 132 tableString += '<td><a href="' + value.fixing_build_url + '">' + val
ue.fixing_build_number +'</a></td>'; | 132 tableString += '<td><a href="' + value.fixing_build_url + '">' + val
ue.fixing_build_number +'</a></td>'; |
| 133 tableString += '<td><a href="' + value.fixing_cl_review_url + '">' +
value.fixing_cl_commit_position +'</a></td>'; | 133 tableString += '<td><a href="' + value.fixing_cl_review_url + '">' +
value.fixing_cl_commit_position +'</a></td>'; |
| 134 tableString += '<td>' + value.action + '</td>'; | 134 tableString += '<td>' + value.action + '</td>'; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 155 thisobj.html('<a href="#" id="' + thisObjId + '"class="expanded_list">Sh
ow less</a>'); | 155 thisobj.html('<a href="#" id="' + thisObjId + '"class="expanded_list">Sh
ow less</a>'); |
| 156 $('#list-' + thisObjId).removeClass("not-display"); | 156 $('#list-' + thisObjId).removeClass("not-display"); |
| 157 } else { | 157 } else { |
| 158 thisobj.removeClass("expanded_list").addClass("collapsed_list"); | 158 thisobj.removeClass("expanded_list").addClass("collapsed_list"); |
| 159 thisobj.html('<a href="#" class="collapsed_list">Show more</a>'); | 159 thisobj.html('<a href="#" class="collapsed_list">Show more</a>'); |
| 160 $('#list-' + thisObjId).addClass("not-display"); | 160 $('#list-' + thisObjId).addClass("not-display"); |
| 161 } | 161 } |
| 162 } | 162 } |
| 163 | 163 |
| 164 function generateCommonCellsForAllCategories(step_name, category, index, tes
ts, first_failure, last_pass, rowspan) { | 164 function generateCommonCellsForAllCategories(step_name, category, index, tes
ts, first_failure, last_pass, rowspan) { |
| 165 var rowString = '<td rowspan="' + rowspan + '">' + step_name + '</td>'; | 165 var stepLogUrl = ''; |
| 166 var stepUrl = findit.buildUrl + '/steps/' + step_name; |
| 167 if (findit.showDebugInfo) { |
| 168 stepLogUrl = '/waterfall/failure-log?url=' + stepUrl; |
| 169 } else { |
| 170 stepLogUrl = stepUrl; |
| 171 } |
| 172 var rowString = '<td rowspan="' + rowspan + '"><a href="' + stepLogUrl + '
">' + step_name + '</a></td>'; |
| 166 | 173 |
| 167 rowString += '<td rowspan="' + rowspan + '">'; | 174 rowString += '<td rowspan="' + rowspan + '">'; |
| 168 var j = 0; | 175 var j = 0; |
| 169 for (; j < (tests.length > 5 ? 5 : tests.length); j++) { | 176 for (; j < (tests.length > 5 ? 5 : tests.length); j++) { |
| 170 rowString += '<li><div title="' + tests[j] + '" class="truncate">' + tes
ts[j] + '</div></li>'; | 177 rowString += '<li><div title="' + tests[j] + '" class="truncate">' + tes
ts[j] + '</div></li>'; |
| 171 } | 178 } |
| 172 if (tests.length > 5) { | 179 if (tests.length > 5) { |
| 173 rowString += '<div id="list-' + category + '-' + index + '" class="not-
display">'; | 180 rowString += '<div id="list-' + category + '-' + index + '" class="not-
display">'; |
| 174 for (; j < tests.length; j++) { | 181 for (; j < tests.length; j++) { |
| 175 rowString += '<li><div title="' + tests[j] + '" class="truncate">' + t
ests[j] + '</div></li>'; | 182 rowString += '<li><div title="' + tests[j] + '" class="truncate">' + t
ests[j] + '</div></li>'; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 tableString += generateHeuristicCulpritCls(result.heuristic_analysis.s
uspected_cls, result.supported); | 280 tableString += generateHeuristicCulpritCls(result.heuristic_analysis.s
uspected_cls, result.supported); |
| 274 | 281 |
| 275 tableString += '</tr>'; | 282 tableString += '</tr>'; |
| 276 }); | 283 }); |
| 277 | 284 |
| 278 $('#flaky_failures_table tbody').append(tableString); | 285 $('#flaky_failures_table tbody').append(tableString); |
| 279 $('#flaky_failures').removeClass('not-display'); | 286 $('#flaky_failures').removeClass('not-display'); |
| 280 } | 287 } |
| 281 } | 288 } |
| 282 | 289 |
| 283 function displayunclassifiedFailures(step_name, results) { | 290 function displayUnclassifiedFailures(step_name, results) { |
| 284 if (!jQuery.isEmptyObject(results)) { | 291 if (!jQuery.isEmptyObject(results)) { |
| 285 var tableString = ''; | 292 var tableString = ''; |
| 286 $.each(results, function(index, result) { | 293 $.each(results, function(index, result) { |
| 287 tableString += '<tr>'; | 294 tableString += '<tr>'; |
| 288 var rowspan = result.heuristic_analysis.suspected_cls.length > 0 ? res
ult.heuristic_analysis.suspected_cls.length : 1; | 295 var rowspan = result.heuristic_analysis.suspected_cls.length > 0 ? res
ult.heuristic_analysis.suspected_cls.length : 1; |
| 289 tableString += generateCommonCellsForAllCategories(step_name, 'undeter
mined', index, result.tests, result.first_failure, result.last_pass, rowspan); | 296 tableString += generateCommonCellsForAllCategories(step_name, 'undeter
mined', index, result.tests, result.first_failure, result.last_pass, rowspan); |
| 290 | 297 |
| 291 tableString += '<td rowspan="' + rowspan + '">' + findit.tryjobStatusM
essageMap[result.try_job.status] + '</td>'; | 298 tableString += '<td rowspan="' + rowspan + '">' + findit.tryjobStatusM
essageMap[result.try_job.status] + '</td>'; |
| 292 | 299 |
| 293 tableString += generateHeuristicCulpritCls(result.heuristic_analysis.s
uspected_cls, result.supported); | 300 tableString += generateHeuristicCulpritCls(result.heuristic_analysis.s
uspected_cls, result.supported); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 320 $('#status_message').attr('class', 'completed'); | 327 $('#status_message').attr('class', 'completed'); |
| 321 | 328 |
| 322 $('.triage').click(triageAnalysisResult); | 329 $('.triage').click(triageAnalysisResult); |
| 323 | 330 |
| 324 if (!jQuery.isEmptyObject(findit.analysisResult)) { | 331 if (!jQuery.isEmptyObject(findit.analysisResult)) { |
| 325 $.each(findit.analysisResult, function(step_name, step_results) { | 332 $.each(findit.analysisResult, function(step_name, step_results) { |
| 326 $.each(step_results.results, function(category, results) { | 333 $.each(step_results.results, function(category, results) { |
| 327 if (category == 'reliable_failures') { | 334 if (category == 'reliable_failures') { |
| 328 displayReliableFailures(step_name, results); | 335 displayReliableFailures(step_name, results); |
| 329 } else if (category == 'unclassified_failures') { | 336 } else if (category == 'unclassified_failures') { |
| 330 displayunclassifiedFailures(step_name, results); | 337 displayUnclassifiedFailures(step_name, results); |
| 331 } else if (category == 'flaky_failures') { | 338 } else if (category == 'flaky_failures') { |
| 332 displayFlakyFailures(step_name, results); | 339 displayFlakyFailures(step_name, results); |
| 333 } else { | 340 } else { |
| 334 alert('Unrecongnizable category of test results, please file
a bug for it.'); | 341 alert('Unrecongnizable category of test results, please file
a bug for it.'); |
| 335 } | 342 } |
| 336 }); | 343 }); |
| 337 }); | 344 }); |
| 338 } else { | 345 } else { |
| 339 $('#triage-and-table').text('no failure is found'); | 346 $('#triage-and-table').text('no failure is found'); |
| 340 } | 347 } |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 appearing in the failure log. (eg: file.h was changed and | 542 appearing in the failure log. (eg: file.h was changed and |
| 536 file_unittest.cc or file_impl.cc appeared in the log.)</li> | 543 file_unittest.cc or file_impl.cc appeared in the log.)</li> |
| 537 <li>1: The CL rolled a dependency within src/DEPS and a file of that | 544 <li>1: The CL rolled a dependency within src/DEPS and a file of that |
| 538 dependency appears in the failure log. (eg: third_party/dep | 545 dependency appears in the failure log. (eg: third_party/dep |
| 539 was changed in src/DEPS and third_party/dep/f.cpp appeared | 546 was changed in src/DEPS and third_party/dep/f.cpp appeared |
| 540 in the log.)</li> | 547 in the log.)</li> |
| 541 </ul> | 548 </ul> |
| 542 (More rules will be added when implemented.) | 549 (More rules will be added when implemented.) |
| 543 </div> | 550 </div> |
| 544 </body> | 551 </body> |
| OLD | NEW |