diff --git a/src/Explorer/Panes/SettingsPane/SettingsPane.tsx b/src/Explorer/Panes/SettingsPane/SettingsPane.tsx index b5f1e1efd..a19c89be2 100644 --- a/src/Explorer/Panes/SettingsPane/SettingsPane.tsx +++ b/src/Explorer/Panes/SettingsPane/SettingsPane.tsx @@ -174,15 +174,26 @@ export const SettingsPane: FunctionComponent<{ explorer: Explorer }> = ({ const styles = useStyles(); const explorerVersion = configContext.gitSha; + const isEmulator = configContext.platform === Platform.Emulator; const shouldShowQueryPageOptions = userContext.apiType === "SQL"; - const shouldShowGraphAutoVizOption = userContext.apiType === "Gremlin"; - const shouldShowCrossPartitionOption = userContext.apiType !== "Gremlin"; - const shouldShowParallelismOption = userContext.apiType !== "Gremlin"; - const shouldShowPriorityLevelOption = PriorityBasedExecutionUtils.isFeatureEnabled(); + const showRetrySettings = + (userContext.apiType === "SQL" || userContext.apiType === "Tables" || userContext.apiType === "Gremlin") && + !isEmulator; + const shouldShowGraphAutoVizOption = userContext.apiType === "Gremlin" && !isEmulator; + const shouldShowCrossPartitionOption = userContext.apiType !== "Gremlin" && !isEmulator; + const shouldShowParallelismOption = userContext.apiType !== "Gremlin" && !isEmulator; + const showEnableEntraIdRbac = + userContext.apiType === "SQL" && + userContext.authType === AuthType.AAD && + configContext.platform !== Platform.Fabric && + !isEmulator; + const shouldShowPriorityLevelOption = PriorityBasedExecutionUtils.isFeatureEnabled() && !isEmulator; const shouldShowCopilotSampleDBOption = userContext.apiType === "SQL" && useQueryCopilot.getState().copilotEnabled && - useDatabases.getState().sampleDataResourceTokenCollection; + useDatabases.getState().sampleDataResourceTokenCollection && + !isEmulator; + const handlerOnSubmit = async () => { setIsExecuting(true); @@ -541,39 +552,37 @@ export const SettingsPane: FunctionComponent<{ explorer: Explorer }> = ({ )} - {userContext.apiType === "SQL" && - userContext.authType === AuthType.AAD && - configContext.platform !== Platform.Fabric && ( - - -
Enable Entra ID RBAC
-
- -
-
- Choose Automatic to enable Entra ID RBAC automatically. True/False to force enable/disable Entra - ID RBAC. - - {" "} - Learn more{" "} - -
- + {showEnableEntraIdRbac && ( + + +
Enable Entra ID RBAC
+
+ +
+
+ Choose Automatic to enable Entra ID RBAC automatically. True/False to force enable/disable Entra ID + RBAC. + + {" "} + Learn more{" "} +
- - - )} - {userContext.apiType === "SQL" && ( + +
+
+
+ )} + {userContext.apiType === "SQL" && !isEmulator && ( <> @@ -671,7 +680,7 @@ export const SettingsPane: FunctionComponent<{ explorer: Explorer }> = ({ )} - {(userContext.apiType === "SQL" || userContext.apiType === "Tables" || userContext.apiType === "Gremlin") && ( + {showRetrySettings && (
Retry Settings
@@ -744,29 +753,30 @@ export const SettingsPane: FunctionComponent<{ explorer: Explorer }> = ({
)} - - - -
Enable container pagination
-
- -
-
- Load 50 containers at a time. Currently, containers are not pulled in alphanumeric order. + {!isEmulator && ( + + +
Enable container pagination
+
+ +
+
+ Load 50 containers at a time. Currently, containers are not pulled in alphanumeric order. +
+ setContainerPaginationEnabled(!containerPaginationEnabled)} + label="Enable container pagination" + />
- setContainerPaginationEnabled(!containerPaginationEnabled)} - label="Enable container pagination" - /> -
- - + + + )} {shouldShowCrossPartitionOption && (