ydb-embedded-ui 6.6.1 → 6.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. package/dist/package.json +2 -1
  2. package/dist/src/containers/App/App.d.ts +1 -1
  3. package/dist/src/containers/App/Content.js +1 -1
  4. package/dist/src/containers/App/appSlots.d.ts +1 -1
  5. package/dist/src/containers/AsideNavigation/Navigation.js +1 -3
  6. package/dist/src/containers/AsideNavigation/i18n/en.json +0 -2
  7. package/dist/src/containers/AsideNavigation/i18n/index.d.ts +1 -1
  8. package/dist/src/containers/AsideNavigation/i18n/index.js +1 -2
  9. package/dist/src/containers/Cluster/i18n/index.d.ts +1 -1
  10. package/dist/src/containers/Clusters/constants.d.ts +1 -1
  11. package/dist/src/containers/Header/Header.js +17 -21
  12. package/dist/src/containers/Header/Header.scss +14 -5
  13. package/dist/src/containers/Header/breadcrumbs.js +65 -71
  14. package/dist/src/containers/Heatmap/Heatmap.js +3 -3
  15. package/dist/src/containers/Nodes/Nodes.js +4 -4
  16. package/dist/src/containers/Nodes/VirtualNodes.js +2 -2
  17. package/dist/src/containers/Storage/Storage.js +2 -2
  18. package/dist/src/containers/Tablets/Tablets.js +8 -8
  19. package/dist/src/containers/TabletsFilters/TabletsFilters.d.ts +2 -57
  20. package/dist/src/containers/TabletsFilters/TabletsFilters.js +70 -180
  21. package/dist/src/containers/Tenant/Acl/Acl.d.ts +3 -1
  22. package/dist/src/containers/Tenant/Acl/Acl.js +7 -17
  23. package/dist/src/containers/Tenant/Diagnostics/Autorefresh/AutorefreshControl.js +4 -5
  24. package/dist/src/containers/Tenant/Diagnostics/Consumers/Consumers.js +3 -3
  25. package/dist/src/containers/Tenant/Diagnostics/Describe/Describe.d.ts +2 -2
  26. package/dist/src/containers/Tenant/Diagnostics/Describe/Describe.js +5 -6
  27. package/dist/src/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.d.ts +1 -0
  28. package/dist/src/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.js +3 -5
  29. package/dist/src/containers/Tenant/Diagnostics/Diagnostics.d.ts +2 -0
  30. package/dist/src/containers/Tenant/Diagnostics/Diagnostics.js +26 -50
  31. package/dist/src/containers/Tenant/Diagnostics/Diagnostics.scss +1 -1
  32. package/dist/src/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +19 -58
  33. package/dist/src/containers/Tenant/Diagnostics/Network/Network.d.ts +2 -2
  34. package/dist/src/containers/Tenant/Diagnostics/Network/Network.js +5 -5
  35. package/dist/src/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/AsyncReplicationInfo.js +1 -6
  36. package/dist/src/containers/Tenant/Diagnostics/Overview/ChangefeedInfo/ChangefeedInfo.d.ts +2 -1
  37. package/dist/src/containers/Tenant/Diagnostics/Overview/ChangefeedInfo/ChangefeedInfo.js +3 -8
  38. package/dist/src/containers/Tenant/Diagnostics/Overview/Overview.d.ts +2 -2
  39. package/dist/src/containers/Tenant/Diagnostics/Overview/Overview.js +19 -21
  40. package/dist/src/containers/Tenant/Diagnostics/Overview/TableInfo/TableInfo.scss +0 -2
  41. package/dist/src/containers/Tenant/Diagnostics/Overview/TopicInfo/TopicInfo.d.ts +2 -1
  42. package/dist/src/containers/Tenant/Diagnostics/Overview/TopicInfo/TopicInfo.js +3 -8
  43. package/dist/src/containers/Tenant/Diagnostics/Overview/TopicStats/TopicStats.d.ts +3 -1
  44. package/dist/src/containers/Tenant/Diagnostics/Overview/TopicStats/TopicStats.js +5 -5
  45. package/dist/src/containers/Tenant/Diagnostics/Partitions/Partitions.js +4 -12
  46. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/Healthcheck.scss +48 -57
  47. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckDetails.d.ts +2 -5
  48. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckDetails.js +7 -2
  49. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.d.ts +1 -6
  50. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.js +22 -16
  51. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.d.ts +2 -8
  52. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.js +2 -2
  53. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TenantCpu.d.ts +2 -2
  54. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TenantCpu.js +2 -2
  55. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.d.ts +2 -2
  56. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js +4 -4
  57. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.d.ts +2 -2
  58. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.js +4 -4
  59. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.d.ts +2 -2
  60. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +4 -4
  61. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.d.ts +2 -1
  62. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js +5 -5
  63. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantDashboard/TenantDashboard.js +3 -3
  64. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TenantMemory.d.ts +2 -2
  65. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TenantMemory.js +2 -2
  66. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.d.ts +2 -2
  67. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js +4 -4
  68. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +7 -9
  69. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +3 -3
  70. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.js +3 -3
  71. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/useHealthcheck.js +1 -1
  72. package/dist/src/containers/Tenant/Diagnostics/TopQueries/TopQueries.d.ts +2 -2
  73. package/dist/src/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +5 -5
  74. package/dist/src/containers/Tenant/Diagnostics/TopShards/TopShards.d.ts +3 -2
  75. package/dist/src/containers/Tenant/Diagnostics/TopShards/TopShards.js +8 -8
  76. package/dist/src/containers/Tenant/Info/ExternalDataSource/ExternalDataSource.js +0 -6
  77. package/dist/src/containers/Tenant/Info/ExternalTable/ExternalTable.js +0 -6
  78. package/dist/src/containers/Tenant/Info/View/View.js +0 -6
  79. package/dist/src/containers/Tenant/ObjectGeneral/ObjectGeneral.d.ts +2 -1
  80. package/dist/src/containers/Tenant/ObjectGeneral/ObjectGeneral.js +7 -13
  81. package/dist/src/containers/Tenant/ObjectSummary/ObjectSummary.d.ts +4 -4
  82. package/dist/src/containers/Tenant/ObjectSummary/ObjectSummary.js +159 -63
  83. package/dist/src/containers/Tenant/Query/Issues/Issues.js +6 -5
  84. package/dist/src/containers/Tenant/Query/Preview/Preview.d.ts +2 -1
  85. package/dist/src/containers/Tenant/Query/Preview/Preview.js +6 -6
  86. package/dist/src/containers/Tenant/Query/Query.d.ts +1 -0
  87. package/dist/src/containers/Tenant/Query/Query.scss +1 -1
  88. package/dist/src/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +2 -0
  89. package/dist/src/containers/Tenant/Query/QueryEditor/QueryEditor.js +9 -22
  90. package/dist/src/containers/Tenant/Query/i18n/en.json +1 -1
  91. package/dist/src/containers/Tenant/Schema/SchemaTree/SchemaTree.d.ts +1 -0
  92. package/dist/src/containers/Tenant/Schema/SchemaTree/SchemaTree.js +11 -19
  93. package/dist/src/containers/Tenant/Schema/SchemaViewer/SchemaViewer.d.ts +2 -2
  94. package/dist/src/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +13 -8
  95. package/dist/src/containers/Tenant/Schema/SchemaViewer/columns.d.ts +2 -1
  96. package/dist/src/containers/Tenant/Schema/SchemaViewer/columns.js +21 -2
  97. package/dist/src/containers/Tenant/Schema/SchemaViewer/i18n/en.json +1 -0
  98. package/dist/src/containers/Tenant/Schema/SchemaViewer/i18n/index.d.ts +1 -1
  99. package/dist/src/containers/Tenant/Schema/SchemaViewer/prepareData.js +2 -1
  100. package/dist/src/containers/Tenant/Schema/SchemaViewer/types.d.ts +1 -0
  101. package/dist/src/containers/Tenant/Tenant.js +20 -36
  102. package/dist/src/containers/Tenant/Tenant.scss +4 -0
  103. package/dist/src/containers/Tenant/TenantNavigation/TenantNavigation.d.ts +2 -0
  104. package/dist/src/containers/Tenant/TenantNavigation/TenantNavigation.js +19 -0
  105. package/dist/src/containers/Tenant/TenantNavigation/TenantNavigation.scss +18 -0
  106. package/dist/src/containers/Tenant/TenantNavigation/useTenantNavigation.d.ts +9 -0
  107. package/dist/src/containers/Tenant/TenantNavigation/useTenantNavigation.js +44 -0
  108. package/dist/src/containers/Tenant/i18n/en.json +17 -0
  109. package/dist/src/containers/Tenant/i18n/index.d.ts +1 -1
  110. package/dist/src/containers/Tenant/utils/queryTemplates.d.ts +1 -0
  111. package/dist/src/containers/Tenant/utils/queryTemplates.js +12 -0
  112. package/dist/src/containers/Tenant/utils/schemaActions.js +3 -1
  113. package/dist/src/lib.d.ts +1 -1
  114. package/dist/src/lib.js +1 -1
  115. package/dist/src/routes.d.ts +1 -1
  116. package/dist/src/routes.js +3 -1
  117. package/dist/src/services/api.d.ts +6 -1
  118. package/dist/src/services/api.js +23 -3
  119. package/dist/src/services/settings.d.ts +1 -0
  120. package/dist/src/services/settings.js +3 -2
  121. package/dist/src/store/configureStore.d.ts +36 -134
  122. package/dist/src/store/configureStore.js +2 -15
  123. package/dist/src/store/defaultStore.d.ts +17 -81
  124. package/dist/src/store/reducers/api.js +0 -1
  125. package/dist/src/store/reducers/authentication/authentication.d.ts +51 -243
  126. package/dist/src/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +196 -849
  127. package/dist/src/store/reducers/healthcheckInfo/healthcheckInfo.js +3 -3
  128. package/dist/src/store/reducers/hotKeys/hotKeys.d.ts +6 -25
  129. package/dist/src/store/reducers/hotKeys/hotKeys.js +36 -49
  130. package/dist/src/store/reducers/index.d.ts +23 -100
  131. package/dist/src/store/reducers/index.js +0 -8
  132. package/dist/src/store/reducers/node/selectors.d.ts +0 -40
  133. package/dist/src/store/reducers/nodesList.d.ts +0 -40
  134. package/dist/src/store/reducers/schema/schema.d.ts +13 -149
  135. package/dist/src/store/reducers/schema/schema.js +45 -90
  136. package/dist/src/store/reducers/schema/types.d.ts +2 -21
  137. package/dist/src/store/reducers/schemaAcl/schemaAcl.d.ts +8 -135
  138. package/dist/src/store/reducers/schemaAcl/schemaAcl.js +18 -44
  139. package/dist/src/store/reducers/settings/settings.d.ts +17 -23
  140. package/dist/src/store/reducers/settings/settings.js +40 -33
  141. package/dist/src/store/reducers/settings/types.d.ts +1 -12
  142. package/dist/src/store/reducers/tablets.d.ts +288 -41
  143. package/dist/src/store/reducers/tablets.js +8 -4
  144. package/dist/src/store/reducers/tabletsFilters.d.ts +11 -164
  145. package/dist/src/store/reducers/tabletsFilters.js +14 -76
  146. package/dist/src/store/reducers/tenants/selectors.d.ts +8 -362
  147. package/dist/src/store/reducers/topic.d.ts +0 -600
  148. package/dist/src/store/state-url-mapping.js +0 -3
  149. package/dist/src/utils/constants.d.ts +1 -1
  150. package/dist/src/utils/constants.js +1 -1
  151. package/dist/src/utils/dataFormatters/dataFormatters.d.ts +2 -1
  152. package/dist/src/utils/dataFormatters/dataFormatters.js +7 -3
  153. package/dist/src/utils/hooks/index.d.ts +1 -0
  154. package/dist/src/utils/hooks/index.js +1 -0
  155. package/dist/src/utils/hooks/useAutoRefreshInterval.d.ts +1 -0
  156. package/dist/src/utils/hooks/useAutoRefreshInterval.js +5 -0
  157. package/dist/src/utils/utils.js +2 -1
  158. package/package.json +2 -1
  159. package/dist/src/components/InfoViewer/schemaOverview/CDCStreamOverview.d.ts +0 -6
  160. package/dist/src/components/InfoViewer/schemaOverview/CDCStreamOverview.js +0 -17
  161. package/dist/src/components/InfoViewer/schemaOverview/PersQueueGroupOverview.d.ts +0 -6
  162. package/dist/src/components/InfoViewer/schemaOverview/PersQueueGroupOverview.js +0 -20
  163. package/dist/src/components/InfoViewer/schemaOverview/index.d.ts +0 -2
  164. package/dist/src/components/InfoViewer/schemaOverview/index.js +0 -2
  165. package/dist/src/containers/AsideNavigation/i18n/ru.json +0 -10
  166. package/dist/src/containers/AsideNavigation/useNavigationMenuItems.d.ts +0 -2
  167. package/dist/src/containers/AsideNavigation/useNavigationMenuItems.js +0 -54
  168. package/dist/src/store/reducers/host.d.ts +0 -130
  169. package/dist/src/store/reducers/host.js +0 -26
  170. package/dist/src/store/reducers/hotKeys/types.d.ts +0 -10
  171. package/dist/src/store/reducers/hotKeys/types.js +0 -1
  172. package/dist/src/store/reducers/schemaAcl/types.d.ts +0 -12
  173. package/dist/src/store/reducers/schemaAcl/types.js +0 -1
  174. package/dist/src/types/store/host.d.ts +0 -15
  175. package/dist/src/types/store/host.js +0 -1
@@ -1,28 +1,32 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from 'react';
3
- import { ArrowsRotateRight } from '@gravity-ui/icons';
4
- import { Button, Icon } from '@gravity-ui/uikit';
2
+ import { CircleCheck, CircleInfo, CircleQuestion, CircleXmark, TriangleExclamationFill, } from '@gravity-ui/icons';
3
+ import { Icon } from '@gravity-ui/uikit';
5
4
  import { DiagnosticCard } from '../../../../../components/DiagnosticCard/DiagnosticCard';
6
- import { EntityStatus } from '../../../../../components/EntityStatus/EntityStatus';
7
5
  import { ResponseError } from '../../../../../components/Errors/ResponseError';
8
6
  import { Loader } from '../../../../../components/Loader';
9
- import { hcStatusToColorFlag } from '../../../../../store/reducers/healthcheckInfo/utils';
7
+ import { healthcheckApi } from '../../../../../store/reducers/healthcheckInfo/healthcheckInfo';
8
+ import { SelfCheckResult } from '../../../../../types/api/healthcheck';
10
9
  import { cn } from '../../../../../utils/cn';
10
+ import { useAutoRefreshInterval } from '../../../../../utils/hooks';
11
11
  import i18n from './i18n';
12
12
  import './Healthcheck.scss';
13
13
  const b = cn('healthcheck');
14
+ const icons = {
15
+ [SelfCheckResult.UNSPECIFIED]: CircleQuestion,
16
+ [SelfCheckResult.GOOD]: CircleCheck,
17
+ [SelfCheckResult.DEGRADED]: CircleInfo,
18
+ [SelfCheckResult.MAINTENANCE_REQUIRED]: CircleXmark,
19
+ [SelfCheckResult.EMERGENCY]: TriangleExclamationFill,
20
+ };
14
21
  export function HealthcheckPreview(props) {
15
- const { selfCheckResult, issuesStatistics, loading, onUpdate, error, active } = props;
22
+ const { tenantName, active } = props;
23
+ const [autoRefreshInterval] = useAutoRefreshInterval();
24
+ const { currentData: data, isFetching, error, } = healthcheckApi.useGetHealthcheckInfoQuery({ database: tenantName }, {
25
+ pollingInterval: autoRefreshInterval,
26
+ });
27
+ const loading = isFetching && data === undefined;
16
28
  const renderHeader = () => {
17
- const modifier = selfCheckResult.toLowerCase();
18
- if (loading) {
19
- return null;
20
- }
21
- return (_jsxs("div", { className: b('preview-header'), children: [_jsxs("div", { className: b('preview-title-wrapper'), children: [_jsx("div", { className: b('preview-title'), children: i18n('title.healthcheck') }), _jsx(Button, { size: "s", onClick: (event) => {
22
- // FIXME: refactor card to remove the button from the anchor link.
23
- event.preventDefault();
24
- onUpdate();
25
- }, loading: loading, view: "flat-secondary", children: _jsx(Icon, { data: ArrowsRotateRight, size: 20 }) })] }), _jsx("div", { className: b('self-check-status-indicator', { [modifier]: true }), children: selfCheckResult })] }));
29
+ return (_jsx("div", { className: b('preview-header'), children: _jsx("div", { className: b('preview-title-wrapper'), children: _jsx("div", { className: b('preview-title'), children: i18n('title.healthcheck') }) }) }));
26
30
  };
27
31
  const renderContent = () => {
28
32
  if (error) {
@@ -31,7 +35,9 @@ export function HealthcheckPreview(props) {
31
35
  if (loading) {
32
36
  return _jsx(Loader, { size: "m" });
33
37
  }
34
- return (_jsx("div", { className: b('preview-content'), children: !issuesStatistics || !issuesStatistics.length ? (i18n('status_message.ok')) : (_jsxs(React.Fragment, { children: [_jsx("div", { children: i18n('label.issues') }), _jsx("div", { className: b('issues-statistics'), children: issuesStatistics.map(([status, count]) => (_jsx(EntityStatus, { mode: "icons", status: hcStatusToColorFlag[status], label: count.toString(), size: "l" }, status))) })] })) }));
38
+ const selfCheckResult = (data === null || data === void 0 ? void 0 : data.self_check_result) || SelfCheckResult.UNSPECIFIED;
39
+ const modifier = selfCheckResult.toLowerCase();
40
+ return (_jsx("div", { className: b('preview-content'), children: _jsxs("div", { className: b('preview-issue', { [modifier]: true }), children: [_jsx(Icon, { className: b('preview-status-icon'), data: icons[selfCheckResult] }), _jsx("div", { className: b('self-check-status-indicator'), children: selfCheckResult.replace(/_/g, ' ') })] }) }));
35
41
  };
36
42
  return (_jsxs(DiagnosticCard, { className: b('preview'), active: active, children: [renderHeader(), renderContent()] }));
37
43
  }
@@ -1,5 +1,4 @@
1
1
  import type { TenantMetricStats, TenantPoolsStats, TenantStorageStats } from '../../../../../store/reducers/tenants/utils';
2
- import type { SelfCheckResult, StatusFlag } from '../../../../../types/api/healthcheck';
3
2
  import './MetricsCards.scss';
4
3
  export interface TenantMetrics {
5
4
  memoryUsed?: number;
@@ -14,12 +13,7 @@ interface MetricsCardsProps {
14
13
  memoryStats?: TenantMetricStats[];
15
14
  blobStorageStats?: TenantStorageStats[];
16
15
  tabletStorageStats?: TenantStorageStats[];
17
- issuesStatistics?: [StatusFlag, number][];
18
- selfCheckResult: SelfCheckResult;
19
- fetchHealthcheck: VoidFunction;
20
- healthcheckLoading?: boolean;
21
- healthCheckWasLoaded?: boolean;
22
- healthcheckError?: unknown;
16
+ tenantName: string;
23
17
  }
24
- export declare function MetricsCards({ poolsCpuStats, memoryStats, blobStorageStats, tabletStorageStats, issuesStatistics, selfCheckResult, fetchHealthcheck, healthcheckLoading, healthcheckError, }: MetricsCardsProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function MetricsCards({ poolsCpuStats, memoryStats, blobStorageStats, tabletStorageStats, tenantName, }: MetricsCardsProps): import("react/jsx-runtime").JSX.Element;
25
19
  export {};
@@ -13,7 +13,7 @@ import i18n from '../i18n';
13
13
  import { MetricCard } from './MetricCard/MetricCard';
14
14
  import './MetricsCards.scss';
15
15
  const b = cn('metrics-cards');
16
- export function MetricsCards({ poolsCpuStats, memoryStats, blobStorageStats, tabletStorageStats, issuesStatistics, selfCheckResult, fetchHealthcheck, healthcheckLoading, healthcheckError, }) {
16
+ export function MetricsCards({ poolsCpuStats, memoryStats, blobStorageStats, tabletStorageStats, tenantName, }) {
17
17
  const location = useLocation();
18
18
  const { metricsTab } = useTypedSelector((state) => state.tenant);
19
19
  const queryParams = parseQuery(location);
@@ -30,7 +30,7 @@ export function MetricsCards({ poolsCpuStats, memoryStats, blobStorageStats, tab
30
30
  [TENANT_METRICS_TABS_IDS.memory]: getTenantPath(Object.assign(Object.assign({}, queryParams), { [TenantTabsGroups.metricsTab]: getTabIfNotActive(TENANT_METRICS_TABS_IDS.memory) })),
31
31
  [TENANT_METRICS_TABS_IDS.healthcheck]: getTenantPath(Object.assign(Object.assign({}, queryParams), { [TenantTabsGroups.metricsTab]: getTabIfNotActive(TENANT_METRICS_TABS_IDS.healthcheck) })),
32
32
  };
33
- return (_jsxs("div", { className: b(), children: [_jsx(Link, { to: tabLinks.cpu, className: b('tab'), children: _jsx(CPUCard, { poolsCpuStats: poolsCpuStats, active: metricsTab === TENANT_METRICS_TABS_IDS.cpu }) }), _jsx(Link, { to: tabLinks.storage, className: b('tab'), children: _jsx(StorageCard, { blobStorageStats: blobStorageStats, tabletStorageStats: tabletStorageStats, active: metricsTab === TENANT_METRICS_TABS_IDS.storage }) }), _jsx(Link, { to: tabLinks.memory, className: b('tab'), children: _jsx(MemoryCard, { memoryStats: memoryStats, active: metricsTab === TENANT_METRICS_TABS_IDS.memory }) }), _jsx(Link, { to: tabLinks.healthcheck, className: b('tab'), children: _jsx(HealthcheckPreview, { selfCheckResult: selfCheckResult, issuesStatistics: issuesStatistics, onUpdate: fetchHealthcheck, loading: healthcheckLoading, error: healthcheckError, active: metricsTab === TENANT_METRICS_TABS_IDS.healthcheck }) })] }));
33
+ return (_jsxs("div", { className: b(), children: [_jsx(Link, { to: tabLinks.cpu, className: b('tab'), children: _jsx(CPUCard, { poolsCpuStats: poolsCpuStats, active: metricsTab === TENANT_METRICS_TABS_IDS.cpu }) }), _jsx(Link, { to: tabLinks.storage, className: b('tab'), children: _jsx(StorageCard, { blobStorageStats: blobStorageStats, tabletStorageStats: tabletStorageStats, active: metricsTab === TENANT_METRICS_TABS_IDS.storage }) }), _jsx(Link, { to: tabLinks.memory, className: b('tab'), children: _jsx(MemoryCard, { memoryStats: memoryStats, active: metricsTab === TENANT_METRICS_TABS_IDS.memory }) }), _jsx(Link, { to: tabLinks.healthcheck, className: b('tab'), children: _jsx(HealthcheckPreview, { tenantName: tenantName, active: metricsTab === TENANT_METRICS_TABS_IDS.healthcheck }) })] }));
34
34
  }
35
35
  function CPUCard({ poolsCpuStats = [], active }) {
36
36
  let status = METRIC_STATUS.Unspecified;
@@ -1,7 +1,7 @@
1
1
  import type { AdditionalNodesProps } from '../../../../../types/additionalProps';
2
2
  interface TenantCpuProps {
3
- path: string;
3
+ tenantName: string;
4
4
  additionalNodesProps?: AdditionalNodesProps;
5
5
  }
6
- export declare function TenantCpu({ path, additionalNodesProps }: TenantCpuProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function TenantCpu({ tenantName, additionalNodesProps }: TenantCpuProps): import("react/jsx-runtime").JSX.Element;
7
7
  export {};
@@ -6,6 +6,6 @@ import { TopNodesByLoad } from './TopNodesByLoad';
6
6
  import { TopQueries } from './TopQueries';
7
7
  import { TopShards } from './TopShards';
8
8
  import { cpuDashboardConfig } from './cpuDashboardConfig';
9
- export function TenantCpu({ path, additionalNodesProps }) {
10
- return (_jsxs(React.Fragment, { children: [_jsx(TenantDashboard, { database: path, charts: cpuDashboardConfig }), _jsx(TopNodesByLoad, { path: path, additionalNodesProps: additionalNodesProps }), _jsx(TopNodesByCpu, { path: path, additionalNodesProps: additionalNodesProps }), _jsx(TopShards, { path: path }), _jsx(TopQueries, { path: path })] }));
9
+ export function TenantCpu({ tenantName, additionalNodesProps }) {
10
+ return (_jsxs(React.Fragment, { children: [_jsx(TenantDashboard, { database: tenantName, charts: cpuDashboardConfig }), _jsx(TopNodesByLoad, { tenantName: tenantName, additionalNodesProps: additionalNodesProps }), _jsx(TopNodesByCpu, { tenantName: tenantName, additionalNodesProps: additionalNodesProps }), _jsx(TopShards, { tenantName: tenantName, path: tenantName }), _jsx(TopQueries, { tenantName: tenantName })] }));
11
11
  }
@@ -1,7 +1,7 @@
1
1
  import type { AdditionalNodesProps } from '../../../../../types/additionalProps';
2
2
  interface TopNodesByCpuProps {
3
- path: string;
3
+ tenantName: string;
4
4
  additionalNodesProps?: AdditionalNodesProps;
5
5
  }
6
- export declare function TopNodesByCpu({ path, additionalNodesProps }: TopNodesByCpuProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function TopNodesByCpu({ tenantName, additionalNodesProps }: TopNodesByCpuProps): import("react/jsx-runtime").JSX.Element;
7
7
  export {};
@@ -1,17 +1,17 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { TENANT_DIAGNOSTICS_TABS_IDS } from '../../../../../store/reducers/tenant/constants';
3
3
  import { topNodesApi } from '../../../../../store/reducers/tenantOverview/topNodes/topNodes';
4
- import { useSearchQuery, useTypedSelector } from '../../../../../utils/hooks';
4
+ import { useAutoRefreshInterval, useSearchQuery } from '../../../../../utils/hooks';
5
5
  import { NODES_COLUMNS_WIDTH_LS_KEY, getTopNodesByCpuColumns, } from '../../../../Nodes/getNodesColumns';
6
6
  import { TenantTabsGroups, getTenantPath } from '../../../TenantPages';
7
7
  import { TenantOverviewTableLayout } from '../TenantOverviewTableLayout';
8
8
  import { getSectionTitle } from '../getSectionTitle';
9
9
  import i18n from '../i18n';
10
- export function TopNodesByCpu({ path, additionalNodesProps }) {
10
+ export function TopNodesByCpu({ tenantName, additionalNodesProps }) {
11
11
  const query = useSearchQuery();
12
- const { autorefresh } = useTypedSelector((state) => state.schema);
12
+ const [autoRefreshInterval] = useAutoRefreshInterval();
13
13
  const columns = getTopNodesByCpuColumns(additionalNodesProps === null || additionalNodesProps === void 0 ? void 0 : additionalNodesProps.getNodeRef);
14
- const { currentData, isFetching, error } = topNodesApi.useGetTopNodesQuery({ tenant: path, sortValue: 'CPU' }, { pollingInterval: autorefresh });
14
+ const { currentData, isFetching, error } = topNodesApi.useGetTopNodesQuery({ tenant: tenantName, sortValue: 'CPU' }, { pollingInterval: autoRefreshInterval });
15
15
  const loading = isFetching && currentData === undefined;
16
16
  const topNodes = currentData;
17
17
  const title = getSectionTitle({
@@ -1,7 +1,7 @@
1
1
  import type { AdditionalNodesProps } from '../../../../../types/additionalProps';
2
2
  interface TopNodesByLoadProps {
3
- path: string;
3
+ tenantName: string;
4
4
  additionalNodesProps?: AdditionalNodesProps;
5
5
  }
6
- export declare function TopNodesByLoad({ path, additionalNodesProps }: TopNodesByLoadProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function TopNodesByLoad({ tenantName, additionalNodesProps }: TopNodesByLoadProps): import("react/jsx-runtime").JSX.Element;
7
7
  export {};
@@ -1,17 +1,17 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { TENANT_DIAGNOSTICS_TABS_IDS } from '../../../../../store/reducers/tenant/constants';
3
3
  import { topNodesApi } from '../../../../../store/reducers/tenantOverview/topNodes/topNodes';
4
- import { useSearchQuery, useTypedSelector } from '../../../../../utils/hooks';
4
+ import { useAutoRefreshInterval, useSearchQuery } from '../../../../../utils/hooks';
5
5
  import { NODES_COLUMNS_WIDTH_LS_KEY, getTopNodesByLoadColumns, } from '../../../../Nodes/getNodesColumns';
6
6
  import { TenantTabsGroups, getTenantPath } from '../../../TenantPages';
7
7
  import { TenantOverviewTableLayout } from '../TenantOverviewTableLayout';
8
8
  import { getSectionTitle } from '../getSectionTitle';
9
9
  import i18n from '../i18n';
10
- export function TopNodesByLoad({ path, additionalNodesProps }) {
10
+ export function TopNodesByLoad({ tenantName, additionalNodesProps }) {
11
11
  const query = useSearchQuery();
12
- const { autorefresh } = useTypedSelector((state) => state.schema);
12
+ const [autoRefreshInterval] = useAutoRefreshInterval();
13
13
  const columns = getTopNodesByLoadColumns(additionalNodesProps === null || additionalNodesProps === void 0 ? void 0 : additionalNodesProps.getNodeRef);
14
- const { currentData, isFetching, error } = topNodesApi.useGetTopNodesQuery({ tenant: path, sortValue: 'LoadAverage' }, { pollingInterval: autorefresh });
14
+ const { currentData, isFetching, error } = topNodesApi.useGetTopNodesQuery({ tenant: tenantName, sortValue: 'LoadAverage' }, { pollingInterval: autoRefreshInterval });
15
15
  const loading = isFetching && currentData === undefined;
16
16
  const topNodes = currentData;
17
17
  const title = getSectionTitle({
@@ -1,5 +1,5 @@
1
1
  interface TopQueriesProps {
2
- path: string;
2
+ tenantName: string;
3
3
  }
4
- export declare function TopQueries({ path }: TopQueriesProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function TopQueries({ tenantName }: TopQueriesProps): import("react/jsx-runtime").JSX.Element;
5
5
  export {};
@@ -5,7 +5,7 @@ import { parseQuery } from '../../../../../routes';
5
5
  import { changeUserInput } from '../../../../../store/reducers/executeQuery';
6
6
  import { TENANT_DIAGNOSTICS_TABS_IDS, TENANT_PAGE, TENANT_PAGES_IDS, TENANT_QUERY_TABS_ID, } from '../../../../../store/reducers/tenant/constants';
7
7
  import { topQueriesApi } from '../../../../../store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries';
8
- import { useTypedDispatch, useTypedSelector } from '../../../../../utils/hooks';
8
+ import { useAutoRefreshInterval, useTypedDispatch } from '../../../../../utils/hooks';
9
9
  import { parseQueryErrorToString } from '../../../../../utils/query';
10
10
  import { TenantTabsGroups, getTenantPath } from '../../../TenantPages';
11
11
  import { TOP_QUERIES_COLUMNS_WIDTH_LS_KEY, getTenantOverviewTopQueriesColumns, } from '../../TopQueries/getTopQueriesColumns';
@@ -13,14 +13,14 @@ import { TenantOverviewTableLayout } from '../TenantOverviewTableLayout';
13
13
  import { getSectionTitle } from '../getSectionTitle';
14
14
  import i18n from '../i18n';
15
15
  import { b } from '../utils';
16
- export function TopQueries({ path }) {
16
+ export function TopQueries({ tenantName }) {
17
17
  const dispatch = useTypedDispatch();
18
18
  const location = useLocation();
19
19
  const history = useHistory();
20
20
  const query = parseQuery(location);
21
- const { autorefresh } = useTypedSelector((state) => state.schema);
21
+ const [autoRefreshInterval] = useAutoRefreshInterval();
22
22
  const columns = getTenantOverviewTopQueriesColumns();
23
- const { currentData, isFetching, error } = topQueriesApi.useGetOverviewTopQueriesQuery({ database: path }, { pollingInterval: autorefresh });
23
+ const { currentData, isFetching, error } = topQueriesApi.useGetOverviewTopQueriesQuery({ database: tenantName }, { pollingInterval: autoRefreshInterval });
24
24
  const loading = isFetching && currentData === undefined;
25
25
  const { result: data } = currentData || {};
26
26
  const handleRowClick = React.useCallback((row) => {
@@ -1,5 +1,6 @@
1
1
  interface TopShardsProps {
2
+ tenantName: string;
2
3
  path: string;
3
4
  }
4
- export declare const TopShards: ({ path }: TopShardsProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const TopShards: ({ tenantName, path }: TopShardsProps) => import("react/jsx-runtime").JSX.Element;
5
6
  export {};
@@ -3,21 +3,21 @@ import { useLocation } from 'react-router';
3
3
  import { parseQuery } from '../../../../../routes';
4
4
  import { TENANT_DIAGNOSTICS_TABS_IDS } from '../../../../../store/reducers/tenant/constants';
5
5
  import { topShardsApi } from '../../../../../store/reducers/tenantOverview/topShards/tenantOverviewTopShards';
6
- import { useTypedSelector } from '../../../../../utils/hooks';
6
+ import { useAutoRefreshInterval } from '../../../../../utils/hooks';
7
7
  import { parseQueryErrorToString } from '../../../../../utils/query';
8
8
  import { TenantTabsGroups, getTenantPath } from '../../../TenantPages';
9
9
  import { TOP_SHARDS_COLUMNS_WIDTH_LS_KEY, getTopShardsColumns, } from '../../TopShards/getTopShardsColumns';
10
10
  import { TenantOverviewTableLayout } from '../TenantOverviewTableLayout';
11
11
  import { getSectionTitle } from '../getSectionTitle';
12
12
  import i18n from '../i18n';
13
- export const TopShards = ({ path }) => {
13
+ export const TopShards = ({ tenantName, path }) => {
14
14
  const location = useLocation();
15
15
  const query = parseQuery(location);
16
- const { autorefresh, currentSchemaPath } = useTypedSelector((state) => state.schema);
17
- const { currentData, isFetching, error } = topShardsApi.useGetTopShardsQuery({ database: path, path: currentSchemaPath }, { pollingInterval: autorefresh });
16
+ const [autoRefreshInterval] = useAutoRefreshInterval();
17
+ const { currentData, isFetching, error } = topShardsApi.useGetTopShardsQuery({ database: tenantName, path }, { pollingInterval: autoRefreshInterval });
18
18
  const loading = isFetching && currentData === undefined;
19
19
  const { result: data } = currentData || {};
20
- const columns = getTopShardsColumns(path, location);
20
+ const columns = getTopShardsColumns(tenantName, location);
21
21
  const title = getSectionTitle({
22
22
  entity: i18n('shards'),
23
23
  postfix: i18n('by-cpu-usage'),
@@ -4,7 +4,7 @@ import { StringParam, useQueryParam } from 'use-query-params';
4
4
  import { MetricChart } from '../../../../../components/MetricChart';
5
5
  import { TimeFrameSelector } from '../../../../../components/TimeFrameSelector/TimeFrameSelector';
6
6
  import { cn } from '../../../../../utils/cn';
7
- import { useTypedSelector } from '../../../../../utils/hooks';
7
+ import { useAutoRefreshInterval } from '../../../../../utils/hooks';
8
8
  import './TenantDashboard.scss';
9
9
  const CHART_WIDTH = 428;
10
10
  const CHART_WIDTH_FULL = 872;
@@ -12,9 +12,9 @@ const b = cn('ydb-tenant-dashboard');
12
12
  export const TenantDashboard = ({ database, charts }) => {
13
13
  const [isDashboardHidden, setIsDashboardHidden] = React.useState(true);
14
14
  const [timeFrame = '1h', setTimeframe] = useQueryParam('timeframe', StringParam);
15
- const { autorefresh } = useTypedSelector((state) => state.schema);
15
+ const [autoRefreshInterval] = useAutoRefreshInterval();
16
16
  // Refetch data only if dashboard successfully loaded
17
- const shouldRefresh = isDashboardHidden ? 0 : autorefresh;
17
+ const shouldRefresh = isDashboardHidden ? 0 : autoRefreshInterval;
18
18
  /**
19
19
  * Charts should be hidden, if they are not enabled:
20
20
  * 1. GraphShard is not enabled
@@ -1,5 +1,5 @@
1
1
  interface TenantMemoryProps {
2
- path: string;
2
+ tenantName: string;
3
3
  }
4
- export declare function TenantMemory({ path }: TenantMemoryProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function TenantMemory({ tenantName }: TenantMemoryProps): import("react/jsx-runtime").JSX.Element;
5
5
  export {};
@@ -3,6 +3,6 @@ import React from 'react';
3
3
  import { TenantDashboard } from '../TenantDashboard/TenantDashboard';
4
4
  import { TopNodesByMemory } from './TopNodesByMemory';
5
5
  import { memoryDashboardConfig } from './memoryDashboardConfig';
6
- export function TenantMemory({ path }) {
7
- return (_jsxs(React.Fragment, { children: [_jsx(TenantDashboard, { database: path, charts: memoryDashboardConfig }), _jsx(TopNodesByMemory, { path: path })] }));
6
+ export function TenantMemory({ tenantName }) {
7
+ return (_jsxs(React.Fragment, { children: [_jsx(TenantDashboard, { database: tenantName, charts: memoryDashboardConfig }), _jsx(TopNodesByMemory, { tenantName: tenantName })] }));
8
8
  }
@@ -1,7 +1,7 @@
1
1
  import type { AdditionalNodesProps } from '../../../../../types/additionalProps';
2
2
  interface TopNodesByMemoryProps {
3
- path: string;
3
+ tenantName: string;
4
4
  additionalNodesProps?: AdditionalNodesProps;
5
5
  }
6
- export declare function TopNodesByMemory({ path, additionalNodesProps }: TopNodesByMemoryProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function TopNodesByMemory({ tenantName, additionalNodesProps }: TopNodesByMemoryProps): import("react/jsx-runtime").JSX.Element;
7
7
  export {};
@@ -1,19 +1,19 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { TENANT_DIAGNOSTICS_TABS_IDS } from '../../../../../store/reducers/tenant/constants';
3
3
  import { topNodesApi } from '../../../../../store/reducers/tenantOverview/topNodes/topNodes';
4
- import { useSearchQuery, useTypedSelector } from '../../../../../utils/hooks';
4
+ import { useAutoRefreshInterval, useSearchQuery } from '../../../../../utils/hooks';
5
5
  import { NODES_COLUMNS_WIDTH_LS_KEY, getTopNodesByMemoryColumns, } from '../../../../Nodes/getNodesColumns';
6
6
  import { TenantTabsGroups, getTenantPath } from '../../../TenantPages';
7
7
  import { TenantOverviewTableLayout } from '../TenantOverviewTableLayout';
8
8
  import { getSectionTitle } from '../getSectionTitle';
9
9
  import i18n from '../i18n';
10
- export function TopNodesByMemory({ path, additionalNodesProps }) {
10
+ export function TopNodesByMemory({ tenantName, additionalNodesProps }) {
11
11
  const query = useSearchQuery();
12
- const { autorefresh } = useTypedSelector((state) => state.schema);
12
+ const [autoRefreshInterval] = useAutoRefreshInterval();
13
13
  const columns = getTopNodesByMemoryColumns({
14
14
  getNodeRef: additionalNodesProps === null || additionalNodesProps === void 0 ? void 0 : additionalNodesProps.getNodeRef,
15
15
  });
16
- const { currentData, isFetching, error } = topNodesApi.useGetTopNodesQuery({ tenant: path, sortValue: 'Memory' }, { pollingInterval: autorefresh });
16
+ const { currentData, isFetching, error } = topNodesApi.useGetTopNodesQuery({ tenant: tenantName, sortValue: 'Memory' }, { pollingInterval: autoRefreshInterval });
17
17
  const loading = isFetching && currentData === undefined;
18
18
  const topNodes = currentData;
19
19
  const title = getSectionTitle({
@@ -5,7 +5,7 @@ import { TENANT_METRICS_TABS_IDS } from '../../../../store/reducers/tenant/const
5
5
  import { tenantApi } from '../../../../store/reducers/tenant/tenant';
6
6
  import { calculateTenantMetrics } from '../../../../store/reducers/tenants/utils';
7
7
  import { TENANT_DEFAULT_TITLE } from '../../../../utils/constants';
8
- import { useTypedSelector } from '../../../../utils/hooks';
8
+ import { useAutoRefreshInterval, useTypedSelector } from '../../../../utils/hooks';
9
9
  import { mapDatabaseTypeToDBName } from '../../utils/schema';
10
10
  import { DefaultOverviewContent } from './DefaultOverviewContent/DefaultOverviewContent';
11
11
  import { HealthcheckDetails } from './Healthcheck/HealthcheckDetails';
@@ -13,16 +13,14 @@ import { MetricsCards } from './MetricsCards/MetricsCards';
13
13
  import { TenantCpu } from './TenantCpu/TenantCpu';
14
14
  import { TenantMemory } from './TenantMemory/TenantMemory';
15
15
  import { TenantStorage } from './TenantStorage/TenantStorage';
16
- import { useHealthcheck } from './useHealthcheck';
17
16
  import { b } from './utils';
18
17
  import './TenantOverview.scss';
19
18
  export function TenantOverview({ tenantName, additionalTenantProps, additionalNodesProps, }) {
20
19
  var _a;
21
20
  const { metricsTab } = useTypedSelector((state) => state.tenant);
22
- const { autorefresh } = useTypedSelector((state) => state.schema);
23
- const { issueTrees, issuesStatistics, selfCheckResult, loading: healthcheckLoading, error: healthcheckError, refetch: fetchHealthcheck, } = useHealthcheck(tenantName, { autorefresh });
21
+ const [autoRefreshInterval] = useAutoRefreshInterval();
24
22
  const { currentData: tenant, isFetching } = tenantApi.useGetTenantInfoQuery({ path: tenantName }, {
25
- pollingInterval: autorefresh,
23
+ pollingInterval: autoRefreshInterval,
26
24
  });
27
25
  const tenantLoading = isFetching && tenant === undefined;
28
26
  const { Name, Type, Overall } = tenant || {};
@@ -40,16 +38,16 @@ export function TenantOverview({ tenantName, additionalTenantProps, additionalNo
40
38
  const renderTabContent = () => {
41
39
  switch (metricsTab) {
42
40
  case TENANT_METRICS_TABS_IDS.cpu: {
43
- return _jsx(TenantCpu, { path: tenantName, additionalNodesProps: additionalNodesProps });
41
+ return (_jsx(TenantCpu, { tenantName: tenantName, additionalNodesProps: additionalNodesProps }));
44
42
  }
45
43
  case TENANT_METRICS_TABS_IDS.storage: {
46
44
  return _jsx(TenantStorage, { tenantName: tenantName, metrics: storageMetrics });
47
45
  }
48
46
  case TENANT_METRICS_TABS_IDS.memory: {
49
- return _jsx(TenantMemory, { path: tenantName });
47
+ return _jsx(TenantMemory, { tenantName: tenantName });
50
48
  }
51
49
  case TENANT_METRICS_TABS_IDS.healthcheck: {
52
- return (_jsx(HealthcheckDetails, { issueTrees: issueTrees, loading: healthcheckLoading, error: healthcheckError }));
50
+ return _jsx(HealthcheckDetails, { tenantName: tenantName });
53
51
  }
54
52
  default: {
55
53
  return _jsx(DefaultOverviewContent, { database: tenantName });
@@ -59,5 +57,5 @@ export function TenantOverview({ tenantName, additionalTenantProps, additionalNo
59
57
  if (tenantLoading) {
60
58
  return (_jsx("div", { className: b('loader'), children: _jsx(Loader, { size: "m" }) }));
61
59
  }
62
- return (_jsxs("div", { className: b(), children: [_jsxs("div", { className: b('info'), children: [_jsx("div", { className: b('top-label'), children: tenantType }), _jsxs("div", { className: b('top'), children: [renderName(), (_a = additionalTenantProps === null || additionalTenantProps === void 0 ? void 0 : additionalTenantProps.getMonitoringLink) === null || _a === void 0 ? void 0 : _a.call(additionalTenantProps, Name, Type)] }), _jsx(MetricsCards, { poolsCpuStats: poolsStats, memoryStats: memoryStats, blobStorageStats: blobStorageStats, tabletStorageStats: tabletStorageStats, issuesStatistics: issuesStatistics, selfCheckResult: selfCheckResult, fetchHealthcheck: fetchHealthcheck, healthcheckLoading: healthcheckLoading, healthcheckError: healthcheckError })] }), renderTabContent()] }));
60
+ return (_jsxs("div", { className: b(), children: [_jsxs("div", { className: b('info'), children: [_jsx("div", { className: b('top-label'), children: tenantType }), _jsxs("div", { className: b('top'), children: [renderName(), (_a = additionalTenantProps === null || additionalTenantProps === void 0 ? void 0 : additionalTenantProps.getMonitoringLink) === null || _a === void 0 ? void 0 : _a.call(additionalTenantProps, Name, Type)] }), _jsx(MetricsCards, { poolsCpuStats: poolsStats, memoryStats: memoryStats, blobStorageStats: blobStorageStats, tabletStorageStats: tabletStorageStats, tenantName: tenantName })] }), renderTabContent()] }));
63
61
  }
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { TENANT_DIAGNOSTICS_TABS_IDS } from '../../../../../store/reducers/tenant/constants';
3
3
  import { topStorageGroupsApi } from '../../../../../store/reducers/tenantOverview/topStorageGroups/topStorageGroups';
4
- import { useSearchQuery, useTypedSelector } from '../../../../../utils/hooks';
4
+ import { useAutoRefreshInterval, useSearchQuery } from '../../../../../utils/hooks';
5
5
  import { STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY, getStorageTopGroupsColumns, } from '../../../../Storage/StorageGroups/getStorageGroupsColumns';
6
6
  import { TenantTabsGroups, getTenantPath } from '../../../TenantPages';
7
7
  import { TenantOverviewTableLayout } from '../TenantOverviewTableLayout';
@@ -9,9 +9,9 @@ import { getSectionTitle } from '../getSectionTitle';
9
9
  import i18n from '../i18n';
10
10
  export function TopGroups({ tenant }) {
11
11
  const query = useSearchQuery();
12
- const { autorefresh } = useTypedSelector((state) => state.schema);
12
+ const [autoRefreshInterval] = useAutoRefreshInterval();
13
13
  const columns = getStorageTopGroupsColumns();
14
- const { currentData, isFetching, error } = topStorageGroupsApi.useGetTopStorageGroupsQuery({ tenant }, { pollingInterval: autorefresh });
14
+ const { currentData, isFetching, error } = topStorageGroupsApi.useGetTopStorageGroupsQuery({ tenant }, { pollingInterval: autoRefreshInterval });
15
15
  const loading = isFetching && currentData === undefined;
16
16
  const topGroups = currentData;
17
17
  const title = getSectionTitle({
@@ -5,7 +5,7 @@ import { CellWithPopover } from '../../../../../components/CellWithPopover/CellW
5
5
  import { LinkToSchemaObject } from '../../../../../components/LinkToSchemaObject/LinkToSchemaObject';
6
6
  import { topTablesApi } from '../../../../../store/reducers/tenantOverview/executeTopTables/executeTopTables';
7
7
  import { formatBytes, getSizeWithSignificantDigits } from '../../../../../utils/bytesParsers';
8
- import { useTypedSelector } from '../../../../../utils/hooks';
8
+ import { useAutoRefreshInterval } from '../../../../../utils/hooks';
9
9
  import { parseQueryErrorToString } from '../../../../../utils/query';
10
10
  import { TenantOverviewTableLayout } from '../TenantOverviewTableLayout';
11
11
  import { getSectionTitle } from '../getSectionTitle';
@@ -14,8 +14,8 @@ import '../TenantOverview.scss';
14
14
  const TOP_TABLES_COLUMNS_WIDTH_LS_KEY = 'topTablesTableColumnsWidth';
15
15
  export function TopTables({ path }) {
16
16
  const location = useLocation();
17
- const { autorefresh } = useTypedSelector((state) => state.schema);
18
- const { currentData, error, isFetching } = topTablesApi.useGetTopTablesQuery({ path }, { pollingInterval: autorefresh });
17
+ const [autoRefreshInterval] = useAutoRefreshInterval();
18
+ const { currentData, error, isFetching } = topTablesApi.useGetTopTablesQuery({ path }, { pollingInterval: autoRefreshInterval });
19
19
  const loading = isFetching && currentData === undefined;
20
20
  const { result: data } = currentData || {};
21
21
  const formatSize = (value) => {
@@ -2,7 +2,7 @@ import { healthcheckApi, selectIssuesStatistics, selectIssuesTrees, } from '../.
2
2
  import { SelfCheckResult } from '../../../../types/api/healthcheck';
3
3
  import { useTypedSelector } from '../../../../utils/hooks';
4
4
  export const useHealthcheck = (tenantName, { autorefresh } = {}) => {
5
- const { currentData: data, isFetching, error, refetch, } = healthcheckApi.useGetHealthcheckInfoQuery(tenantName, {
5
+ const { currentData: data, isFetching, error, refetch, } = healthcheckApi.useGetHealthcheckInfoQuery({ database: tenantName }, {
6
6
  pollingInterval: autorefresh,
7
7
  });
8
8
  const selfCheckResult = (data === null || data === void 0 ? void 0 : data.self_check_result) || SelfCheckResult.UNSPECIFIED;
@@ -1,8 +1,8 @@
1
1
  import type { EPathType } from '../../../../types/api/schema';
2
2
  import './TopQueries.scss';
3
3
  interface TopQueriesProps {
4
- path: string;
4
+ tenantName: string;
5
5
  type?: EPathType;
6
6
  }
7
- export declare const TopQueries: ({ path, type }: TopQueriesProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const TopQueries: ({ tenantName, type }: TopQueriesProps) => import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -11,7 +11,7 @@ import { setTopQueriesFilters, topQueriesApi, } from '../../../../store/reducers
11
11
  import { TENANT_PAGE, TENANT_PAGES_IDS, TENANT_QUERY_TABS_ID, } from '../../../../store/reducers/tenant/constants';
12
12
  import { cn } from '../../../../utils/cn';
13
13
  import { isSortableTopQueriesProperty } from '../../../../utils/diagnostics';
14
- import { useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
14
+ import { useAutoRefreshInterval, useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
15
15
  import { parseQueryErrorToString } from '../../../../utils/query';
16
16
  import { TenantTabsGroups, getTenantPath } from '../../TenantPages';
17
17
  import { QUERY_TABLE_SETTINGS } from '../../utils/constants';
@@ -20,16 +20,16 @@ import { TOP_QUERIES_COLUMNS_WIDTH_LS_KEY, getTopQueriesColumns } from './getTop
20
20
  import i18n from './i18n';
21
21
  import './TopQueries.scss';
22
22
  const b = cn('kv-top-queries');
23
- export const TopQueries = ({ path, type }) => {
23
+ export const TopQueries = ({ tenantName, type }) => {
24
24
  const dispatch = useTypedDispatch();
25
25
  const location = useLocation();
26
26
  const history = useHistory();
27
- const { autorefresh } = useTypedSelector((state) => state.schema);
27
+ const [autoRefreshInterval] = useAutoRefreshInterval();
28
28
  const filters = useTypedSelector((state) => state.executeTopQueries);
29
29
  const { currentData, isFetching, error } = topQueriesApi.useGetTopQueriesQuery({
30
- database: path,
30
+ database: tenantName,
31
31
  filters,
32
- }, { pollingInterval: autorefresh });
32
+ }, { pollingInterval: autoRefreshInterval });
33
33
  const loading = isFetching && currentData === undefined;
34
34
  const { result: data } = currentData || {};
35
35
  const rawColumns = getTopQueriesColumns();
@@ -1,8 +1,9 @@
1
1
  import type { EPathType } from '../../../../types/api/schema';
2
2
  import './TopShards.scss';
3
3
  interface TopShardsProps {
4
- tenantPath: string;
4
+ tenantName: string;
5
+ path: string;
5
6
  type?: EPathType;
6
7
  }
7
- export declare const TopShards: ({ tenantPath, type }: TopShardsProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const TopShards: ({ tenantName, path, type }: TopShardsProps) => import("react/jsx-runtime").JSX.Element;
8
9
  export {};
@@ -10,7 +10,7 @@ import { cn } from '../../../../utils/cn';
10
10
  import { DEFAULT_TABLE_SETTINGS, HOUR_IN_SECONDS } from '../../../../utils/constants';
11
11
  import { formatDateTime } from '../../../../utils/dataFormatters/dataFormatters';
12
12
  import { isSortableTopShardsProperty } from '../../../../utils/diagnostics';
13
- import { useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
13
+ import { useAutoRefreshInterval, useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
14
14
  import { parseQueryErrorToString } from '../../../../utils/query';
15
15
  import { isColumnEntityType } from '../../utils/schema';
16
16
  import { Filters } from './Filters';
@@ -60,10 +60,10 @@ function fillDateRangeFor(value) {
60
60
  value.from = value.to - HOUR_IN_SECONDS * 1000;
61
61
  return value;
62
62
  }
63
- export const TopShards = ({ tenantPath, type }) => {
63
+ export const TopShards = ({ tenantName, path, type }) => {
64
64
  const dispatch = useTypedDispatch();
65
65
  const location = useLocation();
66
- const { autorefresh, currentSchemaPath } = useTypedSelector((state) => state.schema);
66
+ const [autoRefreshInterval] = useAutoRefreshInterval();
67
67
  const storeFilters = useTypedSelector((state) => state.shardsWorkload);
68
68
  // default filters shouldn't propagate into URL until user interacts with the control
69
69
  // redux initial value can't be used, as it synchronizes with URL
@@ -79,11 +79,11 @@ export const TopShards = ({ tenantPath, type }) => {
79
79
  });
80
80
  const [sortOrder, setSortOrder] = React.useState(tableColumnsNames.CPUCores);
81
81
  const { data: result, isFetching, error, } = shardApi.useSendShardQueryQuery({
82
- database: tenantPath,
83
- path: currentSchemaPath,
82
+ database: tenantName,
83
+ path: path,
84
84
  sortOrder: stringToQuerySortOrder(sortOrder),
85
85
  filters,
86
- }, { pollingInterval: autorefresh });
86
+ }, { pollingInterval: autoRefreshInterval });
87
87
  const loading = isFetching && result === undefined;
88
88
  const { result: data } = result !== null && result !== void 0 ? result : {};
89
89
  const onSort = (newSortOrder) => {
@@ -110,7 +110,7 @@ export const TopShards = ({ tenantPath, type }) => {
110
110
  setFilters((state) => (Object.assign(Object.assign({}, state), newStateValue)));
111
111
  };
112
112
  const tableColumns = React.useMemo(() => {
113
- const rawColumns = getShardsWorkloadColumns(tenantPath, location);
113
+ const rawColumns = getShardsWorkloadColumns(tenantName, location);
114
114
  const columns = rawColumns.map((column) => (Object.assign(Object.assign({}, column), { sortable: isSortableTopShardsProperty(column.name) })));
115
115
  if (filters.mode === EShardsWorkloadMode.History) {
116
116
  // after NodeId
@@ -129,7 +129,7 @@ export const TopShards = ({ tenantPath, type }) => {
129
129
  });
130
130
  }
131
131
  return columns;
132
- }, [filters.mode, tenantPath, location]);
132
+ }, [filters.mode, location, tenantName]);
133
133
  const renderControls = () => {
134
134
  return _jsx(Filters, { value: filters, onChange: handleFiltersChange });
135
135
  };
@@ -1,10 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { EntityStatus } from '../../../../components/EntityStatus/EntityStatus';
3
- import { ResponseError } from '../../../../components/Errors/ResponseError';
4
3
  import { InfoViewer } from '../../../../components/InfoViewer';
5
4
  import { formatCommonItem } from '../../../../components/InfoViewer/formatters';
6
5
  import { cn } from '../../../../utils/cn';
7
- import { useTypedSelector } from '../../../../utils/hooks';
8
6
  import { getEntityName } from '../../utils';
9
7
  import i18n from '../i18n';
10
8
  import './ExternalDataSource.scss';
@@ -38,10 +36,6 @@ const prepareExternalDataSourceInfo = (data) => {
38
36
  };
39
37
  const ExternalDataSource = ({ data, prepareData }) => {
40
38
  const entityName = getEntityName(data === null || data === void 0 ? void 0 : data.PathDescription);
41
- const { error: schemaError } = useTypedSelector((state) => state.schema);
42
- if (schemaError) {
43
- return _jsx(ResponseError, { error: schemaError });
44
- }
45
39
  if (!data) {
46
40
  return _jsxs("div", { className: "error", children: ["No ", entityName, " data"] });
47
41
  }