From 57988ebb70b4810dabedc7086546d6057ddfcd25 Mon Sep 17 00:00:00 2001 From: Asier Isayas Date: Tue, 9 Dec 2025 08:31:17 -0800 Subject: [PATCH] hide synapse for public cloud --- .../Menus/CommandBar/CommandBarComponentButtonFactory.tsx | 5 +++++ .../Panes/AddCollectionPanel/AddCollectionPanel.tsx | 3 ++- .../Panes/AddCollectionPanel/AddCollectionPanelUtility.tsx | 6 +++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx index bd4f2b85e..fae96ae42 100644 --- a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx +++ b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx @@ -1,3 +1,4 @@ +import { Environment, getEnvironment } from "Common/EnvironmentUtility"; import { KeyboardAction } from "KeyboardShortcuts"; import { isDataplaneRbacSupported } from "Utils/APITypeUtils"; import * as React from "react"; @@ -238,6 +239,10 @@ function areScriptsSupported(): boolean { } function createOpenSynapseLinkDialogButton(container: Explorer): CommandButtonComponentProps { + if ([Environment.Prod, Environment.Mpac].includes(getEnvironment())) { + return undefined; + } + if (configContext.platform === Platform.Emulator) { return undefined; } diff --git a/src/Explorer/Panes/AddCollectionPanel/AddCollectionPanel.tsx b/src/Explorer/Panes/AddCollectionPanel/AddCollectionPanel.tsx index 58d7037b6..a4886fdb9 100644 --- a/src/Explorer/Panes/AddCollectionPanel/AddCollectionPanel.tsx +++ b/src/Explorer/Panes/AddCollectionPanel/AddCollectionPanel.tsx @@ -18,6 +18,7 @@ import { import * as Constants from "Common/Constants"; import { createCollection } from "Common/dataAccess/createCollection"; import { getNewDatabaseSharedThroughputDefault } from "Common/DatabaseUtility"; +import { getEnvironment } from "Common/EnvironmentUtility"; import { getErrorMessage, getErrorStack } from "Common/ErrorHandlingUtils"; import { configContext, Platform } from "ConfigContext"; import * as DataModels from "Contracts/DataModels"; @@ -160,7 +161,7 @@ export class AddCollectionPanel extends React.Component {this.state.errorMessage && ( diff --git a/src/Explorer/Panes/AddCollectionPanel/AddCollectionPanelUtility.tsx b/src/Explorer/Panes/AddCollectionPanel/AddCollectionPanelUtility.tsx index fe77b4cf5..f34ac28a3 100644 --- a/src/Explorer/Panes/AddCollectionPanel/AddCollectionPanelUtility.tsx +++ b/src/Explorer/Panes/AddCollectionPanel/AddCollectionPanelUtility.tsx @@ -1,5 +1,6 @@ import { DirectionalHint, Icon, Link, Stack, Text, TooltipHost } from "@fluentui/react"; import * as Constants from "Common/Constants"; +import { Environment, getEnvironment } from "Common/EnvironmentUtility"; import { configContext, Platform } from "ConfigContext"; import * as DataModels from "Contracts/DataModels"; import { getFullTextLanguageOptions } from "Explorer/Controls/FullTextSeach/FullTextPoliciesComponent"; @@ -85,7 +86,10 @@ export function UniqueKeysHeader(): JSX.Element { } export function shouldShowAnalyticalStoreOptions(): boolean { - if (isFabricNative() || configContext.platform === Platform.Emulator) { + if ( + [Environment.Mpac, Environment.Prod].includes(getEnvironment()) || + isFabricNative() || + configContext.platform === Platform.Emulator) { return false; }