From 7f64dfd8c5756bb0b1bfa83cb4deb4d8fc212168 Mon Sep 17 00:00:00 2001 From: afsuyadi Date: Sat, 20 Jun 2026 08:26:30 +0700 Subject: [PATCH 1/2] feat(default-flags): add options for Amplitude, Datadog, Heap, Mixpanel, and New Relic Integration --- frontend/common/stores/default-flags.ts | 48 +++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/frontend/common/stores/default-flags.ts b/frontend/common/stores/default-flags.ts index 912d40fa3585..54976d117abd 100644 --- a/frontend/common/stores/default-flags.ts +++ b/frontend/common/stores/default-flags.ts @@ -12,6 +12,11 @@ const defaultFlags = { { 'key': 'base_url', 'label': 'Base URL', + 'options': [ + { 'label': 'US', 'value': 'https://api2.amplitude.com' }, + { 'label': 'EU', 'value': 'https://api.eu.amplitude.com' }, + { 'label': 'Custom URL', 'value': 'custom' }, + ], }, ], 'image': '/static/images/integrations/amplitude.svg', @@ -45,6 +50,15 @@ const defaultFlags = { { 'key': 'base_url', 'label': 'Base URL', + 'options': [ + { 'label': 'US1', 'value': 'https://api.datadoghw.com' }, + { 'label': 'US3', 'value': 'https://us3.datadoghq.com' }, + { 'label': 'US5', 'value': 'https://us5.datadoghq.com' }, + { 'label': 'EU1', 'value': 'https://app.datadoghq.eu' }, + { 'label': 'US1-FED', 'value': 'https://app.ddog-gov.com' }, + { 'label': 'AP1', 'value': 'https://ap1.datadoghq.com' }, + { 'label': 'Custom URL', 'value': 'custom' }, + ], }, { 'hidden': true, @@ -140,6 +154,15 @@ const defaultFlags = { 'description': 'Sends data on what flags served to each identity.', 'docs': 'https://docs.flagsmith.com/integrations/analytics/heap', 'fields': [ + { + 'key': 'base_url', + 'label': 'Base URL', + 'options': [ + { 'label': 'US', 'value': 'https://heapanalytics.com' }, + { 'label': 'EU', 'value': 'https://heapanalytics.eu' }, + { 'label': 'Custom URL', 'value': 'custom' }, + ], + }, { 'hidden': true, 'key': 'api_key', @@ -163,6 +186,16 @@ const defaultFlags = { 'description': 'Sends data on what flags served to each identity.', 'docs': 'https://docs.flagsmith.com/integrations/analytics/mixpanel', 'fields': [ + { + 'key': 'base_url', + 'label': 'Base URL', + 'options': [ + { 'label': 'US', 'value': 'https://api.mixpanel.com' }, + { 'label': 'EU', 'value': 'https://api-eu.mixpanel.com' }, + { 'label': 'IN', 'value': 'https://api-in.mixpanel.com' }, + { 'label': 'Custom URL', 'value': 'custom' }, + ], + }, { 'hidden': true, 'key': 'api_key', @@ -181,12 +214,23 @@ const defaultFlags = { 'fields': [ { 'key': 'base_url', - 'label': 'New Relic Base URL', + 'label': 'Base URL', + 'options': [ + { + 'label': 'US', + 'value': 'https://insights-collector.newrelic.com', + }, + { + 'label': 'EU', + 'value': 'https://insights-collector.eu01.nr-data.net', + }, + { 'label': 'Custom URL', 'value': 'custom' }, + ], }, { 'hidden': true, 'key': 'api_key', - 'label': 'New Relic API Key', + 'label': 'API Key', }, { 'key': 'app_id', From 7343bfe925186eaa5acdf64ed0f19aaddff88950 Mon Sep 17 00:00:00 2001 From: afsuyadi Date: Sat, 20 Jun 2026 08:29:33 +0700 Subject: [PATCH 2/2] feat(frontend): add region preset dropdown for base_url fields --- .../modals/CreateEditIntegrationModal.tsx | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/frontend/web/components/modals/CreateEditIntegrationModal.tsx b/frontend/web/components/modals/CreateEditIntegrationModal.tsx index feec008ca93a..97c1bdbde6ea 100644 --- a/frontend/web/components/modals/CreateEditIntegrationModal.tsx +++ b/frontend/web/components/modals/CreateEditIntegrationModal.tsx @@ -113,6 +113,7 @@ const CreateEditIntegration: FC = (props) => { () => data || buildDefaultFormData(), ) const [isLoading, setIsLoading] = useState(false) + const [customUrlFields, setCustomUrlFields] = useState>(new Set()) const [error, setError] = useState(null) const [authorised, setAuthorised] = useState(false) const [selectedProjectId, setSelectedProjectId] = useState< @@ -351,17 +352,36 @@ const CreateEditIntegration: FC = (props) => { const selected = options.find( (v: IntegrationFieldOption) => v.value === formData[field.key], ) + const isCustomUrl = + customUrlFields.has(field.key) || + (!!formData[field.key] && + !options.find((o) => o.value === formData[field.key])) return (