diff --git a/engine/apps/api/views/features.py b/engine/apps/api/views/features.py index 197e4ef5e2..1c619d25a2 100644 --- a/engine/apps/api/views/features.py +++ b/engine/apps/api/views/features.py @@ -64,4 +64,12 @@ def _get_enabled_features(self, request): if is_webhooks_enabled_for_organization(request.auth.organization.pk): enabled_features.append(FEATURE_WEBHOOKS2) + enabled_mobile_test_push = DynamicSetting.objects.get_or_create( + name="enabled_mobile_test_push", + defaults={"boolean_value": False}, + )[0] + + if enabled_mobile_test_push.boolean_value: + enabled_features.append(FEATURE_MOBILE_TEST_PUSH) + return enabled_features diff --git a/grafana-plugin/src/containers/MobileAppConnection/MobileAppConnection.tsx b/grafana-plugin/src/containers/MobileAppConnection/MobileAppConnection.tsx index 277ccdca0d..943dca59e6 100644 --- a/grafana-plugin/src/containers/MobileAppConnection/MobileAppConnection.tsx +++ b/grafana-plugin/src/containers/MobileAppConnection/MobileAppConnection.tsx @@ -200,28 +200,26 @@ const MobileAppConnection = observer(({ userPk }: Props) => { {content} - {false && // temporary disable test notifications - mobileAppIsCurrentlyConnected && - isCurrentUser && ( -
- - - - -
- )} + {store.hasFeature(AppFeature.MobileTestPush) && mobileAppIsCurrentlyConnected && isCurrentUser && ( +
+ + + + +
+ )} ); diff --git a/grafana-plugin/src/state/features.ts b/grafana-plugin/src/state/features.ts index 624e2761c1..1b5c8bf0eb 100644 --- a/grafana-plugin/src/state/features.ts +++ b/grafana-plugin/src/state/features.ts @@ -6,4 +6,5 @@ export enum AppFeature { CloudConnection = 'grafana_cloud_connection', WebSchedules = 'web_schedules', Webhooks2 = 'webhooks2', + MobileTestPush = 'mobile_test_push', }