ydb-embedded-ui 5.4.0 → 5.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. package/dist/components/DiskPageTitle/DiskPageTitle.d.ts +11 -0
  2. package/dist/components/DiskPageTitle/DiskPageTitle.js +8 -0
  3. package/dist/components/DiskPageTitle/DiskPageTitle.scss +17 -0
  4. package/dist/{containers/Storage → components}/DiskStateProgressBar/DiskStateProgressBar.js +3 -3
  5. package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +1 -1
  6. package/dist/components/GroupInfo/GroupInfo.d.ts +8 -0
  7. package/dist/components/GroupInfo/GroupInfo.js +28 -0
  8. package/dist/components/GroupInfo/i18n/en.json +6 -0
  9. package/dist/components/GroupInfo/i18n/index.d.ts +1 -0
  10. package/dist/components/GroupInfo/i18n/index.js +4 -0
  11. package/dist/components/MetricChart/MetricChart.js +3 -1
  12. package/dist/components/MetricChart/types.d.ts +4 -0
  13. package/dist/components/MonacoEditor/MonacoEditor.d.ts +2 -0
  14. package/dist/components/MonacoEditor/MonacoEditor.js +7 -0
  15. package/dist/{containers/Storage → components}/PDiskPopup/PDiskPopup.d.ts +3 -3
  16. package/dist/{containers/Storage → components}/PDiskPopup/PDiskPopup.js +6 -5
  17. package/dist/components/PageMeta/PageMeta.d.ts +2 -1
  18. package/dist/components/PageMeta/PageMeta.js +9 -2
  19. package/dist/components/PageMeta/PageMeta.scss +9 -0
  20. package/dist/components/Stack/Stack.scss +2 -0
  21. package/dist/{containers/Storage → components}/VDisk/VDisk.d.ts +2 -2
  22. package/dist/{containers/Storage → components}/VDisk/VDisk.js +8 -8
  23. package/dist/{containers/Storage → components}/VDisk/VDisk.scss +1 -1
  24. package/dist/components/VDisk/VDiskWithDonorsStack.d.ts +12 -0
  25. package/dist/components/VDisk/VDiskWithDonorsStack.js +14 -0
  26. package/dist/components/VDiskInfo/VDiskInfo.d.ts +10 -0
  27. package/dist/components/VDiskInfo/VDiskInfo.js +113 -0
  28. package/dist/components/VDiskInfo/VDiskInfo.scss +8 -0
  29. package/dist/components/VDiskInfo/i18n/en.json +23 -0
  30. package/dist/components/VDiskInfo/i18n/index.d.ts +1 -0
  31. package/dist/components/VDiskInfo/i18n/index.js +4 -0
  32. package/dist/{containers/Storage → components}/VDiskPopup/VDiskPopup.d.ts +3 -3
  33. package/dist/{containers/Storage → components}/VDiskPopup/VDiskPopup.js +8 -7
  34. package/dist/components/VirtualTable/TableHead.d.ts +2 -1
  35. package/dist/components/VirtualTable/TableHead.js +6 -6
  36. package/dist/components/VirtualTable/constants.d.ts +1 -0
  37. package/dist/components/VirtualTable/constants.js +1 -0
  38. package/dist/containers/App/App.js +0 -2
  39. package/dist/containers/App/App.scss +3 -0
  40. package/dist/containers/App/Content.js +19 -5
  41. package/dist/containers/App/appSlots.d.ts +9 -3
  42. package/dist/containers/App/appSlots.js +2 -1
  43. package/dist/containers/Header/breadcrumbs.js +12 -0
  44. package/dist/containers/Header/i18n/en.json +1 -0
  45. package/dist/containers/Header/i18n/index.d.ts +1 -1
  46. package/dist/containers/Heatmap/HeatmapCanvas/HeatmapCanvas.js +2 -2
  47. package/dist/containers/Node/NodeStructure/NodeStructure.js +1 -1
  48. package/dist/containers/Node/NodeStructure/Pdisk.js +2 -2
  49. package/dist/containers/Node/NodeStructure/Vdisk.d.ts +6 -2
  50. package/dist/containers/Node/NodeStructure/Vdisk.js +5 -78
  51. package/dist/containers/Nodes/getNodesColumns.js +0 -1
  52. package/dist/containers/PDiskPage/PDiskPage.d.ts +3 -0
  53. package/dist/containers/{PDisk/PDisk.js → PDiskPage/PDiskPage.js} +9 -11
  54. package/dist/containers/{PDisk/PDisk.scss → PDiskPage/PDiskPage.scss} +0 -14
  55. package/dist/containers/Storage/PDisk/PDisk.js +4 -10
  56. package/dist/containers/Storage/PDisk/PDisk.scss +0 -2
  57. package/dist/containers/Storage/Storage.js +1 -2
  58. package/dist/containers/Storage/StorageGroups/StorageGroups.scss +1 -7
  59. package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.d.ts +1 -1
  60. package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js +9 -17
  61. package/dist/containers/Storage/VirtualStorage.js +3 -7
  62. package/dist/containers/Tablet/TabletControls/TabletControls.js +2 -1
  63. package/dist/containers/TabletsFilters/TabletsFilters.d.ts +2 -2
  64. package/dist/containers/TabletsFilters/TabletsFilters.js +7 -6
  65. package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.js +1 -1
  66. package/dist/containers/Tenant/Diagnostics/Network/Network.js +2 -2
  67. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +1 -2
  68. package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.js +1 -1
  69. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/cpuDashboardConfig.js +4 -0
  70. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +5 -3
  71. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +6 -4
  72. package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.js +2 -2
  73. package/dist/containers/Tenant/Tenant.js +10 -5
  74. package/dist/containers/Tenants/Tenants.js +3 -2
  75. package/dist/containers/VDiskPage/VDiskPage.d.ts +3 -0
  76. package/dist/containers/VDiskPage/VDiskPage.js +109 -0
  77. package/dist/containers/VDiskPage/VDiskPage.scss +32 -0
  78. package/dist/containers/VDiskPage/i18n/en.json +9 -0
  79. package/dist/containers/VDiskPage/i18n/index.d.ts +1 -0
  80. package/dist/containers/VDiskPage/i18n/index.js +4 -0
  81. package/dist/containers/Versions/groupNodes.js +1 -1
  82. package/dist/routes.d.ts +3 -0
  83. package/dist/routes.js +5 -0
  84. package/dist/services/api.d.ts +11 -4
  85. package/dist/services/api.js +26 -4
  86. package/dist/store/configureStore.d.ts +4 -0
  87. package/dist/store/defaultStore.d.ts +2 -0
  88. package/dist/store/reducers/authentication/authentication.d.ts +3 -0
  89. package/dist/store/reducers/cluster/cluster.d.ts +1 -0
  90. package/dist/store/reducers/clusterNodes/clusterNodes.d.ts +1 -0
  91. package/dist/store/reducers/clusters/clusters.d.ts +1 -0
  92. package/dist/store/reducers/clusters/selectors.js +1 -1
  93. package/dist/store/reducers/describe.d.ts +2 -0
  94. package/dist/store/reducers/executeQuery.d.ts +1 -0
  95. package/dist/store/reducers/explainQuery.d.ts +2 -0
  96. package/dist/store/reducers/header/types.d.ts +4 -1
  97. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +1 -0
  98. package/dist/store/reducers/heatmap.d.ts +1 -0
  99. package/dist/store/reducers/host.d.ts +1 -0
  100. package/dist/store/reducers/index.d.ts +3 -0
  101. package/dist/store/reducers/index.js +2 -0
  102. package/dist/store/reducers/network/network.d.ts +1 -0
  103. package/dist/store/reducers/node/node.d.ts +2 -0
  104. package/dist/store/reducers/node/selectors.js +1 -1
  105. package/dist/store/reducers/nodes/nodes.d.ts +2 -0
  106. package/dist/store/reducers/nodesList.d.ts +1 -0
  107. package/dist/store/reducers/olapStats.d.ts +1 -0
  108. package/dist/store/reducers/overview/overview.d.ts +2 -0
  109. package/dist/store/reducers/partitions/partitions.d.ts +1 -0
  110. package/dist/store/reducers/pdisk/pdisk.d.ts +2 -0
  111. package/dist/store/reducers/pdisk/utils.js +1 -1
  112. package/dist/store/reducers/preview.d.ts +1 -0
  113. package/dist/store/reducers/schema/schema.d.ts +1 -0
  114. package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +1 -0
  115. package/dist/store/reducers/shardsWorkload/shardsWorkload.d.ts +1 -0
  116. package/dist/store/reducers/storage/storage.d.ts +2 -0
  117. package/dist/store/reducers/storage/types.d.ts +3 -1
  118. package/dist/store/reducers/storage/utils.d.ts +1 -1
  119. package/dist/store/reducers/storage/utils.js +8 -9
  120. package/dist/store/reducers/tablet.d.ts +2 -0
  121. package/dist/store/reducers/tablets.d.ts +1 -0
  122. package/dist/store/reducers/tabletsFilters.d.ts +1 -0
  123. package/dist/store/reducers/tenant/tenant.d.ts +1 -0
  124. package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.d.ts +1 -0
  125. package/dist/store/reducers/tenantOverview/topNodesByCpu/topNodesByCpu.d.ts +1 -0
  126. package/dist/store/reducers/tenantOverview/topNodesByLoad/topNodesByLoad.d.ts +1 -0
  127. package/dist/store/reducers/tenantOverview/topNodesByMemory/topNodesByMemory.d.ts +1 -0
  128. package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.d.ts +1 -0
  129. package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.d.ts +1 -0
  130. package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.d.ts +1 -0
  131. package/dist/store/reducers/tenants/selectors.js +1 -1
  132. package/dist/store/reducers/tenants/tenants.d.ts +1 -0
  133. package/dist/store/reducers/topic.d.ts +1 -0
  134. package/dist/store/reducers/vdisk/types.d.ts +25 -0
  135. package/dist/store/reducers/vdisk/utils.d.ts +11 -0
  136. package/dist/store/reducers/vdisk/utils.js +33 -0
  137. package/dist/store/reducers/vdisk/vdisk.d.ts +100 -0
  138. package/dist/store/reducers/vdisk/vdisk.js +64 -0
  139. package/dist/store/state-url-mapping.js +6 -4
  140. package/dist/types/api/storage.d.ts +2 -0
  141. package/dist/utils/bytesParsers/__test__/formatBytes.test.js +7 -7
  142. package/dist/utils/clusterVersionColors.js +1 -1
  143. package/dist/utils/dataFormatters/dataFormatters.js +1 -0
  144. package/dist/utils/disks/constants.js +2 -2
  145. package/dist/utils/disks/types.d.ts +5 -1
  146. package/dist/utils/filters.js +1 -1
  147. package/dist/utils/hooks/useTableResize.d.ts +1 -1
  148. package/dist/utils/hooks/useTableResize.js +5 -3
  149. package/dist/utils/lazyComponent.d.ts +4 -0
  150. package/dist/utils/lazyComponent.js +25 -0
  151. package/dist/utils/monaco/index.d.ts +1 -0
  152. package/dist/utils/monaco/index.js +4 -0
  153. package/dist/utils/monaco/s-expression/constants.d.ts +1 -0
  154. package/dist/utils/monaco/s-expression/constants.js +1 -0
  155. package/dist/utils/monaco/s-expression/registerLanguage.d.ts +1 -0
  156. package/dist/utils/{monaco.js → monaco/s-expression/registerLanguage.js} +2 -19
  157. package/dist/utils/{yqlSuggestions → monaco/yqlSuggestions}/generateSuggestions.d.ts +2 -2
  158. package/dist/utils/{yqlSuggestions → monaco/yqlSuggestions}/generateSuggestions.js +40 -11
  159. package/dist/utils/monaco/yqlSuggestions/registerCompletionItemProvider.d.ts +1 -0
  160. package/dist/utils/monaco/yqlSuggestions/registerCompletionItemProvider.js +15 -0
  161. package/dist/utils/{yqlSuggestions → monaco/yqlSuggestions}/yqlSuggestions.js +1 -1
  162. package/dist/utils/numeral.js +7 -1
  163. package/dist/utils/storage.d.ts +1 -0
  164. package/dist/utils/storage.js +1 -0
  165. package/dist/utils/timeParsers/parsers.js +1 -1
  166. package/package.json +3 -1
  167. package/dist/containers/PDisk/PDisk.d.ts +0 -3
  168. package/dist/containers/Storage/DiskStateProgressBar/index.d.ts +0 -1
  169. package/dist/containers/Storage/DiskStateProgressBar/index.js +0 -1
  170. package/dist/containers/Storage/PDiskPopup/index.d.ts +0 -1
  171. package/dist/containers/Storage/PDiskPopup/index.js +0 -1
  172. package/dist/containers/Storage/VDisk/index.d.ts +0 -1
  173. package/dist/containers/Storage/VDisk/index.js +0 -1
  174. package/dist/containers/Storage/VDiskPopup/index.d.ts +0 -1
  175. package/dist/containers/Storage/VDiskPopup/index.js +0 -1
  176. package/dist/containers/Storage/utils/types.d.ts +0 -5
  177. package/dist/utils/monaco.d.ts +0 -3
  178. /package/dist/{containers/Storage → components}/DiskStateProgressBar/DiskStateProgressBar.d.ts +0 -0
  179. /package/dist/{containers/Storage → components}/DiskStateProgressBar/DiskStateProgressBar.scss +0 -0
  180. /package/dist/{containers/Storage → components}/PDiskPopup/PDiskPopup.scss +0 -0
  181. /package/dist/{containers/Storage → components}/VDiskPopup/VDiskPopup.scss +0 -0
  182. /package/dist/containers/{PDisk → PDiskPage}/PDiskGroups.d.ts +0 -0
  183. /package/dist/containers/{PDisk → PDiskPage}/PDiskGroups.js +0 -0
  184. /package/dist/containers/{PDisk → PDiskPage}/i18n/en.json +0 -0
  185. /package/dist/containers/{PDisk → PDiskPage}/i18n/index.d.ts +0 -0
  186. /package/dist/containers/{PDisk → PDiskPage}/i18n/index.js +0 -0
  187. /package/dist/containers/{PDisk → PDiskPage}/shared.d.ts +0 -0
  188. /package/dist/containers/{PDisk → PDiskPage}/shared.js +0 -0
  189. /package/dist/{containers/Storage/utils → store/reducers/vdisk}/types.js +0 -0
  190. /package/dist/utils/{yqlSuggestions → monaco/yqlSuggestions}/constants.d.ts +0 -0
  191. /package/dist/utils/{yqlSuggestions → monaco/yqlSuggestions}/constants.js +0 -0
  192. /package/dist/utils/{yqlSuggestions → monaco/yqlSuggestions}/yqlSuggestions.d.ts +0 -0
@@ -17,7 +17,8 @@ export const TabletControls = ({ tablet, fetchData }) => {
17
17
  const hasHiveId = () => {
18
18
  return HiveId && HiveId !== '0';
19
19
  };
20
+ const isDisabledRestart = tablet.State === ETabletState.Stopped;
20
21
  const isDisabledResume = tablet.State !== ETabletState.Stopped && tablet.State !== ETabletState.Dead;
21
22
  const isDisabledStop = tablet.State === ETabletState.Stopped || tablet.State === ETabletState.Deleted;
22
- return (_jsxs("div", Object.assign({ className: b('controls') }, { children: [_jsx(ButtonWithConfirmDialog, Object.assign({ dialogContent: i18n('dialog.kill'), onConfirmAction: _onKillClick, onConfirmActionSuccess: fetchData, buttonClassName: b('control') }, { children: i18n('controls.kill') })), hasHiveId() ? (_jsxs(_Fragment, { children: [_jsx(ButtonWithConfirmDialog, Object.assign({ dialogContent: i18n('dialog.stop'), onConfirmAction: _onStopClick, onConfirmActionSuccess: fetchData, buttonClassName: b('control'), buttonDisabled: isDisabledStop }, { children: i18n('controls.stop') })), _jsx(ButtonWithConfirmDialog, Object.assign({ dialogContent: i18n('dialog.resume'), onConfirmAction: _onResumeClick, onConfirmActionSuccess: fetchData, buttonClassName: b('control'), buttonDisabled: isDisabledResume }, { children: i18n('controls.resume') }))] })) : null] })));
23
+ return (_jsxs("div", Object.assign({ className: b('controls') }, { children: [_jsx(ButtonWithConfirmDialog, Object.assign({ dialogContent: i18n('dialog.kill'), onConfirmAction: _onKillClick, onConfirmActionSuccess: fetchData, buttonClassName: b('control'), buttonDisabled: isDisabledRestart }, { children: i18n('controls.kill') })), hasHiveId() ? (_jsxs(_Fragment, { children: [_jsx(ButtonWithConfirmDialog, Object.assign({ dialogContent: i18n('dialog.stop'), onConfirmAction: _onStopClick, onConfirmActionSuccess: fetchData, buttonClassName: b('control'), buttonDisabled: isDisabledStop }, { children: i18n('controls.stop') })), _jsx(ButtonWithConfirmDialog, Object.assign({ dialogContent: i18n('dialog.resume'), onConfirmAction: _onResumeClick, onConfirmActionSuccess: fetchData, buttonClassName: b('control'), buttonDisabled: isDisabledResume }, { children: i18n('controls.resume') }))] })) : null] })));
23
24
  };
@@ -13,7 +13,7 @@ export class TabletsFilters extends React.Component<any, any, any> {
13
13
  setTypeFilter: PropTypes.Requireable<(...args: any[]) => any>;
14
14
  stateFilter: PropTypes.Requireable<any[]>;
15
15
  typeFilter: PropTypes.Requireable<any[]>;
16
- error: PropTypes.Requireable<PropTypes.Requireable<string> | PropTypes.Requireable<object>>;
16
+ error: PropTypes.Requireable<PropTypes.Requireable<object> | PropTypes.Requireable<string>>;
17
17
  setHeader: PropTypes.Requireable<(...args: any[]) => any>;
18
18
  };
19
19
  static renderLoader(): JSX.Element;
@@ -56,7 +56,7 @@ declare const _default: import("react-redux").ConnectedComponent<typeof TabletsF
56
56
  setTypeFilter: PropTypes.Requireable<(...args: any[]) => any>;
57
57
  stateFilter: PropTypes.Requireable<any[]>;
58
58
  typeFilter: PropTypes.Requireable<any[]>;
59
- error: PropTypes.Requireable<PropTypes.Requireable<string> | PropTypes.Requireable<object>>;
59
+ error: PropTypes.Requireable<PropTypes.Requireable<object> | PropTypes.Requireable<string>>;
60
60
  setHeader: PropTypes.Requireable<(...args: any[]) => any>;
61
61
  }>, "nodes" | "tablets" | "loading" | "wasLoaded" | "error" | "stateFilter" | "typeFilter" | "setStateFilter" | "setTypeFilter" | "clearWasLoadingFlag" | "getTabletsInfo" | "filteredTablets" | "timeoutForRequest">>;
62
62
  export default _default;
@@ -3,7 +3,8 @@ import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { connect } from 'react-redux';
5
5
  import cn from 'bem-cn-lite';
6
- import _ from 'lodash';
6
+ import map from 'lodash/map';
7
+ import isEqual from 'lodash/isEqual';
7
8
  import { Helmet } from 'react-helmet-async';
8
9
  import { Loader, Select } from '@gravity-ui/uikit';
9
10
  import ReactList from 'react-list';
@@ -60,11 +61,11 @@ export class TabletsFilters extends React.Component {
60
61
  const { nodeFilter, tenantPath } = this.state;
61
62
  const { tablets, filteredTablets, nodes, stateFilter, typeFilter, error } = this.props;
62
63
  const states = tabletStates.map((item) => ({ value: item, content: item }));
63
- const types = Array.from(new Set(...[_.map(tablets, (tblt) => tblt.Type)])).map((item) => ({
64
+ const types = Array.from(new Set(...[map(tablets, (tblt) => tblt.Type)])).map((item) => ({
64
65
  value: item,
65
66
  content: item,
66
67
  }));
67
- const nodesForSelect = _.map(nodes, (node) => ({
68
+ const nodesForSelect = map(nodes, (node) => ({
68
69
  content: node.Id,
69
70
  value: node.Id,
70
71
  meta: node.Host,
@@ -171,9 +172,9 @@ Filters.propTypes = {
171
172
  onChangeTypes: PropTypes.func,
172
173
  };
173
174
  const MemoizedFilters = React.memo(Filters, (prevProps, nextProps) => {
174
- return (_.isEqual(prevProps.nodeFilter, nextProps.nodeFilter) &&
175
- _.isEqual(prevProps.stateFilter, nextProps.stateFilter) &&
176
- _.isEqual(prevProps.typeFilter, nextProps.typeFilter));
175
+ return (isEqual(prevProps.nodeFilter, nextProps.nodeFilter) &&
176
+ isEqual(prevProps.stateFilter, nextProps.stateFilter) &&
177
+ isEqual(prevProps.typeFilter, nextProps.typeFilter));
177
178
  });
178
179
  const mapStateToProps = (state) => {
179
180
  const { nodes, wasLoaded, loading, timeoutForRequest, stateFilter, typeFilter, error } = state.tabletsFilters;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useCallback, useMemo, useState } from 'react';
3
3
  import block from 'bem-cn-lite';
4
- import { escapeRegExp } from 'lodash/fp';
4
+ import escapeRegExp from 'lodash/escapeRegExp';
5
5
  import DataTable from '@gravity-ui/react-data-table';
6
6
  import { Loader } from '../../../../components/Loader';
7
7
  import { Search } from '../../../../components/Search';
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import cn from 'bem-cn-lite';
4
4
  import PropTypes from 'prop-types';
5
5
  import { connect } from 'react-redux';
6
- import _ from 'lodash';
6
+ import reduce from 'lodash/reduce';
7
7
  import { Link } from 'react-router-dom';
8
8
  import { Loader, Checkbox } from '@gravity-ui/uikit';
9
9
  import NodeNetwork from './NodeNetwork/NodeNetwork';
@@ -60,7 +60,7 @@ class Network extends React.Component {
60
60
  };
61
61
  };
62
62
  this.groupNodesByField = (nodes, field) => {
63
- return _.reduce(nodes, (acc, node) => {
63
+ return reduce(nodes, (acc, node) => {
64
64
  if (!acc[node[field]]) {
65
65
  acc[node[field]] = [node];
66
66
  }
@@ -4,7 +4,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
4
4
  import DataTable from '@gravity-ui/react-data-table';
5
5
  import { useAutofetcher, useTypedSelector, useTypedDispatch, useSetting, } from '../../../../utils/hooks';
6
6
  import { DEFAULT_TABLE_SETTINGS, PARTITIONS_HIDDEN_COLUMNS_KEY } from '../../../../utils/constants';
7
- import { getNodesList, selectNodesMap } from '../../../../store/reducers/nodesList';
7
+ import { selectNodesMap } from '../../../../store/reducers/nodesList';
8
8
  import { cleanTopicData, getTopic, selectConsumersNames, setDataWasNotLoaded as setTopicDataWasNotLoaded, } from '../../../../store/reducers/topic';
9
9
  import { getPartitions, setDataWasNotLoaded as setPartitionsDataWasNotLoaded, setSelectedConsumer, } from '../../../../store/reducers/partitions/partitions';
10
10
  import { TableSkeleton } from '../../../../components/TableSkeleton/TableSkeleton';
@@ -32,7 +32,6 @@ export const Partitions = ({ path }) => {
32
32
  useEffect(() => {
33
33
  dispatch(cleanTopicData());
34
34
  dispatch(setTopicDataWasNotLoaded());
35
- dispatch(getNodesList());
36
35
  dispatch(getTopic(path));
37
36
  setComponentCurrentPath(path);
38
37
  }, [dispatch, path]);
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useMemo, useState } from 'react';
3
- import { escapeRegExp } from 'lodash/fp';
3
+ import escapeRegExp from 'lodash/escapeRegExp';
4
4
  import { Select, TableColumnSetup } from '@gravity-ui/uikit';
5
5
  import { Search } from '../../../../../components/Search/Search';
6
6
  import { PARTITIONS_COLUMNS_IDS, PARTITIONS_COLUMNS_TITILES } from '../utils/constants';
@@ -12,6 +12,10 @@ export const cpuDashboardConfig = [
12
12
  metrics: pools.map(getPoolMetricConfig),
13
13
  options: {
14
14
  dataType: 'percent',
15
+ scaleRange: {
16
+ min: 0,
17
+ max: 1,
18
+ },
15
19
  },
16
20
  },
17
21
  ];
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useEffect, useRef, useState } from 'react';
3
3
  import cn from 'bem-cn-lite';
4
- import MonacoEditor from 'react-monaco-editor';
4
+ import { MonacoEditor } from '../../../../components/MonacoEditor/MonacoEditor';
5
5
  import JSONTree from 'react-json-inspector';
6
6
  import 'react-json-inspector/json-inspector.css';
7
7
  import { TextOverflow, getYdbPlanNodeShape, getTopology } from '@gravity-ui/paranoid';
@@ -12,7 +12,7 @@ import Fullscreen from '../../../../components/Fullscreen/Fullscreen';
12
12
  import { QueryExecutionStatus } from '../../../../components/QueryExecutionStatus';
13
13
  import { explainVersions } from '../../../../store/reducers/explainQuery';
14
14
  import { disableFullscreen } from '../../../../store/reducers/fullscreen';
15
- import { LANGUAGE_S_EXPRESSION_ID } from '../../../../utils/monaco';
15
+ import { LANGUAGE_S_EXPRESSION_ID } from '../../../../utils/monaco/s-expression/constants';
16
16
  import { useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
17
17
  import { PaneVisibilityToggleButtons } from '../../utils/paneVisibilityToggleHelpers';
18
18
  import { renderExplainNode } from './utils';
@@ -107,7 +107,9 @@ export function ExplainResult(props) {
107
107
  return (_jsxs(React.Fragment, { children: [content, isFullscreen && _jsx(Fullscreen, { children: content })] }));
108
108
  };
109
109
  const renderAstExplain = () => {
110
- const content = (_jsx("div", Object.assign({ className: b('ast') }, { children: _jsx(MonacoEditor, { language: LANGUAGE_S_EXPRESSION_ID, value: props.ast, options: EDITOR_OPTIONS, wrappingIndent: "indent" }) })));
110
+ const content = (_jsx("div", Object.assign({ className: b('ast') }, { children: _jsx(MonacoEditor, { language: LANGUAGE_S_EXPRESSION_ID, value: props.ast, options: EDITOR_OPTIONS, wrappingIndent: "indent",
111
+ // pass noop otherwise it will throw error
112
+ editorWillUnmount: () => { } }) })));
111
113
  return (_jsxs(React.Fragment, { children: [content, isFullscreen && _jsx(Fullscreen, { children: content })] }));
112
114
  };
113
115
  const renderGraph = () => {
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useReducer, useRef, useState } from 'react';
3
3
  import { connect } from 'react-redux';
4
4
  import cn from 'bem-cn-lite';
5
- import _ from 'lodash';
6
- import MonacoEditor from 'react-monaco-editor';
5
+ import throttle from 'lodash/throttle';
6
+ import { MonacoEditor } from '../../../../components/MonacoEditor/MonacoEditor';
7
7
  import SplitPane from '../../../../components/SplitPane';
8
8
  import { sendExecuteQuery, saveQueryToHistory, goToPreviousQuery, goToNextQuery, setTenantPath, } from '../../../../store/reducers/executeQuery';
9
9
  import { getExplainQuery, getExplainQueryAst } from '../../../../store/reducers/explainQuery';
@@ -62,7 +62,7 @@ function QueryEditor(props) {
62
62
  editorRef.current.layout();
63
63
  }
64
64
  };
65
- const onChangeWindow = _.throttle(() => {
65
+ const onChangeWindow = throttle(() => {
66
66
  updateEditor();
67
67
  }, 100);
68
68
  updateEditor();
@@ -286,7 +286,9 @@ function QueryEditor(props) {
286
286
  };
287
287
  return (_jsx("div", Object.assign({ className: b() }, { children: _jsxs(SplitPane, Object.assign({ direction: "vertical", defaultSizePaneKey: DEFAULT_SIZE_RESULT_PANE_KEY, triggerCollapse: resultVisibilityState.triggerCollapse, triggerExpand: resultVisibilityState.triggerExpand, minSize: [0, 52], collapsedSizes: [100, 0], onSplitStartDragAdditional: onSplitStartDragAdditional }, { children: [_jsxs("div", Object.assign({ className: b('pane-wrapper', {
288
288
  top: true,
289
- }) }, { children: [_jsx("div", Object.assign({ className: b('monaco-wrapper') }, { children: _jsx("div", Object.assign({ className: b('monaco') }, { children: _jsx(MonacoEditor, { language: "sql", value: executeQuery.input, options: editorOptions, onChange: onChange, editorDidMount: editorDidMount, theme: `vs-${theme}` }) })) })), renderControls()] })), _jsx("div", Object.assign({ className: b('pane-wrapper') }, { children: _jsx(Result, { executeQuery: executeQuery, explainQuery: explainQuery, resultVisibilityState: resultVisibilityState, onExpandResultHandler: onExpandResultHandler, onCollapseResultHandler: onCollapseResultHandler, type: type, handleAstQuery: handleAstQuery, theme: theme, resultType: resultType, path: path, showPreview: showPreview }) }))] })) })));
289
+ }) }, { children: [_jsx("div", Object.assign({ className: b('monaco-wrapper') }, { children: _jsx("div", Object.assign({ className: b('monaco') }, { children: _jsx(MonacoEditor, { language: "sql", value: executeQuery.input, options: editorOptions, onChange: onChange, editorDidMount: editorDidMount,
290
+ // pass noop otherwise it will throw error
291
+ editorWillUnmount: () => { }, theme: `vs-${theme}` }) })) })), renderControls()] })), _jsx("div", Object.assign({ className: b('pane-wrapper') }, { children: _jsx(Result, { executeQuery: executeQuery, explainQuery: explainQuery, resultVisibilityState: resultVisibilityState, onExpandResultHandler: onExpandResultHandler, onCollapseResultHandler: onCollapseResultHandler, type: type, handleAstQuery: handleAstQuery, theme: theme, resultType: resultType, path: path, showPreview: showPreview }) }))] })) })));
290
292
  }
291
293
  const mapStateToProps = (state) => {
292
294
  return {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useState } from 'react';
3
- import _ from 'lodash';
3
+ import some from 'lodash/some';
4
4
  import cn from 'bem-cn-lite';
5
5
  import { Dialog, DropdownMenu, TextInput, Button } from '@gravity-ui/uikit';
6
6
  import { setQueryNameToEdit } from '../../../../store/reducers/saveQuery';
@@ -28,7 +28,7 @@ function SaveQuery({ savedQueries, onSaveQuery, saveButtonDisabled }) {
28
28
  setValidationError(validateQueryName(value));
29
29
  };
30
30
  const validateQueryName = (value) => {
31
- if (_.some(savedQueries, (q) => q.name.toLowerCase() === value.trim().toLowerCase())) {
31
+ if (some(savedQueries, (q) => q.name.toLowerCase() === value.trim().toLowerCase())) {
32
32
  return 'This name already exists';
33
33
  }
34
34
  return null;
@@ -8,7 +8,6 @@ import { DEFAULT_IS_TENANT_SUMMARY_COLLAPSED, DEFAULT_SIZE_TENANT_KEY } from '..
8
8
  import { useTypedSelector, useTypedDispatch } from '../../utils/hooks';
9
9
  import { setHeaderBreadcrumbs } from '../../store/reducers/header/header';
10
10
  import { disableAutorefresh, getSchema } from '../../store/reducers/schema/schema';
11
- import { registerYQLCompletionItemProvider } from '../../utils/monaco';
12
11
  import SplitPane from '../../components/SplitPane';
13
12
  import { AccessDenied } from '../../components/Errors/403';
14
13
  import { ObjectSummary } from './ObjectSummary/ObjectSummary';
@@ -45,10 +44,16 @@ function Tenant(props) {
45
44
  });
46
45
  const { name } = queryParams;
47
46
  const tenantName = name;
48
- if (tenantName && typeof tenantName === 'string' && previousTenant.current !== tenantName) {
49
- registerYQLCompletionItemProvider(tenantName);
50
- previousTenant.current = tenantName;
51
- }
47
+ useEffect(() => {
48
+ if (tenantName && typeof tenantName === 'string' && previousTenant.current !== tenantName) {
49
+ const register = async () => {
50
+ const { registerYQLCompletionItemProvider } = await import('../../utils/monaco/yqlSuggestions/registerCompletionItemProvider');
51
+ registerYQLCompletionItemProvider(tenantName);
52
+ };
53
+ register().catch(console.error);
54
+ previousTenant.current = tenantName;
55
+ }
56
+ }, [tenantName]);
52
57
  useEffect(() => {
53
58
  dispatch(getSchema({ path: tenantName }));
54
59
  }, [tenantName, dispatch]);
@@ -7,6 +7,7 @@ import { PoolsGraph } from '../../components/PoolsGraph/PoolsGraph';
7
7
  import { TabletsStatistic } from '../../components/TabletsStatistic';
8
8
  import { ProblemFilter } from '../../components/ProblemFilter';
9
9
  import { Illustration } from '../../components/Illustration';
10
+ import { EntitiesCount } from '../../components/EntitiesCount';
10
11
  import { Search } from '../../components/Search';
11
12
  import { TableWithControlsLayout } from '../../components/TableWithControlsLayout/TableWithControlsLayout';
12
13
  import { ResponseError } from '../../components/Errors/ResponseError';
@@ -22,7 +23,7 @@ import './Tenants.scss';
22
23
  const b = cn('tenants');
23
24
  export const Tenants = ({ additionalTenantsProps }) => {
24
25
  const dispatch = useTypedDispatch();
25
- const { error, loading, wasLoaded } = useTypedSelector((state) => state.tenants);
26
+ const { error, loading, wasLoaded, tenants } = useTypedSelector((state) => state.tenants);
26
27
  const searchValue = useTypedSelector(selectTenantsSearchValue);
27
28
  const filteredTenants = useTypedSelector(selectFilteredTenants);
28
29
  const problemFilter = useTypedSelector(selectProblemFilter);
@@ -36,7 +37,7 @@ export const Tenants = ({ additionalTenantsProps }) => {
36
37
  dispatch(setSearchValue(value));
37
38
  };
38
39
  const renderControls = () => {
39
- return (_jsxs(_Fragment, { children: [_jsx(Search, { value: searchValue, onChange: handleSearchChange, placeholder: "Database name", className: b('search') }), _jsx(ProblemFilter, { value: problemFilter, onChange: handleProblemFilterChange })] }));
40
+ return (_jsxs(_Fragment, { children: [_jsx(Search, { value: searchValue, onChange: handleSearchChange, placeholder: "Database name", className: b('search') }), _jsx(ProblemFilter, { value: problemFilter, onChange: handleProblemFilterChange }), _jsx(EntitiesCount, { total: tenants.length, current: (filteredTenants === null || filteredTenants === void 0 ? void 0 : filteredTenants.length) || 0, label: 'Databases', loading: loading && !wasLoaded })] }));
40
41
  };
41
42
  const renderTable = () => {
42
43
  const getTenantBackend = (tenant) => {
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import './VDiskPage.scss';
3
+ export declare function VDiskPage(): JSX.Element;
@@ -0,0 +1,109 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useCallback, useEffect } from 'react';
3
+ import { StringParam, useQueryParams } from 'use-query-params';
4
+ import { Helmet } from 'react-helmet-async';
5
+ import { Icon } from '@gravity-ui/uikit';
6
+ import ArrowsOppositeToDotsIcon from '@gravity-ui/icons/svgs/arrows-opposite-to-dots.svg';
7
+ import { cn } from '../../utils/cn';
8
+ import { getSeverityColor } from '../../utils/disks/helpers';
9
+ import { stringifyVdiskId } from '../../utils/dataFormatters/dataFormatters';
10
+ import { valueIsDefined } from '../../utils';
11
+ import { useAutofetcher, useTypedDispatch, useTypedSelector } from '../../utils/hooks';
12
+ import { setHeaderBreadcrumbs } from '../../store/reducers/header/header';
13
+ import { getVDiskData, setVDiskDataWasNotLoaded } from '../../store/reducers/vdisk/vdisk';
14
+ import { selectNodesMap } from '../../store/reducers/nodesList';
15
+ import { PageMeta } from '../../components/PageMeta/PageMeta';
16
+ import { DiskPageTitle } from '../../components/DiskPageTitle/DiskPageTitle';
17
+ import { GroupInfo } from '../../components/GroupInfo/GroupInfo';
18
+ import { ButtonWithConfirmDialog } from '../../components/ButtonWithConfirmDialog/ButtonWithConfirmDialog';
19
+ import { InfoViewerSkeleton } from '../../components/InfoViewerSkeleton/InfoViewerSkeleton';
20
+ import { VDiskInfo } from '../../components/VDiskInfo/VDiskInfo';
21
+ import { VDiskWithDonorsStack } from '../../components/VDisk/VDiskWithDonorsStack';
22
+ import { vDiskPageKeyset } from './i18n';
23
+ import './VDiskPage.scss';
24
+ const vDiskPageCn = cn('ydb-vdisk-page');
25
+ export function VDiskPage() {
26
+ const dispatch = useTypedDispatch();
27
+ const nodesMap = useTypedSelector(selectNodesMap);
28
+ const { vDiskData, groupData, loading, wasLoaded } = useTypedSelector((state) => state.vDisk);
29
+ const { NodeHost, NodeId, NodeType, NodeDC, PDiskId, PDiskType, Severity, VDiskId } = vDiskData;
30
+ const [{ nodeId, pDiskId, vDiskSlotId }] = useQueryParams({
31
+ nodeId: StringParam,
32
+ pDiskId: StringParam,
33
+ vDiskSlotId: StringParam,
34
+ });
35
+ useEffect(() => {
36
+ dispatch(setHeaderBreadcrumbs('vDisk', { nodeId, pDiskId, vDiskSlotId }));
37
+ }, [dispatch, nodeId, pDiskId, vDiskSlotId]);
38
+ const fetchData = useCallback(async (isBackground) => {
39
+ if (!isBackground) {
40
+ dispatch(setVDiskDataWasNotLoaded());
41
+ }
42
+ if (valueIsDefined(nodeId) && valueIsDefined(pDiskId) && valueIsDefined(vDiskSlotId)) {
43
+ return dispatch(getVDiskData({ nodeId, pDiskId, vDiskSlotId }));
44
+ }
45
+ return undefined;
46
+ }, [dispatch, nodeId, pDiskId, vDiskSlotId]);
47
+ useAutofetcher(fetchData, [fetchData], true);
48
+ const handleEvictVDisk = async () => {
49
+ const { GroupID, GroupGeneration, Ring, Domain, VDisk } = VDiskId || {};
50
+ if (valueIsDefined(GroupID) &&
51
+ valueIsDefined(GroupGeneration) &&
52
+ valueIsDefined(Ring) &&
53
+ valueIsDefined(Domain) &&
54
+ valueIsDefined(VDisk)) {
55
+ return window.api.evictVDisk({
56
+ groupId: GroupID,
57
+ groupGeneration: GroupGeneration,
58
+ failRealmIdx: Ring,
59
+ failDomainIdx: Domain,
60
+ vDiskIdx: VDisk,
61
+ });
62
+ }
63
+ return undefined;
64
+ };
65
+ const handleAfterEvictVDisk = async () => {
66
+ return fetchData(true);
67
+ };
68
+ const renderHelmet = () => {
69
+ const vDiskPagePart = vDiskSlotId
70
+ ? `${vDiskPageKeyset('vdisk')} ${vDiskSlotId}`
71
+ : vDiskPageKeyset('vdisk');
72
+ const pDiskPagePart = pDiskId
73
+ ? `${vDiskPageKeyset('pdisk')} ${pDiskId}`
74
+ : vDiskPageKeyset('pdisk');
75
+ const nodePagePart = NodeHost ? NodeHost : vDiskPageKeyset('node');
76
+ return (_jsx(Helmet, { titleTemplate: `%s - ${vDiskPagePart} - ${pDiskPagePart} — ${nodePagePart} — YDB Monitoring`, defaultTitle: `${vDiskPagePart} - ${pDiskPagePart} — ${nodePagePart} — YDB Monitoring` }));
77
+ };
78
+ const renderPageMeta = () => {
79
+ const hostItem = NodeHost ? `${vDiskPageKeyset('fqdn')}: ${NodeHost}` : undefined;
80
+ const nodeIdItem = NodeId ? `${vDiskPageKeyset('node')}: ${NodeId}` : undefined;
81
+ const pDiskIdItem = NodeId ? `${vDiskPageKeyset('pdisk')}: ${PDiskId}` : undefined;
82
+ return (_jsx(PageMeta, { loading: loading && !wasLoaded, items: [hostItem, nodeIdItem, NodeType, NodeDC, pDiskIdItem, PDiskType] }));
83
+ };
84
+ const renderPageTitle = () => {
85
+ return (_jsx(DiskPageTitle, { entityName: vDiskPageKeyset('vdisk'), status: getSeverityColor(Severity), id: stringifyVdiskId(vDiskData === null || vDiskData === void 0 ? void 0 : vDiskData.VDiskId) }));
86
+ };
87
+ const renderControls = () => {
88
+ return (_jsx("div", { children: _jsxs(ButtonWithConfirmDialog, Object.assign({ onConfirmAction: handleEvictVDisk, onConfirmActionSuccess: handleAfterEvictVDisk, buttonDisabled: !VDiskId, buttonView: "normal", dialogContent: vDiskPageKeyset('evict-vdisk-dialog') }, { children: [_jsx(Icon, { data: ArrowsOppositeToDotsIcon }), vDiskPageKeyset('evict-vdisk-button')] })) }));
89
+ };
90
+ const renderInfo = () => {
91
+ return _jsx(VDiskInfo, { data: vDiskData, isVDiskPage: true });
92
+ };
93
+ const renderGroupInfo = () => {
94
+ var _a;
95
+ if (groupData) {
96
+ return (_jsxs(_Fragment, { children: [_jsx("div", Object.assign({ className: vDiskPageCn('group-title') }, { children: vDiskPageKeyset('group') })), _jsx(GroupInfo, { data: groupData }), _jsx("div", Object.assign({ className: vDiskPageCn('group-disks') }, { children: (_a = groupData.VDisks) === null || _a === void 0 ? void 0 : _a.map((vDisk) => {
97
+ return (_jsx(VDiskWithDonorsStack, { data: vDisk, nodes: nodesMap, className: vDiskPageCn('group-disk') }, stringifyVdiskId(vDisk.VDiskId)));
98
+ }) }))] }));
99
+ }
100
+ return null;
101
+ };
102
+ const renderContent = () => {
103
+ if (loading && !wasLoaded) {
104
+ return _jsx(InfoViewerSkeleton, { rows: 20 });
105
+ }
106
+ return (_jsxs(_Fragment, { children: [renderInfo(), renderGroupInfo()] }));
107
+ };
108
+ return (_jsxs("div", Object.assign({ className: vDiskPageCn(null) }, { children: [renderHelmet(), renderPageMeta(), renderPageTitle(), renderControls(), renderContent()] })));
109
+ }
@@ -0,0 +1,32 @@
1
+ @import '../../styles//mixins.scss';
2
+
3
+ .ydb-vdisk-page {
4
+ position: relative;
5
+
6
+ display: flex;
7
+ overflow: auto;
8
+ flex-direction: column;
9
+
10
+ height: 100%;
11
+ padding-top: 20px;
12
+ padding-left: 20px;
13
+
14
+ gap: 20px;
15
+
16
+ &__group-title {
17
+ @include header-1-typography();
18
+ }
19
+
20
+ &__group-disks {
21
+ display: flex;
22
+ flex-grow: 1;
23
+ flex-flow: row wrap;
24
+
25
+ margin-top: 20px;
26
+ gap: 10px;
27
+ }
28
+
29
+ &__group-disk {
30
+ width: 150px;
31
+ }
32
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "fqdn": "FQDN",
3
+ "node": "Node",
4
+ "pdisk": "PDisk",
5
+ "vdisk": "VDisk",
6
+ "group": "Group",
7
+ "evict-vdisk-button": "Evict VDisk",
8
+ "evict-vdisk-dialog": "VDisk will be evicted. Do you want to proceed?"
9
+ }
@@ -0,0 +1 @@
1
+ export declare const vDiskPageKeyset: (key: "node" | "pdisk" | "vdisk" | "group" | "fqdn" | "evict-vdisk-button" | "evict-vdisk-dialog", params?: import("@gravity-ui/i18n").Params | undefined) => string;
@@ -0,0 +1,4 @@
1
+ import { registerKeysets } from '../../../utils/i18n';
2
+ import en from './en.json';
3
+ const COMPONENT = 'ydb-vDisk-page';
4
+ export const vDiskPageKeyset = registerKeysets(COMPONENT, { en });
@@ -1,4 +1,4 @@
1
- import { groupBy } from 'lodash';
1
+ import groupBy from 'lodash/groupBy';
2
2
  import { getMinorVersion, parseNodesToVersionsValues } from '../../utils/versions';
3
3
  import { GroupByValue } from './types';
4
4
  const sortByTitle = (a, b) => { var _a; return ((_a = a.title) === null || _a === void 0 ? void 0 : _a.localeCompare(b.title || '')) || -1; };
package/dist/routes.d.ts CHANGED
@@ -5,6 +5,7 @@ export declare const CLUSTER = "cluster";
5
5
  export declare const TENANT = "tenant";
6
6
  export declare const NODE = "node";
7
7
  export declare const PDISK = "pDisk";
8
+ export declare const VDISK = "vDisk";
8
9
  export declare const TABLET = "tablet";
9
10
  declare const routes: {
10
11
  readonly clusters: "/clusters";
@@ -12,6 +13,7 @@ declare const routes: {
12
13
  readonly tenant: "/tenant";
13
14
  readonly node: "/node/:id/:activeTab?";
14
15
  readonly pDisk: "/pDisk";
16
+ readonly vDisk: "/vDisk";
15
17
  readonly tablet: "/tablet/:id";
16
18
  readonly tabletsFilters: "/tabletsFilters";
17
19
  readonly auth: "/auth";
@@ -27,3 +29,4 @@ export declare function getLocationObjectFromHref(href: string): {
27
29
  hash: string;
28
30
  };
29
31
  export declare function getPDiskPagePath(pDiskId: string | number, nodeId: string | number, query?: Query): string;
32
+ export declare function getVDiskPagePath(vDiskSlotId: string | number, pDiskId: string | number, nodeId: string | number, query?: Query): string;
package/dist/routes.js CHANGED
@@ -7,6 +7,7 @@ export const CLUSTER = 'cluster';
7
7
  export const TENANT = 'tenant';
8
8
  export const NODE = 'node';
9
9
  export const PDISK = 'pDisk';
10
+ export const VDISK = 'vDisk';
10
11
  export const TABLET = 'tablet';
11
12
  const routes = {
12
13
  clusters: `/${CLUSTERS}`,
@@ -14,6 +15,7 @@ const routes = {
14
15
  tenant: `/${TENANT}`,
15
16
  node: `/${NODE}/:id/:activeTab?`,
16
17
  pDisk: `/${PDISK}`,
18
+ vDisk: `/${VDISK}`,
17
19
  tablet: `/${TABLET}/:id`,
18
20
  tabletsFilters: `/tabletsFilters`,
19
21
  auth: `/auth`,
@@ -63,3 +65,6 @@ export function getLocationObjectFromHref(href) {
63
65
  export function getPDiskPagePath(pDiskId, nodeId, query = {}) {
64
66
  return createHref(routes.pDisk, undefined, Object.assign(Object.assign({}, query), { nodeId, pDiskId }));
65
67
  }
68
+ export function getVDiskPagePath(vDiskSlotId, pDiskId, nodeId, query = {}) {
69
+ return createHref(routes.vDisk, undefined, Object.assign(Object.assign({}, query), { nodeId, pDiskId, vDiskSlotId }));
70
+ }
@@ -39,11 +39,11 @@ export declare class YdbEmbeddedAPI extends AxiosWrapper {
39
39
  getNodes({ visibleEntities, type, tablets, sortOrder, sortValue, ...params }: NodesApiRequestParams, { concurrentId }?: AxiosOptions): Promise<TNodesInfo>;
40
40
  /** @deprecated use getNodes instead */
41
41
  getCompute({ sortOrder, sortValue, ...params }: ComputeApiRequestParams, { concurrentId }?: AxiosOptions): Promise<TComputeInfo>;
42
- getStorageInfo({ tenant, visibleEntities, nodeId, sortOrder, sortValue, ...params }: StorageApiRequestParams, { concurrentId }?: AxiosOptions): Promise<TStorageInfo>;
42
+ getStorageInfo({ tenant, visibleEntities, nodeId, poolName, groupId, sortOrder, sortValue, ...params }: StorageApiRequestParams, { concurrentId }?: AxiosOptions): Promise<TStorageInfo>;
43
43
  getPdiskInfo(nodeId: string | number, pdiskId: string | number): Promise<TEvPDiskStateResponse>;
44
- getVdiskInfo({ vdiskId, pdiskId, nodeId, }: {
45
- vdiskId: string | number;
46
- pdiskId: string | number;
44
+ getVdiskInfo({ vDiskSlotId, pDiskId, nodeId, }: {
45
+ vDiskSlotId: string | number;
46
+ pDiskId: string | number;
47
47
  nodeId: string | number;
48
48
  }): Promise<TEvVDiskStateResponse>;
49
49
  getGroupInfo(groupId: string | number): Promise<TStorageInfo>;
@@ -93,6 +93,13 @@ export declare class YdbEmbeddedAPI extends AxiosWrapper {
93
93
  getExplainQueryAst(query: string, database: string): Promise<import("../types/api/query").ExplainQueryResponse>;
94
94
  getHotKeys(path: string, enableSampling: boolean, { concurrentId }?: AxiosOptions): Promise<JsonHotKeysResponse>;
95
95
  getHealthcheckInfo(database: string, { concurrentId }?: AxiosOptions): Promise<HealthCheckAPIResponse>;
96
+ evictVDisk({ groupId, groupGeneration, failRealmIdx, failDomainIdx, vDiskIdx, }: {
97
+ groupId: string | number;
98
+ groupGeneration: string | number;
99
+ failRealmIdx: string | number;
100
+ failDomainIdx: string | number;
101
+ vDiskIdx: string | number;
102
+ }): Promise<any>;
96
103
  restartPDisk(nodeId: number | string, pDiskId: number | string): Promise<any>;
97
104
  killTablet(id?: string): Promise<string>;
98
105
  stopTablet(id?: string, hiveId?: string): Promise<string>;
@@ -53,19 +53,20 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
53
53
  return this.get(this.getPath('/viewer/json/compute?enums=true'), Object.assign({ sort }, params), { concurrentId });
54
54
  }
55
55
  getStorageInfo(_a, _b) {
56
- var { tenant, visibleEntities, nodeId, sortOrder, sortValue } = _a, params = __rest(_a, ["tenant", "visibleEntities", "nodeId", "sortOrder", "sortValue"]);
56
+ var { tenant, visibleEntities, nodeId, poolName, groupId, sortOrder, sortValue } = _a, params = __rest(_a, ["tenant", "visibleEntities", "nodeId", "poolName", "groupId", "sortOrder", "sortValue"]);
57
57
  var _c = _b === void 0 ? {} : _b, concurrentId = _c.concurrentId;
58
58
  const sort = prepareSortValue(sortValue, sortOrder);
59
- return this.get(this.getPath(`/viewer/json/storage?enums=true`), Object.assign({ tenant, node_id: nodeId, with: visibleEntities, sort }, params), { concurrentId });
59
+ return this.get(this.getPath(`/viewer/json/storage?enums=true`), Object.assign({ tenant, node_id: nodeId, pool: poolName, group_id: groupId, with: visibleEntities, sort }, params), { concurrentId });
60
60
  }
61
61
  getPdiskInfo(nodeId, pdiskId) {
62
62
  return this.get(this.getPath('/viewer/json/pdiskinfo?enums=true'), {
63
63
  filter: `(NodeId=${nodeId}${pdiskId ? `;PDiskId=${pdiskId}` : ''})`,
64
64
  });
65
65
  }
66
- getVdiskInfo({ vdiskId, pdiskId, nodeId, }) {
66
+ getVdiskInfo({ vDiskSlotId, pDiskId, nodeId, }) {
67
67
  return this.get(this.getPath('/viewer/json/vdiskinfo?enums=true'), {
68
- filter: `(VDiskId=${vdiskId !== null && vdiskId !== void 0 ? vdiskId : ''};PDiskId=${pdiskId !== null && pdiskId !== void 0 ? pdiskId : ''};NodeId=${nodeId !== null && nodeId !== void 0 ? nodeId : ''})`,
68
+ node_id: nodeId,
69
+ filter: `(PDiskId=${pDiskId};VDiskSlotId=${vDiskSlotId})`,
69
70
  });
70
71
  }
71
72
  getGroupInfo(groupId) {
@@ -208,6 +209,27 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
208
209
  getHealthcheckInfo(database, { concurrentId } = {}) {
209
210
  return this.get(this.getPath('/viewer/json/healthcheck?merge_records=true'), { tenant: database }, { concurrentId });
210
211
  }
212
+ evictVDisk({ groupId, groupGeneration, failRealmIdx, failDomainIdx, vDiskIdx, }) {
213
+ // BSC Id is constant for all ydb clusters
214
+ const BSC_TABLET_ID = '72057594037932033';
215
+ return this.post(this.getPath(`/tablets/app?TabletID=${BSC_TABLET_ID}&exec=1`), {
216
+ Command: {
217
+ ReassignGroupDisk: {
218
+ GroupId: groupId,
219
+ GroupGeneration: groupGeneration,
220
+ FailRealmIdx: failRealmIdx,
221
+ FailDomainIdx: failDomainIdx,
222
+ VDiskIdx: vDiskIdx,
223
+ },
224
+ },
225
+ }, {}, {
226
+ headers: {
227
+ // This handler requires exactly this string
228
+ // Automatic headers may not suit
229
+ Accept: 'application/json',
230
+ },
231
+ });
232
+ }
211
233
  restartPDisk(nodeId, pDiskId) {
212
234
  const pDiskPath = createPDiskDeveloperUILink({
213
235
  nodeId,
@@ -86,6 +86,7 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
86
86
  saveQuery: string | null;
87
87
  fullscreen: boolean;
88
88
  clusters: import("./reducers/clusters/types").ClustersState;
89
+ vDisk: import("./reducers/vdisk/types").VDiskState;
89
90
  }, any, Partial<{
90
91
  singleClusterMode: boolean | undefined;
91
92
  nodes: never;
@@ -137,6 +138,7 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
137
138
  saveQuery: never;
138
139
  fullscreen: never;
139
140
  clusters: never;
141
+ vDisk: never;
140
142
  }>> | undefined;
141
143
  singleClusterMode?: boolean | undefined;
142
144
  api?: import("../services/api").YdbEmbeddedAPI | undefined;
@@ -223,6 +225,7 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
223
225
  saveQuery: string | null;
224
226
  fullscreen: boolean;
225
227
  clusters: import("./reducers/clusters/types").ClustersState;
228
+ vDisk: import("./reducers/vdisk/types").VDiskState;
226
229
  }, any, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
227
230
  dispatch: import("redux-thunk").ThunkDispatch<{
228
231
  singleClusterMode: boolean;
@@ -305,6 +308,7 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
305
308
  saveQuery: string | null;
306
309
  fullscreen: boolean;
307
310
  clusters: import("./reducers/clusters/types").ClustersState;
311
+ vDisk: import("./reducers/vdisk/types").VDiskState;
308
312
  }, undefined, UnknownAction>;
309
313
  }, {}>, import("redux").StoreEnhancer<{}, {}>]>>;
310
314
  };
@@ -79,6 +79,7 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
79
79
  saveQuery: string | null;
80
80
  fullscreen: boolean;
81
81
  clusters: import("./reducers/clusters/types").ClustersState;
82
+ vDisk: import("./reducers/vdisk/types").VDiskState;
82
83
  }, any, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
83
84
  dispatch: import("redux-thunk").ThunkDispatch<{
84
85
  singleClusterMode: boolean;
@@ -161,6 +162,7 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
161
162
  saveQuery: string | null;
162
163
  fullscreen: boolean;
163
164
  clusters: import("./reducers/clusters/types").ClustersState;
165
+ vDisk: import("./reducers/vdisk/types").VDiskState;
164
166
  }, undefined, import("redux").UnknownAction>;
165
167
  }, {}>, import("redux").StoreEnhancer<{}, {}>]>>, history: import("history").History<unknown>;
166
168
  export type GetState = typeof store.getState;