diff --git a/frontend/src/scenes/pipeline/AppsManagement.tsx b/frontend/src/scenes/pipeline/AppsManagement.tsx index 6d418a6d5dcbe5..890bac9fdbf376 100644 --- a/frontend/src/scenes/pipeline/AppsManagement.tsx +++ b/frontend/src/scenes/pipeline/AppsManagement.tsx @@ -12,7 +12,6 @@ import { SceneExport } from 'scenes/sceneTypes' import { PluginInstallationType, PluginType } from '~/types' import { appsManagementLogic } from './appsManagementLogic' -import { ExportsUnsubscribeModal, exportsUnsubscribeModalLogic } from './ExportsUnsubscribeModal' import { RenderApp } from './utils' export const scene: SceneExport = { @@ -31,8 +30,6 @@ export function AppsManagement(): JSX.Element { localPlugins, } = useValues(appsManagementLogic) const { isDev, isCloudOrDev } = useValues(preflightLogic) - const { startUnsubscribe } = useActions(exportsUnsubscribeModalLogic) - const { loading } = useValues(exportsUnsubscribeModalLogic) if (!canInstallPlugins || !canGloballyManagePlugins) { return <>You don't have permission to manage apps. @@ -40,10 +37,6 @@ export function AppsManagement(): JSX.Element { return (
- - - Unsubscribe from batch exports - {isCloudOrDev && (missingGlobalPlugins.length > 0 || shouldBeGlobalPlugins.length > 0 || diff --git a/frontend/src/scenes/pipeline/ExportsUnsubscribeModal/ExportsUnsubscribeModal.tsx b/frontend/src/scenes/pipeline/ExportsUnsubscribeModal/ExportsUnsubscribeModal.tsx index 8a174868a07e05..b48c7a9ea88ec7 100644 --- a/frontend/src/scenes/pipeline/ExportsUnsubscribeModal/ExportsUnsubscribeModal.tsx +++ b/frontend/src/scenes/pipeline/ExportsUnsubscribeModal/ExportsUnsubscribeModal.tsx @@ -22,7 +22,7 @@ export function ExportsUnsubscribeModal(): JSX.Element { onClose={closeModal} isOpen={modalOpen} width={600} - title="Disable remaining export apps" + title="Disable remaining data pipelines apps" description="To make sure there's no unexpected impact on your data, you need to explicitly disable the following apps before unsubscribing:" footer={ <> diff --git a/posthog/api/plugin.py b/posthog/api/plugin.py index 0c8731e3addd9d..638784991b2702 100644 --- a/posthog/api/plugin.py +++ b/posthog/api/plugin.py @@ -543,8 +543,6 @@ class PluginConfigSerializer(serializers.ModelSerializer): plugin_info = serializers.SerializerMethodField() delivery_rate_24h = serializers.SerializerMethodField() error = serializers.SerializerMethodField() - name = serializers.SerializerMethodField() - description = serializers.SerializerMethodField() class Meta: model = PluginConfig @@ -607,11 +605,11 @@ def get_config(self, plugin_config: PluginConfig): return new_plugin_config - def get_name(self, plugin_config: PluginConfig): - return plugin_config.name or plugin_config.plugin.name - - def get_description(self, plugin_config: PluginConfig): - return plugin_config.description or plugin_config.plugin.description + def to_representation(self, instance: Any) -> Any: + representation = super().to_representation(instance) + representation["name"] = representation["name"] or instance.plugin.name + representation["description"] = representation["description"] or instance.plugin.description + return representation def get_plugin_info(self, plugin_config: PluginConfig): if "view" in self.context and self.context["view"].action == "retrieve": diff --git a/posthog/api/test/test_plugin.py b/posthog/api/test/test_plugin.py index 12ce1bd16e079a..a2eb76174fb482 100644 --- a/posthog/api/test/test_plugin.py +++ b/posthog/api/test/test_plugin.py @@ -1356,8 +1356,8 @@ def test_create_plugin_config_with_secrets(self, mock_get, mock_reload): "delivery_rate_24h": None, "created_at": mock.ANY, "updated_at": mock.ANY, - "name": None, - "description": None, + "name": "Hello World", + "description": "Greet the World and Foo a Bar, JS edition!", "deleted": False, }, ) @@ -1385,8 +1385,8 @@ def test_create_plugin_config_with_secrets(self, mock_get, mock_reload): "delivery_rate_24h": None, "created_at": mock.ANY, "updated_at": mock.ANY, - "name": None, - "description": None, + "name": "Hello World", + "description": "Greet the World and Foo a Bar, JS edition!", "deleted": False, }, ) @@ -1416,8 +1416,8 @@ def test_create_plugin_config_with_secrets(self, mock_get, mock_reload): "delivery_rate_24h": None, "created_at": mock.ANY, "updated_at": mock.ANY, - "name": None, - "description": None, + "name": "Hello World", + "description": "Greet the World and Foo a Bar, JS edition!", "deleted": False, }, ) diff --git a/posthog/batch_exports/http.py b/posthog/batch_exports/http.py index 4d29777e92b3d2..38c9354df09e89 100644 --- a/posthog/batch_exports/http.py +++ b/posthog/batch_exports/http.py @@ -394,28 +394,3 @@ def get_queryset(self): limit=limit, level_filter=level_filter, ) - - -# queryset = BatchExport.objects.all() -# serializer_class = BatchExportSerializer -# permission_classes = [ -# IsAuthenticated, -# ProjectMembershipNecessaryPermissions, -# OrganizationMemberPermissions, -# ] -# permission_classes = [ -# IsAuthenticated, -# ProjectMembershipNecessaryPermissions, -# TeamMemberAccessPermission, -# ] - -# def get_queryset(self): -# if not isinstance(self.request.user, User) or self.request.user.current_team is None: -# raise NotAuthenticated() - -# return ( -# self.queryset.filter(team_id=self.team_id) -# .exclude(deleted=True) -# .order_by("-created_at") -# .prefetch_related("destination") -# )