Skip to content

Commit bf1ef65

Browse files
committed
fix: review
1 parent 342cecb commit bf1ef65

File tree

3 files changed

+74
-57
lines changed

3 files changed

+74
-57
lines changed

src/containers/Cluster/Cluster.scss

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,27 @@
88

99
width: 100%;
1010
height: 100%;
11-
padding: 0 var(--cluster-side-padding);
11+
12+
&__sticky-wrapper {
13+
padding: 0 var(--cluster-side-padding);
14+
}
15+
16+
&__dashboard {
17+
position: sticky;
18+
left: 0;
19+
20+
padding: 0 var(--cluster-side-padding);
21+
}
22+
23+
&__content {
24+
padding: 0 var(--cluster-side-padding);
25+
}
1226

1327
&__header {
1428
position: sticky;
1529
left: 0;
1630

17-
padding: 20px 0;
31+
padding: var(--g-spacing-5) var(--cluster-side-padding);
1832
}
1933

2034
&__title {
@@ -31,13 +45,8 @@
3145
&__tabs-sticky-wrapper {
3246
z-index: 3;
3347

34-
width: calc(100% + var(--cluster-side-padding) * 2);
3548
margin-top: 20px;
36-
margin-right: calc(var(--cluster-side-padding) * -2);
37-
padding-right: calc(var(--cluster-side-padding) * 1);
38-
padding-left: var(--cluster-side-padding);
39-
40-
transform: translateX(calc(var(--cluster-side-padding) * -1));
49+
padding: 0 var(--cluster-side-padding);
4150
@include mixins.sticky-top();
4251
}
4352
&__tabs {

src/containers/Cluster/Cluster.tsx

Lines changed: 57 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,15 @@ export function Cluster({
123123
<AutoRefreshControl className={b('auto-refresh-control')} />
124124
</div>
125125
{isClusterDashboardAvailable && (
126-
<ClusterOverview
127-
cluster={cluster ?? {}}
128-
groupStats={groupsStats}
129-
loading={infoLoading}
130-
error={clusterError || cluster?.error}
131-
additionalClusterProps={additionalClusterProps}
132-
/>
126+
<div className={b('dashboard')}>
127+
<ClusterOverview
128+
cluster={cluster ?? {}}
129+
groupStats={groupsStats}
130+
loading={infoLoading}
131+
error={clusterError || cluster?.error}
132+
additionalClusterProps={additionalClusterProps}
133+
/>
134+
</div>
133135
)}
134136
<div className={b('tabs-sticky-wrapper')}>
135137
<Tabs
@@ -153,46 +155,54 @@ export function Cluster({
153155
}}
154156
/>
155157
</div>
156-
<Switch>
157-
<Route
158-
path={
159-
getLocationObjectFromHref(getClusterPath(clusterTabsIds.tablets)).pathname
160-
}
161-
>
162-
<TabletsTable loading={infoLoading} tablets={clusterTablets} />
163-
</Route>
164-
<Route
165-
path={
166-
getLocationObjectFromHref(getClusterPath(clusterTabsIds.tenants)).pathname
167-
}
168-
>
169-
<Tenants additionalTenantsProps={additionalTenantsProps} />
170-
</Route>
171-
<Route
172-
path={getLocationObjectFromHref(getClusterPath(clusterTabsIds.nodes)).pathname}
173-
>
174-
<Nodes parentRef={container} additionalNodesProps={additionalNodesProps} />
175-
</Route>
176-
<Route
177-
path={
178-
getLocationObjectFromHref(getClusterPath(clusterTabsIds.storage)).pathname
179-
}
180-
>
181-
<PaginatedStorage parentRef={container} />
182-
</Route>
183-
<Route
184-
path={
185-
getLocationObjectFromHref(getClusterPath(clusterTabsIds.versions)).pathname
186-
}
187-
>
188-
<VersionsContainer cluster={cluster} loading={infoLoading} />
189-
</Route>
190-
<Route
191-
render={() => (
192-
<Redirect to={getLocationObjectFromHref(getClusterPath(activeTabId))} />
193-
)}
194-
/>
195-
</Switch>
158+
<div className={b('content')}>
159+
<Switch>
160+
<Route
161+
path={
162+
getLocationObjectFromHref(getClusterPath(clusterTabsIds.tablets))
163+
.pathname
164+
}
165+
>
166+
<TabletsTable loading={infoLoading} tablets={clusterTablets} />
167+
</Route>
168+
<Route
169+
path={
170+
getLocationObjectFromHref(getClusterPath(clusterTabsIds.tenants))
171+
.pathname
172+
}
173+
>
174+
<Tenants additionalTenantsProps={additionalTenantsProps} />
175+
</Route>
176+
<Route
177+
path={
178+
getLocationObjectFromHref(getClusterPath(clusterTabsIds.nodes)).pathname
179+
}
180+
>
181+
<Nodes parentRef={container} additionalNodesProps={additionalNodesProps} />
182+
</Route>
183+
<Route
184+
path={
185+
getLocationObjectFromHref(getClusterPath(clusterTabsIds.storage))
186+
.pathname
187+
}
188+
>
189+
<PaginatedStorage parentRef={container} />
190+
</Route>
191+
<Route
192+
path={
193+
getLocationObjectFromHref(getClusterPath(clusterTabsIds.versions))
194+
.pathname
195+
}
196+
>
197+
<VersionsContainer cluster={cluster} loading={infoLoading} />
198+
</Route>
199+
<Route
200+
render={() => (
201+
<Redirect to={getLocationObjectFromHref(getClusterPath(activeTabId))} />
202+
)}
203+
/>
204+
</Switch>
205+
</div>
196206
</div>
197207
);
198208
}

src/containers/Cluster/ClusterOverview/ClusterOverview.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
&__overview-wrapper {
3131
--g-button-background-color-hover: var(--g-color-base-background);
3232
--g-button-padding: 0;
33-
position: sticky;
34-
left: 0;
3533

3634
padding: var(--g-spacing-4);
3735

0 commit comments

Comments
 (0)