ydb-embedded-ui 5.3.0 → 5.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) 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 +12 -5
  12. package/dist/components/MetricChart/colors.d.ts +2 -0
  13. package/dist/components/MetricChart/colors.js +21 -0
  14. package/dist/components/MetricChart/getDefaultDataFormatter.js +9 -0
  15. package/dist/components/MetricChart/types.d.ts +11 -2
  16. package/dist/components/MonacoEditor/MonacoEditor.d.ts +2 -0
  17. package/dist/components/MonacoEditor/MonacoEditor.js +7 -0
  18. package/dist/{containers/Storage → components}/PDiskPopup/PDiskPopup.d.ts +3 -3
  19. package/dist/{containers/Storage → components}/PDiskPopup/PDiskPopup.js +6 -5
  20. package/dist/components/PageMeta/PageMeta.d.ts +2 -1
  21. package/dist/components/PageMeta/PageMeta.js +9 -2
  22. package/dist/components/PageMeta/PageMeta.scss +9 -0
  23. package/dist/components/Stack/Stack.scss +2 -0
  24. package/dist/{containers/Storage → components}/VDisk/VDisk.d.ts +2 -2
  25. package/dist/{containers/Storage → components}/VDisk/VDisk.js +8 -8
  26. package/dist/{containers/Storage → components}/VDisk/VDisk.scss +1 -1
  27. package/dist/components/VDisk/VDiskWithDonorsStack.d.ts +12 -0
  28. package/dist/components/VDisk/VDiskWithDonorsStack.js +14 -0
  29. package/dist/components/VDiskInfo/VDiskInfo.d.ts +10 -0
  30. package/dist/components/VDiskInfo/VDiskInfo.js +113 -0
  31. package/dist/components/VDiskInfo/VDiskInfo.scss +8 -0
  32. package/dist/components/VDiskInfo/i18n/en.json +23 -0
  33. package/dist/components/VDiskInfo/i18n/index.d.ts +1 -0
  34. package/dist/components/VDiskInfo/i18n/index.js +4 -0
  35. package/dist/{containers/Storage → components}/VDiskPopup/VDiskPopup.d.ts +3 -3
  36. package/dist/{containers/Storage → components}/VDiskPopup/VDiskPopup.js +8 -7
  37. package/dist/components/VirtualTable/TableHead.d.ts +2 -1
  38. package/dist/components/VirtualTable/TableHead.js +6 -6
  39. package/dist/components/VirtualTable/constants.d.ts +1 -0
  40. package/dist/components/VirtualTable/constants.js +1 -0
  41. package/dist/containers/App/App.js +0 -2
  42. package/dist/containers/App/App.scss +3 -0
  43. package/dist/containers/App/Content.js +19 -5
  44. package/dist/containers/App/appSlots.d.ts +9 -3
  45. package/dist/containers/App/appSlots.js +2 -1
  46. package/dist/containers/Header/breadcrumbs.js +12 -0
  47. package/dist/containers/Header/i18n/en.json +1 -0
  48. package/dist/containers/Header/i18n/index.d.ts +1 -1
  49. package/dist/containers/Heatmap/HeatmapCanvas/HeatmapCanvas.js +2 -2
  50. package/dist/containers/Node/NodeStructure/NodeStructure.js +1 -1
  51. package/dist/containers/Node/NodeStructure/Pdisk.js +2 -2
  52. package/dist/containers/Node/NodeStructure/Vdisk.d.ts +6 -2
  53. package/dist/containers/Node/NodeStructure/Vdisk.js +5 -78
  54. package/dist/containers/Nodes/getNodesColumns.js +0 -1
  55. package/dist/containers/PDiskPage/PDiskPage.d.ts +3 -0
  56. package/dist/containers/{PDisk/PDisk.js → PDiskPage/PDiskPage.js} +30 -14
  57. package/dist/containers/{PDisk/PDisk.scss → PDiskPage/PDiskPage.scss} +1 -14
  58. package/dist/containers/PDiskPage/i18n/en.json +8 -0
  59. package/dist/containers/PDiskPage/i18n/index.d.ts +1 -0
  60. package/dist/containers/Storage/PDisk/PDisk.js +4 -10
  61. package/dist/containers/Storage/PDisk/PDisk.scss +0 -2
  62. package/dist/containers/Storage/Storage.js +1 -2
  63. package/dist/containers/Storage/StorageGroups/StorageGroups.scss +1 -7
  64. package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.d.ts +1 -1
  65. package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js +9 -17
  66. package/dist/containers/Storage/VirtualStorage.js +3 -7
  67. package/dist/containers/Tablet/TabletControls/TabletControls.js +2 -1
  68. package/dist/containers/TabletsFilters/TabletsFilters.d.ts +2 -2
  69. package/dist/containers/TabletsFilters/TabletsFilters.js +7 -6
  70. package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.js +1 -1
  71. package/dist/containers/Tenant/Diagnostics/Network/Network.js +2 -2
  72. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +1 -2
  73. package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.js +1 -1
  74. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/cpuDashboardConfig.js +14 -5
  75. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/en.json +1 -1
  76. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +5 -3
  77. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +6 -4
  78. package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.js +2 -2
  79. package/dist/containers/Tenant/Tenant.js +10 -5
  80. package/dist/containers/Tenants/Tenants.js +3 -2
  81. package/dist/containers/VDiskPage/VDiskPage.d.ts +3 -0
  82. package/dist/containers/VDiskPage/VDiskPage.js +109 -0
  83. package/dist/containers/VDiskPage/VDiskPage.scss +32 -0
  84. package/dist/containers/VDiskPage/i18n/en.json +9 -0
  85. package/dist/containers/VDiskPage/i18n/index.d.ts +1 -0
  86. package/dist/containers/VDiskPage/i18n/index.js +4 -0
  87. package/dist/containers/Versions/groupNodes.js +1 -1
  88. package/dist/routes.d.ts +3 -0
  89. package/dist/routes.js +5 -0
  90. package/dist/services/api.d.ts +12 -4
  91. package/dist/services/api.js +39 -4
  92. package/dist/store/configureStore.d.ts +4 -0
  93. package/dist/store/defaultStore.d.ts +2 -0
  94. package/dist/store/reducers/authentication/authentication.d.ts +3 -0
  95. package/dist/store/reducers/cluster/cluster.d.ts +1 -0
  96. package/dist/store/reducers/clusterNodes/clusterNodes.d.ts +1 -0
  97. package/dist/store/reducers/clusters/clusters.d.ts +1 -0
  98. package/dist/store/reducers/clusters/selectors.js +1 -1
  99. package/dist/store/reducers/describe.d.ts +2 -0
  100. package/dist/store/reducers/executeQuery.d.ts +1 -0
  101. package/dist/store/reducers/explainQuery.d.ts +2 -0
  102. package/dist/store/reducers/header/types.d.ts +4 -1
  103. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +1 -0
  104. package/dist/store/reducers/heatmap.d.ts +1 -0
  105. package/dist/store/reducers/host.d.ts +1 -0
  106. package/dist/store/reducers/index.d.ts +3 -0
  107. package/dist/store/reducers/index.js +2 -0
  108. package/dist/store/reducers/network/network.d.ts +1 -0
  109. package/dist/store/reducers/node/node.d.ts +2 -0
  110. package/dist/store/reducers/node/selectors.js +1 -1
  111. package/dist/store/reducers/nodes/nodes.d.ts +2 -0
  112. package/dist/store/reducers/nodesList.d.ts +1 -0
  113. package/dist/store/reducers/olapStats.d.ts +1 -0
  114. package/dist/store/reducers/overview/overview.d.ts +2 -0
  115. package/dist/store/reducers/partitions/partitions.d.ts +1 -0
  116. package/dist/store/reducers/pdisk/pdisk.d.ts +2 -0
  117. package/dist/store/reducers/pdisk/utils.js +1 -1
  118. package/dist/store/reducers/preview.d.ts +1 -0
  119. package/dist/store/reducers/schema/schema.d.ts +1 -0
  120. package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +1 -0
  121. package/dist/store/reducers/shardsWorkload/shardsWorkload.d.ts +1 -0
  122. package/dist/store/reducers/storage/storage.d.ts +2 -0
  123. package/dist/store/reducers/storage/types.d.ts +3 -1
  124. package/dist/store/reducers/storage/utils.d.ts +1 -1
  125. package/dist/store/reducers/storage/utils.js +8 -9
  126. package/dist/store/reducers/tablet.d.ts +2 -0
  127. package/dist/store/reducers/tablets.d.ts +1 -0
  128. package/dist/store/reducers/tabletsFilters.d.ts +1 -0
  129. package/dist/store/reducers/tenant/tenant.d.ts +1 -0
  130. package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.d.ts +1 -0
  131. package/dist/store/reducers/tenantOverview/topNodesByCpu/topNodesByCpu.d.ts +1 -0
  132. package/dist/store/reducers/tenantOverview/topNodesByLoad/topNodesByLoad.d.ts +1 -0
  133. package/dist/store/reducers/tenantOverview/topNodesByMemory/topNodesByMemory.d.ts +1 -0
  134. package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.d.ts +1 -0
  135. package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.d.ts +1 -0
  136. package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.d.ts +1 -0
  137. package/dist/store/reducers/tenants/selectors.js +1 -1
  138. package/dist/store/reducers/tenants/tenants.d.ts +1 -0
  139. package/dist/store/reducers/topic.d.ts +1 -0
  140. package/dist/store/reducers/vdisk/types.d.ts +25 -0
  141. package/dist/store/reducers/vdisk/utils.d.ts +11 -0
  142. package/dist/store/reducers/vdisk/utils.js +33 -0
  143. package/dist/store/reducers/vdisk/vdisk.d.ts +100 -0
  144. package/dist/store/reducers/vdisk/vdisk.js +64 -0
  145. package/dist/store/state-url-mapping.js +6 -4
  146. package/dist/types/api/storage.d.ts +2 -0
  147. package/dist/utils/bytesParsers/__test__/formatBytes.test.js +7 -7
  148. package/dist/utils/clusterVersionColors.js +1 -1
  149. package/dist/utils/dataFormatters/dataFormatters.js +1 -0
  150. package/dist/utils/disks/constants.js +2 -2
  151. package/dist/utils/disks/types.d.ts +5 -1
  152. package/dist/utils/filters.js +1 -1
  153. package/dist/utils/hooks/useTableResize.d.ts +1 -1
  154. package/dist/utils/hooks/useTableResize.js +5 -3
  155. package/dist/utils/lazyComponent.d.ts +4 -0
  156. package/dist/utils/lazyComponent.js +25 -0
  157. package/dist/utils/monaco/index.d.ts +1 -0
  158. package/dist/utils/monaco/index.js +4 -0
  159. package/dist/utils/monaco/s-expression/constants.d.ts +1 -0
  160. package/dist/utils/monaco/s-expression/constants.js +1 -0
  161. package/dist/utils/monaco/s-expression/registerLanguage.d.ts +1 -0
  162. package/dist/utils/{monaco.js → monaco/s-expression/registerLanguage.js} +2 -19
  163. package/dist/utils/{yqlSuggestions → monaco/yqlSuggestions}/generateSuggestions.d.ts +2 -2
  164. package/dist/utils/{yqlSuggestions → monaco/yqlSuggestions}/generateSuggestions.js +40 -11
  165. package/dist/utils/monaco/yqlSuggestions/registerCompletionItemProvider.d.ts +1 -0
  166. package/dist/utils/monaco/yqlSuggestions/registerCompletionItemProvider.js +15 -0
  167. package/dist/utils/{yqlSuggestions → monaco/yqlSuggestions}/yqlSuggestions.js +1 -1
  168. package/dist/utils/numeral.js +7 -1
  169. package/dist/utils/storage.d.ts +1 -0
  170. package/dist/utils/storage.js +1 -0
  171. package/dist/utils/timeParsers/parsers.js +1 -1
  172. package/package.json +5 -2
  173. package/dist/containers/PDisk/PDisk.d.ts +0 -3
  174. package/dist/containers/PDisk/i18n/en.json +0 -6
  175. package/dist/containers/PDisk/i18n/index.d.ts +0 -1
  176. package/dist/containers/Storage/DiskStateProgressBar/index.d.ts +0 -1
  177. package/dist/containers/Storage/DiskStateProgressBar/index.js +0 -1
  178. package/dist/containers/Storage/PDiskPopup/index.d.ts +0 -1
  179. package/dist/containers/Storage/PDiskPopup/index.js +0 -1
  180. package/dist/containers/Storage/VDisk/index.d.ts +0 -1
  181. package/dist/containers/Storage/VDisk/index.js +0 -1
  182. package/dist/containers/Storage/VDiskPopup/index.d.ts +0 -1
  183. package/dist/containers/Storage/VDiskPopup/index.js +0 -1
  184. package/dist/containers/Storage/utils/types.d.ts +0 -5
  185. package/dist/utils/monaco.d.ts +0 -3
  186. /package/dist/{containers/Storage → components}/DiskStateProgressBar/DiskStateProgressBar.d.ts +0 -0
  187. /package/dist/{containers/Storage → components}/DiskStateProgressBar/DiskStateProgressBar.scss +0 -0
  188. /package/dist/{containers/Storage → components}/PDiskPopup/PDiskPopup.scss +0 -0
  189. /package/dist/{containers/Storage → components}/VDiskPopup/VDiskPopup.scss +0 -0
  190. /package/dist/containers/{PDisk → PDiskPage}/PDiskGroups.d.ts +0 -0
  191. /package/dist/containers/{PDisk → PDiskPage}/PDiskGroups.js +0 -0
  192. /package/dist/containers/{PDisk → PDiskPage}/i18n/index.js +0 -0
  193. /package/dist/containers/{PDisk → PDiskPage}/shared.d.ts +0 -0
  194. /package/dist/containers/{PDisk → PDiskPage}/shared.js +0 -0
  195. /package/dist/{containers/Storage/utils → store/reducers/vdisk}/types.js +0 -0
  196. /package/dist/utils/{yqlSuggestions → monaco/yqlSuggestions}/constants.d.ts +0 -0
  197. /package/dist/utils/{yqlSuggestions → monaco/yqlSuggestions}/constants.js +0 -0
  198. /package/dist/utils/{yqlSuggestions → monaco/yqlSuggestions}/yqlSuggestions.d.ts +0 -0
@@ -21,7 +21,7 @@ const prepareVDisk = (vDisk, poolName) => {
21
21
  // VDisk doesn't have its own StoragePoolName when located inside StoragePool data
22
22
  return Object.assign(Object.assign({}, preparedVDisk), { StoragePoolName: poolName, Donors: (_a = preparedVDisk === null || preparedVDisk === void 0 ? void 0 : preparedVDisk.Donors) === null || _a === void 0 ? void 0 : _a.map((donor) => (Object.assign(Object.assign({}, donor), { StoragePoolName: poolName }))) });
23
23
  };
24
- export const prepareStorageGroupData = (group, poolName) => {
24
+ export const prepareStorageGroupData = (group, pool) => {
25
25
  var _a;
26
26
  let missing = 0;
27
27
  let usedSpaceFlag = 0;
@@ -29,7 +29,8 @@ export const prepareStorageGroupData = (group, poolName) => {
29
29
  let limitSizeBytes = 0;
30
30
  let readSpeedBytesPerSec = 0;
31
31
  let writeSpeedBytesPerSec = 0;
32
- let mediaType = '';
32
+ let mediaType;
33
+ const { Name: poolName, MediaType: poolMediaType } = pool;
33
34
  if (group.VDisks) {
34
35
  for (const vDisk of group.VDisks) {
35
36
  const { Replicated, VDiskState, AvailableSize, AllocatedSize, PDisk, DiskSpace, ReadThroughput, WriteThroughput, } = vDisk;
@@ -46,16 +47,15 @@ export const prepareStorageGroupData = (group, poolName) => {
46
47
  limitSizeBytes += available + allocated;
47
48
  readSpeedBytesPerSec += Number(ReadThroughput) || 0;
48
49
  writeSpeedBytesPerSec += Number(WriteThroughput) || 0;
49
- mediaType =
50
- PDiskType && (PDiskType === mediaType || mediaType === '') ? PDiskType : 'Mixed';
50
+ mediaType = PDiskType && (PDiskType === mediaType || !mediaType) ? PDiskType : 'Mixed';
51
51
  }
52
52
  }
53
53
  const vDisks = (_a = group.VDisks) === null || _a === void 0 ? void 0 : _a.map((vdisk) => prepareVDisk(vdisk, poolName));
54
54
  const usage = getUsage({ Used: usedSpaceBytes, Limit: limitSizeBytes }, 5);
55
- return Object.assign(Object.assign({}, group), { VDisks: vDisks, Usage: usage, Read: readSpeedBytesPerSec, Write: writeSpeedBytesPerSec, PoolName: poolName, Used: usedSpaceBytes, Limit: limitSizeBytes, Degraded: missing, UsedSpaceFlag: usedSpaceFlag, Kind: mediaType || undefined });
55
+ return Object.assign(Object.assign({}, group), { VDisks: vDisks, Usage: usage, Read: readSpeedBytesPerSec, Write: writeSpeedBytesPerSec, PoolName: poolName, Used: usedSpaceBytes, Limit: limitSizeBytes, Degraded: missing, UsedSpaceFlag: usedSpaceFlag, MediaType: poolMediaType || mediaType || undefined });
56
56
  };
57
57
  export const prepareStorageGroupDataV2 = (group) => {
58
- const { VDisks = [], PoolName, Usage = 0, Read = 0, Write = 0, Used = 0, Limit = 0, Degraded = 0, Kind, } = group;
58
+ const { VDisks = [], PoolName, Usage = 0, Read = 0, Write = 0, Used = 0, Limit = 0, Degraded = 0, Kind, MediaType, } = group;
59
59
  const UsedSpaceFlag = VDisks.reduce((acc, { DiskSpace }) => {
60
60
  if (DiskSpace && DiskSpace !== EFlag.Grey) {
61
61
  return acc + FLAGS_POINTS[DiskSpace];
@@ -65,8 +65,7 @@ export const prepareStorageGroupDataV2 = (group) => {
65
65
  const vDisks = VDisks.map((vdisk) => prepareVDisk(vdisk, PoolName));
66
66
  const usage = Math.floor(Number(Usage) * 100);
67
67
  return Object.assign(Object.assign({}, group), { UsedSpaceFlag,
68
- PoolName,
69
- Kind, VDisks: vDisks, Usage: usage, Read: Number(Read), Write: Number(Write), Used: Number(Used), Limit: Number(Limit), Degraded: Number(Degraded) });
68
+ PoolName, MediaType: MediaType || Kind, VDisks: vDisks, Usage: usage, Read: Number(Read), Write: Number(Write), Used: Number(Used), Limit: Number(Limit), Degraded: Number(Degraded) });
70
69
  };
71
70
  export const prepareStorageGroups = (StorageGroups, StoragePools) => {
72
71
  let preparedGroups = [];
@@ -77,7 +76,7 @@ export const prepareStorageGroups = (StorageGroups, StoragePools) => {
77
76
  StoragePools === null || StoragePools === void 0 ? void 0 : StoragePools.forEach((pool) => {
78
77
  var _a;
79
78
  (_a = pool.Groups) === null || _a === void 0 ? void 0 : _a.forEach((group) => {
80
- preparedGroups.push(prepareStorageGroupData(group, pool.Name));
79
+ preparedGroups.push(prepareStorageGroupData(group, pool));
81
80
  });
82
81
  });
83
82
  }
@@ -93,6 +93,7 @@ export declare const getTablet: (id: string) => (dispatch: import("redux").Dispa
93
93
  saveQuery: string | null;
94
94
  fullscreen: boolean;
95
95
  clusters: import("./clusters/types").ClustersState;
96
+ vDisk: import("./vdisk/types").VDiskState;
96
97
  }) => Promise<ITabletHandledResponse | undefined>;
97
98
  export declare const getTabletDescribe: (tenantId?: TDomainKey) => (dispatch: import("redux").Dispatch<import("redux").UnknownAction>, getState: () => {
98
99
  singleClusterMode: boolean;
@@ -175,6 +176,7 @@ export declare const getTabletDescribe: (tenantId?: TDomainKey) => (dispatch: im
175
176
  saveQuery: string | null;
176
177
  fullscreen: boolean;
177
178
  clusters: import("./clusters/types").ClustersState;
179
+ vDisk: import("./vdisk/types").VDiskState;
178
180
  }) => Promise<ITabletDescribeHandledResponse | undefined>;
179
181
  export declare const clearTabletData: () => {
180
182
  readonly type: "tablet/CLEAR_TABLET_DATA";
@@ -99,5 +99,6 @@ export declare function getTabletsInfo(data: ITabletsApiRequestParams): (dispatc
99
99
  saveQuery: string | null;
100
100
  fullscreen: boolean;
101
101
  clusters: import("./clusters/types").ClustersState;
102
+ vDisk: import("./vdisk/types").VDiskState;
102
103
  }) => Promise<unknown>;
103
104
  export default tablets;
@@ -79,6 +79,7 @@ export function getTabletsInfo(data: any): (dispatch: import("redux").Dispatch<i
79
79
  saveQuery: string | null;
80
80
  fullscreen: boolean;
81
81
  clusters: import("./clusters/types").ClustersState;
82
+ vDisk: import("./vdisk/types").VDiskState;
82
83
  }) => Promise<any>;
83
84
  export function clearWasLoadingFlag(): {
84
85
  type: string;
@@ -90,6 +90,7 @@ export declare const getTenantInfo: ({ path }: {
90
90
  saveQuery: string | null;
91
91
  fullscreen: boolean;
92
92
  clusters: import("../clusters/types").ClustersState;
93
+ vDisk: import("../vdisk/types").VDiskState;
93
94
  }) => Promise<TTenant | undefined>;
94
95
  export declare const clearTenant: () => {
95
96
  readonly type: "tenant/CLEAR_TENANT";
@@ -87,6 +87,7 @@ export declare const fetchTopTables: (database: string) => (dispatch: import("re
87
87
  saveQuery: string | null;
88
88
  fullscreen: boolean;
89
89
  clusters: import("../../clusters/types").ClustersState;
90
+ vDisk: import("../../vdisk/types").VDiskState;
90
91
  }) => Promise<import("../../../../types/store/query").IQueryResult | undefined>;
91
92
  export declare function setDataWasNotLoaded(): {
92
93
  readonly type: "top-tables/SET_DATA_WAS_NOT_LOADED";
@@ -88,6 +88,7 @@ export declare function getTopNodesByCpu({ type, sortOrder, sortValue, limit, ..
88
88
  saveQuery: string | null;
89
89
  fullscreen: boolean;
90
90
  clusters: import("../../clusters/types").ClustersState;
91
+ vDisk: import("../../vdisk/types").VDiskState;
91
92
  }) => Promise<import("../../nodes/types").NodesHandledResponse | undefined>;
92
93
  export declare const selectTopNodesByCpu: (state: TopPoolsStateSlice) => import("../../nodes/types").NodesPreparedEntity[] | undefined;
93
94
  export declare const setDataWasNotLoaded: () => {
@@ -88,6 +88,7 @@ export declare function getTopNodesByLoad({ type, sortOrder, sortValue, limit, .
88
88
  saveQuery: string | null;
89
89
  fullscreen: boolean;
90
90
  clusters: import("../../clusters/types").ClustersState;
91
+ vDisk: import("../../vdisk/types").VDiskState;
91
92
  }) => Promise<import("../../nodes/types").NodesHandledResponse | undefined>;
92
93
  export declare const selectTopNodesByLoad: (state: TopNodesByLoadStateSlice) => import("../../nodes/types").NodesPreparedEntity[] | undefined;
93
94
  export declare const setDataWasNotLoaded: () => {
@@ -88,6 +88,7 @@ export declare function getTopNodesByMemory({ type, sortOrder, sortValue, limit,
88
88
  saveQuery: string | null;
89
89
  fullscreen: boolean;
90
90
  clusters: import("../../clusters/types").ClustersState;
91
+ vDisk: import("../../vdisk/types").VDiskState;
91
92
  }) => Promise<import("../../nodes/types").NodesHandledResponse | undefined>;
92
93
  export declare const selectTopNodesByMemory: (state: TopNodesByMemorySlice) => import("../../nodes/types").NodesPreparedEntity[] | undefined;
93
94
  export declare const setDataWasNotLoaded: () => {
@@ -87,6 +87,7 @@ export declare const fetchTenantOverviewTopQueries: (database: string) => (dispa
87
87
  saveQuery: string | null;
88
88
  fullscreen: boolean;
89
89
  clusters: import("../../clusters/types").ClustersState;
90
+ vDisk: import("../../vdisk/types").VDiskState;
90
91
  }) => Promise<import("../../../../types/store/query").IQueryResult | undefined>;
91
92
  export declare function setDataWasNotLoaded(): {
92
93
  readonly type: "tenantOverviewTopQueries/SET_DATA_WAS_NOT_LOADED";
@@ -87,6 +87,7 @@ export declare const sendTenantOverviewTopShardsQuery: (database: string, path?:
87
87
  saveQuery: string | null;
88
88
  fullscreen: boolean;
89
89
  clusters: import("../../clusters/types").ClustersState;
90
+ vDisk: import("../../vdisk/types").VDiskState;
90
91
  }) => Promise<import("../../../../types/store/query").IQueryResult | undefined>;
91
92
  export declare function setDataWasNotLoaded(): {
92
93
  readonly type: "tenantOverviewTopShards/SET_DATA_WAS_NOT_LOADED";
@@ -88,6 +88,7 @@ export declare const getTopStorageGroups: ({ tenant, visibleEntities, nodeId, so
88
88
  saveQuery: string | null;
89
89
  fullscreen: boolean;
90
90
  clusters: import("../../clusters/types").ClustersState;
91
+ vDisk: import("../../vdisk/types").VDiskState;
91
92
  }) => Promise<import("./types").PreparedTopStorageGroupsResponse | undefined>;
92
93
  export declare const selectTopStorageGroups: (state: TopStorageGroupsStateSlice) => import("../../storage/types").PreparedStorageGroup[] | undefined;
93
94
  export declare const setDataWasNotLoaded: () => {
@@ -1,5 +1,5 @@
1
1
  import { createSelector } from '@reduxjs/toolkit';
2
- import { escapeRegExp } from 'lodash';
2
+ import escapeRegExp from 'lodash/escapeRegExp';
3
3
  import { EFlag } from '../../../types/api/enums';
4
4
  import { ProblemFilterValues, selectProblemFilter } from '../settings/settings';
5
5
  // ==== Filters ====
@@ -87,6 +87,7 @@ export declare function getTenantsInfo(clusterName?: string): (dispatch: import(
87
87
  saveQuery: string | null;
88
88
  fullscreen: boolean;
89
89
  clusters: import("../clusters/types").ClustersState;
90
+ vDisk: import("../vdisk/types").VDiskState;
90
91
  }) => Promise<{
91
92
  backend: string | undefined;
92
93
  sharedTenantName: string | undefined;
@@ -93,6 +93,7 @@ export declare function getTopic(path?: string): (dispatch: import("redux").Disp
93
93
  saveQuery: string | null;
94
94
  fullscreen: boolean;
95
95
  clusters: import("./clusters/types").ClustersState;
96
+ vDisk: import("./vdisk/types").VDiskState;
96
97
  }) => Promise<unknown>;
97
98
  export declare const selectConsumersNames: Selector<ITopicRootStateSlice, string[] | undefined>;
98
99
  export declare const selectPreparedTopicStats: Selector<ITopicRootStateSlice, IPreparedTopicStats | undefined>;
@@ -0,0 +1,25 @@
1
+ import type { IResponseError } from '../../../types/api/error';
2
+ import type { PreparedVDisk } from '../../../utils/disks/types';
3
+ import type { ApiRequestAction } from '../../utils';
4
+ import type { PreparedStorageGroup } from '../storage/types';
5
+ import type { FETCH_VDISK, setVDiskDataWasNotLoaded } from './vdisk';
6
+ export type VDiskGroup = Partial<PreparedStorageGroup>;
7
+ export interface VDiskData extends PreparedVDisk {
8
+ NodeId?: number;
9
+ NodeHost?: string;
10
+ NodeType?: string;
11
+ NodeDC?: string;
12
+ PDiskId?: number;
13
+ PDiskType?: string;
14
+ }
15
+ export interface VDiskState {
16
+ loading: boolean;
17
+ wasLoaded: boolean;
18
+ error?: IResponseError;
19
+ vDiskData: VDiskData;
20
+ groupData?: VDiskGroup;
21
+ }
22
+ export type VDiskAction = ApiRequestAction<typeof FETCH_VDISK, {
23
+ vDiskData: VDiskData;
24
+ groupData?: VDiskGroup;
25
+ }, IResponseError> | ReturnType<typeof setVDiskDataWasNotLoaded>;
@@ -0,0 +1,11 @@
1
+ import type { TEvPDiskStateResponse } from '../../../types/api/pdisk';
2
+ import type { TStorageInfo } from '../../../types/api/storage';
3
+ import type { TEvSystemStateResponse } from '../../../types/api/systemState';
4
+ import type { TEvVDiskStateResponse } from '../../../types/api/vdisk';
5
+ import type { VDiskData } from './types';
6
+ export declare function prepareVDiskDataResponse([vDiskResponse, pDiskResponse, nodeResponse]: [
7
+ TEvVDiskStateResponse,
8
+ TEvPDiskStateResponse,
9
+ TEvSystemStateResponse
10
+ ]): VDiskData;
11
+ export declare function prepareVDiskGroupResponse(data: TStorageInfo, poolName: string, groupId: number): import("../storage/types").PreparedStorageGroup | undefined;
@@ -0,0 +1,33 @@
1
+ import { preparePDiskData, prepareVDiskData } from '../../../utils/disks/prepareDisks';
2
+ import { prepareNodeSystemState } from '../../../utils/nodes';
3
+ import { prepareStorageGroupData } from '../storage/utils';
4
+ export function prepareVDiskDataResponse([vDiskResponse, pDiskResponse, nodeResponse]) {
5
+ var _a, _b, _c, _d, _e, _f, _g;
6
+ const rawVDisk = (_a = vDiskResponse.VDiskStateInfo) === null || _a === void 0 ? void 0 : _a[0];
7
+ const preparedVDisk = prepareVDiskData(rawVDisk);
8
+ const rawPDisk = (_b = pDiskResponse.PDiskStateInfo) === null || _b === void 0 ? void 0 : _b[0];
9
+ const preparedPDisk = preparePDiskData(rawPDisk);
10
+ const rawNode = (_c = nodeResponse.SystemStateInfo) === null || _c === void 0 ? void 0 : _c[0];
11
+ const preparedNode = prepareNodeSystemState(rawNode);
12
+ const NodeId = (_e = (_d = preparedVDisk.NodeId) !== null && _d !== void 0 ? _d : preparedPDisk.NodeId) !== null && _e !== void 0 ? _e : preparedNode.NodeId;
13
+ const NodeHost = preparedNode.Host;
14
+ const NodeType = (_f = preparedNode.Roles) === null || _f === void 0 ? void 0 : _f[0];
15
+ const NodeDC = preparedNode.DC;
16
+ const PDiskId = (_g = preparedVDisk.PDiskId) !== null && _g !== void 0 ? _g : preparedPDisk.PDiskId;
17
+ const PDiskType = preparedPDisk.Type;
18
+ return Object.assign(Object.assign({}, preparedVDisk), { NodeId,
19
+ NodeHost,
20
+ NodeType,
21
+ NodeDC,
22
+ PDiskId,
23
+ PDiskType });
24
+ }
25
+ export function prepareVDiskGroupResponse(data, poolName, groupId) {
26
+ var _a, _b;
27
+ const rawPoolData = (_a = data.StoragePools) === null || _a === void 0 ? void 0 : _a.find((pool) => pool.Name === poolName);
28
+ const rawGroupData = (_b = rawPoolData === null || rawPoolData === void 0 ? void 0 : rawPoolData.Groups) === null || _b === void 0 ? void 0 : _b.find((group) => group.GroupID === groupId);
29
+ if (rawGroupData && rawPoolData) {
30
+ return prepareStorageGroupData(rawGroupData, rawPoolData);
31
+ }
32
+ return undefined;
33
+ }
@@ -0,0 +1,100 @@
1
+ import type { Reducer } from '@reduxjs/toolkit';
2
+ import type { VDiskAction, VDiskState } from './types';
3
+ export declare const FETCH_VDISK: {
4
+ readonly REQUEST: "vdisk/FETCH_VDISK_REQUEST";
5
+ readonly SUCCESS: "vdisk/FETCH_VDISK_SUCCESS";
6
+ readonly FAILURE: "vdisk/FETCH_VDISK_FAILURE";
7
+ };
8
+ declare const vdisk: Reducer<VDiskState, VDiskAction>;
9
+ export declare const setVDiskDataWasNotLoaded: () => {
10
+ readonly type: "vdisk/SET_VDISK_DATA_WAS_NOT_LOADED";
11
+ };
12
+ interface VDiskDataRequestParams {
13
+ nodeId: number | string;
14
+ pDiskId: number | string;
15
+ vDiskSlotId: number | string;
16
+ }
17
+ export declare const getVDiskData: (params: VDiskDataRequestParams) => (dispatch: import("redux").Dispatch<import("redux").UnknownAction>, getState: () => {
18
+ singleClusterMode: boolean;
19
+ nodes: import("../nodes/types").NodesState;
20
+ topNodesByLoad: import("../tenantOverview/topNodesByLoad/types").TopNodesByLoadState;
21
+ topNodesByCpu: import("../tenantOverview/topNodesByCpu/types").TopNodesByCpuState;
22
+ topNodesByMemory: import("../tenantOverview/topNodesByMemory/types").TopNodesByMemoryState;
23
+ cluster: import("../cluster/types").ClusterState;
24
+ clusterNodes: import("../clusterNodes/types").ClusterNodesState;
25
+ tenant: import("../tenant/types").TenantState;
26
+ storage: import("../storage/types").StorageState;
27
+ topStorageGroups: import("../tenantOverview/topStorageGroups/types").TopStorageGroupsState;
28
+ node: import("../node/types").NodeState;
29
+ tooltip: import("../../../types/store/tooltip").ITooltipState;
30
+ tablets: import("../../../types/store/tablets").ITabletsState;
31
+ schema: import("../schema/types").SchemaState;
32
+ overview: import("../overview/types").OverviewState;
33
+ olapStats: import("../../../types/store/olapStats").OlapStatsState;
34
+ host: import("../../../types/store/host").IHostState;
35
+ network: import("../network/types").NetworkState;
36
+ tenants: import("../tenants/types").TenantsState;
37
+ tablet: import("../../../types/store/tablet").ITabletState;
38
+ topic: import("../../../types/store/topic").ITopicState;
39
+ partitions: import("../partitions/types").PartitionsState;
40
+ pDisk: import("../pdisk/types").PDiskState;
41
+ executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
42
+ explainQuery: import("../../../types/store/explainQuery").ExplainQueryState;
43
+ tabletsFilters: {
44
+ loading: boolean;
45
+ requestTime: number;
46
+ data: undefined;
47
+ wasLoaded: boolean;
48
+ stateFilter: never[];
49
+ typeFilter: never[];
50
+ } | {
51
+ tabletsData: any;
52
+ nodes: any;
53
+ loading: boolean;
54
+ wasLoaded: boolean;
55
+ timeoutForRequest: number;
56
+ error: undefined;
57
+ data: undefined;
58
+ stateFilter: never[];
59
+ typeFilter: never[];
60
+ } | {
61
+ error: any;
62
+ loading: boolean;
63
+ data: undefined;
64
+ wasLoaded: boolean;
65
+ stateFilter: never[];
66
+ typeFilter: never[];
67
+ } | {
68
+ stateFilter: any;
69
+ data: undefined;
70
+ loading: boolean;
71
+ wasLoaded: boolean;
72
+ typeFilter: never[];
73
+ } | {
74
+ typeFilter: any;
75
+ data: undefined;
76
+ loading: boolean;
77
+ wasLoaded: boolean;
78
+ stateFilter: never[];
79
+ };
80
+ heatmap: import("../../../types/store/heatmap").IHeatmapState;
81
+ settings: import("../settings/types").SettingsState;
82
+ preview: any;
83
+ nodesList: import("../../../types/store/nodesList").NodesListState;
84
+ describe: import("../../../types/store/describe").IDescribeState;
85
+ schemaAcl: import("../schemaAcl/types").SchemaAclState;
86
+ executeTopQueries: import("../executeTopQueries/types").ITopQueriesState;
87
+ executeTopTables: import("../tenantOverview/executeTopTables/types").TopTablesState;
88
+ tenantOverviewTopQueries: import("../tenantOverview/topQueries/types").TenantOverviewTopQueriesState;
89
+ healthcheckInfo: import("../healthcheckInfo/types").HealthcheckInfoState;
90
+ shardsWorkload: import("../shardsWorkload/types").IShardsWorkloadState;
91
+ tenantOverviewTopShards: import("../tenantOverview/topShards/types").TenantOverviewTopShardsState;
92
+ hotKeys: import("../hotKeys/types").HotKeysState;
93
+ authentication: import("../authentication/types").AuthenticationState;
94
+ header: import("../header/types").HeaderState;
95
+ saveQuery: string | null;
96
+ fullscreen: boolean;
97
+ clusters: import("../clusters/types").ClustersState;
98
+ vDisk: VDiskState;
99
+ }) => Promise<unknown>;
100
+ export default vdisk;
@@ -0,0 +1,64 @@
1
+ import { EVersion } from '../../../types/api/storage';
2
+ import { valueIsDefined } from '../../../utils';
3
+ import { createRequestActionTypes, createApiRequest } from '../../utils';
4
+ import { prepareVDiskDataResponse, prepareVDiskGroupResponse } from './utils';
5
+ export const FETCH_VDISK = createRequestActionTypes('vdisk', 'FETCH_VDISK');
6
+ const SET_VDISK_DATA_WAS_NOT_LOADED = 'vdisk/SET_VDISK_DATA_WAS_NOT_LOADED';
7
+ const initialState = {
8
+ loading: false,
9
+ wasLoaded: false,
10
+ vDiskData: {},
11
+ };
12
+ const vdisk = (state = initialState, action) => {
13
+ switch (action.type) {
14
+ case FETCH_VDISK.REQUEST: {
15
+ return Object.assign(Object.assign({}, state), { loading: true });
16
+ }
17
+ case FETCH_VDISK.SUCCESS: {
18
+ const { vDiskData, groupData } = action.data;
19
+ return Object.assign(Object.assign({}, state), { vDiskData,
20
+ groupData, loading: false, wasLoaded: true, error: undefined });
21
+ }
22
+ case FETCH_VDISK.FAILURE: {
23
+ return Object.assign(Object.assign({}, state), { error: action.error, loading: false });
24
+ }
25
+ case SET_VDISK_DATA_WAS_NOT_LOADED: {
26
+ return Object.assign(Object.assign({}, state), { wasLoaded: false });
27
+ }
28
+ default:
29
+ return state;
30
+ }
31
+ };
32
+ export const setVDiskDataWasNotLoaded = () => {
33
+ return {
34
+ type: SET_VDISK_DATA_WAS_NOT_LOADED,
35
+ };
36
+ };
37
+ const requestVDiskData = async ({ nodeId, pDiskId, vDiskSlotId }) => {
38
+ const vDiskDataResponse = await Promise.all([
39
+ window.api.getVdiskInfo({ nodeId, pDiskId, vDiskSlotId }),
40
+ window.api.getPdiskInfo(nodeId, pDiskId),
41
+ window.api.getNodeInfo(nodeId),
42
+ ]);
43
+ const vDiskData = prepareVDiskDataResponse(vDiskDataResponse);
44
+ const { StoragePoolName, VDiskId = {} } = vDiskData;
45
+ const { GroupID } = VDiskId;
46
+ let groupData;
47
+ if (valueIsDefined(StoragePoolName) && valueIsDefined(GroupID)) {
48
+ const groupResponse = await window.api.getStorageInfo({
49
+ nodeId,
50
+ poolName: StoragePoolName,
51
+ groupId: GroupID,
52
+ version: EVersion.v1,
53
+ });
54
+ groupData = prepareVDiskGroupResponse(groupResponse, StoragePoolName, GroupID);
55
+ }
56
+ return { vDiskData, groupData };
57
+ };
58
+ export const getVDiskData = (params) => {
59
+ return createApiRequest({
60
+ request: requestVDiskData(params),
61
+ actions: FETCH_VDISK,
62
+ });
63
+ };
64
+ export default vdisk;
@@ -1,7 +1,9 @@
1
1
  import { __rest } from "tslib";
2
2
  import { createReduxLocationActions } from 'redux-location-state';
3
3
  import qs from 'qs';
4
- import _ from 'lodash';
4
+ import each from 'lodash/each';
5
+ import keys from 'lodash/keys';
6
+ import merge from 'lodash/merge';
5
7
  import { stateToParams } from 'redux-location-state/lib/stateToParams';
6
8
  import { parseQuery } from 'redux-location-state/lib/parseQuery';
7
9
  import { LOCATION_PUSH, LOCATION_POP } from 'redux-location-state/lib/constants';
@@ -81,7 +83,7 @@ const paramSetup = {
81
83
  },
82
84
  };
83
85
  function mergeLocationToState(state, location) {
84
- return _.merge({}, state, location.query);
86
+ return merge({}, state, location.query);
85
87
  }
86
88
  function restoreUnknownParams(location, prevLocation) {
87
89
  const { search } = location, rest = __rest(location, ["search"]);
@@ -90,11 +92,11 @@ function restoreUnknownParams(location, prevLocation) {
90
92
  const declaredPath = getMatchingDeclaredPath(paramSetup, location);
91
93
  const entries = declaredPath && paramSetup[declaredPath];
92
94
  // remove params which are mapped for this page
93
- _.each(_.keys(entries), (param) => {
95
+ each(keys(entries), (param) => {
94
96
  delete params[param];
95
97
  });
96
98
  // and globally
97
- _.each(_.keys(paramSetup.global || {}), (param) => {
99
+ each(keys(paramSetup.global || {}), (param) => {
98
100
  delete params[param];
99
101
  });
100
102
  const restoredParams = qs.stringify(params, { encoder: encodeURIComponent });
@@ -31,10 +31,12 @@ export interface TStoragePoolInfo {
31
31
  MaximumThroughput?: string;
32
32
  /** uint64 */
33
33
  MaximumSize?: string;
34
+ MediaType?: string;
34
35
  }
35
36
  export interface TStorageGroupInfoV2 extends TStorageGroupInfo {
36
37
  PoolName?: string;
37
38
  Kind?: string;
39
+ MediaType?: string;
38
40
  /** uint64 */
39
41
  Degraded?: string;
40
42
  /** uint64 */
@@ -8,21 +8,21 @@ describe('formatBytes', () => {
8
8
  expect(formatBytes({ value: 100000000000000 })).toBe('100 TB');
9
9
  });
10
10
  it('should convert to size', () => {
11
- expect(formatBytes({ value: 100000, size: 'b' })).toBe('100,000 B');
12
- expect(formatBytes({ value: 100000000000000, size: 'gb' })).toBe('100,000 GB');
11
+ expect(formatBytes({ value: 100000, size: 'b' })).toBe('100 000 B');
12
+ expect(formatBytes({ value: 100000000000000, size: 'gb' })).toBe('100 000 GB');
13
13
  });
14
14
  it('should convert without labels', () => {
15
- expect(formatBytes({ value: 100000, size: 'b', withSizeLabel: false })).toBe('100,000');
16
- expect(formatBytes({ value: 100000000000000, size: 'gb', withSizeLabel: false })).toBe('100,000');
15
+ expect(formatBytes({ value: 100000, size: 'b', withSizeLabel: false })).toBe('100 000');
16
+ expect(formatBytes({ value: 100000000000000, size: 'gb', withSizeLabel: false })).toBe('100 000');
17
17
  });
18
18
  it('should convert to speed', () => {
19
19
  expect(formatBytes({ value: 100000, withSpeedLabel: true })).toBe('100 KB/s');
20
- expect(formatBytes({ value: 100000, size: 'b', withSpeedLabel: true })).toBe('100,000 B/s');
20
+ expect(formatBytes({ value: 100000, size: 'b', withSpeedLabel: true })).toBe('100 000 B/s');
21
21
  });
22
22
  it('should return fixed amount of significant digits', () => {
23
- expect(formatBytes({ value: 99000, significantDigits: 2 })).toEqual('99,000 B');
23
+ expect(formatBytes({ value: 99000, significantDigits: 2 })).toEqual('99 000 B');
24
24
  expect(formatBytes({ value: 100000, significantDigits: 2 })).toEqual('100 KB');
25
- expect(formatBytes({ value: 99000000000000, significantDigits: 2 })).toEqual('99,000 GB');
25
+ expect(formatBytes({ value: 99000000000000, significantDigits: 2 })).toEqual('99 000 GB');
26
26
  expect(formatBytes({ value: 100000000000000, significantDigits: 2 })).toEqual('100 TB');
27
27
  });
28
28
  it('should return empty string on invalid data', () => {
@@ -1,4 +1,4 @@
1
- import { uniqBy } from 'lodash';
1
+ import uniqBy from 'lodash/uniqBy';
2
2
  import { COLORS, GREY_COLOR, getMinorVersion, hashCode } from './versions';
3
3
  const UNDEFINED_COLOR_INDEX = '__no_color__';
4
4
  export const getVersionMap = (versions, initialMap = new Map()) => {
@@ -68,6 +68,7 @@ export const formatNumber = (number) => {
68
68
  if (!isNumeric(number)) {
69
69
  return '';
70
70
  }
71
+ // "," in format is delimiter sign, not delimiter itself
71
72
  return configuredNumeral(number).format('0,0.[00000]');
72
73
  };
73
74
  export const roundToPrecision = (value, precision = 0) => {
@@ -13,12 +13,12 @@ export const DISK_NUMERIC_SEVERITY_TO_STATE_COLOR = Object.entries(DISK_COLOR_ST
13
13
  export const NOT_AVAILABLE_SEVERITY = DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Grey;
14
14
  export const NOT_AVAILABLE_SEVERITY_COLOR = DISK_NUMERIC_SEVERITY_TO_STATE_COLOR[NOT_AVAILABLE_SEVERITY];
15
15
  export const VDISK_STATE_SEVERITY = {
16
+ [EVDiskState.OK]: DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Green,
16
17
  [EVDiskState.Initial]: DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Yellow,
18
+ [EVDiskState.SyncGuidRecovery]: DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Yellow,
17
19
  [EVDiskState.LocalRecoveryError]: DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Red,
18
20
  [EVDiskState.SyncGuidRecoveryError]: DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Red,
19
- [EVDiskState.SyncGuidRecovery]: DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Yellow,
20
21
  [EVDiskState.PDiskError]: DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Red,
21
- [EVDiskState.OK]: DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Green,
22
22
  };
23
23
  export const PDISK_STATE_SEVERITY = {
24
24
  [TPDiskState.Initial]: DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Grey,
@@ -1,5 +1,5 @@
1
1
  import type { TPDiskStateInfo } from '../../types/api/pdisk';
2
- import type { TVDiskStateInfo } from '../../types/api/vdisk';
2
+ import type { TVDiskStateInfo, TVSlotId } from '../../types/api/vdisk';
3
3
  import type { ValueOf } from '../../types/common';
4
4
  import type { PDISK_TYPES } from './getPDiskType';
5
5
  export interface PreparedPDisk extends TPDiskStateInfo {
@@ -13,3 +13,7 @@ export interface PreparedVDisk extends TVDiskStateInfo {
13
13
  Severity?: number;
14
14
  }
15
15
  export type PDiskType = ValueOf<typeof PDISK_TYPES>;
16
+ export interface UnavailableDonor extends TVSlotId {
17
+ DonorMode?: boolean;
18
+ StoragePoolName?: string;
19
+ }
@@ -1,4 +1,4 @@
1
- import { escapeRegExp } from 'lodash';
1
+ import escapeRegExp from 'lodash/escapeRegExp';
2
2
  import { DESCENDING } from '@gravity-ui/react-data-table/build/esm/lib/constants';
3
3
  export const prepareSortValue = (sortValue, sortOrder = DESCENDING) => {
4
4
  if (!sortValue) {
@@ -1,5 +1,5 @@
1
1
  import type { Column as DataTableColumn } from '@gravity-ui/react-data-table';
2
- import type { Column as VirtualTableColumn } from '../../components/VirtualTable';
2
+ import { type Column as VirtualTableColumn } from '../../components/VirtualTable';
3
3
  export type Column<T> = VirtualTableColumn<T> & DataTableColumn<T>;
4
4
  export type TableColumnsWidthSetup = Record<string, number>;
5
5
  export type HandleTableColumnsResize = (newSetup: TableColumnsWidthSetup) => void;
@@ -1,12 +1,14 @@
1
1
  import { useCallback, useState } from 'react';
2
+ import { DEFAULT_RESIZEABLE } from '../../components/VirtualTable';
2
3
  import { settingsManager } from '../../services/settings';
3
4
  export const updateColumnsWidth = (columns, columnsWidthSetup) => {
4
5
  return columns.map((column) => {
5
- var _a;
6
- if (!column.resizeable) {
6
+ var _a, _b;
7
+ const resizeable = (_a = column.resizeable) !== null && _a !== void 0 ? _a : DEFAULT_RESIZEABLE;
8
+ if (!resizeable) {
7
9
  return column;
8
10
  }
9
- return Object.assign(Object.assign({}, column), { width: (_a = columnsWidthSetup[column.name]) !== null && _a !== void 0 ? _a : column.width });
11
+ return Object.assign(Object.assign({}, column), { width: (_b = columnsWidthSetup[column.name]) !== null && _b !== void 0 ? _b : column.width });
10
12
  });
11
13
  };
12
14
  export const useTableResize = (localStorageKey) => {
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ export declare function lazyComponent<TExports extends {
3
+ [key: string]: any;
4
+ }, TKey extends keyof TExports>(moduleLoader: () => Promise<TExports>, exportName: TKey, loader?: React.ReactNode): React.ForwardRefExoticComponent<React.PropsWithoutRef<React.ComponentProps<TExports[TKey]>> & React.RefAttributes<TExports[TKey]>>;
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { Loader } from '@gravity-ui/uikit';
4
+ import { ErrorBoundaryFallback } from '../components/ErrorBoundary/ErrorBoundary';
5
+ import { useComponent } from '../components/ComponentsProvider/ComponentsProvider';
6
+ export function lazyComponent(moduleLoader, exportName, loader) {
7
+ const Component = React.lazy(() => moduleLoader()
8
+ .then((module) => ({ default: module[exportName] }))
9
+ .catch((error) => ({ default: () => _jsx(ErrorBoundaryFallback, { error: error }) })));
10
+ const LazyComponent = (props, ref) => {
11
+ const ErrorBoundary = useComponent('ErrorBoundary');
12
+ return (_jsx(ErrorBoundary, { children: _jsx(React.Suspense, Object.assign({ fallback: loader !== null && loader !== void 0 ? loader : _jsx(DefaultLoader, {}) }, { children: _jsx(Component, Object.assign({ ref: ref }, props)) })) }));
13
+ };
14
+ LazyComponent.displayName = exportName;
15
+ return React.forwardRef(LazyComponent);
16
+ }
17
+ function DefaultLoader() {
18
+ return (_jsx("div", Object.assign({ style: {
19
+ width: '100%',
20
+ height: '100%',
21
+ display: 'flex',
22
+ alignItems: 'center',
23
+ justifyContent: 'center',
24
+ } }, { children: _jsx(Loader, { size: "l" }) })));
25
+ }
@@ -0,0 +1 @@
1
+ export declare function registerLanguages(): void;