ydb-embedded-ui 7.1.0 → 8.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (328) hide show
  1. package/dist/components/Graph/Graph.d.ts +1 -2
  2. package/dist/components/Graph/Graph.js +1 -1
  3. package/dist/components/Graph/Graph.js.map +1 -1
  4. package/dist/components/JSONTree/JSONTree.d.ts +9 -0
  5. package/dist/components/JSONTree/JSONTree.js +23 -0
  6. package/dist/components/JSONTree/JSONTree.js.map +1 -0
  7. package/dist/components/JSONTree/JSONTree.scss +20 -0
  8. package/dist/components/JSONTree/i18n/en.json +4 -0
  9. package/dist/components/JSONTree/i18n/index.d.ts +2 -0
  10. package/dist/components/JSONTree/i18n/index.js +5 -0
  11. package/dist/components/JSONTree/i18n/index.js.map +1 -0
  12. package/dist/components/MemoryViewer/MemoryViewer.scss +1 -1
  13. package/dist/components/Table/Table.d.ts +13 -0
  14. package/dist/components/Table/Table.js +21 -0
  15. package/dist/components/Table/Table.js.map +1 -0
  16. package/dist/components/Table/Table.scss +60 -0
  17. package/dist/components/TooltipsContent/TabletTooltipContent/TabletTooltipContent.js +2 -2
  18. package/dist/components/TooltipsContent/TabletTooltipContent/TabletTooltipContent.js.map +1 -1
  19. package/dist/components/nodesColumns/columns.js +1 -1
  20. package/dist/components/nodesColumns/constants.js +1 -1
  21. package/dist/components/nodesColumns/constants.js.map +1 -1
  22. package/dist/containers/Cluster/Cluster.js +2 -2
  23. package/dist/containers/Cluster/Cluster.js.map +1 -1
  24. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +24 -8
  25. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js.map +1 -1
  26. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +7 -26
  27. package/dist/containers/Cluster/ClusterInfo/utils.d.ts +2 -4
  28. package/dist/containers/Cluster/ClusterInfo/utils.js +2 -19
  29. package/dist/containers/Cluster/ClusterInfo/utils.js.map +1 -1
  30. package/dist/containers/Cluster/i18n/en.json +3 -1
  31. package/dist/containers/Cluster/i18n/index.d.ts +1 -1
  32. package/dist/containers/Clusters/columns.js +5 -2
  33. package/dist/containers/Clusters/columns.js.map +1 -1
  34. package/dist/containers/Node/Node.d.ts +0 -1
  35. package/dist/containers/Node/Node.js +5 -3
  36. package/dist/containers/Node/Node.js.map +1 -1
  37. package/dist/containers/Operations/Operations.js +2 -1
  38. package/dist/containers/Operations/Operations.js.map +1 -1
  39. package/dist/containers/PDiskPage/PDiskPage.js +5 -2
  40. package/dist/containers/PDiskPage/PDiskPage.js.map +1 -1
  41. package/dist/containers/ReduxTooltip/ReduxTooltip.scss +0 -30
  42. package/dist/containers/Storage/PaginatedStorage.d.ts +1 -1
  43. package/dist/containers/Storage/StorageGroups/columns/hooks.d.ts +0 -2
  44. package/dist/containers/Storage/StorageGroups/columns/hooks.js +2 -5
  45. package/dist/containers/Storage/StorageGroups/columns/hooks.js.map +1 -1
  46. package/dist/containers/Storage/StorageGroups/columns/types.d.ts +2 -2
  47. package/dist/containers/Storage/StorageNodes/PaginatedStorageNodesTable.d.ts +1 -0
  48. package/dist/containers/Storage/StorageNodes/PaginatedStorageNodesTable.js +5 -2
  49. package/dist/containers/Storage/StorageNodes/PaginatedStorageNodesTable.js.map +1 -1
  50. package/dist/containers/Storage/StorageNodes/columns/types.d.ts +1 -1
  51. package/dist/containers/Storage/StorageVisibleEntitiesFilter/StorageVisibleEntitiesFilter.d.ts +0 -5
  52. package/dist/containers/Storage/StorageVisibleEntitiesFilter/StorageVisibleEntitiesFilter.js +1 -1
  53. package/dist/containers/Storage/StorageVisibleEntitiesFilter/StorageVisibleEntitiesFilter.js.map +1 -1
  54. package/dist/containers/Storage/utils/index.d.ts +3 -6
  55. package/dist/containers/Storage/utils/index.js +7 -34
  56. package/dist/containers/Storage/utils/index.js.map +1 -1
  57. package/dist/containers/StorageGroupPage/StorageGroupPage.js +4 -2
  58. package/dist/containers/StorageGroupPage/StorageGroupPage.js.map +1 -1
  59. package/dist/containers/Tablet/Tablet.d.ts +0 -1
  60. package/dist/containers/Tablet/Tablet.js +1 -1
  61. package/dist/containers/Tablet/Tablet.js.map +1 -1
  62. package/dist/containers/Tablet/components/TabletInfo/TabletInfo.js +5 -2
  63. package/dist/containers/Tablet/components/TabletInfo/TabletInfo.js.map +1 -1
  64. package/dist/containers/Tablet/components/TabletInfo/i18n/index.d.ts +1 -1
  65. package/dist/containers/Tablet/components/TabletStorageInfo/TabletStorageInfo.js +3 -14
  66. package/dist/containers/Tablet/components/TabletStorageInfo/TabletStorageInfo.js.map +1 -1
  67. package/dist/containers/Tablet/components/TabletStorageInfo/TabletStorageInfo.scss +0 -51
  68. package/dist/containers/Tablet/components/TabletStorageInfo/columns.js +6 -8
  69. package/dist/containers/Tablet/components/TabletStorageInfo/columns.js.map +1 -1
  70. package/dist/containers/Tablet/components/TabletTable/TabletTable.js +2 -2
  71. package/dist/containers/Tablet/components/TabletTable/TabletTable.js.map +1 -1
  72. package/dist/containers/Tablets/TabletsTable.js +2 -2
  73. package/dist/containers/Tablets/TabletsTable.js.map +1 -1
  74. package/dist/containers/Tenant/Diagnostics/Configs/i18n/index.d.ts +1 -1
  75. package/dist/containers/Tenant/Diagnostics/Describe/Describe.d.ts +0 -1
  76. package/dist/containers/Tenant/Diagnostics/Describe/Describe.js +2 -5
  77. package/dist/containers/Tenant/Diagnostics/Describe/Describe.js.map +1 -1
  78. package/dist/containers/Tenant/Diagnostics/Describe/Describe.scss +1 -9
  79. package/dist/containers/Tenant/Diagnostics/Diagnostics.js +2 -2
  80. package/dist/containers/Tenant/Diagnostics/Diagnostics.js.map +1 -1
  81. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +0 -163
  82. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +10 -10
  83. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js.map +1 -1
  84. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTree.js +2 -2
  85. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTree.js.map +1 -1
  86. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTree.scss +0 -2
  87. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.d.ts +0 -5
  88. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js +1 -1
  89. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js.map +1 -1
  90. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +5 -2
  91. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js.map +1 -1
  92. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js +2 -1
  93. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js.map +1 -1
  94. package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.js +11 -4
  95. package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.js.map +1 -1
  96. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.js +11 -10
  97. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.js.map +1 -1
  98. package/dist/containers/Tenant/Diagnostics/TopQueries/columns/columns.d.ts +105 -0
  99. package/dist/containers/Tenant/Diagnostics/TopQueries/{getTopQueriesColumns.js → columns/columns.js} +53 -44
  100. package/dist/containers/Tenant/Diagnostics/TopQueries/columns/columns.js.map +1 -0
  101. package/dist/containers/Tenant/Diagnostics/TopQueries/columns/constants.d.ts +21 -0
  102. package/dist/containers/Tenant/Diagnostics/TopQueries/columns/constants.js +71 -0
  103. package/dist/containers/Tenant/Diagnostics/TopQueries/columns/constants.js.map +1 -0
  104. package/dist/containers/Tenant/Diagnostics/TopQueries/columns/i18n/en.json +12 -0
  105. package/dist/containers/Tenant/Diagnostics/TopQueries/columns/i18n/index.d.ts +2 -0
  106. package/dist/containers/Tenant/Diagnostics/TopQueries/columns/i18n/index.js +5 -0
  107. package/dist/containers/Tenant/Diagnostics/TopQueries/columns/i18n/index.js.map +1 -0
  108. package/dist/containers/Tenant/Diagnostics/TopQueries/i18n/en.json +1 -5
  109. package/dist/containers/Tenant/Diagnostics/TopQueries/i18n/index.d.ts +1 -1
  110. package/dist/containers/Tenant/Diagnostics/TopQueries/utils.d.ts +12 -0
  111. package/dist/containers/Tenant/Diagnostics/TopQueries/utils.js +28 -0
  112. package/dist/containers/Tenant/Diagnostics/TopQueries/utils.js.map +1 -0
  113. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +9 -34
  114. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js.map +1 -1
  115. package/dist/containers/Tenant/Diagnostics/TopShards/{getTopShardsColumns.d.ts → columns/columns.d.ts} +1 -2
  116. package/dist/containers/Tenant/Diagnostics/TopShards/{getTopShardsColumns.js → columns/columns.js} +16 -36
  117. package/dist/containers/Tenant/Diagnostics/TopShards/columns/columns.js.map +1 -0
  118. package/dist/containers/Tenant/Diagnostics/TopShards/columns/constants.d.ts +17 -0
  119. package/dist/containers/Tenant/Diagnostics/TopShards/columns/constants.js +55 -0
  120. package/dist/containers/Tenant/Diagnostics/TopShards/columns/constants.js.map +1 -0
  121. package/dist/containers/Tenant/Diagnostics/TopShards/columns/i18n/en.json +10 -0
  122. package/dist/containers/Tenant/Diagnostics/TopShards/columns/i18n/index.d.ts +2 -0
  123. package/dist/containers/Tenant/Diagnostics/TopShards/columns/i18n/index.js +5 -0
  124. package/dist/containers/Tenant/Diagnostics/TopShards/columns/i18n/index.js.map +1 -0
  125. package/dist/containers/Tenant/Diagnostics/TopShards/utils.d.ts +5 -0
  126. package/dist/containers/Tenant/Diagnostics/TopShards/utils.js +17 -0
  127. package/dist/containers/Tenant/Diagnostics/TopShards/utils.js.map +1 -0
  128. package/dist/containers/Tenant/Query/Issues/models.d.ts +2 -2
  129. package/dist/containers/Tenant/Query/Issues/models.js +2 -2
  130. package/dist/containers/Tenant/Query/Issues/models.js.map +1 -1
  131. package/dist/containers/Tenant/Query/QueryEditor/helpers.d.ts +0 -1
  132. package/dist/containers/Tenant/Query/QueryEditor/helpers.js +1 -1
  133. package/dist/containers/Tenant/Query/QueryEditor/helpers.js.map +1 -1
  134. package/dist/containers/Tenant/Query/QueryResult/components/PlanToSvgButton/PlanToSvgButton.js +49 -8
  135. package/dist/containers/Tenant/Query/QueryResult/components/PlanToSvgButton/PlanToSvgButton.js.map +1 -1
  136. package/dist/containers/Tenant/Query/QueryResult/components/QueryJSONViewer/QueryJSONViewer.d.ts +0 -1
  137. package/dist/containers/Tenant/Query/QueryResult/components/QueryJSONViewer/QueryJSONViewer.js +2 -5
  138. package/dist/containers/Tenant/Query/QueryResult/components/QueryJSONViewer/QueryJSONViewer.js.map +1 -1
  139. package/dist/containers/Tenant/Query/QueryResult/components/QueryJSONViewer/QueryJSONViewer.scss +0 -3
  140. package/dist/containers/Tenant/Query/QueryResult/components/SimplifiedPlan/OperationCell.js +1 -1
  141. package/dist/containers/Tenant/Query/QueryResult/components/SimplifiedPlan/OperationCell.js.map +1 -1
  142. package/dist/containers/Tenant/Query/QueryResult/components/SimplifiedPlan/SimplifiedPlan.js +16 -25
  143. package/dist/containers/Tenant/Query/QueryResult/components/SimplifiedPlan/SimplifiedPlan.js.map +1 -1
  144. package/dist/containers/Tenant/Query/QueryResult/components/SimplifiedPlan/SimplifiedPlan.scss +3 -53
  145. package/dist/containers/Tenant/Query/QueryResult/i18n/en.json +2 -1
  146. package/dist/containers/Tenant/Query/QueryResult/i18n/index.d.ts +1 -1
  147. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.d.ts +0 -104
  148. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js +4 -4
  149. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js.map +1 -1
  150. package/dist/containers/Tenant/Schema/SchemaViewer/columns.d.ts +0 -12
  151. package/dist/containers/Tenant/Schema/SchemaViewer/columns.js +1 -1
  152. package/dist/containers/Tenant/Schema/SchemaViewer/columns.js.map +1 -1
  153. package/dist/containers/Tenant/Schema/SchemaViewer/prepareData.d.ts +1 -2
  154. package/dist/containers/Tenant/Schema/SchemaViewer/prepareData.js +1 -1
  155. package/dist/containers/Tenant/Schema/SchemaViewer/prepareData.js.map +1 -1
  156. package/dist/containers/Tenant/utils/schema.d.ts +0 -1
  157. package/dist/containers/Tenant/utils/schema.js +0 -18
  158. package/dist/containers/Tenant/utils/schema.js.map +1 -1
  159. package/dist/containers/UserSettings/i18n/en.json +1 -3
  160. package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
  161. package/dist/containers/UserSettings/settings.d.ts +0 -1
  162. package/dist/containers/UserSettings/settings.js +2 -7
  163. package/dist/containers/UserSettings/settings.js.map +1 -1
  164. package/dist/containers/VDiskPage/VDiskPage.js +7 -2
  165. package/dist/containers/VDiskPage/VDiskPage.js.map +1 -1
  166. package/dist/containers/Versions/GroupedNodesTree/GroupedNodesTree.d.ts +0 -1
  167. package/dist/containers/Versions/GroupedNodesTree/GroupedNodesTree.js +1 -1
  168. package/dist/containers/Versions/GroupedNodesTree/GroupedNodesTree.js.map +1 -1
  169. package/dist/lib.d.ts +2 -2
  170. package/dist/lib.js +1 -1
  171. package/dist/lib.js.map +1 -1
  172. package/dist/routes.d.ts +2 -2
  173. package/dist/services/settings.d.ts +1 -1
  174. package/dist/services/settings.js +2 -2
  175. package/dist/services/settings.js.map +1 -1
  176. package/dist/store/reducers/cluster/cluster.d.ts +2 -164
  177. package/dist/store/reducers/cluster/cluster.js +1 -1
  178. package/dist/store/reducers/cluster/cluster.js.map +1 -1
  179. package/dist/store/reducers/cluster/types.d.ts +2 -6
  180. package/dist/store/reducers/executeTopQueries/executeTopQueries.d.ts +8 -8
  181. package/dist/store/reducers/executeTopQueries/executeTopQueries.js +10 -7
  182. package/dist/store/reducers/executeTopQueries/executeTopQueries.js.map +1 -1
  183. package/dist/store/reducers/executeTopQueries/types.d.ts +0 -3
  184. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +0 -195
  185. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.js +1 -1
  186. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.js.map +1 -1
  187. package/dist/store/reducers/nodes/types.d.ts +1 -6
  188. package/dist/store/reducers/query/types.d.ts +2 -1
  189. package/dist/store/reducers/schema/schema.d.ts +0 -6
  190. package/dist/store/reducers/schema/schema.js +1 -1
  191. package/dist/store/reducers/schema/schema.js.map +1 -1
  192. package/dist/store/reducers/shardsWorkload/shardsWorkload.d.ts +1 -4
  193. package/dist/store/reducers/shardsWorkload/shardsWorkload.js +3 -5
  194. package/dist/store/reducers/shardsWorkload/shardsWorkload.js.map +1 -1
  195. package/dist/store/reducers/shardsWorkload/types.d.ts +0 -3
  196. package/dist/store/reducers/storage/types.d.ts +1 -6
  197. package/dist/store/reducers/storage/types.js.map +1 -1
  198. package/dist/store/reducers/storage/utils.d.ts +2 -5
  199. package/dist/store/reducers/storage/utils.js +3 -3
  200. package/dist/store/reducers/storage/utils.js.map +1 -1
  201. package/dist/store/reducers/tableSchemaData.d.ts +2 -1
  202. package/dist/store/reducers/tablets.d.ts +0 -131
  203. package/dist/store/reducers/tablets.js +1 -1
  204. package/dist/store/reducers/tablets.js.map +1 -1
  205. package/dist/store/reducers/tenants/utils.d.ts +0 -11
  206. package/dist/store/reducers/tenants/utils.js +1 -14
  207. package/dist/store/reducers/tenants/utils.js.map +1 -1
  208. package/dist/store/reducers/tooltip.d.ts +1 -1
  209. package/dist/store/reducers/tooltip.js +1 -1
  210. package/dist/store/reducers/vdisk/types.d.ts +0 -2
  211. package/dist/types/additionalProps.d.ts +2 -2
  212. package/dist/types/api/error.d.ts +1 -1
  213. package/dist/types/api/meta.d.ts +1 -0
  214. package/dist/types/components.d.ts +5 -0
  215. package/dist/types/components.js +2 -0
  216. package/dist/types/components.js.map +1 -0
  217. package/dist/types/index.d.ts +0 -1
  218. package/dist/types/index.js.map +1 -1
  219. package/dist/types/store/tablet.d.ts +1 -8
  220. package/dist/types/store/tablets.d.ts +0 -8
  221. package/dist/types/store/tooltip.d.ts +2 -4
  222. package/dist/utils/constants.d.ts +1 -38
  223. package/dist/utils/constants.js +2 -28
  224. package/dist/utils/constants.js.map +1 -1
  225. package/dist/utils/dataFormatters/__test__/formatUptime.test.d.ts +1 -0
  226. package/dist/utils/dataFormatters/__test__/formatUptime.test.js +56 -0
  227. package/dist/utils/dataFormatters/__test__/formatUptime.test.js.map +1 -0
  228. package/dist/utils/dataFormatters/dataFormatters.d.ts +8 -4
  229. package/dist/utils/dataFormatters/dataFormatters.js +51 -21
  230. package/dist/utils/dataFormatters/dataFormatters.js.map +1 -1
  231. package/dist/utils/dataFormatters/i18n/en.json +3 -1
  232. package/dist/utils/dataFormatters/i18n/index.d.ts +1 -1
  233. package/dist/utils/dataFormatters/i18n/index.js +1 -2
  234. package/dist/utils/dataFormatters/i18n/index.js.map +1 -1
  235. package/dist/utils/developerUI/developerUI.d.ts +1 -0
  236. package/dist/utils/developerUI/developerUI.js +3 -0
  237. package/dist/utils/developerUI/developerUI.js.map +1 -1
  238. package/dist/utils/errors/i18n/en.json +3 -0
  239. package/dist/utils/errors/i18n/index.d.ts +2 -0
  240. package/dist/utils/errors/i18n/index.js +5 -0
  241. package/dist/utils/errors/i18n/index.js.map +1 -0
  242. package/dist/utils/errors/index.d.ts +6 -0
  243. package/dist/utils/errors/index.js +33 -0
  244. package/dist/utils/errors/index.js.map +1 -0
  245. package/dist/utils/hooks/__test__/useTableSort.test.d.ts +1 -0
  246. package/dist/utils/hooks/__test__/useTableSort.test.js +188 -0
  247. package/dist/utils/hooks/__test__/useTableSort.test.js.map +1 -0
  248. package/dist/utils/hooks/useTableSort.d.ts +10 -5
  249. package/dist/utils/hooks/useTableSort.js +61 -16
  250. package/dist/utils/hooks/useTableSort.js.map +1 -1
  251. package/dist/utils/monitoring.d.ts +3 -2
  252. package/dist/utils/nodes.d.ts +1 -1
  253. package/dist/utils/nodes.js +10 -4
  254. package/dist/utils/nodes.js.map +1 -1
  255. package/dist/utils/tablet.d.ts +0 -2
  256. package/dist/utils/tablet.js +0 -10
  257. package/dist/utils/tablet.js.map +1 -1
  258. package/dist/utils/tooltip.d.ts +0 -4
  259. package/dist/utils/tooltip.js +1 -23
  260. package/dist/utils/tooltip.js.map +1 -1
  261. package/dist/utils/utils.d.ts +0 -1
  262. package/dist/utils/utils.js +0 -10
  263. package/dist/utils/utils.js.map +1 -1
  264. package/package.json +4 -4
  265. package/dist/components/GroupInfo/GroupInfo.d.ts +0 -7
  266. package/dist/components/GroupInfo/GroupInfo.js +0 -27
  267. package/dist/components/GroupInfo/GroupInfo.js.map +0 -1
  268. package/dist/components/GroupInfo/i18n/en.json +0 -6
  269. package/dist/components/GroupInfo/i18n/index.d.ts +0 -1
  270. package/dist/components/GroupInfo/i18n/index.js +0 -5
  271. package/dist/components/GroupInfo/i18n/index.js.map +0 -1
  272. package/dist/components/QuerySettingsDescription/index.d.ts +0 -1
  273. package/dist/components/QuerySettingsDescription/index.js +0 -2
  274. package/dist/components/QuerySettingsDescription/index.js.map +0 -1
  275. package/dist/components/Tablet/Tablet.d.ts +0 -8
  276. package/dist/components/Tablet/Tablet.js +0 -18
  277. package/dist/components/Tablet/Tablet.js.map +0 -1
  278. package/dist/components/Tablet/Tablet.scss +0 -40
  279. package/dist/components/Tablet/index.d.ts +0 -1
  280. package/dist/components/Tablet/index.js +0 -2
  281. package/dist/components/Tablet/index.js.map +0 -1
  282. package/dist/components/TabletsOverall/TabletsOverall.d.ts +0 -8
  283. package/dist/components/TabletsOverall/TabletsOverall.js +0 -69
  284. package/dist/components/TabletsOverall/TabletsOverall.js.map +0 -1
  285. package/dist/components/TabletsOverall/TabletsOverall.scss +0 -18
  286. package/dist/containers/ClusterModeGuard/index.d.ts +0 -1
  287. package/dist/containers/ClusterModeGuard/index.js +0 -2
  288. package/dist/containers/ClusterModeGuard/index.js.map +0 -1
  289. package/dist/containers/Nodes/columns/hooks.d.ts +0 -6
  290. package/dist/containers/Nodes/columns/hooks.js +0 -12
  291. package/dist/containers/Nodes/columns/hooks.js.map +0 -1
  292. package/dist/containers/Nodes/index.d.ts +0 -1
  293. package/dist/containers/Nodes/index.js +0 -2
  294. package/dist/containers/Nodes/index.js.map +0 -1
  295. package/dist/containers/PDiskPage/shared.d.ts +0 -1
  296. package/dist/containers/PDiskPage/shared.js +0 -3
  297. package/dist/containers/PDiskPage/shared.js.map +0 -1
  298. package/dist/containers/Storage/Storage.d.ts +0 -11
  299. package/dist/containers/Storage/Storage.js +0 -91
  300. package/dist/containers/Storage/Storage.js.map +0 -1
  301. package/dist/containers/Storage/StorageGroups/StorageGroupsTable.d.ts +0 -14
  302. package/dist/containers/Storage/StorageGroups/StorageGroupsTable.js +0 -14
  303. package/dist/containers/Storage/StorageGroups/StorageGroupsTable.js.map +0 -1
  304. package/dist/containers/Storage/StorageNodes/StorageNodesTable.d.ts +0 -16
  305. package/dist/containers/Storage/StorageNodes/StorageNodesTable.js +0 -22
  306. package/dist/containers/Storage/StorageNodes/StorageNodesTable.js.map +0 -1
  307. package/dist/containers/Storage/StorageNodes/shared.d.ts +0 -3
  308. package/dist/containers/Storage/StorageNodes/shared.js +0 -5
  309. package/dist/containers/Storage/StorageNodes/shared.js.map +0 -1
  310. package/dist/containers/Storage/StorageWrapper.d.ts +0 -10
  311. package/dist/containers/Storage/StorageWrapper.js +0 -20
  312. package/dist/containers/Storage/StorageWrapper.js.map +0 -1
  313. package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.d.ts +0 -8
  314. package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.js.map +0 -1
  315. package/dist/containers/Tenant/Diagnostics/TopShards/getTopShardsColumns.js.map +0 -1
  316. package/dist/store/reducers/nodes/selectors.d.ts +0 -11
  317. package/dist/store/reducers/nodes/selectors.js +0 -39
  318. package/dist/store/reducers/nodes/selectors.js.map +0 -1
  319. package/dist/store/reducers/schema/types.d.ts +0 -10
  320. package/dist/store/reducers/schema/types.js +0 -2
  321. package/dist/store/reducers/schema/types.js.map +0 -1
  322. package/dist/store/reducers/storage/selectors.d.ts +0 -4
  323. package/dist/store/reducers/storage/selectors.js +0 -37
  324. package/dist/store/reducers/storage/selectors.js.map +0 -1
  325. package/dist/utils/dataFormatters/i18n/ru.json +0 -3
  326. package/dist/utils/diagnostics.d.ts +0 -23
  327. package/dist/utils/diagnostics.js +0 -37
  328. package/dist/utils/diagnostics.js.map +0 -1
@@ -1,22 +1,67 @@
1
1
  import React from 'react';
2
- import { DESCENDING } from '@gravity-ui/react-data-table/build/esm/lib/constants';
3
- export const useTableSort = ({ sortValue, sortOrder = DESCENDING }, onSort) => {
4
- const sort = React.useMemo(() => {
5
- if (!sortValue) {
2
+ import isEqual from 'lodash/isEqual';
3
+ export function useTableSort({ initialSortColumn, initialSortOrder = -1, fixedOrderType, multiple, onSort, }) {
4
+ const [sortOrder, setSortOrder] = React.useState(() => {
5
+ if (!initialSortColumn) {
6
6
  return undefined;
7
7
  }
8
+ return [
9
+ {
10
+ columnId: initialSortColumn,
11
+ order: fixedOrderType ? fixedOrderType : initialSortOrder,
12
+ },
13
+ ];
14
+ });
15
+ const handleTableSort = React.useCallback((rawValue) => {
16
+ if (!rawValue || (Array.isArray(rawValue) && !rawValue.length)) {
17
+ // In case we have fixedOrderType, we should not reset table sort to undefined, but use previously set order
18
+ if (!fixedOrderType) {
19
+ onSort === null || onSort === void 0 ? void 0 : onSort(undefined);
20
+ setSortOrder(undefined);
21
+ }
22
+ return;
23
+ }
24
+ let newSortOrder = Array.isArray(rawValue) ? rawValue : [rawValue];
25
+ if (fixedOrderType) {
26
+ newSortOrder = newSortOrder.map((value) => {
27
+ return {
28
+ columnId: value.columnId,
29
+ order: fixedOrderType,
30
+ };
31
+ });
32
+ }
33
+ if (!multiple) {
34
+ newSortOrder = newSortOrder.slice(0, 1);
35
+ }
36
+ setSortOrder((currentSortOrder) => {
37
+ if (newSortOrder && !isEqual(currentSortOrder, newSortOrder)) {
38
+ onSort === null || onSort === void 0 ? void 0 : onSort(newSortOrder);
39
+ return newSortOrder;
40
+ }
41
+ return currentSortOrder;
42
+ });
43
+ }, [fixedOrderType, multiple, onSort]);
44
+ return [sortOrder, handleTableSort];
45
+ }
46
+ export function prepareBackendSortFieldsFromTableSort(sortOrder = [], getSortFieldFromColumnId) {
47
+ const preparedSort = sortOrder
48
+ .map((value) => {
8
49
  return {
9
- columnId: sortValue,
10
- order: sortOrder,
50
+ columnId: getSortFieldFromColumnId(value.columnId),
51
+ order: value.order,
11
52
  };
12
- }, [sortValue, sortOrder]);
13
- const handleSort = (rawValue) => {
14
- const value = Array.isArray(rawValue) ? rawValue[0] : rawValue;
15
- onSort({
16
- sortValue: value === null || value === void 0 ? void 0 : value.columnId,
17
- sortOrder: value === null || value === void 0 ? void 0 : value.order,
18
- });
19
- };
20
- return [sort, handleSort];
21
- };
53
+ })
54
+ .filter((value) => Boolean(value.columnId));
55
+ if (preparedSort.length) {
56
+ return preparedSort;
57
+ }
58
+ return undefined;
59
+ }
60
+ function formatSortOrderToQuerySort({ columnId, order }) {
61
+ const queryOrder = order === -1 ? 'DESC' : 'ASC';
62
+ return `${columnId} ${queryOrder}`;
63
+ }
64
+ export function prepareOrderByFromTableSort(sortOrder) {
65
+ return sortOrder ? `ORDER BY ${sortOrder.map(formatSortOrderToQuerySort).join(', ')}` : '';
66
+ }
22
67
  //# sourceMappingURL=useTableSort.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTableSort.js","sourceRoot":"","sources":["../../../src/utils/hooks/useTableSort.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAC,UAAU,EAAC,MAAM,sDAAsD,CAAC;AAShF,MAAM,CAAC,MAAM,YAAY,GAAG,CACxB,EAAC,SAAS,EAAE,SAAS,GAAG,UAAU,EAAa,EAC/C,MAAoC,EACD,EAAE;IACrC,MAAM,IAAI,GAA0B,KAAK,CAAC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C;IAEF,OAAO,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,qCAAqC,CACjD,YAAyB,EAAE,EAC3B,wBAAkE;IAElE,MAAM,YAAY,GAAG,SAAS;SACzB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACX,OAAO;YACH,QAAQ,EAAE,wBAAwB,CAAC,KAAK,CAAC,QAAQ,CAAC;YAClD,KAAK,EAAE,KAAK,CAAC,KAAK;SACrB,CAAC;IACN,CAAC,CAAC;SACD,MAAM,CAAC,CAAC,KAAK,EAAsB,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEpE,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC;QACtB,OAAO,YAAY,CAAC;IACxB,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AAED,SAAS,0BAA0B,CAAC,EAAC,QAAQ,EAAE,KAAK,EAAY;IAC5D,MAAM,UAAU,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;IAEjD,OAAO,GAAG,QAAQ,IAAI,UAAU,EAAE,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,SAAuB;IAC/D,OAAO,SAAS,CAAC,CAAC,CAAC,YAAY,SAAS,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC/F,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { ETenantType } from '../types/api/tenant';
2
- export type ParsedMonitoringData = {
2
+ type ParsedMonitoringData = {
3
3
  monitoring_url: string;
4
4
  serverless_dashboard?: string;
5
5
  dedicated_dashboard?: string;
@@ -8,7 +8,7 @@ export type ParsedMonitoringData = {
8
8
  slot?: string;
9
9
  cluster_name?: string;
10
10
  };
11
- export interface GetMonitoringLinkProps {
11
+ interface GetMonitoringLinkProps {
12
12
  monitoring: string;
13
13
  dbName: string;
14
14
  dbType: ETenantType;
@@ -19,3 +19,4 @@ export declare function getMonitoringLink({ monitoring, dbName, dbType, clusterN
19
19
  export type GetMonitoringClusterLink = typeof getMonitoringClusterLink;
20
20
  export declare function getMonitoringClusterLink(monitoring: string, clusterName?: string): string;
21
21
  export declare function parseMonitoringData(monitoring: string): ParsedMonitoringData | undefined;
22
+ export {};
@@ -24,6 +24,6 @@ export interface PreparedNodeSystemState extends TSystemStateInfo {
24
24
  SharedCacheLimit?: number;
25
25
  SharedCacheUsed?: number;
26
26
  }
27
- export declare const prepareNodeSystemState: (systemState?: TSystemStateInfo) => PreparedNodeSystemState;
27
+ export declare function prepareNodeSystemState(systemState?: TSystemStateInfo): PreparedNodeSystemState;
28
28
  export declare const getProblemParamValue: (problemFilter: ProblemFilterValue | undefined) => problemFilter is "With problems";
29
29
  export declare const getUptimeParamValue: (nodesUptimeFilter: NodesUptimeFilterValues | undefined) => number | undefined;
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
  import { ProblemFilterValues } from '../store/reducers/settings/settings';
3
3
  import { EFlag } from '../types/api/enums';
4
4
  import { HOUR_IN_SECONDS } from './constants';
5
- import { calcUptime } from './dataFormatters/dataFormatters';
5
+ import { getDowntimeFromDateFormatted, getUptimeFromDateFormatted, } from './dataFormatters/dataFormatters';
6
6
  import { valueIsDefined } from '.';
7
7
  export var NodesUptimeFilterValues;
8
8
  (function (NodesUptimeFilterValues) {
@@ -34,13 +34,19 @@ export function calculateLoadAveragePercents(node = {}) {
34
34
  return (value * 100) / NumberOfCpus;
35
35
  });
36
36
  }
37
- export const prepareNodeSystemState = (systemState = {}) => {
37
+ export function prepareNodeSystemState(systemState = {}) {
38
38
  var _a, _b, _c, _d, _e, _f;
39
39
  // There is no Rack in Location field for din nodes
40
40
  const Rack = ((_a = systemState.Location) === null || _a === void 0 ? void 0 : _a.Rack) || systemState.Rack;
41
41
  const DC = ((_b = systemState.Location) === null || _b === void 0 ? void 0 : _b.DataCenter) || systemState.DataCenter;
42
42
  const TenantName = (_c = systemState === null || systemState === void 0 ? void 0 : systemState.Tenants) === null || _c === void 0 ? void 0 : _c[0];
43
- const Uptime = calcUptime(systemState.StartTime);
43
+ let Uptime;
44
+ if (systemState.DisconnectTime) {
45
+ Uptime = getDowntimeFromDateFormatted(systemState.DisconnectTime);
46
+ }
47
+ else {
48
+ Uptime = getUptimeFromDateFormatted(systemState.StartTime);
49
+ }
44
50
  const LoadAveragePercents = calculateLoadAveragePercents(systemState);
45
51
  // 0 limit means that limit is not set, so it should be undefined
46
52
  const SharedCacheLimit = Number((_d = systemState.SharedCacheStats) === null || _d === void 0 ? void 0 : _d.LimitBytes) || undefined;
@@ -57,7 +63,7 @@ export const prepareNodeSystemState = (systemState = {}) => {
57
63
  SharedCacheLimit,
58
64
  SharedCacheUsed,
59
65
  };
60
- };
66
+ }
61
67
  export const getProblemParamValue = (problemFilter) => {
62
68
  return problemFilter === ProblemFilterValues.PROBLEMS;
63
69
  };
@@ -1 +1 @@
1
- {"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../src/utils/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAC,mBAAmB,EAAC,MAAM,qCAAqC,CAAC;AAExE,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAC;AAKzC,OAAO,EAAC,eAAe,EAAC,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAC,UAAU,EAAC,MAAM,iCAAiC,CAAC;AAE3D,OAAO,EAAC,cAAc,EAAC,MAAM,GAAG,CAAC;AAEjC,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IAC/B,sCAAa,CAAA;IACb,sDAA6B,CAAA;AACjC,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC;AAED,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC;KACzC,UAAU,CAAC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gBAAgB,GAAG,MAAM,CAAC,MAAA,WAAW,CAAC,gBAAgB,0CAAE,UAAU,CAAC,IAAI,SAAS,CAAC;IACvF,MAAM,eAAe,GAAG,cAAc,CAAC,MAAA,WAAW,CAAC,gBAAgB,0CAAE,SAAS,CAAC;QAC3E,CAAC,CAAC,MAAM,CAAC,MAAA,WAAW,CAAC,gBAAgB,0CAAE,SAAS,CAAC;QACjD,CAAC,CAAC,SAAS,CAAC;IAEhB,OAAO;QACH,GAAG,WAAW;QACd,IAAI;QACJ,EAAE;QACF,MAAM;QACN,mBAAmB;QACnB,UAAU;QACV,gBAAgB;QAChB,eAAe;KAClB,CAAC;AACN,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,aAA6C,EAAE,EAAE;IAClF,OAAO,aAAa,KAAK,mBAAmB,CAAC,QAAQ,CAAC;AAC1D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,iBAAsD,EAAE,EAAE;IAC1F,OAAO,iBAAiB,KAAK,uBAAuB,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC;AACnG,CAAC,CAAC"}
@@ -1,7 +1,5 @@
1
1
  import type { LabelProps } from '@gravity-ui/uikit';
2
2
  import { EFlag } from '../types/api/enums';
3
3
  import { ETabletState } from '../types/api/tablet';
4
- export declare const tabletStates: string[];
5
- export declare const tabletColorToTabletState: Record<EFlag, ETabletState[]>;
6
4
  export declare const mapTabletStateToColorState: (state?: ETabletState | EFlag) => EFlag;
7
5
  export declare function mapTabletStateToLabelTheme(state?: ETabletState): LabelProps['theme'];
@@ -17,16 +17,6 @@ const tabletStateToColorState = {
17
17
  [ETabletState.Deleted]: EFlag.Green,
18
18
  [ETabletState.Active]: EFlag.Green,
19
19
  };
20
- export const tabletStates = Object.keys(ETabletState);
21
- export const tabletColorToTabletState = Object.entries(tabletStateToColorState).reduce((acc, [state, color]) => {
22
- if (acc[color]) {
23
- acc[color].push(state);
24
- }
25
- else {
26
- acc[color] = [state];
27
- }
28
- return acc;
29
- }, {});
30
20
  // Tablet State in different versions or in different endpoint
31
21
  // could be represented as ETabletState of EFlag
32
22
  export const mapTabletStateToColorState = (state) => {
@@ -1 +1 @@
1
- {"version":3,"file":"tablet.js","sourceRoot":"","sources":["../../src/utils/tablet.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAEjD,iGAAiG;AACjG,MAAM,uBAAuB,GAAgC;IACzD,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,GAAG;IAE9B,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM;IACpC,CAAC,YAAY,CAAC,mBAAmB,CAAC,EAAE,KAAK,CAAC,MAAM;IAChD,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM;IACtC,CAAC,YAAY,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC,MAAM;IAC7C,CAAC,YAAY,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM;IAC3C,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM;IACrC,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM;IACrC,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM;IACjC,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM;IACpC,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM;IAC1C,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM;IAEzC,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,KAAK;IACnC,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,KAAK;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,CAAC,KAA4B,EAAS,EAAE;IAC9E,IAAI,CAAC,KAAK,EAAE,CAAC;QACT,OAAO,KAAK,CAAC,IAAI,CAAC;IACtB,CAAC;IAED,MAAM,OAAO,GAAG,CAAC,KAA2B,EAAkB,EAAE,CAC5D,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAc,CAAC,CAAC;IAElD,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjB,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,OAAO,uBAAuB,CAAC,KAAK,CAAC,CAAC;AAC1C,CAAC,CAAC;AAEF,MAAM,UAAU,0BAA0B,CAAC,KAAoB;IAC3D,IAAI,CAAC,KAAK,EAAE,CAAC;QACT,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,QAAQ,KAAK,EAAE,CAAC;QACZ,KAAK,YAAY,CAAC,IAAI;YAClB,OAAO,QAAQ,CAAC;QACpB,KAAK,YAAY,CAAC,MAAM,CAAC;QACzB,KAAK,YAAY,CAAC,OAAO;YACrB,OAAO,SAAS,CAAC;QACrB;YACI,OAAO,SAAS,CAAC;IACzB,CAAC;AACL,CAAC"}
@@ -1,10 +1,6 @@
1
1
  export namespace tooltipTemplates {
2
- function pool(data: any): import("react/jsx-runtime").JSX.Element;
3
2
  function tablet(data: any): import("react/jsx-runtime").JSX.Element;
4
3
  function node(data: any): import("react/jsx-runtime").JSX.Element;
5
- function nodeEndpoints(data: any): import("react/jsx-runtime").JSX.Element;
6
- function tabletsOverall(data: any): import("react/jsx-runtime").JSX.Element;
7
4
  function histogram(data: any): import("react/jsx-runtime").JSX.Element;
8
5
  function cell(data: any): import("react/jsx-runtime").JSX.Element;
9
- function json(data: any): import("react/jsx-runtime").JSX.Element;
10
6
  }
@@ -1,43 +1,21 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import JSONTree from 'react-json-inspector';
3
- import { NodeEndpointsTooltipContent, PoolTooltipContent, TabletTooltipContent, } from '../components/TooltipsContent';
2
+ import { TabletTooltipContent } from '../components/TooltipsContent';
4
3
  import { cn } from './cn';
5
4
  const nodeB = cn('node-tootltip');
6
5
  const NodeTooltip = (props) => {
7
6
  const { data } = props;
8
7
  return (data && (_jsx("div", { className: nodeB(), children: _jsx("table", { children: _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsx("td", { className: nodeB('label'), children: "ID" }), _jsx("td", { className: nodeB('value'), children: data.nodeId || '?' })] }), _jsxs("tr", { children: [_jsx("td", { className: nodeB('label'), children: "Rack" }), _jsx("td", { className: nodeB('value'), children: data.rack || '?' })] }), data.connected && data.capacity ? (_jsxs("tr", { children: [_jsx("td", { className: nodeB('label'), children: "Net" }), _jsx("td", { className: nodeB('value'), children: `${data.connected} / ${data.capacity}` })] })) : null] }) }) })));
9
8
  };
10
- const tabletsOverallB = cn('tabletsOverall-tooltip');
11
- const TabletsOverallTooltip = (props) => {
12
- const { data } = props;
13
- return (data && (_jsx("div", { className: tabletsOverallB(), children: _jsx("table", { children: _jsx("tbody", { children: data.map((colorInfo, key) => {
14
- return (_jsxs("tr", { children: [_jsxs("td", { className: tabletsOverallB('label'), children: [colorInfo.color, ":"] }), _jsx("td", { className: tabletsOverallB('value'), children: `${colorInfo.value}/${colorInfo.total} (${colorInfo.percents.toFixed(2)}%)` })] }, key));
15
- }) }) }) })));
16
- };
17
9
  const histogramB = cn('histogram-tooltip');
18
10
  const HistogramTooltip = (props) => {
19
11
  const { data } = props;
20
12
  return (data && (_jsx("div", { className: histogramB(), children: _jsx("table", { children: _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsx("td", { className: histogramB('label'), children: "Count" }), _jsx("td", { className: histogramB('value'), children: data.count || '?' })] }), _jsxs("tr", { children: [_jsx("td", { className: histogramB('label'), children: "From" }), _jsx("td", { className: histogramB('value'), children: data.leftBound || '?' })] }), _jsxs("tr", { children: [_jsx("td", { className: histogramB('label'), children: "To" }), _jsx("td", { className: histogramB('value'), children: data.rightBound || '?' })] })] }) }) })));
21
13
  };
22
14
  const cellB = cn('cell-tooltip');
23
- const jsonB = cn('json-tooltip');
24
15
  export const tooltipTemplates = {
25
- // eslint-disable-next-line react/display-name
26
- pool: (data) => _jsx(PoolTooltipContent, { data: data }),
27
- // eslint-disable-next-line react/display-name
28
16
  tablet: (data) => _jsx(TabletTooltipContent, { data: data }),
29
- // eslint-disable-next-line react/display-name
30
17
  node: (data) => _jsx(NodeTooltip, { data: data }),
31
- nodeEndpoints: (data) => _jsx(NodeEndpointsTooltipContent, { data: data }),
32
- // eslint-disable-next-line react/display-name
33
- tabletsOverall: (data) => _jsx(TabletsOverallTooltip, { data: data }),
34
- // eslint-disable-next-line react/display-name
35
18
  histogram: (data) => _jsx(HistogramTooltip, { data: data }),
36
- // eslint-disable-next-line react/display-name
37
19
  cell: (data) => _jsx("div", { className: cellB(), children: data }),
38
- // eslint-disable-next-line react/display-name
39
- json: (data) => {
40
- return (_jsx("div", { className: jsonB(), children: _jsx(JSONTree, { data: data, search: false, isExpanded: () => true, className: jsonB('inspector') }) }));
41
- },
42
20
  };
43
21
  //# sourceMappingURL=tooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../src/utils/tooltip.js"],"names":[],"mappings":";AAAA,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAE5C,OAAO,EACH,2BAA2B,EAC3B,kBAAkB,EAClB,oBAAoB,GACvB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAC,EAAE,EAAC,MAAM,MAAM,CAAC;AAExB,MAAM,KAAK,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC;AAElC,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,EAAE;IAC1B,MAAM,EAAC,IAAI,EAAC,GAAG,KAAK,CAAC;IACrB,OAAO,CACH,IAAI,IAAI,CACJ,cAAK,SAAS,EAAE,KAAK,EAAE,YACnB,0BACI,4BACI,yBACI,aAAI,SAAS,EAAE,KAAK,CAA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,YAAG,IAAI,CAAC,UAAU,IAAI,GAAG,GAAM,IAChE,IACD,GACJ,GACN,CACT,CACJ,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,KAAK,GAAG,EAAE,CAAC,cAAc,CAAC,CAAC;AAEjC,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAC,oBAAoB,IAAC,IAAI,EAAE,IAAI,GAAI;IACtD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAC,WAAW,IAAC,IAAI,EAAE,IAAI,GAAI;IAC3C,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAC,gBAAgB,IAAC,IAAI,EAAE,IAAI,GAAI;IACrD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,cAAK,SAAS,EAAE,KAAK,EAAE,YAAG,IAAI,GAAO;CACxD,CAAC"}
@@ -1,5 +1,4 @@
1
1
  export declare function parseJson(value?: string | null): any;
2
- export declare function getValueFromLS(key: string, defaultValue: string): string | undefined;
3
2
  export declare function bytesToSize(bytes: number): string;
4
3
  export declare function bytesToSpeed(bytes?: number | string): string;
5
4
  export declare function bytesToGB(bytes?: number | string, shouldRound?: boolean): string;
@@ -9,16 +9,6 @@ export function parseJson(value) {
9
9
  return value;
10
10
  }
11
11
  }
12
- export function getValueFromLS(key, defaultValue) {
13
- var _a;
14
- try {
15
- return (_a = localStorage.getItem(key)) !== null && _a !== void 0 ? _a : defaultValue;
16
- }
17
- catch (err) {
18
- console.log(err);
19
- }
20
- return;
21
- }
22
12
  const sizes = [' B', ' KB', ' MB', ' GB', ' TB', ' PB', ' EB'];
23
13
  const base = 1000;
24
14
  export function bytesToSize(bytes) {
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,SAAS,CAAC,KAAqB;IAC3C,IAAI,CAAC,KAAK,EA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AAO,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAa,EAAE,SAAkB;IAC3D,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ydb-embedded-ui",
3
- "version": "7.1.0",
3
+ "version": "8.0.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -22,7 +22,7 @@
22
22
  "@gravity-ui/navigation": "^2.16.0",
23
23
  "@gravity-ui/paranoid": "^2.0.1",
24
24
  "@gravity-ui/react-data-table": "^2.1.1",
25
- "@gravity-ui/table": "^0.5.0",
25
+ "@gravity-ui/table": "^1.7.0",
26
26
  "@gravity-ui/uikit": "^6.33.0",
27
27
  "@gravity-ui/websql-autocomplete": "^12.1.2",
28
28
  "@hookform/resolvers": "^3.9.0",
@@ -69,7 +69,7 @@
69
69
  "lint:styles": "stylelint 'src/**/*.{css,scss}'",
70
70
  "lint:other": "npm run prettier -- --check",
71
71
  "prettier": "prettier '**/*.{json,yaml,yml,md}'",
72
- "unimported": "npx unimported --no-cache",
72
+ "unused": "npx knip --include dependencies,files,exports,types",
73
73
  "package": "rm -rf dist && tsc -p tsconfig.package.json && copyfiles -u 1 'src/**/*.{css,scss,svg}' dist",
74
74
  "test": "react-app-rewired test",
75
75
  "eject": "react-scripts eject",
@@ -127,7 +127,7 @@
127
127
  "@gravity-ui/tsconfig": "^1.0.0",
128
128
  "@playwright/test": "^1.42.1",
129
129
  "@testing-library/jest-dom": "^6.4.6",
130
- "@testing-library/react": "^14.2.2",
130
+ "@testing-library/react": "^16.0.1",
131
131
  "@testing-library/user-event": "^14.5.2",
132
132
  "@types/jest": "^29.5.12",
133
133
  "@types/lodash": "^4.17.0",
@@ -1,7 +0,0 @@
1
- import type { PreparedStorageGroup } from '../../store/reducers/storage/types';
2
- import type { InfoViewerProps } from '../InfoViewer/InfoViewer';
3
- interface GroupInfoProps<T extends Partial<PreparedStorageGroup>> extends Omit<InfoViewerProps, 'info'> {
4
- data: T;
5
- }
6
- export declare function GroupInfo<T extends Partial<PreparedStorageGroup>>({ data, ...infoViewerProps }: GroupInfoProps<T>): import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,27 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { valueIsDefined } from '../../utils';
3
- import { formatStorageValuesToGb } from '../../utils/dataFormatters/dataFormatters';
4
- import { InfoViewer } from '../InfoViewer';
5
- import { ProgressViewer } from '../ProgressViewer/ProgressViewer';
6
- import { groupInfoKeyset } from './i18n';
7
- export function GroupInfo({ data, ...infoViewerProps }) {
8
- const { GroupId, PoolName, Used, Limit, ErasureSpecies } = data;
9
- const groupInfo = [];
10
- if (valueIsDefined(GroupId)) {
11
- groupInfo.push({ label: groupInfoKeyset('group-id'), value: GroupId });
12
- }
13
- if (valueIsDefined(PoolName)) {
14
- groupInfo.push({ label: groupInfoKeyset('pool-name'), value: PoolName });
15
- }
16
- if (valueIsDefined(ErasureSpecies)) {
17
- groupInfo.push({ label: groupInfoKeyset('erasure'), value: ErasureSpecies });
18
- }
19
- if (Number(Used) >= 0 && Number(Limit) >= 0) {
20
- groupInfo.push({
21
- label: groupInfoKeyset('size'),
22
- value: (_jsx(ProgressViewer, { value: Used, capacity: Limit, formatValues: formatStorageValuesToGb, colorizeProgress: true })),
23
- });
24
- }
25
- return _jsx(InfoViewer, { info: groupInfo, ...infoViewerProps });
26
- }
27
- //# sourceMappingURL=GroupInfo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GroupInfo.js","sourceRoot":"","sources":["../../../src/components/GroupInfo/G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AE,IAAI,EACX,QAAQ,EAAE,KAAK,EACf,YAAY,EAAE,uBAAuB,EACrC,gBAAgB,EAAE,IAAI,GACxB,CACL;SACJ,CAAC,CAAC;IACP,CAAC;IAED,OAAO,KAAC,UAAU,IAAC,IAAI,EAAE,SAAS,KAAM,eAAe,GAAI,CAAC;AAChE,CAAC"}
@@ -1,6 +0,0 @@
1
- {
2
- "group-id": "Group ID",
3
- "pool-name": "Storage Pool Name",
4
- "size": "Size",
5
- "erasure": "Erasure"
6
- }
@@ -1 +0,0 @@
1
- export declare const groupInfoKeyset: (key: "size" | "pool-name" | "erasure" | "group-id", params?: import("@gravity-ui/i18n").Params) => string;
@@ -1,5 +0,0 @@
1
- import { registerKeysets } from '../../../utils/i18n';
2
- import en from './en.json';
3
- const COMPONENT = 'ydb-group-info';
4
- export const groupInfoKeyset = registerKeysets(COMPONENT, { en });
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/GroupInfo/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,MAAM,WAAW,CAAC;AAE3B,MAAM,SAAS,GAAG,gBAAgB,CAAC;AAEnC,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC,SAAS,EAAE,EAAC,EAAE,EAAC,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export * from './QuerySettingsDescription';
@@ -1,2 +0,0 @@
1
- export * from './QuerySettingsDescription';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/QuerySettingsDescription/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
@@ -1,8 +0,0 @@
1
- import type { TTabletStateInfo } from '../../types/api/tablet';
2
- import './Tablet.scss';
3
- interface TabletProps {
4
- tablet?: TTabletStateInfo;
5
- database?: string;
6
- }
7
- export declare const Tablet: ({ tablet, database }: TabletProps) => import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,18 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { getTabletPagePath } from '../../routes';
3
- import { cn } from '../../utils/cn';
4
- import { getTabletLabel } from '../../utils/constants';
5
- import { ContentWithPopup } from '../ContentWithPopup/ContentWithPopup';
6
- import { InternalLink } from '../InternalLink';
7
- import { TabletIcon } from '../TabletIcon/TabletIcon';
8
- import { TabletTooltipContent } from '../TooltipsContent';
9
- import './Tablet.scss';
10
- const b = cn('tablet');
11
- export const Tablet = ({ tablet = {}, database }) => {
12
- var _a;
13
- const { TabletId: id } = tablet;
14
- const status = (_a = tablet.Overall) === null || _a === void 0 ? void 0 : _a.toLowerCase();
15
- const tabletPath = id && getTabletPagePath(id, { database });
16
- return (_jsx(ContentWithPopup, { className: b('wrapper'), content: _jsx(TabletTooltipContent, { data: tablet, className: b('popup-content') }), children: _jsx(InternalLink, { to: tabletPath, children: _jsx(TabletIcon, { className: b({ status }), text: getTabletLabel(tablet.Type) }) }) }));
17
- };
18
- //# sourceMappingURL=Tablet.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Tablet.js","sourceRoot":"","sources":["../../../src/components/Tablet/Tablet.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAC,cAAc,EAAC,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAC,gBAAgB,EAAC,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAC;AAExD,OAAO,eAAe,CAAC;AAEvB,MAAM,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC;AAOvB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAC,MAAM,GAAG,EAAE,EAAE,QAAQ,EAAc,EAAE,EAAE;;IAC3D,MAAM,EAAC,QAAQ,EAAE,EAAE,EAAC,GAAG,MAAM,CAAC;IAC9B,MAAM,MAAM,GAAG,MAAA,MAAM,CAAC,OAAO,0CAAE,WAAW,EAAE,CAAC;IAE7C,MAAM,UAAU,GAAG,EAAE,IAAI,iBAAiB,CAAC,EAAE,EAAE,EAAC,QAAQ,EAAC,CAAC,CAAC;IAE3D,OAAO,CACH,KAAC,gBAAgB,IACb,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,EACvB,OAAO,EAAE,KAAC,oBAAoB,IAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,eAAe,CAAC,GAAI,YAE9E,KAAC,YAAY,IAAC,EAAE,EAAE,UAAU,YACxB,KAAC,UAAU,IAAC,SAAS,EAAE,CAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,GAAI,GAC9D,GACA,CACtB,CAAC;AACN,CAAC,CAAC"}
@@ -1,40 +0,0 @@
1
- .tablet {
2
- cursor: pointer;
3
-
4
- color: var(--g-color-text-complementary);
5
- border-color: var(--g-color-base-generic-medium-hover);
6
-
7
- &__wrapper {
8
- margin-right: 2px;
9
- margin-bottom: 2px;
10
- &:last-child {
11
- margin-right: 0;
12
- }
13
- }
14
-
15
- &__popup-content {
16
- padding: 10px;
17
- }
18
-
19
- &_status_grey {
20
- background-color: var(--ydb-color-status-grey);
21
- }
22
- &_status_yellow {
23
- background-color: var(--ydb-color-status-yellow);
24
- }
25
- &_status_orange {
26
- background-color: var(--ydb-color-status-orange);
27
- }
28
- &_status_red {
29
- background-color: var(--ydb-color-status-red);
30
- }
31
- &_status_green {
32
- background-color: var(--ydb-color-status-green);
33
- }
34
- &_status_blue {
35
- background-color: var(--ydb-color-status-blue);
36
- }
37
- &_status_black {
38
- background-color: var(--ydb-color-status-black);
39
- }
40
- }
@@ -1 +0,0 @@
1
- export * from './Tablet';
@@ -1,2 +0,0 @@
1
- export * from './Tablet';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Tablet/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -1,8 +0,0 @@
1
- import './TabletsOverall.scss';
2
- interface TabletsOverallProps {
3
- tablets: {
4
- Overall?: string;
5
- }[];
6
- }
7
- declare function TabletsOverall({ tablets }: TabletsOverallProps): import("react/jsx-runtime").JSX.Element;
8
- export default TabletsOverall;
@@ -1,69 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Progress } from '@gravity-ui/uikit';
3
- import { hideTooltip, showTooltip } from '../../store/reducers/tooltip';
4
- import { cn } from '../../utils/cn';
5
- import { COLORS_PRIORITY } from '../../utils/constants';
6
- import { useTypedDispatch } from '../../utils/hooks';
7
- import './TabletsOverall.scss';
8
- // to be able to see problem places with very small percentage, we'll set minimum percentage to 3.
9
- const minOverallPercentValue = 3;
10
- const colors = {
11
- grey: 'var(--ydb-color-status-grey)',
12
- green: 'var(--ydb-color-status-green)',
13
- yellow: ' var(--ydb-color-status-yellow)',
14
- orange: 'var(--ydb-color-status-orange)',
15
- red: 'var(--ydb-color-status-red)',
16
- blue: 'var(--ydb-color-status-blue)',
17
- };
18
- const b = cn('kv-tablets-overall');
19
- function TabletsOverall({ tablets }) {
20
- const dispatch = useTypedDispatch();
21
- const tabletsCount = tablets.length;
22
- const subtractPercentsFromMaxPercents = (statesForOverallProgress, subtractValue) => {
23
- Object.keys(statesForOverallProgress).some((key) => {
24
- if (statesForOverallProgress[key] > 10) {
25
- statesForOverallProgress[key] -= minOverallPercentValue - subtractValue;
26
- return true;
27
- }
28
- return false;
29
- });
30
- };
31
- // determine how many tablets of what color are in "tablets"
32
- const statesForOverallProgress = tablets.reduce((acc, tablet) => {
33
- var _a;
34
- const color = (_a = tablet.Overall) === null || _a === void 0 ? void 0 : _a.toLowerCase();
35
- if (color && !acc[color]) {
36
- acc[color] = 1;
37
- }
38
- else if (color) {
39
- acc[color]++;
40
- }
41
- return acc;
42
- }, {});
43
- const tooltipData = [];
44
- // determine how many percents is every color in statesForOverallProgress and by the way generate information for tooltip
45
- Object.keys(statesForOverallProgress).forEach((key) => {
46
- const percents = (statesForOverallProgress[key] / tabletsCount) * 100;
47
- const value = statesForOverallProgress[key];
48
- statesForOverallProgress[key] = percents;
49
- tooltipData.push({ color: key, percents, value, total: tablets.length });
50
- });
51
- // replace percents which are smaller then 3 to 3.
52
- Object.keys(statesForOverallProgress).forEach((key) => {
53
- if (statesForOverallProgress[key] < minOverallPercentValue) {
54
- subtractPercentsFromMaxPercents(statesForOverallProgress, statesForOverallProgress[key]);
55
- statesForOverallProgress[key] = minOverallPercentValue;
56
- }
57
- });
58
- const memoryProgress = 100;
59
- const stack = Object.keys(statesForOverallProgress).map((key) => ({
60
- color: colors[key],
61
- colorKey: key,
62
- value: statesForOverallProgress[key],
63
- }));
64
- // sort stack to achieve order "green, orange, yellow, red, blue, grey"
65
- stack.sort((a, b) => COLORS_PRIORITY[b.colorKey] - COLORS_PRIORITY[a.colorKey]);
66
- return (_jsxs("div", { className: b('row', { overall: true }), children: [_jsx("span", { className: b('label', { overall: true }), children: "Overall:" }), _jsx("div", { onMouseLeave: () => dispatch(hideTooltip()), onMouseEnter: (e) => dispatch(showTooltip(e.target, tooltipData, 'tabletsOverall')), children: _jsx(Progress, { value: memoryProgress, stack: stack }) })] }));
67
- }
68
- export default TabletsOverall;
69
- //# sourceMappingURL=TabletsOverall.js.map