File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
packages/compass-global-writes/src/store Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ export function activateGlobalWritesPlugin(
6666 namespace : options . namespace ,
6767 status : ShardingStatuses . NOT_READY ,
6868 shardZones : [ ] ,
69- isPluginTitleVisible : false ,
69+ isPluginTitleVisible : true ,
7070 } ,
7171 applyMiddleware (
7272 thunk . withExtraArgument ( {
Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ const initialState: RootState = {
253253 namespace : '' ,
254254 status : ShardingStatuses . NOT_READY ,
255255 shardZones : [ ] ,
256- isPluginTitleVisible : false ,
256+ isPluginTitleVisible : true ,
257257} ;
258258
259259const reducer : Reducer < RootState , Action > = ( state = initialState , action ) => {
@@ -710,7 +710,12 @@ export const fetchNamespaceShardKey = (): GlobalWritesThunkAction<
710710 getState ,
711711 { atlasGlobalWritesService, logger, connectionInfoRef }
712712 ) => {
713- const { namespace, status } = getState ( ) ;
713+ const { namespace, status, isPluginTitleVisible } = getState ( ) ;
714+
715+ if ( ! isPluginTitleVisible ) {
716+ dispatch ( stopPollingForShardKey ( ) ) ;
717+ return ;
718+ }
714719
715720 try {
716721 const [ shardingError , shardKey ] = await Promise . all ( [
You can’t perform that action at this time.
0 commit comments