File tree Expand file tree Collapse file tree 3 files changed +7
-12
lines changed
compass-connections/src/stores
connection-form/src/hooks Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -1554,10 +1554,7 @@ const connectWithOptions = (
15541554 cloneDeep ( connectionOptions ) ,
15551555 SecretsForConnection . get ( connectionInfo . id ) ?? { }
15561556 ) ,
1557- connectionInfo : {
1558- id : connectionInfo . id ,
1559- isAtlas : ! ! connectionInfo . atlasMetadata ,
1560- } ,
1557+ connectionId : connectionInfo . id ,
15611558 defaultAppName : appName ,
15621559 preferences : {
15631560 forceConnectionOptions : forceConnectionOptions ?? [ ] ,
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ import { setAppNameParamIfMissing } from '../utils/set-app-name-if-missing';
6969import { applyForceConnectionOptions } from '../utils/force-connection-options' ;
7070import { useConnectionFormSetting } from './use-connect-form-settings' ;
7171import ConnectionString from 'mongodb-connection-string-url' ;
72+ import { isAtlas } from 'mongodb-build-info' ;
7273
7374export type ConnectionPersonalizationOptions = {
7475 name : string ;
@@ -843,16 +844,13 @@ function setInitialState({
843844
844845export function adjustConnectionOptionsBeforeConnect ( {
845846 connectionOptions,
846- connectionInfo ,
847+ connectionId ,
847848 defaultAppName,
848849 notifyDeviceFlow,
849850 preferences,
850851} : {
851852 connectionOptions : Readonly < ConnectionOptions > ;
852- connectionInfo : {
853- id : string ;
854- isAtlas : boolean ;
855- } ;
853+ connectionId : string ;
856854 defaultAppName ?: string ;
857855 notifyDeviceFlow ?: ( deviceFlowInformation : {
858856 verificationUrl : string ;
@@ -871,8 +869,8 @@ export function adjustConnectionOptionsBeforeConnect({
871869 unsetFleOptionsIfEmptyAutoEncryption ,
872870 setAppNameParamIfMissing ( {
873871 defaultAppName,
874- connectionId : connectionInfo . id ,
875- isAtlas : connectionInfo . isAtlas ,
872+ connectionId,
873+ isAtlas : isAtlas ( connectionOptions . connectionString ) ,
876874 telemetryAnonymousId : preferences . telemetryAnonymousId ,
877875 } ) ,
878876 adjustOIDCConnectionOptionsBeforeConnect ( {
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ export interface ConnectionInfo {
136136 connectionOptions : ConnectionOptions ;
137137
138138 /**
139- * The metdata for the Atlas cluster
139+ * The metadata for the Atlas cluster. Set from Atlas control plane when using compass-web.
140140 */
141141 atlasMetadata ?: AtlasClusterMetadata ;
142142}
You can’t perform that action at this time.
0 commit comments