Skip to content

Commit

Permalink
Merge pull request mozilla-services#372 from rhelmer/bug881629-report…
Browse files Browse the repository at this point in the history
…-dropdown-resets-version

bug 881629 - report dropdown should not reset version
  • Loading branch information
rhelmer committed Jun 20, 2013
2 parents 3d7fb8b + fecd01d commit 7b26f4b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
11 changes: 6 additions & 5 deletions crashstats/base/templates/crashstats_base.html
Expand Up @@ -101,15 +101,16 @@ <h1>Product Navigation</h1>
<label for="report_select">Report:</label>
<select id="report_select" >
<optgroup label=" ">
<option value="{{ url('crashstats.home', product) }}" {% if report == 'products' %}selected{% endif %}>Overview</option>
<option value="{% if version %} {{ url('crashstats.home', product, version) }} {% else %} {{ url('crashstats.home', product) }} {% endif %}" {% if report == 'products' %}selected{% endif %}>Overview</option>
</optgroup>
<optgroup label=" ">
<option value="{{ url('crashstats.daily') }}?p={{ product }}" {% if report == 'daily' %}selected{% endif %}>Crashes per User</option>
<option value="{{ url('crashstats.builds', product) }}" {% if report == 'builds' %}selected{% endif %}>Nightly Builds</option>
<option value="{% if version %} {{ url('crashstats.daily') }}?p={{ product }}&v={{ version }} {% else %} {{ url('crashstats.daily') }}?p={{ product }} {% endif %}" {% if report == 'daily' %}selected{% endif %}>Crashes per User</option>
<option value="{% if version %} {{ url('crashstats.builds', product, version) }} {% else %} {{ url('crashstats.builds', product) }} {% endif %}" {% if report == 'builds' %}selected{% endif %}>Nightly Builds</option>
</optgroup>
<optgroup label=" ">
<option value="{{ url('crashstats.topchangers', product) }}" {% if report == 'topchangers' %}selected{% endif %}>Top Changers</option>
<option value="{{ url('crashstats.topcrasher', product) }}" {% if report == 'topcrasher' %}selected{% endif %}>Top Crashers</option>
<option value="{% if version %} {{ url('crashstats.topchangers', product, version) }} {% else %} {{ url('crashstats.topchangers', product) }} {% endif %}" {% if report == 'topchangers' %}selected{% endif %}>Top Changers</option>
<option value="{% if version %} {{ url('crashstats.topcrasher', product, version) }} {% else %} {{ url('crashstats.topcrasher', product) }} {% endif %}" {% if report == 'topcrasher' %}selected{% endif %}>Top Crashers</option>
<option value="{% if version %} {{ url('crashstats.crash_trends', product, version) }} {% else %} {{ url('crashstats.crash_trends', product) }} {% endif %}">Crash Trends</option>
{% if request.user.is_authenticated() %}
<option value="{{ url('crashstats.exploitable_crashes') }}">Exploitable Crashes</option>
{% endif %}
Expand Down
10 changes: 1 addition & 9 deletions crashstats/crashstats/static/crashstats/js/socorro/nav.js
Expand Up @@ -17,15 +17,7 @@ $(document).ready(function () {
product_version = $("#product_version_select").val();
report = $("#report_select").val();
product = $("#products_select").val();
if (product_version === 'Current Versions') {
window.location = report;
} else if (report.indexOf('/daily') === 0) {
// FIXME interferes with this report's built-in multi-select
window.location = '/home/products/' + product +
'/versions/' + product_version;
} else {
window.location = report + '/versions/' + product_version;
}
window.location = report;
});
}

Expand Down

0 comments on commit 7b26f4b

Please sign in to comment.