File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed
compass-preferences-model/src Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,11 @@ export type UserConfigurablePreferences = PermanentFeatureFlags &
4747 // This preference is not a great fit for user preferences, but everything
4848 // except for user preferences doesn't allow required preferences to be
4949 // defined, so we are sticking it here
50- atlasServiceConfigPreset : 'compass-dev' | 'compass' | 'atlas-dev' | 'atlas' ;
50+ atlasServiceBackendPreset :
51+ | 'compass-dev'
52+ | 'compass'
53+ | 'atlas-dev'
54+ | 'atlas' ;
5155 // Features that are enabled by default in Compass, but are disabled in Data
5256 // Explorer
5357 enableExplainPlan : boolean ;
@@ -635,14 +639,15 @@ export const storedUserPreferencesProps: Required<{
635639 validator : z . boolean ( ) . default ( false ) ,
636640 type : 'boolean' ,
637641 } ,
642+
638643 /**
639644 * Chooses atlas service backend configuration from preset
640645 * - compass-dev: locally running compass kanopy backend (localhost)
641646 * - compass: compass kanopy backend (compass.mongodb.com)
642647 * - atlas-dev: dev mms backend (cloud-dev.mongodb.com)
643648 * - atlas: mms backend (cloud.mongodb.com)
644649 */
645- atlasServiceConfigPreset : {
650+ atlasServiceBackendPreset : {
646651 ui : true ,
647652 cli : true ,
648653 global : true ,
@@ -651,7 +656,7 @@ export const storedUserPreferencesProps: Required<{
651656 } ,
652657 validator : z
653658 . enum ( [ 'compass-dev' , 'compass' , 'atlas-dev' , 'atlas' ] )
654- . default ( 'atlas-dev ' ) ,
659+ . default ( 'atlas' ) ,
655660 type : 'string' ,
656661 } ,
657662
Original file line number Diff line number Diff line change @@ -109,6 +109,13 @@ class CompassApplication {
109109 }
110110
111111 private static async setupAtlasService ( ) {
112+ /**
113+ * Atlas service backend configurations.
114+ * - compass-dev: locally running compass kanopy backend (localhost)
115+ * - compass: compass kanopy backend (compass.mongodb.com)
116+ * - atlas-dev: dev mms backend (cloud-dev.mongodb.com)
117+ * - atlas: mms backend (cloud.mongodb.com)
118+ */
112119 const config = {
113120 'compass-dev' : {
114121 atlasApiBaseUrl : 'http://localhost:8080' ,
@@ -149,7 +156,7 @@ class CompassApplication {
149156 } ,
150157 } as const ;
151158
152- const { atlasServiceConfigPreset } = preferences . getPreferences ( ) ;
159+ const { atlasServiceBackendPreset } = preferences . getPreferences ( ) ;
153160
154161 const atlasServiceConfig = defaultsDeep (
155162 {
@@ -162,7 +169,7 @@ class CompassApplication {
162169 } ,
163170 authPortalUrl : process . env . COMPASS_ATLAS_AUTH_PORTAL_URL_OVERRIDE ,
164171 } ,
165- config [ atlasServiceConfigPreset ]
172+ config [ atlasServiceBackendPreset ]
166173 ) ;
167174
168175 await AtlasService . init ( atlasServiceConfig ) ;
You can’t perform that action at this time.
0 commit comments