ydb-embedded-ui 1.14.2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/assets/illustrations/dark/thumbsUp.svg +15 -0
  3. package/dist/assets/illustrations/light/thumbsUp.svg +15 -0
  4. package/dist/components/AsideNavigation/AsideHeader.tsx +1 -1
  5. package/dist/components/AsideNavigation/AsideHeaderFooterItem/AsideHeaderFooterItem.tsx +1 -1
  6. package/dist/components/AsideNavigation/AsideHeaderTooltip/AsideHeaderTooltip.tsx +1 -1
  7. package/dist/components/AsideNavigation/CompositeBar/CompositeBar.tsx +1 -1
  8. package/dist/components/AsideNavigation/Logo/Logo.tsx +1 -1
  9. package/dist/components/AsideNavigation/Settings/Settings.tsx +1 -1
  10. package/dist/components/AsideNavigation/Settings/SettingsMenu/SettingsMenu.tsx +1 -1
  11. package/dist/components/AsideNavigation/Settings/SettingsSearch/SettingsSearch.tsx +1 -1
  12. package/dist/components/AsideNavigation/Settings/collect-settings.ts +1 -1
  13. package/dist/components/Breadcrumbs/Breadcrumbs.js +1 -1
  14. package/dist/components/ClusterInfo/ClusterInfo.tsx +1 -1
  15. package/dist/components/Collapse/Collapse.js +1 -1
  16. package/dist/components/CopyToClipboard/CopyToClipboard.tsx +1 -1
  17. package/dist/components/CriticalActionDialog/CriticalActionDialog.js +1 -1
  18. package/dist/components/EmptyState/EmptyState.scss +0 -1
  19. package/dist/components/EnableFullscreenButton/EnableFullscreenButton.tsx +1 -1
  20. package/dist/components/EntityStatus/EntityStatus.js +1 -1
  21. package/dist/components/Fullscreen/Fullscreen.tsx +1 -1
  22. package/dist/components/Icon/Icon.js +1 -1
  23. package/dist/components/Illustration/Illustration.tsx +3 -1
  24. package/dist/components/Loader/Loader.tsx +1 -1
  25. package/dist/components/NodesViewer/NodesViewer.js +4 -2
  26. package/dist/components/Pagination/Pagination.js +1 -1
  27. package/dist/components/ProblemFilter/ProblemFilter.js +1 -1
  28. package/dist/components/ShortyString/ShortyString.tsx +1 -1
  29. package/dist/components/TableSkeleton/TableSkeleton.tsx +1 -1
  30. package/dist/components/TabletsOverall/TabletsOverall.tsx +1 -1
  31. package/dist/containers/App/App.js +1 -1
  32. package/dist/containers/App/App.scss +0 -10
  33. package/dist/containers/App/Content.js +1 -1
  34. package/dist/containers/App/TipPopup/TipPopup.js +1 -1
  35. package/dist/containers/AsideNavigation/AsideNavigation.tsx +1 -1
  36. package/dist/containers/Authentication/Authentication.tsx +1 -1
  37. package/dist/containers/Group/Group.js +1 -1
  38. package/dist/containers/Header/Header.tsx +1 -1
  39. package/dist/containers/Header/Host/Host.js +1 -1
  40. package/dist/containers/Heatmap/Heatmap.js +1 -1
  41. package/dist/containers/Node/Node.tsx +1 -1
  42. package/dist/containers/Node/NodeStructure/Pdisk.tsx +1 -1
  43. package/dist/containers/Nodes/Nodes.js +3 -2
  44. package/dist/containers/Pdisk/Pdisk.js +1 -1
  45. package/dist/containers/Pool/Pool.js +3 -2
  46. package/dist/containers/ReduxTooltip/ReduxTooltip.js +1 -1
  47. package/dist/containers/Storage/EmptyFilter/EmptyFilter.tsx +34 -0
  48. package/dist/containers/Storage/EmptyFilter/i18n/en.json +4 -0
  49. package/dist/containers/Storage/EmptyFilter/i18n/index.ts +11 -0
  50. package/dist/containers/Storage/EmptyFilter/i18n/ru.json +4 -0
  51. package/dist/containers/Storage/Pdisk/Pdisk.tsx +1 -1
  52. package/dist/containers/Storage/Storage.js +3 -1
  53. package/dist/containers/Storage/StorageFilter/StorageFilter.tsx +1 -1
  54. package/dist/containers/Storage/StorageGroups/StorageGroups.tsx +27 -6
  55. package/dist/containers/Storage/StorageGroups/i18n/en.json +6 -0
  56. package/dist/containers/Storage/StorageGroups/i18n/index.ts +11 -0
  57. package/dist/containers/Storage/StorageGroups/i18n/ru.json +6 -0
  58. package/dist/containers/Storage/StorageNodes/StorageNodes.tsx +24 -7
  59. package/dist/containers/Storage/StorageNodes/i18n/en.json +6 -0
  60. package/dist/containers/Storage/StorageNodes/i18n/index.ts +11 -0
  61. package/dist/containers/Storage/StorageNodes/i18n/ru.json +6 -0
  62. package/dist/containers/Storage/UsageFilter/UsageFilter.tsx +1 -1
  63. package/dist/containers/Storage/Vdisk/Vdisk.js +1 -1
  64. package/dist/containers/Tablet/Tablet.js +1 -1
  65. package/dist/containers/Tablets/Tablets.js +1 -1
  66. package/dist/containers/TabletsFilters/TabletsFilters.js +1 -1
  67. package/dist/containers/Tenant/Acl/Acl.js +1 -1
  68. package/dist/containers/Tenant/Diagnostics/Compute/Compute.js +1 -1
  69. package/dist/containers/Tenant/Diagnostics/Describe/Describe.js +1 -1
  70. package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.tsx +1 -1
  71. package/dist/containers/Tenant/Diagnostics/Diagnostics.tsx +1 -1
  72. package/dist/containers/Tenant/Diagnostics/Healthcheck/Healthcheck.js +1 -1
  73. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +1 -1
  74. package/dist/containers/Tenant/Diagnostics/Network/Network.js +3 -2
  75. package/dist/containers/Tenant/Diagnostics/Network/Network.scss +1 -1
  76. package/dist/containers/Tenant/Diagnostics/Overview/Overview.tsx +23 -24
  77. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +1 -1
  78. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +3 -3
  79. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +3 -3
  80. package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.tsx +1 -1
  81. package/dist/containers/Tenant/ObjectGeneralTabs/ObjectGeneralTabs.tsx +1 -1
  82. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.tsx +1 -1
  83. package/dist/containers/Tenant/Preview/Preview.js +1 -1
  84. package/dist/containers/Tenant/QueryEditor/Issues/Issues.scss +2 -3
  85. package/dist/containers/Tenant/QueryEditor/Issues/Issues.tsx +1 -1
  86. package/dist/containers/Tenant/QueryEditor/QueriesHistory/QueriesHistory.tsx +1 -1
  87. package/dist/containers/Tenant/QueryEditor/QueryEditor.js +2 -2
  88. package/dist/containers/Tenant/QueryEditor/QueryExplain/QueryExplain.js +61 -42
  89. package/dist/containers/Tenant/QueryEditor/QueryExplain/QueryExplain.scss +8 -4
  90. package/dist/containers/Tenant/QueryEditor/QueryResult/QueryResult.js +1 -1
  91. package/dist/containers/Tenant/QueryEditor/SaveQuery/SaveQuery.js +1 -1
  92. package/dist/containers/Tenant/QueryEditor/SavedQueries/SavedQueries.js +1 -1
  93. package/dist/containers/Tenant/Schema/SchemaInfoViewer/SchemaInfoViewer.scss +2 -2
  94. package/dist/containers/Tenant/utils/paneVisibilityToggleHelpers.tsx +1 -1
  95. package/dist/containers/Tenants/Tenants.js +3 -2
  96. package/dist/containers/UserSettings/UserSettings.tsx +2 -2
  97. package/dist/containers/Vdisk/Vdisk.js +1 -1
  98. package/dist/containers/VdiskPdiskNode/VdiskPdiskNode.js +1 -1
  99. package/dist/index.js +1 -1
  100. package/dist/setupTests.js +1 -1
  101. package/dist/store/reducers/executeTopQueries.js +6 -9
  102. package/dist/store/reducers/explainQuery.js +27 -36
  103. package/dist/store/reducers/olapStats.js +6 -8
  104. package/dist/store/reducers/shardsWorkload.js +6 -8
  105. package/dist/types/api/query.ts +32 -21
  106. package/dist/types/assets.d.ts +1 -1
  107. package/dist/types/store/query.ts +1 -1
  108. package/dist/utils/createToast.tsx +1 -1
  109. package/dist/utils/getNodesColumns.js +1 -1
  110. package/dist/utils/i18n/i18n.ts +1 -1
  111. package/dist/utils/prepareQueryExplain.ts +0 -4
  112. package/dist/utils/query.test.ts +59 -1
  113. package/dist/utils/query.ts +38 -4
  114. package/package.json +9 -11
@@ -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,4 @@
1
+ {
2
+ "default_message": "Everything is fine!",
3
+ "default_button_label": "Show All"
4
+ }
@@ -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);
@@ -0,0 +1,4 @@
1
+ {
2
+ "default_message": "Всё в порядке!",
3
+ "default_button_label": "Показать все"
4
+ }
@@ -1,6 +1,6 @@
1
1
  import React, {useEffect, useState, useRef, useMemo} from 'react';
2
2
  import cn from 'bem-cn-lite';
3
- import {Popup} from '@yandex-cloud/uikit';
3
+ import {Popup} from '@gravity-ui/uikit';
4
4
 
5
5
  import type {RequiredField} from '../../../types';
6
6
  //@ts-ignore
@@ -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 '@yandex-cloud/uikit';
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 '@yandex-cloud/uikit';
3
+ import {TextInput} from '@gravity-ui/uikit';
4
4
 
5
5
  interface StorageFilterProps {
6
6
  className?: string;
@@ -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 '@yandex-cloud/uikit';
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
- emptyMessage = 'No groups with out of space errors.';
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
- emptyMessage = 'No degraded groups.';
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={emptyMessage}
296
+ emptyDataMessage={i18n('empty.default')}
276
297
  />
277
298
  ) : null;
278
299
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "empty.default": "No such groups",
3
+ "empty.out_of_space": "No groups with out of space errors",
4
+ "empty.degraded": "No degraded groups",
5
+ "show_all": "Show all groups"
6
+ }
@@ -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);
@@ -0,0 +1,6 @@
1
+ {
2
+ "empty.default": "Нет групп",
3
+ "empty.out_of_space": "Нет групп, в которых кончается место",
4
+ "empty.degraded": "Нет деградировавших групп",
5
+ "show_all": "Показать все группы"
6
+ }
@@ -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 '@yandex-cloud/uikit';
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 StorageGroupsProps {
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}: StorageGroupsProps) {
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
- emptyMessage = 'No nodes with out of space errors.';
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
- emptyMessage = 'No degraded nodes.';
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={emptyMessage}
152
+ emptyDataMessage={i18n('empty.default')}
136
153
  />
137
154
  ) : null;
138
155
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "empty.default": "No such nodes",
3
+ "empty.out_of_space": "No nodes with out of space errors",
4
+ "empty.degraded": "No degraded nodes",
5
+ "show_all": "Show all nodes"
6
+ }
@@ -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);
@@ -0,0 +1,6 @@
1
+ {
2
+ "empty.default": "Нет узлов",
3
+ "empty.out_of_space": "Нет узлов, в которых кончается место",
4
+ "empty.degraded": "Нет деградировавших узлов",
5
+ "show_all": "Показать все узлы"
6
+ }
@@ -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 '@yandex-cloud/uikit';
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 '@yandex-cloud/uikit';
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 '@yandex-cloud/uikit';
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 '@yandex-cloud/uikit';
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 '@yandex-cloud/uikit';
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 '@yandex-cloud/uikit';
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 '@yandex-cloud/uikit';
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 '@yandex-cloud/uikit';
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,7 +2,7 @@ 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 '@yandex-cloud/uikit';
5
+ import {Button, Modal} from '@gravity-ui/uikit';
6
6
 
7
7
  import type {EPathType} from '../../../../types/api/schema';
8
8
  //@ts-ignore
@@ -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 '@yandex-cloud/uikit';
8
+ import {Switch, Tabs} from '@gravity-ui/uikit';
9
9
 
10
10
  //@ts-ignore
11
11
  import TopQueries from './TopQueries/TopQueries';
@@ -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
 
6
- import {Loader, Button} from '@yandex-cloud/uikit';
6
+ import {Loader, Button} from '@gravity-ui/uikit';
7
7
 
8
8
  import IssuesViewer from './IssuesViewer/IssuesViewer';
9
9
 
@@ -1,7 +1,7 @@
1
1
  import {useEffect, useMemo} from 'react';
2
2
  import cn from 'bem-cn-lite';
3
3
  import {connect} from 'react-redux';
4
- import {Loader} from '@yandex-cloud/uikit';
4
+ import {Loader} from '@gravity-ui/uikit';
5
5
  import DataTable from '@yandex-cloud/react-data-table';
6
6
 
7
7
  import Icon from '../../../../components/Icon/Icon';
@@ -5,11 +5,12 @@ import {connect} from 'react-redux';
5
5
  import _ from 'lodash';
6
6
 
7
7
  import {Link} from 'react-router-dom';
8
- import {Loader, Checkbox} from '@yandex-cloud/uikit';
8
+ import {Loader, Checkbox} from '@gravity-ui/uikit';
9
9
 
10
10
  import NodeNetwork from './NodeNetwork/NodeNetwork';
11
11
  import Icon from '../../../../components/Icon/Icon';
12
12
  import ProblemFilter, {problemFilterType} from '../../../../components/ProblemFilter/ProblemFilter';
13
+ import {Illustration} from '../../../../components/Illustration';
13
14
 
14
15
  import {getNetworkInfo} from '../../../../store/reducers/network';
15
16
  import {hideTooltip, showTooltip} from '../../../../store/reducers/tooltip';
@@ -242,7 +243,7 @@ class Network extends React.Component {
242
243
  });
243
244
 
244
245
  if (filter === PROBLEMS && problemNodesCount === 0) {
245
- return <div className="no-problem" />;
246
+ return <Illustration name="thumbsUp" width="200" />;
246
247
  } else {
247
248
  return result;
248
249
  }
@@ -111,7 +111,7 @@
111
111
  display: flex;
112
112
  gap: 12px;
113
113
 
114
- margin-bottom: 16px;
114
+ margin: 0 16px 16px 0;
115
115
  }
116
116
 
117
117
  &__controls-wrapper {
@@ -1,8 +1,8 @@
1
- import {ReactNode, useEffect, useMemo} from 'react';
1
+ import {ReactNode, useCallback, useEffect, useMemo} from 'react';
2
2
  import {useDispatch, useSelector} from 'react-redux';
3
3
  import cn from 'bem-cn-lite';
4
4
 
5
- import {Loader} from '@yandex-cloud/uikit';
5
+ import {Loader} from '@gravity-ui/uikit';
6
6
 
7
7
  //@ts-ignore
8
8
  import SchemaInfoViewer from '../../Schema/SchemaInfoViewer/SchemaInfoViewer';
@@ -22,14 +22,14 @@ import {getOlapStats} from '../../../../store/reducers/olapStats';
22
22
 
23
23
  import './Overview.scss';
24
24
 
25
- function prepareOlapTableGeneral(tableData: any, olapStats: any[]) {
25
+ function prepareOlapTableGeneral(tableData: any, olapStats?: any[]) {
26
26
  const {ColumnShardCount} = tableData;
27
27
  const Bytes = olapStats?.reduce((acc, el) => {
28
- acc += parseInt(el.Bytes) ?? 0;
28
+ acc += parseInt(el.Bytes) || 0;
29
29
  return acc;
30
30
  }, 0);
31
31
  const Rows = olapStats?.reduce((acc, el) => {
32
- acc += parseInt(el.Rows) ?? 0;
32
+ acc += parseInt(el.Rows) || 0;
33
33
  return acc;
34
34
  }, 0);
35
35
  const tabletIds = olapStats?.reduce((acc, el) => {
@@ -60,7 +60,10 @@ const b = cn('kv-tenant-overview');
60
60
  const autofetcher = new AutoFetcher();
61
61
 
62
62
  function Overview(props: OverviewProps) {
63
+ const {tenantName, type} = props;
64
+
63
65
  const dispatch = useDispatch();
66
+
64
67
  const {
65
68
  currentSchema: currentItem = {},
66
69
  loading,
@@ -69,46 +72,42 @@ function Overview(props: OverviewProps) {
69
72
  currentSchemaPath,
70
73
  } = useSelector((state: any) => state.schema);
71
74
 
72
- let {data: olapStats} = useSelector((state: any) => state.olapStats);
73
- olapStats = olapStats && olapStats.result ? olapStats.result : olapStats;
75
+ const {
76
+ data: { result: olapStats } = { result: undefined },
77
+ } = useSelector((state: any) => state.olapStats);
74
78
 
75
- const fetchOverviewData = () => {
76
- const {tenantName, type} = props;
79
+ const fetchOverviewData = useCallback(() => {
77
80
  const schemaPath = currentSchemaPath || tenantName;
78
81
  dispatch(getSchema({path: schemaPath}));
79
82
 
80
83
  if (isTableType(type) && isColumnEntityType(type)) {
81
84
  dispatch(getOlapStats({path: schemaPath}));
82
85
  }
83
- };
86
+ }, [currentSchemaPath, dispatch, tenantName, type]);
84
87
 
85
- useEffect(() => {
86
- fetchOverviewData();
87
- return () => {
88
- autofetcher.stop();
89
- };
90
- }, []);
88
+ useEffect(fetchOverviewData, [fetchOverviewData]);
91
89
 
92
90
  useEffect(() => {
91
+ autofetcher.stop();
92
+
93
93
  if (autorefresh) {
94
- fetchOverviewData();
95
- autofetcher.stop();
96
94
  autofetcher.start();
97
95
  autofetcher.fetch(() => fetchOverviewData());
98
96
  }
99
- if (autorefresh === false) {
97
+
98
+ return () => {
100
99
  autofetcher.stop();
101
- }
102
- }, [autorefresh]);
100
+ };
101
+ }, [autorefresh, fetchOverviewData]);
103
102
 
104
103
  const tableSchema =
105
104
  currentItem?.PathDescription?.Table || currentItem?.PathDescription?.ColumnTableDescription;
106
105
 
107
106
  const schemaData = useMemo(() => {
108
- return isTableType(props.type) && isColumnEntityType(props.type)
107
+ return isTableType(type) && isColumnEntityType(type)
109
108
  ? prepareOlapTableGeneral(tableSchema, olapStats)
110
109
  : currentItem;
111
- }, [props.type, tableSchema, olapStats, currentItem]);
110
+ }, [type, tableSchema, olapStats, currentItem]);
112
111
 
113
112
  const renderLoader = () => {
114
113
  return (
@@ -134,7 +133,7 @@ function Overview(props: OverviewProps) {
134
133
  [EPathType.EPathTypePersQueueGroup]: () => <PersQueueGroupInfo data={schemaData} />,
135
134
  };
136
135
 
137
- return (props.type && pathTypeToComponent[props.type]?.()) || (
136
+ return (type && pathTypeToComponent[type]?.()) || (
138
137
  <SchemaInfoViewer fullPath={currentItem.Path} data={schemaData} />
139
138
  );
140
139
  }
@@ -17,7 +17,7 @@ import {TABLET_STATES} from '../../../../utils/constants';
17
17
 
18
18
  import './TenantOverview.scss';
19
19
  import {AutoFetcher} from '../../../../utils/autofetcher';
20
- import {Loader} from '@yandex-cloud/uikit';
20
+ import {Loader} from '@gravity-ui/uikit';
21
21
 
22
22
  const b = cn('tenant-overview');
23
23
 
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import cn from 'bem-cn-lite';
4
4
  import {connect} from 'react-redux';
5
5
  import DataTable from '@yandex-cloud/react-data-table';
6
- import {Loader} from '@yandex-cloud/uikit';
6
+ import {Loader} from '@gravity-ui/uikit';
7
7
 
8
8
  import {changeUserInput} from '../../../../store/reducers/executeQuery';
9
9
  import {sendQuery, setQueryOptions} from '../../../../store/reducers/executeTopQueries';
@@ -167,11 +167,11 @@ class TopQueries extends React.Component {
167
167
  }
168
168
  }
169
169
  const mapStateToProps = (state) => {
170
- const {loading, data, error, wasLoaded} = state.executeTopQueries;
170
+ const {loading, data = {}, error, wasLoaded} = state.executeTopQueries;
171
171
  const {autorefresh} = state.schema;
172
172
  return {
173
173
  loading,
174
- data: data && data.result ? data.result: data,
174
+ data: data.result,
175
175
  error,
176
176
  wasLoaded,
177
177
  autorefresh,
@@ -1,7 +1,7 @@
1
1
  import {useState, useContext, useEffect, useMemo} from 'react';
2
2
  import cn from 'bem-cn-lite';
3
3
  import {connect} from 'react-redux';
4
- import {Loader} from '@yandex-cloud/uikit';
4
+ import {Loader} from '@gravity-ui/uikit';
5
5
  import DataTable from '@yandex-cloud/react-data-table';
6
6
 
7
7
  import InternalLink from '../../../../components/InternalLink/InternalLink';
@@ -216,11 +216,11 @@ function TopShards({
216
216
  }
217
217
 
218
218
  const mapStateToProps = (state) => {
219
- const {loading, data, error, wasLoaded} = state.shardsWorkload;
219
+ const {loading, data = {}, error, wasLoaded} = state.shardsWorkload;
220
220
  const {autorefresh} = state.schema;
221
221
  return {
222
222
  loading,
223
- data: data && data.result ? data.result : data,
223
+ data: data.result,
224
224
  error,
225
225
  currentSchemaPath: state.schema?.currentSchema?.Path,
226
226
  autorefresh,