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
@@ -5,12 +5,10 @@ import ContentWrapper, { Content } from './Content';
5
5
  import ReduxTooltip from '../ReduxTooltip/ReduxTooltip';
6
6
  import AppIcons from '../AppIcons/AppIcons';
7
7
  import { Navigation } from '../AsideNavigation/Navigation';
8
- import { registerLanguages } from '../../utils/monaco';
9
8
  import { ErrorBoundary } from '../../components/ErrorBoundary/ErrorBoundary';
10
9
  import { settings } from '../UserSettings/settings';
11
10
  import { Providers } from './Providers';
12
11
  import './App.scss';
13
- registerLanguages();
14
12
  function App({ store, history, singleClusterMode, children, userSettings = settings }) {
15
13
  return (_jsxs(Providers, Object.assign({ store: store, history: history }, { children: [_jsx(Helmet, { defaultTitle: "YDB Monitoring", titleTemplate: "%s \u2014 YDB Monitoring" }), _jsx(ContentWrapper, { children: _jsx(Navigation, Object.assign({ userSettings: userSettings }, { children: _jsxs(ErrorBoundary, { children: [_jsx(Content, Object.assign({ singleClusterMode: singleClusterMode }, { children: children })), _jsx("div", { id: "fullscreen-root" })] }) })) }), _jsx(ReduxTooltip, {}), _jsx(AppIcons, {})] })));
16
14
  }
@@ -4,6 +4,9 @@
4
4
  * {
5
5
  // FIXME: this is an overkill, potentially could break external components, needs refactoring
6
6
  box-sizing: border-box;
7
+
8
+ // Make all digits in the app monospace
9
+ font-variant-numeric: tabular-nums;
7
10
  }
8
11
 
9
12
  .yc-select-popup__tick-icon {
@@ -8,16 +8,18 @@ import { Clusters } from '../Clusters/Clusters';
8
8
  import Cluster from '../Cluster/Cluster';
9
9
  import Tenant from '../Tenant/Tenant';
10
10
  import Node from '../Node/Node';
11
- import { PDisk } from '../PDisk/PDisk';
11
+ import { PDiskPage } from '../PDiskPage/PDiskPage';
12
+ import { VDiskPage } from '../VDiskPage/VDiskPage';
12
13
  import { Tablet } from '../Tablet';
13
14
  import TabletsFilters from '../TabletsFilters/TabletsFilters';
14
15
  import Header from '../Header/Header';
15
16
  import Authentication from '../Authentication/Authentication';
16
17
  import { getUser } from '../../store/reducers/authentication/authentication';
18
+ import { getNodesList } from '../../store/reducers/nodesList';
17
19
  import { getClusterPath } from '../Cluster/utils';
18
20
  import { useSlots } from '../../components/slots';
19
21
  import { useTypedSelector, useTypedDispatch } from '../../utils/hooks';
20
- import { ClusterSlot, ClustersSlot, NodeSlot, PDiskSlot, RedirectSlot, RoutesSlot, TabletSlot, TabletsFiltersSlot, TenantSlot, } from './appSlots';
22
+ import { ClusterSlot, ClustersSlot, NodeSlot, PDiskPageSlot, VDiskPageSlot, RedirectSlot, RoutesSlot, TabletSlot, TabletsFiltersSlot, TenantSlot, } from './appSlots';
21
23
  import i18n from './i18n';
22
24
  import './App.scss';
23
25
  const b = cn('app');
@@ -39,8 +41,13 @@ const routesSlots = [
39
41
  },
40
42
  {
41
43
  path: routes.pDisk,
42
- slot: PDiskSlot,
43
- component: PDisk,
44
+ slot: PDiskPageSlot,
45
+ component: PDiskPage,
46
+ },
47
+ {
48
+ path: routes.vDisk,
49
+ slot: VDiskPageSlot,
50
+ component: VDiskPage,
44
51
  },
45
52
  {
46
53
  path: routes.tablet,
@@ -88,7 +95,7 @@ export function Content(props) {
88
95
  exact: true,
89
96
  component: Clusters,
90
97
  slot: ClustersSlot,
91
- }), additionalRoutes === null || additionalRoutes === void 0 ? void 0 : additionalRoutes.rendered, _jsxs(Route, { children: [_jsx(GetUser, {}), _jsx(Header, { mainPage: mainPage }), _jsxs(Switch, { children: [routesSlots.map((route) => {
98
+ }), additionalRoutes === null || additionalRoutes === void 0 ? void 0 : additionalRoutes.rendered, _jsxs(Route, { children: [_jsx(GetUser, {}), _jsx(GetNodesList, {}), _jsx(Header, { mainPage: mainPage }), _jsxs(Switch, { children: [routesSlots.map((route) => {
92
99
  return renderRouteSlot(slots, route);
93
100
  }), _jsx(Redirect, Object.assign({}, redirectProps))] })] }, "single-cluster")] }));
94
101
  }
@@ -105,6 +112,13 @@ function GetUser() {
105
112
  }, [dispatch, isAuthenticated, isInternalUser]);
106
113
  return null;
107
114
  }
115
+ function GetNodesList() {
116
+ const dispatch = useTypedDispatch();
117
+ React.useEffect(() => {
118
+ dispatch(getNodesList());
119
+ }, [dispatch]);
120
+ return null;
121
+ }
108
122
  function ContentWrapper(props) {
109
123
  const { singleClusterMode, isAuthenticated } = props;
110
124
  return (_jsxs(Switch, { children: [_jsx(Route, Object.assign({ path: routes.auth }, { children: _jsx(Authentication, { closable: true }) })), _jsx(Route, { children: _jsx("div", Object.assign({ className: b({ embedded: singleClusterMode }) }, { children: isAuthenticated ? props.children : _jsx(Authentication, {}) })) })] }));
@@ -2,7 +2,8 @@ import type { RedirectProps, RouteComponentProps } from 'react-router';
2
2
  import type Cluster from '../Cluster/Cluster';
3
3
  import type { Clusters } from '../Clusters/Clusters';
4
4
  import type Node from '../Node/Node';
5
- import type { PDisk } from '../PDisk/PDisk';
5
+ import type { PDiskPage } from '../PDiskPage/PDiskPage';
6
+ import type { VDiskPage } from '../VDiskPage/VDiskPage';
6
7
  import type { Tablet } from '../Tablet';
7
8
  import type TabletsFilters from '../TabletsFilters/TabletsFilters';
8
9
  import type Tenant from '../Tenant/Tenant';
@@ -26,9 +27,14 @@ export declare const NodeSlot: import("../../components/slots/types").SlotCompon
26
27
  component: typeof Node;
27
28
  } & RouteComponentProps) => React.ReactNode);
28
29
  }, never>;
29
- export declare const PDiskSlot: import("../../components/slots/types").SlotComponent<{
30
+ export declare const PDiskPageSlot: import("../../components/slots/types").SlotComponent<{
30
31
  children: import("react").ReactNode | ((props: {
31
- component: typeof PDisk;
32
+ component: typeof PDiskPage;
33
+ } & RouteComponentProps) => React.ReactNode);
34
+ }, never>;
35
+ export declare const VDiskPageSlot: import("../../components/slots/types").SlotComponent<{
36
+ children: import("react").ReactNode | ((props: {
37
+ component: typeof VDiskPage;
32
38
  } & RouteComponentProps) => React.ReactNode);
33
39
  }, never>;
34
40
  export declare const TabletSlot: import("../../components/slots/types").SlotComponent<{
@@ -3,7 +3,8 @@ export const ClustersSlot = createSlot('clusters');
3
3
  export const ClusterSlot = createSlot('cluster');
4
4
  export const TenantSlot = createSlot('tenant');
5
5
  export const NodeSlot = createSlot('node');
6
- export const PDiskSlot = createSlot('pDisk');
6
+ export const PDiskPageSlot = createSlot('pDisk');
7
+ export const VDiskPageSlot = createSlot('vDisk');
7
8
  export const TabletSlot = createSlot('tablet');
8
9
  export const TabletsFiltersSlot = createSlot('tabletsFilters');
9
10
  export const RoutesSlot = createSlot('routes');
@@ -68,6 +68,15 @@ const getPDiskBreadcrumbs = (options, query = {}) => {
68
68
  });
69
69
  return breadcrumbs;
70
70
  };
71
+ const getVDiskBreadcrumbs = (options, query = {}) => {
72
+ const { vDiskSlotId } = options;
73
+ const breadcrumbs = getPDiskBreadcrumbs(options, query);
74
+ const text = vDiskSlotId
75
+ ? `${headerKeyset('breadcrumbs.vDisk')} ${vDiskSlotId}`
76
+ : headerKeyset('breadcrumbs.vDisk');
77
+ breadcrumbs.push({ text });
78
+ return breadcrumbs;
79
+ };
71
80
  const getTabletsBreadcrubms = (options, query = {}) => {
72
81
  const { tenantName, nodeIds } = options;
73
82
  const newQuery = Object.assign(Object.assign({}, query), { [TENANT_PAGE]: TENANT_PAGES_IDS.diagnostics, [TenantTabsGroups.diagnosticsTab]: TENANT_DIAGNOSTICS_TABS_IDS.tablets });
@@ -106,6 +115,9 @@ export const getBreadcrumbs = (page, options, rawBreadcrumbs = [], query = {}) =
106
115
  case 'pDisk': {
107
116
  return [...rawBreadcrumbs, ...getPDiskBreadcrumbs(options, query)];
108
117
  }
118
+ case 'vDisk': {
119
+ return [...rawBreadcrumbs, ...getVDiskBreadcrumbs(options, query)];
120
+ }
109
121
  case 'tablets': {
110
122
  return [...rawBreadcrumbs, ...getTabletsBreadcrubms(options, query)];
111
123
  }
@@ -2,6 +2,7 @@
2
2
  "breadcrumbs.tenant": "Tenant",
3
3
  "breadcrumbs.node": "Node",
4
4
  "breadcrumbs.pDisk": "PDisk",
5
+ "breadcrumbs.vDisk": "VDisk",
5
6
  "breadcrumbs.tablet": "Tablet",
6
7
  "breadcrumbs.tablets": "Tablets"
7
8
  }
@@ -1 +1 @@
1
- export declare const headerKeyset: (key: "breadcrumbs.tenant" | "breadcrumbs.node" | "breadcrumbs.pDisk" | "breadcrumbs.tablet" | "breadcrumbs.tablets", params?: import("@gravity-ui/i18n").Params | undefined) => string;
1
+ export declare const headerKeyset: (key: "breadcrumbs.tenant" | "breadcrumbs.node" | "breadcrumbs.pDisk" | "breadcrumbs.vDisk" | "breadcrumbs.tablet" | "breadcrumbs.tablets", params?: import("@gravity-ui/i18n").Params | undefined) => string;
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useEffect, useLayoutEffect, useRef, useState } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import cn from 'bem-cn-lite';
5
- import _ from 'lodash';
5
+ import throttle from 'lodash/throttle';
6
6
  import { basename as appBasename } from '../../../store/index';
7
7
  import routes, { createHref } from '../../../routes';
8
8
  const b = cn('heatmap');
@@ -100,7 +100,7 @@ export const HeatmapCanvas = (props) => {
100
100
  props.hideTooltip();
101
101
  }, 40);
102
102
  };
103
- const _onCanvasMouseMove = _.throttle((x, y) => {
103
+ const _onCanvasMouseMove = throttle((x, y) => {
104
104
  //this is needed to force ReduxPopup rerender
105
105
  const event = new CustomEvent('scroll');
106
106
  window.dispatchEvent(event);
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useEffect, useRef } from 'react';
3
3
  import url from 'url';
4
- import { isEmpty } from 'lodash/fp';
4
+ import isEmpty from 'lodash/isEmpty';
5
5
  import cn from 'bem-cn-lite';
6
6
  import { Loader } from '../.././../components/Loader';
7
7
  import { getNodeStructure } from '../../../store/reducers/node/node';
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
3
  import cn from 'bem-cn-lite';
4
- import { isEmpty } from 'lodash/fp';
4
+ import isEmpty from 'lodash/isEmpty';
5
5
  import { ArrowToggle, Button, Popover } from '@gravity-ui/uikit';
6
6
  import DataTable from '@gravity-ui/react-data-table';
7
7
  import { EFlag } from '../../../types/api/enums';
@@ -78,7 +78,7 @@ function getColumns({ pDiskId, selectedVdiskId, nodeId, }) {
78
78
  header: vDiskTableColumnsNames[VDiskTableColumnsIds.Info],
79
79
  width: 70,
80
80
  render: ({ row }) => {
81
- return (_jsx(Popover, Object.assign({ placement: ['right'], content: _jsx(Vdisk, Object.assign({}, row)), tooltipContentClassName: b('vdisk-details') }, { children: _jsx(Button, Object.assign({ view: "flat-secondary", className: b('vdisk-details-button', {
81
+ return (_jsx(Popover, Object.assign({ placement: ['right'], content: _jsx(Vdisk, { data: row }), tooltipContentClassName: b('vdisk-details') }, { children: _jsx(Button, Object.assign({ view: "flat-secondary", className: b('vdisk-details-button', {
82
82
  selected: row.id === selectedVdiskId,
83
83
  }) }, { children: _jsx(Icon, { name: "information", viewBox: "0 0 512 512", height: 16, width: 16 }) })) })));
84
84
  },
@@ -1,3 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { type TVDiskStateInfo } from '../../../types/api/vdisk';
3
- export declare function Vdisk({ AllocatedSize, DiskSpace, FrontQueues, Guid, Replicated, VDiskState, VDiskId, VDiskSlotId, Kind, SatisfactionRank, AvailableSize, HasUnreadableBlobs, IncarnationGuid, InstanceGuid, StoragePoolName, ReadThroughput, WriteThroughput, }: TVDiskStateInfo): JSX.Element;
2
+ import type { PreparedStructureVDisk } from '../../../store/reducers/node/types';
3
+ interface VDiskProps {
4
+ data: PreparedStructureVDisk;
5
+ }
6
+ export declare function Vdisk({ data }: VDiskProps): JSX.Element;
7
+ export {};
@@ -3,84 +3,11 @@ import React from 'react';
3
3
  import cn from 'bem-cn-lite';
4
4
  import { EVDiskState } from '../../../types/api/vdisk';
5
5
  import { EFlag } from '../../../types/api/enums';
6
- import { formatStorageValuesToGb, stringifyVdiskId, } from '../../../utils/dataFormatters/dataFormatters';
7
- import { bytesToGB, bytesToSpeed } from '../../../utils/utils';
8
- import { valueIsDefined } from '../../../utils';
6
+ import { stringifyVdiskId } from '../../../utils/dataFormatters/dataFormatters';
9
7
  import { EntityStatus } from '../../../components/EntityStatus/EntityStatus';
10
- import InfoViewer from '../../../components/InfoViewer/InfoViewer';
11
- import { ProgressViewer } from '../../../components/ProgressViewer/ProgressViewer';
8
+ import { VDiskInfo } from '../../../components/VDiskInfo/VDiskInfo';
12
9
  const b = cn('kv-node-structure');
13
- export function Vdisk({ AllocatedSize, DiskSpace, FrontQueues, Guid, Replicated, VDiskState, VDiskId, VDiskSlotId, Kind, SatisfactionRank, AvailableSize, HasUnreadableBlobs, IncarnationGuid, InstanceGuid, StoragePoolName, ReadThroughput, WriteThroughput, }) {
14
- var _a, _b, _c, _d;
15
- const vdiskInfo = [];
16
- if (valueIsDefined(VDiskSlotId)) {
17
- vdiskInfo.push({ label: 'VDisk Slot Id', value: VDiskSlotId });
18
- }
19
- if (valueIsDefined(Guid)) {
20
- vdiskInfo.push({ label: 'GUID', value: Guid });
21
- }
22
- if (valueIsDefined(Kind)) {
23
- vdiskInfo.push({ label: 'Kind', value: Kind });
24
- }
25
- if (valueIsDefined(VDiskState)) {
26
- vdiskInfo.push({
27
- label: 'VDisk State',
28
- value: VDiskState,
29
- });
30
- }
31
- if (valueIsDefined(DiskSpace)) {
32
- vdiskInfo.push({
33
- label: 'Disk Space',
34
- value: _jsx(EntityStatus, { status: DiskSpace }),
35
- });
36
- }
37
- if (valueIsDefined((_a = SatisfactionRank === null || SatisfactionRank === void 0 ? void 0 : SatisfactionRank.FreshRank) === null || _a === void 0 ? void 0 : _a.Flag)) {
38
- vdiskInfo.push({
39
- label: 'Fresh Rank Satisfaction',
40
- value: _jsx(EntityStatus, { status: (_b = SatisfactionRank === null || SatisfactionRank === void 0 ? void 0 : SatisfactionRank.FreshRank) === null || _b === void 0 ? void 0 : _b.Flag }),
41
- });
42
- }
43
- if (valueIsDefined((_c = SatisfactionRank === null || SatisfactionRank === void 0 ? void 0 : SatisfactionRank.LevelRank) === null || _c === void 0 ? void 0 : _c.Flag)) {
44
- vdiskInfo.push({
45
- label: 'Level Rank Satisfaction',
46
- value: _jsx(EntityStatus, { status: (_d = SatisfactionRank === null || SatisfactionRank === void 0 ? void 0 : SatisfactionRank.LevelRank) === null || _d === void 0 ? void 0 : _d.Flag }),
47
- });
48
- }
49
- vdiskInfo.push({ label: 'Replicated', value: Replicated ? 'Yes' : 'No' });
50
- vdiskInfo.push({ label: 'Allocated Size', value: bytesToGB(AllocatedSize) });
51
- vdiskInfo.push({ label: 'Available Size', value: bytesToGB(AvailableSize) });
52
- if (Number(AllocatedSize) >= 0 && Number(AvailableSize) >= 0) {
53
- vdiskInfo.push({
54
- label: 'Size',
55
- value: (_jsx(ProgressViewer, { value: AllocatedSize, capacity: Number(AllocatedSize) + Number(AvailableSize), formatValues: formatStorageValuesToGb, colorizeProgress: true })),
56
- });
57
- }
58
- vdiskInfo.push({
59
- label: 'Has Unreadable Blobs',
60
- value: HasUnreadableBlobs ? 'Yes' : 'No',
61
- });
62
- if (valueIsDefined(IncarnationGuid)) {
63
- vdiskInfo.push({ label: 'Incarnation GUID', value: IncarnationGuid });
64
- }
65
- if (valueIsDefined(InstanceGuid)) {
66
- vdiskInfo.push({ label: 'Instance GUID', value: InstanceGuid });
67
- }
68
- if (valueIsDefined(FrontQueues)) {
69
- vdiskInfo.push({
70
- label: 'Front Queues',
71
- value: _jsx(EntityStatus, { status: FrontQueues }),
72
- });
73
- }
74
- if (valueIsDefined(StoragePoolName)) {
75
- vdiskInfo.push({ label: 'Storage Pool Name', value: StoragePoolName });
76
- }
77
- vdiskInfo.push({
78
- label: 'Read Throughput',
79
- value: bytesToSpeed(ReadThroughput),
80
- });
81
- vdiskInfo.push({
82
- label: 'Write Throughput',
83
- value: bytesToSpeed(WriteThroughput),
84
- });
85
- return (_jsxs(React.Fragment, { children: [_jsxs("div", Object.assign({ className: b('row') }, { children: [_jsx("span", Object.assign({ className: b('title') }, { children: "VDisk " })), _jsx(EntityStatus, { status: VDiskState === EVDiskState.OK ? EFlag.Green : EFlag.Red, name: stringifyVdiskId(VDiskId) })] })), _jsx("div", Object.assign({ className: b('column') }, { children: _jsx(InfoViewer, { className: b('section'), info: vdiskInfo }) }))] }));
10
+ export function Vdisk({ data }) {
11
+ const { VDiskState, VDiskId } = data;
12
+ return (_jsxs(React.Fragment, { children: [_jsxs("div", Object.assign({ className: b('row') }, { children: [_jsx("span", Object.assign({ className: b('title') }, { children: "VDisk " })), _jsx(EntityStatus, { status: VDiskState === EVDiskState.OK ? EFlag.Green : EFlag.Red, name: stringifyVdiskId(VDiskId) })] })), _jsx("div", Object.assign({ className: b('column') }, { children: _jsx(VDiskInfo, { className: b('section'), data: data }) }))] }));
86
13
  }
@@ -68,7 +68,6 @@ const versionColumn = {
68
68
  return _jsx(CellWithPopover, Object.assign({ content: row.Version }, { children: row.Version }));
69
69
  },
70
70
  sortable: false,
71
- resizeable: true,
72
71
  };
73
72
  const uptimeColumn = {
74
73
  name: NODES_COLUMNS_IDS.Uptime,
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import './PDiskPage.scss';
3
+ export declare function PDiskPage(): JSX.Element;
@@ -6,19 +6,20 @@ import { Icon } from '@gravity-ui/uikit';
6
6
  import ArrowRotateLeftIcon from '@gravity-ui/icons/svgs/arrow-rotate-left.svg';
7
7
  import { getPDiskData, getPDiskStorage, setPDiskDataWasNotLoaded, } from '../../store/reducers/pdisk/pdisk';
8
8
  import { setHeaderBreadcrumbs } from '../../store/reducers/header/header';
9
- import { getNodesList, selectNodesMap } from '../../store/reducers/nodesList';
9
+ import { selectNodesMap } from '../../store/reducers/nodesList';
10
+ import { valueIsDefined } from '../../utils';
10
11
  import { useAutofetcher, useTypedDispatch, useTypedSelector } from '../../utils/hooks';
11
12
  import { getSeverityColor } from '../../utils/disks/helpers';
12
13
  import { PageMeta } from '../../components/PageMeta/PageMeta';
13
- import { StatusIcon } from '../../components/StatusIcon/StatusIcon';
14
14
  import { PDiskInfo } from '../../components/PDiskInfo/PDiskInfo';
15
15
  import { InfoViewerSkeleton } from '../../components/InfoViewerSkeleton/InfoViewerSkeleton';
16
+ import { DiskPageTitle } from '../../components/DiskPageTitle/DiskPageTitle';
16
17
  import { ButtonWithConfirmDialog } from '../../components/ButtonWithConfirmDialog/ButtonWithConfirmDialog';
17
18
  import { PDiskGroups } from './PDiskGroups';
18
19
  import { pdiskPageCn } from './shared';
19
20
  import { pDiskPageKeyset } from './i18n';
20
- import './PDisk.scss';
21
- export function PDisk() {
21
+ import './PDiskPage.scss';
22
+ export function PDiskPage() {
22
23
  const dispatch = useTypedDispatch();
23
24
  const nodesMap = useTypedSelector(selectNodesMap);
24
25
  const { pDiskData, groupsData, pDiskLoading, pDiskWasLoaded, groupsLoading, groupsWasLoaded } = useTypedSelector((state) => state.pDisk);
@@ -30,14 +31,11 @@ export function PDisk() {
30
31
  useEffect(() => {
31
32
  dispatch(setHeaderBreadcrumbs('pDisk', { nodeId, pDiskId }));
32
33
  }, [dispatch, nodeId, pDiskId]);
33
- useEffect(() => {
34
- dispatch(getNodesList());
35
- }, [dispatch]);
36
34
  const fetchData = useCallback(async (isBackground) => {
37
35
  if (!isBackground) {
38
36
  dispatch(setPDiskDataWasNotLoaded());
39
37
  }
40
- if (nodeId && pDiskId) {
38
+ if (valueIsDefined(nodeId) && valueIsDefined(pDiskId)) {
41
39
  return Promise.all([
42
40
  dispatch(getPDiskData({ nodeId, pDiskId })),
43
41
  dispatch(getPDiskStorage({ nodeId, pDiskId })),
@@ -47,7 +45,7 @@ export function PDisk() {
47
45
  }, [dispatch, nodeId, pDiskId]);
48
46
  useAutofetcher(fetchData, [fetchData], true);
49
47
  const handleRestart = async () => {
50
- if (nodeId && pDiskId) {
48
+ if (valueIsDefined(nodeId) && valueIsDefined(pDiskId)) {
51
49
  return window.api.restartPDisk(nodeId, pDiskId);
52
50
  }
53
51
  return undefined;
@@ -65,10 +63,10 @@ export function PDisk() {
65
63
  const renderPageMeta = () => {
66
64
  const hostItem = NodeHost ? `${pDiskPageKeyset('fqdn')}: ${NodeHost}` : undefined;
67
65
  const nodeIdItem = NodeId ? `${pDiskPageKeyset('node')}: ${NodeId}` : undefined;
68
- return (_jsx(PageMeta, { className: pdiskPageCn('meta'), items: [hostItem, nodeIdItem, NodeType, NodeDC] }));
66
+ return (_jsx(PageMeta, { className: pdiskPageCn('meta'), loading: pDiskLoading && !pDiskWasLoaded, items: [hostItem, nodeIdItem, NodeType, NodeDC] }));
69
67
  };
70
68
  const renderPageTitle = () => {
71
- return (_jsxs("div", Object.assign({ className: pdiskPageCn('title') }, { children: [_jsx("span", Object.assign({ className: pdiskPageCn('title__prefix') }, { children: pDiskPageKeyset('pdisk') })), _jsx(StatusIcon, { status: getSeverityColor(Severity), size: "s" }), pDiskId] })));
69
+ return (_jsx(DiskPageTitle, { entityName: pDiskPageKeyset('pdisk'), status: getSeverityColor(Severity), id: pDiskId, className: pdiskPageCn('title') }));
72
70
  };
73
71
  const renderControls = () => {
74
72
  return (_jsx("div", Object.assign({ className: pdiskPageCn('controls') }, { children: _jsxs(ButtonWithConfirmDialog, Object.assign({ onConfirmAction: handleRestart, onConfirmActionSuccess: handleAfterRestart, buttonDisabled: !nodeId || !pDiskId, buttonView: "normal", dialogContent: pDiskPageKeyset('restart-pdisk-dialog') }, { children: [_jsx(Icon, { data: ArrowRotateLeftIcon }), pDiskPageKeyset('restart-pdisk-button')] })) })));
@@ -22,20 +22,6 @@
22
22
  left: 0;
23
23
  }
24
24
 
25
- &__title {
26
- display: flex;
27
- flex-flow: row nowrap;
28
- align-items: baseline;
29
-
30
- @include header-2-typography();
31
-
32
- &__prefix {
33
- margin-right: 6px;
34
-
35
- color: var(--g-color-text-secondary);
36
- }
37
- }
38
-
39
25
  &__groups-title {
40
26
  @include header-1-typography();
41
27
  }
@@ -2,14 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useState, useRef } from 'react';
3
3
  import cn from 'bem-cn-lite';
4
4
  import { InternalLink } from '../../../components/InternalLink';
5
- import { Stack } from '../../../components/Stack/Stack';
5
+ import { VDiskWithDonorsStack } from '../../../components/VDisk/VDiskWithDonorsStack';
6
+ import { DiskStateProgressBar } from '../../../components/DiskStateProgressBar/DiskStateProgressBar';
7
+ import { PDiskPopup } from '../../../components/PDiskPopup/PDiskPopup';
6
8
  import routes, { createHref } from '../../../routes';
7
9
  import { stringifyVdiskId } from '../../../utils/dataFormatters/dataFormatters';
8
- import { isFullVDiskData } from '../../../utils/disks/helpers';
9
10
  import { STRUCTURE } from '../../Node/NodePages';
10
- import { DiskStateProgressBar } from '../DiskStateProgressBar';
11
- import { PDiskPopup } from '../PDiskPopup';
12
- import { VDisk } from '../VDisk';
13
11
  import './PDisk.scss';
14
12
  const b = cn('pdisk-storage');
15
13
  export const PDisk = ({ nodeId, data = {}, vDisks }) => {
@@ -26,15 +24,11 @@ export const PDisk = ({ nodeId, data = {}, vDisks }) => {
26
24
  return null;
27
25
  }
28
26
  return (_jsx("div", Object.assign({ className: b('vdisks') }, { children: vDisks.map((vdisk) => {
29
- const donors = vdisk.Donors;
30
27
  return (_jsx("div", Object.assign({ className: b('vdisks-item'), style: {
31
28
  // 1 is small enough for empty disks to be of the minimum width
32
29
  // but if all of them are empty, `flex-grow: 1` would size them evenly
33
30
  flexGrow: Number(vdisk.AllocatedSize) || 1,
34
- } }, { children: donors && donors.length ? (_jsxs(Stack, Object.assign({ className: b('donors-stack') }, { children: [_jsx(VDisk, { data: vdisk, compact: true }), donors.map((donor) => {
35
- const isFullData = isFullVDiskData(donor);
36
- return (_jsx(VDisk, { compact: true, data: donor }, stringifyVdiskId(isFullData ? donor.VDiskId : donor)));
37
- })] }), stringifyVdiskId(vdisk.VDiskId))) : (_jsx(VDisk, { data: vdisk, compact: true })) }), stringifyVdiskId(vdisk.VDiskId)));
31
+ } }, { children: _jsx(VDiskWithDonorsStack, { data: vdisk, compact: true, stackClassName: b('donors-stack') }) }), stringifyVdiskId(vdisk.VDiskId)));
38
32
  }) })));
39
33
  };
40
34
  return (_jsxs(React.Fragment, { children: [_jsx(PDiskPopup, { data: data, anchorRef: anchor, open: isPopupVisible }), _jsxs("div", Object.assign({ className: b(), ref: anchor }, { children: [renderVDisks(), _jsxs(InternalLink, Object.assign({ to: createHref(routes.node, { id: nodeId, activeTab: STRUCTURE }, { pdiskId: data.PDiskId || '' }), className: b('content'), onMouseEnter: showPopup, onMouseLeave: hidePopup }, { children: [_jsx(DiskStateProgressBar, { diskAllocatedPercent: data.AllocatedPercent, severity: data.Severity }), _jsx("div", Object.assign({ className: b('media-type') }, { children: data.Type }))] }))] }))] }));
@@ -25,8 +25,6 @@
25
25
  flex-shrink: 0;
26
26
 
27
27
  .stack__layer {
28
- background: var(--g-color-base-background);
29
-
30
28
  .data-table__row:hover & {
31
29
  background: var(--ydb-data-table-color-hover);
32
30
  }
@@ -6,7 +6,7 @@ import { ResponseError } from '../../components/Errors/ResponseError';
6
6
  import { setInitialState, setVisibleEntities, setStorageTextFilter, setUsageFilter, setStorageType, setNodesUptimeFilter, setDataWasNotLoaded, getStorageNodesInfo, getStorageGroupsInfo, setNodesSortParams, setGroupsSortParams, } from '../../store/reducers/storage/storage';
7
7
  import { selectFilteredGroups, selectFilteredNodes, selectEntitiesCount, selectUsageFilterOptions, selectNodesSortParams, selectGroupsSortParams, } from '../../store/reducers/storage/selectors';
8
8
  import { VISIBLE_ENTITIES, STORAGE_TYPES } from '../../store/reducers/storage/constants';
9
- import { getNodesList, selectNodesMap } from '../../store/reducers/nodesList';
9
+ import { selectNodesMap } from '../../store/reducers/nodesList';
10
10
  import { useAutofetcher, useNodesRequestParams, useStorageRequestParams, useTableSort, useTypedSelector, useTypedDispatch, } from '../../utils/hooks';
11
11
  import { NodesUptimeFilterValues } from '../../utils/nodes';
12
12
  import { DEFAULT_TABLE_SETTINGS } from '../../utils/constants';
@@ -30,7 +30,6 @@ export const Storage = ({ additionalNodesProps, tenant, nodeId }) => {
30
30
  const isNodePage = nodeId !== undefined;
31
31
  const storageType = isNodePage ? STORAGE_TYPES.groups : type;
32
32
  useEffect(() => {
33
- dispatch(getNodesList());
34
33
  return () => {
35
34
  // Clean data on component unmount
36
35
  dispatch(setInitialState());
@@ -6,6 +6,7 @@
6
6
  &__vdisks-wrapper {
7
7
  display: flex;
8
8
  justify-content: center;
9
+ gap: 10px;
9
10
 
10
11
  min-width: 500px;
11
12
  }
@@ -13,15 +14,8 @@
13
14
  flex-grow: 1;
14
15
 
15
16
  max-width: 200px;
16
- margin-right: 10px;
17
-
18
- &:last-child {
19
- margin-right: 0px;
20
- }
21
17
 
22
18
  .stack__layer {
23
- background: var(--g-color-base-background);
24
-
25
19
  .data-table__row:hover & {
26
20
  background: var(--ydb-data-table-color-hover);
27
21
  }
@@ -6,7 +6,7 @@ import './StorageGroups.scss';
6
6
  type StorageGroupsColumn = VirtualTableColumn<PreparedStorageGroup> & DataTableColumn<PreparedStorageGroup>;
7
7
  export declare const GROUPS_COLUMNS_IDS: {
8
8
  readonly PoolName: "PoolName";
9
- readonly Kind: "Kind";
9
+ readonly MediaType: "MediaType";
10
10
  readonly Erasure: "Erasure";
11
11
  readonly GroupId: "GroupId";
12
12
  readonly Used: "Used";
@@ -6,21 +6,19 @@ import { EFlag } from '../../../types/api/enums';
6
6
  import shieldIcon from '../../../assets/icons/shield.svg';
7
7
  import { VISIBLE_ENTITIES } from '../../../store/reducers/storage/constants';
8
8
  import { isSortableStorageProperty } from '../../../utils/storage';
9
- import { isFullVDiskData } from '../../../utils/disks/helpers';
10
9
  import { bytesToGB, bytesToSpeed } from '../../../utils/utils';
11
10
  import { stringifyVdiskId } from '../../../utils/dataFormatters/dataFormatters';
12
11
  import { EntityStatus } from '../../../components/EntityStatus/EntityStatus';
13
- import { Stack } from '../../../components/Stack/Stack';
14
12
  import { CellWithPopover } from '../../../components/CellWithPopover/CellWithPopover';
15
13
  import { UsageLabel } from '../../../components/UsageLabel/UsageLabel';
16
- import { VDisk } from '../VDisk';
14
+ import { VDiskWithDonorsStack } from '../../../components/VDisk/VDiskWithDonorsStack';
17
15
  import { getDegradedSeverity, getUsageSeverityForStorageGroup } from '../utils';
18
16
  import i18n from './i18n';
19
17
  import './StorageGroups.scss';
20
18
  const b = cn('global-storage-groups');
21
19
  export const GROUPS_COLUMNS_IDS = {
22
20
  PoolName: 'PoolName',
23
- Kind: 'Kind',
21
+ MediaType: 'MediaType',
24
22
  Erasure: 'Erasure',
25
23
  GroupId: 'GroupId',
26
24
  Used: 'Used',
@@ -43,12 +41,12 @@ const poolNameColumn = {
43
41
  },
44
42
  align: DataTable.LEFT,
45
43
  };
46
- const kindColumn = {
47
- name: GROUPS_COLUMNS_IDS.Kind,
44
+ const typeColumn = {
45
+ name: GROUPS_COLUMNS_IDS.MediaType,
48
46
  header: 'Type',
49
47
  width: 100,
50
48
  align: DataTable.LEFT,
51
- render: ({ row }) => (_jsxs(_Fragment, { children: [_jsx(Label, { children: row.Kind || '—' }), '\u00a0', row.Encryption && (_jsx(Popover, Object.assign({ content: i18n('encrypted'), placement: "right", behavior: PopoverBehavior.Immediate }, { children: _jsx(Label, { children: _jsx(Icon, { data: shieldIcon }) }) })))] })),
49
+ render: ({ row }) => (_jsxs(_Fragment, { children: [_jsx(Label, { children: row.MediaType || '—' }), '\u00a0', row.Encryption && (_jsx(Popover, Object.assign({ content: i18n('encrypted'), placement: "right", behavior: PopoverBehavior.Immediate }, { children: _jsx(Label, { children: _jsx(Icon, { data: shieldIcon }) }) })))] })),
52
50
  sortable: false,
53
51
  };
54
52
  const erasureColumn = {
@@ -157,25 +155,19 @@ const getVdiscksColumn = (nodes) => ({
157
155
  render: ({ row }) => {
158
156
  var _a;
159
157
  return (_jsx("div", Object.assign({ className: b('vdisks-wrapper') }, { children: (_a = row.VDisks) === null || _a === void 0 ? void 0 : _a.map((vDisk) => {
160
- const donors = vDisk.Donors;
161
- return donors && donors.length > 0 ? (_jsxs(Stack, Object.assign({ className: b('vdisks-item') }, { children: [_jsx(VDisk, { data: vDisk, nodes: nodes }), donors.map((donor) => {
162
- const isFullData = isFullVDiskData(donor);
163
- return (_jsx(VDisk, { data: donor,
164
- // donor and acceptor are always in the same group
165
- nodes: nodes }, stringifyVdiskId(isFullData ? donor.VDiskId : donor)));
166
- })] }), stringifyVdiskId(vDisk.VDiskId))) : (_jsx("div", Object.assign({ className: b('vdisks-item') }, { children: _jsx(VDisk, { data: vDisk, nodes: nodes }) }), stringifyVdiskId(vDisk.VDiskId)));
158
+ return (_jsx(VDiskWithDonorsStack, { data: vDisk, nodes: nodes, className: b('vdisks-item') }, stringifyVdiskId(vDisk.VDiskId)));
167
159
  }) })));
168
160
  },
169
161
  align: DataTable.CENTER,
170
162
  width: 900,
171
163
  });
172
164
  export const getStorageTopGroupsColumns = () => {
173
- return [groupIdColumn, kindColumn, erasureColumn, usageColumn, usedColumn, limitColumn];
165
+ return [groupIdColumn, typeColumn, erasureColumn, usageColumn, usedColumn, limitColumn];
174
166
  };
175
167
  export const getPDiskStorageColumns = (nodes) => {
176
168
  return [
177
169
  poolNameColumn,
178
- kindColumn,
170
+ typeColumn,
179
171
  erasureColumn,
180
172
  degradedColumn,
181
173
  groupIdColumn,
@@ -187,7 +179,7 @@ export const getPDiskStorageColumns = (nodes) => {
187
179
  const getStorageGroupsColumns = (nodes) => {
188
180
  return [
189
181
  poolNameColumn,
190
- kindColumn,
182
+ typeColumn,
191
183
  erasureColumn,
192
184
  degradedColumn,
193
185
  usageColumn,
@@ -1,24 +1,20 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useEffect, useState } from 'react';
2
+ import { useState } from 'react';
3
3
  import { STORAGE_TYPES, VISIBLE_ENTITIES } from '../../store/reducers/storage/constants';
4
4
  import { NodesUptimeFilterValues } from '../../utils/nodes';
5
5
  import { AccessDenied } from '../../components/Errors/403/AccessDenied';
6
6
  import { ResponseError } from '../../components/Errors/ResponseError/ResponseError';
7
- import { getNodesList, selectNodesMap } from '../../store/reducers/nodesList';
8
- import { useTypedSelector, useTypedDispatch } from '../../utils/hooks';
7
+ import { selectNodesMap } from '../../store/reducers/nodesList';
8
+ import { useTypedSelector } from '../../utils/hooks';
9
9
  import { StorageControls } from './StorageControls/StorageControls';
10
10
  import { VirtualStorageGroups } from './StorageGroups/VirtualStorageGroups';
11
11
  import { VirtualStorageNodes } from './StorageNodes/VirtualStorageNodes';
12
12
  export const VirtualStorage = ({ tenant, nodeId, parentContainer, additionalNodesProps, }) => {
13
- const dispatch = useTypedDispatch();
14
13
  const [searchValue, setSearchValue] = useState('');
15
14
  const [storageType, setStorageType] = useState(STORAGE_TYPES.groups);
16
15
  const [visibleEntities, setVisibleEntities] = useState(VISIBLE_ENTITIES.all);
17
16
  const [nodesUptimeFilter, setNodesUptimeFilter] = useState(NodesUptimeFilterValues.All);
18
17
  const nodesMap = useTypedSelector(selectNodesMap);
19
- useEffect(() => {
20
- dispatch(getNodesList());
21
- }, [dispatch]);
22
18
  const handleShowAllGroups = () => {
23
19
  setVisibleEntities(VISIBLE_ENTITIES.all);
24
20
  };