| 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..da64598babc8d0ff58a4830989ce6c2251be7184
|
| --- /dev/null
|
| +++ b/appengine/findit/templates/crash/fracas_result_feedback.html
|
| @@ -0,0 +1,378 @@
|
| +<!DOCTYPE html>
|
| +<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;
|
| + }
|
| + .correct {
|
| + 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;
|
| + margin: auto;
|
| + }
|
| + .incorrect {
|
| + border: solid 1px;
|
| + padding-left: 10px;
|
| + padding-right: 10px;
|
| + }
|
| + .unsure {
|
| + border-top: solid 1px;
|
| + border-bottom: solid 1px;
|
| + border-right: solid 1px;
|
| + border-top-right-radius: 7px;
|
| + border-bottom-right-radius: 7px;
|
| + padding-left: 10px;
|
| + padding-right: 14px;
|
| + }
|
| + .correct:hover, .correct.triaged {
|
| + background-color: #8fdf5f;
|
| + }
|
| + .incorrect:hover, .incorrect.triaged {
|
| + background-color: #e98080;
|
| + }
|
| + .unsure:hover, .unsure.triaged {
|
| + background-color: #FFD700;
|
| + }
|
| + .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 analysis_completed = '{{analysis_completed}}' == 'True';
|
| + var analysis_failed = '{{analysis_failed}}' == 'True';
|
| + var analysis_correct = {{analysis_correct | tojson | safe}};
|
| + var regression_range = {{regression_range | tojson | safe}}
|
| + var suspected_cls = {{suspected_cls | tojson | safe}};
|
| + var suspected_project = '{{suspected_project}}'
|
| + var suspected_components = {{suspected_components | tojson | safe}};
|
| + var default_git_base_url = 'https://chromium.googlesource.com/chromium/src.git/+/';
|
| + var culprit_regression_range = {{culprit_regression_range | tojson | safe}}
|
| + var culprit_cls = {{culprit_cls | tojson | safe}}
|
| + for (i = 0; i < culprit_cls.length; i++) {
|
| + culprit_cls[i] = culprit_cls[i]['url'];
|
| + }
|
| +
|
| + var culprit_project = '{{culprit_project}}'
|
| + var culprit_components = {{culprit_components | tojson | safe}}
|
| +
|
| + function getCulpritPropertyNameForResult(result) {
|
| + if (result.match('^suspected'))
|
| + return result.replace('suspected', 'culprit');
|
| +
|
| + return 'culprit_' + result;
|
| + }
|
| +
|
| + function getTriageStatusPropertyNameForResult(result) {
|
| + return result + '_triage_status';
|
| + }
|
| +
|
| + function triageAnalysisResult(e) {
|
| + var target = $(this);
|
| + if (target.hasClass('triaged'))
|
| + return;
|
| +
|
| + var new_analysis = {};
|
| + var update = {};
|
| + var result = target.attr('result_property');
|
| + if (target.hasClass('correct')) {
|
| + var triage_status = 'triaged-correct';
|
| + update[getCulpritPropertyNameForResult(result)] = window[result]
|
| + } else if (target.hasClass('incorrect')) {
|
| + var triage_status = 'triaged-incorrect';
|
| + } else {
|
| + var triage_status = 'triaged-unsure';
|
| + }
|
| + update[getTriageStatusPropertyNameForResult(result)] = triage_status;
|
| +
|
| + $.getJSON('triage-fracas-analysis?key={{key}}&update=' + encodeURIComponent(JSON.stringify(update)), function(data) {
|
| + if (data['success']) {
|
| + $(".triaged[result_property='" + result + "']").addClass('triage').removeClass('triaged');
|
| + target.addClass('triaged').removeClass('triage');
|
| + if (triage_status == 'triaged-correct') {
|
| + $("form[result_property='" + result + "']").addClass('not-display');
|
| + } else {
|
| + $("form.not-display[result_property='" + result + "']").removeClass('not-display');
|
| + $("input[result_property='" + result + "']").attr("value", window[getCulpritPropertyNameForResult(result)])
|
| + alert('Please fill the culprit if you found it.')
|
| + }
|
| + window.location.reload();
|
| + } 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();
|
| + }
|
| +
|
| +
|
| + function updateCulpritResult(result) {
|
| + if (result) {
|
| + var value = $('input[result_property=' + result + ']').val();
|
| + var update = {};
|
| + update[getCulpritPropertyNameForResult(result)] = value;
|
| + $.getJSON('triage-fracas-analysis?key={{key}}&update=' + encodeURIComponent(JSON.stringify(update)), function(data) {
|
| + if (data['success']) {
|
| + alert('Update ' + result + ' to new value ' + value);
|
| + } 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;
|
| + });
|
| + }
|
| + }
|
| +
|
| + $(document).ready(function() {
|
| + $('.triage').click(triageAnalysisResult);
|
| + $.each(analysis_correct, function(result, triage_status) {
|
| + if (triage_status == 'triaged-correct') {
|
| + $(".correct[result_property='" + result + "']").addClass('triaged').removeClass('triage');
|
| + $("form[result_property='" + result + "']").addClass('not-display');
|
| + } else if (triage_status == 'triaged-incorrect') {
|
| + $(".incorrect[result_property='" + result + "']").addClass('triaged').removeClass('triage');
|
| + $("form.not-display[result_property='" + result + "']").removeClass('not-display');
|
| + }
|
| + else if (triage_status == 'triaged-unsure') {
|
| + $(".unsure[result_property='" + result + "']").addClass('triaged').removeClass('triage');
|
| + $("form.not-display[result_property='" + result + "']").removeClass('not-display');
|
| + }
|
| + $("input[result_property='" + result + "']").attr("value", window[getCulpritPropertyNameForResult(result)]);
|
| + });
|
| + $(".culprit").keypress(function(e) {
|
| + if (e.which == 13) {
|
| + e.preventDefault();
|
| + updateCulpritResult($(this).attr('result_property'));
|
| + }
|
| + });
|
| + $("#note").val('{{note}}')
|
| + $("#note").keypress(function(e) {
|
| + if (e.which == 13) {
|
| + e.preventDefault();
|
| + var update = {};
|
| + update['note'] = $(this).val();
|
| + $.getJSON('triage-fracas-analysis?key={{key}}&update=' + encodeURIComponent(JSON.stringify(update)), function(data) {
|
| + if (data['success']) {
|
| + alert('Update note to new value ' + update['note']);
|
| + } 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;
|
| + });
|
| + }
|
| + });
|
| + })
|
| +
|
| + </script>
|
| +</head>
|
| +<body>
|
| + <b>Crash:</b> (<a href="https://code.google.com/p/chromium/issues/entry?status=Unconfirmed&labels=Pri-2,Restrict-View-Google&components=Tool>Test>Findit&summary=Findit%20bug%20or%20reature%20request&comment=Signature:%20{{signature}}%0AVersion:%20{{version}}%0AChannel:%20{{channel}}%0APlatform:%20{{platform}}%0A%0AWhat%20is%20the%20bug%20or%20feature:%0A">File a Findit bug</a>)
|
| + <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>
|
| + </div>
|
| + <br>
|
| +
|
| + <div>
|
| + <b> Stacktrace: </b>
|
| + <pre>{{stack_trace}}</pre>
|
| + </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.client_number}} </td>
|
| + {% endfor %}
|
| + </tr>
|
| + <tr>
|
| + <td align="center">Total reports</td>
|
| + {% for metadata in historical_metadata %}
|
| + <td align="center" width="40"> {{metadata.report_number}} </td>
|
| + {% endfor %}
|
| + </tr>
|
| + </thead>
|
| + <tbody>
|
| + </tbody>
|
| + </table>
|
| + </div>
|
| +
|
| + <br>
|
| + <b> Regression range: </b>
|
| + {% if regression_range %}
|
| + <a href="https://chromium.googlesource.com/chromium/src/+log/{{regression_range[0]}}..{{regression_range[1]}}?pretty=fuller">{{regression_range[0]}} : {{regression_range[1]}}</a>
|
| + {% else %}
|
| + Not found
|
| + {% endif %}
|
| + <br>
|
| + <div class="thumbs-up-down">
|
| + <div class="triage correct" result_property="regression_range">Correct<img src="https://www.gstatic.com/images/icons/material/system/1x/sentiment_satisfied_black_24dp.png"/></div>
|
| + <div class="triage incorrect" result_property="regression_range">Incorrect<img src="https://www.gstatic.com/images/icons/material/system/1x/sentiment_dissatisfied_black_24dp.png"/></div>
|
| + <div class="triage unsure" result_property="regression_range">Unsure<img src="https://www.gstatic.com/images/icons/material/system/1x/sentiment_neutral_black_24dp.png"/></div>
|
| + <form class="not-display culprit" result_property="regression_range">
|
| + <br><br>Culprit regression range:
|
| + <input type="text" result_property="regression_range" size="30"></input>
|
| + </form>
|
| + </div>
|
| + <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">
|
| + <b> Suspected cls: </b>
|
| + {% if suspected_cls %}
|
| + <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="left"><pre>{{suspected_cl.reason}}</pre></td>
|
| + </tr>
|
| + {% endfor %}
|
| + </tbody>
|
| + </table>
|
| + {% else %}
|
| + Not found <br>
|
| + {% endif %}
|
| + </div>
|
| +
|
| + <div class="thumbs-up-down">
|
| + <div class="triage correct" result_property="suspected_cls">Correct <img src="https://www.gstatic.com/images/icons/material/system/1x/sentiment_satisfied_black_24dp.png"/></div>
|
| + <div class="triage incorrect" result_property="suspected_cls">Incorrect<img src="https://www.gstatic.com/images/icons/material/system/1x/sentiment_dissatisfied_black_24dp.png"/></div>
|
| + <div class="triage unsure" result_property="suspected_cls">Unsure<img src="https://www.gstatic.com/images/icons/material/system/1x/sentiment_neutral_black_24dp.png"/></div>
|
| + <form class="not-display culprit" result_property="suspected_cls">
|
| + <br><br>Culprit cls:
|
| + <input type="text" result_property="suspected_cls" size="100"></input>
|
| + </form>
|
| + </div>
|
| + {% endif %}
|
| + {% endif %}
|
| +
|
| + <br><br>
|
| + <b> Suspected project: </b>
|
| + {% if suspected_project %}
|
| + {{suspected_project}}
|
| + {% else %}
|
| + Not found
|
| + {% endif %}
|
| + <br>
|
| + <div class="thumbs-up-down">
|
| + <div class="triage correct" result_property="suspected_project">Correct <img src="https://www.gstatic.com/images/icons/material/system/1x/sentiment_satisfied_black_24dp.png"/></div>
|
| + <div class="triage incorrect" result_property="suspected_project">Incorrect<img src="https://www.gstatic.com/images/icons/material/system/1x/sentiment_dissatisfied_black_24dp.png"/></div>
|
| + <div class="triage unsure" result_property="suspected_project">Unsure<img src="https://www.gstatic.com/images/icons/material/system/1x/sentiment_neutral_black_24dp.png"/></div>
|
| + <form class="not-display culprit" result_property="suspected_project">
|
| + <br><br>Culprit project:
|
| + <input type="text" result_property="suspected_project"></input>
|
| + </form>
|
| + </div>
|
| +
|
| + <br><br>
|
| + <b> Suspected components:</b>
|
| + {% if suspected_components %}
|
| + <br>
|
| + {% for component in suspected_components %}
|
| + <li>
|
| + {{component}}
|
| + </li>
|
| + {% endfor %}
|
| + {% else %}
|
| + Not found <br>
|
| + {% endif %}
|
| + <div class="thumbs-up-down">
|
| + <div class="triage correct" result_property="suspected_components">Correct <img src="https://www.gstatic.com/images/icons/material/system/1x/sentiment_satisfied_black_24dp.png"/></div>
|
| + <div class="triage incorrect" result_property="suspected_components">Incorrect<img src="https://www.gstatic.com/images/icons/material/system/1x/sentiment_dissatisfied_black_24dp.png"/></div>
|
| + <div class="triage unsure" result_property="suspected_components">Unsure<img src="https://www.gstatic.com/images/icons/material/system/1x/sentiment_neutral_black_24dp.png"/></div>
|
| + <form class="not-display culprit" result_property="suspected_components">
|
| + <br><br>Culprit components:
|
| + <input type="text" result_property="suspected_components" size="40"></input>
|
| + </form>
|
| + </div>
|
| +
|
| +
|
| + <div>
|
| + <form>
|
| + <br><br>
|
| + <b>Note:<br></b>
|
| + <textarea id="note" rows="5" cols="80"></textarea>
|
| + <br>
|
| + </form>
|
| + </div>
|
| +
|
| + <br><br>
|
| + {% if triage_history %}
|
| + Triage history:
|
| + <div>
|
| + <table>
|
| + <tr><th>When</th><th>Who</th><th>Property</th><th>Result</th></tr>
|
| + <tbody>
|
| + {% for triage_record in triage_history %}
|
| + <tr>
|
| + <td>{{triage_record.triage_time}}</td>
|
| + <td>{{triage_record.user_name}}</td>
|
| + <td>{{triage_record.result_property}}</td>
|
| + <td>{{triage_record.triage_status}}</td>
|
| + </tr>
|
| + {% endfor %}
|
| + </tbody>
|
| + </table>
|
| + </div>
|
| + {% endif %}
|
| +</body>
|
|
|