File tree Expand file tree Collapse file tree 4 files changed +12
-10
lines changed
compass-connections/src/stores
compass/src/app/components Expand file tree Collapse file tree 4 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -1801,6 +1801,7 @@ const connectWithOptions = (
18011801 await dataService . getUpdatedSecrets ( ) ,
18021802 }
18031803 : { } ) ,
1804+ isGenuineMongoDB : instanceInfo . genuineMongoDB . isGenuine ,
18041805 }
18051806 )
18061807 )
Original file line number Diff line number Diff line change 11import { useConnectionIds } from '@mongodb-js/compass-connections/provider' ;
2- import { getGenuineMongoDB } from 'mongodb-build-info' ;
32import React from 'react' ;
43import { CompassAssistantDrawer } from '@mongodb-js/compass-assistant' ;
54
@@ -12,15 +11,14 @@ export function CompassAssistantDrawerWithConnections({
1211 appName : string ;
1312} ) {
1413 // Check for non-genuine connections
15- const activeConnectionIds = useConnectionIds (
14+ const activeNonGenuineConnectionIds = useConnectionIds (
1615 ( conn ) =>
17- getGenuineMongoDB ( conn . info . connectionOptions . connectionString )
18- . isGenuine === false && conn . status === 'connected'
16+ conn . info . isGenuineMongoDB === false && conn . status === 'connected'
1917 ) ;
2018 return (
2119 < CompassAssistantDrawer
2220 appName = { appName }
23- hasNonGenuineConnections = { activeConnectionIds . length > 0 }
21+ hasNonGenuineConnections = { activeNonGenuineConnectionIds . length > 0 }
2422 />
2523 ) ;
2624}
Original file line number Diff line number Diff line change 11import { useConnectionIds } from '@mongodb-js/compass-connections/provider' ;
2- import { getGenuineMongoDB } from 'mongodb-build-info' ;
32import React from 'react' ;
43import { CompassAssistantDrawer } from '@mongodb-js/compass-assistant' ;
54
@@ -12,15 +11,14 @@ export function CompassAssistantDrawerWithConnections({
1211 appName : string ;
1312} ) {
1413 // Check for non-genuine connections
15- const activeConnectionIds = useConnectionIds (
14+ const activeNonGenuineConnectionIds = useConnectionIds (
1615 ( conn ) =>
17- getGenuineMongoDB ( conn . info . connectionOptions . connectionString )
18- . isGenuine === false && conn . status === 'connected'
16+ conn . info . isGenuineMongoDB === false && conn . status === 'connected'
1917 ) ;
2018 return (
2119 < CompassAssistantDrawer
2220 appName = { appName }
23- hasNonGenuineConnections = { activeConnectionIds . length > 0 }
21+ hasNonGenuineConnections = { activeNonGenuineConnectionIds . length > 0 }
2422 />
2523 ) ;
2624}
Original file line number Diff line number Diff line change @@ -145,6 +145,11 @@ export interface ConnectionInfo {
145145 * The metadata for the Atlas cluster. Set from Atlas control plane when using compass-web.
146146 */
147147 atlasMetadata ?: AtlasClusterMetadata ;
148+
149+ /**
150+ * Indicates whether this connection is to a genuine MongoDB server.
151+ */
152+ isGenuineMongoDB ?: boolean ;
148153}
149154
150155export interface ConnectionFavoriteOptions {
You can’t perform that action at this time.
0 commit comments