File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
packages/compass-connections/src/stores Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1739,6 +1739,16 @@ const connectWithOptions = (
17391739 getExtraConnectionData ( connectionInfo ) ,
17401740 ] ) ;
17411741
1742+ const connections = getState ( ) . connections ;
1743+ // Counting all connections, we need to filter out any connections currently being created
1744+ const totalConnectionsCount = Object . values (
1745+ connections . byId
1746+ ) . filter ( ( { isBeingCreated } ) => ! isBeingCreated ) . length ;
1747+ const activeConnectionsCount =
1748+ getActiveConnectionsCount ( connections ) ;
1749+ const inactiveConnectionsCount =
1750+ totalConnectionsCount - activeConnectionsCount ;
1751+
17421752 return {
17431753 is_atlas : isAtlas ,
17441754 atlas_hostname : isAtlas ? resolvedHostname : null ,
@@ -1751,6 +1761,8 @@ const connectWithOptions = (
17511761 server_arch : host . arch ,
17521762 server_os_family : host . os_family ,
17531763 topology_type : dataService . getCurrentTopologyType ( ) ,
1764+ num_active_connections : activeConnectionsCount ,
1765+ num_inactive_connections : inactiveConnectionsCount ,
17541766 ...extraInfo ,
17551767 } ;
17561768 } ,
You can’t perform that action at this time.
0 commit comments