Skip to content

Commit 11d59a0

Browse files
committed
fix: better styles
1 parent 7255bfd commit 11d59a0

File tree

4 files changed

+24
-21
lines changed

4 files changed

+24
-21
lines changed

src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TenantCpu.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use '../../../../../styles/mixins.scss';
2+
13
.tenant-cpu {
24
&__tabs-container {
35
margin-top: var(--g-spacing-3);
@@ -6,4 +8,14 @@
68
&__tab-content {
79
margin-top: var(--g-spacing-3);
810
}
11+
12+
&__all-nodes-link {
13+
display: flex;
14+
align-items: center;
15+
gap: var(--g-spacing-1);
16+
17+
margin-right: var(--g-spacing-2);
18+
19+
@include mixins.body-1-typography();
20+
}
921
}

src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TenantCpu.tsx

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
import React from 'react';
22

3-
import {ChevronRight} from '@gravity-ui/icons';
4-
import {
5-
Button,
6-
Flex,
7-
Icon,
8-
SegmentedRadioGroup,
9-
Tab,
10-
TabList,
11-
TabProvider,
12-
} from '@gravity-ui/uikit';
3+
import {ArrowRight} from '@gravity-ui/icons';
4+
import {Flex, Icon, SegmentedRadioGroup, Tab, TabList, TabProvider} from '@gravity-ui/uikit';
135
import {useLocation} from 'react-router-dom';
146

157
import {InternalLink} from '../../../../../components/InternalLink';
@@ -25,6 +17,7 @@ import {useTypedDispatch, useTypedSelector} from '../../../../../utils/hooks';
2517
import {useDiagnosticsPageLinkGetter} from '../../../Diagnostics/DiagnosticsPages';
2618
import {TenantTabsGroups, getTenantPath} from '../../../TenantPages';
2719
import {TenantDashboard} from '../TenantDashboard/TenantDashboard';
20+
import i18n from '../i18n';
2821

2922
import {TopNodesByCpu} from './TopNodesByCpu';
3023
import {TopNodesByLoad} from './TopNodesByLoad';
@@ -81,14 +74,13 @@ export function TenantCpu({tenantName, additionalNodesProps}: TenantCpuProps) {
8174
);
8275

8376
const allNodesButton = (
84-
<Button
85-
view="flat-secondary"
86-
size="s"
87-
href={getDiagnosticsPageLink(TENANT_DIAGNOSTICS_TABS_IDS.nodes)}
77+
<InternalLink
78+
className={b('all-nodes-link')}
79+
to={getDiagnosticsPageLink(TENANT_DIAGNOSTICS_TABS_IDS.nodes)}
8880
>
89-
All Nodes
90-
<Icon data={ChevronRight} size={16} />
91-
</Button>
81+
{i18n('action_all-nodes')}
82+
<Icon data={ArrowRight} size={16} />
83+
</InternalLink>
9284
);
9385

9486
const nodesComponent =
@@ -105,7 +97,7 @@ export function TenantCpu({tenantName, additionalNodesProps}: TenantCpuProps) {
10597
);
10698

10799
return (
108-
<Flex direction="column" gap={3}>
100+
<Flex direction="column" gap={2}>
109101
<Flex justifyContent="space-between" alignItems="center">
110102
{nodesModeControl}
111103
{allNodesButton}

src/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@
3434
&__title {
3535
margin-bottom: 10px;
3636

37-
font-weight: 700;
38-
39-
@include mixins.body-2-typography();
37+
@include mixins.subheader-1-typography();
4038
}
4139

4240
&__table {

src/containers/Tenant/Diagnostics/TenantOverview/i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"by-memory": "by memory",
1717
"by-usage": "by usage",
1818
"by-size": "by size",
19+
"action_all-nodes": "All Nodes",
1920
"cards.cpu-label": "CPU load",
2021
"cards.storage-label": "Storage",
2122
"cards.memory-label": "Memory used",

0 commit comments

Comments
 (0)