mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	analytics: Update "Messages sent by client" chart for Flutter app.
Updates the labels in the "Messages sent by client" analytics chart for the user-agent/client names for the Flutter mobile app, which can be "ZulipFlutter" or "ZulipMobile/flutter". Fixes #28220.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							aa84080ad6
						
					
				
				
					commit
					5892e48ba4
				
			@@ -285,6 +285,7 @@ class Command(ZulipBaseCommand):
 | 
			
		||||
        android, created = Client.objects.get_or_create(name="ZulipAndroid")
 | 
			
		||||
        iOS, created = Client.objects.get_or_create(name="ZulipiOS")
 | 
			
		||||
        react_native, created = Client.objects.get_or_create(name="ZulipMobile")
 | 
			
		||||
        flutter, created = Client.objects.get_or_create(name="ZulipFlutter")
 | 
			
		||||
        API, created = Client.objects.get_or_create(name="API: Python")
 | 
			
		||||
        zephyr_mirror, created = Client.objects.get_or_create(name="zephyr_mirror")
 | 
			
		||||
        unused, created = Client.objects.get_or_create(name="unused")
 | 
			
		||||
@@ -302,6 +303,7 @@ class Command(ZulipBaseCommand):
 | 
			
		||||
            android.id: self.generate_fixture_data(stat, 5, 5, 2, 0.6, 3),
 | 
			
		||||
            iOS.id: self.generate_fixture_data(stat, 5, 5, 2, 0.6, 3),
 | 
			
		||||
            react_native.id: self.generate_fixture_data(stat, 5, 5, 10, 0.6, 3),
 | 
			
		||||
            flutter.id: self.generate_fixture_data(stat, 5, 5, 10, 0.6, 3),
 | 
			
		||||
            API.id: self.generate_fixture_data(stat, 5, 5, 5, 0.6, 3),
 | 
			
		||||
            zephyr_mirror.id: self.generate_fixture_data(stat, 1, 1, 3, 0.6, 3),
 | 
			
		||||
            unused.id: self.generate_fixture_data(stat, 0, 0, 0, 0, 0),
 | 
			
		||||
@@ -313,6 +315,7 @@ class Command(ZulipBaseCommand):
 | 
			
		||||
            old_desktop.id: self.generate_fixture_data(stat, 50, 30, 8, 0.6, 3),
 | 
			
		||||
            android.id: self.generate_fixture_data(stat, 50, 50, 2, 0.6, 3),
 | 
			
		||||
            iOS.id: self.generate_fixture_data(stat, 50, 50, 2, 0.6, 3),
 | 
			
		||||
            flutter.id: self.generate_fixture_data(stat, 5, 5, 10, 0.6, 3),
 | 
			
		||||
            react_native.id: self.generate_fixture_data(stat, 5, 5, 10, 0.6, 3),
 | 
			
		||||
            API.id: self.generate_fixture_data(stat, 50, 50, 5, 0.6, 3),
 | 
			
		||||
            zephyr_mirror.id: self.generate_fixture_data(stat, 10, 10, 3, 0.6, 3),
 | 
			
		||||
 
 | 
			
		||||
@@ -661,7 +661,9 @@ class TestMapArrays(ZulipTestCase):
 | 
			
		||||
            "website": [1, 2, 3],
 | 
			
		||||
            "ZulipiOS": [1, 2, 3],
 | 
			
		||||
            "ZulipElectron": [2, 5, 7],
 | 
			
		||||
            "ZulipMobile": [1, 5, 7],
 | 
			
		||||
            "ZulipMobile": [1, 2, 3],
 | 
			
		||||
            "ZulipMobile/flutter": [1, 1, 1],
 | 
			
		||||
            "ZulipFlutter": [1, 1, 1],
 | 
			
		||||
            "ZulipPython": [1, 2, 3],
 | 
			
		||||
            "API: Python": [1, 2, 3],
 | 
			
		||||
            "SomethingRandom": [4, 5, 6],
 | 
			
		||||
@@ -676,7 +678,8 @@ class TestMapArrays(ZulipTestCase):
 | 
			
		||||
                "Old desktop app": [32, 36, 39],
 | 
			
		||||
                "Old iOS app": [1, 2, 3],
 | 
			
		||||
                "Desktop app": [2, 5, 7],
 | 
			
		||||
                "Mobile app": [1, 5, 7],
 | 
			
		||||
                "Mobile app (React Native)": [1, 2, 3],
 | 
			
		||||
                "Mobile app beta (Flutter)": [2, 2, 2],
 | 
			
		||||
                "Web app": [1, 2, 3],
 | 
			
		||||
                "Python API": [2, 4, 6],
 | 
			
		||||
                "SomethingRandom": [4, 5, 6],
 | 
			
		||||
 
 | 
			
		||||
@@ -525,7 +525,9 @@ def client_label_map(name: str) -> str:
 | 
			
		||||
    if name == "ZulipiOS":
 | 
			
		||||
        return "Old iOS app"
 | 
			
		||||
    if name == "ZulipMobile":
 | 
			
		||||
        return "Mobile app"
 | 
			
		||||
        return "Mobile app (React Native)"
 | 
			
		||||
    if name in ["ZulipFlutter", "ZulipMobile/flutter"]:
 | 
			
		||||
        return "Mobile app beta (Flutter)"
 | 
			
		||||
    if name in ["ZulipPython", "API: Python"]:
 | 
			
		||||
        return "Python API"
 | 
			
		||||
    if name.startswith("Zulip") and name.endswith("Webhook"):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user