File tree 3 files changed +7
-12
lines changed
compass-connections/src/stores
connection-form/src/hooks
3 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -1554,10 +1554,7 @@ const connectWithOptions = (
1554
1554
cloneDeep ( connectionOptions ) ,
1555
1555
SecretsForConnection . get ( connectionInfo . id ) ?? { }
1556
1556
) ,
1557
- connectionInfo : {
1558
- id : connectionInfo . id ,
1559
- isAtlas : ! ! connectionInfo . atlasMetadata ,
1560
- } ,
1557
+ connectionId : connectionInfo . id ,
1561
1558
defaultAppName : appName ,
1562
1559
preferences : {
1563
1560
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';
69
69
import { applyForceConnectionOptions } from '../utils/force-connection-options' ;
70
70
import { useConnectionFormSetting } from './use-connect-form-settings' ;
71
71
import ConnectionString from 'mongodb-connection-string-url' ;
72
+ import { isAtlas } from 'mongodb-build-info' ;
72
73
73
74
export type ConnectionPersonalizationOptions = {
74
75
name : string ;
@@ -843,16 +844,13 @@ function setInitialState({
843
844
844
845
export function adjustConnectionOptionsBeforeConnect ( {
845
846
connectionOptions,
846
- connectionInfo ,
847
+ connectionId ,
847
848
defaultAppName,
848
849
notifyDeviceFlow,
849
850
preferences,
850
851
} : {
851
852
connectionOptions : Readonly < ConnectionOptions > ;
852
- connectionInfo : {
853
- id : string ;
854
- isAtlas : boolean ;
855
- } ;
853
+ connectionId : string ;
856
854
defaultAppName ?: string ;
857
855
notifyDeviceFlow ?: ( deviceFlowInformation : {
858
856
verificationUrl : string ;
@@ -871,8 +869,8 @@ export function adjustConnectionOptionsBeforeConnect({
871
869
unsetFleOptionsIfEmptyAutoEncryption ,
872
870
setAppNameParamIfMissing ( {
873
871
defaultAppName,
874
- connectionId : connectionInfo . id ,
875
- isAtlas : connectionInfo . isAtlas ,
872
+ connectionId,
873
+ isAtlas : isAtlas ( connectionOptions . connectionString ) ,
876
874
telemetryAnonymousId : preferences . telemetryAnonymousId ,
877
875
} ) ,
878
876
adjustOIDCConnectionOptionsBeforeConnect ( {
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ export interface ConnectionInfo {
136
136
connectionOptions : ConnectionOptions ;
137
137
138
138
/**
139
- * The metdata for the Atlas cluster
139
+ * The metadata for the Atlas cluster. Set from Atlas control plane when using compass-web.
140
140
*/
141
141
atlasMetadata ?: AtlasClusterMetadata ;
142
142
}
You can’t perform that action at this time.
0 commit comments