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

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

Issue 2086113004: [Findit] Show build analysis references in UI for Findit Cross-platform auto-triage (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@build-matching
Patch Set: Moved duplicator reference reset code, put duplicate info behind debug boolean, fixed js style Created 4 years, 5 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
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 </style> 69 </style>
70 <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1. 11.1/themes/smoothness/jquery-ui.css"> 70 <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1. 11.1/themes/smoothness/jquery-ui.css">
71 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js "></script> 71 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js "></script>
72 <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.m in.js"></script> 72 <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.m in.js"></script>
73 <script> 73 <script>
74 var findit = {}; 74 var findit = {};
75 findit.analysisCompleted = '{{analysis_completed}}' == 'True'; 75 findit.analysisCompleted = '{{analysis_completed}}' == 'True';
76 findit.analysisFailed = '{{analysis_failed}}' == 'True'; 76 findit.analysisFailed = '{{analysis_failed}}' == 'True';
77 findit.builderUrl = 'https://build.chromium.org/p/{{master_name}}/builders/{ {builder_name}}'; 77 findit.builderUrl = 'https://build.chromium.org/p/{{master_name}}/builders/{ {builder_name}}';
78 findit.buildUrl = findit.builderUrl + '/builds/{{build_number}}'; 78 findit.buildUrl = findit.builderUrl + '/builds/{{build_number}}';
79 findit.triageReferenceAnalysisUrl = '/waterfall/build-failure?url=https://bu ild.chromium.org/p/{{triage_reference_analysis_master_name}}/builders/{{triage_r eference_analysis_builder_name}}/builds/{{triage_reference_analysis_build_number }}';
79 findit.analysisCorrect = '{{analysis_correct}}'; // Possible values: 'None' , 'True', or 'False'. 80 findit.analysisCorrect = '{{analysis_correct}}'; // Possible values: 'None' , 'True', or 'False'.
81 findit.analysisIsDuplicate = '{{analysis_is_duplicate}}' == 'True';
80 findit.showTriageHelpButton = '{{show_triage_help_button}}' == 'True'; 82 findit.showTriageHelpButton = '{{show_triage_help_button}}' == 'True';
81 findit.showDebugInfo = '{{show_debug_info}}' == 'True'; 83 findit.showDebugInfo = '{{show_debug_info}}' == 'True';
82 findit.analysisResult = {{analysis_result | tojson | safe}}; 84 findit.analysisResult = {{analysis_result | tojson | safe}};
83 findit.tryjobStatusMessageMap = {{status_message_map | tojson | safe}}; 85 findit.tryjobStatusMessageMap = {{status_message_map | tojson | safe}};
84 findit.defaultGitBaseUrl = 'https://chromium.googlesource.com/chromium/src.g it/+/'; 86 findit.defaultGitBaseUrl = 'https://chromium.googlesource.com/chromium/src.g it/+/';
85 87
86 function triageAnalysisResult(e) { 88 function triageAnalysisResult(e) {
87 var target = $(this); 89 var target = $(this);
88 if (target.hasClass('triaged')) 90 if (target.hasClass('triaged'))
89 return; 91 return;
90 92
91 var correct = target.hasClass('thumb-up'); 93 var correct = target.hasClass('thumb-up');
92 $.getJSON('/waterfall/triage-analysis?correct=' + correct + '&url=' + find it.buildUrl, function(data) { 94 $.getJSON('/waterfall/triage-analysis?correct=' + correct + '&url=' + find it.buildUrl, function(data) {
93 if (data['success']) { 95 if (data['success']) {
94 $('.triaged').addClass('triage').removeClass('triaged'); 96 $('.triaged').addClass('triage').removeClass('triaged');
95 target.addClass('triaged').removeClass('triage'); 97 target.addClass('triaged').removeClass('triage');
96 } else { 98 } else {
97 alert('Failed to update datastore. Please refresh and try again.'); 99 alert('Failed to update datastore. Please refresh and try again.');
98 } 100 }
101 {% if show_debug_info %}
102 $('#duplicates_marked').html('Number of matching build analyses that w ere also triaged: ' + data['num_duplicate_analyses']);
103 $('#duplicate_reference').html('');
104 {% endif %}
99 }).error(function(xhr) { 105 }).error(function(xhr) {
100 // Replace the whole page with errors from server side. 106 // Replace the whole page with errors from server side.
101 document.body.outerHTML = xhr.responseText; 107 document.body.outerHTML = xhr.responseText;
102 }); 108 });
103 109
104 e.preventDefault(); 110 e.preventDefault();
105 } 111 }
106 112
107 function triageHelp(e) { 113 function triageHelp(e) {
108 $('#triage_help_button').prop('disabled', true); 114 $('#triage_help_button').prop('disabled', true);
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 } else { 436 } else {
431 $('#triage-and-table').text('no failure is found'); 437 $('#triage-and-table').text('no failure is found');
432 } 438 }
433 439
434 if (findit.analysisCorrect == 'True') { 440 if (findit.analysisCorrect == 'True') {
435 $('.thumb-up').addClass('triaged').removeClass('triage'); 441 $('.thumb-up').addClass('triaged').removeClass('triage');
436 } else if (findit.analysisCorrect == 'False') { 442 } else if (findit.analysisCorrect == 'False') {
437 $('.thumb-down').addClass('triaged').removeClass('triage'); 443 $('.thumb-down').addClass('triaged').removeClass('triage');
438 } 444 }
439 445
446 {% if show_debug_info %}
447 if (findit.analysisIsDuplicate) {
448 $('#duplicate_reference').html('This analysis was automatically tr iaged as a duplicate because of another build analysis: ' +
449 '<a href="' + findit.triageReferenc eAnalysisUrl + '">{{triage_reference_analysis_master_name}}/' +
450 '{{triage_reference_analysis_builde r_name}}/{{triage_reference_analysis_build_number}}</a>');
451 }
452 {% endif %}
453
440 if (findit.showTriageHelpButton) { 454 if (findit.showTriageHelpButton) {
441 $('#triage_help_button').click(triageHelp); 455 $('#triage_help_button').click(triageHelp);
442 } 456 }
443 } 457 }
444 } 458 }
445 459
446 $('#score-explanation-dialog').dialog({ 460 $('#score-explanation-dialog').dialog({
447 autoOpen: false, 461 autoOpen: false,
448 modal: true, 462 modal: true,
449 width: 600, 463 width: 600,
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 </tbody> 654 </tbody>
641 </table> 655 </table>
642 <br> 656 <br>
643 </div> 657 </div>
644 658
645 <div class="thumbs-up-down"> 659 <div class="thumbs-up-down">
646 <b>Feedback on Findit result:</b><br> 660 <b>Feedback on Findit result:</b><br>
647 <div class="triage thumb-up">Correct <img src="https://www.gstatic.com /images/icons/material/system/1x/thumb_up_black_24dp.png"/></div> 661 <div class="triage thumb-up">Correct <img src="https://www.gstatic.com /images/icons/material/system/1x/thumb_up_black_24dp.png"/></div>
648 <div class="triage thumb-down"><img src="https://www.gstatic.com/image s/icons/material/system/1x/thumb_down_black_24dp.png"/> Incorrect</div> 662 <div class="triage thumb-down"><img src="https://www.gstatic.com/image s/icons/material/system/1x/thumb_down_black_24dp.png"/> Incorrect</div>
649 </div> 663 </div>
664 {% if show_debug_info %}
665 <div id="duplicates_marked"></div>
666 <div id="duplicate_reference"></div>
667 {% endif %}
650 </div> 668 </div>
651 {% endif %} 669 {% endif %}
652 {% endif %} 670 {% endif %}
653 671
654 {% if show_triage_help_button %} 672 {% if show_triage_help_button %}
655 <br><br> 673 <br><br>
656 <div id="triage_help"> 674 <div id="triage_help">
657 <button id="triage_help_button">Triage help</button> 675 <button id="triage_help_button">Triage help</button>
658 <br> 676 <br>
659 <div id="triage_help_result"> 677 <div id="triage_help_result">
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 appearing in the failure log. (eg: file.h was changed and 709 appearing in the failure log. (eg: file.h was changed and
692 file_unittest.cc or file_impl.cc appeared in the log.)</li> 710 file_unittest.cc or file_impl.cc appeared in the log.)</li>
693 <li>1: The CL rolled a dependency within src/DEPS and a file of that 711 <li>1: The CL rolled a dependency within src/DEPS and a file of that
694 dependency appears in the failure log. (eg: third_party/dep 712 dependency appears in the failure log. (eg: third_party/dep
695 was changed in src/DEPS and third_party/dep/f.cpp appeared 713 was changed in src/DEPS and third_party/dep/f.cpp appeared
696 in the log.)</li> 714 in the log.)</li>
697 </ul> 715 </ul>
698 (More rules will be added when implemented.) 716 (More rules will be added when implemented.)
699 </div> 717 </div>
700 </body> 718 </body>
OLDNEW
« appengine/findit/handlers/triage_analysis.py ('K') | « appengine/findit/model/wf_analysis.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698