ydb-embedded-ui 4.5.2 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/components/NodeHostWrapper/NodeHostWrapper.tsx +1 -1
  3. package/dist/containers/App/Content.js +3 -2
  4. package/dist/containers/AsideNavigation/AsideNavigation.tsx +4 -50
  5. package/dist/containers/Cluster/Cluster.scss +7 -48
  6. package/dist/containers/Cluster/Cluster.tsx +136 -20
  7. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +34 -17
  8. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.tsx +57 -91
  9. package/dist/containers/Cluster/ClusterInfoSkeleton/ClusterInfoSkeleton.scss +48 -0
  10. package/dist/containers/Cluster/ClusterInfoSkeleton/ClusterInfoSkeleton.tsx +34 -0
  11. package/dist/containers/Cluster/utils.ts +34 -0
  12. package/dist/containers/Header/Header.scss +0 -24
  13. package/dist/containers/Header/Header.tsx +14 -44
  14. package/dist/containers/Node/Node.tsx +22 -20
  15. package/dist/containers/Nodes/Nodes.tsx +0 -16
  16. package/dist/containers/Nodes/getNodesColumns.tsx +1 -1
  17. package/dist/containers/Storage/Storage.js +1 -11
  18. package/dist/containers/Tablet/Tablet.tsx +28 -0
  19. package/dist/containers/TabletsFilters/TabletsFilters.js +16 -1
  20. package/dist/containers/Tenant/Diagnostics/Describe/Describe.tsx +1 -1
  21. package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.scss +3 -0
  22. package/dist/containers/Tenant/Diagnostics/Diagnostics.tsx +3 -3
  23. package/dist/containers/Tenant/Diagnostics/Overview/ChangefeedInfo/ChangefeedInfo.tsx +4 -6
  24. package/dist/containers/Tenant/Diagnostics/Overview/Overview.tsx +56 -53
  25. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.tsx +1 -1
  26. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.tsx +1 -1
  27. package/dist/containers/Tenant/Preview/Preview.js +1 -1
  28. package/dist/containers/Tenant/QueryEditor/QueryEditor.js +26 -22
  29. package/dist/containers/Tenant/QueryEditor/QueryEditorControls/OldQueryEditorControls.tsx +10 -3
  30. package/dist/containers/Tenant/QueryEditor/QueryEditorControls/QueryEditorControls.tsx +8 -1
  31. package/dist/containers/Tenant/QueryEditor/QueryEditorControls/shared.ts +1 -6
  32. package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.tsx +1 -1
  33. package/dist/containers/Tenant/Tenant.tsx +7 -12
  34. package/dist/containers/Tenant/utils/schemaActions.ts +1 -1
  35. package/dist/containers/Tenants/Tenants.js +18 -28
  36. package/dist/containers/Tenants/Tenants.scss +2 -4
  37. package/dist/containers/UserSettings/i18n/en.json +2 -2
  38. package/dist/containers/UserSettings/i18n/ru.json +2 -2
  39. package/dist/containers/UserSettings/settings.ts +4 -4
  40. package/dist/containers/Versions/Versions.scss +0 -4
  41. package/dist/containers/Versions/Versions.tsx +74 -66
  42. package/dist/routes.ts +0 -7
  43. package/dist/services/api.ts +6 -2
  44. package/dist/store/reducers/clusterNodes/clusterNodes.tsx +4 -0
  45. package/dist/store/reducers/index.ts +3 -1
  46. package/dist/store/reducers/overview/overview.ts +109 -0
  47. package/dist/store/reducers/overview/types.ts +24 -0
  48. package/dist/store/reducers/{schema.ts → schema/schema.ts} +24 -50
  49. package/dist/{types/store/schema.ts → store/reducers/schema/types.ts} +16 -15
  50. package/dist/store/reducers/settings/settings.ts +5 -3
  51. package/dist/types/api/query.ts +78 -44
  52. package/dist/types/store/explainQuery.ts +2 -2
  53. package/dist/types/store/query.ts +4 -2
  54. package/dist/utils/constants.ts +3 -1
  55. package/dist/utils/nodes.ts +1 -1
  56. package/dist/utils/query.ts +3 -3
  57. package/package.json +1 -1
@@ -0,0 +1,48 @@
1
+ .ydb-cluster-info-skeleton {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 16px;
5
+
6
+ margin-top: 5px;
7
+
8
+ &__row {
9
+ display: flex;
10
+ align-items: flex-start;
11
+
12
+ min-height: var(--yc-text-body-2-font-size);
13
+
14
+ .yc-skeleton {
15
+ min-height: var(--yc-text-body-2-font-size);
16
+ }
17
+ }
18
+
19
+ &__label {
20
+ display: flex;
21
+ flex: 0 1 auto;
22
+ align-items: baseline;
23
+
24
+ width: 200px;
25
+
26
+ &__text {
27
+ width: 100px;
28
+ }
29
+
30
+ &__dots {
31
+ width: 100px;
32
+ margin: 0 2px;
33
+
34
+ border-bottom: 1px dotted var(--yc-color-text-secondary);
35
+ }
36
+ }
37
+
38
+ &__value {
39
+ min-width: 200px;
40
+ max-width: 20%;
41
+ }
42
+
43
+ &__versions {
44
+ min-width: 400px;
45
+ max-width: 40%;
46
+ height: 36px;
47
+ }
48
+ }
@@ -0,0 +1,34 @@
1
+ import block from 'bem-cn-lite';
2
+
3
+ import {Skeleton} from '@gravity-ui/uikit';
4
+
5
+ import './ClusterInfoSkeleton.scss';
6
+
7
+ const b = block('ydb-cluster-info-skeleton');
8
+
9
+ const SkeletonLabel = () => (
10
+ <div className={b('label')}>
11
+ <Skeleton className={b('label__text')} />
12
+ <div className={b('label__dots')} />
13
+ </div>
14
+ );
15
+
16
+ interface ClusterInfoSkeletonProps {
17
+ className?: string;
18
+ rows?: number;
19
+ }
20
+
21
+ export const ClusterInfoSkeleton = ({rows = 6, className}: ClusterInfoSkeletonProps) => (
22
+ <div className={b(null, className)}>
23
+ {[...new Array(rows)].map((_, index) => (
24
+ <div className={b('row')} key={`skeleton-row-${index}`}>
25
+ <SkeletonLabel />
26
+ <Skeleton className={b('value')} />
27
+ </div>
28
+ ))}
29
+ <div className={b('row')} key="versions">
30
+ <SkeletonLabel />
31
+ <Skeleton className={b('versions')} />
32
+ </div>
33
+ </div>
34
+ );
@@ -0,0 +1,34 @@
1
+ import type {ValueOf} from '../../types/common';
2
+ import routes, {createHref} from '../../routes';
3
+
4
+ export const clusterTabsIds = {
5
+ tenants: 'tenants',
6
+ nodes: 'nodes',
7
+ storage: 'storage',
8
+ versions: 'versions',
9
+ } as const;
10
+
11
+ export type ClusterTab = ValueOf<typeof clusterTabsIds>;
12
+
13
+ const tenants = {
14
+ id: clusterTabsIds.tenants,
15
+ title: 'Databases',
16
+ };
17
+ const nodes = {
18
+ id: clusterTabsIds.nodes,
19
+ title: 'Nodes',
20
+ };
21
+ const storage = {
22
+ id: clusterTabsIds.storage,
23
+ title: 'Storage',
24
+ };
25
+ const versions = {
26
+ id: clusterTabsIds.versions,
27
+ title: 'Versions',
28
+ };
29
+
30
+ export const clusterTabs = [tenants, nodes, storage, versions];
31
+
32
+ export const getClusterPath = (activeTab: ClusterTab = clusterTabsIds.tenants, query = {}) => {
33
+ return createHref(routes.cluster, {activeTab}, query);
34
+ };
@@ -13,28 +13,4 @@
13
13
  border-bottom: 1px solid var(--yc-color-line-generic);
14
14
 
15
15
  @include body2-typography;
16
-
17
- &__cluster-info-title {
18
- font-size: var(--yc-text-body-1-font-size);
19
- text-transform: uppercase;
20
-
21
- color: var(--yc-color-text-secondary);
22
- }
23
-
24
- &__cluster-info-name {
25
- font-size: var(--yc-text-body-2-font-size);
26
- font-weight: 500;
27
- }
28
-
29
- &__cluster-name-wrapper {
30
- display: flex;
31
- align-items: center;
32
-
33
- height: 100%;
34
- gap: 5px;
35
- }
36
-
37
- &__divider {
38
- height: 80%;
39
- }
40
16
  }
@@ -1,56 +1,33 @@
1
- import React, {useEffect} from 'react';
2
- import {useDispatch} from 'react-redux';
3
- import cn from 'bem-cn-lite';
1
+ import block from 'bem-cn-lite';
4
2
  import {useHistory} from 'react-router';
3
+
5
4
  import {Breadcrumbs, BreadcrumbsItem} from '@gravity-ui/uikit';
6
5
 
7
- import Divider from '../../components/Divider/Divider';
8
6
  import {ExternalLinkWithIcon} from '../../components/ExternalLinkWithIcon/ExternalLinkWithIcon';
9
7
 
10
8
  import {backend, customBackend} from '../../store';
11
- import {getHostInfo} from '../../store/reducers/host';
12
9
  import {HeaderItemType} from '../../store/reducers/header';
13
10
  import {useTypedSelector} from '../../utils/hooks';
14
11
 
15
12
  import './Header.scss';
16
13
 
17
- const b = cn('header');
14
+ const b = block('header');
18
15
 
19
- function ClusterName({name}: {name: string}) {
20
- return (
21
- <div className={b('cluster-info')}>
22
- <div className={b('cluster-info-title')}>cluster</div>
23
- <div className={b('cluster-info-name')}>{name}</div>
24
- </div>
25
- );
26
- }
16
+ const getInternalLink = (singleClusterMode: boolean) => {
17
+ if (singleClusterMode && !customBackend) {
18
+ return `/internal`;
19
+ }
27
20
 
28
- interface HeaderProps {
29
- clusterName: string;
30
- }
31
-
32
- function Header({clusterName}: HeaderProps) {
33
- const dispatch = useDispatch();
21
+ return backend + '/internal';
22
+ };
34
23
 
24
+ function Header() {
35
25
  const {singleClusterMode, header}: {singleClusterMode: boolean; header: HeaderItemType[]} =
36
26
  useTypedSelector((state) => state);
37
- const {data: host} = useTypedSelector((state) => state.host);
38
27
 
39
28
  const history = useHistory();
40
29
 
41
- useEffect(() => {
42
- dispatch(getHostInfo());
43
- }, [dispatch]);
44
-
45
30
  const renderHeader = () => {
46
- const clusterNameFinal = singleClusterMode ? host?.ClusterName : clusterName;
47
-
48
- let link = backend + '/internal';
49
-
50
- if (singleClusterMode && !customBackend) {
51
- link = `/internal`;
52
- }
53
-
54
31
  const breadcrumbItems = header.reduce((acc, el) => {
55
32
  const action = () => {
56
33
  if (el.link) {
@@ -71,17 +48,10 @@ function Header({clusterName}: HeaderProps) {
71
48
  />
72
49
  </div>
73
50
 
74
- <div className={b('cluster-name-wrapper')}>
75
- <ExternalLinkWithIcon title={'Internal Viewer'} url={link} />
76
- {clusterNameFinal && (
77
- <React.Fragment>
78
- <div className={b('divider')}>
79
- <Divider />
80
- </div>
81
- <ClusterName name={clusterNameFinal} />
82
- </React.Fragment>
83
- )}
84
- </div>
51
+ <ExternalLinkWithIcon
52
+ title={'Internal Viewer'}
53
+ url={getInternalLink(singleClusterMode)}
54
+ />
85
55
  </header>
86
56
  );
87
57
  };
@@ -16,9 +16,10 @@ import {Loader} from '../../components/Loader';
16
16
  import {BasicNodeViewer} from '../../components/BasicNodeViewer';
17
17
 
18
18
  import {getNodeInfo, resetNode} from '../../store/reducers/node/node';
19
- import routes, {CLUSTER_PAGES, createHref} from '../../routes';
20
- import {setHeader} from '../../store/reducers/header';
19
+ import routes, {createHref} from '../../routes';
20
+ import {HeaderItemType, setHeader} from '../../store/reducers/header';
21
21
  import {AutoFetcher} from '../../utils/autofetcher';
22
+ import {clusterTabsIds, getClusterPath} from '../Cluster/utils';
22
23
 
23
24
  import './Node.scss';
24
25
 
@@ -26,11 +27,6 @@ const b = cn('node');
26
27
 
27
28
  export const STORAGE_ROLE = 'Storage';
28
29
 
29
- const headerNodes = {
30
- text: CLUSTER_PAGES.nodes.title,
31
- link: createHref(routes.cluster, {activeTab: CLUSTER_PAGES.nodes.id}),
32
- };
33
-
34
30
  const autofetcher = new AutoFetcher();
35
31
 
36
32
  interface NodeProps {
@@ -72,28 +68,34 @@ function Node(props: NodeProps) {
72
68
  return {activeTabVerified, nodeTabs};
73
69
  }, [activeTab, node]);
74
70
 
71
+ React.useEffect(() => {
72
+ const headerItems: HeaderItemType[] = [
73
+ {
74
+ text: 'Cluster',
75
+ link: getClusterPath(clusterTabsIds.nodes),
76
+ },
77
+ ];
78
+
79
+ if (nodeHost) {
80
+ headerItems.push({
81
+ text: nodeHost,
82
+ });
83
+ }
84
+
85
+ dispatch(setHeader(headerItems));
86
+ }, [dispatch, nodeHost]);
87
+
75
88
  React.useEffect(() => {
76
89
  const fetchData = () => dispatch(getNodeInfo(nodeId));
77
90
  fetchData();
78
91
  autofetcher.start();
79
92
  autofetcher.fetch(() => fetchData());
80
- dispatch(setHeader([headerNodes]));
93
+
81
94
  return () => {
82
95
  autofetcher.stop();
83
96
  dispatch(resetNode());
84
97
  };
85
- }, [nodeId]);
86
-
87
- React.useEffect(() => {
88
- dispatch(
89
- setHeader([
90
- headerNodes,
91
- {
92
- text: nodeHost,
93
- },
94
- ]),
95
- );
96
- }, [nodeHost]);
98
+ }, [dispatch, nodeId]);
97
99
 
98
100
  const renderTabs = () => {
99
101
  return (
@@ -15,13 +15,10 @@ import {ProblemFilter} from '../../components/ProblemFilter';
15
15
  import {UptimeFilter} from '../../components/UptimeFIlter';
16
16
  import {EntitiesCount} from '../../components/EntitiesCount';
17
17
 
18
- import routes, {CLUSTER_PAGES, createHref} from '../../routes';
19
-
20
18
  import {DEFAULT_TABLE_SETTINGS, USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY} from '../../utils/constants';
21
19
  import {useAutofetcher, useSetting, useTypedSelector} from '../../utils/hooks';
22
20
  import {AdditionalNodesInfo, isUnavailableNode, NodesUptimeFilterValues} from '../../utils/nodes';
23
21
 
24
- import {setHeader} from '../../store/reducers/header';
25
22
  import {
26
23
  getNodes,
27
24
  getFilteredPreparedNodesList,
@@ -82,19 +79,6 @@ export const Nodes = ({path, type, className, additionalNodesInfo = {}}: NodesPr
82
79
 
83
80
  useAutofetcher(fetchNodes, [fetchNodes], isClusterNodes ? true : autorefresh);
84
81
 
85
- useEffect(() => {
86
- if (isClusterNodes) {
87
- dispatch(
88
- setHeader([
89
- {
90
- text: CLUSTER_PAGES.nodes.title,
91
- link: createHref(routes.cluster, {activeTab: CLUSTER_PAGES.nodes.id}),
92
- },
93
- ]),
94
- );
95
- }
96
- }, [dispatch, isClusterNodes]);
97
-
98
82
  const handleSearchQueryChange = (value: string) => {
99
83
  dispatch(setSearchValue(value));
100
84
  };
@@ -13,7 +13,7 @@ import type {INodesPreparedEntity} from '../../types/store/nodes';
13
13
 
14
14
  interface GetNodesColumnsProps {
15
15
  tabletsPath?: string;
16
- getNodeRef?: (node?: NodeAddress) => string;
16
+ getNodeRef?: (node?: NodeAddress) => string | null;
17
17
  }
18
18
 
19
19
  export function getNodesColumns({tabletsPath, getNodeRef}: GetNodesColumnsProps) {
@@ -35,8 +35,6 @@ import {getNodesList, selectNodesMap} from '../../store/reducers/nodesList';
35
35
  import StorageGroups from './StorageGroups/StorageGroups';
36
36
  import StorageNodes from './StorageNodes/StorageNodes';
37
37
  import {DEFAULT_TABLE_SETTINGS} from '../../utils/constants';
38
- import {setHeader} from '../../store/reducers/header';
39
- import routes, {CLUSTER_PAGES, createHref} from '../../routes';
40
38
 
41
39
  import './Storage.scss';
42
40
 
@@ -67,7 +65,6 @@ class Storage extends React.Component {
67
65
  setStorageFilter: PropTypes.func,
68
66
  setVisibleEntities: PropTypes.func,
69
67
  visibleEntities: PropTypes.string,
70
- setHeader: PropTypes.func,
71
68
  tenant: PropTypes.string,
72
69
  nodeId: PropTypes.string,
73
70
  nodesUptimeFilter: PropTypes.string,
@@ -77,7 +74,7 @@ class Storage extends React.Component {
77
74
  };
78
75
 
79
76
  componentDidMount() {
80
- const {tenant, nodeId, setVisibleEntities, storageType, setHeader, getNodesList} =
77
+ const {tenant, nodeId, setVisibleEntities, storageType, getNodesList} =
81
78
  this.props;
82
79
 
83
80
  this.autofetcher = new AutoFetcher();
@@ -89,12 +86,6 @@ class Storage extends React.Component {
89
86
  type: storageType,
90
87
  });
91
88
  } else {
92
- setHeader([
93
- {
94
- text: CLUSTER_PAGES.storage.title,
95
- link: createHref(routes.cluster, {activeTab: CLUSTER_PAGES.storage.id}),
96
- },
97
- ]);
98
89
  this.getStorageInfo({
99
90
  filter: FILTER_OPTIONS.Missing,
100
91
  type: storageType,
@@ -375,7 +366,6 @@ const mapDispatchToProps = {
375
366
  setNodesUptimeFilter,
376
367
  getNodesList,
377
368
  setStorageType,
378
- setHeader,
379
369
  setDataWasNotLoaded,
380
370
  };
381
371
 
@@ -6,6 +6,9 @@ import {Link as ExternalLink} from '@gravity-ui/uikit';
6
6
 
7
7
  import {backend} from '../../store';
8
8
  import {getTablet, getTabletDescribe} from '../../store/reducers/tablet';
9
+ import {setHeader} from '../../store/reducers/header';
10
+ import routes, {createHref} from '../../routes';
11
+
9
12
  import {useAutofetcher, useTypedSelector} from '../../utils/hooks';
10
13
  import '../../services/api';
11
14
 
@@ -16,6 +19,8 @@ import {Icon} from '../../components/Icon';
16
19
  import {EmptyState} from '../../components/EmptyState';
17
20
  import {Loader} from '../../components/Loader';
18
21
 
22
+ import {getClusterPath} from '../Cluster/utils';
23
+
19
24
  import {TabletTable} from './TabletTable';
20
25
  import {TabletInfo} from './TabletInfo';
21
26
  import {TabletControls} from './TabletControls';
@@ -56,6 +61,29 @@ export const Tablet = () => {
56
61
 
57
62
  useAutofetcher(fetchData, [fetchData], true);
58
63
 
64
+ useEffect(() => {
65
+ dispatch(
66
+ setHeader([
67
+ {
68
+ text: 'Cluster',
69
+ link: getClusterPath(),
70
+ },
71
+ {
72
+ text: 'Tablets',
73
+ link: createHref(routes.tabletsFilters, undefined, {
74
+ nodeIds: tablet.NodeId ? [tablet.NodeId] : [],
75
+ state: tablet.State,
76
+ type: tablet.Type,
77
+ tenantPath,
78
+ }),
79
+ },
80
+ {
81
+ text: tablet.TabletId ?? 'Tablet',
82
+ },
83
+ ]),
84
+ );
85
+ }, [dispatch, tenantPath, tablet]);
86
+
59
87
  const renderExternalLinks = (link: {name: string; path: string}, index: number) => {
60
88
  return (
61
89
  <li key={index} className={b('link', {external: true})}>
@@ -11,6 +11,7 @@ import ReactList from 'react-list';
11
11
  import {Tablet} from '../../components/Tablet';
12
12
  import {AccessDenied} from '../../components/Errors/403';
13
13
 
14
+ import {setHeader} from '../../store/reducers/header';
14
15
  import {tabletColorToTabletState, tabletStates} from '../../utils/tablet';
15
16
  import {
16
17
  getTabletsInfo,
@@ -21,6 +22,8 @@ import {
21
22
  getTablets,
22
23
  } from '../../store/reducers/tabletsFilters';
23
24
 
25
+ import {getClusterPath} from '../Cluster/utils';
26
+
24
27
  import './TabletsFilters.scss';
25
28
 
26
29
  const b = cn('tablets-filters');
@@ -41,6 +44,7 @@ class TabletsFilters extends React.Component {
41
44
  stateFilter: PropTypes.array,
42
45
  typeFilter: PropTypes.array,
43
46
  error: PropTypes.oneOf([PropTypes.string, PropTypes.object]),
47
+ setHeader: PropTypes.func,
44
48
  };
45
49
 
46
50
  static renderLoader() {
@@ -72,7 +76,7 @@ class TabletsFilters extends React.Component {
72
76
  reloadDescriptor = -1;
73
77
 
74
78
  componentDidMount() {
75
- const {setStateFilter, setTypeFilter} = this.props;
79
+ const {setStateFilter, setTypeFilter, setHeader} = this.props;
76
80
 
77
81
  const queryParams = qs.parse(this.props.location.search, {
78
82
  ignoreQueryPrefix: true,
@@ -87,6 +91,16 @@ class TabletsFilters extends React.Component {
87
91
  this.setState({nodeFilter: nodes, tenantPath: path}, () => {
88
92
  this.makeRequest();
89
93
  });
94
+
95
+ setHeader([
96
+ {
97
+ text: 'Cluster',
98
+ link: getClusterPath(),
99
+ },
100
+ {
101
+ text: 'Tablets'
102
+ }
103
+ ]);
90
104
  }
91
105
 
92
106
  componentDidUpdate(prevProps) {
@@ -326,6 +340,7 @@ const mapDispatchToProps = {
326
340
  clearWasLoadingFlag,
327
341
  setStateFilter,
328
342
  setTypeFilter,
343
+ setHeader,
329
344
  };
330
345
 
331
346
  export default connect(mapStateToProps, mapDispatchToProps)(TabletsFilters);
@@ -15,7 +15,7 @@ import {
15
15
  setCurrentDescribePath,
16
16
  getDescribeBatched,
17
17
  } from '../../../../store/reducers/describe';
18
- import {selectSchemaMergedChildrenPaths} from '../../../../store/reducers/schema';
18
+ import {selectSchemaMergedChildrenPaths} from '../../../../store/reducers/schema/schema';
19
19
  import type {EPathType} from '../../../../types/api/schema';
20
20
 
21
21
  import {isEntityWithMergedImplementation} from '../../utils/schema';
@@ -4,6 +4,9 @@ $section-title-line-height: 24px;
4
4
  .kv-detailed-overview {
5
5
  display: flex;
6
6
  gap: 20px;
7
+
8
+ height: 100%;
9
+
7
10
  &__section {
8
11
  display: flex;
9
12
  overflow-x: hidden;
@@ -12,7 +12,7 @@ import type {EPathType} from '../../../types/api/schema';
12
12
  import {useTypedSelector} from '../../../utils/hooks';
13
13
  import routes, {createHref} from '../../../routes';
14
14
  import type {TenantDiagnosticsTab, TenantGeneralTab} from '../../../store/reducers/tenant/types';
15
- import {enableAutorefresh, disableAutorefresh} from '../../../store/reducers/schema';
15
+ import {enableAutorefresh, disableAutorefresh} from '../../../store/reducers/schema/schema';
16
16
  import {setTopLevelTab, setDiagnosticsTab} from '../../../store/reducers/tenant/tenant';
17
17
  import {TENANT_DIAGNOSTICS_TABS_IDS} from '../../../store/reducers/tenant/constants';
18
18
 
@@ -49,8 +49,8 @@ const b = cn('kv-tenant-diagnostics');
49
49
 
50
50
  function Diagnostics(props: DiagnosticsProps) {
51
51
  const dispatch = useDispatch();
52
- const {currentSchemaPath, autorefresh} = useSelector((state: any) => state.schema);
53
- const {diagnosticsTab = TENANT_DIAGNOSTICS_TABS_IDS.overview, wasLoaded} = useTypedSelector(
52
+ const {currentSchemaPath, autorefresh, wasLoaded} = useSelector((state: any) => state.schema);
53
+ const {diagnosticsTab = TENANT_DIAGNOSTICS_TABS_IDS.overview} = useTypedSelector(
54
54
  (state) => state.tenant,
55
55
  );
56
56
 
@@ -7,7 +7,6 @@ import {
7
7
  } from '../../../../../components/InfoViewer/formatters';
8
8
 
9
9
  import {useTypedSelector} from '../../../../../utils/hooks';
10
- import {selectSchemaData} from '../../../../../store/reducers/schema';
11
10
 
12
11
  import {getEntityName} from '../../../utils';
13
12
 
@@ -42,27 +41,26 @@ const prepareChangefeedInfo = (
42
41
 
43
42
  interface ChangefeedProps {
44
43
  data?: TEvDescribeSchemeResult;
45
- childrenPaths?: string[];
44
+ topic?: TEvDescribeSchemeResult;
46
45
  }
47
46
 
48
47
  /** Displays overview for CDCStream EPathType */
49
- export const ChangefeedInfo = ({data, childrenPaths}: ChangefeedProps) => {
48
+ export const ChangefeedInfo = ({data, topic}: ChangefeedProps) => {
50
49
  const entityName = getEntityName(data?.PathDescription);
51
50
 
52
51
  const {error: schemaError} = useTypedSelector((state) => state.schema);
53
- const pqGroupData = useTypedSelector((state) => selectSchemaData(state, childrenPaths?.[0]));
54
52
 
55
53
  if (schemaError) {
56
54
  return <div className="error">{schemaError.statusText}</div>;
57
55
  }
58
56
 
59
- if (!data || !pqGroupData) {
57
+ if (!data || !topic) {
60
58
  return <div className="error">No {entityName} data</div>;
61
59
  }
62
60
 
63
61
  return (
64
62
  <div>
65
- <InfoViewer title={entityName} info={prepareChangefeedInfo(data, pqGroupData)} />
63
+ <InfoViewer title={entityName} info={prepareChangefeedInfo(data, topic)} />
66
64
  <TopicStats />
67
65
  </div>
68
66
  );