| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <head> |
| 3 <title>Fracas Dashboard</title> |
| 4 <meta charset="utf-8"> |
| 5 <link rel="stylesheet" href="/common.css"> |
| 6 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js
"></script> |
| 7 <script> |
| 8 function createUrl(base_url, parameters) { |
| 9 var params = []; |
| 10 for (var key in parameters) { |
| 11 if (parameters[key] != undefined) { |
| 12 params.push(key + '=' + parameters[key]) |
| 13 } |
| 14 } |
| 15 |
| 16 if (params.length == 0) { |
| 17 return base_url; |
| 18 } else { |
| 19 return base_url + '?' + params.join('&'); |
| 20 } |
| 21 }; |
| 22 |
| 23 function getFiltersUrl() { |
| 24 var parameters = {} |
| 25 parameters['start_date'] = $('#start_date').val() == 'mm/dd/yyyy' ? undefi
ned : $('#start_date').val(); |
| 26 parameters['end_date'] = $('#end_date').val() == 'mm/dd/yyyy' ? undefined
: $('#end_date').val(); |
| 27 parameters['found_suspects'] = $('#found_suspects').val() == 'default' ? u
ndefined : $('#found_suspects').val(); |
| 28 parameters['has_regression_range'] = $('#has_regression_range').val() == '
default' ? undefined : $('#has_regression_range').val(); |
| 29 parameters['suspected_cls_triage_status'] = $('#suspected_cls_triage_statu
s').val() == 'default' ? undefined : $('#suspected_cls_triage_status').val(); |
| 30 parameters['regression_range_triage_status'] = $('#regression_range_triage
_status').val() == 'default' ? undefined : $('#regression_range_triage_status').
val(); |
| 31 return createUrl('fracas-dashboard', parameters); |
| 32 }; |
| 33 |
| 34 $(document).ready(function() { |
| 35 $('#submit').click(function(e) { |
| 36 e.preventDefault(); |
| 37 var new_url = getFiltersUrl(); |
| 38 $('#dashboard-table').load(new_url + ' #dashboard-table'); |
| 39 //Replaces the url of this page with new url without refreshing page. |
| 40 history.pushState({}, null, new_url); |
| 41 }); |
| 42 if ('{{found_suspects}}' != '-1') { |
| 43 $('#found_suspects').val('{{found_suspects}}'); |
| 44 } |
| 45 if ('{{has_regression_range}}' != '-1') { |
| 46 $('#has_regression_range').val('{{has_regression_range}}'); |
| 47 } |
| 48 if ('{{suspected_cls_triage_status}}' != '-1') { |
| 49 $('#suspected_cls_triage_status').val('{{suspected_cls_triage_status}}')
; |
| 50 } |
| 51 if ('{{regression_range_triage_status}}' != '-1') { |
| 52 $('#regression_range_triage_status').val('{{regression_range_triage_stat
us}}'); |
| 53 } |
| 54 }); |
| 55 </script> |
| 56 </head> |
| 57 <body> |
| 58 <form> |
| 59 Start Date |
| 60 <input type="date" id="start_date" value={{start_date}}></input> |
| 61 End Date |
| 62 <input type="date" id="end_date" value={{end_date}}></input> |
| 63 |
| 64 Found suspects |
| 65 <select id="found_suspects"> |
| 66 <option value="default"></option> |
| 67 <option value="yes">True</option> |
| 68 <option value="no">False</option> |
| 69 </select> |
| 70 |
| 71 Has regression range |
| 72 <select id="has_regression_range"> |
| 73 <option value="default"></option> |
| 74 <option value="yes">True</option> |
| 75 <option value="no">False</option> |
| 76 </select> |
| 77 |
| 78 Suspects triaged? |
| 79 <select id="suspected_cls_triage_status"> |
| 80 <option value="default"></option> |
| 81 <option value="0">Untriaged</option> |
| 82 <option value="1">Triaged-Incorrect</option> |
| 83 <option value="2">Triaged-Correct</option> |
| 84 <option value="3">Triaged-Unsure</option> |
| 85 </select> |
| 86 |
| 87 Regressoin range triaged? |
| 88 <select id="regression_range_triage_status"> |
| 89 <option value="default"></option> |
| 90 <option value="0">Untriaged</option> |
| 91 <option value="1">Triaged-Incorrect</option> |
| 92 <option value="2">Triaged-Correct</option> |
| 93 <option value="3">Triaged-Unsure</option> |
| 94 </select> |
| 95 |
| 96 <input type="submit" id="submit" value="Filter"></input> |
| 97 </form> |
| 98 |
| 99 <br> |
| 100 <div id="dashboard-table"> |
| 101 <table> |
| 102 <tr> |
| 103 <th>Signature</th> |
| 104 <th>Version</th> |
| 105 <th>Channel</th> |
| 106 <th>Platform</th> |
| 107 <th>Regression range</th> |
| 108 <th>Suspected cls</th> |
| 109 <th>Suspected project</th> |
| 110 <th>Suspected components</th> |
| 111 </tr> |
| 112 <tbody> |
| 113 {% for fracas_crash in fracas_crashes %} |
| 114 <tr> |
| 115 <td> |
| 116 <a href="./fracas-result-feedback?key={{fracas_crash.key}}" target
="_blank">{{fracas_crash.signature}}</a> |
| 117 </td> |
| 118 <td> |
| 119 <a href="https://chromium.googlesource.com/chromium/src.git/+/{{fr
acas_crash.version}}" target="_blank">{{fracas_crash.version}}</a> |
| 120 </td> |
| 121 <td>{{ fracas_crash.channel }}</td> |
| 122 <td>{{ fracas_crash.platform }}</td> |
| 123 {% if fracas_crash.regression_range %} |
| 124 <td><a href="https://chromium.googlesource.com/chromium/src/+log/{
{fracas_crash.regression_range[0]}}..{{fracas_crash.regression_range[1]}}?pretty
=fuller">{{fracas_crash.regression_range[0]}} : {{fracas_crash.regression_range[
1]}}</td> |
| 125 {% else %} |
| 126 <td></td> |
| 127 {% endif %} |
| 128 <td> |
| 129 {% if fracas_crash.suspected_cls %} |
| 130 {% for suspected_cl in fracas_crash.suspected_cls %} |
| 131 <li> |
| 132 <a href="{{suspected_cl.url}}">{{suspected_cl.revision}}</a> |
| 133 </li> |
| 134 {% endfor %} |
| 135 {% endif %} |
| 136 </td> |
| 137 <td>{{ fracas_crash.suspected_project }}</td> |
| 138 <td> |
| 139 {% if fracas_crash.suspected_components %} |
| 140 {% for component in fracas_crash.suspected_components %} |
| 141 <li>{{component}}</li> |
| 142 {% endfor %} |
| 143 {% endif %} |
| 144 </td> |
| 145 </tr> |
| 146 {% endfor %} |
| 147 </tbody> |
| 148 </table> |
| 149 </div> |
| 150 </body> |
| OLD | NEW |