Skip to content

Commit 55c0a61

Browse files
committed
refactor(TopShards): rename to OverloadedShards to match display name
1 parent d9978bd commit 55c0a61

File tree

15 files changed

+37
-37
lines changed

15 files changed

+37
-37
lines changed

src/containers/Tenant/Diagnostics/Diagnostics.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {Loader} from '../../../components/Loader';
1313
import TopQueries from './TopQueries/TopQueries';
1414
//@ts-ignore
1515
import DetailedOverview from './DetailedOverview/DetailedOverview';
16-
import {TopShards} from './TopShards';
16+
import {OverloadedShards} from './OverloadedShards';
1717
//@ts-ignore
1818
import Storage from '../../Storage/Storage';
1919
//@ts-ignore
@@ -130,8 +130,8 @@ function Diagnostics(props: DiagnosticsProps) {
130130
/>
131131
);
132132
}
133-
case GeneralPagesIds.topShards: {
134-
return <TopShards tenantPath={tenantNameString} type={type} />;
133+
case GeneralPagesIds.overloadedShards: {
134+
return <OverloadedShards tenantPath={tenantNameString} type={type} />;
135135
}
136136
case GeneralPagesIds.nodes: {
137137
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-
'topShards' = 'topShards',
6+
'overloadedShards' = 'overloadedShards',
77
'nodes' = 'Nodes',
88
'tablets' = 'Tablets',
99
'storage' = 'Storage',
@@ -29,8 +29,8 @@ const topQueries = {
2929
title: 'Top queries',
3030
};
3131

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

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

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

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

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.top-shards {
1+
.overloaded-shards {
22
&__date-range {
33
&-input {
44
min-width: 190px;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {ChangeEventHandler} from 'react';
33

44
import './DateRange.scss';
55

6-
const b = cn('top-shards');
6+
const b = cn('overloaded-shards');
77

88
export interface DateRangeValues {
99
/** ms from epoch */

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

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

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import routes, {createHref} from '../../../../routes';
1313

1414
import {
1515
sendShardQuery,
16-
setShardQueryOptions,
17-
setTopShardFilters,
16+
setShardsState,
17+
setShardsQueryFilters,
1818
} from '../../../../store/reducers/shardsWorkload';
1919
import {setCurrentSchemaPath, getSchema} from '../../../../store/reducers/schema';
2020
import type {IShardsWorkloadFilters} from '../../../../types/store/shardsWorkload';
@@ -33,9 +33,9 @@ import {isColumnEntityType} from '../../utils/schema';
3333
import {DateRange, DateRangeValues} from './DateRange';
3434

3535
import i18n from './i18n';
36-
import './TopShards.scss';
36+
import './OverloadedShards.scss';
3737

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

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

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

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

9494
const {autorefresh, currentSchemaPath} = useTypedSelector((state) => state.schema);
@@ -134,7 +134,7 @@ export const TopShards = ({tenantPath, type}: TopShardsProps) => {
134134
// don't show loader for requests triggered by table sort, only for path change
135135
useEffect(() => {
136136
dispatch(
137-
setShardQueryOptions({
137+
setShardsState({
138138
wasLoaded: false,
139139
data: undefined,
140140
}),
@@ -144,14 +144,14 @@ export const TopShards = ({tenantPath, type}: TopShardsProps) => {
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 top shards
147+
// omit information about sort order to disable ASC order, only DESC makes sense for overloaded 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));
151151
};
152152

153153
const handleDateRangeChange = (value: DateRangeValues) => {
154-
dispatch(setTopShardFilters(value));
154+
dispatch(setShardsQueryFilters(value));
155155
setFilters(value);
156156
};
157157

src/containers/Tenant/Diagnostics/TopShards/i18n/index.ts renamed to src/containers/Tenant/Diagnostics/OverloadedShards/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-top-shards';
6+
const COMPONENT = 'ydb-diagnostics-overloaded-shards';
77

88
i18n.registerKeyset(Lang.En, COMPONENT, en);
99
i18n.registerKeyset(Lang.Ru, COMPONENT, ru);

0 commit comments

Comments
 (0)