Chromium Code Reviews| Index: appengine/findit/templates/crash/fracas_result_feedback.html |
| diff --git a/appengine/findit/templates/crash/fracas_result_feedback.html b/appengine/findit/templates/crash/fracas_result_feedback.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..697cee064938c0bb143675fe665e24d7a5b02140 |
| --- /dev/null |
| +++ b/appengine/findit/templates/crash/fracas_result_feedback.html |
| @@ -0,0 +1,254 @@ |
| +<!DOCTYPE html> |
|
stgao
2016/06/13 21:25:51
Is this file supposed to be included in this CL?
Sharu Jiang
2016/06/21 00:28:14
No, accidentally got in...
|
| +<head> |
| + <title>Fracas result feedback</title> |
| + <meta charset="utf-8"> |
| + <link rel="stylesheet" href="/common.css"> |
| + <style> |
| + .error { |
| + color: #ffffff; |
| + background-color: #e98080; |
| + border-color: #a77272; |
| + } |
| + .thumbs-up-down { |
| + border-radius: 7px; |
| + display: inline-block; |
| + } |
| + .triage, .triaged { |
| + display: block; |
| + float: left; |
| + vertical-align: middle; |
| + } |
| + .triage { |
| + background-color: #e5e5e5; |
| + cursor: pointer; |
| + } |
| + .triaged { |
| + cursor: default; |
| + } |
| + .thumb-up { |
| + border-top: solid 1px; |
| + border-bottom: solid 1px; |
| + border-left: solid 1px; |
| + border-top-left-radius: 7px; |
| + border-bottom-left-radius: 7px; |
| + padding-left: 10px; |
| + padding-right: 10px; |
| + } |
| + .thumb-down { |
| + border: solid 1px; |
| + border-top-right-radius: 7px; |
| + border-bottom-right-radius: 7px; |
| + padding-left: 10px; |
| + padding-right: 10px; |
| + } |
| + .thumb-up:hover, .thumb-up.triaged { |
| + background-color: #8fdf5f; |
| + } |
| + .thumb-down:hover, .thumb-down.triaged { |
| + background-color: #e98080; |
| + } |
| + .not-display, .hidden-row { |
| + display: none; |
| + } |
| + </style> |
| + <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/smoothness/jquery-ui.css"> |
| + <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> |
| + <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script> |
| + <script> |
| + var findit = {}; |
| + findit.analysis_completed = '{{analysis_completed}}' == 'True'; |
| + findit.analysis_failed = '{{analysis_failed}}' == 'True'; |
| + findit.analysis_correct = {{analysis_correct | tojson | safe}}; |
| + findit.suspected_cls = {{suspected_cls | tojson | safe}}; |
| + findit.suspected_project = '{{suspected_project}}'; |
| + findit.suspected_components = {{suspected_components | tojson | safe}}; |
| + findit.version = '{{version}}'; |
| + findit.channel = '{{channel}}'; |
| + findit.platform = '{{platform}}'; |
| + findit.regression_range = '{{regression_range}}'; |
| + findit.default_git_base_url = 'https://chromium.googlesource.com/chromium/src.git/+/'; |
| + |
| + function triageAnalysisResult(e) { |
| + console.info('Hi') |
| + var target = $(this); |
| + if (target.hasClass('triaged')) |
| + return; |
| + |
| + var correct = target.hasClass('thumb-up'); |
| + $.getJSON('triage-fracas-analysis?crash_identifiers={{encoded_crash_identifiers}}&correct=' + correct + '&result_property=' + target.attr('result_property'), function(data) { |
| + if (data['success']) { |
| + $(".triaged[result_property='" + target.attr('result_property') + "']").addClass('triage').removeClass('triaged'); |
| + target.addClass('triaged').removeClass('triage'); |
| + } else { |
| + alert('Failed to update datastore. Please refresh and try again.'); |
| + } |
| + }).error(function(xhr) { |
| + // Replace the whole page with errors from server side. |
| + document.body.outerHTML = xhr.responseText; |
| + }); |
| + |
| + e.preventDefault(); |
| + } |
| + |
| + $(document).ready(function() { |
| + $('.triage').click(triageAnalysisResult); |
| + $('#note-submit').click(function(){ |
| + console.info('Hi') |
| + }) |
| + $.each(findit.analysis_correct, function(result, is_correct) { |
| + if (is_correct) { |
| + $(".thumb-up[result_property='" + result + "']").addClass('triaged').removeClass('triage'); |
| + } else if (!is_correct) { |
| + $(".thumb-down[result_property='" + result + "']").addClass('triaged').removeClass('triage'); |
| + } |
| + }); |
| + }) |
| + </script> |
| +</head> |
| +<body> |
| + <b>Crash:</b> |
| + <div> |
| + Signature: {{signature}}<br> |
| + Version: <a href="https://chromium.googlesource.com/chromium/src.git/+/{{version}}">{{version}}</a><br> |
| + Channel: {{channel}}<br> |
| + Platform: {{platform}}<br> |
| + Request time: {{request_time}}<br> |
| + {% if triage_history %} |
| + Triage history: {{triage_history}} |
| + {% endif %} |
| + </div> |
| + <br> |
| + |
| + <div> |
| + <b> Historical metadata (last 20 versions):</b> |
| + <table id="reliable_failures_table"> |
| + <thead> |
| + <tr> |
| + <td align="center">Version</td> |
| + {% for metadata in historical_metadata %} |
| + <td align="center" width="40"> {{metadata.chrome_version}} </td> |
| + {% endfor %} |
| + </tr> |
| + <tr> |
| + <td align="center">CPM</td> |
| + {% for metadata in historical_metadata %} |
| + <td align="center" width="40"> {{metadata.cpm}} </td> |
| + {% endfor %} |
| + </tr> |
| + <tr> |
| + <td align="center">Total clients</td> |
| + {% for metadata in historical_metadata %} |
| + <td align="center" width="40"> {{metadata.total_clients}} </td> |
| + {% endfor %} |
| + </tr> |
| + </thead> |
| + <tbody> |
| + </tbody> |
| + </table> |
| + </div> |
| + <br> |
| + |
| + <div> |
| + <b> Stacktrace: </b> |
| + <pre>{{stack_trace}}</pre> |
| + </div> |
| + |
| + <br> |
| + {% if regression_range %} |
| + <b> Regression range: </b> <a href="https://chromium.googlesource.com/chromium/src/+log/{{regression_range[0]}}..{{regression_range[1]}}?pretty=fuller">{{regression_range[0]}} : {{regression_range[1]}}</a> |
| + <br> |
| + <div class="thumbs-up-down"> |
| + <div class="triage thumb-up" result_property="regression_range">Correct <img src="https://www.gstatic.com/images/icons/material/system/1x/thumb_up_black_24dp.png"/></div> |
| + <div class="triage thumb-down" result_property="regression_range"><img src="https://www.gstatic.com/images/icons/material/system/1x/thumb_down_black_24dp.png"/> Incorrect</div> |
| + </div> |
| + {% else %} |
| + <b> Regression range: </b> Not found |
| + {% endif %} |
| + |
| + <br><br> |
| + {% if analysis_completed %} |
| + {% if analysis_failed %} |
| + <span class="error">No result because of some error in analysis!</span> |
| + {% else %} |
| + <div id="triage-and-table"> |
| + <div id="analysis_result"> |
| + <table id="suspected_cls_table"> |
| + <tr> |
| + <th>Suspected cls</th> |
| + <th>Score</th> |
| + <th>Reason</th> |
| + </tr> |
| + <tbody> |
| + {% for suspected_cl in suspected_cls %} |
| + <tr> |
| + <td align="center"> <a href={{suspected_cl.url}}>{{suspected_cl.revision}}</a> </td> |
| + <td align="center"> {{suspected_cl.confidence}} </td> |
| + <td align="center"> {{suspected_cl.reason}} </td> |
| + </tr> |
| + {% endfor %} |
| + </tbody> |
| + </table> |
| + </div> |
| + |
| + <div class="thumbs-up-down"> |
| + <div class="triage thumb-up" result_property="suspected_cls">Correct <img src="https://www.gstatic.com/images/icons/material/system/1x/thumb_up_black_24dp.png"/></div> |
| + <div class="triage thumb-down" result_property="suspected_cls"><img src="https://www.gstatic.com/images/icons/material/system/1x/thumb_down_black_24dp.png"/> Incorrect</div> |
| + </div> |
| + </div> |
| + {% endif %} |
| + {% endif %} |
| + |
| + {% if suspected_cls_triage_history %} |
| + Suspected cls triage history: |
| + <div> |
| + <table> |
| + <tr><th>When</th><th>Who</th><th>Result</th></tr> |
| + <tbody> |
| + {% for triage_record in suspected_cls_triage_history %} |
| + <tr> |
| + <td>{{triage_record.triage_time}}</td> |
| + <td>{{triage_record.user_name}}</td> |
| + <td>{{triage_record.suspected_cls_triage_status}}</td> |
| + </tr> |
| + {% endfor %} |
| + </tbody> |
| + </table> |
| + </div> |
| + {% endif %} |
| + |
| + <br> |
| + {% if suspected_project %} |
| + <b> Suspected project: </b> {{suspected_project}} |
| + <br> |
| + <div class="thumbs-up-down"> |
| + <div class="triage thumb-up" result_property="suspected_project">Correct <img src="https://www.gstatic.com/images/icons/material/system/1x/thumb_up_black_24dp.png"/></div> |
| + <div class="triage thumb-down" result_property="suspected_project"><img src="https://www.gstatic.com/images/icons/material/system/1x/thumb_down_black_24dp.png"/> Incorrect</div> |
| + </div> |
| + {% endif %} |
| + |
| + <br><br> |
| + {% if suspected_components %} |
| + <b> Suspected components:</b> |
| + <br> |
| + {% for component in suspected_components %} |
| + <li> |
| + {{component}} |
| + </li> |
| + {% endfor %} |
| + <div class="thumbs-up-down"> |
| + <div class="triage thumb-up" result_property="suspected_components">Correct <img src="https://www.gstatic.com/images/icons/material/system/1x/thumb_up_black_24dp.png"/></div> |
| + <div class="triage thumb-down" result_property="suspected_components"><img src="https://www.gstatic.com/images/icons/material/system/1x/thumb_down_black_24dp.png"/> Incorrect</div> |
| + </div> |
| + {% endif %} |
| + |
| + <div> |
| + <form> |
| + <br><br> |
| + Note: |
| + <input type="text" id="note" value={{ note }}></input> |
| + <input type="submit" id="note-submit"> |
| + </form> |
| + </div> |
| + |
| + |
| +</body> |