Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!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...
| |
| 2 <head> | |
| 3 <title>Fracas result feedback</title> | |
| 4 <meta charset="utf-8"> | |
| 5 <link rel="stylesheet" href="/common.css"> | |
| 6 <style> | |
| 7 .error { | |
| 8 color: #ffffff; | |
| 9 background-color: #e98080; | |
| 10 border-color: #a77272; | |
| 11 } | |
| 12 .thumbs-up-down { | |
| 13 border-radius: 7px; | |
| 14 display: inline-block; | |
| 15 } | |
| 16 .triage, .triaged { | |
| 17 display: block; | |
| 18 float: left; | |
| 19 vertical-align: middle; | |
| 20 } | |
| 21 .triage { | |
| 22 background-color: #e5e5e5; | |
| 23 cursor: pointer; | |
| 24 } | |
| 25 .triaged { | |
| 26 cursor: default; | |
| 27 } | |
| 28 .thumb-up { | |
| 29 border-top: solid 1px; | |
| 30 border-bottom: solid 1px; | |
| 31 border-left: solid 1px; | |
| 32 border-top-left-radius: 7px; | |
| 33 border-bottom-left-radius: 7px; | |
| 34 padding-left: 10px; | |
| 35 padding-right: 10px; | |
| 36 } | |
| 37 .thumb-down { | |
| 38 border: solid 1px; | |
| 39 border-top-right-radius: 7px; | |
| 40 border-bottom-right-radius: 7px; | |
| 41 padding-left: 10px; | |
| 42 padding-right: 10px; | |
| 43 } | |
| 44 .thumb-up:hover, .thumb-up.triaged { | |
| 45 background-color: #8fdf5f; | |
| 46 } | |
| 47 .thumb-down:hover, .thumb-down.triaged { | |
| 48 background-color: #e98080; | |
| 49 } | |
| 50 .not-display, .hidden-row { | |
| 51 display: none; | |
| 52 } | |
| 53 </style> | |
| 54 <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1. 11.1/themes/smoothness/jquery-ui.css"> | |
| 55 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js "></script> | |
| 56 <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.m in.js"></script> | |
| 57 <script> | |
| 58 var findit = {}; | |
| 59 findit.analysis_completed = '{{analysis_completed}}' == 'True'; | |
| 60 findit.analysis_failed = '{{analysis_failed}}' == 'True'; | |
| 61 findit.analysis_correct = {{analysis_correct | tojson | safe}}; | |
| 62 findit.suspected_cls = {{suspected_cls | tojson | safe}}; | |
| 63 findit.suspected_project = '{{suspected_project}}'; | |
| 64 findit.suspected_components = {{suspected_components | tojson | safe}}; | |
| 65 findit.version = '{{version}}'; | |
| 66 findit.channel = '{{channel}}'; | |
| 67 findit.platform = '{{platform}}'; | |
| 68 findit.regression_range = '{{regression_range}}'; | |
| 69 findit.default_git_base_url = 'https://chromium.googlesource.com/chromium/sr c.git/+/'; | |
| 70 | |
| 71 function triageAnalysisResult(e) { | |
| 72 console.info('Hi') | |
| 73 var target = $(this); | |
| 74 if (target.hasClass('triaged')) | |
| 75 return; | |
| 76 | |
| 77 var correct = target.hasClass('thumb-up'); | |
| 78 $.getJSON('triage-fracas-analysis?crash_identifiers={{encoded_crash_identi fiers}}&correct=' + correct + '&result_property=' + target.attr('result_property '), function(data) { | |
| 79 if (data['success']) { | |
| 80 $(".triaged[result_property='" + target.attr('result_property') + "']" ).addClass('triage').removeClass('triaged'); | |
| 81 target.addClass('triaged').removeClass('triage'); | |
| 82 } else { | |
| 83 alert('Failed to update datastore. Please refresh and try again.'); | |
| 84 } | |
| 85 }).error(function(xhr) { | |
| 86 // Replace the whole page with errors from server side. | |
| 87 document.body.outerHTML = xhr.responseText; | |
| 88 }); | |
| 89 | |
| 90 e.preventDefault(); | |
| 91 } | |
| 92 | |
| 93 $(document).ready(function() { | |
| 94 $('.triage').click(triageAnalysisResult); | |
| 95 $('#note-submit').click(function(){ | |
| 96 console.info('Hi') | |
| 97 }) | |
| 98 $.each(findit.analysis_correct, function(result, is_correct) { | |
| 99 if (is_correct) { | |
| 100 $(".thumb-up[result_property='" + result + "']").addClass('triaged').r emoveClass('triage'); | |
| 101 } else if (!is_correct) { | |
| 102 $(".thumb-down[result_property='" + result + "']").addClass('triaged') .removeClass('triage'); | |
| 103 } | |
| 104 }); | |
| 105 }) | |
| 106 </script> | |
| 107 </head> | |
| 108 <body> | |
| 109 <b>Crash:</b> | |
| 110 <div> | |
| 111 Signature: {{signature}}<br> | |
| 112 Version: <a href="https://chromium.googlesource.com/chromium/src.git/+/{{ver sion}}">{{version}}</a><br> | |
| 113 Channel: {{channel}}<br> | |
| 114 Platform: {{platform}}<br> | |
| 115 Request time: {{request_time}}<br> | |
| 116 {% if triage_history %} | |
| 117 Triage history: {{triage_history}} | |
| 118 {% endif %} | |
| 119 </div> | |
| 120 <br> | |
| 121 | |
| 122 <div> | |
| 123 <b> Historical metadata (last 20 versions):</b> | |
| 124 <table id="reliable_failures_table"> | |
| 125 <thead> | |
| 126 <tr> | |
| 127 <td align="center">Version</td> | |
| 128 {% for metadata in historical_metadata %} | |
| 129 <td align="center" width="40"> {{metadata.chrome_version}} </td> | |
| 130 {% endfor %} | |
| 131 </tr> | |
| 132 <tr> | |
| 133 <td align="center">CPM</td> | |
| 134 {% for metadata in historical_metadata %} | |
| 135 <td align="center" width="40"> {{metadata.cpm}} </td> | |
| 136 {% endfor %} | |
| 137 </tr> | |
| 138 <tr> | |
| 139 <td align="center">Total clients</td> | |
| 140 {% for metadata in historical_metadata %} | |
| 141 <td align="center" width="40"> {{metadata.total_clients}} </td> | |
| 142 {% endfor %} | |
| 143 </tr> | |
| 144 </thead> | |
| 145 <tbody> | |
| 146 </tbody> | |
| 147 </table> | |
| 148 </div> | |
| 149 <br> | |
| 150 | |
| 151 <div> | |
| 152 <b> Stacktrace: </b> | |
| 153 <pre>{{stack_trace}}</pre> | |
| 154 </div> | |
| 155 | |
| 156 <br> | |
| 157 {% if regression_range %} | |
| 158 <b> Regression range: </b> <a href="https://chromium.googlesource.com/chromi um/src/+log/{{regression_range[0]}}..{{regression_range[1]}}?pretty=fuller">{{re gression_range[0]}} : {{regression_range[1]}}</a> | |
| 159 <br> | |
| 160 <div class="thumbs-up-down"> | |
| 161 <div class="triage thumb-up" result_property="regression_range">Correct <i mg src="https://www.gstatic.com/images/icons/material/system/1x/thumb_up_black_2 4dp.png"/></div> | |
| 162 <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> | |
| 163 </div> | |
| 164 {% else %} | |
| 165 <b> Regression range: </b> Not found | |
| 166 {% endif %} | |
| 167 | |
| 168 <br><br> | |
| 169 {% if analysis_completed %} | |
| 170 {% if analysis_failed %} | |
| 171 <span class="error">No result because of some error in analysis!</span> | |
| 172 {% else %} | |
| 173 <div id="triage-and-table"> | |
| 174 <div id="analysis_result"> | |
| 175 <table id="suspected_cls_table"> | |
| 176 <tr> | |
| 177 <th>Suspected cls</th> | |
| 178 <th>Score</th> | |
| 179 <th>Reason</th> | |
| 180 </tr> | |
| 181 <tbody> | |
| 182 {% for suspected_cl in suspected_cls %} | |
| 183 <tr> | |
| 184 <td align="center"> <a href={{suspected_cl.url}}>{{suspected_cl. revision}}</a> </td> | |
| 185 <td align="center"> {{suspected_cl.confidence}} </td> | |
| 186 <td align="center"> {{suspected_cl.reason}} </td> | |
| 187 </tr> | |
| 188 {% endfor %} | |
| 189 </tbody> | |
| 190 </table> | |
| 191 </div> | |
| 192 | |
| 193 <div class="thumbs-up-down"> | |
| 194 <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> | |
| 195 <div class="triage thumb-down" result_property="suspected_cls"><img sr c="https://www.gstatic.com/images/icons/material/system/1x/thumb_down_black_24dp .png"/> Incorrect</div> | |
| 196 </div> | |
| 197 </div> | |
| 198 {% endif %} | |
| 199 {% endif %} | |
| 200 | |
| 201 {% if suspected_cls_triage_history %} | |
| 202 Suspected cls triage history: | |
| 203 <div> | |
| 204 <table> | |
| 205 <tr><th>When</th><th>Who</th><th>Result</th></tr> | |
| 206 <tbody> | |
| 207 {% for triage_record in suspected_cls_triage_history %} | |
| 208 <tr> | |
| 209 <td>{{triage_record.triage_time}}</td> | |
| 210 <td>{{triage_record.user_name}}</td> | |
| 211 <td>{{triage_record.suspected_cls_triage_status}}</td> | |
| 212 </tr> | |
| 213 {% endfor %} | |
| 214 </tbody> | |
| 215 </table> | |
| 216 </div> | |
| 217 {% endif %} | |
| 218 | |
| 219 <br> | |
| 220 {% if suspected_project %} | |
| 221 <b> Suspected project: </b> {{suspected_project}} | |
| 222 <br> | |
| 223 <div class="thumbs-up-down"> | |
| 224 <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> | |
| 225 <div class="triage thumb-down" result_property="suspected_project"><img sr c="https://www.gstatic.com/images/icons/material/system/1x/thumb_down_black_24dp .png"/> Incorrect</div> | |
| 226 </div> | |
| 227 {% endif %} | |
| 228 | |
| 229 <br><br> | |
| 230 {% if suspected_components %} | |
| 231 <b> Suspected components:</b> | |
| 232 <br> | |
| 233 {% for component in suspected_components %} | |
| 234 <li> | |
| 235 {{component}} | |
| 236 </li> | |
| 237 {% endfor %} | |
| 238 <div class="thumbs-up-down"> | |
| 239 <div class="triage thumb-up" result_property="suspected_components">Correc t <img src="https://www.gstatic.com/images/icons/material/system/1x/thumb_up_bla ck_24dp.png"/></div> | |
| 240 <div class="triage thumb-down" result_property="suspected_components"><img src="https://www.gstatic.com/images/icons/material/system/1x/thumb_down_black_2 4dp.png"/> Incorrect</div> | |
| 241 </div> | |
| 242 {% endif %} | |
| 243 | |
| 244 <div> | |
| 245 <form> | |
| 246 <br><br> | |
| 247 Note: | |
| 248 <input type="text" id="note" value={{ note }}></input> | |
| 249 <input type="submit" id="note-submit"> | |
| 250 </form> | |
| 251 </div> | |
| 252 | |
| 253 | |
| 254 </body> | |
| OLD | NEW |