ydb-embedded-ui 6.3.0 → 6.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (221) hide show
  1. package/README.md +39 -17
  2. package/dist/assets/icons/disableFullscreen.svg +4 -0
  3. package/dist/assets/icons/emptyState.svg +13 -0
  4. package/dist/assets/icons/key.svg +6 -0
  5. package/dist/assets/icons/monitoring.svg +9 -0
  6. package/dist/assets/icons/network.svg +21 -0
  7. package/dist/components/AsyncReplicationState/AsyncReplicationState.d.ts +6 -0
  8. package/dist/components/AsyncReplicationState/AsyncReplicationState.js +20 -0
  9. package/dist/components/AsyncReplicationState/index.d.ts +1 -0
  10. package/dist/components/AsyncReplicationState/index.js +1 -0
  11. package/dist/components/BasicNodeViewer/BasicNodeViewer.js +11 -5
  12. package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.d.ts +6 -2
  13. package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js +12 -3
  14. package/dist/components/CriticalActionDialog/CriticalActionDialog.js +3 -4
  15. package/dist/components/CriticalActionDialog/CriticalActionDialog.scss +2 -0
  16. package/dist/components/EmptyState/EmptyState.js +3 -2
  17. package/dist/components/EnableFullscreenButton/EnableFullscreenButton.js +3 -3
  18. package/dist/components/Errors/ResponseError/ResponseError.js +3 -0
  19. package/dist/components/Fullscreen/Fullscreen.js +3 -3
  20. package/dist/components/MonitoringButton/MonitoringButton.js +3 -3
  21. package/dist/components/NodeHostWrapper/NodeHostWrapper.js +3 -3
  22. package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
  23. package/dist/components/QueryExecutionStatus/QueryExecutionStatus.d.ts +1 -2
  24. package/dist/components/QueryExecutionStatus/QueryExecutionStatus.js +6 -6
  25. package/dist/components/StatusIcon/StatusIcon.js +5 -7
  26. package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
  27. package/dist/containers/App/App.js +1 -2
  28. package/dist/containers/AsideNavigation/AsideNavigation.js +4 -9
  29. package/dist/containers/AsideNavigation/YdbInternalUser/YdbInternalUser.js +2 -3
  30. package/dist/containers/AsideNavigation/useNavigationMenuItems.js +5 -6
  31. package/dist/containers/Authentication/Authentication.js +2 -4
  32. package/dist/containers/Clusters/Clusters.js +7 -2
  33. package/dist/containers/Clusters/constants.d.ts +1 -3
  34. package/dist/containers/Clusters/constants.js +0 -18
  35. package/dist/containers/Node/NodeStructure/Pdisk.js +4 -4
  36. package/dist/containers/Nodes/Nodes.js +19 -15
  37. package/dist/containers/Nodes/VirtualNodes.js +23 -6
  38. package/dist/containers/PDiskPage/PDiskPage.js +3 -2
  39. package/dist/containers/PDiskPage/i18n/en.json +2 -1
  40. package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
  41. package/dist/containers/Storage/Storage.js +50 -22
  42. package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js +2 -2
  43. package/dist/containers/Storage/VirtualStorage.js +32 -10
  44. package/dist/containers/Storage/utils/index.d.ts +4 -1
  45. package/dist/containers/Storage/utils/index.js +29 -0
  46. package/dist/containers/Tablet/Tablet.js +3 -3
  47. package/dist/containers/Tablet/TabletControls/TabletControls.js +3 -1
  48. package/dist/containers/Tablet/i18n/en.json +3 -0
  49. package/dist/containers/Tablet/i18n/index.d.ts +1 -1
  50. package/dist/containers/Tablet/i18n/index.js +1 -2
  51. package/dist/containers/Tablets/Tablets.d.ts +1 -2
  52. package/dist/containers/Tablets/Tablets.js +113 -53
  53. package/dist/containers/Tablets/i18n/en.json +10 -4
  54. package/dist/containers/Tablets/i18n/index.d.ts +1 -1
  55. package/dist/containers/Tablets/i18n/index.js +1 -2
  56. package/dist/containers/Tenant/Diagnostics/Diagnostics.js +5 -5
  57. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +7 -0
  58. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +2 -0
  59. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +31 -19
  60. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.scss +14 -4
  61. package/dist/containers/Tenant/Diagnostics/HotKeys/i18n/en.json +2 -1
  62. package/dist/containers/Tenant/Diagnostics/HotKeys/i18n/index.d.ts +1 -1
  63. package/dist/containers/Tenant/Diagnostics/Network/Network.js +3 -3
  64. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/AsyncReplicationInfo.d.ts +7 -0
  65. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/AsyncReplicationInfo.js +39 -0
  66. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/Credentials.d.ts +6 -0
  67. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/Credentials.js +14 -0
  68. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/i18n/en.json +7 -0
  69. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/i18n/index.d.ts +2 -0
  70. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/i18n/index.js +4 -0
  71. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/index.d.ts +1 -0
  72. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/index.js +1 -0
  73. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.d.ts +7 -0
  74. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.js +34 -0
  75. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.scss +7 -0
  76. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/en.json +7 -0
  77. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/index.d.ts +2 -0
  78. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/index.js +4 -0
  79. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/index.d.ts +1 -0
  80. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/index.js +1 -0
  81. package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +2 -0
  82. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.js +2 -2
  83. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +2 -1
  84. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js +2 -1
  85. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.js +2 -1
  86. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
  87. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +3 -3
  88. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +3 -3
  89. package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.js +2 -8
  90. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +23 -9
  91. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.d.ts +2 -2
  92. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +5 -6
  93. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +6 -14
  94. package/dist/containers/Tenant/Query/Issues/Issues.js +6 -9
  95. package/dist/containers/Tenant/Query/Preview/Preview.js +5 -5
  96. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +2 -8
  97. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +18 -19
  98. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +4 -4
  99. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js +3 -3
  100. package/dist/containers/Tenant/Schema/SchemaViewer/helpers.js +3 -2
  101. package/dist/containers/Tenant/Tenant.js +3 -2
  102. package/dist/containers/Tenant/utils/ToggleButton.scss +0 -2
  103. package/dist/containers/Tenant/utils/paneVisibilityToggleHelpers.js +4 -4
  104. package/dist/containers/Tenant/utils/schema.js +8 -0
  105. package/dist/containers/Tenant/utils/schemaActions.js +1 -0
  106. package/dist/containers/Tenant/utils/schemaControls.js +4 -3
  107. package/dist/containers/VDiskPage/VDiskPage.js +3 -2
  108. package/dist/containers/VDiskPage/i18n/en.json +2 -1
  109. package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
  110. package/dist/routes.d.ts +1 -1
  111. package/dist/services/api.d.ts +3 -3
  112. package/dist/services/settings.d.ts +19 -1
  113. package/dist/services/settings.js +2 -1
  114. package/dist/store/configureStore.d.ts +0 -12
  115. package/dist/store/defaultStore.d.ts +0 -6
  116. package/dist/store/reducers/authentication/authentication.d.ts +187 -13
  117. package/dist/store/reducers/authentication/authentication.js +12 -3
  118. package/dist/store/reducers/authentication/types.d.ts +5 -1
  119. package/dist/store/reducers/cluster/cluster.js +4 -0
  120. package/dist/store/reducers/executeQuery.d.ts +4 -65
  121. package/dist/store/reducers/executeQuery.js +38 -34
  122. package/dist/store/reducers/executeTopQueries/executeTopQueries.js +4 -1
  123. package/dist/store/reducers/explainQuery/explainQuery.d.ts +9 -0
  124. package/dist/store/reducers/explainQuery/explainQuery.js +32 -0
  125. package/dist/store/reducers/explainQuery/types.d.ts +12 -0
  126. package/dist/store/reducers/explainQuery/utils.d.ts +6 -0
  127. package/dist/store/reducers/explainQuery/utils.js +40 -0
  128. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +0 -60
  129. package/dist/store/reducers/host.d.ts +61 -4
  130. package/dist/store/reducers/index.d.ts +0 -9
  131. package/dist/store/reducers/index.js +0 -6
  132. package/dist/store/reducers/node/selectors.d.ts +0 -3
  133. package/dist/store/reducers/nodes/nodes.d.ts +1 -5
  134. package/dist/store/reducers/nodes/nodes.js +0 -27
  135. package/dist/store/reducers/nodes/types.d.ts +4 -13
  136. package/dist/store/reducers/nodesList.d.ts +0 -3
  137. package/dist/store/reducers/olapStats.js +4 -1
  138. package/dist/store/reducers/preview.js +4 -1
  139. package/dist/store/reducers/schema/schema.d.ts +61 -4
  140. package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +61 -4
  141. package/dist/store/reducers/shardsWorkload/shardsWorkload.js +4 -1
  142. package/dist/store/reducers/storage/selectors.d.ts +2 -17
  143. package/dist/store/reducers/storage/selectors.js +1 -36
  144. package/dist/store/reducers/storage/storage.d.ts +2 -6
  145. package/dist/store/reducers/storage/storage.js +0 -44
  146. package/dist/store/reducers/storage/types.d.ts +15 -22
  147. package/dist/store/reducers/storage/types.js +4 -1
  148. package/dist/store/reducers/tablets.d.ts +91 -1
  149. package/dist/store/reducers/tablets.js +16 -1
  150. package/dist/store/reducers/tabletsFilters.d.ts +61 -4
  151. package/dist/store/reducers/tenant/tenant.d.ts +2 -2
  152. package/dist/store/reducers/tenant/tenant.js +10 -1
  153. package/dist/store/reducers/tenant/types.d.ts +8 -3
  154. package/dist/store/reducers/tenant/types.js +3 -1
  155. package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.js +6 -3
  156. package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.js +6 -3
  157. package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js +6 -3
  158. package/dist/store/reducers/tenants/selectors.d.ts +0 -27
  159. package/dist/store/reducers/tenants/utils.d.ts +4 -4
  160. package/dist/store/reducers/tenants/utils.js +8 -8
  161. package/dist/store/reducers/topic.d.ts +0 -45
  162. package/dist/store/state-url-mapping.js +0 -22
  163. package/dist/store/utils.d.ts +2 -3
  164. package/dist/store/utils.js +1 -1
  165. package/dist/types/api/schema/replication.d.ts +74 -0
  166. package/dist/types/api/schema/replication.js +7 -0
  167. package/dist/types/api/schema/schema.d.ts +4 -1
  168. package/dist/types/api/schema/schema.js +1 -0
  169. package/dist/types/api/whoami.d.ts +6 -0
  170. package/dist/types/store/executeQuery.d.ts +2 -9
  171. package/dist/utils/constants.d.ts +1 -0
  172. package/dist/utils/constants.js +1 -0
  173. package/dist/utils/monaco/yql/constants.d.ts +2 -0
  174. package/dist/utils/monaco/yql/constants.js +33 -0
  175. package/dist/utils/monaco/yql/generateSuggestions.d.ts +1 -0
  176. package/dist/utils/monaco/yql/generateSuggestions.js +28 -11
  177. package/dist/utils/monaco/yql/yqlSuggestions.js +6 -1
  178. package/dist/utils/nodes.d.ts +2 -0
  179. package/dist/utils/nodes.js +4 -0
  180. package/dist/utils/query.d.ts +5 -3
  181. package/dist/utils/query.js +27 -4
  182. package/dist/utils/response.d.ts +4 -0
  183. package/dist/utils/response.js +9 -0
  184. package/dist/utils/tablet.d.ts +2 -0
  185. package/dist/utils/tablet.js +14 -0
  186. package/package.json +4 -3
  187. package/dist/assets/icons/bug.svg +0 -1
  188. package/dist/assets/icons/circle-exclamation.svg +0 -1
  189. package/dist/assets/icons/circle-info.svg +0 -1
  190. package/dist/assets/icons/circle-xmark.svg +0 -1
  191. package/dist/assets/icons/close.svg +0 -1
  192. package/dist/assets/icons/control-menu-button.svg +0 -1
  193. package/dist/assets/icons/dots.svg +0 -1
  194. package/dist/assets/icons/hide.svg +0 -1
  195. package/dist/assets/icons/question.svg +0 -1
  196. package/dist/assets/icons/server.svg +0 -1
  197. package/dist/assets/icons/settings-with-dot.svg +0 -1
  198. package/dist/assets/icons/settings.svg +0 -1
  199. package/dist/assets/icons/shield.svg +0 -3
  200. package/dist/assets/icons/show.svg +0 -1
  201. package/dist/assets/icons/signIn.svg +0 -1
  202. package/dist/assets/icons/signOut.svg +0 -1
  203. package/dist/assets/icons/storage.svg +0 -1
  204. package/dist/assets/icons/support.svg +0 -1
  205. package/dist/assets/icons/triangle-exclamation.svg +0 -1
  206. package/dist/assets/icons/update-arrow.svg +0 -6
  207. package/dist/components/Icon/Icon.d.ts +0 -14
  208. package/dist/components/Icon/Icon.js +0 -16
  209. package/dist/components/Icon/index.d.ts +0 -1
  210. package/dist/components/Icon/index.js +0 -1
  211. package/dist/containers/AppIcons/AppIcons.d.ts +0 -2
  212. package/dist/containers/AppIcons/AppIcons.js +0 -9
  213. package/dist/containers/Tablet/i18n/ru.json +0 -10
  214. package/dist/containers/Tablets/Tablets.scss +0 -35
  215. package/dist/containers/Tablets/i18n/ru.json +0 -6
  216. package/dist/store/reducers/explainQuery.d.ts +0 -149
  217. package/dist/store/reducers/explainQuery.js +0 -94
  218. package/dist/types/store/explainQuery.d.ts +0 -27
  219. package/dist/utils/error.d.ts +0 -2
  220. package/dist/utils/error.js +0 -13
  221. /package/dist/{types/store/explainQuery.js → store/reducers/explainQuery/types.js} +0 -0
@@ -1,5 +1,9 @@
1
+ import { ASCENDING, DESCENDING } from '@gravity-ui/react-data-table/build/esm/lib/constants';
2
+ import { VISIBLE_ENTITIES } from '../../../store/reducers/storage/constants';
1
3
  import { EFlag } from '../../../types/api/enums';
2
4
  import { generateEvaluator } from '../../../utils/generateEvaluator';
5
+ import { NODES_SORT_VALUES } from '../../../utils/nodes';
6
+ import { STORAGE_SORT_VALUES } from '../../../utils/storage';
3
7
  const defaultDegradationEvaluator = generateEvaluator(1, 2, ['success', 'warning', 'danger']);
4
8
  const degradationEvaluators = {
5
9
  'block-4-2': generateEvaluator(1, 2, ['success', 'warning', 'danger']),
@@ -22,3 +26,28 @@ export const getUsageSeverityForEntityStatus = generateEvaluator(80, 85, [
22
26
  EFlag.Yellow,
23
27
  EFlag.Red,
24
28
  ]);
29
+ export const defaultSortNode = {
30
+ sortValue: NODES_SORT_VALUES.NodeId,
31
+ sortOrder: ASCENDING,
32
+ };
33
+ const defaultSortGroup = {
34
+ sortValue: STORAGE_SORT_VALUES.PoolName,
35
+ sortOrder: ASCENDING,
36
+ };
37
+ const defaultSortGroupMissing = {
38
+ sortValue: STORAGE_SORT_VALUES.Degraded,
39
+ sortOrder: DESCENDING,
40
+ };
41
+ const defaultSortGroupSpace = {
42
+ sortValue: STORAGE_SORT_VALUES.Usage,
43
+ sortOrder: DESCENDING,
44
+ };
45
+ export function getDefaultSortGroup(visibleEntities) {
46
+ if (visibleEntities === VISIBLE_ENTITIES.missing) {
47
+ return defaultSortGroupMissing;
48
+ }
49
+ if (visibleEntities === VISIBLE_ENTITIES.space) {
50
+ return defaultSortGroupSpace;
51
+ }
52
+ return defaultSortGroup;
53
+ }
@@ -1,13 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { Link as ExternalLink } from '@gravity-ui/uikit';
3
+ import { ArrowUpRightFromSquare } from '@gravity-ui/icons';
4
+ import { Link as ExternalLink, Icon } from '@gravity-ui/uikit';
4
5
  import { skipToken } from '@reduxjs/toolkit/query';
5
6
  import { Helmet } from 'react-helmet-async';
6
7
  import { useLocation, useParams } from 'react-router';
7
8
  import { EmptyState } from '../../components/EmptyState';
8
9
  import { EntityStatus } from '../../components/EntityStatus/EntityStatus';
9
10
  import { ResponseError } from '../../components/Errors/ResponseError';
10
- import { Icon } from '../../components/Icon';
11
11
  import { Loader } from '../../components/Loader';
12
12
  import { Tag } from '../../components/Tag';
13
13
  import { parseQuery } from '../../routes';
@@ -66,7 +66,7 @@ export const Tablet = () => {
66
66
  path: `/tablets?TabletID=${TabletId}`,
67
67
  },
68
68
  ];
69
- return (_jsx("div", { className: b(), children: _jsxs("div", { className: b('pane-wrapper'), children: [_jsxs("div", { className: b('left-pane'), children: [_jsx("ul", { className: b('links'), children: externalLinks.map(renderExternalLinks) }), _jsxs("div", { className: b('row', { header: true }), children: [_jsx("span", { className: b('title'), children: i18n('tablet.header') }), _jsx(EntityStatus, { status: Overall, name: TabletId }), _jsx("a", { rel: "noopener noreferrer", className: b('link', { external: true }), href: `${backend}/tablets?TabletID=${TabletId}`, target: "_blank", children: _jsx(Icon, { name: "external" }) }), Leader && _jsx(Tag, { text: "Leader", type: "blue" }), _jsx("span", { className: b('loader'), children: loading && _jsx(Loader, { size: "s" }) })] }), _jsx(TabletInfo, { tablet: tablet, tenantPath: tenantName }), _jsx(TabletControls, { tablet: tablet, fetchData: refetch })] }), _jsx("div", { className: b('rigth-pane'), children: _jsx(TabletTable, { history: history }) })] }) }));
69
+ return (_jsx("div", { className: b(), children: _jsxs("div", { className: b('pane-wrapper'), children: [_jsxs("div", { className: b('left-pane'), children: [_jsx("ul", { className: b('links'), children: externalLinks.map(renderExternalLinks) }), _jsxs("div", { className: b('row', { header: true }), children: [_jsx("span", { className: b('title'), children: i18n('tablet.header') }), _jsx(EntityStatus, { status: Overall, name: TabletId }), _jsx("a", { rel: "noopener noreferrer", className: b('link', { external: true }), href: `${backend}/tablets?TabletID=${TabletId}`, target: "_blank", children: _jsx(Icon, { data: ArrowUpRightFromSquare }) }), Leader && _jsx(Tag, { text: "Leader", type: "blue" }), _jsx("span", { className: b('loader'), children: loading && _jsx(Loader, { size: "s" }) })] }), _jsx(TabletInfo, { tablet: tablet, tenantPath: tenantName }), _jsx(TabletControls, { tablet: tablet, fetchData: refetch })] }), _jsx("div", { className: b('rigth-pane'), children: _jsx(TabletTable, { history: history }) })] }) }));
70
70
  };
71
71
  return (_jsxs(React.Fragment, { children: [_jsx(Helmet, { children: _jsx("title", { children: `${id} — ${i18n('tablet.header')} — ${tenantName || queryClusterName || CLUSTER_DEFAULT_TITLE}` }) }), renderView()] }));
72
72
  };
@@ -2,10 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { ButtonWithConfirmDialog } from '../../../components/ButtonWithConfirmDialog/ButtonWithConfirmDialog';
4
4
  import { ETabletState } from '../../../types/api/tablet';
5
+ import { useTypedSelector } from '../../../utils/hooks';
5
6
  import { b } from '../Tablet';
6
7
  import i18n from '../i18n';
7
8
  export const TabletControls = ({ tablet, fetchData }) => {
8
9
  const { TabletId, HiveId } = tablet;
10
+ const { isUserAllowedToMakeChanges } = useTypedSelector((state) => state.authentication);
9
11
  const _onKillClick = () => {
10
12
  return window.api.killTablet(TabletId);
11
13
  };
@@ -21,5 +23,5 @@ export const TabletControls = ({ tablet, fetchData }) => {
21
23
  const isDisabledRestart = tablet.State === ETabletState.Stopped;
22
24
  const isDisabledResume = tablet.State !== ETabletState.Stopped && tablet.State !== ETabletState.Dead;
23
25
  const isDisabledStop = tablet.State === ETabletState.Stopped || tablet.State === ETabletState.Deleted;
24
- return (_jsxs("div", { className: b('controls'), children: [_jsx(ButtonWithConfirmDialog, { dialogContent: i18n('dialog.kill'), onConfirmAction: _onKillClick, onConfirmActionSuccess: fetchData, buttonClassName: b('control'), buttonDisabled: isDisabledRestart, children: i18n('controls.kill') }), hasHiveId() ? (_jsxs(React.Fragment, { children: [_jsx(ButtonWithConfirmDialog, { dialogContent: i18n('dialog.stop'), onConfirmAction: _onStopClick, onConfirmActionSuccess: fetchData, buttonClassName: b('control'), buttonDisabled: isDisabledStop, children: i18n('controls.stop') }), _jsx(ButtonWithConfirmDialog, { dialogContent: i18n('dialog.resume'), onConfirmAction: _onResumeClick, onConfirmActionSuccess: fetchData, buttonClassName: b('control'), buttonDisabled: isDisabledResume, children: i18n('controls.resume') })] })) : null] }));
26
+ return (_jsxs("div", { className: b('controls'), children: [_jsx(ButtonWithConfirmDialog, { dialogContent: i18n('dialog.kill'), onConfirmAction: _onKillClick, onConfirmActionSuccess: fetchData, buttonClassName: b('control'), buttonDisabled: isDisabledRestart || !isUserAllowedToMakeChanges, withPopover: true, popoverContent: i18n('controls.kill-not-allowed'), popoverPlacement: 'bottom', popoverDisabled: isUserAllowedToMakeChanges, children: i18n('controls.kill') }), hasHiveId() ? (_jsxs(React.Fragment, { children: [_jsx(ButtonWithConfirmDialog, { dialogContent: i18n('dialog.stop'), onConfirmAction: _onStopClick, onConfirmActionSuccess: fetchData, buttonClassName: b('control'), buttonDisabled: isDisabledStop || !isUserAllowedToMakeChanges, withPopover: true, popoverContent: i18n('controls.stop-not-allowed'), popoverPlacement: 'bottom', popoverDisabled: isUserAllowedToMakeChanges, children: i18n('controls.stop') }), _jsx(ButtonWithConfirmDialog, { dialogContent: i18n('dialog.resume'), onConfirmAction: _onResumeClick, onConfirmActionSuccess: fetchData, buttonClassName: b('control'), buttonDisabled: isDisabledResume || !isUserAllowedToMakeChanges, withPopover: true, popoverContent: i18n('controls.resume-not-allowed'), popoverPlacement: 'bottom', popoverDisabled: isUserAllowedToMakeChanges, children: i18n('controls.resume') })] })) : null] }));
25
27
  };
@@ -3,6 +3,9 @@
3
3
  "controls.kill": "Restart",
4
4
  "controls.stop": "Stop",
5
5
  "controls.resume": "Resume",
6
+ "controls.kill-not-allowed": "You don't have enough rights to restart tablet",
7
+ "controls.stop-not-allowed": "You don't have enough rights to stop tablet",
8
+ "controls.resume-not-allowed": "You don't have enough rights to resume tablet",
6
9
  "dialog.kill": "The tablet will be restarted. Do you want to proceed?",
7
10
  "dialog.stop": "The tablet will be stopped. Do you want to proceed?",
8
11
  "dialog.resume": "The tablet will be resumed. Do you want to proceed?",
@@ -1,2 +1,2 @@
1
- declare const _default: (key: "emptyState" | "tablet.header" | "controls.kill" | "controls.stop" | "controls.resume" | "dialog.kill" | "dialog.stop" | "dialog.resume", params?: import("@gravity-ui/i18n").Params | undefined) => string;
1
+ declare const _default: (key: "dialog.kill" | "controls.kill-not-allowed" | "tablet.header" | "controls.kill" | "controls.stop" | "controls.resume" | "controls.stop-not-allowed" | "controls.resume-not-allowed" | "dialog.stop" | "dialog.resume" | "emptyState", params?: import("@gravity-ui/i18n").Params | undefined) => string;
2
2
  export default _default;
@@ -1,5 +1,4 @@
1
1
  import { registerKeysets } from '../../../utils/i18n';
2
2
  import en from './en.json';
3
- import ru from './ru.json';
4
3
  const COMPONENT = 'ydb-tablet-page';
5
- export default registerKeysets(COMPONENT, { en, ru });
4
+ export default registerKeysets(COMPONENT, { en });
@@ -1,8 +1,7 @@
1
- import './Tablets.scss';
2
1
  interface TabletsProps {
3
2
  path?: string;
4
3
  nodeId?: string | number;
5
4
  className?: string;
6
5
  }
7
- export declare const Tablets: ({ path, nodeId, className }: TabletsProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare function Tablets({ nodeId, path, className }: TabletsProps): import("react/jsx-runtime").JSX.Element;
8
7
  export {};
@@ -1,25 +1,121 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from 'react';
3
- import { Select } from '@gravity-ui/uikit';
2
+ import { ArrowsRotateRight } from '@gravity-ui/icons';
3
+ import { Icon, Label, Text } from '@gravity-ui/uikit';
4
4
  import { skipToken } from '@reduxjs/toolkit/query';
5
- import ReactList from 'react-list';
5
+ import { ButtonWithConfirmDialog } from '../../components/ButtonWithConfirmDialog/ButtonWithConfirmDialog';
6
+ import { EntityStatus } from '../../components/EntityStatus/EntityStatus';
6
7
  import { ResponseError } from '../../components/Errors/ResponseError';
7
- import { Loader } from '../../components/Loader';
8
- import { Tablet } from '../../components/Tablet';
9
- import TabletsOverall from '../../components/TabletsOverall/TabletsOverall';
10
- import { setStateFilter, setTypeFilter, tabletsApi } from '../../store/reducers/tablets';
8
+ import { InternalLink } from '../../components/InternalLink';
9
+ import { ResizeableDataTable } from '../../components/ResizeableDataTable/ResizeableDataTable';
10
+ import { TableSkeleton } from '../../components/TableSkeleton/TableSkeleton';
11
+ import routes, { createHref } from '../../routes';
12
+ import { selectTabletsWithFqdn, tabletsApi } from '../../store/reducers/tablets';
13
+ import { ETabletState } from '../../types/api/tablet';
11
14
  import { cn } from '../../utils/cn';
15
+ import { DEFAULT_TABLE_SETTINGS } from '../../utils/constants';
16
+ import { calcUptime } from '../../utils/dataFormatters/dataFormatters';
12
17
  import { useTypedDispatch, useTypedSelector } from '../../utils/hooks';
18
+ import { mapTabletStateToLabelTheme } from '../../utils/tablet';
19
+ import { getDefaultNodePath } from '../Node/NodePages';
13
20
  import i18n from './i18n';
14
- import './Tablets.scss';
15
21
  const b = cn('tablets');
16
- export const Tablets = ({ path, nodeId, className }) => {
22
+ const columns = [
23
+ {
24
+ name: 'Type',
25
+ get header() {
26
+ return i18n('Type');
27
+ },
28
+ render: ({ row }) => {
29
+ return (_jsxs("span", { children: [row.Type, " ", row.Leader ? _jsx(Text, { color: "secondary", children: "leader" }) : ''] }));
30
+ },
31
+ },
32
+ {
33
+ name: 'TabletId',
34
+ get header() {
35
+ return i18n('Tablet');
36
+ },
37
+ render: ({ row }) => {
38
+ const tabletPath = row.TabletId &&
39
+ createHref(routes.tablet, { id: row.TabletId }, { nodeId: row.NodeId, type: row.Type });
40
+ return _jsx(InternalLink, { to: tabletPath, children: row.TabletId });
41
+ },
42
+ },
43
+ {
44
+ name: 'State',
45
+ get header() {
46
+ return i18n('State');
47
+ },
48
+ render: ({ row }) => {
49
+ return _jsx(Label, { theme: mapTabletStateToLabelTheme(row.State), children: row.State });
50
+ },
51
+ },
52
+ {
53
+ name: 'NodeId',
54
+ get header() {
55
+ return i18n('Node ID');
56
+ },
57
+ render: ({ row }) => {
58
+ const nodePath = row.NodeId === undefined ? undefined : getDefaultNodePath(row.NodeId);
59
+ return _jsx(InternalLink, { to: nodePath, children: row.NodeId });
60
+ },
61
+ align: 'right',
62
+ },
63
+ {
64
+ name: 'FQDN',
65
+ get header() {
66
+ return i18n('Node FQDN');
67
+ },
68
+ render: ({ row }) => {
69
+ if (!row.fqdn) {
70
+ return _jsx("span", { children: "\u2014" });
71
+ }
72
+ return _jsx(EntityStatus, { name: row.fqdn, showStatus: false, hasClipboardButton: true });
73
+ },
74
+ },
75
+ {
76
+ name: 'Generation',
77
+ get header() {
78
+ return i18n('Generation');
79
+ },
80
+ align: 'right',
81
+ },
82
+ {
83
+ name: 'Uptime',
84
+ get header() {
85
+ return i18n('Uptime');
86
+ },
87
+ render: ({ row }) => {
88
+ return calcUptime(row.ChangeTime);
89
+ },
90
+ sortAccessor: (row) => -Number(row.ChangeTime),
91
+ align: 'right',
92
+ },
93
+ {
94
+ name: 'Actions',
95
+ sortable: false,
96
+ resizeable: false,
97
+ header: '',
98
+ render: ({ row }) => {
99
+ return _jsx(TabletActions, Object.assign({}, row));
100
+ },
101
+ },
102
+ ];
103
+ function TabletActions(tablet) {
104
+ const isDisabledRestart = tablet.State === ETabletState.Stopped;
17
105
  const dispatch = useTypedDispatch();
18
- const { stateFilter, typeFilter } = useTypedSelector((state) => state.tablets);
106
+ const { isUserAllowedToMakeChanges } = useTypedSelector((state) => state.authentication);
107
+ return (_jsx(ButtonWithConfirmDialog, { buttonView: "outlined", dialogContent: i18n('dialog.kill'), onConfirmAction: () => {
108
+ return window.api.killTablet(tablet.TabletId);
109
+ }, onConfirmActionSuccess: () => {
110
+ dispatch(tabletsApi.util.invalidateTags(['All']));
111
+ }, buttonDisabled: isDisabledRestart || !isUserAllowedToMakeChanges, withPopover: true, popoverContent: i18n('controls.kill-not-allowed'), popoverDisabled: isUserAllowedToMakeChanges, children: _jsx(Icon, { data: ArrowsRotateRight }) }));
112
+ }
113
+ export function Tablets({ nodeId, path, className }) {
19
114
  const { autorefresh } = useTypedSelector((state) => state.schema);
20
115
  let params = skipToken;
21
- if (nodeId) {
22
- params = { nodes: [String(nodeId)] };
116
+ const node = nodeId === undefined ? undefined : String(nodeId);
117
+ if (node !== undefined) {
118
+ params = { nodes: [String(node)] };
23
119
  }
24
120
  else if (path) {
25
121
  params = { path };
@@ -28,48 +124,12 @@ export const Tablets = ({ path, nodeId, className }) => {
28
124
  pollingInterval: autorefresh,
29
125
  });
30
126
  const loading = isFetching && currentData === undefined;
31
- const tablets = React.useMemo(() => (currentData === null || currentData === void 0 ? void 0 : currentData.TabletStateInfo) || [], [currentData]);
32
- const tabletsToRender = React.useMemo(() => {
33
- let filteredTablets = tablets;
34
- if (typeFilter.length > 0) {
35
- filteredTablets = filteredTablets.filter((tablet) => typeFilter.some((filter) => tablet.Type === filter));
36
- }
37
- if (stateFilter.length > 0) {
38
- filteredTablets = filteredTablets.filter((tablet) => stateFilter.some((filter) => tablet.State === filter));
39
- }
40
- return filteredTablets;
41
- }, [tablets, stateFilter, typeFilter]);
42
- const handleStateFilterChange = (value) => {
43
- dispatch(setStateFilter(value));
44
- };
45
- const handleTypeFilterChange = (value) => {
46
- dispatch(setTypeFilter(value));
47
- };
48
- const renderTablet = (tabletIndex) => {
49
- return _jsx(Tablet, { tablet: tabletsToRender[tabletIndex] }, tabletIndex);
50
- };
51
- const renderContent = () => {
52
- const states = Array.from(new Set(tablets.map((tablet) => tablet.State)))
53
- .filter((state) => state !== undefined)
54
- .map((item) => ({
55
- value: item,
56
- content: item,
57
- }));
58
- const types = Array.from(new Set(tablets.map((tablet) => tablet.Type)))
59
- .filter((type) => type !== undefined)
60
- .map((item) => ({
61
- value: item,
62
- content: item,
63
- }));
64
- return (_jsxs("div", { className: b(null, className), children: [_jsxs("div", { className: b('header'), children: [_jsx(Select, { className: b('filter-control'), multiple: true, placeholder: i18n('controls.allItems'), label: `${i18n('controls.state')}:`, options: states, value: stateFilter, onUpdate: handleStateFilterChange }), _jsx(Select, { className: b('filter-control'), multiple: true, placeholder: i18n('controls.allItems'), label: `${i18n('controls.type')}:`, options: types, value: typeFilter, onUpdate: handleTypeFilterChange }), _jsx(TabletsOverall, { tablets: tablets })] }), _jsx("div", { className: b('items'), children: _jsx(ReactList, { itemRenderer: renderTablet, length: tabletsToRender.length, type: "uniform" }) })] }));
65
- };
127
+ const tablets = useTypedSelector((state) => selectTabletsWithFqdn(state, node, path));
66
128
  if (loading) {
67
- return _jsx(Loader, {});
129
+ return _jsx(TableSkeleton, {});
68
130
  }
69
- else if (error) {
131
+ if (error) {
70
132
  return _jsx(ResponseError, { error: error });
71
133
  }
72
- else {
73
- return tablets.length > 0 ? (renderContent()) : (_jsx("div", { className: "error", children: i18n('noTabletsData') }));
74
- }
75
- };
134
+ return (_jsx("div", { className: b(null, className), children: _jsx(ResizeableDataTable, { columns: columns, data: tablets, settings: DEFAULT_TABLE_SETTINGS, emptyDataMessage: i18n('noTabletsData') }) }));
135
+ }
@@ -1,6 +1,12 @@
1
1
  {
2
- "controls.type": "Type",
3
- "controls.state": "State",
4
- "controls.allItems": "All items",
5
- "noTabletsData": "No tablets data"
2
+ "noTabletsData": "No tablets data",
3
+ "Type": "Type",
4
+ "Tablet": "Tablet",
5
+ "State": "State",
6
+ "Node ID": "Node ID",
7
+ "Node FQDN": "Node FQDN",
8
+ "Generation": "Generation",
9
+ "Uptime": "Uptime",
10
+ "dialog.kill": "The tablet will be restarted. Do you want to proceed?",
11
+ "controls.kill-not-allowed": "You don't have enough rights to restart tablet"
6
12
  }
@@ -1,2 +1,2 @@
1
- declare const _default: (key: "controls.type" | "controls.state" | "controls.allItems" | "noTabletsData", params?: import("@gravity-ui/i18n").Params | undefined) => string;
1
+ declare const _default: (key: "Uptime" | "Type" | "State" | "Generation" | "Tablet" | "Node ID" | "Node FQDN" | "noTabletsData" | "dialog.kill" | "controls.kill-not-allowed", params?: import("@gravity-ui/i18n").Params | undefined) => string;
2
2
  export default _default;
@@ -1,5 +1,4 @@
1
1
  import { registerKeysets } from '../../../utils/i18n';
2
2
  import en from './en.json';
3
- import ru from './ru.json';
4
3
  const COMPONENT = 'ydb-tablets';
5
- export default registerKeysets(COMPONENT, { ru, en });
4
+ export default registerKeysets(COMPONENT, { en });
@@ -1,10 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { Tabs } from '@gravity-ui/uikit';
4
- import qs from 'qs';
5
4
  import { Helmet } from 'react-helmet-async';
6
- import { useLocation } from 'react-router';
7
5
  import { Link } from 'react-router-dom';
6
+ import { StringParam, useQueryParams } from 'use-query-params';
8
7
  import { Loader } from '../../../components/Loader';
9
8
  import routes, { createHref } from '../../../routes';
10
9
  import { TENANT_DIAGNOSTICS_TABS_IDS } from '../../../store/reducers/tenant/constants';
@@ -35,9 +34,10 @@ function Diagnostics(props) {
35
34
  const dispatch = useTypedDispatch();
36
35
  const { currentSchemaPath, wasLoaded } = useTypedSelector((state) => state.schema);
37
36
  const { diagnosticsTab = TENANT_DIAGNOSTICS_TABS_IDS.overview } = useTypedSelector((state) => state.tenant);
38
- const location = useLocation();
39
- const queryParams = qs.parse(location.search, {
40
- ignoreQueryPrefix: true,
37
+ const [queryParams] = useQueryParams({
38
+ name: StringParam,
39
+ backend: StringParam,
40
+ clusterName: StringParam,
41
41
  });
42
42
  const { name: rootTenantName } = queryParams;
43
43
  const tenantName = isDatabaseEntityType(props.type) ? currentSchemaPath : rootTenantName;
@@ -4,6 +4,13 @@ type Page = {
4
4
  id: TenantDiagnosticsTab;
5
5
  title: string;
6
6
  };
7
+ export declare const ASYNC_REPLICATION_PAGES: ({
8
+ id: "overview";
9
+ title: string;
10
+ } | {
11
+ id: "describe";
12
+ title: string;
13
+ })[];
7
14
  export declare const DATABASE_PAGES: ({
8
15
  id: "overview";
9
16
  title: string;
@@ -52,6 +52,7 @@ const partitions = {
52
52
  id: TENANT_DIAGNOSTICS_TABS_IDS.partitions,
53
53
  title: 'Partitions',
54
54
  };
55
+ export const ASYNC_REPLICATION_PAGES = [overview, describe];
55
56
  export const DATABASE_PAGES = [
56
57
  overview,
57
58
  topQueries,
@@ -86,5 +87,6 @@ const pathTypeToPages = {
86
87
  [EPathType.EPathTypeExternalDataSource]: EXTERNAL_DATA_SOURCE_PAGES,
87
88
  [EPathType.EPathTypeExternalTable]: EXTERNAL_TABLE_PAGES,
88
89
  [EPathType.EPathTypeView]: VIEW_PAGES,
90
+ [EPathType.EPathTypeReplication]: ASYNC_REPLICATION_PAGES,
89
91
  };
90
92
  export const getPagesByType = (type) => (type && pathTypeToPages[type]) || DIR_PAGES;
@@ -1,14 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
+ import { Xmark } from '@gravity-ui/icons';
3
4
  import DataTable from '@gravity-ui/react-data-table';
5
+ import { Button, Card, Icon } from '@gravity-ui/uikit';
4
6
  import { ResponseError } from '../../../../components/Errors/ResponseError';
5
- import { Icon } from '../../../../components/Icon';
6
7
  import { ResizeableDataTable } from '../../../../components/ResizeableDataTable/ResizeableDataTable';
7
8
  import { setHotKeysData, setHotKeysDataWasNotLoaded, setHotKeysError, setHotKeysLoading, } from '../../../../store/reducers/hotKeys/hotKeys';
8
9
  import { cn } from '../../../../utils/cn';
9
- import { DEFAULT_TABLE_SETTINGS } from '../../../../utils/constants';
10
- import { useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
10
+ import { DEFAULT_TABLE_SETTINGS, IS_HOTKEYS_HELP_HIDDDEN_KEY } from '../../../../utils/constants';
11
+ import { useSetting, useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
11
12
  import i18n from './i18n';
13
+ import keyIcon from '../../../../assets/icons/key.svg';
12
14
  import './HotKeys.scss';
13
15
  const b = cn('ydb-hot-keys');
14
16
  const tableColumnsIds = {
@@ -18,12 +20,13 @@ const tableColumnsIds = {
18
20
  const getHotKeysColumns = (keyColumnsIds = []) => {
19
21
  const keysColumns = keyColumnsIds.map((col, index) => ({
20
22
  name: col,
21
- header: (_jsxs("div", { className: b('primary-key-column'), children: [_jsx(Icon, { name: "key", viewBox: "0 0 12 7", width: 12, height: 7 }), col] })),
23
+ header: (_jsxs("div", { className: b('primary-key-column'), children: [_jsx(Icon, { data: keyIcon, width: 12, height: 7 }), col] })),
22
24
  render: ({ row }) => row.keyValues[index],
23
25
  align: DataTable.RIGHT,
24
26
  sortable: false,
25
27
  }));
26
28
  return [
29
+ ...keysColumns,
27
30
  {
28
31
  name: tableColumnsIds.accessSample,
29
32
  header: 'Samples',
@@ -31,12 +34,12 @@ const getHotKeysColumns = (keyColumnsIds = []) => {
31
34
  align: DataTable.RIGHT,
32
35
  sortable: false,
33
36
  },
34
- ...keysColumns,
35
37
  ];
36
38
  };
37
39
  export function HotKeys({ path }) {
38
40
  var _a, _b, _c;
39
41
  const dispatch = useTypedDispatch();
42
+ const [helpHidden, setHelpHidden] = useSetting(IS_HOTKEYS_HELP_HIDDDEN_KEY);
40
43
  const collectSamplesTimerRef = React.useRef();
41
44
  const { loading, wasLoaded, data, error } = useTypedSelector((state) => state.hotKeys);
42
45
  const { loading: schemaLoading, data: schemaData } = useTypedSelector((state) => state.schema);
@@ -84,18 +87,27 @@ export function HotKeys({ path }) {
84
87
  };
85
88
  fetchData();
86
89
  }, [dispatch, path]);
87
- // It takes a while to collect hot keys. Display explicit status message, while collecting
88
- if ((loading && !wasLoaded) || schemaLoading) {
89
- return _jsx("div", { children: i18n('hot-keys-collecting') });
90
- }
91
- if (error) {
92
- return _jsx(ResponseError, { error: error });
93
- }
94
- if (!data) {
95
- return _jsx("div", { children: i18n('no-data') });
96
- }
97
- return (_jsx(ResizeableDataTable, { wrapperClassName: b('table'), columns: tableColumns, data: data, settings: DEFAULT_TABLE_SETTINGS, initialSortOrder: {
98
- columnId: tableColumnsIds.accessSample,
99
- order: DataTable.DESCENDING,
100
- } }));
90
+ const renderContent = () => {
91
+ // It takes a while to collect hot keys. Display explicit status message, while collecting
92
+ if ((loading && !wasLoaded) || schemaLoading) {
93
+ return _jsx("div", { children: i18n('hot-keys-collecting') });
94
+ }
95
+ if (error) {
96
+ return _jsx(ResponseError, { error: error });
97
+ }
98
+ if (!data) {
99
+ return _jsx("div", { children: i18n('no-data') });
100
+ }
101
+ return (_jsx(ResizeableDataTable, { wrapperClassName: b('table'), columns: tableColumns, data: data, settings: DEFAULT_TABLE_SETTINGS, initialSortOrder: {
102
+ columnId: tableColumnsIds.accessSample,
103
+ order: DataTable.DESCENDING,
104
+ } }));
105
+ };
106
+ const renderHelpCard = () => {
107
+ if (helpHidden) {
108
+ return null;
109
+ }
110
+ return (_jsxs(Card, { theme: "info", view: "filled", type: "container", className: b('help-card'), children: [i18n('help'), _jsx(Button, { className: b('help-card__close-button'), view: "flat", onClick: () => setHelpHidden(true), children: _jsx(Icon, { data: Xmark, size: 18 }) })] }));
111
+ };
112
+ return (_jsxs(React.Fragment, { children: [renderHelpCard(), renderContent()] }));
101
113
  }
@@ -1,13 +1,23 @@
1
1
  @import '../../../../styles/mixins.scss';
2
2
 
3
3
  .ydb-hot-keys {
4
- &__table {
5
- @include freeze-nth-column(1);
6
- }
7
-
8
4
  &__primary-key-column {
9
5
  display: flex;
10
6
  align-items: center;
11
7
  gap: 5px;
12
8
  }
9
+
10
+ &__help-card {
11
+ position: sticky;
12
+ left: 0;
13
+
14
+ margin-bottom: 20px;
15
+ padding: 20px 40px 20px 20px;
16
+
17
+ &__close-button {
18
+ position: absolute;
19
+ top: 5px;
20
+ right: 5px;
21
+ }
22
+ }
13
23
  }
@@ -1,4 +1,5 @@
1
1
  {
2
2
  "hot-keys-collecting": "Please wait a little while we are collecting hot keys samples...",
3
- "no-data": "No information about hot keys"
3
+ "no-data": "No information about hot keys",
4
+ "help": "Hot keys contains a list of table primary key values that are accessed most often. Sample is collected upon request to the tab during 5s time interval. Samples column indicates how many requests to the particular key value were registered during collection phase."
4
5
  }
@@ -1,2 +1,2 @@
1
- declare const _default: (key: "no-data" | "hot-keys-collecting", params?: import("@gravity-ui/i18n").Params | undefined) => string;
1
+ declare const _default: (key: "no-data" | "hot-keys-collecting" | "help", params?: import("@gravity-ui/i18n").Params | undefined) => string;
2
2
  export default _default;
@@ -1,9 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { Checkbox, Loader } from '@gravity-ui/uikit';
3
+ import { Checkbox, Icon, Loader } from '@gravity-ui/uikit';
4
4
  import { Link } from 'react-router-dom';
5
5
  import { ResponseError } from '../../../../components/Errors/ResponseError';
6
- import { Icon } from '../../../../components/Icon';
7
6
  import { Illustration } from '../../../../components/Illustration';
8
7
  import { ProblemFilter } from '../../../../components/ProblemFilter';
9
8
  import { networkApi } from '../../../../store/reducers/network/network';
@@ -14,6 +13,7 @@ import { useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
14
13
  import { getDefaultNodePath } from '../../../Node/NodePages';
15
14
  import { NodeNetwork } from './NodeNetwork/NodeNetwork';
16
15
  import { getConnectedNodesCount } from './utils';
16
+ import networkIcon from '../../../../assets/icons/network.svg';
17
17
  import './Network.scss';
18
18
  const b = cn('network');
19
19
  export function Network({ path }) {
@@ -47,7 +47,7 @@ export function Network({ path }) {
47
47
  setShowId(!showId);
48
48
  }, checked: showId, children: "ID" }) }), _jsx("div", { className: b('checkbox-wrapper'), children: _jsx(Checkbox, { onUpdate: () => {
49
49
  setShowRacks(!showRacks);
50
- }, checked: showRacks, children: "Racks" }) })] }) }), _jsx(Nodes, { nodes: nodesGroupedByType, showId: showId, showRacks: showRacks, clickedNode: clickedNode, onClickNode: setClickedNode })] }), _jsx("div", { className: b('right'), children: clickedNode ? (_jsxs("div", { children: [_jsxs("div", { className: b('label'), children: ["Connectivity of node", ' ', _jsx(Link, { className: b('link'), to: getDefaultNodePath(clickedNode.NodeId), children: clickedNode.NodeId }), ' ', "to other nodes"] }), _jsx("div", { className: b('nodes-row'), children: _jsx(Nodes, { nodes: rightNodes, isRight: true, showId: showId, showRacks: showRacks, clickedNode: clickedNode, onClickNode: setClickedNode }) })] })) : (_jsxs("div", { className: b('placeholder'), children: [_jsx("div", { className: b('placeholder-img'), children: _jsx(Icon, { name: "network-placeholder", viewBox: "0 0 221 204", width: 221, height: 204 }) }), _jsx("div", { className: b('placeholder-text'), children: "Select node to see its connectivity to other nodes" })] })) })] }) }) }));
50
+ }, checked: showRacks, children: "Racks" }) })] }) }), _jsx(Nodes, { nodes: nodesGroupedByType, showId: showId, showRacks: showRacks, clickedNode: clickedNode, onClickNode: setClickedNode })] }), _jsx("div", { className: b('right'), children: clickedNode ? (_jsxs("div", { children: [_jsxs("div", { className: b('label'), children: ["Connectivity of node", ' ', _jsx(Link, { className: b('link'), to: getDefaultNodePath(clickedNode.NodeId), children: clickedNode.NodeId }), ' ', "to other nodes"] }), _jsx("div", { className: b('nodes-row'), children: _jsx(Nodes, { nodes: rightNodes, isRight: true, showId: showId, showRacks: showRacks, clickedNode: clickedNode, onClickNode: setClickedNode }) })] })) : (_jsxs("div", { className: b('placeholder'), children: [_jsx("div", { className: b('placeholder-img'), children: _jsx(Icon, { data: networkIcon, width: 221, height: 204 }) }), _jsx("div", { className: b('placeholder-text'), children: "Select node to see its connectivity to other nodes" })] })) })] }) }) }));
51
51
  }
52
52
  function Nodes({ nodes, isRight, showId, showRacks, clickedNode, onClickNode }) {
53
53
  const filter = useTypedSelector(selectProblemFilter);
@@ -0,0 +1,7 @@
1
+ import type { TEvDescribeSchemeResult } from '../../../../../types/api/schema';
2
+ interface AsyncReplicationProps {
3
+ data?: TEvDescribeSchemeResult;
4
+ }
5
+ /** Displays overview for Replication EPathType */
6
+ export declare function AsyncReplicationInfo({ data }: AsyncReplicationProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,39 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Flex, Text } from '@gravity-ui/uikit';
3
+ import { AsyncReplicationState } from '../../../../../components/AsyncReplicationState';
4
+ import { InfoViewer } from '../../../../../components/InfoViewer';
5
+ import { useTypedSelector } from '../../../../../utils/hooks';
6
+ import { getEntityName } from '../../../utils';
7
+ import { AsyncReplicationPaths } from '../AsyncReplicationPaths';
8
+ import { Credentials } from './Credentials';
9
+ import i18n from './i18n';
10
+ /** Displays overview for Replication EPathType */
11
+ export function AsyncReplicationInfo({ data }) {
12
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
13
+ const entityName = getEntityName(data === null || data === void 0 ? void 0 : data.PathDescription);
14
+ const { error: schemaError } = useTypedSelector((state) => state.schema);
15
+ if (schemaError) {
16
+ return _jsx("div", { className: "error", children: schemaError.statusText });
17
+ }
18
+ if (!data) {
19
+ return (_jsxs("div", { className: "error", children: [i18n('noData'), " ", entityName] }));
20
+ }
21
+ return (_jsxs(Flex, { direction: "column", gap: "4", children: [_jsx(InfoViewer, { title: entityName, info: [
22
+ {
23
+ label: i18n('state.label'),
24
+ value: (_jsx(AsyncReplicationState, { state: (_b = (_a = data.PathDescription) === null || _a === void 0 ? void 0 : _a.ReplicationDescription) === null || _b === void 0 ? void 0 : _b.State })),
25
+ },
26
+ {
27
+ label: i18n('srcConnection.endpoint.label'),
28
+ value: (_jsx(Text, { variant: "code-inline-2", children: (_f = (_e = (_d = (_c = data.PathDescription) === null || _c === void 0 ? void 0 : _c.ReplicationDescription) === null || _d === void 0 ? void 0 : _d.Config) === null || _e === void 0 ? void 0 : _e.SrcConnectionParams) === null || _f === void 0 ? void 0 : _f.Endpoint })),
29
+ },
30
+ {
31
+ label: i18n('srcConnection.database.label'),
32
+ value: (_jsx(Text, { variant: "code-inline-2", children: (_k = (_j = (_h = (_g = data.PathDescription) === null || _g === void 0 ? void 0 : _g.ReplicationDescription) === null || _h === void 0 ? void 0 : _h.Config) === null || _j === void 0 ? void 0 : _j.SrcConnectionParams) === null || _k === void 0 ? void 0 : _k.Database })),
33
+ },
34
+ {
35
+ label: i18n('credentials.label'),
36
+ value: (_jsx(Credentials, { connection: (_o = (_m = (_l = data.PathDescription) === null || _l === void 0 ? void 0 : _l.ReplicationDescription) === null || _m === void 0 ? void 0 : _m.Config) === null || _o === void 0 ? void 0 : _o.SrcConnectionParams })),
37
+ },
38
+ ] }), _jsx(AsyncReplicationPaths, { config: (_q = (_p = data.PathDescription) === null || _p === void 0 ? void 0 : _p.ReplicationDescription) === null || _q === void 0 ? void 0 : _q.Config })] }));
39
+ }
@@ -0,0 +1,6 @@
1
+ import type { TConnectionParams } from '../../../../../types/api/schema/replication';
2
+ interface CredentialsProps {
3
+ connection?: TConnectionParams;
4
+ }
5
+ export declare function Credentials({ connection }: CredentialsProps): "unknown" | import("react/jsx-runtime").JSX.Element | "OAuth" | null;
6
+ export {};