Skip to content

Commit d06f228

Browse files
committed
chore: rename MetricsCards to MetricsTabs
1 parent 1b5edfb commit d06f228

File tree

5 files changed

+16
-18
lines changed

5 files changed

+16
-18
lines changed

src/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.scss renamed to src/containers/Tenant/Diagnostics/TenantOverview/MetricsTabs/MetricsTabs.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,20 @@
7575
*/
7676

7777
@mixin tab-edge-filler($side) {
78-
&.tenant-metrics-cards__link-container_active::after {
78+
&.tenant-metrics-tabs__link-container_active::after {
7979
@include pseudo-active-filler($side);
8080
}
8181

82-
&:not(.tenant-metrics-cards__link-container_active)::after {
82+
&:not(.tenant-metrics-tabs__link-container_active)::after {
8383
@include pseudo-inactive-filler($side);
8484
}
8585

86-
&:not(.tenant-metrics-cards__link-container_active)::before {
86+
&:not(.tenant-metrics-tabs__link-container_active)::before {
8787
@include pseudo-background-fill($side);
8888
}
8989
}
9090

91-
.tenant-metrics-cards {
91+
.tenant-metrics-tabs {
9292
// CSS Variables for consistent design system
9393
--tab-border-width: 1px;
9494
--tab-filler-size: 10px;
@@ -198,7 +198,7 @@
198198
}
199199
}
200200

201-
.tenant-metrics-cards__link {
201+
.tenant-metrics-tabs__link {
202202
padding-bottom: var(--tab-border-compensation);
203203
@include tab-border-base(var(--g-color-line-generic));
204204
}

src/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.tsx renamed to src/containers/Tenant/Diagnostics/TenantOverview/MetricsTabs/MetricsTabs.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,25 @@ import {TenantTabsGroups, getTenantPath} from '../../../TenantPages';
2121
import {TabCard} from '../TabCard/TabCard';
2222
import i18n from '../i18n';
2323

24-
import './MetricsCards.scss';
24+
import './MetricsTabs.scss';
2525

26-
const b = cn('tenant-metrics-cards');
26+
const b = cn('tenant-metrics-tabs');
2727

28-
interface MetricsCardsProps {
28+
interface MetricsTabsProps {
2929
poolsCpuStats?: TenantPoolsStats[];
3030
memoryStats?: TenantMetricStats[];
3131
blobStorageStats?: TenantStorageStats[];
3232
tabletStorageStats?: TenantStorageStats[];
3333
networkStats?: TenantMetricStats[];
3434
}
3535

36-
export function MetricsCards({
36+
export function MetricsTabs({
3737
poolsCpuStats,
3838
memoryStats,
3939
blobStorageStats,
4040
tabletStorageStats,
4141
networkStats,
42-
}: MetricsCardsProps) {
42+
}: MetricsTabsProps) {
4343
const location = useLocation();
4444
const {metricsTab} = useTypedSelector((state) => state.tenant);
4545
const queryParams = parseQuery(location);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {useClusterNameFromQuery} from '../../../../utils/hooks/useDatabaseFromQu
1515
import {mapDatabaseTypeToDBName} from '../../utils/schema';
1616

1717
import {HealthcheckPreview} from './Healthcheck/HealthcheckPreview';
18-
import {MetricsCards} from './MetricsCards/MetricsCards';
18+
import {MetricsTabs} from './MetricsTabs/MetricsTabs';
1919
import {TenantCpu} from './TenantCpu/TenantCpu';
2020
import {TenantMemory} from './TenantMemory/TenantMemory';
2121
import {TenantStorage} from './TenantStorage/TenantStorage';
@@ -163,7 +163,7 @@ export function TenantOverview({
163163
<Flex direction="column" gap={4}>
164164
<HealthcheckPreview tenantName={tenantName} />
165165
<QueriesActivityBar tenantName={tenantName} />
166-
<MetricsCards
166+
<MetricsTabs
167167
poolsCpuStats={poolsStats}
168168
memoryStats={memoryStats}
169169
blobStorageStats={blobStorageStats}

src/utils/metrics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export const getHighestSeverityStatus = (statuses: MetricStatus[]): MetricStatus
7979

8080
/**
8181
* Calculate metric aggregates (sum of used/limit values) and determine status
82-
* This replaces the repetitive calculation logic from MetricsCards.tsx
82+
* This replaces the repetitive calculation logic from MetricsTabs.tsx
8383
*/
8484
export const calculateMetricAggregates = <T extends MetricStats>(
8585
items: T[] = [],

tests/suites/tenant/diagnostics/Diagnostics.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,9 @@ export class Diagnostics {
304304
this.copyLinkButton = page.locator('.ydb-copy-link-button__icon');
305305

306306
// Info tab cards
307-
this.cpuCard = page.locator('.tenant-metrics-cards__link-container:has-text("CPU")');
308-
this.storageCard = page.locator(
309-
'.tenant-metrics-cards__link-container:has-text("Storage")',
310-
);
311-
this.memoryCard = page.locator('.tenant-metrics-cards__link-container:has-text("Memory")');
307+
this.cpuCard = page.locator('.tenant-metrics-tabs__link-container:has-text("CPU")');
308+
this.storageCard = page.locator('.tenant-metrics-tabs__link-container:has-text("Storage")');
309+
this.memoryCard = page.locator('.tenant-metrics-tabs__link-container:has-text("Memory")');
312310
this.healthcheckCard = page.locator('.ydb-healthcheck-preview');
313311
this.ownerCard = page.locator('.ydb-access-rights__owner-card');
314312
this.changeOwnerButton = page.locator('.ydb-access-rights__owner-card button');

0 commit comments

Comments
 (0)