Skip to content

Commit 7cc3dcf

Browse files
committed
fix
1 parent a3c7bda commit 7cc3dcf

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

packages/compass-global-writes/src/store/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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({

packages/compass-global-writes/src/store/reducer.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff 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

259259
const 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([

0 commit comments

Comments
 (0)