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..fb0d883456535f7357e49e4a590c5ee501608d40 |
| --- /dev/null |
| +++ b/appengine/findit/templates/crash/fracas_dashboard.html |
| @@ -0,0 +1,149 @@ |
| +<!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 getFiltersUrl() { |
| + 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(); |
| + return createUrl(parameters); |
| + }; |
| + |
| + $(document).ready(function() { |
| + $('#submit').click(function(e) { |
| + e.preventDefault(); |
| + var new_url = getFiltersUrl(); |
| + $('#dashboard-table').load(new_url + ' #dashboard-table'); |
| + history.pushState({}, null, new_url); |
|
stgao
2016/06/24 00:49:07
If the purpose of this is to preserve the filter s
Sharu Jiang
2016/06/28 00:11:46
The 'GET' will refresh the page, right? I think th
stgao
2016/06/28 16:40:21
Line #38 above does a http get too. I don't think
|
| + }); |
| + 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"> |
| + <option value="default"></option> |
| + <option value="1">True</option> |
|
stgao
2016/06/24 00:49:07
Yes/No instead? Same below.
Sharu Jiang
2016/06/28 00:11:46
Done.
|
| + <option value="0">False</option> |
| + </select> |
| + |
| + Has regression range |
| + <select id="has_regression_range"> |
| + <option value="default"></option> |
| + <option value="1">True</option> |
| + <option value="0">False</option> |
| + </select> |
| + |
| + Suspects triaged? |
| + <select id="suspected_cls_triage_status"> |
| + <option value="default"></option> |
| + <option value="0">Untriaged</option> |
| + <option value="1">Triaged-Incorrect</option> |
| + <option value="2">Triaged-Correct</option> |
| + <option value="3">Triaged-Unsure</option> |
| + </select> |
| + |
| + Regressoin range triaged? |
| + <select id="regression_range_triage_status"> |
| + <option value="default"></option> |
| + <option value="0">Untriaged</option> |
| + <option value="1">Triaged-Incorrect</option> |
| + <option value="2">Triaged-Correct</option> |
| + <option value="3">Triaged-Unsure</option> |
| + </select> |
| + |
| + <input type="submit" id="submit" value="Submit Filters"></input> |
|
stgao
2016/06/24 00:49:07
Just "Filter" or "Refresh"?
Sharu Jiang
2016/06/28 00:11:46
Done.
|
| + </form> |
| + |
| + <br> |
| + <div id="dashboard-table"> |
| + <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?key={{fracas_crash.key}}" 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> |
| + {% if fracas_crash.regression_range %} |
| + <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> |
| + {% else %} |
| + <td></td> |
| + {% endif %} |
| + <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> |