Chromium Code Reviews| 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(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 'fracas-dashboard'; | |
| 18 } else { | |
| 19 return 'fracas-dashboard?' + params.join('&'); | |
| 20 } | |
| 21 }; | |
| 22 | |
| 23 function requestDataBetweenDateRange(e) { | |
| 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 newUrl = createUrl(parameters); | |
| 32 window.location.replace(newUrl); | |
|
stgao
2016/06/08 17:53:45
As this will refresh the page, can we just submit
Sharu Jiang
2016/06/09 06:13:28
Will fix this in next patch :)
| |
| 33 e.preventDefault(); | |
| 34 }; | |
| 35 | |
| 36 $(document).ready(function() { | |
| 37 $('#submit').click(requestDataBetweenDateRange); | |
| 38 if ('{{found_suspects}}' != '-1') { | |
| 39 $('#found_suspects').val('{{found_suspects}}'); | |
| 40 } | |
| 41 if ('{{has_regression_range}}' != '-1') { | |
| 42 $('#has_regression_range').val('{{has_regression_range}}'); | |
| 43 } | |
| 44 if ('{{suspected_cls_triage_status}}' != '-1') { | |
| 45 $('#suspected_cls_triage_status').val('{{suspected_cls_triage_status}}') ; | |
| 46 } | |
| 47 if ('{{regression_range_triage_status}}' != '-1') { | |
| 48 $('#regression_range_triage_status').val('{{regression_range_triage_stat us}}'); | |
| 49 } | |
| 50 }); | |
| 51 </script> | |
| 52 </head> | |
| 53 <body> | |
| 54 <form> | |
| 55 Start Date | |
| 56 <input type="date" id="start_date" value={{ start_date }}></input> | |
| 57 End Date | |
| 58 <input type="date" id="end_date" value={{ end_date }}></input> | |
| 59 | |
| 60 Found suspects | |
| 61 <select id="found_suspects" class=select_filter> | |
| 62 <option value="default"></option> | |
| 63 <option value="1">True</option> | |
| 64 <option value="0">False</option> | |
| 65 </select> | |
| 66 | |
| 67 Has regression range | |
| 68 <select id="has_regression_range" class=select_filter> | |
| 69 <option value="default"></option> | |
| 70 <option value="1">True</option> | |
| 71 <option value="0">False</option> | |
| 72 </select> | |
| 73 | |
| 74 Suspects triaged? | |
| 75 <select id="suspected_cls_triage_status" class=select_filter> | |
|
stgao
2016/06/08 17:53:45
Where is the style definition for "select_filter"?
Sharu Jiang
2016/06/09 06:13:28
Done.
| |
| 76 <option value="default"></option> | |
| 77 <option value="triaged">Triaged</option> | |
| 78 <option value="triaged-correct">Triaged-Correct</option> | |
| 79 <option value="triaged-incorrect">Triaged-Incorrect</option> | |
| 80 <option value="untriaged">Untriaged</option> | |
| 81 </select> | |
| 82 | |
| 83 Regressoin range triaged? | |
| 84 <select id="regression_range_triage_status" class=select_filter> | |
| 85 <option value="default"></option> | |
| 86 <option value="triaged">Triaged</option> | |
| 87 <option value="triaged-correct">Triaged-Correct</option> | |
| 88 <option value="triaged-incorrect">Triaged-Incorrect</option> | |
| 89 <option value="untriaged">Untriaged</option> | |
| 90 </select> | |
| 91 | |
| 92 <input type="submit" id="submit"></input> | |
| 93 </form> | |
| 94 <br> | |
| 95 <div> | |
| 96 <table> | |
| 97 <tr> | |
| 98 <th>Signature</th> | |
| 99 <th>Version</th> | |
| 100 <th>Channel</th> | |
| 101 <th>Platform</th> | |
| 102 <th>Regression range</th> | |
| 103 <th>Suspected cls</th> | |
| 104 <th>Suspected project</th> | |
| 105 <th>Suspected components</th> | |
| 106 </tr> | |
| 107 <tbody> | |
| 108 {% for fracas_crash in fracas_crashes %} | |
| 109 <tr> | |
| 110 <td> | |
| 111 <a href="fracas-result-feedback?crash_identifiers={{fracas_crash .crash_identifiers}}" target="_blank">{{fracas_crash.signature}}</a> | |
| 112 </td> | |
| 113 <td> | |
| 114 <a href="https://chromium.googlesource.com/chromium/src.git/+/{{ fracas_crash.version}}" target="_blank">{{fracas_crash.version}}</a> | |
| 115 </td> | |
| 116 <td>{{ fracas_crash.channel }}</td> | |
| 117 <td>{{ fracas_crash.platform }}</td> | |
| 118 <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_ran ge[1] }}</td> | |
| 119 <td> | |
| 120 {% if fracas_crash.suspected_cls %} | |
| 121 {% for suspected_cl in fracas_crash.suspected_cls %} | |
| 122 <li> | |
| 123 <a href="{{suspected_cl.url}}">{{suspected_cl.revision}}</a> | |
| 124 </li> | |
| 125 {% endfor %} | |
| 126 {% endif %} | |
| 127 </td> | |
| 128 <td>{{ fracas_crash.suspected_project }}</td> | |
| 129 <td> | |
| 130 {% if fracas_crash.suspected_components %} | |
| 131 {% for component in fracas_crash.suspected_components %} | |
| 132 <li>{{component}}</li> | |
| 133 {% endfor %} | |
| 134 {% endif %} | |
| 135 </td> | |
| 136 </tr> | |
| 137 {% endfor %} | |
| 138 </tbody> | |
| 139 </table> | |
| 140 </div> | |
| 141 </body> | |
| OLD | NEW |