ydb-embedded-ui 22.4.0 → 22.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.d.ts +3 -2
  2. package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js +19 -4
  3. package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js.map +1 -1
  4. package/dist/components/CopyableValue/CopyableValue.d.ts +10 -0
  5. package/dist/components/CopyableValue/CopyableValue.js +10 -0
  6. package/dist/components/CopyableValue/CopyableValue.js.map +1 -0
  7. package/dist/components/CopyableValue/CopyableValue.scss +16 -0
  8. package/dist/components/CopyableValue/i18n/en.json +3 -0
  9. package/dist/components/CopyableValue/i18n/index.d.ts +2 -0
  10. package/dist/components/CopyableValue/i18n/index.js +6 -0
  11. package/dist/components/CopyableValue/i18n/index.js.map +1 -0
  12. package/dist/components/CriticalActionDialog/CriticalActionDialog.d.ts +2 -1
  13. package/dist/components/CriticalActionDialog/CriticalActionDialog.js +2 -1
  14. package/dist/components/CriticalActionDialog/CriticalActionDialog.js.map +1 -1
  15. package/dist/components/DiskCapacityInfo/DiskCapacityInfo.d.ts +1 -21
  16. package/dist/components/DiskCapacityInfo/DiskCapacityInfo.js +40 -126
  17. package/dist/components/DiskCapacityInfo/DiskCapacityInfo.js.map +1 -1
  18. package/dist/components/DiskCapacityInfo/i18n/en.json +0 -1
  19. package/dist/components/DiskCapacityInfo/i18n/index.d.ts +1 -1
  20. package/dist/components/EntityStatus/EntityStatus.d.ts +18 -6
  21. package/dist/components/EntityStatus/EntityStatus.js +5 -1
  22. package/dist/components/EntityStatus/EntityStatus.js.map +1 -1
  23. package/dist/components/EntityStatus/EntityStatus.scss +5 -0
  24. package/dist/components/EvictVDiskButton/EvictVDiskButton.d.ts +5 -2
  25. package/dist/components/EvictVDiskButton/EvictVDiskButton.js +3 -2
  26. package/dist/components/EvictVDiskButton/EvictVDiskButton.js.map +1 -1
  27. package/dist/components/EvictVDiskButton/i18n/en.json +2 -2
  28. package/dist/components/FullNodeViewer/FullNodeViewer.js +4 -7
  29. package/dist/components/FullNodeViewer/FullNodeViewer.js.map +1 -1
  30. package/dist/components/FullNodeViewer/i18n/index.d.ts +1 -1
  31. package/dist/components/HoverPopup/HoverPopup.d.ts +1 -0
  32. package/dist/components/HoverPopup/HoverPopup.js +87 -16
  33. package/dist/components/HoverPopup/HoverPopup.js.map +1 -1
  34. package/dist/components/MemoryViewer/MemoryViewer.d.ts +3 -1
  35. package/dist/components/MemoryViewer/MemoryViewer.js +25 -16
  36. package/dist/components/MemoryViewer/MemoryViewer.js.map +1 -1
  37. package/dist/components/MemoryViewer/i18n/en.json +4 -3
  38. package/dist/components/MemoryViewer/i18n/index.d.ts +1 -1
  39. package/dist/components/MemoryViewer/utils.d.ts +4 -2
  40. package/dist/components/MemoryViewer/utils.js +11 -11
  41. package/dist/components/MemoryViewer/utils.js.map +1 -1
  42. package/dist/components/PDiskInfo/PDiskInfo.d.ts +4 -9
  43. package/dist/components/PDiskInfo/PDiskInfo.js +32 -144
  44. package/dist/components/PDiskInfo/PDiskInfo.js.map +1 -1
  45. package/dist/components/PDiskInfo/PDiskInfo.scss +15 -0
  46. package/dist/components/PDiskInfo/PDiskLogSize.js +1 -1
  47. package/dist/components/PDiskInfo/PDiskLogSize.js.map +1 -1
  48. package/dist/components/PDiskInfo/i18n/en.json +6 -3
  49. package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
  50. package/dist/components/PDiskInfo/statuses.js +12 -3
  51. package/dist/components/PDiskInfo/statuses.js.map +1 -1
  52. package/dist/components/Search/Search.js +3 -1
  53. package/dist/components/Search/Search.js.map +1 -1
  54. package/dist/components/StorageGroupInfo/StorageGroupInfo.js +4 -9
  55. package/dist/components/StorageGroupInfo/StorageGroupInfo.js.map +1 -1
  56. package/dist/components/StorageGroupInfo/i18n/index.d.ts +1 -1
  57. package/dist/components/TenantNameWrapper/i18n/index.d.ts +1 -1
  58. package/dist/components/VDisk/VDisk.js +2 -2
  59. package/dist/components/VDisk/VDisk.js.map +1 -1
  60. package/dist/components/VDiskInfo/VDiskInfo.d.ts +3 -7
  61. package/dist/components/VDiskInfo/VDiskInfo.js +57 -235
  62. package/dist/components/VDiskInfo/VDiskInfo.js.map +1 -1
  63. package/dist/components/VDiskInfo/VDiskInfo.scss +19 -3
  64. package/dist/components/VDiskInfo/getVDiskDetails.d.ts +7 -1
  65. package/dist/components/VDiskInfo/getVDiskDetails.js +14 -1
  66. package/dist/components/VDiskInfo/getVDiskDetails.js.map +1 -1
  67. package/dist/components/VDiskInfo/i18n/en.json +4 -13
  68. package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
  69. package/dist/components/VDiskPopup/VDiskPopup.d.ts +2 -1
  70. package/dist/components/VDiskPopup/VDiskPopup.js +10 -26
  71. package/dist/components/VDiskPopup/VDiskPopup.js.map +1 -1
  72. package/dist/components/VDiskPopup/i18n/en.json +0 -2
  73. package/dist/components/VDiskPopup/i18n/index.d.ts +1 -1
  74. package/dist/components/VDiskStatus/VDiskReplicationStatus.js +1 -1
  75. package/dist/components/VDiskStatus/VDiskReplicationStatus.js.map +1 -1
  76. package/dist/components/VDiskStatus/VDiskStatus.js +2 -2
  77. package/dist/components/VDiskStatus/VDiskStatus.js.map +1 -1
  78. package/dist/components/VDiskStatus/VDiskStatus.scss +4 -0
  79. package/dist/components/VDiskStatus/statuses.js +2 -2
  80. package/dist/components/VDiskStatus/statuses.js.map +1 -1
  81. package/dist/components/nodesColumns/columns.d.ts +1 -0
  82. package/dist/components/nodesColumns/columns.js +13 -6
  83. package/dist/components/nodesColumns/columns.js.map +1 -1
  84. package/dist/containers/Clusters/Clusters.js +35 -6
  85. package/dist/containers/Clusters/Clusters.js.map +1 -1
  86. package/dist/containers/Clusters/Clusters.scss +24 -6
  87. package/dist/containers/Clusters/columns.js +9 -4
  88. package/dist/containers/Clusters/columns.js.map +1 -1
  89. package/dist/containers/Clusters/i18n/en.json +6 -0
  90. package/dist/containers/Clusters/i18n/index.d.ts +1 -1
  91. package/dist/containers/Header/Header.js +8 -0
  92. package/dist/containers/Header/Header.js.map +1 -1
  93. package/dist/containers/Header/HeaderLeftControls.js +3 -1
  94. package/dist/containers/Header/HeaderLeftControls.js.map +1 -1
  95. package/dist/containers/Header/PDiskLeftControls.d.ts +1 -0
  96. package/dist/containers/Header/PDiskLeftControls.js +24 -0
  97. package/dist/containers/Header/PDiskLeftControls.js.map +1 -0
  98. package/dist/containers/Header/VDiskLeftControls.d.ts +1 -0
  99. package/dist/containers/Header/VDiskLeftControls.js +23 -0
  100. package/dist/containers/Header/VDiskLeftControls.js.map +1 -0
  101. package/dist/containers/Header/breadcrumbs.js +5 -2
  102. package/dist/containers/Header/breadcrumbs.js.map +1 -1
  103. package/dist/containers/Header/i18n/en.json +4 -1
  104. package/dist/containers/Header/i18n/index.d.ts +1 -1
  105. package/dist/containers/Nodes/NodesControls/NodesControls.js +1 -1
  106. package/dist/containers/Nodes/NodesControls/NodesControls.js.map +1 -1
  107. package/dist/containers/Nodes/PaginatedNodes/GroupedNodesComponent.js +5 -3
  108. package/dist/containers/Nodes/PaginatedNodes/GroupedNodesComponent.js.map +1 -1
  109. package/dist/containers/Nodes/PaginatedNodes/NodesComponent.js +4 -2
  110. package/dist/containers/Nodes/PaginatedNodes/NodesComponent.js.map +1 -1
  111. package/dist/containers/Nodes/useDebouncedSearch.d.ts +2 -0
  112. package/dist/containers/Nodes/useDebouncedSearch.js +11 -0
  113. package/dist/containers/Nodes/useDebouncedSearch.js.map +1 -0
  114. package/dist/containers/PDiskPage/PDiskPage.js +30 -31
  115. package/dist/containers/PDiskPage/PDiskPage.js.map +1 -1
  116. package/dist/containers/PDiskPage/PDiskPage.scss +22 -11
  117. package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js +3 -3
  118. package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js.map +1 -1
  119. package/dist/containers/PDiskPage/PDiskStorageDetails.d.ts +6 -0
  120. package/dist/containers/PDiskPage/PDiskStorageDetails.js +28 -0
  121. package/dist/containers/PDiskPage/PDiskStorageDetails.js.map +1 -0
  122. package/dist/containers/PDiskPage/PDiskStorageDetails.scss +51 -0
  123. package/dist/containers/PDiskPage/i18n/en.json +2 -0
  124. package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
  125. package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/i18n/index.d.ts +1 -1
  126. package/dist/containers/Storage/StorageExpertModePanel/constants.d.ts +1 -1
  127. package/dist/containers/Storage/StorageExpertModePanel/i18n/index.d.ts +1 -1
  128. package/dist/containers/Storage/useStorageQueryParams.d.ts +4 -4
  129. package/dist/containers/StorageGroupPage/StorageGroupPage.js +7 -5
  130. package/dist/containers/StorageGroupPage/StorageGroupPage.js.map +1 -1
  131. package/dist/containers/StorageGroupPage/StorageGroupPage.scss +10 -0
  132. package/dist/containers/StorageGroupPage/i18n/en.json +0 -1
  133. package/dist/containers/StorageGroupPage/i18n/index.d.ts +1 -1
  134. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/ManagePartitioningDialog/i18n/index.d.ts +1 -1
  135. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +5 -12
  136. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js.map +1 -1
  137. package/dist/containers/Tenant/Diagnostics/TopQueries/columns/i18n/index.d.ts +1 -1
  138. package/dist/containers/Tenant/Healthcheck/Healthcheck.scss +6 -1
  139. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssue.js +2 -2
  140. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssue.js.map +1 -1
  141. package/dist/containers/Tenant/TenantDrawerHealthcheck.js +10 -2
  142. package/dist/containers/Tenant/TenantDrawerHealthcheck.js.map +1 -1
  143. package/dist/containers/VDiskPage/VDiskPage.js +33 -33
  144. package/dist/containers/VDiskPage/VDiskPage.js.map +1 -1
  145. package/dist/containers/VDiskPage/VDiskPage.scss +21 -8
  146. package/dist/containers/VDiskPage/VDiskStorageDetails.js +27 -29
  147. package/dist/containers/VDiskPage/VDiskStorageDetails.js.map +1 -1
  148. package/dist/containers/VDiskPage/VDiskStorageDetails.scss +24 -93
  149. package/dist/containers/VDiskPage/i18n/en.json +3 -12
  150. package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
  151. package/dist/store/reducers/cluster/parseFields.js +1 -0
  152. package/dist/store/reducers/cluster/parseFields.js.map +1 -1
  153. package/dist/store/reducers/clusters/clusters.js +1 -0
  154. package/dist/store/reducers/clusters/clusters.js.map +1 -1
  155. package/dist/store/reducers/clusters/selectors.d.ts +1 -0
  156. package/dist/store/reducers/clusters/selectors.js +4 -1
  157. package/dist/store/reducers/clusters/selectors.js.map +1 -1
  158. package/dist/store/reducers/clusters/types.d.ts +2 -0
  159. package/dist/store/reducers/storage/prepareGroupsDisks.d.ts +1 -1
  160. package/dist/store/reducers/storage/prepareGroupsDisks.js +2 -1
  161. package/dist/store/reducers/storage/prepareGroupsDisks.js.map +1 -1
  162. package/dist/store/reducers/storage/utils.js +10 -3
  163. package/dist/store/reducers/storage/utils.js.map +1 -1
  164. package/dist/store/reducers/vdisk/types.d.ts +1 -1
  165. package/dist/store/reducers/vdisk/utils.js +5 -5
  166. package/dist/store/reducers/vdisk/utils.js.map +1 -1
  167. package/dist/types/api/meta.d.ts +1 -0
  168. package/dist/types/api/nodesList.d.ts +2 -0
  169. package/dist/utils/hooks/useDatabaseHealthcheckAvailable.d.ts +2 -0
  170. package/dist/utils/hooks/useDatabaseHealthcheckAvailable.js +6 -0
  171. package/dist/utils/hooks/useDatabaseHealthcheckAvailable.js.map +1 -0
  172. package/dist/utils/memory.d.ts +5 -0
  173. package/dist/utils/memory.js +9 -0
  174. package/dist/utils/memory.js.map +1 -0
  175. package/dist/utils/nodes.js +3 -3
  176. package/dist/utils/nodes.js.map +1 -1
  177. package/dist/utils/storageMetrics.d.ts +1 -0
  178. package/dist/utils/storageMetrics.js +8 -0
  179. package/dist/utils/storageMetrics.js.map +1 -1
  180. package/package.json +1 -1
  181. package/src/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.tsx +22 -3
  182. package/src/components/CopyableValue/CopyableValue.scss +16 -0
  183. package/src/components/CopyableValue/CopyableValue.tsx +40 -0
  184. package/src/components/CopyableValue/i18n/en.json +3 -0
  185. package/src/components/CopyableValue/i18n/index.ts +8 -0
  186. package/src/components/CriticalActionDialog/CriticalActionDialog.tsx +3 -0
  187. package/src/components/DiskCapacityInfo/DiskCapacityInfo.tsx +40 -185
  188. package/src/components/DiskCapacityInfo/i18n/en.json +0 -1
  189. package/src/components/EntityStatus/EntityStatus.scss +5 -0
  190. package/src/components/EntityStatus/EntityStatus.tsx +38 -5
  191. package/src/components/EvictVDiskButton/EvictVDiskButton.tsx +10 -2
  192. package/src/components/EvictVDiskButton/i18n/en.json +2 -2
  193. package/src/components/FullNodeViewer/FullNodeViewer.tsx +4 -9
  194. package/src/components/HoverPopup/HoverPopup.tsx +95 -19
  195. package/src/components/MemoryViewer/MemoryViewer.tsx +30 -17
  196. package/src/components/MemoryViewer/i18n/en.json +4 -3
  197. package/src/components/MemoryViewer/utils.ts +19 -12
  198. package/src/components/PDiskInfo/PDiskInfo.scss +15 -0
  199. package/src/components/PDiskInfo/PDiskInfo.tsx +51 -243
  200. package/src/components/PDiskInfo/PDiskLogSize.tsx +12 -8
  201. package/src/components/PDiskInfo/i18n/en.json +6 -3
  202. package/src/components/PDiskInfo/statuses.ts +16 -3
  203. package/src/components/Search/Search.tsx +5 -2
  204. package/src/components/StorageGroupInfo/StorageGroupInfo.tsx +8 -13
  205. package/src/components/VDisk/VDisk.tsx +3 -2
  206. package/src/components/VDiskInfo/VDiskInfo.scss +19 -3
  207. package/src/components/VDiskInfo/VDiskInfo.tsx +119 -341
  208. package/src/components/VDiskInfo/getVDiskDetails.tsx +24 -2
  209. package/src/components/VDiskInfo/i18n/en.json +4 -13
  210. package/src/components/VDiskPopup/VDiskPopup.tsx +16 -24
  211. package/src/components/VDiskPopup/i18n/en.json +0 -2
  212. package/src/components/VDiskStatus/VDiskReplicationStatus.tsx +1 -1
  213. package/src/components/VDiskStatus/VDiskStatus.scss +4 -0
  214. package/src/components/VDiskStatus/VDiskStatus.tsx +13 -2
  215. package/src/components/VDiskStatus/statuses.ts +2 -2
  216. package/src/components/nodesColumns/columns.tsx +26 -12
  217. package/src/containers/Clusters/Clusters.scss +24 -6
  218. package/src/containers/Clusters/Clusters.tsx +74 -5
  219. package/src/containers/Clusters/columns.tsx +36 -6
  220. package/src/containers/Clusters/i18n/en.json +6 -0
  221. package/src/containers/Header/Header.tsx +8 -0
  222. package/src/containers/Header/HeaderLeftControls.tsx +3 -1
  223. package/src/containers/Header/PDiskLeftControls.tsx +41 -0
  224. package/src/containers/Header/VDiskLeftControls.tsx +40 -0
  225. package/src/containers/Header/breadcrumbs.tsx +4 -2
  226. package/src/containers/Header/i18n/en.json +4 -1
  227. package/src/containers/Nodes/NodesControls/NodesControls.tsx +1 -0
  228. package/src/containers/Nodes/PaginatedNodes/GroupedNodesComponent.tsx +5 -3
  229. package/src/containers/Nodes/PaginatedNodes/NodesComponent.tsx +4 -2
  230. package/src/containers/Nodes/useDebouncedSearch.ts +13 -0
  231. package/src/containers/PDiskPage/PDiskPage.scss +22 -11
  232. package/src/containers/PDiskPage/PDiskPage.tsx +88 -56
  233. package/src/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.tsx +3 -9
  234. package/src/containers/PDiskPage/PDiskStorageDetails.scss +51 -0
  235. package/src/containers/PDiskPage/PDiskStorageDetails.tsx +64 -0
  236. package/src/containers/PDiskPage/i18n/en.json +2 -0
  237. package/src/containers/StorageGroupPage/StorageGroupPage.scss +10 -0
  238. package/src/containers/StorageGroupPage/StorageGroupPage.tsx +37 -28
  239. package/src/containers/StorageGroupPage/i18n/en.json +0 -1
  240. package/src/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.tsx +5 -32
  241. package/src/containers/Tenant/Healthcheck/Healthcheck.scss +6 -1
  242. package/src/containers/Tenant/Healthcheck/components/HealthcheckIssue.tsx +18 -8
  243. package/src/containers/Tenant/TenantDrawerHealthcheck.tsx +14 -1
  244. package/src/containers/VDiskPage/VDiskPage.scss +21 -8
  245. package/src/containers/VDiskPage/VDiskPage.tsx +103 -64
  246. package/src/containers/VDiskPage/VDiskStorageDetails.scss +24 -93
  247. package/src/containers/VDiskPage/VDiskStorageDetails.tsx +50 -158
  248. package/src/containers/VDiskPage/i18n/en.json +3 -14
  249. package/src/store/reducers/cluster/parseFields.ts +1 -0
  250. package/src/store/reducers/clusters/clusters.ts +1 -0
  251. package/src/store/reducers/clusters/selectors.ts +4 -0
  252. package/src/store/reducers/clusters/types.ts +3 -0
  253. package/src/store/reducers/storage/prepareGroupsDisks.ts +2 -0
  254. package/src/store/reducers/storage/utils.ts +13 -3
  255. package/src/store/reducers/vdisk/types.ts +2 -1
  256. package/src/store/reducers/vdisk/utils.ts +4 -5
  257. package/src/types/api/meta.ts +1 -0
  258. package/src/types/api/nodesList.ts +3 -0
  259. package/src/utils/hooks/useDatabaseHealthcheckAvailable.ts +9 -0
  260. package/src/utils/memory.ts +16 -0
  261. package/src/utils/nodes.ts +3 -2
  262. package/src/utils/storageMetrics.ts +11 -0
  263. package/dist/components/VDiskInfo/getVDiskCapacityColumns.d.ts +0 -11
  264. package/dist/components/VDiskInfo/getVDiskCapacityColumns.js +0 -52
  265. package/dist/components/VDiskInfo/getVDiskCapacityColumns.js.map +0 -1
  266. package/src/components/VDiskInfo/getVDiskCapacityColumns.tsx +0 -83
@@ -1,129 +1,60 @@
1
1
  .ydb-vdisk-storage-details {
2
- &__title {
3
- margin-bottom: var(--g-spacing-4);
4
- }
2
+ display: flex;
3
+ flex-wrap: wrap;
4
+ gap: var(--g-spacing-1);
5
5
 
6
- &__cards {
6
+ &__card {
7
7
  display: flex;
8
8
  flex-wrap: wrap;
9
- align-items: flex-start;
10
- gap: var(--g-spacing-1);
11
-
12
- width: fit-content;
13
- max-width: 100%;
14
- }
9
+ align-items: center;
10
+ gap: var(--g-spacing-5);
15
11
 
16
- &__card {
17
12
  min-width: 0;
18
- padding: var(--g-spacing-4) var(--g-spacing-5);
13
+ padding: var(--g-spacing-3) var(--g-spacing-5);
19
14
 
20
15
  border-radius: var(--g-border-radius-m) var(--g-border-radius-xs) var(--g-border-radius-xs)
21
16
  var(--g-border-radius-m);
22
17
  background-color: var(--g-color-base-generic);
23
18
 
24
- &_metrics {
25
- display: flex;
26
- flex: 0 0 auto;
27
- align-items: stretch;
28
- gap: var(--g-spacing-5);
29
-
30
- width: max-content;
31
- max-width: 100%;
32
- min-height: 74px;
33
- }
34
-
35
- &_details {
36
- display: flex;
37
- flex: 0 1 auto;
38
- flex-wrap: wrap;
39
- justify-content: flex-start;
40
- align-items: center;
41
- gap: var(--g-spacing-4);
42
-
43
- width: fit-content;
44
- max-width: 100%;
45
- min-height: 74px;
46
-
19
+ &_ids {
47
20
  border-radius: var(--g-border-radius-xs) var(--g-border-radius-m)
48
21
  var(--g-border-radius-m) var(--g-border-radius-xs);
49
22
  }
50
23
  }
51
24
 
52
- &__details {
53
- display: flex;
54
- flex: 0 1 auto;
55
- flex-wrap: wrap;
56
- align-items: stretch;
57
- gap: var(--g-spacing-4);
58
-
59
- min-width: 0;
60
- max-width: 100%;
61
- }
62
-
63
- &__metric,
64
25
  &__detail {
65
26
  display: flex;
66
27
  flex-direction: column;
67
- justify-content: center;
68
- align-items: flex-start;
69
- gap: var(--g-spacing-1);
28
+ gap: var(--g-spacing-half);
70
29
 
71
30
  min-width: 0;
72
- padding-right: var(--g-spacing-4);
73
- }
31
+ max-width: 250px;
74
32
 
75
- &__detail {
76
- flex: 0 1 auto;
77
-
78
- min-width: 100px;
79
- max-width: 200px;
80
- }
81
-
82
- &__value,
83
- &__label {
84
- display: block;
85
-
86
- white-space: nowrap;
87
- }
88
-
89
- &__value-row &__value {
90
- overflow: hidden;
91
-
92
- text-overflow: ellipsis;
93
- }
94
-
95
- &__value-row {
96
- flex-wrap: nowrap;
97
-
98
- width: 100%;
99
- min-width: 0;
100
- height: 20px;
101
-
102
- &_copyable {
103
- width: auto;
104
- max-width: 100%;
33
+ &_location {
34
+ min-width: 100px;
35
+ max-width: 200px;
105
36
  }
106
37
  }
107
38
 
108
39
  &__value-popover {
109
- flex: 1 1 auto;
40
+ flex: 0 1 auto;
110
41
 
111
42
  min-width: 0;
112
-
113
- &_copyable {
114
- flex: 0 1 auto;
115
-
116
- max-width: 100%;
117
- }
43
+ max-width: 100%;
118
44
  }
119
45
 
120
46
  &__value-popover-content {
121
- width: 100%;
47
+ width: auto;
122
48
  min-width: 0;
49
+ max-width: 100%;
50
+
51
+ &_with-left-trim {
52
+ text-align: end;
53
+ direction: rtl;
123
54
 
124
- &_copyable {
125
- width: auto;
126
- max-width: 100%;
55
+ > span {
56
+ unicode-bidi: plaintext;
57
+ }
127
58
  }
128
59
  }
129
60
  }
@@ -1,195 +1,87 @@
1
- import {Button, Divider, Flex, Text} from '@gravity-ui/uikit';
1
+ import {Text} from '@gravity-ui/uikit';
2
+ import {isNil} from 'lodash';
2
3
 
3
4
  import {CellWithPopover} from '../../components/CellWithPopover/CellWithPopover';
4
- import {ClipboardButton} from '../../components/ClipboardButton/ClipboardButton';
5
+ import {CopyableValue} from '../../components/CopyableValue/CopyableValue';
6
+ import {InternalLinkButton} from '../../components/InternalLinkButton';
7
+ import {getVDiskLocationItems} from '../../components/VDiskInfo/getVDiskDetails';
5
8
  import {getPDiskPagePath} from '../../routes';
9
+ import {useNewStorageViewEnabled} from '../../store/reducers/capabilities/hooks';
6
10
  import type {VDiskData} from '../../store/reducers/vdisk/types';
7
11
  import {cn} from '../../utils/cn';
8
- import {BRAND_BUTTON_CLASS, EMPTY_DATA_PLACEHOLDER} from '../../utils/constants';
12
+ import type {DiskDetailItem} from '../../utils/disks/diskInfo/getDiskLocationItems';
9
13
  import {useIsViewerUser} from '../../utils/hooks/useIsUserAllowedToMakeChanges';
10
- import {
11
- formatMetricBytes,
12
- formatMetricPercent,
13
- getMetricBytesCommonSize,
14
- } from '../../utils/storageMetrics';
15
14
 
16
15
  import {vDiskPageKeyset} from './i18n';
17
16
 
18
17
  import './VDiskStorageDetails.scss';
19
18
 
20
19
  const b = cn('ydb-vdisk-storage-details');
20
+ const LOCATION_IDS = ['datacenter', 'rack', 'fqdn', 'pdisk-path'];
21
21
 
22
22
  interface VDiskStorageDetailsProps {
23
23
  className?: string;
24
24
  data?: VDiskData;
25
25
  }
26
26
 
27
- interface MetricItemProps {
28
- title: string;
29
- value: string;
30
- }
31
-
32
- interface CopyableDetailItemProps {
33
- title: string;
34
- value?: string | number;
35
- }
36
-
37
- interface DetailItemProps {
38
- title: string;
39
- value?: string | number;
40
- }
41
-
42
- interface TruncatedDetailValueProps {
43
- value?: string | number;
44
- }
45
-
46
- function MetricItem({title, value}: MetricItemProps) {
47
- return (
48
- <div className={b('metric')}>
49
- <Text variant="subheader-2" className={b('value')}>
50
- {value}
51
- </Text>
52
- <Text color="secondary" className={b('label')}>
53
- {title}
54
- </Text>
55
- </div>
56
- );
57
- }
58
-
59
- function DetailItem({title, value}: DetailItemProps) {
60
- return (
61
- <div className={b('detail')}>
62
- <TruncatedDetailValue value={value} />
63
- <Text color="secondary" className={b('label')}>
64
- {title}
65
- </Text>
66
- </div>
67
- );
68
- }
69
-
70
- function TruncatedDetailValue({value}: TruncatedDetailValueProps) {
71
- const normalizedValue =
72
- value === undefined || value === null || value === '' ? undefined : String(value);
73
- const displayValue = normalizedValue ?? EMPTY_DATA_PLACEHOLDER;
74
-
27
+ function DetailItem({item}: {item: DiskDetailItem}) {
28
+ const copyText = item.copyText === undefined ? undefined : String(item.copyText);
75
29
  return (
76
- <CellWithPopover
77
- content={normalizedValue}
78
- disabled={!normalizedValue}
79
- placement={['top', 'bottom']}
80
- fullWidth
81
- wrapperClassName={b('value-popover')}
82
- className={b('value-popover-content')}
30
+ <div
31
+ className={b('detail', {location: LOCATION_IDS.includes(item.id)})}
32
+ data-qa={`vdisk-location-${item.id}`}
83
33
  >
84
- <Text variant="subheader-2" className={b('value')}>
85
- {displayValue}
86
- </Text>
87
- </CellWithPopover>
88
- );
89
- }
90
-
91
- function CopyableDetailItem({title, value}: CopyableDetailItemProps) {
92
- const normalizedValue =
93
- value === undefined || value === null || value === '' ? undefined : String(value);
94
- const displayValue = normalizedValue ?? EMPTY_DATA_PLACEHOLDER;
95
-
96
- return (
97
- <div className={b('detail')}>
98
- <Flex alignItems="center" gap="1" className={b('value-row', {copyable: true})}>
34
+ <Text color="secondary">{item.name}</Text>
35
+ <CopyableValue copyText={copyText} fieldName={item.name}>
99
36
  <CellWithPopover
100
- content={normalizedValue}
101
- disabled={!normalizedValue}
37
+ content={copyText}
38
+ disabled={!copyText}
102
39
  placement={['top', 'bottom']}
103
40
  fullWidth
104
- wrapperClassName={b('value-popover', {copyable: true})}
105
- className={b('value-popover-content', {copyable: true})}
41
+ wrapperClassName={b('value-popover')}
42
+ className={b('value-popover-content', {
43
+ 'with-left-trim': item.id === 'pdisk-path',
44
+ })}
106
45
  >
107
- <Text variant="subheader-2" className={b('value')}>
108
- {displayValue}
109
- </Text>
46
+ <span tabIndex={copyText ? 0 : undefined}>{item.content}</span>
110
47
  </CellWithPopover>
111
- <ClipboardButton
112
- copyText={normalizedValue}
113
- withLabel={false}
114
- view="flat-secondary"
115
- size="s"
116
- />
117
- </Flex>
118
- <Text color="secondary" className={b('label')}>
119
- {title}
120
- </Text>
48
+ </CopyableValue>
121
49
  </div>
122
50
  );
123
51
  }
124
52
 
125
- export function VDiskStorageDetails({className, data}: VDiskStorageDetailsProps) {
53
+ export function VDiskStorageDetails({className, data = {}}: VDiskStorageDetailsProps) {
126
54
  const isViewerUser = useIsViewerUser();
127
-
128
- const used = Number(data?.AllocatedSize);
129
- const total = Number(data?.SizeLimit);
130
- const usage = Number(data?.AllocatedPercent);
131
- const free = Number(data?.FreeSize);
132
- const metricsSize = getMetricBytesCommonSize([used, total, free]);
133
-
134
- const {NodeDC, NodeRack, NodeHost, NodeId, PDiskId} = data || {};
135
-
55
+ const newStorageViewEnabled = useNewStorageViewEnabled();
136
56
  const pDiskPath =
137
- isViewerUser && NodeId !== undefined && PDiskId !== undefined
138
- ? getPDiskPagePath(PDiskId, NodeId, undefined, {withBasename: true})
57
+ isViewerUser && !isNil(data.NodeId) && !isNil(data.PDiskId)
58
+ ? getPDiskPagePath(data.PDiskId, data.NodeId)
139
59
  : undefined;
60
+ const items = getVDiskLocationItems(data, {
61
+ Host: data.NodeHost,
62
+ Rack: data.NodeRack,
63
+ DC: data.NodeDC,
64
+ }).filter(({id}) => newStorageViewEnabled || (id !== 'rack' && id !== 'pdisk-path'));
140
65
 
141
66
  return (
142
- <div className={b(null, className)}>
143
- <Flex alignItems="center" gap="1" className={b('title')}>
144
- <Text variant="subheader-2">{vDiskPageKeyset('title_storage-details')}</Text>
145
- </Flex>
146
- <div className={b('cards')}>
147
- <div className={b('card', {metrics: true})}>
148
- <MetricItem
149
- title={vDiskPageKeyset('field_storage-details-used')}
150
- value={formatMetricBytes(used, metricsSize)}
151
- />
152
- <MetricItem
153
- title={vDiskPageKeyset('field_storage-details-total')}
154
- value={formatMetricBytes(total, metricsSize)}
155
- />
156
- <MetricItem
157
- title={vDiskPageKeyset('field_storage-details-free')}
158
- value={formatMetricBytes(free, metricsSize)}
159
- />
160
- <Divider orientation="vertical" />
161
- <MetricItem
162
- title={vDiskPageKeyset('field_storage-details-usage')}
163
- value={formatMetricPercent(usage)}
164
- />
165
- </div>
166
- <div className={b('card', {details: true})}>
167
- <div className={b('details')}>
168
- <DetailItem title={vDiskPageKeyset('field_datacenter')} value={NodeDC} />
169
- <CopyableDetailItem
170
- title={vDiskPageKeyset('field_rack')}
171
- value={NodeRack}
172
- />
173
- <CopyableDetailItem
174
- title={vDiskPageKeyset('field_node')}
175
- value={NodeHost}
176
- />
177
- <CopyableDetailItem
178
- title={vDiskPageKeyset('field_pdisk-id')}
179
- value={PDiskId}
180
- />
181
- </div>
182
- {pDiskPath ? (
183
- <Button
184
- href={pDiskPath}
185
- view="action"
186
- size="m"
187
- className={BRAND_BUTTON_CLASS}
188
- >
189
- {vDiskPageKeyset('action_go-to-pdisk')}
190
- </Button>
191
- ) : null}
192
- </div>
67
+ <div className={b(null, className)} data-qa="vdisk-location">
68
+ <div className={b('card')}>
69
+ {LOCATION_IDS.map((id) => {
70
+ const item = items.find((entry) => entry.id === id);
71
+ return item ? <DetailItem key={id} item={item} /> : null;
72
+ })}
73
+ </div>
74
+ <div className={b('card', {ids: true})}>
75
+ {items
76
+ .filter(({id}) => !LOCATION_IDS.includes(id))
77
+ .map((item) => (
78
+ <DetailItem key={item.id} item={item} />
79
+ ))}
80
+ {pDiskPath && (
81
+ <InternalLinkButton href={pDiskPath} size="s" view="normal">
82
+ {vDiskPageKeyset('action_go-to-pdisk')}
83
+ </InternalLinkButton>
84
+ )}
193
85
  </div>
194
86
  </div>
195
87
  );
@@ -1,25 +1,14 @@
1
1
  {
2
- "fqdn": "FQDN",
3
2
  "node": "Node",
4
3
  "pdisk": "PDisk",
5
4
  "vdisk": "VDisk",
6
5
  "storage": "Storage",
7
6
  "tablets": "Tablets",
8
- "title_storage-details": "Storage details",
9
- "field_storage-details-used": "Used",
10
- "field_storage-details-total": "Total",
11
- "field_storage-details-free": "Free",
12
- "field_storage-details-usage": "Usage",
13
- "field_datacenter": "Datacenter",
14
- "field_rack": "Rack",
15
- "field_node": "Node",
16
- "field_pdisk-id": "PDisk ID",
7
+ "action_back": "Back",
17
8
  "action_go-to-pdisk": "Go to PDisk",
18
-
9
+ "action_open-in-developer-ui": "Open in Developer UI",
19
10
  "tablet-id": "Tablet ID",
20
11
  "channel-id": "Channel ID",
21
12
  "count": "Count",
22
- "size": "Size",
23
-
24
- "label_donor": "Donor"
13
+ "size": "Size"
25
14
  }
@@ -118,6 +118,7 @@ export function parseLoggingUrls(
118
118
  }
119
119
 
120
120
  const settingsSchema = z.object({
121
+ unavailable: z.boolean().optional().catch(undefined),
121
122
  use_meta_proxy: z.boolean().optional(),
122
123
  cluster_domain: z.string().optional(),
123
124
  cluster_external_name: z.string().optional(),
@@ -8,6 +8,7 @@ import type {ClustersFilters} from './types';
8
8
  import {prepareClustersData} from './utils';
9
9
 
10
10
  const initialState: ClustersFilters = {
11
+ availability: ['available'],
11
12
  clusterName: '',
12
13
  status: [],
13
14
  service: [],
@@ -9,6 +9,7 @@ export const selectStatusFilter = (state: ClustersStateSlice) => state.clusters.
9
9
  export const selectServiceFilter = (state: ClustersStateSlice) => state.clusters.service;
10
10
  export const selectVersionFilter = (state: ClustersStateSlice) => state.clusters.version;
11
11
  export const selectGalaxyFilter = (state: ClustersStateSlice) => state.clusters.galaxy;
12
+ export const selectAvailabilityFilter = (state: ClustersStateSlice) => state.clusters.availability;
12
13
 
13
14
  // ==== Filters ====
14
15
 
@@ -85,6 +86,9 @@ const isMatchesByTextQuery = (clusterData: PreparedCluster, searchQuery = '') =>
85
86
  export function filterClusters(clusters: PreparedCluster[], filters: ClustersFilters) {
86
87
  return clusters.filter((cluster) => {
87
88
  return (
89
+ filters.availability.includes(
90
+ cluster.settings?.unavailable === true ? 'unavailable' : 'available',
91
+ ) &&
88
92
  isMatchesByGalaxy(cluster, filters.galaxy) &&
89
93
  isMatchesByStatus(cluster, filters.status) &&
90
94
  isMatchesByService(cluster, filters.service) &&
@@ -26,7 +26,10 @@ export interface PreparedCluster extends Omit<MetaExtendedClusterInfo, 'name' |
26
26
  clusterExternalName?: string;
27
27
  }
28
28
 
29
+ export type ClusterAvailability = 'available' | 'unavailable';
30
+
29
31
  export interface ClustersFilters {
32
+ availability: ClusterAvailability[];
30
33
  status: string[];
31
34
  service: string[];
32
35
  version: string[];
@@ -137,6 +137,8 @@ export function prepareGroupsPDisk(data: TStoragePDisk & {NodeId?: number} = {})
137
137
  Type,
138
138
  Severity,
139
139
  SlotSize,
140
+ ExpectedSlotCount:
141
+ mergedPDiskData.ExpectedSlotCount ?? parseOptionalNonNegativeNumber(bscPDisk.SlotCount),
140
142
  DriveStatus,
141
143
  };
142
144
  }
@@ -37,6 +37,16 @@ const normalizeMaxPercent = (value: number | string | null | undefined): number
37
37
 
38
38
  // ==== Prepare groups ====
39
39
 
40
+ function parseLatencyUsToMs(value: unknown): number | undefined {
41
+ if (typeof value !== 'string' && typeof value !== 'number') {
42
+ return undefined;
43
+ }
44
+
45
+ const latency = parseOptionalNonNegativeNumber(value);
46
+
47
+ return latency === undefined ? undefined : parseUsToMs(latency);
48
+ }
49
+
40
50
  function getGroupDiskSpaceStatus(group: TGroupsStorageGroupInfo): EFlag {
41
51
  const {DiskSpace, VDisks = []} = group;
42
52
 
@@ -247,9 +257,9 @@ export function prepareGroupsResponse(data: StorageGroupsResponse): PreparedStor
247
257
  Used: Number(Used),
248
258
  Limit: Number(Limit),
249
259
 
250
- LatencyPutTabletLogMs: parseUsToMs(LatencyPutTabletLog),
251
- LatencyPutUserDataMs: parseUsToMs(LatencyPutUserData),
252
- LatencyGetFastMs: parseUsToMs(LatencyGetFast),
260
+ LatencyPutTabletLogMs: parseLatencyUsToMs(LatencyPutTabletLog),
261
+ LatencyPutUserDataMs: parseLatencyUsToMs(LatencyPutUserData),
262
+ LatencyGetFastMs: parseLatencyUsToMs(LatencyGetFast),
253
263
 
254
264
  Degraded: Number(MissingDisks),
255
265
  Overall,
@@ -1,9 +1,10 @@
1
1
  import type {PreparedVDisk} from '../../../utils/disks/types';
2
2
 
3
3
  export interface VDiskData extends PreparedVDisk {
4
+ Recipient?: PreparedVDisk;
5
+
4
6
  NodeId?: number;
5
7
  NodeHost?: string;
6
- NodeType?: string;
7
8
  NodeDC?: string;
8
9
  NodeRack?: string;
9
10
 
@@ -1,6 +1,5 @@
1
1
  import type {StorageGroupsResponse} from '../../../types/api/storage';
2
2
  import type {TEvSystemStateResponse} from '../../../types/api/systemState';
3
- import type {PreparedVDisk} from '../../../utils/disks/types';
4
3
  import {prepareNodeSystemState} from '../../../utils/nodes';
5
4
  import {prepareGroupsVDisk} from '../storage/prepareGroupsDisks';
6
5
 
@@ -20,14 +19,16 @@ export function prepareVDiskDataResponse(
20
19
 
21
20
  const preparedVDisk = prepareGroupsVDisk(rawVDisk);
22
21
 
23
- let currentVDisk: PreparedVDisk = {};
22
+ let currentVDisk: VDiskData = {};
24
23
 
25
24
  if (preparedVDisk.StringifiedId === vDiskId) {
26
25
  currentVDisk = preparedVDisk;
27
26
  } else {
28
27
  for (const donor of preparedVDisk.Donors ?? []) {
29
28
  if (donor.StringifiedId === vDiskId) {
30
- currentVDisk = donor;
29
+ // Keep the recipient's metrics without a back-reference to this donor.
30
+ const {Donors: _donors, ...recipient} = preparedVDisk;
31
+ currentVDisk = {...donor, Recipient: recipient};
31
32
  break;
32
33
  }
33
34
  }
@@ -40,7 +41,6 @@ export function prepareVDiskDataResponse(
40
41
 
41
42
  const NodeId = currentVDisk.NodeId ?? preparedPDisk?.NodeId ?? preparedNode.NodeId;
42
43
  const NodeHost = preparedNode.Host;
43
- const NodeType = preparedNode.Roles?.[0];
44
44
  const NodeDC = preparedNode.DC;
45
45
  const NodeRack = preparedNode.Rack;
46
46
 
@@ -52,7 +52,6 @@ export function prepareVDiskDataResponse(
52
52
 
53
53
  NodeId,
54
54
  NodeHost,
55
- NodeType,
56
55
  NodeDC,
57
56
  NodeRack,
58
57
 
@@ -105,6 +105,7 @@ export interface MetaClusterTraceCheck {
105
105
  }
106
106
 
107
107
  export interface MetaClusterSettings {
108
+ unavailable?: boolean;
108
109
  use_meta_proxy?: boolean;
109
110
  auth_service?: string;
110
111
  cluster_domain?: string;
@@ -1,3 +1,5 @@
1
+ import type {TSystemStateInfo} from './nodes';
2
+
1
3
  /**
2
4
  * endpoint: /viewer/json/nodesList
3
5
  *
@@ -11,6 +13,7 @@ export interface TNodeInfo {
11
13
  ResolveHost?: string;
12
14
  Address?: string;
13
15
  Port?: number;
16
+ Location?: TSystemStateInfo['Location'];
14
17
  PhysicalLocation?: TNodeLocation;
15
18
  }
16
19
 
@@ -0,0 +1,9 @@
1
+ import type {ETenantType} from '../../types/api/tenant';
2
+
3
+ import {useIsUserAllowedToMakeChanges} from './useIsUserAllowedToMakeChanges';
4
+
5
+ export function useDatabaseHealthcheckAvailable(databaseType?: ETenantType) {
6
+ const isUserAllowedToMakeChanges = useIsUserAllowedToMakeChanges();
7
+
8
+ return isUserAllowedToMakeChanges && databaseType !== 'Serverless';
9
+ }
@@ -0,0 +1,16 @@
1
+ import type {TSystemStateInfo} from '../types/api/nodes';
2
+
3
+ import {parseOptionalNonNegativeNumber} from './utils';
4
+
5
+ export function getNodeMemory(
6
+ node: Pick<TSystemStateInfo, 'MemoryStats' | 'MemoryUsed' | 'MemoryLimit'>,
7
+ ) {
8
+ // Match the backend's process usage and sorting, including its allocator fallback.
9
+ const memoryUsed =
10
+ parseOptionalNonNegativeNumber(node.MemoryUsed) ??
11
+ parseOptionalNonNegativeNumber(node.MemoryStats?.AnonRss) ??
12
+ parseOptionalNonNegativeNumber(node.MemoryStats?.AllocatedMemory);
13
+ const memoryLimit = parseOptionalNonNegativeNumber(node.MemoryLimit) || undefined;
14
+
15
+ return {memoryUsed, memoryLimit};
16
+ }
@@ -34,11 +34,12 @@ export const prepareNodesMap = (nodesList?: TNodeInfo[]) => {
34
34
  if (valueIsDefined(node.Id)) {
35
35
  const physicalLocation = node.PhysicalLocation;
36
36
  // The legacy numeric Rack can be a hash of the actual rack name.
37
- const Rack = physicalLocation?.Location?.match(/(?:^|\/)R=([^/]+)/)?.[1];
37
+ const Rack =
38
+ node.Location?.Rack || physicalLocation?.Location?.match(/(?:^|\/)R=([^/]+)/)?.[1];
38
39
 
39
40
  nodeHosts.set(node.Id, {
40
41
  Host: node.Host,
41
- DC: physicalLocation?.DataCenterId,
42
+ DC: node.Location?.DataCenter || physicalLocation?.DataCenterId,
42
43
  Rack,
43
44
  });
44
45
  }
@@ -201,6 +201,17 @@ export function formatStorageMetricPair(
201
201
  .join(' / ');
202
202
  }
203
203
 
204
+ export function formatStorageThroughput(value?: string | number) {
205
+ return (
206
+ formatBytes({
207
+ value: parseOptionalNonNegativeNumber(value),
208
+ size: 'mb',
209
+ fixedDecimalPlaces: 2,
210
+ withSpeedLabel: true,
211
+ }) || EMPTY_DATA_PLACEHOLDER
212
+ );
213
+ }
214
+
204
215
  export function formatNormalizedMetricPercent(value?: number) {
205
216
  const parsedValue = parseOptionalNonNegativeNumber(value);
206
217
 
@@ -1,11 +0,0 @@
1
- import type { PreparedVDisk } from '../../utils/disks/types';
2
- import type { YDBDefinitionListItem } from '../YDBDefinitionList/YDBDefinitionList';
3
- interface GetVDiskCapacityColumnsParams {
4
- data?: PreparedVDisk;
5
- isViewerUser?: boolean;
6
- }
7
- export declare function getVDiskCapacityColumns({ data, isViewerUser }: GetVDiskCapacityColumnsParams): {
8
- leftColumn: YDBDefinitionListItem[];
9
- rightColumn: YDBDefinitionListItem[];
10
- };
11
- export {};