Remove prefix for Fenix versions (#15716)
This commit is contained in:
Родитель
68ae44c4e8
Коммит
3cfd73550f
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 2.2.13 on 2020-07-27 08:43
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def delete_waffle_switch(apps, schema_editor):
|
||||
Switch = apps.get_model("waffle", "Switch")
|
||||
|
||||
Switch.objects.filter(name="use-fenix-build-ids").delete()
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("stats", "0008_auto_20201007_0839"),
|
||||
]
|
||||
|
||||
operations = [migrations.RunPython(delete_waffle_switch)]
|
|
@ -116,7 +116,6 @@
|
|||
data-start_date="{{ view.start }}"
|
||||
data-end_date="{{ view.end }}"
|
||||
{% endif %}
|
||||
data-use-fenix-build-ids="{{ use_fenix_build_ids }}"
|
||||
data-base_url="{{ stats_base_url }}">
|
||||
<div class="island chart">
|
||||
<div id="head-chart">
|
||||
|
|
|
@ -8,7 +8,6 @@ from unittest import mock
|
|||
from django.http import Http404
|
||||
from django.test.client import RequestFactory
|
||||
from django.utils.encoding import force_text
|
||||
from waffle.testutils import override_switch
|
||||
|
||||
from olympia import amo
|
||||
from olympia.access.models import Group, GroupUser
|
||||
|
@ -1130,22 +1129,6 @@ class TestStatsWithBigQuery(TestCase):
|
|||
assert b'Download campaigns by Date' in response.content
|
||||
assert b'About tracking external sources' in response.content
|
||||
|
||||
@override_switch('use-fenix-build-ids', active=True)
|
||||
def test_fenix_build_ids(self):
|
||||
url = reverse('stats.apps', args=[self.addon.slug])
|
||||
|
||||
response = self.client.get(url)
|
||||
|
||||
assert b'data-use-fenix-build-ids="True"' in response.content
|
||||
|
||||
@override_switch('use-fenix-build-ids', active=False)
|
||||
def test_no_fenix_build_ids(self):
|
||||
url = reverse('stats.apps', args=[self.addon.slug])
|
||||
|
||||
response = self.client.get(url)
|
||||
|
||||
assert b'data-use-fenix-build-ids="False"' in response.content
|
||||
|
||||
|
||||
class TestProcessLocales(TestCase):
|
||||
def test_performs_lowercase_lookup(self):
|
||||
|
|
|
@ -5,8 +5,6 @@ import itertools
|
|||
|
||||
from datetime import timedelta
|
||||
|
||||
import waffle
|
||||
|
||||
from dateutil.parser import parse
|
||||
from django import http
|
||||
from django.core.exceptions import PermissionDenied
|
||||
|
@ -365,9 +363,6 @@ def stats_report(request, addon, report):
|
|||
'report': report,
|
||||
'stats_base_url': stats_base_url,
|
||||
'view': view,
|
||||
'use_fenix_build_ids': (
|
||||
waffle.switch_is_active('use-fenix-build-ids')
|
||||
),
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@ z.StatsManager = (function () {
|
|||
|
||||
var $primary = $('.primary');
|
||||
|
||||
var useFenixBuildIDs = $primary.data('use-fenix-build-ids') === 'True';
|
||||
|
||||
var storage = z.Storage('stats'),
|
||||
storageCache = z.SessionStorage('statscache'),
|
||||
dataStore = {},
|
||||
|
@ -532,17 +530,9 @@ z.StatsManager = (function () {
|
|||
key = parts[0];
|
||||
parts = parts.slice(1);
|
||||
|
||||
// Fenix app versions are build IDs so we need a prefix for end users.
|
||||
var versionPrefix =
|
||||
metric === 'apps' &&
|
||||
key === '{aa3c5121-dab2-40e2-81ca-7ea25febc110}' &&
|
||||
useFenixBuildIDs
|
||||
? 'Build #'
|
||||
: '';
|
||||
|
||||
if (metric in csv_keys) {
|
||||
if (key in csv_keys[metric]) {
|
||||
return csv_keys[metric][key] + ' ' + versionPrefix + parts.join(' ');
|
||||
return csv_keys[metric][key] + ' ' + parts.join(' ');
|
||||
}
|
||||
}
|
||||
return field;
|
||||
|
|
Загрузка…
Ссылка в новой задаче