Chromium Code Reviews| Index: appengine/findit/templates/crash/fracas_dashboard.html |
| diff --git a/appengine/findit/templates/crash/fracas_dashboard.html b/appengine/findit/templates/crash/fracas_dashboard.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..42825c0d245311e5df18d780bfdacfb5c5ee86e3 |
| --- /dev/null |
| +++ b/appengine/findit/templates/crash/fracas_dashboard.html |
| @@ -0,0 +1,141 @@ |
| +<!DOCTYPE html> |
| +<head> |
| + <title>Fracas Dashboard</title> |
| + <meta charset="utf-8"> |
| + <link rel="stylesheet" href="/common.css"> |
| + <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> |
| + <script> |
| + function createUrl(parameters) { |
| + var params = []; |
| + for (var key in parameters) { |
| + if (parameters[key] != undefined) { |
| + params.push(key + '=' + parameters[key]) |
| + } |
| + } |
| + |
| + if (params.length == 0) { |
| + return 'fracas-dashboard'; |
| + } else { |
| + return 'fracas-dashboard?' + params.join('&'); |
| + } |
| + }; |
| + |
| + function requestDataBetweenDateRange(e) { |
| + var parameters = {} |
| + parameters['start_date'] = $('#start_date').val() == 'mm/dd/yyyy' ? undefined : $('#start_date').val(); |
| + parameters['end_date'] = $('#end_date').val() == 'mm/dd/yyyy' ? undefined : $('#end_date').val(); |
| + parameters['found_suspects'] = $('#found_suspects').val() == 'default' ? undefined : $('#found_suspects').val(); |
| + parameters['has_regression_range'] = $('#has_regression_range').val() == 'default' ? undefined : $('#has_regression_range').val(); |
| + parameters['suspected_cls_triage_status'] = $('#suspected_cls_triage_status').val() == 'default' ? undefined : $('#suspected_cls_triage_status').val(); |
| + parameters['regression_range_triage_status'] = $('#regression_range_triage_status').val() == 'default' ? undefined : $('#regression_range_triage_status').val(); |
| + newUrl = createUrl(parameters); |
| + 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 :)
|
| + e.preventDefault(); |
| + }; |
| + |
| + $(document).ready(function() { |
| + $('#submit').click(requestDataBetweenDateRange); |
| + if ('{{found_suspects}}' != '-1') { |
| + $('#found_suspects').val('{{found_suspects}}'); |
| + } |
| + if ('{{has_regression_range}}' != '-1') { |
| + $('#has_regression_range').val('{{has_regression_range}}'); |
| + } |
| + if ('{{suspected_cls_triage_status}}' != '-1') { |
| + $('#suspected_cls_triage_status').val('{{suspected_cls_triage_status}}'); |
| + } |
| + if ('{{regression_range_triage_status}}' != '-1') { |
| + $('#regression_range_triage_status').val('{{regression_range_triage_status}}'); |
| + } |
| + }); |
| + </script> |
| +</head> |
| +<body> |
| + <form> |
| + Start Date |
| + <input type="date" id="start_date" value={{ start_date }}></input> |
| + End Date |
| + <input type="date" id="end_date" value={{ end_date }}></input> |
| + |
| + Found suspects |
| + <select id="found_suspects" class=select_filter> |
| + <option value="default"></option> |
| + <option value="1">True</option> |
| + <option value="0">False</option> |
| + </select> |
| + |
| + Has regression range |
| + <select id="has_regression_range" class=select_filter> |
| + <option value="default"></option> |
| + <option value="1">True</option> |
| + <option value="0">False</option> |
| + </select> |
| + |
| + Suspects triaged? |
| + <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.
|
| + <option value="default"></option> |
| + <option value="triaged">Triaged</option> |
| + <option value="triaged-correct">Triaged-Correct</option> |
| + <option value="triaged-incorrect">Triaged-Incorrect</option> |
| + <option value="untriaged">Untriaged</option> |
| + </select> |
| + |
| + Regressoin range triaged? |
| + <select id="regression_range_triage_status" class=select_filter> |
| + <option value="default"></option> |
| + <option value="triaged">Triaged</option> |
| + <option value="triaged-correct">Triaged-Correct</option> |
| + <option value="triaged-incorrect">Triaged-Incorrect</option> |
| + <option value="untriaged">Untriaged</option> |
| + </select> |
| + |
| + <input type="submit" id="submit"></input> |
| + </form> |
| + <br> |
| + <div> |
| + <table> |
| + <tr> |
| + <th>Signature</th> |
| + <th>Version</th> |
| + <th>Channel</th> |
| + <th>Platform</th> |
| + <th>Regression range</th> |
| + <th>Suspected cls</th> |
| + <th>Suspected project</th> |
| + <th>Suspected components</th> |
| + </tr> |
| + <tbody> |
| + {% for fracas_crash in fracas_crashes %} |
| + <tr> |
| + <td> |
| + <a href="fracas-result-feedback?crash_identifiers={{fracas_crash.crash_identifiers}}" target="_blank">{{fracas_crash.signature}}</a> |
| + </td> |
| + <td> |
| + <a href="https://chromium.googlesource.com/chromium/src.git/+/{{fracas_crash.version}}" target="_blank">{{fracas_crash.version}}</a> |
| + </td> |
| + <td>{{ fracas_crash.channel }}</td> |
| + <td>{{ fracas_crash.platform }}</td> |
| + <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> |
| + <td> |
| + {% if fracas_crash.suspected_cls %} |
| + {% for suspected_cl in fracas_crash.suspected_cls %} |
| + <li> |
| + <a href="{{suspected_cl.url}}">{{suspected_cl.revision}}</a> |
| + </li> |
| + {% endfor %} |
| + {% endif %} |
| + </td> |
| + <td>{{ fracas_crash.suspected_project }}</td> |
| + <td> |
| + {% if fracas_crash.suspected_components %} |
| + {% for component in fracas_crash.suspected_components %} |
| + <li>{{component}}</li> |
| + {% endfor %} |
| + {% endif %} |
| + </td> |
| + </tr> |
| + {% endfor %} |
| + </tbody> |
| + </table> |
| + </div> |
| +</body> |