Skip to content

Commit 504295a

Browse files
committed
fix: review fixes
1 parent 848aea3 commit 504295a

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

src/containers/Cluster/ClusterInfo/ClusterInfo.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import {getInfo, getStorageGroupStats} from './utils/utils';
2020

2121
import './ClusterInfo.scss';
2222

23+
const GROUPS_SECTION_GAP = 10;
24+
2325
interface ClusterInfoProps {
2426
cluster?: TClusterInfo;
2527
loading?: boolean;
@@ -99,7 +101,7 @@ export const ClusterInfo = ({
99101
}
100102
return (
101103
<InfoSection>
102-
<Flex gap={10} width="full">
104+
<Flex gap={GROUPS_SECTION_GAP} width="full">
103105
<Flex direction="column" gap={2}>
104106
<Text as="div" variant="subheader-2" className={b('section-title')}>
105107
{i18n('title_storage-groups')}{' '}

src/containers/Cluster/ClusterOverview/ClusterOverview.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function ClusterOverview(props: ClusterOverviewProps) {
4545
const {BridgeInfo} = props.cluster;
4646
const shouldShowBridge = bridgeModeEnabled && Boolean(BridgeInfo?.Piles?.length);
4747
if (shouldShowBridge) {
48-
bridgePiles = BridgeInfo?.Piles ?? getMockBridgePiles();
48+
bridgePiles = BridgeInfo?.Piles;
4949
}
5050
}
5151
if (props.error) {
@@ -161,9 +161,4 @@ function ClusterDoughnuts({cluster, groupStats = {}, loading, collapsed}: Cluste
161161
return metricsCards;
162162
}
163163

164-
function getMockBridgePiles(): TBridgePile[] {
165-
return [
166-
{PileId: 1, Name: 'r1', State: 'SYNCHRONIZED', IsPrimary: true, Nodes: 16},
167-
{PileId: 2, Name: 'r2', State: 'SYNCHRONIZED', IsPrimary: false, Nodes: 16},
168-
];
169-
}
164+
//

src/store/reducers/capabilities/hooks.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//
2-
31
import type {Capability, MetaCapability, SecuritySetting} from '../../../types/api/capabilities';
42
import {useTypedSelector} from '../../../utils/hooks';
53
import {useDatabaseFromQuery} from '../../../utils/hooks/useDatabaseFromQuery';

tests/suites/bridge/mocks.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ export const mockCapabilities = (page: Page, enabled: boolean) => {
77
await route.fulfill({
88
status: 200,
99
contentType: 'application/json',
10-
body: JSON.stringify({Database: '/local', Capabilities: {BridgeModeEnabled: enabled}}),
10+
body: JSON.stringify({
11+
Database: '/local',
12+
Settings: {Cluster: {BridgeModeEnabled: enabled}},
13+
Capabilities: {},
14+
}),
1115
});
1216
});
1317
};

0 commit comments

Comments
 (0)