ydb-embedded-ui 1.14.2 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +42 -0
- package/dist/assets/illustrations/dark/thumbsUp.svg +15 -0
- package/dist/assets/illustrations/light/thumbsUp.svg +15 -0
- package/dist/components/AsideNavigation/AsideHeader.tsx +1 -1
- package/dist/components/AsideNavigation/AsideHeaderFooterItem/AsideHeaderFooterItem.tsx +1 -1
- package/dist/components/AsideNavigation/AsideHeaderTooltip/AsideHeaderTooltip.tsx +1 -1
- package/dist/components/AsideNavigation/CompositeBar/CompositeBar.tsx +1 -1
- package/dist/components/AsideNavigation/Logo/Logo.tsx +1 -1
- package/dist/components/AsideNavigation/Settings/Settings.tsx +1 -1
- package/dist/components/AsideNavigation/Settings/SettingsMenu/SettingsMenu.tsx +1 -1
- package/dist/components/AsideNavigation/Settings/SettingsSearch/SettingsSearch.tsx +1 -1
- package/dist/components/AsideNavigation/Settings/collect-settings.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/ClusterInfo/ClusterInfo.tsx +1 -1
- package/dist/components/Collapse/Collapse.js +1 -1
- package/dist/components/CopyToClipboard/CopyToClipboard.tsx +1 -1
- package/dist/components/CriticalActionDialog/CriticalActionDialog.js +1 -1
- package/dist/components/EmptyState/EmptyState.scss +0 -1
- package/dist/components/EnableFullscreenButton/EnableFullscreenButton.tsx +1 -1
- package/dist/components/EntityStatus/EntityStatus.js +28 -3
- package/dist/components/EntityStatus/EntityStatus.scss +22 -1
- package/dist/components/Fullscreen/Fullscreen.tsx +1 -1
- package/dist/components/Icon/Icon.js +1 -1
- package/dist/components/Illustration/Illustration.tsx +3 -1
- package/dist/components/Loader/Loader.tsx +1 -1
- package/dist/components/NodesViewer/NodesViewer.js +5 -2
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/ProblemFilter/ProblemFilter.js +1 -1
- package/dist/components/ShortyString/ShortyString.tsx +1 -1
- package/dist/components/TableSkeleton/TableSkeleton.tsx +1 -1
- package/dist/components/TabletsOverall/TabletsOverall.tsx +1 -1
- package/dist/containers/App/App.js +1 -1
- package/dist/containers/App/App.scss +0 -10
- package/dist/containers/App/Content.js +1 -1
- package/dist/containers/App/TipPopup/TipPopup.js +1 -1
- package/dist/containers/AsideNavigation/AsideNavigation.tsx +1 -1
- package/dist/containers/Authentication/Authentication.tsx +1 -1
- package/dist/containers/Group/Group.js +1 -1
- package/dist/containers/Header/Header.tsx +1 -1
- package/dist/containers/Header/Host/Host.js +1 -1
- package/dist/containers/Heatmap/Heatmap.js +1 -1
- package/dist/containers/Node/Node.tsx +1 -1
- package/dist/containers/Node/NodeStructure/Pdisk.tsx +1 -1
- package/dist/containers/Nodes/Nodes.js +4 -2
- package/dist/containers/Pdisk/Pdisk.js +1 -1
- package/dist/containers/Pool/Pool.js +3 -2
- package/dist/containers/ReduxTooltip/ReduxTooltip.js +1 -1
- package/dist/containers/Storage/EmptyFilter/EmptyFilter.tsx +34 -0
- package/dist/containers/Storage/EmptyFilter/i18n/en.json +4 -0
- package/dist/containers/Storage/EmptyFilter/i18n/index.ts +11 -0
- package/dist/containers/Storage/EmptyFilter/i18n/ru.json +4 -0
- package/dist/containers/Storage/Pdisk/Pdisk.tsx +1 -1
- package/dist/containers/Storage/Storage.js +3 -1
- package/dist/containers/Storage/StorageFilter/StorageFilter.tsx +2 -1
- package/dist/containers/Storage/StorageGroups/StorageGroups.tsx +27 -6
- package/dist/containers/Storage/StorageGroups/i18n/en.json +6 -0
- package/dist/containers/Storage/StorageGroups/i18n/index.ts +11 -0
- package/dist/containers/Storage/StorageGroups/i18n/ru.json +6 -0
- package/dist/containers/Storage/StorageNodes/StorageNodes.tsx +24 -7
- package/dist/containers/Storage/StorageNodes/i18n/en.json +6 -0
- package/dist/containers/Storage/StorageNodes/i18n/index.ts +11 -0
- package/dist/containers/Storage/StorageNodes/i18n/ru.json +6 -0
- package/dist/containers/Storage/UsageFilter/UsageFilter.tsx +1 -1
- package/dist/containers/Storage/Vdisk/Vdisk.js +1 -1
- package/dist/containers/Tablet/Tablet.js +1 -1
- package/dist/containers/Tablets/Tablets.js +1 -1
- package/dist/containers/TabletsFilters/TabletsFilters.js +1 -1
- package/dist/containers/Tenant/Acl/Acl.js +1 -1
- package/dist/containers/Tenant/Diagnostics/Compute/Compute.js +1 -1
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.js +1 -1
- package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.tsx +3 -4
- package/dist/containers/Tenant/Diagnostics/Diagnostics.tsx +1 -1
- package/dist/containers/Tenant/Diagnostics/Healthcheck/Healthcheck.scss +7 -1
- package/dist/containers/Tenant/Diagnostics/Healthcheck/Healthcheck.tsx +86 -0
- package/dist/containers/Tenant/Diagnostics/Healthcheck/IssuePreview/IssuePreview.tsx +34 -0
- package/dist/containers/Tenant/Diagnostics/Healthcheck/IssuePreview/index.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Healthcheck/IssuesList/IssuesList.tsx +69 -0
- package/dist/containers/Tenant/Diagnostics/Healthcheck/IssuesList/index.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Healthcheck/Preview/Preview.tsx +80 -0
- package/dist/containers/Tenant/Diagnostics/Healthcheck/Preview/index.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Healthcheck/i18n/en.json +11 -0
- package/dist/containers/Tenant/Diagnostics/Healthcheck/i18n/index.ts +11 -0
- package/dist/containers/Tenant/Diagnostics/Healthcheck/i18n/ru.json +11 -0
- package/dist/containers/Tenant/Diagnostics/Healthcheck/index.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +1 -1
- package/dist/containers/Tenant/Diagnostics/Network/Network.js +3 -2
- package/dist/containers/Tenant/Diagnostics/Network/Network.scss +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.tsx +17 -35
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +3 -3
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +3 -3
- package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.tsx +1 -1
- package/dist/containers/Tenant/ObjectGeneralTabs/ObjectGeneralTabs.tsx +1 -1
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.tsx +1 -1
- package/dist/containers/Tenant/Preview/Preview.js +1 -1
- package/dist/containers/Tenant/QueryEditor/Issues/Issues.scss +2 -3
- package/dist/containers/Tenant/QueryEditor/Issues/Issues.tsx +1 -1
- package/dist/containers/Tenant/QueryEditor/QueriesHistory/QueriesHistory.tsx +1 -1
- package/dist/containers/Tenant/QueryEditor/QueryEditor.js +2 -2
- package/dist/containers/Tenant/QueryEditor/QueryExplain/QueryExplain.js +63 -45
- package/dist/containers/Tenant/QueryEditor/QueryExplain/QueryExplain.scss +8 -4
- package/dist/containers/Tenant/QueryEditor/QueryResult/QueryResult.js +1 -1
- package/dist/containers/Tenant/QueryEditor/QueryResult/QueryResult.scss +1 -0
- package/dist/containers/Tenant/QueryEditor/SaveQuery/SaveQuery.js +1 -1
- package/dist/containers/Tenant/QueryEditor/SavedQueries/SavedQueries.js +1 -1
- package/dist/containers/Tenant/Schema/SchemaInfoViewer/SchemaInfoViewer.scss +2 -2
- package/dist/containers/Tenant/utils/paneVisibilityToggleHelpers.tsx +1 -1
- package/dist/containers/Tenants/Tenants.js +4 -2
- package/dist/containers/UserSettings/UserSettings.tsx +2 -2
- package/dist/containers/Vdisk/Vdisk.js +1 -1
- package/dist/containers/VdiskPdiskNode/VdiskPdiskNode.js +1 -1
- package/dist/index.js +1 -1
- package/dist/services/api.d.ts +9 -0
- package/dist/setupTests.js +1 -1
- package/dist/store/reducers/executeTopQueries.js +6 -9
- package/dist/store/reducers/explainQuery.js +27 -36
- package/dist/store/reducers/olapStats.js +6 -8
- package/dist/store/reducers/shardsWorkload.js +6 -8
- package/dist/types/api/healthcheck.ts +91 -0
- package/dist/types/api/query.ts +32 -21
- package/dist/types/assets.d.ts +1 -1
- package/dist/types/store/healthcheck.ts +3 -0
- package/dist/types/store/query.ts +1 -1
- package/dist/utils/createToast.tsx +1 -1
- package/dist/utils/getNodesColumns.js +1 -1
- package/dist/utils/hooks/index.ts +1 -0
- package/dist/utils/hooks/useAutofetcher.ts +29 -0
- package/dist/utils/i18n/i18n.ts +1 -1
- package/dist/utils/prepareQueryExplain.ts +0 -4
- package/dist/utils/query.test.ts +59 -1
- package/dist/utils/query.ts +38 -4
- package/package.json +9 -11
- package/dist/containers/Tenant/Diagnostics/Healthcheck/Healthcheck.js +0 -195
@@ -8,7 +8,7 @@ import {showTooltip, hideTooltip} from '../../store/reducers/tooltip';
|
|
8
8
|
import {COLORS_RANGE_SIZE, getColorRange, getColorIndex, getCurrentMetricLimits} from './util';
|
9
9
|
import {formatNumber} from '../../utils';
|
10
10
|
|
11
|
-
import {Loader, Checkbox, Select} from '@
|
11
|
+
import {Loader, Checkbox, Select} from '@gravity-ui/uikit';
|
12
12
|
import {HeatmapCanvas} from './HeatmapCanvas/HeatmapCanvas';
|
13
13
|
import {Histogram} from './Histogram/Histogram';
|
14
14
|
import {AutoFetcher} from '../../utils/autofetcher';
|
@@ -4,7 +4,7 @@ import cn from 'bem-cn-lite';
|
|
4
4
|
import {useDispatch, useSelector} from 'react-redux';
|
5
5
|
import _ from 'lodash';
|
6
6
|
|
7
|
-
import {Tabs} from '@
|
7
|
+
import {Tabs} from '@gravity-ui/uikit';
|
8
8
|
import {Link} from 'react-router-dom';
|
9
9
|
|
10
10
|
import {TABLETS, STORAGE, NODE_PAGES, OVERVIEW, STRUCTURE} from './NodePages';
|
@@ -2,7 +2,7 @@ import {useState} from 'react';
|
|
2
2
|
import cn from 'bem-cn-lite';
|
3
3
|
import _ from 'lodash';
|
4
4
|
|
5
|
-
import {ArrowToggle, Button, Popover} from '@
|
5
|
+
import {ArrowToggle, Button, Popover} from '@gravity-ui/uikit';
|
6
6
|
|
7
7
|
import DataTable, {Column, Settings} from '@yandex-cloud/react-data-table';
|
8
8
|
|
@@ -4,9 +4,10 @@ import cn from 'bem-cn-lite';
|
|
4
4
|
import {connect} from 'react-redux';
|
5
5
|
|
6
6
|
import DataTable from '@yandex-cloud/react-data-table';
|
7
|
-
import {Loader, TextInput, Label} from '@
|
7
|
+
import {Loader, TextInput, Label} from '@gravity-ui/uikit';
|
8
8
|
|
9
9
|
import ProblemFilter, {problemFilterType} from '../../components/ProblemFilter/ProblemFilter';
|
10
|
+
import {Illustration} from '../../components/Illustration';
|
10
11
|
|
11
12
|
import {hideTooltip, showTooltip} from '../../store/reducers/tooltip';
|
12
13
|
import {withSearch} from '../../HOCS';
|
@@ -86,6 +87,7 @@ class Nodes extends React.Component {
|
|
86
87
|
text={searchQuery}
|
87
88
|
onUpdate={this.handleSearchQueryChange}
|
88
89
|
hasClear
|
90
|
+
autoFocus
|
89
91
|
/>
|
90
92
|
<ProblemFilter value={filter} onChange={this.handleFilterChange} />
|
91
93
|
<Label theme="info" size="m">{`Nodes: ${nodes?.length}`}</Label>
|
@@ -125,7 +127,7 @@ class Nodes extends React.Component {
|
|
125
127
|
|
126
128
|
if (preparedNodes.length === 0) {
|
127
129
|
if (filter !== ALL) {
|
128
|
-
return <
|
130
|
+
return <Illustration name="thumbsUp" width="200" />;
|
129
131
|
}
|
130
132
|
}
|
131
133
|
|
@@ -5,7 +5,7 @@ import qs from 'qs';
|
|
5
5
|
import {connect} from 'react-redux';
|
6
6
|
|
7
7
|
import {Link} from 'react-router-dom';
|
8
|
-
import {Loader} from '@
|
8
|
+
import {Loader} from '@gravity-ui/uikit';
|
9
9
|
|
10
10
|
import InfoViewer from '../../components/InfoViewer/InfoViewer';
|
11
11
|
import EntityStatus from '../../components/EntityStatus/EntityStatus';
|
@@ -4,13 +4,14 @@ import cn from 'bem-cn-lite';
|
|
4
4
|
import {connect} from 'react-redux';
|
5
5
|
import _ from 'lodash';
|
6
6
|
|
7
|
-
import {Loader} from '@
|
7
|
+
import {Loader} from '@gravity-ui/uikit';
|
8
8
|
import ReactList from 'react-list';
|
9
9
|
|
10
10
|
import EntityStatus from '../../components/EntityStatus/EntityStatus';
|
11
11
|
import GroupTreeViewer from '../../components/GroupTreeViewer/GroupTreeViewer';
|
12
12
|
import Breadcrumbs from '../../components/Breadcrumbs/Breadcrumbs';
|
13
13
|
import ProblemFilter, {problemFilterType} from '../../components/ProblemFilter/ProblemFilter';
|
14
|
+
import {Illustration} from '../../components/Illustration';
|
14
15
|
|
15
16
|
import {getPoolInfo} from '../../store/reducers/pool';
|
16
17
|
import {AUTO_RELOAD_INTERVAL, ALL} from '../../utils/constants';
|
@@ -119,7 +120,7 @@ class Pool extends React.Component {
|
|
119
120
|
</div>
|
120
121
|
|
121
122
|
{filteredGroups.length === 0 ? (
|
122
|
-
<
|
123
|
+
<Illustration name="thumbsUp" width="200" />
|
123
124
|
) : (
|
124
125
|
<ReactList
|
125
126
|
itemRenderer={this.makeRenderGroups(filteredGroups)}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, {useEffect} from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import {connect} from 'react-redux';
|
4
|
-
import {Popup, useVirtualElementRef} from '@
|
4
|
+
import {Popup, useVirtualElementRef} from '@gravity-ui/uikit';
|
5
5
|
|
6
6
|
import {hideTooltip} from '../../store/reducers/tooltip';
|
7
7
|
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import {Button} from '@gravity-ui/uikit';
|
2
|
+
|
3
|
+
import EmptyState from '../../../components/EmptyState/EmptyState';
|
4
|
+
import {Illustration} from '../../../components/Illustration';
|
5
|
+
|
6
|
+
import i18n from './i18n';
|
7
|
+
|
8
|
+
interface EmptyFilterProps {
|
9
|
+
title: string;
|
10
|
+
message?: string;
|
11
|
+
showAll?: string;
|
12
|
+
onShowAll?: VoidFunction;
|
13
|
+
}
|
14
|
+
|
15
|
+
export const EmptyFilter = ({
|
16
|
+
title,
|
17
|
+
message = i18n('default_message'),
|
18
|
+
showAll = i18n('default_button_label'),
|
19
|
+
onShowAll,
|
20
|
+
}: EmptyFilterProps) => (
|
21
|
+
<EmptyState
|
22
|
+
image={<Illustration name="thumbsUp" />}
|
23
|
+
title={title}
|
24
|
+
description={message}
|
25
|
+
actions={onShowAll && [
|
26
|
+
<Button
|
27
|
+
key="show-all"
|
28
|
+
onClick={onShowAll}
|
29
|
+
>
|
30
|
+
{showAll}
|
31
|
+
</Button>
|
32
|
+
]}
|
33
|
+
/>
|
34
|
+
);
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import {i18n, Lang} from '../../../../utils/i18n';
|
2
|
+
|
3
|
+
import en from './en.json';
|
4
|
+
import ru from './ru.json';
|
5
|
+
|
6
|
+
const COMPONENT = 'ydb-storage-empty-filter';
|
7
|
+
|
8
|
+
i18n.registerKeyset(Lang.En, COMPONENT, en);
|
9
|
+
i18n.registerKeyset(Lang.Ru, COMPONENT, ru);
|
10
|
+
|
11
|
+
export default i18n.keyset(COMPONENT);
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|
3
3
|
import {connect} from 'react-redux';
|
4
4
|
import cn from 'bem-cn-lite';
|
5
5
|
import DataTable from '@yandex-cloud/react-data-table';
|
6
|
-
import {RadioButton, Label} from '@
|
6
|
+
import {RadioButton, Label} from '@gravity-ui/uikit';
|
7
7
|
|
8
8
|
import {StorageFilter} from './StorageFilter';
|
9
9
|
import {UsageFilter} from './UsageFilter';
|
@@ -186,6 +186,7 @@ class Storage extends React.Component {
|
|
186
186
|
data={flatListStorageEntities}
|
187
187
|
tableSettings={tableSettings}
|
188
188
|
nodes={nodes}
|
189
|
+
onShowAll={() => this.onGroupVisibilityChange(VisibleEntities.All)}
|
189
190
|
/>
|
190
191
|
)}
|
191
192
|
{storageType === StorageTypes.nodes && (
|
@@ -193,6 +194,7 @@ class Storage extends React.Component {
|
|
193
194
|
visibleEntities={visibleEntities}
|
194
195
|
data={flatListStorageEntities}
|
195
196
|
tableSettings={tableSettings}
|
197
|
+
onShowAll={() => this.onGroupVisibilityChange(VisibleEntities.All)}
|
196
198
|
/>
|
197
199
|
)}
|
198
200
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import {useEffect, useRef, useState} from 'react';
|
2
2
|
|
3
|
-
import {TextInput} from '@
|
3
|
+
import {TextInput} from '@gravity-ui/uikit';
|
4
4
|
|
5
5
|
interface StorageFilterProps {
|
6
6
|
className?: string;
|
@@ -47,6 +47,7 @@ export const StorageFilter = (props: StorageFilterProps) => {
|
|
47
47
|
value={filterValue}
|
48
48
|
onUpdate={changeFilter}
|
49
49
|
hasClear
|
50
|
+
autoFocus
|
50
51
|
/>
|
51
52
|
);
|
52
53
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import _ from 'lodash';
|
2
2
|
import cn from 'bem-cn-lite';
|
3
3
|
import DataTable, {Column, Settings, SortOrder} from '@yandex-cloud/react-data-table';
|
4
|
-
import {Label, Popover, PopoverBehavior} from '@
|
4
|
+
import {Label, Popover, PopoverBehavior} from '@gravity-ui/uikit';
|
5
5
|
|
6
6
|
import {Stack} from '../../../components/Stack/Stack';
|
7
7
|
//@ts-ignore
|
@@ -16,9 +16,11 @@ import {bytesToGB, bytesToSpeed} from '../../../utils/utils';
|
|
16
16
|
import {stringifyVdiskId} from '../../../utils';
|
17
17
|
import {getUsage, isFullDonorData} from '../../../utils/storage';
|
18
18
|
|
19
|
+
import {EmptyFilter} from '../EmptyFilter/EmptyFilter';
|
19
20
|
import Vdisk from '../Vdisk/Vdisk';
|
20
21
|
import {getDegradedSeverity, getUsageSeverity} from '../utils';
|
21
22
|
|
23
|
+
import i18n from './i18n';
|
22
24
|
import './StorageGroups.scss';
|
23
25
|
|
24
26
|
enum TableColumnsIds {
|
@@ -42,6 +44,7 @@ interface StorageGroupsProps {
|
|
42
44
|
nodes: any;
|
43
45
|
tableSettings: Settings;
|
44
46
|
visibleEntities: keyof typeof VisibleEntities;
|
47
|
+
onShowAll?: VoidFunction;
|
45
48
|
}
|
46
49
|
|
47
50
|
const tableColumnsNames: Record<TableColumnsIdsValues, string> = {
|
@@ -85,7 +88,7 @@ function setSortOrder(visibleEntities: keyof typeof VisibleEntities): SortOrder
|
|
85
88
|
}
|
86
89
|
}
|
87
90
|
|
88
|
-
function StorageGroups({data, tableSettings, visibleEntities, nodes}: StorageGroupsProps) {
|
91
|
+
function StorageGroups({data, tableSettings, visibleEntities, nodes, onShowAll}: StorageGroupsProps) {
|
89
92
|
const allColumns: Column<any>[] = [
|
90
93
|
{
|
91
94
|
name: TableColumnsIds.PoolName,
|
@@ -253,17 +256,35 @@ function StorageGroups({data, tableSettings, visibleEntities, nodes}: StorageGro
|
|
253
256
|
];
|
254
257
|
|
255
258
|
let columns = allColumns;
|
256
|
-
let emptyMessage = 'No such groups.';
|
257
259
|
|
258
260
|
if (visibleEntities === VisibleEntities.Space) {
|
259
261
|
columns = allColumns.filter((col) => col.name !== TableColumnsIds.Missing);
|
260
|
-
|
262
|
+
|
263
|
+
if (!data.length) {
|
264
|
+
return (
|
265
|
+
<EmptyFilter
|
266
|
+
title={i18n('empty.out_of_space')}
|
267
|
+
showAll={i18n('show_all')}
|
268
|
+
onShowAll={onShowAll}
|
269
|
+
/>
|
270
|
+
);
|
271
|
+
}
|
261
272
|
}
|
262
273
|
|
263
274
|
if (visibleEntities === VisibleEntities.Missing) {
|
264
275
|
columns = allColumns.filter((col) => col.name !== TableColumnsIds.UsedSpaceFlag);
|
265
|
-
|
276
|
+
|
277
|
+
if (!data.length) {
|
278
|
+
return (
|
279
|
+
<EmptyFilter
|
280
|
+
title={i18n('empty.degraded')}
|
281
|
+
showAll={i18n('show_all')}
|
282
|
+
onShowAll={onShowAll}
|
283
|
+
/>
|
284
|
+
);
|
285
|
+
}
|
266
286
|
}
|
287
|
+
|
267
288
|
return data ? (
|
268
289
|
<DataTable
|
269
290
|
key={visibleEntities as string}
|
@@ -272,7 +293,7 @@ function StorageGroups({data, tableSettings, visibleEntities, nodes}: StorageGro
|
|
272
293
|
columns={columns}
|
273
294
|
settings={tableSettings}
|
274
295
|
initialSortOrder={setSortOrder(visibleEntities)}
|
275
|
-
emptyDataMessage={
|
296
|
+
emptyDataMessage={i18n('empty.default')}
|
276
297
|
/>
|
277
298
|
) : null;
|
278
299
|
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import {i18n, Lang} from '../../../../utils/i18n';
|
2
|
+
|
3
|
+
import en from './en.json';
|
4
|
+
import ru from './ru.json';
|
5
|
+
|
6
|
+
const COMPONENT = 'ydb-storage-groups';
|
7
|
+
|
8
|
+
i18n.registerKeyset(Lang.En, COMPONENT, en);
|
9
|
+
i18n.registerKeyset(Lang.Ru, COMPONENT, ru);
|
10
|
+
|
11
|
+
export default i18n.keyset(COMPONENT);
|
@@ -1,11 +1,15 @@
|
|
1
1
|
import _ from 'lodash';
|
2
2
|
import cn from 'bem-cn-lite';
|
3
3
|
import DataTable, {Column, Settings, SortOrder} from '@yandex-cloud/react-data-table';
|
4
|
-
import {Popover, PopoverBehavior} from '@
|
4
|
+
import {Popover, PopoverBehavior} from '@gravity-ui/uikit';
|
5
|
+
|
5
6
|
//@ts-ignore
|
6
7
|
import {VisibleEntities} from '../../../store/reducers/storage';
|
8
|
+
|
9
|
+
import {EmptyFilter} from '../EmptyFilter/EmptyFilter';
|
7
10
|
import Pdisk from '../Pdisk/Pdisk';
|
8
11
|
|
12
|
+
import i18n from './i18n';
|
9
13
|
import './StorageNodes.scss';
|
10
14
|
|
11
15
|
enum TableColumnsIds {
|
@@ -19,11 +23,12 @@ enum TableColumnsIds {
|
|
19
23
|
type TableColumnsIdsKeys = keyof typeof TableColumnsIds;
|
20
24
|
type TableColumnsIdsValues = typeof TableColumnsIds[TableColumnsIdsKeys];
|
21
25
|
|
22
|
-
interface
|
26
|
+
interface StorageNodesProps {
|
23
27
|
data: any;
|
24
28
|
nodes: any;
|
25
29
|
tableSettings: Settings;
|
26
30
|
visibleEntities: keyof typeof VisibleEntities;
|
31
|
+
onShowAll?: VoidFunction;
|
27
32
|
}
|
28
33
|
|
29
34
|
const tableColumnsNames: Record<TableColumnsIdsValues, string> = {
|
@@ -56,7 +61,7 @@ function setSortOrder(visibleEntities: keyof typeof VisibleEntities): SortOrder
|
|
56
61
|
}
|
57
62
|
}
|
58
63
|
|
59
|
-
function StorageNodes({data, tableSettings, visibleEntities}:
|
64
|
+
function StorageNodes({data, tableSettings, visibleEntities, onShowAll}: StorageNodesProps) {
|
60
65
|
const allColumns: Column<any>[] = [
|
61
66
|
{
|
62
67
|
name: TableColumnsIds.NodeId,
|
@@ -114,14 +119,26 @@ function StorageNodes({data, tableSettings, visibleEntities}: StorageGroupsProps
|
|
114
119
|
];
|
115
120
|
|
116
121
|
let columns = allColumns;
|
117
|
-
let emptyMessage = 'No such nodes.';
|
118
122
|
|
119
123
|
if (visibleEntities === VisibleEntities.Space) {
|
120
124
|
columns = allColumns.filter((col) => col.name !== TableColumnsIds.Missing);
|
121
|
-
|
125
|
+
|
126
|
+
return (
|
127
|
+
<EmptyFilter
|
128
|
+
title={i18n('empty.out_of_space')}
|
129
|
+
showAll={i18n('show_all')}
|
130
|
+
onShowAll={onShowAll}
|
131
|
+
/>
|
132
|
+
);
|
122
133
|
}
|
123
134
|
if (visibleEntities === VisibleEntities.Missing) {
|
124
|
-
|
135
|
+
return (
|
136
|
+
<EmptyFilter
|
137
|
+
title={i18n('empty.degraded')}
|
138
|
+
showAll={i18n('show_all')}
|
139
|
+
onShowAll={onShowAll}
|
140
|
+
/>
|
141
|
+
);
|
125
142
|
}
|
126
143
|
|
127
144
|
return data ? (
|
@@ -132,7 +149,7 @@ function StorageNodes({data, tableSettings, visibleEntities}: StorageGroupsProps
|
|
132
149
|
columns={columns}
|
133
150
|
settings={tableSettings}
|
134
151
|
initialSortOrder={setSortOrder(visibleEntities)}
|
135
|
-
emptyDataMessage={
|
152
|
+
emptyDataMessage={i18n('empty.default')}
|
136
153
|
/>
|
137
154
|
) : null;
|
138
155
|
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import {i18n, Lang} from '../../../../utils/i18n';
|
2
|
+
|
3
|
+
import en from './en.json';
|
4
|
+
import ru from './ru.json';
|
5
|
+
|
6
|
+
const COMPONENT = 'ydb-storage-nodes';
|
7
|
+
|
8
|
+
i18n.registerKeyset(Lang.En, COMPONENT, en);
|
9
|
+
i18n.registerKeyset(Lang.Ru, COMPONENT, ru);
|
10
|
+
|
11
|
+
export default i18n.keyset(COMPONENT);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import {useEffect, useMemo, useRef, useState} from 'react';
|
2
2
|
import cn from 'bem-cn-lite';
|
3
3
|
|
4
|
-
import {Select, SelectOption} from '@
|
4
|
+
import {Select, SelectOption} from '@gravity-ui/uikit';
|
5
5
|
|
6
6
|
import EntityStatus from "../../../components/EntityStatus/EntityStatus";
|
7
7
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, {useEffect, useState, useRef, useMemo} from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import cn from 'bem-cn-lite';
|
4
|
-
import {Label, Popup} from '@
|
4
|
+
import {Label, Popup} from '@gravity-ui/uikit';
|
5
5
|
|
6
6
|
import {bytesToGB, bytesToSpeed} from '../../../utils/utils';
|
7
7
|
import routes, {createHref} from '../../../routes';
|
@@ -15,7 +15,7 @@ import EntityStatus from '../../components/EntityStatus/EntityStatus';
|
|
15
15
|
import {Tag} from '../../components/Tag/Tag';
|
16
16
|
import Icon from '../../components/Icon/Icon';
|
17
17
|
import EmptyState from '../../components/EmptyState/EmptyState';
|
18
|
-
import {Link as ExternalLink, Button, Loader} from '@
|
18
|
+
import {Link as ExternalLink, Button, Loader} from '@gravity-ui/uikit';
|
19
19
|
import DataTable from '@yandex-cloud/react-data-table';
|
20
20
|
import CriticalActionDialog from '../../components/CriticalActionDialog/CriticalActionDialog';
|
21
21
|
import routes, {createHref} from '../../routes';
|
@@ -12,7 +12,7 @@ import {
|
|
12
12
|
import {showTooltip, hideTooltip} from '../../store/reducers/tooltip';
|
13
13
|
|
14
14
|
import Tablet from '../../components/Tablet/Tablet';
|
15
|
-
import {Loader, Select} from '@
|
15
|
+
import {Loader, Select} from '@gravity-ui/uikit';
|
16
16
|
import ReactList from 'react-list';
|
17
17
|
import {AutoFetcher} from '../../utils/autofetcher';
|
18
18
|
|
@@ -5,7 +5,7 @@ import cn from 'bem-cn-lite';
|
|
5
5
|
import qs from 'qs';
|
6
6
|
import _ from 'lodash';
|
7
7
|
|
8
|
-
import {Loader, Select} from '@
|
8
|
+
import {Loader, Select} from '@gravity-ui/uikit';
|
9
9
|
import ReactList from 'react-list';
|
10
10
|
|
11
11
|
import Tablet from '../../components/Tablet/Tablet';
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|
3
3
|
import cn from 'bem-cn-lite';
|
4
4
|
import _ from 'lodash';
|
5
5
|
import {connect} from 'react-redux';
|
6
|
-
import {Loader} from '@
|
6
|
+
import {Loader} from '@gravity-ui/uikit';
|
7
7
|
import DataTable from '@yandex-cloud/react-data-table';
|
8
8
|
import {DEFAULT_TABLE_SETTINGS} from '../../../utils/constants';
|
9
9
|
|
@@ -5,7 +5,7 @@ import {connect} from 'react-redux';
|
|
5
5
|
import {withRouter} from 'react-router-dom';
|
6
6
|
import qs from 'qs';
|
7
7
|
|
8
|
-
import {Loader} from '@
|
8
|
+
import {Loader} from '@gravity-ui/uikit';
|
9
9
|
|
10
10
|
import NodesViewer from '../../../../components/NodesViewer/NodesViewer';
|
11
11
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import cn from 'bem-cn-lite';
|
4
4
|
import {connect} from 'react-redux';
|
5
|
-
import {Loader} from '@
|
5
|
+
import {Loader} from '@gravity-ui/uikit';
|
6
6
|
import JSONTree from 'react-json-inspector';
|
7
7
|
|
8
8
|
import {getDescribe} from '../../../../store/reducers/describe';
|
@@ -2,14 +2,13 @@ import React, {useState} from 'react';
|
|
2
2
|
import {useSelector} from 'react-redux';
|
3
3
|
import cn from 'bem-cn-lite';
|
4
4
|
|
5
|
-
import {Button, Modal} from '@
|
5
|
+
import {Button, Modal} from '@gravity-ui/uikit';
|
6
6
|
|
7
7
|
import type {EPathType} from '../../../../types/api/schema';
|
8
8
|
//@ts-ignore
|
9
9
|
import Icon from '../../../../components/Icon/Icon';
|
10
10
|
import Overview from '../Overview/Overview';
|
11
|
-
|
12
|
-
import Healthcheck from '../Healthcheck/Healthcheck';
|
11
|
+
import {Healthcheck} from '../Healthcheck';
|
13
12
|
//@ts-ignore
|
14
13
|
import TenantOverview from '../TenantOverview/TenantOverview';
|
15
14
|
|
@@ -42,7 +41,7 @@ function DetailedOverview(props: DetailedOverviewProps) {
|
|
42
41
|
const renderModal = () => {
|
43
42
|
return (
|
44
43
|
<Modal open={isModalVisible} onClose={closeModalHandler} className={b('modal')}>
|
45
|
-
<Healthcheck tenant={props.tenantName} />
|
44
|
+
<Healthcheck tenant={props.tenantName} fetchData={false} />
|
46
45
|
<Button
|
47
46
|
className={b('close-modal-button')}
|
48
47
|
onClick={closeModalHandler}
|
@@ -5,7 +5,7 @@ import {Link} from 'react-router-dom';
|
|
5
5
|
import {useDispatch, useSelector} from 'react-redux';
|
6
6
|
import {useLocation} from 'react-router';
|
7
7
|
|
8
|
-
import {Switch, Tabs} from '@
|
8
|
+
import {Switch, Tabs} from '@gravity-ui/uikit';
|
9
9
|
|
10
10
|
//@ts-ignore
|
11
11
|
import TopQueries from './TopQueries/TopQueries';
|