ydb-embedded-ui 6.33.0 → 6.35.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/dist/components/ConfirmationDialog/ConfirmationDialog.d.ts +21 -0
  2. package/dist/components/ConfirmationDialog/ConfirmationDialog.js +31 -0
  3. package/dist/components/ConfirmationDialog/ConfirmationDialog.js.map +1 -0
  4. package/dist/components/ConfirmationDialog/ConfirmationDialog.scss +6 -0
  5. package/dist/components/ConfirmationDialog/i18n/en.json +3 -0
  6. package/dist/components/ConfirmationDialog/i18n/index.d.ts +1 -0
  7. package/dist/components/ConfirmationDialog/i18n/index.js +5 -0
  8. package/dist/components/ConfirmationDialog/i18n/index.js.map +1 -0
  9. package/dist/components/EntityStatus/EntityStatus.js +1 -1
  10. package/dist/components/EntityStatus/EntityStatus.js.map +1 -1
  11. package/dist/components/MemoryViewer/MemoryViewer.d.ts +14 -0
  12. package/dist/components/MemoryViewer/MemoryViewer.js +84 -0
  13. package/dist/components/MemoryViewer/MemoryViewer.js.map +1 -0
  14. package/dist/components/MemoryViewer/MemoryViewer.scss +104 -0
  15. package/dist/components/MemoryViewer/i18n/en.json +11 -0
  16. package/dist/components/MemoryViewer/i18n/index.d.ts +2 -0
  17. package/dist/components/MemoryViewer/i18n/index.js +5 -0
  18. package/dist/components/MemoryViewer/i18n/index.js.map +1 -0
  19. package/dist/components/MemoryViewer/utils.d.ts +10 -0
  20. package/dist/components/MemoryViewer/utils.js +71 -0
  21. package/dist/components/MemoryViewer/utils.js.map +1 -0
  22. package/dist/components/NodeHostWrapper/NodeHostWrapper.d.ts +5 -3
  23. package/dist/components/NodeHostWrapper/NodeHostWrapper.js +3 -2
  24. package/dist/components/NodeHostWrapper/NodeHostWrapper.js.map +1 -1
  25. package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
  26. package/dist/components/ProgressViewer/ProgressViewer.d.ts +1 -1
  27. package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
  28. package/dist/components/nodesColumns/__test__/utils.test.d.ts +1 -0
  29. package/dist/components/nodesColumns/__test__/utils.test.js +28 -0
  30. package/dist/components/nodesColumns/__test__/utils.test.js.map +1 -0
  31. package/dist/components/nodesColumns/columns.d.ts +32 -9
  32. package/dist/components/nodesColumns/columns.js +91 -21
  33. package/dist/components/nodesColumns/columns.js.map +1 -1
  34. package/dist/components/nodesColumns/constants.d.ts +16 -5
  35. package/dist/components/nodesColumns/constants.js +114 -11
  36. package/dist/components/nodesColumns/constants.js.map +1 -1
  37. package/dist/components/nodesColumns/i18n/en.json +18 -5
  38. package/dist/components/nodesColumns/i18n/index.d.ts +1 -1
  39. package/dist/components/nodesColumns/utils.d.ts +2 -0
  40. package/dist/components/nodesColumns/utils.js +11 -0
  41. package/dist/components/nodesColumns/utils.js.map +1 -0
  42. package/dist/containers/App/App.d.ts +1 -1
  43. package/dist/containers/App/Providers.js +2 -1
  44. package/dist/containers/App/Providers.js.map +1 -1
  45. package/dist/containers/AsideNavigation/AsideNavigation.d.ts +2 -0
  46. package/dist/containers/AsideNavigation/AsideNavigation.js +2 -1
  47. package/dist/containers/AsideNavigation/AsideNavigation.js.map +1 -1
  48. package/dist/containers/Clusters/constants.d.ts +1 -1
  49. package/dist/containers/Nodes/Nodes.js +2 -2
  50. package/dist/containers/Nodes/Nodes.js.map +1 -1
  51. package/dist/containers/Nodes/NodesControls/NodesControls.d.ts +3 -1
  52. package/dist/containers/Nodes/NodesControls/NodesControls.js +3 -3
  53. package/dist/containers/Nodes/NodesControls/NodesControls.js.map +1 -1
  54. package/dist/containers/Nodes/PaginatedNodes.d.ts +11 -3
  55. package/dist/containers/Nodes/PaginatedNodes.js +16 -19
  56. package/dist/containers/Nodes/PaginatedNodes.js.map +1 -1
  57. package/dist/containers/Nodes/columns/columns.js +2 -2
  58. package/dist/containers/Nodes/columns/columns.js.map +1 -1
  59. package/dist/containers/Nodes/columns/constants.d.ts +3 -2
  60. package/dist/containers/Nodes/columns/constants.js +10 -10
  61. package/dist/containers/Nodes/columns/constants.js.map +1 -1
  62. package/dist/containers/Nodes/getNodes.js +4 -5
  63. package/dist/containers/Nodes/getNodes.js.map +1 -1
  64. package/dist/containers/Nodes/useNodesPageQueryParams.d.ts +3 -2
  65. package/dist/containers/Nodes/useNodesPageQueryParams.js +2 -2
  66. package/dist/containers/Nodes/useNodesPageQueryParams.js.map +1 -1
  67. package/dist/containers/Storage/StorageGroups/columns/columns.js +3 -3
  68. package/dist/containers/Storage/StorageGroups/columns/columns.js.map +1 -1
  69. package/dist/containers/Storage/StorageGroups/columns/constants.d.ts +3 -7
  70. package/dist/containers/Storage/StorageGroups/columns/constants.js +54 -10
  71. package/dist/containers/Storage/StorageGroups/columns/constants.js.map +1 -1
  72. package/dist/containers/Storage/StorageGroups/getGroups.js +3 -5
  73. package/dist/containers/Storage/StorageGroups/getGroups.js.map +1 -1
  74. package/dist/containers/Storage/StorageNodes/columns/columns.js +2 -3
  75. package/dist/containers/Storage/StorageNodes/columns/columns.js.map +1 -1
  76. package/dist/containers/Storage/StorageNodes/columns/constants.js +2 -2
  77. package/dist/containers/Storage/StorageNodes/columns/constants.js.map +1 -1
  78. package/dist/containers/Storage/StorageNodes/getNodes.js +4 -5
  79. package/dist/containers/Storage/StorageNodes/getNodes.js.map +1 -1
  80. package/dist/containers/Storage/utils/index.d.ts +1 -1
  81. package/dist/containers/Tablets/i18n/index.d.ts +1 -1
  82. package/dist/containers/Tenant/Diagnostics/Diagnostics.js +2 -2
  83. package/dist/containers/Tenant/Diagnostics/Diagnostics.js.map +1 -1
  84. package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/columns.d.ts +4 -0
  85. package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/columns.js +23 -0
  86. package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/columns.js.map +1 -0
  87. package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/constants.d.ts +5 -0
  88. package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/constants.js +23 -0
  89. package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/constants.js.map +1 -0
  90. package/dist/containers/Tenant/Diagnostics/Network/NetworkWrapper.d.ts +6 -0
  91. package/dist/containers/Tenant/Diagnostics/Network/NetworkWrapper.js +26 -0
  92. package/dist/containers/Tenant/Diagnostics/Network/NetworkWrapper.js.map +1 -0
  93. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +1 -1
  94. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js.map +1 -1
  95. package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.d.ts +2 -2
  96. package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.js +3 -2
  97. package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.js.map +1 -1
  98. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +3 -1
  99. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js.map +1 -1
  100. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js +2 -7
  101. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js.map +1 -1
  102. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
  103. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +3 -1
  104. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js.map +1 -1
  105. package/dist/containers/Tenant/ObjectSummary/SchemaTree/SchemaTree.js +5 -1
  106. package/dist/containers/Tenant/ObjectSummary/SchemaTree/SchemaTree.js.map +1 -1
  107. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +5 -2
  108. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js.map +1 -1
  109. package/dist/containers/Tenant/Query/ExecuteResult/PlanToSvgButton.d.ts +7 -0
  110. package/dist/containers/Tenant/Query/ExecuteResult/PlanToSvgButton.js +40 -0
  111. package/dist/containers/Tenant/Query/ExecuteResult/PlanToSvgButton.js.map +1 -0
  112. package/dist/containers/Tenant/Query/ExecuteResult/TraceButton.js +1 -1
  113. package/dist/containers/Tenant/Query/ExecuteResult/TraceButton.js.map +1 -1
  114. package/dist/containers/Tenant/Query/ExecuteResult/i18n/en.json +4 -1
  115. package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.d.ts +1 -1
  116. package/dist/containers/Tenant/Query/NewSQL/NewSQL.js +8 -7
  117. package/dist/containers/Tenant/Query/NewSQL/NewSQL.js.map +1 -1
  118. package/dist/containers/Tenant/Query/NewSQL/i18n/en.json +1 -2
  119. package/dist/containers/Tenant/Query/NewSQL/i18n/index.d.ts +1 -1
  120. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js +3 -1
  121. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js.map +1 -1
  122. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +2 -27
  123. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +47 -52
  124. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js.map +1 -1
  125. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +1 -1
  126. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js.map +1 -1
  127. package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.d.ts +18 -3
  128. package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.js +41 -15
  129. package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.js.map +1 -1
  130. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js +8 -3
  131. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js.map +1 -1
  132. package/dist/containers/Tenant/utils/newSQLQueryActions.d.ts +1 -2
  133. package/dist/containers/Tenant/utils/newSQLQueryActions.js +2 -4
  134. package/dist/containers/Tenant/utils/newSQLQueryActions.js.map +1 -1
  135. package/dist/containers/Tenant/utils/schemaActions.d.ts +1 -0
  136. package/dist/containers/Tenant/utils/schemaActions.js +61 -41
  137. package/dist/containers/Tenant/utils/schemaActions.js.map +1 -1
  138. package/dist/containers/Tenant/utils/schemaQueryTemplates.js +87 -54
  139. package/dist/containers/Tenant/utils/schemaQueryTemplates.js.map +1 -1
  140. package/dist/containers/UserSettings/i18n/en.json +3 -0
  141. package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
  142. package/dist/containers/UserSettings/settings.d.ts +2 -0
  143. package/dist/containers/UserSettings/settings.js +11 -2
  144. package/dist/containers/UserSettings/settings.js.map +1 -1
  145. package/dist/services/api.d.ts +4 -0
  146. package/dist/services/api.js +11 -0
  147. package/dist/services/api.js.map +1 -1
  148. package/dist/services/settings.d.ts +2 -0
  149. package/dist/services/settings.js +3 -1
  150. package/dist/services/settings.js.map +1 -1
  151. package/dist/store/configureStore.d.ts +37 -15
  152. package/dist/store/defaultStore.d.ts +18 -7
  153. package/dist/store/reducers/capabilities/capabilities.d.ts +72 -16
  154. package/dist/store/reducers/capabilities/hooks.d.ts +1 -0
  155. package/dist/store/reducers/capabilities/hooks.js +3 -0
  156. package/dist/store/reducers/capabilities/hooks.js.map +1 -1
  157. package/dist/store/reducers/cluster/cluster.d.ts +54 -12
  158. package/dist/store/reducers/executeQuery.d.ts +41 -51
  159. package/dist/store/reducers/executeQuery.js +64 -160
  160. package/dist/store/reducers/executeQuery.js.map +1 -1
  161. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +180 -40
  162. package/dist/store/reducers/index.d.ts +28 -13
  163. package/dist/store/reducers/node/selectors.d.ts +9 -2
  164. package/dist/store/reducers/nodes/types.d.ts +13 -0
  165. package/dist/store/reducers/nodes/utils.d.ts +1 -1
  166. package/dist/store/reducers/nodes/utils.js +3 -3
  167. package/dist/store/reducers/nodes/utils.js.map +1 -1
  168. package/dist/store/reducers/nodesList.d.ts +9 -2
  169. package/dist/store/reducers/partitions/partitions.d.ts +4 -3
  170. package/dist/store/reducers/partitions/partitions.js +1 -3
  171. package/dist/store/reducers/partitions/partitions.js.map +1 -1
  172. package/dist/store/reducers/partitions/types.d.ts +0 -3
  173. package/dist/store/reducers/planToSvg.d.ts +8 -0
  174. package/dist/store/reducers/planToSvg.js +21 -0
  175. package/dist/store/reducers/planToSvg.js.map +1 -0
  176. package/dist/store/reducers/queryActions/queryActions.d.ts +0 -27
  177. package/dist/store/reducers/queryActions/queryActions.js +1 -1
  178. package/dist/store/reducers/queryActions/queryActions.js.map +1 -1
  179. package/dist/store/reducers/queryActions/types.d.ts +1 -1
  180. package/dist/store/reducers/schema/schema.d.ts +22 -7
  181. package/dist/store/reducers/schema/schema.js +16 -20
  182. package/dist/store/reducers/schema/schema.js.map +1 -1
  183. package/dist/store/reducers/tablets.d.ts +45 -10
  184. package/dist/store/reducers/tenantOverview/topShards/utils.d.ts +1 -1
  185. package/dist/store/reducers/tenants/selectors.d.ts +81 -18
  186. package/dist/store/reducers/tooltip.d.ts +1 -1
  187. package/dist/store/reducers/topic.d.ts +135 -30
  188. package/dist/store/reducers/trace.d.ts +1 -1
  189. package/dist/store/reducers/trace.js +1 -1
  190. package/dist/store/reducers/trace.js.map +1 -1
  191. package/dist/types/api/nodes.d.ts +74 -4
  192. package/dist/types/api/nodes.js.map +1 -1
  193. package/dist/types/store/executeQuery.d.ts +3 -6
  194. package/dist/types/store/executeQuery.js.map +1 -1
  195. package/dist/utils/constants.d.ts +2 -0
  196. package/dist/utils/constants.js +2 -0
  197. package/dist/utils/constants.js.map +1 -1
  198. package/dist/utils/dataFormatters/dataFormatters.d.ts +1 -1
  199. package/dist/utils/dataFormatters/dataFormatters.js +12 -6
  200. package/dist/utils/dataFormatters/dataFormatters.js.map +1 -1
  201. package/dist/utils/hooks/withConfirmation/i18n/en.json +4 -0
  202. package/dist/utils/hooks/withConfirmation/i18n/index.d.ts +2 -0
  203. package/dist/utils/hooks/withConfirmation/i18n/index.js +5 -0
  204. package/dist/utils/hooks/withConfirmation/i18n/index.js.map +1 -0
  205. package/dist/utils/hooks/withConfirmation/useChangeInputWithConfirmation.d.ts +3 -0
  206. package/dist/utils/hooks/withConfirmation/useChangeInputWithConfirmation.js +57 -0
  207. package/dist/utils/hooks/withConfirmation/useChangeInputWithConfirmation.js.map +1 -0
  208. package/dist/utils/monaco/insertSnippet.d.ts +1 -0
  209. package/dist/utils/monaco/insertSnippet.js +8 -0
  210. package/dist/utils/monaco/insertSnippet.js.map +1 -0
  211. package/dist/utils/nodes.d.ts +1 -4
  212. package/dist/utils/nodes.js +0 -36
  213. package/dist/utils/nodes.js.map +1 -1
  214. package/dist/utils/query.d.ts +1 -1
  215. package/dist/utils/storage.d.ts +1 -3
  216. package/dist/utils/storage.js +0 -17
  217. package/dist/utils/storage.js.map +1 -1
  218. package/dist/utils/timeParsers/parsers.d.ts +1 -1
  219. package/dist/utils/timeParsers/parsers.js +3 -2
  220. package/dist/utils/timeParsers/parsers.js.map +1 -1
  221. package/package.json +2 -1
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import * as NiceModal from '@ebay/nice-modal-react';
3
+ import type { ButtonView, DialogFooterProps } from '@gravity-ui/uikit';
4
+ import './ConfirmationDialog.scss';
5
+ interface CommonDialogProps {
6
+ caption?: string;
7
+ message?: React.ReactNode;
8
+ body?: React.ReactNode;
9
+ progress?: boolean;
10
+ textButtonCancel?: string;
11
+ textButtonApply?: string;
12
+ buttonApplyView?: ButtonView;
13
+ className?: string;
14
+ onConfirm?: () => void;
15
+ }
16
+ interface ConfirmationDialogNiceModalProps extends CommonDialogProps, DialogFooterProps {
17
+ onClose?: () => void;
18
+ }
19
+ export declare const CONFIRMATION_DIALOG = "confirmation-dialog";
20
+ export declare const ConfirmationDialogNiceModal: React.FC<ConfirmationDialogNiceModalProps & NiceModal.NiceModalHocProps>;
21
+ export {};
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as NiceModal from '@ebay/nice-modal-react';
3
+ import { Dialog } from '@gravity-ui/uikit';
4
+ import { cn } from '../../utils/cn';
5
+ import { confirmationDialogKeyset } from './i18n';
6
+ import './ConfirmationDialog.scss';
7
+ const block = cn('confirmation-dialog');
8
+ export const CONFIRMATION_DIALOG = 'confirmation-dialog';
9
+ function ConfirmationDialog({ caption = '', children, onConfirm, onClose, progress, textButtonApply, textButtonCancel, buttonApplyView = 'normal', className, renderButtons, open, }) {
10
+ return (_jsxs(Dialog, { className: block(null, className), size: "s", onClose: onClose, disableOutsideClick: true, open: open, children: [_jsx(Dialog.Header, { caption: _jsx("span", { className: block('caption'), children: caption }) }), _jsx(Dialog.Body, { children: children }), _jsx(Dialog.Footer, { onClickButtonApply: onConfirm, propsButtonApply: { view: buttonApplyView }, textButtonApply: textButtonApply, textButtonCancel: textButtonCancel !== null && textButtonCancel !== void 0 ? textButtonCancel : confirmationDialogKeyset('action_cancel'), onClickButtonCancel: onClose, loading: progress, renderButtons: renderButtons })] }));
11
+ }
12
+ export const ConfirmationDialogNiceModal = NiceModal.create((props) => {
13
+ const modal = NiceModal.useModal();
14
+ const handleClose = () => {
15
+ modal.hide();
16
+ modal.remove();
17
+ };
18
+ return (_jsx(ConfirmationDialog, { ...props, onConfirm: async () => {
19
+ var _a;
20
+ await ((_a = props.onConfirm) === null || _a === void 0 ? void 0 : _a.call(props));
21
+ modal.resolve(true);
22
+ handleClose();
23
+ }, onClose: () => {
24
+ var _a;
25
+ (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
26
+ modal.resolve(false);
27
+ handleClose();
28
+ }, open: modal.visible }));
29
+ });
30
+ NiceModal.register(CONFIRMATION_DIALOG, ConfirmationDialogNiceModal);
31
+ //# sourceMappingURL=ConfirmationDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfirmationDialog.js","sourceRoot":"","sources":["../../../src/components/ConfirmationDialog/ConfirmationDialog.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAEzC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CAAC;IAEnC,MAAM,WAAW,GAAG,GAAG,EAAE;QACrB,KAAK,CAAC,IAAI,EAAE,CAAC;QACb,KAAK,CAAC,MAAM,EAAE,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO,CACH,KAAC,kBAAkB,OACX,KAAK,EACT,SAAS,EAAE,KAAK,IAAI,EAAE;;YAClB,MAAM,CAAA,MAAA,KAAK,CAAC,SAAS,qDAAI,CAAA,CAAC;YAC1B,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACpB,WAAW,EAAE,CAAC;QAClB,CAAC,EACD,OAAO,EAAE,GAAG,EAAE;;YACV,MAAA,KAAK,CAAC,OAAO,qDAAI,CAAC;YAClB,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACrB,WAAW,EAAE,CAAC;QAClB,CAAC,EACD,IAAI,EAAE,KAAK,CAAC,OAAO,GACrB,CACL,CAAC;AACN,CAAC,CACJ,CAAC;AAEF,SAAS,CAAC,QAAQ,CAAC,mBAAmB,EAAE,2BAA2B,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ .confirmation-dialog {
2
+ &__message,
3
+ &__caption {
4
+ white-space: pre-wrap;
5
+ }
6
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "action_cancel": "Cancel"
3
+ }
@@ -0,0 +1 @@
1
+ export declare const confirmationDialogKeyset: (key: "action_cancel", params?: import("@gravity-ui/i18n").Params) => string;
@@ -0,0 +1,5 @@
1
+ import { registerKeysets } from '../../../utils/i18n';
2
+ import en from './en.json';
3
+ const COMPONENT = 'ydb-confirmation-dialog';
4
+ export const confirmationDialogKeyset = registerKeysets(COMPONENT, { en });
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ConfirmationDialog/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,MAAM,WAAW,CAAC;AAE3B,MAAM,SAAS,GAAG,yBAAyB,CAAC;AAE5C,MAAM,CAAC,MAAM,wBAAwB,GAAG,eAAe,CAAC,SAAS,EAAE,EAAC,EAAE,EAAC,CAAC,CAAC"}
@@ -25,7 +25,7 @@ export function EntityStatus({ status = EFlag.Grey, name = '', label, path, icon
25
25
  }
26
26
  return name && _jsx("span", { className: b('name'), children: name });
27
27
  };
28
- return (_jsxs("div", { className: b(null, className), title: name, children: [iconPath ? renderStatusLink(iconPath) : renderIcon(), label && (_jsx("span", { title: label, className: b('label', { size, state: status.toLowerCase() }), children: label })), (path || name) && (_jsxs("div", { className: b('wrapper', { 'with-button': hasClipboardButton }), children: [_jsx("span", { className: b('link', { 'with-left-trim': withLeftTrim }), children: renderLink() }), hasClipboardButton && (_jsx("div", { className: b('controls-wrapper', {
28
+ return (_jsxs("div", { className: b(null, className), children: [iconPath ? renderStatusLink(iconPath) : renderIcon(), label && (_jsx("span", { title: label, className: b('label', { size, state: status.toLowerCase() }), children: label })), (path || name) && (_jsxs("div", { className: b('wrapper', { 'with-button': hasClipboardButton }), children: [_jsx("span", { className: b('link', { 'with-left-trim': withLeftTrim }), title: name, children: renderLink() }), hasClipboardButton && (_jsx("div", { className: b('controls-wrapper', {
29
29
  visible: clipboardButtonAlwaysVisible,
30
30
  }), children: _jsx(ClipboardButton, { text: name, size: "xs", view: "normal", className: b('clipboard-button', {
31
31
  visible: clipboardButtonAlwaysVisible,
@@ -1 +1 @@
1
- {"version":3,"file":"EntityStatus.js","sourceRoot":"","sources":["../../../src/components/EntityStatus/EntityStatus.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,eAAe,EAAE,IAAI,IAAI,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAErE,OAAO,EAAC,KAAK,EAAC,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAC,YAAY,EAAC,MAAM,8BAA8B,CAAC;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,14 @@
1
+ import type { TMemoryStats } from '../../types/api/nodes';
2
+ import type { FormatProgressViewerValues } from '../ProgressViewer/ProgressViewer';
3
+ import './MemoryViewer.scss';
4
+ export interface MemoryProgressViewerProps {
5
+ stats: TMemoryStats;
6
+ className?: string;
7
+ warningThreshold?: number;
8
+ value?: number | string;
9
+ capacity?: number | string;
10
+ formatValues: FormatProgressViewerValues;
11
+ percents?: boolean;
12
+ dangerThreshold?: number;
13
+ }
14
+ export declare function MemoryViewer({ stats, value, capacity, percents, formatValues, className, warningThreshold, dangerThreshold, }: MemoryProgressViewerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,84 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { DefinitionList, useTheme } from '@gravity-ui/uikit';
3
+ import { formatBytes } from '../../utils/bytesParsers';
4
+ import { cn } from '../../utils/cn';
5
+ import { GIGABYTE } from '../../utils/constants';
6
+ import { calculateProgressStatus } from '../../utils/progress';
7
+ import { isNumeric } from '../../utils/utils';
8
+ import { HoverPopup } from '../HoverPopup/HoverPopup';
9
+ import { ProgressViewer } from '../ProgressViewer/ProgressViewer';
10
+ import { getMemorySegments } from './utils';
11
+ import './MemoryViewer.scss';
12
+ const MIN_VISIBLE_MEMORY_SHARE = 1;
13
+ const MIN_VISIBLE_MEMORY_VALUE = 0.01 * GIGABYTE;
14
+ const b = cn('memory-viewer');
15
+ const formatDetailedValues = (value, total) => {
16
+ return [
17
+ formatBytes({
18
+ value,
19
+ size: 'gb',
20
+ withSizeLabel: false,
21
+ precision: 2,
22
+ }),
23
+ formatBytes({
24
+ value: total,
25
+ size: 'gb',
26
+ withSizeLabel: true,
27
+ precision: 1,
28
+ }),
29
+ ];
30
+ };
31
+ export function MemoryViewer({ stats, value, capacity, percents, formatValues, className, warningThreshold = 60, dangerThreshold = 80, }) {
32
+ const theme = useTheme();
33
+ let fillWidth = Math.round((parseFloat(String(value)) / parseFloat(String(capacity))) * 100) || 0;
34
+ fillWidth = fillWidth > 100 ? 100 : fillWidth;
35
+ let valueText = value, capacityText = capacity, divider = '/';
36
+ if (percents) {
37
+ valueText = fillWidth + '%';
38
+ capacityText = '';
39
+ divider = '';
40
+ }
41
+ else if (formatValues) {
42
+ [valueText, capacityText] = formatValues(Number(value), Number(capacity));
43
+ }
44
+ const renderContent = () => {
45
+ if (isNumeric(capacity)) {
46
+ return `${valueText} ${divider} ${capacityText}`;
47
+ }
48
+ return valueText;
49
+ };
50
+ const calculateMemoryShare = (segmentSize) => {
51
+ if (!value) {
52
+ return 0;
53
+ }
54
+ return (segmentSize / parseFloat(String(capacity))) * 100;
55
+ };
56
+ const memorySegments = getMemorySegments(stats);
57
+ const status = calculateProgressStatus({
58
+ fillWidth,
59
+ warningThreshold,
60
+ dangerThreshold,
61
+ colorizeProgress: true,
62
+ });
63
+ let currentPosition = 0;
64
+ return (_jsx(HoverPopup, { popupContent: _jsx(DefinitionList, { responsive: true, children: memorySegments.map(({ label, value: segmentSize, capacity: segmentCapacity, key }) => (_jsx(DefinitionList.Item, { name: _jsxs("div", { className: b('container'), children: [_jsx("div", { className: b('legend', { type: key }) }), _jsx("div", { className: b('name'), children: label })] }), children: segmentCapacity ? (_jsx(ProgressViewer, { value: segmentSize, capacity: segmentCapacity, formatValues: formatDetailedValues, colorizeProgress: true })) : (formatBytes({
65
+ value: segmentSize,
66
+ size: 'gb',
67
+ withSizeLabel: true,
68
+ precision: 2,
69
+ })) }, label))) }), children: _jsx("div", { className: b({ theme, status }, className), children: _jsxs("div", { className: b('progress-container'), children: [memorySegments
70
+ .filter(({ isInfo }) => !isInfo)
71
+ .map((segment) => {
72
+ if (segment.value < MIN_VISIBLE_MEMORY_VALUE) {
73
+ return null;
74
+ }
75
+ const currentMemoryShare = Math.max(calculateMemoryShare(segment.value), MIN_VISIBLE_MEMORY_SHARE);
76
+ const position = currentPosition;
77
+ currentPosition += currentMemoryShare;
78
+ return (_jsx("div", { className: b('segment', { type: segment.key }), style: {
79
+ width: `${currentMemoryShare}%`,
80
+ left: `${position}%`,
81
+ } }, segment.key));
82
+ }), _jsx("div", { className: b('text'), children: renderContent() })] }) }) }));
83
+ }
84
+ //# sourceMappingURL=MemoryViewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MemoryViewer.js","sourceRoot":"","sources":["../../../src/components/MemoryViewer/MemoryViewer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,cAAc,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAG3D,OAAO,EAAC,WAAW,EAAC,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAC,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAC,uBAAuB,EAAC,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAC,cAAc,EAAC,MAAM,kCAAkC,CAAC;AAEhE,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAE1C,OAAO,qBAAqB,CAAC;AAE7B,MAAM,wBAAwB,GAAG,CAAC,CAAC;AACnC,MAAM,wBAAwB,GAAG,IAAI,GAAG,QAAQ,CAAC;AAEjD,MAAM,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC;AAE9B,MAAM,oBAAoB,GAA+B,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;IACtE,OAAO;QACH,WAAW,CAAC;YACR,KAAK;YACL,IAAI,EAAE,IAAI;YACV,aAAa,EAAE,KAAK;YACpB,SAAS,EAAE,CAAC;SACf,CAAC;QACF,WAAW,CAAC;YACR,KAAK,EAAE,KAAK;YACZ,IAAI,EAAE,IAAI;YACV,aAAa,EAAE,IAAI;YACnB,SAAS,EAAE,CAAC;SACf,CAAC;KACL,CAAC;AACN,CAAC,CAAC;AA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BACV,MAAM,CAAC,CAAC,EAAC,MAAM,EAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC;yBAC7B,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;wBACb,IAAI,OAAO,CAAC,KAAK,GAAG,wBAAwB,EAAE,CAAC;4BAC3C,OAAO,IAAI,CAAC;wBAChB,CAAC;wBAED,MAAM,kBAAkB,GAAG,IAAI,CAAC,GAAG,CAC/B,oBAAoB,CAAC,OAAO,CAAC,KAAK,CAAC,EACnC,wBAAwB,CAC3B,CAAC;wBACF,MAAM,QAAQ,GAAG,eAAe,CAAC;wBACjC,eAAe,IAAI,kBAAkB,CAAC;wBAEtC,OAAO,CACH,cAEI,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,EAAC,IAAI,EAAE,OAAO,CAAC,GAAG,EAAC,CAAC,EAC5C,KAAK,EAAE;gCACH,KAAK,EAAE,GAAG,kBAAkB,GAAG;gCAC/B,IAAI,EAAE,GAAG,QAAQ,GAAG;6BACvB,IALI,OAAO,CAAC,GAAG,CAMlB,CACL,CAAC;oBACN,CAAC,CAAC,EACN,cAAK,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,YAAG,aAAa,EAAE,GAAO,IAChD,GACJ,GACG,CAChB,CAAC;AACN,CAAC"}
@@ -0,0 +1,104 @@
1
+ @import '../../styles/mixins.scss';
2
+
3
+ $memory-type-colors: (
4
+ 'AllocatorCachesMemory': var(--g-color-base-utility-medium-hover),
5
+ 'SharedCacheConsumption': var(--g-color-base-info-medium-hover),
6
+ 'MemTableConsumption': var(--g-color-base-warning-medium-hover),
7
+ 'QueryExecutionConsumption': var(--g-color-base-positive-medium-hover),
8
+ 'Other': var(--g-color-base-neutral-light-hover),
9
+ );
10
+
11
+ @mixin memory-type-color($type) {
12
+ background-color: map-get($memory-type-colors, $type);
13
+ }
14
+
15
+ .memory-viewer {
16
+ $block: &;
17
+
18
+ position: relative;
19
+ z-index: 0;
20
+
21
+ min-width: 150px;
22
+ padding: 0 var(--g-spacing-1);
23
+
24
+ &__progress-container {
25
+ position: relative;
26
+
27
+ overflow: hidden;
28
+
29
+ height: 20px;
30
+
31
+ border-radius: 2px;
32
+ background: var(--g-color-base-generic);
33
+ }
34
+
35
+ &__container {
36
+ display: flex;
37
+
38
+ padding: 2px 0;
39
+ }
40
+
41
+ &__legend {
42
+ position: absolute;
43
+ bottom: 2px;
44
+
45
+ width: 20px;
46
+ height: 20px;
47
+
48
+ border-radius: 2px;
49
+
50
+ @each $type, $color in $memory-type-colors {
51
+ &_type_#{$type} {
52
+ @include memory-type-color($type);
53
+ }
54
+ }
55
+ }
56
+
57
+ &__segment {
58
+ position: absolute;
59
+
60
+ height: 100%;
61
+
62
+ @each $type, $color in $memory-type-colors {
63
+ &_type_#{$type} {
64
+ @include memory-type-color($type);
65
+ }
66
+ }
67
+ }
68
+
69
+ &__name {
70
+ padding-left: 28px;
71
+ }
72
+
73
+ &_theme_dark {
74
+ color: var(--g-color-text-light-primary);
75
+
76
+ #{$block}__segment {
77
+ opacity: 0.75;
78
+ }
79
+ }
80
+
81
+ &_status {
82
+ &_good {
83
+ #{$block}__progress-container {
84
+ background-color: var(--g-color-base-positive-light);
85
+ }
86
+ }
87
+ &_warning {
88
+ #{$block}__progress-container {
89
+ background-color: var(--g-color-base-yellow-light);
90
+ }
91
+ }
92
+ &_danger {
93
+ #{$block}__progress-container {
94
+ background-color: var(--g-color-base-danger-light);
95
+ }
96
+ }
97
+ }
98
+
99
+ &__text {
100
+ display: flex;
101
+ justify-content: center;
102
+ align-items: center;
103
+ }
104
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "text_external-consumption": "External Consumption",
3
+ "text_allocator-caches": "Allocator Caches",
4
+ "text_shared-cache": "Shared Cache",
5
+ "text_memtable": "MemTable",
6
+ "text_query-execution": "Query Execution",
7
+ "text_usage": "Usage",
8
+ "text_soft-limit": "Soft Limit",
9
+ "text_hard-limit": "Hard Limit",
10
+ "text_other": "Other"
11
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: (key: "text_external-consumption" | "text_allocator-caches" | "text_shared-cache" | "text_memtable" | "text_query-execution" | "text_usage" | "text_soft-limit" | "text_hard-limit" | "text_other", params?: import("@gravity-ui/i18n").Params) => string;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { registerKeysets } from '../../../utils/i18n';
2
+ import en from './en.json';
3
+ const COMPONENT = 'ydb-memory-viewer';
4
+ export default registerKeysets(COMPONENT, { en });
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/MemoryViewer/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,MAAM,WAAW,CAAC;AAE3B,MAAM,SAAS,GAAG,mBAAmB,CAAC;AAEtC,eAAe,eAAe,CAAC,SAAS,EAAE,EAAC,EAAE,EAAC,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { TMemoryStats } from '../../types/api/nodes';
2
+ interface MemorySegment {
3
+ label: string;
4
+ key: string;
5
+ value: number;
6
+ capacity?: number;
7
+ isInfo?: boolean;
8
+ }
9
+ export declare function getMemorySegments(stats: TMemoryStats): MemorySegment[];
10
+ export {};
@@ -0,0 +1,71 @@
1
+ import { isNumeric } from '../../utils/utils';
2
+ import i18n from './i18n';
3
+ function getMaybeNumber(value) {
4
+ return isNumeric(value) ? parseFloat(String(value)) : undefined;
5
+ }
6
+ export function getMemorySegments(stats) {
7
+ const segments = [
8
+ {
9
+ label: i18n('text_shared-cache'),
10
+ key: 'SharedCacheConsumption',
11
+ value: getMaybeNumber(stats.SharedCacheConsumption),
12
+ capacity: getMaybeNumber(stats.SharedCacheLimit),
13
+ isInfo: false,
14
+ },
15
+ {
16
+ label: i18n('text_query-execution'),
17
+ key: 'QueryExecutionConsumption',
18
+ value: getMaybeNumber(stats.QueryExecutionConsumption),
19
+ capacity: getMaybeNumber(stats.QueryExecutionLimit),
20
+ isInfo: false,
21
+ },
22
+ {
23
+ label: i18n('text_memtable'),
24
+ key: 'MemTableConsumption',
25
+ value: getMaybeNumber(stats.MemTableConsumption),
26
+ capacity: getMaybeNumber(stats.MemTableLimit),
27
+ isInfo: false,
28
+ },
29
+ {
30
+ label: i18n('text_allocator-caches'),
31
+ key: 'AllocatorCachesMemory',
32
+ value: getMaybeNumber(stats.AllocatorCachesMemory),
33
+ isInfo: false,
34
+ },
35
+ ];
36
+ const nonInfoSegments = segments.filter((segment) => segment.value !== undefined);
37
+ const sumNonInfoSegments = nonInfoSegments.reduce((acc, segment) => acc + segment.value, 0);
38
+ const totalMemory = getMaybeNumber(stats.AnonRss);
39
+ if (totalMemory) {
40
+ const otherMemory = Math.max(0, totalMemory - sumNonInfoSegments);
41
+ segments.push({
42
+ label: i18n('text_other'),
43
+ key: 'Other',
44
+ value: otherMemory,
45
+ isInfo: false,
46
+ });
47
+ }
48
+ segments.push({
49
+ label: i18n('text_external-consumption'),
50
+ key: 'ExternalConsumption',
51
+ value: getMaybeNumber(stats.ExternalConsumption),
52
+ isInfo: true,
53
+ }, {
54
+ label: i18n('text_usage'),
55
+ key: 'Usage',
56
+ value: getMaybeNumber(stats.AnonRss),
57
+ isInfo: true,
58
+ }, {
59
+ label: i18n('text_soft-limit'),
60
+ key: 'SoftLimit',
61
+ value: getMaybeNumber(stats.SoftLimit),
62
+ isInfo: true,
63
+ }, {
64
+ label: i18n('text_hard-limit'),
65
+ key: 'HardLimit',
66
+ value: getMaybeNumber(stats.HardLimit),
67
+ isInfo: true,
68
+ });
69
+ return segments.filter((segment) => segment.value !== undefined);
70
+ }
71
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/MemoryViewer/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE5C,OAAO,IAAI,MAAM,QAAQ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,CAAoB,CAAC;AACxF,CAAC"}
@@ -1,13 +1,15 @@
1
1
  import type { NodeAddress } from '../../types/additionalProps';
2
- import type { TSystemStateInfo } from '../../types/api/nodes';
3
- export type NodeHostData = NodeAddress & Pick<TSystemStateInfo, 'SystemState'> & {
2
+ import type { TNodeInfo, TSystemStateInfo } from '../../types/api/nodes';
3
+ export type NodeHostData = NodeAddress & Pick<TNodeInfo, 'ConnectStatus'> & Pick<TSystemStateInfo, 'SystemState'> & {
4
4
  NodeId: string | number;
5
5
  TenantName?: string;
6
6
  };
7
+ export type StatusForIcon = 'SystemState' | 'ConnectStatus';
7
8
  interface NodeHostWrapperProps {
8
9
  node: NodeHostData;
9
10
  getNodeRef?: (node?: NodeAddress) => string | null;
10
11
  database?: string;
12
+ statusForIcon?: StatusForIcon;
11
13
  }
12
- export declare const NodeHostWrapper: ({ node, getNodeRef, database }: NodeHostWrapperProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const NodeHostWrapper: ({ node, getNodeRef, database, statusForIcon, }: NodeHostWrapperProps) => import("react/jsx-runtime").JSX.Element;
13
15
  export {};
@@ -6,10 +6,11 @@ import { isUnavailableNode } from '../../utils/nodes';
6
6
  import { CellWithPopover } from '../CellWithPopover/CellWithPopover';
7
7
  import { EntityStatus } from '../EntityStatus/EntityStatus';
8
8
  import { NodeEndpointsTooltipContent } from '../TooltipsContent';
9
- export const NodeHostWrapper = ({ node, getNodeRef, database }) => {
9
+ export const NodeHostWrapper = ({ node, getNodeRef, database, statusForIcon, }) => {
10
10
  if (!node.Host) {
11
11
  return _jsx("span", { children: "\u2014" });
12
12
  }
13
+ const status = statusForIcon === 'ConnectStatus' ? node.ConnectStatus : node.SystemState;
13
14
  const isNodeAvailable = !isUnavailableNode(node);
14
15
  let developerUIInternalHref;
15
16
  if (getNodeRef) {
@@ -27,6 +28,6 @@ export const NodeHostWrapper = ({ node, getNodeRef, database }) => {
27
28
  database: database !== null && database !== void 0 ? database : node.TenantName,
28
29
  })
29
30
  : undefined;
30
- return (_jsx(CellWithPopover, { disabled: !isNodeAvailable, content: _jsx(NodeEndpointsTooltipContent, { data: node, nodeHref: developerUIInternalHref }), placement: ['top', 'bottom'], behavior: PopoverBehavior.Immediate, delayClosing: 200, children: _jsx(EntityStatus, { name: node.Host, status: node.SystemState, path: nodePath, hasClipboardButton: true }) }));
31
+ return (_jsx(CellWithPopover, { disabled: !isNodeAvailable, content: _jsx(NodeEndpointsTooltipContent, { data: node, nodeHref: developerUIInternalHref }), placement: ['top', 'bottom'], behavior: PopoverBehavior.Immediate, delayClosing: 200, children: _jsx(EntityStatus, { name: node.Host, status: status, path: nodePath, hasClipboardButton: true }) }));
31
32
  };
32
33
  //# sourceMappingURL=NodeHostWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NodeHostWrapper.js","sourceRoot":"","sources":["../../../src/components/NodeHostWrapper/NodeHostWrapper.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAC,kBAAkB,EAAC,MAAM,iCAAiC,CAAC;AAGnE,OAAO,EACH,iCAAiC,EACjC,+BAA+B,GAClC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAC,eAAe,EAAC,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAC,YAAY,EAAC,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAC,2BAA2B,EAAC,MAAM,oBAAoB,CAAC;AAc/D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAuB,EAAE,EAAE;IAClF,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QACb,OAAO,oCAAc,CAAC;IAC1B,CAAC;IAED,MAAM,eAAe,GAAG,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAEjD,IAAI,uBAA2C,CAAC;IAChD,I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,CAAC;IAEhB,OAAO,CACH,KAAC,eAAe,IACZ,QAAQ,EAAE,CAAC,eAAe,EAC1B,OAAO,EAAE,KAAC,2BAA2B,IAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,uBAAuB,GAAI,EACvF,SAAS,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,EAC5B,QAAQ,EAAE,eAAe,CAAC,SAAS,EACnC,YAAY,EAAE,GAAG,YAEjB,KAAC,YAAY,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,kBAAkB,SAAG,GACtE,CACrB,CAAC;AACN,CAAC,CAAC"}
@@ -1 +1 @@
1
- export declare const pDiskInfoKeyset: (key: "path" | "type" | "space" | "yes" | "state" | "links" | "guid" | "serial-number" | "shared-with-os" | "drive-status" | "device" | "realtime" | "slots" | "log-size" | "system-size" | "developer-ui" | "pdisk-page", params?: import("@gravity-ui/i18n").Params) => string;
1
+ export declare const pDiskInfoKeyset: (key: "path" | "type" | "space" | "links" | "yes" | "state" | "guid" | "serial-number" | "shared-with-os" | "drive-status" | "device" | "realtime" | "slots" | "log-size" | "system-size" | "developer-ui" | "pdisk-page", params?: import("@gravity-ui/i18n").Params) => string;
@@ -1,6 +1,6 @@
1
1
  import './ProgressViewer.scss';
2
2
  type ProgressViewerSize = 'xs' | 's' | 'ns' | 'm' | 'n' | 'l' | 'head';
3
- type FormatProgressViewerValues = (value?: number, capacity?: number) => (string | number | undefined)[];
3
+ export type FormatProgressViewerValues = (value?: number, capacity?: number) => (string | number | undefined)[];
4
4
  export interface ProgressViewerProps {
5
5
  value?: number | string;
6
6
  capacity?: number | string;
@@ -1 +1 @@
1
- export declare const vDiskInfoKeyset: (key: "size" | "yes" | "no" | "kind" | "links" | "pool-name" | "guid" | "developer-ui" | "slot-id" | "incarnation-guid" | "instance-guid" | "replication-status" | "state-status" | "space-status" | "fresh-rank-satisfaction" | "level-rank-satisfaction" | "front-queues" | "has-unreadable-blobs" | "read-throughput" | "write-throughput" | "vdisk-page" | "vdiks-title", params?: import("@gravity-ui/i18n").Params) => string;
1
+ export declare const vDiskInfoKeyset: (key: "links" | "size" | "yes" | "no" | "kind" | "pool-name" | "guid" | "developer-ui" | "slot-id" | "incarnation-guid" | "instance-guid" | "replication-status" | "state-status" | "space-status" | "fresh-rank-satisfaction" | "level-rank-satisfaction" | "front-queues" | "has-unreadable-blobs" | "read-throughput" | "write-throughput" | "vdisk-page" | "vdiks-title", params?: import("@gravity-ui/i18n").Params) => string;
@@ -0,0 +1,28 @@
1
+ import { UNBREAKABLE_GAP } from '../../../utils/utils';
2
+ import { prepareClockSkewValue, preparePingTimeValue } from '../utils';
3
+ describe('preparePingTimeValue', () => {
4
+ it('Should correctly prepare value', () => {
5
+ expect(preparePingTimeValue(1)).toEqual(`0${UNBREAKABLE_GAP}ms`);
6
+ expect(preparePingTimeValue(100)).toEqual(`0.1${UNBREAKABLE_GAP}ms`);
7
+ expect(preparePingTimeValue(5550)).toEqual(`6${UNBREAKABLE_GAP}ms`);
8
+ expect(preparePingTimeValue(100000)).toEqual(`100${UNBREAKABLE_GAP}ms`);
9
+ });
10
+ });
11
+ describe('prepareClockSkewValue', () => {
12
+ it('Should correctly prepare 0 or very low values', () => {
13
+ expect(prepareClockSkewValue(0)).toEqual(`0${UNBREAKABLE_GAP}ms`);
14
+ expect(prepareClockSkewValue(10)).toEqual(`0${UNBREAKABLE_GAP}ms`);
15
+ expect(prepareClockSkewValue(-10)).toEqual(`0${UNBREAKABLE_GAP}ms`);
16
+ });
17
+ it('Should correctly prepare positive values', () => {
18
+ expect(prepareClockSkewValue(100)).toEqual(`+0.1${UNBREAKABLE_GAP}ms`);
19
+ expect(prepareClockSkewValue(5500)).toEqual(`+6${UNBREAKABLE_GAP}ms`);
20
+ expect(prepareClockSkewValue(100000)).toEqual(`+100${UNBREAKABLE_GAP}ms`);
21
+ });
22
+ it('Should correctly prepare negative values', () => {
23
+ expect(prepareClockSkewValue(-100)).toEqual(`-0.1${UNBREAKABLE_GAP}ms`);
24
+ expect(prepareClockSkewValue(-5500)).toEqual(`-6${UNBREAKABLE_GAP}ms`);
25
+ expect(prepareClockSkewValue(-100000)).toEqual(`-100${UNBREAKABLE_GAP}ms`);
26
+ });
27
+ });
28
+ //# sourceMappingURL=utils.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.test.js","sourceRoot":"","sources":["../../../../src/components/nodesColumns/__test__/utils.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAC,qBAAqB,EAAE,oBAAoB,EAAC,MAAM,UAAU,CAAC;AAErE,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,gCAAgC,EAAE,GAAG,EAAE;QACtC,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,eAAe,IAAI,CAAC,CAAC;QACjE,MAAM,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,eAAe,IAAI,CAAC,CAAC;QACrE,MAAM,CAAC,oBAAoB,CAAC,IAAK,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,eAAe,IAAI,CAAC,CAAC;QACrE,MAAM,CAAC,oBAAoB,CAAC,MAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,eAAe,IAAI,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACnC,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;QACrD,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,eAAe,IAAI,CAAC,CAAC;QAClE,MAAM,CAAC,qBAAqB,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,eAAe,IAAI,CAAC,CAAC;QACnE,MAAM,CAAC,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,eAAe,IAAI,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;QAChD,MAAM,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,eAAe,IAAI,CAAC,CAAC;QACvE,MAAM,CAAC,qBAAqB,CAAC,IAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,eAAe,IAAI,CAAC,CAAC;QACvE,MAAM,CAAC,qBAAqB,CAAC,MAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,eAAe,IAAI,CAAC,CAAC;IAC/E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;QAChD,MAAM,CAAC,qBAAqB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,eAAe,IAAI,CAAC,CAAC;QACxE,MAAM,CAAC,qBAAqB,CAAC,CAAC,IAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,eAAe,IAAI,CAAC,CAAC;QACxE,MAAM,CAAC,qBAAqB,CAAC,CAAC,MAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,eAAe,IAAI,CAAC,CAAC;IAChF,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,13 +1,15 @@
1
- import type { TPoolStats } from '../../types/api/nodes';
1
+ import type { TMemoryStats, TPoolStats } from '../../types/api/nodes';
2
2
  import type { TTabletStateInfo } from '../../types/api/tablet';
3
3
  import type { Column } from '../../utils/tableUtils/types';
4
- import type { NodeHostData } from '../NodeHostWrapper/NodeHostWrapper';
4
+ import type { NodeHostData, StatusForIcon } from '../NodeHostWrapper/NodeHostWrapper';
5
5
  import type { GetNodesColumnsParams } from './types';
6
6
  import './NodesColumns.scss';
7
7
  export declare function getNodeIdColumn<T extends {
8
8
  NodeId?: string | number;
9
9
  }>(): Column<T>;
10
- export declare function getHostColumn<T extends NodeHostData>({ getNodeRef, database, }: GetNodesColumnsParams): Column<T>;
10
+ export declare function getHostColumn<T extends NodeHostData>({ getNodeRef, database }: GetNodesColumnsParams, { statusForIcon }?: {
11
+ statusForIcon?: StatusForIcon;
12
+ }): Column<T>;
11
13
  export declare function getNodeNameColumn<T extends {
12
14
  NodeName?: string;
13
15
  }>(): Column<T>;
@@ -24,18 +26,15 @@ export declare function getUptimeColumn<T extends {
24
26
  StartTime?: string;
25
27
  Uptime?: string;
26
28
  }>(): Column<T>;
27
- export declare function getMemoryColumn<T extends {
29
+ export declare function getRAMColumn<T extends {
28
30
  MemoryUsed?: string;
29
31
  MemoryLimit?: string;
30
32
  }>(): Column<T>;
31
- export declare function getRAMColumn<T extends {
33
+ export declare function getMemoryColumn<T extends {
34
+ MemoryStats?: TMemoryStats;
32
35
  MemoryUsed?: string;
33
36
  MemoryLimit?: string;
34
37
  }>(): Column<T>;
35
- export declare function getSharedCacheUsageColumn<T extends {
36
- SharedCacheUsed?: string | number;
37
- SharedCacheLimit?: string | number;
38
- }>(): Column<T>;
39
38
  export declare function getPoolsColumn<T extends {
40
39
  PoolStats?: TPoolStats[];
41
40
  }>(): Column<T>;
@@ -64,3 +63,27 @@ export declare function getTabletsColumn<T extends {
64
63
  export declare function getMissingDisksColumn<T extends {
65
64
  Missing?: number;
66
65
  }>(): Column<T>;
66
+ export declare function getConnectionsColumn<T extends {
67
+ Connections?: number;
68
+ }>(): Column<T>;
69
+ export declare function getNetworkUtilizationColumn<T extends {
70
+ NetworkUtilization?: number;
71
+ NetworkUtilizationMin?: number;
72
+ NetworkUtilizationMax?: number;
73
+ }>(): Column<T>;
74
+ export declare function getSendThroughputColumn<T extends {
75
+ SendThroughput?: string;
76
+ }>(): Column<T>;
77
+ export declare function getReceiveThroughputColumn<T extends {
78
+ ReceiveThroughput?: string;
79
+ }>(): Column<T>;
80
+ export declare function getPingTimeColumn<T extends {
81
+ PingTimeUs?: string;
82
+ PingTimeMinUs?: string;
83
+ PingTimeMaxUs?: string;
84
+ }>(): Column<T>;
85
+ export declare function getClockSkewColumn<T extends {
86
+ ClockSkewUs?: string;
87
+ ClockSkewMinUs?: string;
88
+ ClockSkewMaxUs?: string;
89
+ }>(): Column<T>;