Skip to content

Commit

Permalink
Merge pull request #1424 from brandonsavage/adibug
Browse files Browse the repository at this point in the history
Bug 812282 - Switching out ADU for ADI in the UI.
  • Loading branch information
brandonsavage committed Aug 21, 2013
2 parents 3145548 + 9459b95 commit 4aa37da
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
Expand Up @@ -27,8 +27,8 @@ <h2>Select a Report</h2>
<div class="body daily_search_body">
<div id="daily_search">
<div id="daily_search_version">
<h3><a href="#" id="click_by_version">Crashes per ADU by Version</a></h3>
<p>All ADU ratios are generated per 100 ADUs, not per single ADU. "3.5 crashes/ADU" means that there are 3.5 crashes per 100 users, not per user. This ratio also does not distinguish between users who crash multiple times and multiple crashing users.</p>
<h3><a href="#" id="click_by_version">Crashes per ADI by Version</a></h3>
<p>All ADI ratios are generated per 100 ADIs, not per single ADI. "3.5 crashes/ADI" means that there are 3.5 crashes per 100 users, not per user. This ratio also does not distinguish between users who crash multiple times and multiple crashing users.</p>
<form id="daily_search_version_form" name="daily_search_version_form" action="{{ url('crashstats.daily') }}" {% if form_selection != 'by_version' %} style="display: none"{% endif %}>

<input type="hidden" name="form_selection" value="by_version">
Expand Down Expand Up @@ -145,7 +145,7 @@ <h3><a href="#" id="click_by_version">Crashes per ADU by Version</a></h3>
</div>

<div id="daily_search_os">
<h3><a href="#" id="click_by_os">Crashes per ADU by O/S</a></h3>
<h3><a href="#" id="click_by_os">Crashes per ADI by O/S</a></h3>
<form id="daily_search_os_form" action="{{ url('crashstats.daily') }}" {% if form_selection != 'by_os' %} style="display: none"{% endif %}>
<input type="hidden" name="form_selection" value="by_os">

Expand Down Expand Up @@ -240,7 +240,7 @@ <h3><a href="#" id="click_by_os">Crashes per ADU by O/S</a></h3>

<div class="panel daily_graph">
<div class="title">
<h2>Crashes per 100 ADUs</h2>
<h2>Crashes per 100 ADIs</h2>
</div>

<div class="body">
Expand All @@ -254,7 +254,7 @@ <h2>Crashes per 100 ADUs</h2>

<div class="panel daily_">
<div class="title">
<h2>Crashes per ADU</h2>
<h2>Crashes per ADI</h2>
<div class="choices">
<ul>
{% if request.META.get('QUERY_STRING') %}
Expand Down Expand Up @@ -285,14 +285,14 @@ <h2>Crashes per ADU</h2>
{% if form_selection == 'by_version' %}
{% for version in versions|reverse %}
<th class="stat">Crashes</th>
<th class="stat">ADU</th>
<th class="stat">ADI</th>
<th class="stat" title="The throttle rate is the effective throttle rate - the combined throttle rate for client-side throttling and server-side throttling.">Throttle</th>
<th class="stat">Ratio</th>
{% endfor %}
{% else %}
{% for os in os_names %}
<th class="stat">Crashes</th>
<th class="stat">ADU</th>
<th class="stat">ADI</th>
<th class="stat" title="The throttle rate is the effective throttle rate - the combined throttle rate for client-side throttling and server-side throttling.">Throttle</th>
<th class="stat">Ratio</th>
{% endfor %}
Expand Down
8 changes: 4 additions & 4 deletions webapp-django/crashstats/crashstats/tests/test_views.py
Expand Up @@ -1006,11 +1006,11 @@ def mocked_get(url, **options):
eq_(head_row[0], 'Date')
eq_(head_row[1:], [
'WaterWolf 20.0 Crashes',
'WaterWolf 20.0 ADU',
'WaterWolf 20.0 ADI',
'WaterWolf 20.0 Throttle',
'WaterWolf 20.0 Ratio',
'WaterWolf 19.0 Crashes',
'WaterWolf 19.0 ADU',
'WaterWolf 19.0 ADI',
'WaterWolf 19.0 Throttle',
'WaterWolf 19.0 Ratio'
])
Expand Down Expand Up @@ -1133,11 +1133,11 @@ def mocked_platforms_get():
eq_(head_row[0], 'Date')
eq_(head_row[1:], [
'WaterWolf 20.0 on Windows Crashes',
'WaterWolf 20.0 on Windows ADU',
'WaterWolf 20.0 on Windows ADI',
'WaterWolf 20.0 on Windows Throttle',
'WaterWolf 20.0 on Windows Ratio',
'WaterWolf 20.0 on Amiga Crashes',
'WaterWolf 20.0 on Amiga ADU',
'WaterWolf 20.0 on Amiga ADI',
'WaterWolf 20.0 on Amiga Throttle',
'WaterWolf 20.0 on Amiga Ratio'
])
Expand Down
6 changes: 3 additions & 3 deletions webapp-django/crashstats/crashstats/views.py
Expand Up @@ -549,15 +549,15 @@ def daily(request, default_context=None):
def _render_daily_csv(request, data, product, versions, platforms, os_names,
form_selection):
response = http.HttpResponse(mimetype='text/csv', content_type='text/csv')
title = 'ADU_' + product + '_' + '_'.join(versions) + '_' + form_selection
title = 'ADI_' + product + '_' + '_'.join(versions) + '_' + form_selection
response['Content-Disposition'] = (
'attachment; filename="%s.csv"' % title
)
writer = utils.UnicodeWriter(response)
head_row = ['Date']
labels = (
('report_count', 'Crashes'),
('adu', 'ADU'),
('adu', 'ADI'),
('throttle', 'Throttle'),
('crash_hadu', 'Ratio'),
)
Expand Down Expand Up @@ -644,7 +644,7 @@ def append_row_blob(blob, labels):
# add the totals
totals_labels = (
('crashes', 'Crashes'),
('adu', 'ADU'),
('adu', 'ADI'),
('throttle', 'Throttle'),
('ratio', 'Ratio'),
)
Expand Down

0 comments on commit 4aa37da

Please sign in to comment.