From 0b60f11cf8ba81ad35305d127af1b10ba5ab5aa8 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 7 Jul 2017 18:31:47 -0700 Subject: [PATCH] analytics: Display Zulip Electron app as the main desktop app. This should make the /stats data significantly clearer. --- analytics/tests/test_views.py | 2 ++ analytics/views.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/analytics/tests/test_views.py b/analytics/tests/test_views.py index fe4fac5684..ec09782f8c 100644 --- a/analytics/tests/test_views.py +++ b/analytics/tests/test_views.py @@ -309,6 +309,7 @@ class TestMapArrays(ZulipTestCase): 'desktop app 3.0': [21, 22, 23], 'website': [1, 2, 3], 'ZulipiOS': [1, 2, 3], + 'ZulipElectron': [2, 5, 7], 'ZulipMobile': [1, 5, 7], 'ZulipPython': [1, 2, 3], 'API: Python': [1, 2, 3], @@ -319,6 +320,7 @@ class TestMapArrays(ZulipTestCase): self.assertEqual(result, {'Old desktop app': [32, 36, 39], 'Old iOS app': [1, 2, 3], + 'Desktop app': [2, 5, 7], 'Mobile app': [1, 5, 7], 'Website': [1, 2, 3], 'Python API': [2, 4, 6], diff --git a/analytics/views.py b/analytics/views.py index 7d80eda624..3bf155abe6 100644 --- a/analytics/views.py +++ b/analytics/views.py @@ -158,6 +158,8 @@ def client_label_map(name): return "Website" if name.startswith("desktop app"): return "Old desktop app" + if name == "ZulipElectron": + return "Desktop app" if name == "ZulipAndroid": return "Android app" if name == "ZulipiOS":