Skip to content

Commit 33fc57e

Browse files
committed
refactor(OverloadedShards): rename to TopShards to match display name
1 parent ffa4f27 commit 33fc57e

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

src/containers/Tenant/Diagnostics/Diagnostics.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {Loader} from '../../../components/Loader';
1212
import {TopQueries} from './TopQueries';
1313
//@ts-ignore
1414
import DetailedOverview from './DetailedOverview/DetailedOverview';
15-
import {OverloadedShards} from './OverloadedShards';
15+
import {TopShards} from './TopShards';
1616
//@ts-ignore
1717
import Storage from '../../Storage/Storage';
1818
//@ts-ignore
@@ -124,8 +124,8 @@ function Diagnostics(props: DiagnosticsProps) {
124124
/>
125125
);
126126
}
127-
case GeneralPagesIds.overloadedShards: {
128-
return <OverloadedShards tenantPath={tenantNameString} type={type} />;
127+
case GeneralPagesIds.topShards: {
128+
return <TopShards tenantPath={tenantNameString} type={type} />;
129129
}
130130
case GeneralPagesIds.nodes: {
131131
return (

src/containers/Tenant/Diagnostics/DiagnosticsPages.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {EPathType} from '../../../types/api/schema';
33
export enum GeneralPagesIds {
44
'overview' = 'Overview',
55
'topQueries' = 'topQueries',
6-
'overloadedShards' = 'overloadedShards',
6+
'topShards' = 'topShards',
77
'nodes' = 'Nodes',
88
'tablets' = 'Tablets',
99
'storage' = 'Storage',
@@ -29,8 +29,8 @@ const topQueries = {
2929
title: 'Top queries',
3030
};
3131

32-
const overloadedShards = {
33-
id: GeneralPagesIds.overloadedShards,
32+
const topShards = {
33+
id: GeneralPagesIds.topShards,
3434
title: 'Top shards',
3535
};
3636

@@ -75,17 +75,17 @@ const consumers = {
7575
export const DATABASE_PAGES = [
7676
overview,
7777
topQueries,
78-
overloadedShards,
78+
topShards,
7979
nodes,
8080
tablets,
8181
storage,
8282
network,
8383
describe,
8484
];
8585

86-
export const TABLE_PAGES = [overview, overloadedShards, graph, tablets, hotKeys, describe];
86+
export const TABLE_PAGES = [overview, topShards, graph, tablets, hotKeys, describe];
8787

88-
export const DIR_PAGES = [overview, overloadedShards, describe];
88+
export const DIR_PAGES = [overview, topShards, describe];
8989

9090
export const CDC_STREAM_PAGES = [overview, consumers, describe];
9191
export const TOPIC_PAGES = [overview, consumers, describe];

src/containers/Tenant/Diagnostics/OverloadedShards/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/containers/Tenant/Diagnostics/OverloadedShards/OverloadedShards.scss renamed to src/containers/Tenant/Diagnostics/TopShards/TopShards.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.overloaded-shards {
1+
.top-shards {
22
display: flex;
33
flex-direction: column;
44

src/containers/Tenant/Diagnostics/OverloadedShards/OverloadedShards.tsx renamed to src/containers/Tenant/Diagnostics/TopShards/TopShards.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ import {getDefaultNodePath} from '../../../Node/NodePages';
3232
import {isColumnEntityType} from '../../utils/schema';
3333

3434
import i18n from './i18n';
35-
import './OverloadedShards.scss';
35+
import './TopShards.scss';
3636

37-
const b = cn('overloaded-shards');
37+
const b = cn('top-shards');
3838
const bLink = cn('yc-link');
3939

4040
const TABLE_SETTINGS: Settings = {
@@ -83,12 +83,12 @@ function dataTableToStringSortOrder(value: SortOrder | SortOrder[] = []) {
8383
return sortOrders.map(({columnId}) => columnId).join(',');
8484
}
8585

86-
interface OverloadedShardsProps {
86+
interface TopShardsProps {
8787
tenantPath: string;
8888
type?: EPathType;
8989
}
9090

91-
export const OverloadedShards = ({tenantPath, type}: OverloadedShardsProps) => {
91+
export const TopShards = ({tenantPath, type}: TopShardsProps) => {
9292
const dispatch = useDispatch();
9393

9494
const {autorefresh, currentSchemaPath} = useTypedSelector((state) => state.schema);
@@ -144,7 +144,7 @@ export const OverloadedShards = ({tenantPath, type}: OverloadedShardsProps) => {
144144
const history = useContext(HistoryContext);
145145

146146
const onSort = (newSortOrder?: SortOrder | SortOrder[]) => {
147-
// omit information about sort order to disable ASC order, only DESC makes sense for overloaded shards
147+
// omit information about sort order to disable ASC order, only DESC makes sense for top shards
148148
// use a string (and not the DataTable default format) to prevent reference change,
149149
// which would cause an excess state change, to avoid repeating requests
150150
setSortOrder(dataTableToStringSortOrder(newSortOrder));

src/containers/Tenant/Diagnostics/OverloadedShards/i18n/index.ts renamed to src/containers/Tenant/Diagnostics/TopShards/i18n/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {i18n, Lang} from '../../../../../utils/i18n';
33
import en from './en.json';
44
import ru from './ru.json';
55

6-
const COMPONENT = 'ydb-diagnostics-overloaded-shards';
6+
const COMPONENT = 'ydb-diagnostics-top-shards';
77

88
i18n.registerKeyset(Lang.En, COMPONENT, en);
99
i18n.registerKeyset(Lang.Ru, COMPONENT, ru);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './TopShards';

0 commit comments

Comments
 (0)