ydb-embedded-ui 5.0.0 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. package/dist/components/BasicNodeViewer/BasicNodeViewer.d.ts +2 -2
  2. package/dist/components/BasicNodeViewer/BasicNodeViewer.js +1 -1
  3. package/dist/components/ComponentsProvider/ComponentsProvider.d.ts +4 -0
  4. package/dist/components/ComponentsProvider/componentsRegistry.d.ts +3 -0
  5. package/dist/components/ComponentsProvider/componentsRegistry.js +3 -1
  6. package/dist/components/EntityStatus/EntityStatus.scss +1 -1
  7. package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +11 -1
  8. package/dist/components/ErrorBoundary/ErrorBoundary.js +11 -3
  9. package/dist/components/FullNodeViewer/FullNodeViewer.d.ts +2 -2
  10. package/dist/components/FullNodeViewer/FullNodeViewer.js +1 -1
  11. package/dist/components/LagImages/LagImages.js +2 -2
  12. package/dist/components/ProgressViewer/ProgressViewer.js +6 -5
  13. package/dist/components/ProgressViewer/ProgressViewer.scss +33 -17
  14. package/dist/components/TabletsOverall/TabletsOverall.js +6 -6
  15. package/dist/containers/App/App.js +2 -1
  16. package/dist/containers/App/Content.js +6 -12
  17. package/dist/containers/App/Providers.js +2 -1
  18. package/dist/containers/App/appSlots.d.ts +7 -7
  19. package/dist/containers/AppIcons/AppIcons.js +1 -1
  20. package/dist/containers/Cluster/Cluster.js +45 -27
  21. package/dist/containers/Cluster/Cluster.scss +15 -0
  22. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +4 -18
  23. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +0 -40
  24. package/dist/containers/Cluster/utils.d.ts +6 -1
  25. package/dist/containers/Cluster/utils.js +11 -3
  26. package/dist/containers/ClusterModeGuard/ClusterModeGuard.d.ts +6 -0
  27. package/dist/containers/ClusterModeGuard/ClusterModeGuard.js +6 -0
  28. package/dist/containers/ClusterModeGuard/index.d.ts +1 -0
  29. package/dist/containers/ClusterModeGuard/index.js +1 -0
  30. package/dist/containers/Clusters/Clusters.js +4 -3
  31. package/dist/containers/Clusters/columns.js +1 -1
  32. package/dist/containers/Clusters/constants.d.ts +1 -1
  33. package/dist/containers/Clusters/i18n/en.json +2 -1
  34. package/dist/containers/Clusters/i18n/index.d.ts +1 -1
  35. package/dist/containers/Clusters/i18n/index.js +2 -4
  36. package/dist/containers/Clusters/i18n/ru.json +2 -1
  37. package/dist/containers/Node/Node.js +11 -13
  38. package/dist/containers/Node/NodePages.js +4 -1
  39. package/dist/containers/Node/i18n/index.d.ts +1 -1
  40. package/dist/containers/Node/i18n/index.js +2 -4
  41. package/dist/containers/Nodes/getNodesColumns.js +2 -1
  42. package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.d.ts +1 -1
  43. package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.d.ts +1 -1
  44. package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.js +2 -1
  45. package/dist/containers/Tablet/Tablet.js +24 -20
  46. package/dist/containers/Tablet/i18n/index.d.ts +1 -1
  47. package/dist/containers/Tablet/i18n/index.js +2 -4
  48. package/dist/containers/TabletsFilters/TabletsFilters.d.ts +2 -0
  49. package/dist/containers/TabletsFilters/TabletsFilters.js +25 -19
  50. package/dist/containers/TabletsFilters/i18n/en.json +3 -0
  51. package/dist/containers/TabletsFilters/i18n/index.d.ts +2 -0
  52. package/dist/containers/TabletsFilters/i18n/index.js +5 -0
  53. package/dist/containers/TabletsFilters/i18n/ru.json +3 -0
  54. package/dist/containers/Tenant/Diagnostics/Diagnostics.js +12 -11
  55. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +19 -0
  56. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +2 -1
  57. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.d.ts +7 -25
  58. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +88 -92
  59. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.scss +1 -33
  60. package/dist/containers/Tenant/Diagnostics/HotKeys/i18n/en.json +4 -0
  61. package/dist/containers/Tenant/Diagnostics/HotKeys/i18n/index.d.ts +2 -0
  62. package/dist/containers/Tenant/Diagnostics/HotKeys/i18n/index.js +5 -0
  63. package/dist/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricCard/MetricCard.js +4 -1
  64. package/dist/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.js +3 -4
  65. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +12 -5
  66. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TenantStorage.d.ts +2 -2
  67. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TenantStorage.js +7 -10
  68. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/en.json +7 -5
  69. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.js +0 -2
  70. package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.js +10 -0
  71. package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.d.ts +1 -1
  72. package/dist/containers/Tenant/Query/Query.d.ts +2 -2
  73. package/dist/containers/Tenant/Query/Query.js +5 -2
  74. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +29 -31
  75. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +150 -167
  76. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.d.ts +2 -2
  77. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +3 -3
  78. package/dist/containers/Tenant/Query/QueryTabs/QueryTabs.d.ts +10 -0
  79. package/dist/containers/Tenant/Query/QueryTabs/QueryTabs.js +1 -1
  80. package/dist/containers/Tenant/Query/utils/getPreparedResult.d.ts +1 -1
  81. package/dist/containers/Tenant/Query/utils/getPreparedResult.js +18 -16
  82. package/dist/containers/Tenant/Tenant.js +4 -1
  83. package/dist/containers/Tenant/i18n/en.json +1 -0
  84. package/dist/containers/Tenant/i18n/index.d.ts +1 -1
  85. package/dist/containers/Tenant/i18n/index.js +2 -4
  86. package/dist/containers/Tenant/i18n/ru.json +1 -0
  87. package/dist/containers/UserSettings/Setting.d.ts +2 -1
  88. package/dist/containers/UserSettings/Setting.js +2 -2
  89. package/dist/containers/UserSettings/i18n/en.json +2 -0
  90. package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
  91. package/dist/containers/UserSettings/i18n/index.js +2 -6
  92. package/dist/containers/UserSettings/settings.d.ts +1 -0
  93. package/dist/containers/UserSettings/settings.js +9 -2
  94. package/dist/containers/Versions/NodesTreeTitle/NodesTreeTitle.scss +1 -1
  95. package/dist/lib.d.ts +2 -1
  96. package/dist/lib.js +2 -1
  97. package/dist/routes.d.ts +5 -0
  98. package/dist/routes.js +4 -0
  99. package/dist/services/api.d.ts +2 -1
  100. package/dist/services/api.js +10 -3
  101. package/dist/services/settings.d.ts +0 -1
  102. package/dist/services/settings.js +2 -14
  103. package/dist/store/index.d.ts +1 -1
  104. package/dist/store/reducers/cluster/cluster.d.ts +8 -2
  105. package/dist/store/reducers/cluster/cluster.js +29 -1
  106. package/dist/store/reducers/cluster/types.d.ts +4 -2
  107. package/dist/store/reducers/executeQuery.d.ts +1 -10
  108. package/dist/store/reducers/executeQuery.js +26 -29
  109. package/dist/store/reducers/executeTopQueries/executeTopQueries.js +2 -1
  110. package/dist/store/reducers/executeTopQueries/utils.js +7 -4
  111. package/dist/store/reducers/hotKeys/hotKeys.d.ts +25 -0
  112. package/dist/store/reducers/hotKeys/hotKeys.js +49 -0
  113. package/dist/store/reducers/hotKeys/types.d.ts +10 -0
  114. package/dist/store/reducers/hotKeys/types.js +1 -0
  115. package/dist/store/reducers/index.d.ts +2 -6
  116. package/dist/store/reducers/index.js +1 -1
  117. package/dist/store/reducers/node/node.d.ts +1 -1
  118. package/dist/store/reducers/node/node.js +2 -0
  119. package/dist/store/reducers/node/selectors.js +1 -1
  120. package/dist/store/reducers/node/types.d.ts +7 -3
  121. package/dist/store/reducers/node/utils.d.ts +3 -0
  122. package/dist/store/reducers/node/utils.js +8 -0
  123. package/dist/store/reducers/nodes/types.d.ts +1 -1
  124. package/dist/store/reducers/nodes/utils.js +3 -3
  125. package/dist/store/reducers/storage/types.d.ts +2 -0
  126. package/dist/store/reducers/storage/utils.js +3 -3
  127. package/dist/store/reducers/tenants/utils.d.ts +4 -3
  128. package/dist/store/reducers/tenants/utils.js +17 -12
  129. package/dist/store/reducers/tooltip.d.ts +1 -1
  130. package/dist/types/api/hotkeys.d.ts +7 -0
  131. package/dist/types/api/hotkeys.js +1 -0
  132. package/dist/types/api/nodes.d.ts +2 -1
  133. package/dist/types/store/executeQuery.d.ts +3 -6
  134. package/dist/types/store/explainQuery.d.ts +1 -0
  135. package/dist/utils/constants.d.ts +2 -1
  136. package/dist/utils/constants.js +2 -1
  137. package/dist/utils/diagnostics.d.ts +1 -0
  138. package/dist/utils/diagnostics.js +1 -0
  139. package/dist/utils/i18n/i18n.d.ts +2 -1
  140. package/dist/utils/i18n/i18n.js +15 -2
  141. package/dist/utils/monitoring.js +1 -3
  142. package/dist/utils/versions/getVersionsColors.js +1 -1
  143. package/package.json +9 -8
  144. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/ru.json +0 -26
  145. package/dist/containers/UserSettings/i18n/ru.json +0 -20
  146. package/dist/store/reducers/hotKeys.d.ts +0 -11
  147. package/dist/store/reducers/hotKeys.js +0 -34
@@ -1,8 +1,8 @@
1
- import type { TSystemStateInfo } from '../../types/api/nodes';
2
1
  import type { AdditionalNodesProps } from '../../types/additionalProps';
2
+ import type { PreparedNode } from '../../store/reducers/node/types';
3
3
  import './BasicNodeViewer.scss';
4
4
  interface BasicNodeViewerProps {
5
- node: TSystemStateInfo;
5
+ node: PreparedNode;
6
6
  additionalNodesProps?: AdditionalNodesProps;
7
7
  className?: string;
8
8
  }
@@ -9,5 +9,5 @@ export const BasicNodeViewer = ({ node, additionalNodesProps, className }) => {
9
9
  const nodeHref = (additionalNodesProps === null || additionalNodesProps === void 0 ? void 0 : additionalNodesProps.getNodeRef)
10
10
  ? additionalNodesProps.getNodeRef(node) + 'internal'
11
11
  : undefined;
12
- return (_jsx("div", Object.assign({ className: b(null, className) }, { children: node ? (_jsxs(_Fragment, { children: [_jsx("div", Object.assign({ className: b('title') }, { children: "Node" })), _jsx(EntityStatus, { status: node.SystemState, name: node.Host }), nodeHref && (_jsx("a", Object.assign({ rel: "noopener noreferrer", className: b('link', { external: true }), href: nodeHref, target: "_blank" }, { children: _jsx(Icon, { name: "external" }) }))), _jsxs("div", Object.assign({ className: b('id') }, { children: [_jsx("label", Object.assign({ className: b('label') }, { children: "NodeID" })), _jsx("label", { children: node.NodeId })] })), node.DataCenter && _jsx(Tags, { tags: [node.DataCenter] }), node.Roles && _jsx(Tags, { tags: node.Roles, tagsType: "blue" })] })) : (_jsx("div", Object.assign({ className: "error" }, { children: "no data" }))) })));
12
+ return (_jsx("div", Object.assign({ className: b(null, className) }, { children: node ? (_jsxs(_Fragment, { children: [_jsx("div", Object.assign({ className: b('title') }, { children: "Node" })), _jsx(EntityStatus, { status: node.SystemState, name: node.Host }), nodeHref && (_jsx("a", Object.assign({ rel: "noopener noreferrer", className: b('link', { external: true }), href: nodeHref, target: "_blank" }, { children: _jsx(Icon, { name: "external" }) }))), _jsxs("div", Object.assign({ className: b('id') }, { children: [_jsx("label", Object.assign({ className: b('label') }, { children: "NodeID" })), _jsx("label", { children: node.NodeId })] })), node.DC && _jsx(Tags, { tags: [node.DC] }), node.Roles && _jsx(Tags, { tags: node.Roles, tagsType: "blue" })] })) : (_jsx("div", Object.assign({ className: "error" }, { children: "no data" }))) })));
13
13
  };
@@ -9,9 +9,13 @@ export declare function useComponent<T extends Parameters<ComponentsRegistry['ge
9
9
  StaffCard: typeof import("../User/StaffCard").StaffCard;
10
10
  } & {
11
11
  AsideNavigation: typeof import("../../containers/AsideNavigation/AsideNavigation").AsideNavigation;
12
+ } & {
13
+ ErrorBoundary: typeof import("../ErrorBoundary/ErrorBoundary").ErrorBoundaryInner;
12
14
  })[T] extends React.ComponentType<any> ? React.ComponentType<React.PropsWithoutRef<React.ComponentProps<({
13
15
  StaffCard: typeof import("../User/StaffCard").StaffCard;
14
16
  } & {
15
17
  AsideNavigation: typeof import("../../containers/AsideNavigation/AsideNavigation").AsideNavigation;
18
+ } & {
19
+ ErrorBoundary: typeof import("../ErrorBoundary/ErrorBoundary").ErrorBoundaryInner;
16
20
  })[T]>>> : never;
17
21
  export {};
@@ -1,10 +1,13 @@
1
1
  import { StaffCard } from '../User/StaffCard';
2
2
  import { AsideNavigation } from '../../containers/AsideNavigation/AsideNavigation';
3
3
  import { ComponentsRegistryTemplate, Registry } from './registry';
4
+ import { ErrorBoundaryInner } from '../ErrorBoundary/ErrorBoundary';
4
5
  declare const componentsRegistryInner: Registry<{
5
6
  StaffCard: typeof StaffCard;
6
7
  } & {
7
8
  AsideNavigation: typeof AsideNavigation;
9
+ } & {
10
+ ErrorBoundary: typeof ErrorBoundaryInner;
8
11
  }>;
9
12
  export declare type ComponentsRegistry = ComponentsRegistryTemplate<typeof componentsRegistryInner>;
10
13
  export declare const componentsRegistry: ComponentsRegistry;
@@ -1,7 +1,9 @@
1
1
  import { StaffCard } from '../User/StaffCard';
2
2
  import { AsideNavigation } from '../../containers/AsideNavigation/AsideNavigation';
3
3
  import { Registry } from './registry';
4
+ import { ErrorBoundaryInner } from '../ErrorBoundary/ErrorBoundary';
4
5
  const componentsRegistryInner = new Registry()
5
6
  .register('StaffCard', StaffCard)
6
- .register('AsideNavigation', AsideNavigation);
7
+ .register('AsideNavigation', AsideNavigation)
8
+ .register('ErrorBoundary', ErrorBoundaryInner);
7
9
  export const componentsRegistry = componentsRegistryInner;
@@ -14,7 +14,7 @@
14
14
 
15
15
  margin-left: 8px;
16
16
 
17
- color: var(--yc-color-text-secondary);
17
+ color: var(--g-color-text-secondary);
18
18
 
19
19
  &_visible {
20
20
  visibility: visible;
@@ -1,9 +1,19 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import './ErrorBoundary.scss';
3
+ export declare function ErrorBoundary({ children }: {
4
+ children?: ReactNode;
5
+ }): JSX.Element;
3
6
  interface ErrorBoundaryProps {
4
7
  children?: ReactNode;
5
8
  useRetry?: boolean;
6
9
  onReportProblem?: (error?: Error) => void;
7
10
  }
8
- export declare const ErrorBoundary: ({ children, useRetry, onReportProblem }: ErrorBoundaryProps) => JSX.Element;
11
+ export declare function ErrorBoundaryInner({ children, useRetry, onReportProblem, }: ErrorBoundaryProps): JSX.Element;
12
+ interface ErrorBoundaryFallbackProps {
13
+ error: Error;
14
+ useRetry?: boolean;
15
+ resetErrorBoundary: () => void;
16
+ onReportProblem?: (error?: Error) => void;
17
+ }
18
+ export declare function ErrorBoundaryFallback({ error, resetErrorBoundary, useRetry, onReportProblem, }: ErrorBoundaryFallbackProps): JSX.Element;
9
19
  export {};
@@ -4,13 +4,21 @@ import cn from 'bem-cn-lite';
4
4
  import { Button, Disclosure } from '@gravity-ui/uikit';
5
5
  import { registerError } from '../../utils/registerError';
6
6
  import { Illustration } from '../Illustration';
7
+ import { useComponent } from '../ComponentsProvider/ComponentsProvider';
7
8
  import i18n from './i18n';
8
9
  import './ErrorBoundary.scss';
9
10
  const b = cn('ydb-error-boundary');
10
- export const ErrorBoundary = ({ children, useRetry = true, onReportProblem }) => {
11
+ export function ErrorBoundary({ children }) {
12
+ const ErrorBoundaryComponent = useComponent('ErrorBoundary');
13
+ return _jsx(ErrorBoundaryComponent, { children: children });
14
+ }
15
+ export function ErrorBoundaryInner({ children, useRetry = true, onReportProblem, }) {
11
16
  return (_jsx(ErrorBoundaryBase, Object.assign({ onError: (error, info) => {
12
17
  registerError(error, info.componentStack, 'error-boundary');
13
18
  }, fallbackRender: ({ error, resetErrorBoundary }) => {
14
- return (_jsxs("div", Object.assign({ className: b(null) }, { children: [_jsx(Illustration, { name: "error", className: b('illustration') }), _jsxs("div", Object.assign({ className: b('content') }, { children: [_jsx("h2", Object.assign({ className: b('error-title') }, { children: i18n('error-title') })), _jsx("div", Object.assign({ className: b('error-description') }, { children: i18n('error-description') })), _jsx(Disclosure, Object.assign({ summary: i18n('show-details'), className: b('show-details'), size: "m" }, { children: _jsx("pre", Object.assign({ className: b('error-details') }, { children: error.stack })) })), _jsxs("div", Object.assign({ className: b('actions') }, { children: [useRetry && (_jsx(Button, Object.assign({ view: "outlined", onClick: resetErrorBoundary }, { children: i18n('button-reset') }))), onReportProblem && (_jsx(Button, Object.assign({ view: "outlined", onClick: () => onReportProblem(error) }, { children: i18n('report-problem') })))] }))] }))] })));
19
+ return (_jsx(ErrorBoundaryFallback, { error: error, useRetry: useRetry, resetErrorBoundary: resetErrorBoundary, onReportProblem: onReportProblem }));
15
20
  } }, { children: children })));
16
- };
21
+ }
22
+ export function ErrorBoundaryFallback({ error, resetErrorBoundary, useRetry, onReportProblem, }) {
23
+ return (_jsxs("div", Object.assign({ className: b() }, { children: [_jsx(Illustration, { name: "error", className: b('illustration') }), _jsxs("div", Object.assign({ className: b('content') }, { children: [_jsx("h2", Object.assign({ className: b('error-title') }, { children: i18n('error-title') })), _jsx("div", Object.assign({ className: b('error-description') }, { children: i18n('error-description') })), _jsx(Disclosure, Object.assign({ summary: i18n('show-details'), className: b('show-details'), size: "m" }, { children: _jsx("pre", Object.assign({ className: b('error-details') }, { children: error.stack })) })), _jsxs("div", Object.assign({ className: b('actions') }, { children: [useRetry && (_jsx(Button, Object.assign({ view: "outlined", onClick: resetErrorBoundary }, { children: i18n('button-reset') }))), onReportProblem && (_jsx(Button, Object.assign({ view: "outlined", onClick: () => onReportProblem(error) }, { children: i18n('report-problem') })))] }))] }))] })));
24
+ }
@@ -1,7 +1,7 @@
1
- import type { TSystemStateInfo } from '../../types/api/nodes';
1
+ import type { PreparedNode } from '../../store/reducers/node/types';
2
2
  import './FullNodeViewer.scss';
3
3
  interface FullNodeViewerProps {
4
- node: TSystemStateInfo | undefined;
4
+ node: PreparedNode | undefined;
5
5
  className?: string;
6
6
  }
7
7
  export declare const FullNodeViewer: ({ node, className }: FullNodeViewerProps) => JSX.Element;
@@ -18,7 +18,7 @@ export const FullNodeViewer = ({ node, className }) => {
18
18
  if ((_b = node === null || node === void 0 ? void 0 : node.Tenants) === null || _b === void 0 ? void 0 : _b.length) {
19
19
  commonInfo.push({ label: 'Database', value: node.Tenants[0] });
20
20
  }
21
- commonInfo.push({ label: 'Version', value: node === null || node === void 0 ? void 0 : node.Version }, { label: 'Uptime', value: calcUptime(node === null || node === void 0 ? void 0 : node.StartTime) }, { label: 'DC', value: node === null || node === void 0 ? void 0 : node.DataCenterDescription }, { label: 'Rack', value: node === null || node === void 0 ? void 0 : node.Rack });
21
+ commonInfo.push({ label: 'Version', value: node === null || node === void 0 ? void 0 : node.Version }, { label: 'Uptime', value: calcUptime(node === null || node === void 0 ? void 0 : node.StartTime) }, { label: 'DC', value: (node === null || node === void 0 ? void 0 : node.DataCenterDescription) || (node === null || node === void 0 ? void 0 : node.DC) }, { label: 'Rack', value: node === null || node === void 0 ? void 0 : node.Rack });
22
22
  const averageInfo = (_c = node === null || node === void 0 ? void 0 : node.LoadAverage) === null || _c === void 0 ? void 0 : _c.map((load, loadIndex) => ({
23
23
  label: LOAD_AVERAGE_TIME_INTERVALS[loadIndex],
24
24
  value: (_jsx(ProgressViewer, { value: load, percents: true, colorizeProgress: true, capacity: 100 })),
@@ -7,8 +7,8 @@ const READ_FILL = '#ADE8F5';
7
7
  const WRITE_FILL = '#f5be9d';
8
8
  const DashArc = ({ width, height, transform }) => (_jsx("path", { d: `M-${width / 2} 0 c0 -${height}, ${width} -${height}, ${width} 0`, fill: "none", strokeDasharray: "4,6", stroke: "#28f", strokeWidth: "1.6", transform: transform }));
9
9
  const ArrowLine = ({ width }) => (_jsx("path", { fill: "none", strokeWidth: "2", d: `M0 0 h${width} l-10 -5 m0 10 l10 -5` }));
10
- const WriteLag = () => (_jsxs("g", Object.assign({ fill: "var(--yc-color-text-primary)", fontSize: "12" }, { children: [_jsx("g", Object.assign({ transform: `translate(0, ${HEIGHT / 2})`, stroke: WRITE_FILL }, { children: _jsx(ArrowLine, { width: STICK_SPACE * 2.9 }) })), _jsxs("g", Object.assign({ transform: `translate(${STICK_START}, 0)` }, { children: [_jsxs("g", Object.assign({ transform: `translate(${STICK_SPACE / 2}, ${HEIGHT / 2})` }, { children: [_jsx(DashArc, { width: STICK_SPACE, height: 15 }), _jsx("text", Object.assign({ x: "0", y: "-15", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "write lag" })) }))] })), _jsxs("g", Object.assign({ transform: `translate(${STICK_SPACE * 1.7}, ${HEIGHT / 2})` }, { children: [_jsx(DashArc, { width: STICK_SPACE * 1.4, height: 15 }), _jsx("text", Object.assign({ x: "0", y: "-15", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "write idle time" })) }))] }))] })), _jsxs("g", Object.assign({ transform: `translate(${STICK_START}, 0)` }, { children: [_jsxs("g", Object.assign({ transform: `translate(${0}, ${HEIGHT / 2})` }, { children: [_jsx("use", { y: "-10", xlinkHref: "#check", stroke: WRITE_FILL }), _jsx("text", Object.assign({ x: "0", y: "20", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "create time" })) }))] })), _jsxs("g", Object.assign({ transform: `translate(${STICK_SPACE}, ${HEIGHT / 2})` }, { children: [_jsx("use", { y: "-10", xlinkHref: "#check", stroke: WRITE_FILL }), _jsx("text", Object.assign({ x: "0", y: "20", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "write time" })) }))] })), _jsx("g", Object.assign({ transform: `translate(${2.4 * STICK_SPACE}, ${HEIGHT / 2})` }, { children: _jsx("text", Object.assign({ x: "0", y: "20", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "now" })) })) }))] }))] })));
11
- const ReadLag = () => (_jsxs("g", Object.assign({ fill: "var(--yc-color-text-primary)", fontSize: "12" }, { children: [_jsx("g", Object.assign({ transform: `translate(0, ${HEIGHT / 2})`, stroke: READ_FILL }, { children: _jsx(ArrowLine, { width: WIDTH }) })), _jsxs("g", Object.assign({ transform: `translate(${STICK_START}, 0)` }, { children: [_jsxs("g", Object.assign({ transform: `translate(${STICK_SPACE * 1.5}, ${HEIGHT / 2})` }, { children: [_jsx(DashArc, { width: STICK_SPACE, height: 15 }), _jsx("text", Object.assign({ x: "0", y: "-15", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "read lag" })) }))] })), _jsxs("g", Object.assign({ transform: `translate(${STICK_SPACE / 2}, ${HEIGHT / 2})` }, { children: [_jsx(DashArc, { width: STICK_SPACE, height: 15 }), _jsx("text", Object.assign({ x: "0", y: "-15", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "write lag" })) }))] })), _jsxs("g", Object.assign({ transform: `translate(${STICK_SPACE * 2.6}, ${HEIGHT / 2})` }, { children: [_jsx(DashArc, { width: STICK_SPACE * 1.3, height: 15 }), _jsx("text", Object.assign({ x: "0", y: "-15", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "read idle time" })) }))] }))] })), _jsxs("g", Object.assign({ transform: `translate(${STICK_START}, ${HEIGHT / 2})` }, { children: [_jsxs("g", Object.assign({ transform: `translate(${0}, 0)` }, { children: [_jsx("use", { y: "-10", xlinkHref: "#check", stroke: READ_FILL }), _jsx("text", Object.assign({ x: "0", y: "20", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "create time" })) }))] })), _jsxs("g", Object.assign({ transform: `translate(${STICK_SPACE}, 0)` }, { children: [_jsx("use", { y: "-10", xlinkHref: "#check", stroke: READ_FILL }), _jsx("text", Object.assign({ x: "0", y: "20", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "write time" })) }))] })), _jsxs("g", Object.assign({ transform: `translate(${2 * STICK_SPACE}, 0)` }, { children: [_jsx("use", { x: "-2", y: "-10", xlinkHref: "#check", stroke: READ_FILL }), _jsx("text", Object.assign({ x: "0", y: "20", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "read time" })) }))] })), _jsx("g", Object.assign({ transform: `translate(${3.2 * STICK_SPACE}, 0)` }, { children: _jsx("text", Object.assign({ x: "0", y: "20", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "now" })) })) }))] }))] })));
10
+ const WriteLag = () => (_jsxs("g", Object.assign({ fill: "var(--g-color-text-primary)", fontSize: "12" }, { children: [_jsx("g", Object.assign({ transform: `translate(0, ${HEIGHT / 2})`, stroke: WRITE_FILL }, { children: _jsx(ArrowLine, { width: STICK_SPACE * 2.9 }) })), _jsxs("g", Object.assign({ transform: `translate(${STICK_START}, 0)` }, { children: [_jsxs("g", Object.assign({ transform: `translate(${STICK_SPACE / 2}, ${HEIGHT / 2})` }, { children: [_jsx(DashArc, { width: STICK_SPACE, height: 15 }), _jsx("text", Object.assign({ x: "0", y: "-15", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "write lag" })) }))] })), _jsxs("g", Object.assign({ transform: `translate(${STICK_SPACE * 1.7}, ${HEIGHT / 2})` }, { children: [_jsx(DashArc, { width: STICK_SPACE * 1.4, height: 15 }), _jsx("text", Object.assign({ x: "0", y: "-15", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "write idle time" })) }))] }))] })), _jsxs("g", Object.assign({ transform: `translate(${STICK_START}, 0)` }, { children: [_jsxs("g", Object.assign({ transform: `translate(${0}, ${HEIGHT / 2})` }, { children: [_jsx("use", { y: "-10", xlinkHref: "#check", stroke: WRITE_FILL }), _jsx("text", Object.assign({ x: "0", y: "20", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "create time" })) }))] })), _jsxs("g", Object.assign({ transform: `translate(${STICK_SPACE}, ${HEIGHT / 2})` }, { children: [_jsx("use", { y: "-10", xlinkHref: "#check", stroke: WRITE_FILL }), _jsx("text", Object.assign({ x: "0", y: "20", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "write time" })) }))] })), _jsx("g", Object.assign({ transform: `translate(${2.4 * STICK_SPACE}, ${HEIGHT / 2})` }, { children: _jsx("text", Object.assign({ x: "0", y: "20", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "now" })) })) }))] }))] })));
11
+ const ReadLag = () => (_jsxs("g", Object.assign({ fill: "var(--g-color-text-primary)", fontSize: "12" }, { children: [_jsx("g", Object.assign({ transform: `translate(0, ${HEIGHT / 2})`, stroke: READ_FILL }, { children: _jsx(ArrowLine, { width: WIDTH }) })), _jsxs("g", Object.assign({ transform: `translate(${STICK_START}, 0)` }, { children: [_jsxs("g", Object.assign({ transform: `translate(${STICK_SPACE * 1.5}, ${HEIGHT / 2})` }, { children: [_jsx(DashArc, { width: STICK_SPACE, height: 15 }), _jsx("text", Object.assign({ x: "0", y: "-15", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "read lag" })) }))] })), _jsxs("g", Object.assign({ transform: `translate(${STICK_SPACE / 2}, ${HEIGHT / 2})` }, { children: [_jsx(DashArc, { width: STICK_SPACE, height: 15 }), _jsx("text", Object.assign({ x: "0", y: "-15", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "write lag" })) }))] })), _jsxs("g", Object.assign({ transform: `translate(${STICK_SPACE * 2.6}, ${HEIGHT / 2})` }, { children: [_jsx(DashArc, { width: STICK_SPACE * 1.3, height: 15 }), _jsx("text", Object.assign({ x: "0", y: "-15", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "read idle time" })) }))] }))] })), _jsxs("g", Object.assign({ transform: `translate(${STICK_START}, ${HEIGHT / 2})` }, { children: [_jsxs("g", Object.assign({ transform: `translate(${0}, 0)` }, { children: [_jsx("use", { y: "-10", xlinkHref: "#check", stroke: READ_FILL }), _jsx("text", Object.assign({ x: "0", y: "20", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "create time" })) }))] })), _jsxs("g", Object.assign({ transform: `translate(${STICK_SPACE}, 0)` }, { children: [_jsx("use", { y: "-10", xlinkHref: "#check", stroke: READ_FILL }), _jsx("text", Object.assign({ x: "0", y: "20", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "write time" })) }))] })), _jsxs("g", Object.assign({ transform: `translate(${2 * STICK_SPACE}, 0)` }, { children: [_jsx("use", { x: "-2", y: "-10", xlinkHref: "#check", stroke: READ_FILL }), _jsx("text", Object.assign({ x: "0", y: "20", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "read time" })) }))] })), _jsx("g", Object.assign({ transform: `translate(${3.2 * STICK_SPACE}, 0)` }, { children: _jsx("text", Object.assign({ x: "0", y: "20", textAnchor: "middle" }, { children: _jsx("tspan", Object.assign({ x: "0", dy: "0" }, { children: "now" })) })) }))] }))] })));
12
12
  const DashPattern = ({ id, fill }) => (_jsx("pattern", Object.assign({ id: id, x: "0", y: "0", width: "8", height: "8", patternUnits: "userSpaceOnUse" }, { children: _jsx("path", { d: "M0 5L5 0H8L0 8V5M5 8L8 5V8Z", fill: fill }) })));
13
13
  export const WriteLagImage = () => (_jsxs("svg", Object.assign({ className: "paint", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: `0 0 ${WIDTH} ${HEIGHT}`, width: WIDTH, height: HEIGHT }, { children: [_jsxs("defs", { children: [_jsx("g", Object.assign({ id: "check" }, { children: _jsx("path", { d: "M0 3 v14", strokeWidth: "2" }) })), _jsx(DashPattern, { id: "latest-read", fill: READ_FILL }), _jsx(DashPattern, { id: "latest-write", fill: WRITE_FILL })] }), _jsx(WriteLag, {})] })));
14
14
  export const ReadLagImage = () => (_jsxs("svg", Object.assign({ className: "paint", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: `0 0 ${WIDTH} ${HEIGHT}`, width: WIDTH, height: HEIGHT }, { children: [_jsxs("defs", { children: [_jsx("g", Object.assign({ id: "check" }, { children: _jsx("path", { d: "M0 3 v14", strokeWidth: "2" }) })), _jsx(DashPattern, { id: "latest-read", fill: READ_FILL }), _jsx(DashPattern, { id: "latest-write", fill: WRITE_FILL })] }), _jsx(ReadLag, {})] })));
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import cn from 'bem-cn-lite';
3
+ import { useTheme } from '@gravity-ui/uikit';
3
4
  import { isNumeric } from '../../utils/utils';
4
5
  import { formatNumber, roundToPrecision } from '../../utils/dataFormatters/dataFormatters';
5
6
  import './ProgressViewer.scss';
@@ -20,6 +21,7 @@ const defaultFormatValues = (value, total) => {
20
21
  return [formatValue(value), formatValue(total)];
21
22
  };
22
23
  export function ProgressViewer({ value, capacity, formatValues = defaultFormatValues, percents, className, size = PROGRESS_VIEWER_SIZE_IDS.xs, colorizeProgress, inverseColorize, warningThreshold = 60, dangerThreshold = 80, }) {
24
+ const theme = useTheme();
23
25
  let fillWidth = Math.round((parseFloat(String(value)) / parseFloat(String(capacity))) * 100) || 0;
24
26
  fillWidth = fillWidth > 100 ? 100 : fillWidth;
25
27
  let valueText = value, capacityText = capacity, divider = '/';
@@ -31,19 +33,18 @@ export function ProgressViewer({ value, capacity, formatValues = defaultFormatVa
31
33
  else if (formatValues) {
32
34
  [valueText, capacityText] = formatValues(Number(value), Number(capacity));
33
35
  }
34
- let bg = inverseColorize ? 'scarlet' : 'apple';
36
+ let status = inverseColorize ? 'danger' : 'good';
35
37
  if (colorizeProgress) {
36
38
  if (fillWidth > warningThreshold && fillWidth <= dangerThreshold) {
37
- bg = 'saffron';
39
+ status = 'warning';
38
40
  }
39
41
  else if (fillWidth > dangerThreshold) {
40
- bg = inverseColorize ? 'apple' : 'scarlet';
42
+ status = inverseColorize ? 'good' : 'danger';
41
43
  }
42
44
  }
43
45
  const lineStyle = {
44
46
  width: fillWidth + '%',
45
47
  };
46
- const text = fillWidth > 60 ? 'contrast0' : 'contrast70';
47
48
  const renderContent = () => {
48
49
  if (isNumeric(capacity)) {
49
50
  return `${valueText} ${divider} ${capacityText}`;
@@ -51,7 +52,7 @@ export function ProgressViewer({ value, capacity, formatValues = defaultFormatVa
51
52
  return valueText;
52
53
  };
53
54
  if (isNumeric(value)) {
54
- return (_jsxs("div", Object.assign({ className: b({ size }, className) }, { children: [_jsx("div", { className: b('line', { bg }), style: lineStyle }), _jsx("span", Object.assign({ className: b('text', { text }) }, { children: renderContent() }))] })));
55
+ return (_jsxs("div", Object.assign({ className: b({ size, theme, status }, className) }, { children: [_jsx("div", { className: b('line'), style: lineStyle }), _jsx("span", Object.assign({ className: b('text') }, { children: renderContent() }))] })));
55
56
  }
56
57
  return _jsx("div", Object.assign({ className: `${b({ size })} ${className} error` }, { children: "no data" }));
57
58
  }
@@ -1,6 +1,8 @@
1
1
  @import '../../styles/mixins.scss';
2
2
 
3
3
  .progress-viewer {
4
+ $block: &;
5
+
4
6
  position: relative;
5
7
  z-index: 0;
6
8
 
@@ -16,37 +18,51 @@
16
18
  font-size: var(--g-text-body-2-font-size);
17
19
  white-space: nowrap;
18
20
 
19
- color: var(--g-color-text-light-primary);
21
+ color: var(--g-color-text-complementary);
20
22
  border-radius: 2px;
21
23
  background: var(--g-color-base-generic);
22
24
 
25
+ &_theme_dark {
26
+ color: var(--g-color-text-light-primary);
27
+
28
+ // Ensure better contrast with text
29
+ #{$block}__line {
30
+ opacity: 0.75;
31
+ }
32
+ }
33
+
34
+ &_status {
35
+ &_good {
36
+ background-color: var(--g-color-base-positive-light);
37
+ #{$block}__line {
38
+ background-color: var(--ydb-color-status-green);
39
+ }
40
+ }
41
+ &_warning {
42
+ background-color: var(--g-color-base-yellow-light);
43
+ #{$block}__line {
44
+ background-color: var(--ydb-color-status-yellow);
45
+ }
46
+ }
47
+ &_danger {
48
+ background-color: var(--g-color-base-danger-light);
49
+ #{$block}__line {
50
+ background-color: var(--ydb-color-status-red);
51
+ }
52
+ }
53
+ }
54
+
23
55
  &__line {
24
56
  position: absolute;
25
57
  top: 0;
26
58
  left: 0;
27
59
 
28
60
  height: 100%;
29
-
30
- &_bg_scarlet {
31
- background: var(--ydb-color-status-red);
32
- }
33
- &_bg_apple {
34
- background: var(--ydb-color-status-green);
35
- }
36
- &_bg_saffron {
37
- background: var(--ydb-color-status-yellow);
38
- }
39
61
  }
40
62
 
41
63
  &__text {
42
64
  position: relative;
43
65
  z-index: 1;
44
- &_text_contrast0 {
45
- color: var(--g-color-text-light-primary);
46
- }
47
- &_text_contrast70 {
48
- color: var(--g-color-text-complementary);
49
- }
50
66
  }
51
67
 
52
68
  &_size_xs {
@@ -8,12 +8,12 @@ import './TabletsOverall.scss';
8
8
  // to be able to see problem places with very small percentage, we'll set minimum percentage to 3.
9
9
  const minOverallPercentValue = 3;
10
10
  const colors = {
11
- grey: 'var(--yc-color-base-misc-heavy)',
12
- green: 'var(--yc-color-base-positive-heavy)',
13
- yellow: ' var(--yc-color-base-warning-heavy)',
14
- orange: 'var( --yc-color-base-warning-orange)',
15
- red: 'var(--yc-color-base-danger-heavy)',
16
- blue: 'var(--yc-color-base-info-heavy)',
11
+ grey: 'var(--ydb-color-status-grey)',
12
+ green: 'var(--ydb-color-status-green)',
13
+ yellow: ' var(--ydb-color-status-yellow)',
14
+ orange: 'var(--ydb-color-status-orange)',
15
+ red: 'var(--ydb-color-status-red)',
16
+ blue: 'var(--ydb-color-status-blue)',
17
17
  };
18
18
  const b = cn('kv-tablets-overall');
19
19
  function TabletsOverall({ tablets }) {
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { connect } from 'react-redux';
3
+ import { Helmet } from 'react-helmet-async';
3
4
  import ContentWrapper, { Content } from './Content';
4
5
  import ReduxTooltip from '../ReduxTooltip/ReduxTooltip';
5
6
  import AppIcons from '../AppIcons/AppIcons';
@@ -11,7 +12,7 @@ import { Providers } from './Providers';
11
12
  import './App.scss';
12
13
  registerLanguages();
13
14
  function App({ store, history, singleClusterMode, children, userSettings = settings }) {
14
- return (_jsxs(Providers, Object.assign({ store: store, history: history }, { children: [_jsx(ContentWrapper, { children: _jsx(Navigation, Object.assign({ userSettings: userSettings }, { children: _jsxs(ErrorBoundary, { children: [_jsx(Content, Object.assign({ singleClusterMode: singleClusterMode }, { children: children })), _jsx("div", { id: "fullscreen-root" })] }) })) }), _jsx(ReduxTooltip, {}), _jsx(AppIcons, {})] })));
15
+ return (_jsxs(Providers, Object.assign({ store: store, history: history }, { children: [_jsx(Helmet, { defaultTitle: "YDB Monitoring", titleTemplate: "%s \u2014 YDB Monitoring" }), _jsx(ContentWrapper, { children: _jsx(Navigation, Object.assign({ userSettings: userSettings }, { children: _jsxs(ErrorBoundary, { children: [_jsx(Content, Object.assign({ singleClusterMode: singleClusterMode }, { children: children })), _jsx("div", { id: "fullscreen-root" })] }) })) }), _jsx(ReduxTooltip, {}), _jsx(AppIcons, {})] })));
15
16
  }
16
17
  function mapStateToProps(state) {
17
18
  return {
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { Switch, Route, Redirect } from 'react-router-dom';
4
4
  import cn from 'bem-cn-lite';
5
5
  import { connect, useDispatch } from 'react-redux';
6
- import routes, { createHref } from '../../routes';
6
+ import routes from '../../routes';
7
7
  import { Clusters } from '../Clusters/Clusters';
8
8
  import Cluster from '../Cluster/Cluster';
9
9
  import Tenant from '../Tenant/Tenant';
@@ -13,7 +13,7 @@ import TabletsFilters from '../TabletsFilters/TabletsFilters';
13
13
  import Header from '../Header/Header';
14
14
  import Authentication from '../Authentication/Authentication';
15
15
  import { getUser } from '../../store/reducers/authentication/authentication';
16
- import { clusterTabsIds } from '../Cluster/utils';
16
+ import { getClusterPath } from '../Cluster/utils';
17
17
  import { useSlots } from '../../components/slots';
18
18
  import { useTypedSelector } from '../../utils/hooks';
19
19
  import { ClusterSlot, ClustersSlot, NodeSlot, RedirectSlot, RoutesSlot, TabletSlot, TabletsFiltersSlot, TenantSlot, } from './appSlots';
@@ -48,15 +48,15 @@ const routesSlots = [
48
48
  },
49
49
  ];
50
50
  function renderRouteSlot(slots, route) {
51
- return (_jsx(Route, { path: route.path, exact: route.exact, render: () => {
51
+ return (_jsx(Route, { path: route.path, exact: route.exact, render: (props) => {
52
52
  const slot = slots.get(route.slot);
53
53
  let content;
54
54
  if (!slot) {
55
55
  const Component = route.component;
56
- content = _jsx(Component, {});
56
+ content = _jsx(Component, Object.assign({}, props));
57
57
  }
58
58
  else if (typeof slot.rendered === 'function') {
59
- content = slot.rendered({ component: route.component });
59
+ content = slot.rendered(Object.assign({ component: route.component }, props));
60
60
  }
61
61
  else {
62
62
  content = slot.rendered;
@@ -70,13 +70,7 @@ export function Content(props) {
70
70
  const slots = useSlots(props);
71
71
  const additionalRoutes = slots.get(RoutesSlot);
72
72
  const redirect = slots.get(RedirectSlot);
73
- const redirectProps = (_a = redirect === null || redirect === void 0 ? void 0 : redirect.props) !== null && _a !== void 0 ? _a : (singleClusterMode
74
- ? {
75
- to: createHref(routes.cluster, {
76
- activeTab: clusterTabsIds.tenants,
77
- }),
78
- }
79
- : { to: routes.clusters });
73
+ const redirectProps = (_a = redirect === null || redirect === void 0 ? void 0 : redirect.props) !== null && _a !== void 0 ? _a : (singleClusterMode ? { to: getClusterPath() } : { to: routes.clusters });
80
74
  let mainPage;
81
75
  if (!singleClusterMode) {
82
76
  mainPage = { text: i18n('pages.clusters'), link: routes.clusters };
@@ -4,12 +4,13 @@ import { Router } from 'react-router';
4
4
  import { QueryParamProvider } from 'use-query-params';
5
5
  import { ReactRouter5Adapter } from 'use-query-params/adapters/react-router-5';
6
6
  import { ThemeProvider } from '@gravity-ui/uikit';
7
+ import { HelmetProvider } from 'react-helmet-async';
7
8
  import { ComponentsProvider } from '../../components/ComponentsProvider/ComponentsProvider';
8
9
  import { componentsRegistry as defaultComponentsRegistry } from '../../components/ComponentsProvider/componentsRegistry';
9
10
  import { useSetting } from '../../utils/hooks';
10
11
  import { THEME_KEY } from '../../utils/constants';
11
12
  export function Providers({ store, history, componentsRegistry = defaultComponentsRegistry, children, }) {
12
- return (_jsx(Provider, Object.assign({ store: store }, { children: _jsx(Router, Object.assign({ history: history }, { children: _jsx(QueryParamProvider, Object.assign({ adapter: ReactRouter5Adapter }, { children: _jsx(Theme, { children: _jsx(ComponentsProvider, Object.assign({ registry: componentsRegistry }, { children: children })) }) })) })) })));
13
+ return (_jsx(HelmetProvider, { children: _jsx(Provider, Object.assign({ store: store }, { children: _jsx(Router, Object.assign({ history: history }, { children: _jsx(QueryParamProvider, Object.assign({ adapter: ReactRouter5Adapter }, { children: _jsx(Theme, { children: _jsx(ComponentsProvider, Object.assign({ registry: componentsRegistry }, { children: children })) }) })) })) })) }));
13
14
  }
14
15
  function Theme({ children }) {
15
16
  const [theme] = useSetting(THEME_KEY);
@@ -1,4 +1,4 @@
1
- import type { RedirectProps } from 'react-router';
1
+ import type { RedirectProps, RouteComponentProps } from 'react-router';
2
2
  import type Cluster from '../Cluster/Cluster';
3
3
  import type { Clusters } from '../Clusters/Clusters';
4
4
  import type Node from '../Node/Node';
@@ -8,32 +8,32 @@ import type Tenant from '../Tenant/Tenant';
8
8
  export declare const ClustersSlot: import("../../components/slots/types").SlotComponent<{
9
9
  children: import("react").ReactNode | ((props: {
10
10
  component: typeof Clusters;
11
- }) => React.ReactNode);
11
+ } & RouteComponentProps) => React.ReactNode);
12
12
  }, never>;
13
13
  export declare const ClusterSlot: import("../../components/slots/types").SlotComponent<{
14
14
  children: import("react").ReactNode | ((props: {
15
15
  component: typeof Cluster;
16
- }) => React.ReactNode);
16
+ } & RouteComponentProps) => React.ReactNode);
17
17
  }, never>;
18
18
  export declare const TenantSlot: import("../../components/slots/types").SlotComponent<{
19
19
  children: import("react").ReactNode | ((props: {
20
20
  component: typeof Tenant;
21
- }) => React.ReactNode);
21
+ } & RouteComponentProps) => React.ReactNode);
22
22
  }, never>;
23
23
  export declare const NodeSlot: import("../../components/slots/types").SlotComponent<{
24
24
  children: import("react").ReactNode | ((props: {
25
25
  component: typeof Node;
26
- }) => React.ReactNode);
26
+ } & RouteComponentProps) => React.ReactNode);
27
27
  }, never>;
28
28
  export declare const TabletSlot: import("../../components/slots/types").SlotComponent<{
29
29
  children: import("react").ReactNode | ((props: {
30
30
  component: typeof Tablet;
31
- }) => React.ReactNode);
31
+ } & RouteComponentProps) => React.ReactNode);
32
32
  }, never>;
33
33
  export declare const TabletsFiltersSlot: import("../../components/slots/types").SlotComponent<{
34
34
  children: import("react").ReactNode | ((props: {
35
35
  component: typeof TabletsFilters;
36
- }) => React.ReactNode);
36
+ } & RouteComponentProps) => React.ReactNode);
37
37
  }, never>;
38
38
  export declare const RoutesSlot: import("../../components/slots/types").SlotComponent<{}, never>;
39
39
  export declare const RedirectSlot: import("../../components/slots/types").SlotComponent<RedirectProps, never>;