ydb-embedded-ui 22.0.0 → 22.1.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.
- package/dist/components/DiskStateProgressBar/AllModeCapacityAlertIndicator.d.ts +2 -1
- package/dist/components/DiskStateProgressBar/AllModeCapacityAlertIndicator.js +5 -2
- package/dist/components/DiskStateProgressBar/AllModeCapacityAlertIndicator.js.map +1 -1
- package/dist/components/DiskStateProgressBar/AllModeIndicators.d.ts +2 -1
- package/dist/components/DiskStateProgressBar/AllModeIndicators.js +4 -2
- package/dist/components/DiskStateProgressBar/AllModeIndicators.js.map +1 -1
- package/dist/components/DiskStateProgressBar/DiskIndicator.d.ts +7 -2
- package/dist/components/DiskStateProgressBar/DiskIndicator.js +6 -6
- package/dist/components/DiskStateProgressBar/DiskIndicator.js.map +1 -1
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.js +1 -1
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.js.map +1 -1
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.scss +53 -45
- package/dist/components/DiskStateProgressBar/PDiskAllModeIndicators.js +9 -1
- package/dist/components/DiskStateProgressBar/PDiskAllModeIndicators.js.map +1 -1
- package/dist/components/EvictVDiskButton/EvictVDiskButton.js +7 -3
- package/dist/components/EvictVDiskButton/EvictVDiskButton.js.map +1 -1
- package/dist/components/FullNodeViewer/FullNodeViewer.js +40 -17
- package/dist/components/FullNodeViewer/FullNodeViewer.js.map +1 -1
- package/dist/components/FullNodeViewer/FullNodeViewer.scss +3 -3
- package/dist/components/FullNodeViewer/i18n/en.json +2 -1
- package/dist/components/FullNodeViewer/i18n/index.d.ts +1 -1
- package/dist/components/HoverPopup/HoverPopup.js +9 -2
- package/dist/components/HoverPopup/HoverPopup.js.map +1 -1
- package/dist/components/InfoViewer/InfoViewer.js +1 -1
- package/dist/components/InfoViewer/InfoViewer.js.map +1 -1
- package/dist/components/InfoViewer/formatters/pqGroup.js +6 -1
- package/dist/components/InfoViewer/formatters/pqGroup.js.map +1 -1
- package/dist/components/InfoViewer/schemaInfo/i18n/en.json +1 -0
- package/dist/components/InfoViewer/schemaInfo/i18n/index.d.ts +1 -1
- package/dist/components/InfoViewer/schemaInfo/utils.js +6 -1
- package/dist/components/InfoViewer/schemaInfo/utils.js.map +1 -1
- package/dist/components/NodeHostWrapper/NodeHostWrapper.d.ts +4 -1
- package/dist/components/NodeHostWrapper/NodeHostWrapper.js +13 -9
- package/dist/components/NodeHostWrapper/NodeHostWrapper.js.map +1 -1
- package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/PaginatedTable/KeyboardNavigation.d.ts +9 -0
- package/dist/components/PaginatedTable/KeyboardNavigation.js +14 -0
- package/dist/components/PaginatedTable/KeyboardNavigation.js.map +1 -0
- package/dist/components/PaginatedTable/PaginatedTable.d.ts +4 -1
- package/dist/components/PaginatedTable/PaginatedTable.js +77 -4
- package/dist/components/PaginatedTable/PaginatedTable.js.map +1 -1
- package/dist/components/PaginatedTable/PaginatedTable.scss +10 -0
- package/dist/components/PaginatedTable/PaginatedTableWithLayout.d.ts +2 -1
- package/dist/components/PaginatedTable/PaginatedTableWithLayout.js +2 -2
- package/dist/components/PaginatedTable/PaginatedTableWithLayout.js.map +1 -1
- package/dist/components/PaginatedTable/ResizeablePaginatedTable.js +2 -1
- package/dist/components/PaginatedTable/ResizeablePaginatedTable.js.map +1 -1
- package/dist/components/PaginatedTable/TableChunk.js +6 -10
- package/dist/components/PaginatedTable/TableChunk.js.map +1 -1
- package/dist/components/PaginatedTable/TableChunksRenderer.d.ts +2 -1
- package/dist/components/PaginatedTable/TableChunksRenderer.js +6 -1
- package/dist/components/PaginatedTable/TableChunksRenderer.js.map +1 -1
- package/dist/components/PaginatedTable/TableRow.d.ts +3 -1
- package/dist/components/PaginatedTable/TableRow.js +24 -8
- package/dist/components/PaginatedTable/TableRow.js.map +1 -1
- package/dist/components/PaginatedTable/getTableChunkQueryParams.d.ts +23 -0
- package/dist/components/PaginatedTable/getTableChunkQueryParams.js +12 -0
- package/dist/components/PaginatedTable/getTableChunkQueryParams.js.map +1 -0
- package/dist/components/PaginatedTable/rowLookup.d.ts +8 -0
- package/dist/components/PaginatedTable/rowLookup.js +35 -0
- package/dist/components/PaginatedTable/rowLookup.js.map +1 -0
- package/dist/components/PaginatedTable/useKeyboardNavigation.d.ts +27 -0
- package/dist/components/PaginatedTable/useKeyboardNavigation.js +70 -0
- package/dist/components/PaginatedTable/useKeyboardNavigation.js.map +1 -0
- package/dist/components/ResizeableDataTable/DataTableKeyboardNavigation.d.ts +24 -0
- package/dist/components/ResizeableDataTable/DataTableKeyboardNavigation.js +144 -0
- package/dist/components/ResizeableDataTable/DataTableKeyboardNavigation.js.map +1 -0
- package/dist/components/ResizeableDataTable/ResizeableDataTable.d.ts +4 -1
- package/dist/components/ResizeableDataTable/ResizeableDataTable.js +28 -4
- package/dist/components/ResizeableDataTable/ResizeableDataTable.js.map +1 -1
- package/dist/components/ResizeableDataTable/ResizeableDataTable.scss +10 -0
- package/dist/components/ResizeableDataTable/getDataTableOrder.d.ts +2 -0
- package/dist/components/ResizeableDataTable/getDataTableOrder.js +12 -0
- package/dist/components/ResizeableDataTable/getDataTableOrder.js.map +1 -0
- package/dist/components/Search/Search.d.ts +2 -1
- package/dist/components/Search/Search.js +6 -2
- package/dist/components/Search/Search.js.map +1 -1
- package/dist/components/ShardsTable/columns.js +6 -3
- package/dist/components/ShardsTable/columns.js.map +1 -1
- package/dist/components/ShardsTable/i18n/en.json +1 -0
- package/dist/components/ShardsTable/i18n/index.d.ts +1 -1
- package/dist/components/TableKeyboardNavigation/TableKeyboardNavigation.d.ts +54 -0
- package/dist/components/TableKeyboardNavigation/TableKeyboardNavigation.js +389 -0
- package/dist/components/TableKeyboardNavigation/TableKeyboardNavigation.js.map +1 -0
- package/dist/components/TableKeyboardNavigation/TableKeyboardNavigation.scss +16 -0
- package/dist/components/TableKeyboardNavigation/i18n/en.json +4 -0
- package/dist/components/TableKeyboardNavigation/i18n/index.d.ts +2 -0
- package/dist/components/TableKeyboardNavigation/i18n/index.js +4 -0
- package/dist/components/TableKeyboardNavigation/i18n/index.js.map +1 -0
- package/dist/components/TableKeyboardNavigation/utils.d.ts +3 -0
- package/dist/components/TableKeyboardNavigation/utils.js +24 -0
- package/dist/components/TableKeyboardNavigation/utils.js.map +1 -0
- package/dist/components/TableWithControlsLayout/TableWithControlsLayout.d.ts +4 -1
- package/dist/components/TableWithControlsLayout/TableWithControlsLayout.js +4 -2
- package/dist/components/TableWithControlsLayout/TableWithControlsLayout.js.map +1 -1
- package/dist/components/TenantNameWrapper/TenantNameWrapper.d.ts +3 -1
- package/dist/components/TenantNameWrapper/TenantNameWrapper.js +8 -12
- package/dist/components/TenantNameWrapper/TenantNameWrapper.js.map +1 -1
- package/dist/components/TenantNameWrapper/utils.d.ts +10 -0
- package/dist/components/TenantNameWrapper/utils.js +11 -0
- package/dist/components/TenantNameWrapper/utils.js.map +1 -1
- package/dist/components/UptimeViewer/UptimeViewer.d.ts +2 -2
- package/dist/components/VDisk/VDisk.d.ts +5 -1
- package/dist/components/VDisk/VDisk.js +84 -29
- package/dist/components/VDisk/VDisk.js.map +1 -1
- package/dist/components/VDisk/VDiskWithDonorsStack.d.ts +4 -1
- package/dist/components/VDisk/VDiskWithDonorsStack.js +8 -4
- package/dist/components/VDisk/VDiskWithDonorsStack.js.map +1 -1
- package/dist/components/VDisk/i18n/en.json +11 -0
- package/dist/components/VDisk/i18n/index.d.ts +1 -1
- package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/nodesColumns/columns.d.ts +4 -1
- package/dist/components/nodesColumns/columns.js +13 -0
- package/dist/components/nodesColumns/columns.js.map +1 -1
- package/dist/components/nodesColumns/constants.d.ts +2 -0
- package/dist/components/nodesColumns/constants.js +6 -0
- package/dist/components/nodesColumns/constants.js.map +1 -1
- package/dist/components/nodesColumns/i18n/en.json +2 -1
- package/dist/components/nodesColumns/i18n/index.d.ts +1 -1
- package/dist/containers/Clusters/Clusters.js +11 -7
- package/dist/containers/Clusters/Clusters.js.map +1 -1
- package/dist/containers/Node/NodeNetwork/NodeNetworkControls/NodeNetworkControls.js +1 -1
- package/dist/containers/Node/NodeNetwork/NodeNetworkControls/NodeNetworkControls.js.map +1 -1
- package/dist/containers/Node/NodeNetwork/NodeNetworkTable.js +11 -1
- package/dist/containers/Node/NodeNetwork/NodeNetworkTable.js.map +1 -1
- package/dist/containers/Node/Threads/ThreadStatesBar/ThreadStatesBar.d.ts +1 -1
- package/dist/containers/Nodes/NodesControls/NodesControls.js +1 -1
- package/dist/containers/Nodes/NodesControls/NodesControls.js.map +1 -1
- package/dist/containers/Nodes/NodesTable.js +12 -1
- package/dist/containers/Nodes/NodesTable.js.map +1 -1
- package/dist/containers/Nodes/PaginatedNodes/GroupedNodesComponent.js +1 -1
- package/dist/containers/Nodes/PaginatedNodes/GroupedNodesComponent.js.map +1 -1
- package/dist/containers/Nodes/columns/columns.js +2 -1
- package/dist/containers/Nodes/columns/columns.js.map +1 -1
- package/dist/containers/Storage/Disks/Disks.d.ts +2 -1
- package/dist/containers/Storage/Disks/Disks.js +34 -23
- package/dist/containers/Storage/Disks/Disks.js.map +1 -1
- package/dist/containers/Storage/Disks/Disks.scss +5 -0
- package/dist/containers/Storage/PDisk/PDisk.d.ts +6 -9
- package/dist/containers/Storage/PDisk/PDisk.js +92 -37
- package/dist/containers/Storage/PDisk/PDisk.js.map +1 -1
- package/dist/containers/Storage/PDisk/PDisk.scss +79 -1
- package/dist/containers/Storage/PDisk/PDiskWithVDisks.d.ts +17 -0
- package/dist/containers/Storage/PDisk/PDiskWithVDisks.js +48 -0
- package/dist/containers/Storage/PDisk/PDiskWithVDisks.js.map +1 -0
- package/dist/containers/Storage/PDisk/i18n/en.json +8 -0
- package/dist/containers/Storage/PDisk/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/PDisk/index.d.ts +1 -0
- package/dist/containers/Storage/PDisk/index.js +1 -0
- package/dist/containers/Storage/PDisk/index.js.map +1 -1
- package/dist/containers/Storage/PDisks/PDisks.d.ts +4 -1
- package/dist/containers/Storage/PDisks/PDisks.js +52 -6
- package/dist/containers/Storage/PDisks/PDisks.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorage.js +3 -1
- package/dist/containers/Storage/PaginatedStorage.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.js +1 -1
- package/dist/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroups/StorageGroupsControls.js +2 -2
- package/dist/containers/Storage/PaginatedStorageGroups/StorageGroupsControls.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/PaginatedStorageGroupsTable.js +10 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/PaginatedStorageGroupsTable.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.d.ts +1 -0
- package/dist/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.js +8 -5
- package/dist/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageNodes/StorageNodesComponent.js +6 -3
- package/dist/containers/Storage/PaginatedStorageNodes/StorageNodesComponent.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageNodes/StorageNodesControls.js +17 -5
- package/dist/containers/Storage/PaginatedStorageNodes/StorageNodesControls.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageNodes/nodeExpertModeLayout.d.ts +16 -0
- package/dist/containers/Storage/PaginatedStorageNodes/nodeExpertModeLayout.js +68 -0
- package/dist/containers/Storage/PaginatedStorageNodes/nodeExpertModeLayout.js.map +1 -0
- package/dist/containers/Storage/PaginatedStorageNodesTable/PaginatedStorageNodesTable.d.ts +2 -1
- package/dist/containers/Storage/PaginatedStorageNodesTable/PaginatedStorageNodesTable.js +14 -2
- package/dist/containers/Storage/PaginatedStorageNodesTable/PaginatedStorageNodesTable.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageNodesTable/columns/columns.js +2 -2
- package/dist/containers/Storage/PaginatedStorageNodesTable/columns/columns.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageNodesTable/columns/hooks.js +7 -2
- package/dist/containers/Storage/PaginatedStorageNodesTable/columns/hooks.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageNodesTable/columns/types.d.ts +2 -0
- package/dist/containers/Storage/StorageExpertModePanel/StorageGroupsExpertModePanel.d.ts +5 -0
- package/dist/containers/Storage/StorageExpertModePanel/StorageGroupsExpertModePanel.js +31 -0
- package/dist/containers/Storage/StorageExpertModePanel/StorageGroupsExpertModePanel.js.map +1 -0
- package/dist/containers/Storage/StorageExpertModePanel/StorageNodesExpertModePanel.d.ts +5 -0
- package/dist/containers/Storage/StorageExpertModePanel/StorageNodesExpertModePanel.js +31 -0
- package/dist/containers/Storage/StorageExpertModePanel/StorageNodesExpertModePanel.js.map +1 -0
- package/dist/containers/Storage/StorageExpertModePanel/components/ExpertModePanelLayout.d.ts +21 -0
- package/dist/containers/Storage/StorageExpertModePanel/components/ExpertModePanelLayout.js +13 -0
- package/dist/containers/Storage/StorageExpertModePanel/components/ExpertModePanelLayout.js.map +1 -0
- package/dist/containers/Storage/StorageExpertModePanel/components/FrontQueuesLegend.js +1 -0
- package/dist/containers/Storage/StorageExpertModePanel/components/FrontQueuesLegend.js.map +1 -1
- package/dist/containers/Storage/StorageExpertModePanel/components/PDiskDecommitLegend.js +1 -0
- package/dist/containers/Storage/StorageExpertModePanel/components/PDiskDecommitLegend.js.map +1 -1
- package/dist/containers/Storage/StorageExpertModePanel/components/PDiskDriveLegend.js +3 -2
- package/dist/containers/Storage/StorageExpertModePanel/components/PDiskDriveLegend.js.map +1 -1
- package/dist/containers/Storage/StorageExpertModePanel/components/PDiskMaintenanceLegend.js +1 -0
- package/dist/containers/Storage/StorageExpertModePanel/components/PDiskMaintenanceLegend.js.map +1 -1
- package/dist/containers/Storage/StorageExpertModePanel/components/SpaceLegend.js +4 -4
- package/dist/containers/Storage/StorageExpertModePanel/components/SpaceLegend.js.map +1 -1
- package/dist/containers/Storage/StorageExpertModePanel/components/StatusPairLegend.js +3 -3
- package/dist/containers/Storage/StorageExpertModePanel/components/StatusPairLegend.js.map +1 -1
- package/dist/containers/Storage/StorageExpertModePanel/components/getSpaceLegendSelection.d.ts +1 -1
- package/dist/containers/Storage/StorageExpertModePanel/components/renderExpertModeLegend.d.ts +4 -0
- package/dist/containers/Storage/StorageExpertModePanel/components/renderExpertModeLegend.js +49 -0
- package/dist/containers/Storage/StorageExpertModePanel/components/renderExpertModeLegend.js.map +1 -0
- package/dist/containers/Storage/StorageExpertModePanel/constants.d.ts +20 -0
- package/dist/containers/Storage/StorageExpertModePanel/constants.js +22 -0
- package/dist/containers/Storage/StorageExpertModePanel/constants.js.map +1 -1
- package/dist/containers/Storage/StorageExpertModePanel/i18n/en.json +2 -2
- package/dist/containers/Storage/StorageExpertModePanel/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/TableGroup/TableGroup.js +2 -1
- package/dist/containers/Storage/TableGroup/TableGroup.js.map +1 -1
- package/dist/containers/Storage/VDisks/VDisks.d.ts +2 -1
- package/dist/containers/Storage/VDisks/VDisks.js +11 -4
- package/dist/containers/Storage/VDisks/VDisks.js.map +1 -1
- package/dist/containers/Storage/VDisks/VDisks.scss +3 -0
- package/dist/containers/Storage/useStoragePDiskDisplayStateGetter.d.ts +1 -0
- package/dist/containers/Storage/useStoragePDiskDisplayStateGetter.js +73 -102
- package/dist/containers/Storage/useStoragePDiskDisplayStateGetter.js.map +1 -1
- package/dist/containers/Storage/useStorageQueryParams.d.ts +9 -1
- package/dist/containers/Storage/useStorageQueryParams.js +50 -2
- package/dist/containers/Storage/useStorageQueryParams.js.map +1 -1
- package/dist/containers/Storage/useStorageVDiskDisplayStateGetter.d.ts +1 -0
- package/dist/containers/Storage/useStorageVDiskDisplayStateGetter.js +50 -13
- package/dist/containers/Storage/useStorageVDiskDisplayStateGetter.js.map +1 -1
- package/dist/containers/Storage/utils/useStorageColumnsSettings.d.ts +4 -1
- package/dist/containers/Storage/utils/useStorageColumnsSettings.js +49 -39
- package/dist/containers/Storage/utils/useStorageColumnsSettings.js.map +1 -1
- package/dist/containers/Storage/utils/useVirtualizedDiskList.d.ts +10 -0
- package/dist/containers/Storage/utils/useVirtualizedDiskList.js +131 -0
- package/dist/containers/Storage/utils/useVirtualizedDiskList.js.map +1 -0
- package/dist/containers/Tablet/Tablet.js +4 -2
- package/dist/containers/Tablet/Tablet.js.map +1 -1
- package/dist/containers/Tablet/components/TabletControls/TabletControls.js +3 -1
- package/dist/containers/Tablet/components/TabletControls/TabletControls.js.map +1 -1
- package/dist/containers/Tablet/components/TabletInfo/TabletInfo.js +9 -3
- package/dist/containers/Tablet/components/TabletInfo/TabletInfo.js.map +1 -1
- package/dist/containers/Tablets/TabletsTable.js +25 -1
- package/dist/containers/Tablets/TabletsTable.js.map +1 -1
- package/dist/containers/Tablets/i18n/en.json +2 -1
- package/dist/containers/Tablets/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +2 -1
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/ResourcePoolInfo.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/ResourcePoolInfo.js +69 -0
- package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/ResourcePoolInfo.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/i18n/en.json +9 -0
- package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/i18n/index.js +5 -0
- package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/i18n/index.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/index.d.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/index.js +2 -0
- package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/index.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/utils/prepareTopicSchemaInfo.js +3 -3
- package/dist/containers/Tenant/Diagnostics/Overview/utils/prepareTopicSchemaInfo.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/QueriesTableWithDrawer.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/QueriesTableWithDrawer.js +3 -2
- package/dist/containers/Tenant/Diagnostics/TopQueries/QueriesTableWithDrawer.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.js +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.js +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +1 -1
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopicData/columns/columns.d.ts +3 -3
- package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js +2 -1
- package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js.map +1 -1
- package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js +1 -1
- package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js.map +1 -1
- package/dist/containers/Tenants/TenantsTable.js +37 -6
- package/dist/containers/Tenants/TenantsTable.js.map +1 -1
- package/dist/containers/VDiskPage/VDiskPage.js +1 -1
- package/dist/containers/VDiskPage/VDiskPage.js.map +1 -1
- package/dist/services/api/tablets.d.ts +6 -4
- package/dist/services/api/tablets.js +9 -8
- package/dist/services/api/tablets.js.map +1 -1
- package/dist/store/reducers/capabilities/capabilities.d.ts +4 -4
- package/dist/store/reducers/capabilities/hooks.d.ts +1 -0
- package/dist/store/reducers/capabilities/hooks.js +8 -0
- package/dist/store/reducers/capabilities/hooks.js.map +1 -1
- package/dist/store/reducers/nodesList.d.ts +3 -261
- package/dist/store/reducers/nodesList.js +1 -1
- package/dist/store/reducers/nodesList.js.map +1 -1
- package/dist/store/reducers/settings/constants.d.ts +4 -0
- package/dist/store/reducers/settings/constants.js +4 -0
- package/dist/store/reducers/settings/constants.js.map +1 -1
- package/dist/store/reducers/storage/prepareGroupsDisks.d.ts +1 -0
- package/dist/store/reducers/storage/prepareGroupsDisks.js +17 -13
- package/dist/store/reducers/storage/prepareGroupsDisks.js.map +1 -1
- package/dist/store/reducers/storage/utils.js +11 -5
- package/dist/store/reducers/storage/utils.js.map +1 -1
- package/dist/store/reducers/tableData.d.ts +1 -1
- package/dist/store/reducers/tableData.js.map +1 -1
- package/dist/store/reducers/tablet.d.ts +3 -0
- package/dist/store/reducers/tablet.js +6 -6
- package/dist/store/reducers/tablet.js.map +1 -1
- package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js +1 -1
- package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js.map +1 -1
- package/dist/types/api/capabilities.d.ts +2 -2
- package/dist/types/api/pdisk.d.ts +2 -0
- package/dist/types/api/pdisk.js.map +1 -1
- package/dist/types/api/schema/persQueueGroup.d.ts +2 -2
- package/dist/types/api/schema/schema.d.ts +15 -0
- package/dist/types/api/schema/schema.js.map +1 -1
- package/dist/types/api/schema/tableIndex.d.ts +1 -0
- package/dist/types/api/storage.d.ts +4 -0
- package/dist/types/api/storage.js.map +1 -1
- package/dist/types/api/vdisk.d.ts +2 -0
- package/dist/types/api/vdisk.js.map +1 -1
- package/dist/utils/developerUI/tabletDevUi.d.ts +1 -0
- package/dist/utils/developerUI/tabletDevUi.js +4 -0
- package/dist/utils/developerUI/tabletDevUi.js.map +1 -0
- package/dist/utils/disks/displayState.d.ts +2 -0
- package/dist/utils/disks/displayState.js.map +1 -1
- package/dist/utils/disks/getDiskBarTone.d.ts +2 -1
- package/dist/utils/disks/getDiskBarTone.js +5 -1
- package/dist/utils/disks/getDiskBarTone.js.map +1 -1
- package/dist/utils/disks/pdiskState.js +2 -2
- package/dist/utils/disks/pdiskState.js.map +1 -1
- package/dist/utils/disks/prepareDisks.js +19 -9
- package/dist/utils/disks/prepareDisks.js.map +1 -1
- package/dist/utils/disks/types.d.ts +2 -1
- package/dist/utils/query.d.ts +1 -0
- package/dist/utils/query.js +6 -0
- package/dist/utils/query.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DiskStateProgressBar/AllModeCapacityAlertIndicator.tsx +15 -2
- package/src/components/DiskStateProgressBar/AllModeIndicators.tsx +19 -6
- package/src/components/DiskStateProgressBar/DiskIndicator.tsx +19 -8
- package/src/components/DiskStateProgressBar/DiskStateProgressBar.scss +53 -45
- package/src/components/DiskStateProgressBar/DiskStateProgressBar.tsx +1 -1
- package/src/components/DiskStateProgressBar/PDiskAllModeIndicators.tsx +16 -3
- package/src/components/EvictVDiskButton/EvictVDiskButton.tsx +10 -3
- package/src/components/FullNodeViewer/FullNodeViewer.scss +3 -3
- package/src/components/FullNodeViewer/FullNodeViewer.tsx +81 -34
- package/src/components/FullNodeViewer/i18n/en.json +2 -1
- package/src/components/HoverPopup/HoverPopup.tsx +21 -16
- package/src/components/InfoViewer/InfoViewer.tsx +4 -2
- package/src/components/InfoViewer/formatters/pqGroup.ts +6 -2
- package/src/components/InfoViewer/schemaInfo/i18n/en.json +1 -0
- package/src/components/InfoViewer/schemaInfo/utils.tsx +9 -0
- package/src/components/NodeHostWrapper/NodeHostWrapper.tsx +23 -13
- package/src/components/PaginatedTable/KeyboardNavigation.tsx +30 -0
- package/src/components/PaginatedTable/PaginatedTable.scss +10 -0
- package/src/components/PaginatedTable/PaginatedTable.tsx +128 -4
- package/src/components/PaginatedTable/PaginatedTableWithLayout.tsx +6 -1
- package/src/components/PaginatedTable/ResizeablePaginatedTable.tsx +6 -1
- package/src/components/PaginatedTable/TableChunk.tsx +6 -14
- package/src/components/PaginatedTable/TableChunksRenderer.tsx +12 -0
- package/src/components/PaginatedTable/TableRow.tsx +54 -20
- package/src/components/PaginatedTable/getTableChunkQueryParams.ts +25 -0
- package/src/components/PaginatedTable/rowLookup.ts +63 -0
- package/src/components/PaginatedTable/useKeyboardNavigation.ts +115 -0
- package/src/components/ResizeableDataTable/DataTableKeyboardNavigation.tsx +194 -0
- package/src/components/ResizeableDataTable/ResizeableDataTable.scss +10 -0
- package/src/components/ResizeableDataTable/ResizeableDataTable.tsx +100 -5
- package/src/components/ResizeableDataTable/getDataTableOrder.ts +18 -0
- package/src/components/Search/Search.tsx +8 -1
- package/src/components/ShardsTable/columns.tsx +14 -5
- package/src/components/ShardsTable/i18n/en.json +1 -0
- package/src/components/TableKeyboardNavigation/TableKeyboardNavigation.scss +16 -0
- package/src/components/TableKeyboardNavigation/TableKeyboardNavigation.tsx +519 -0
- package/src/components/TableKeyboardNavigation/i18n/en.json +4 -0
- package/src/components/TableKeyboardNavigation/i18n/index.ts +5 -0
- package/src/components/TableKeyboardNavigation/utils.ts +36 -0
- package/src/components/TableWithControlsLayout/TableWithControlsLayout.tsx +26 -1
- package/src/components/TenantNameWrapper/TenantNameWrapper.tsx +14 -15
- package/src/components/TenantNameWrapper/utils.ts +26 -0
- package/src/components/VDisk/VDisk.tsx +115 -41
- package/src/components/VDisk/VDiskWithDonorsStack.tsx +18 -3
- package/src/components/VDisk/i18n/en.json +11 -0
- package/src/components/nodesColumns/columns.tsx +13 -1
- package/src/components/nodesColumns/constants.ts +6 -0
- package/src/components/nodesColumns/i18n/en.json +2 -1
- package/src/containers/Clusters/Clusters.tsx +47 -29
- package/src/containers/Node/NodeNetwork/NodeNetworkControls/NodeNetworkControls.tsx +1 -0
- package/src/containers/Node/NodeNetwork/NodeNetworkTable.tsx +17 -0
- package/src/containers/Nodes/NodesControls/NodesControls.tsx +1 -0
- package/src/containers/Nodes/NodesTable.tsx +17 -1
- package/src/containers/Nodes/PaginatedNodes/GroupedNodesComponent.tsx +1 -0
- package/src/containers/Nodes/columns/columns.tsx +2 -0
- package/src/containers/Storage/Disks/Disks.scss +5 -0
- package/src/containers/Storage/Disks/Disks.tsx +156 -92
- package/src/containers/Storage/PDisk/PDisk.scss +79 -1
- package/src/containers/Storage/PDisk/PDisk.tsx +157 -81
- package/src/containers/Storage/PDisk/PDiskWithVDisks.tsx +181 -0
- package/src/containers/Storage/PDisk/i18n/en.json +8 -0
- package/src/containers/Storage/PDisk/index.ts +1 -0
- package/src/containers/Storage/PDisks/PDisks.tsx +157 -22
- package/src/containers/Storage/PaginatedStorage.tsx +4 -0
- package/src/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.tsx +1 -0
- package/src/containers/Storage/PaginatedStorageGroups/StorageGroupsControls.tsx +3 -2
- package/src/containers/Storage/PaginatedStorageGroupsTable/PaginatedStorageGroupsTable.tsx +13 -0
- package/src/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.tsx +10 -2
- package/src/containers/Storage/PaginatedStorageNodes/StorageNodesComponent.tsx +6 -2
- package/src/containers/Storage/PaginatedStorageNodes/StorageNodesControls.tsx +76 -41
- package/src/containers/Storage/PaginatedStorageNodes/nodeExpertModeLayout.ts +103 -0
- package/src/containers/Storage/PaginatedStorageNodesTable/PaginatedStorageNodesTable.tsx +24 -1
- package/src/containers/Storage/PaginatedStorageNodesTable/columns/columns.tsx +3 -1
- package/src/containers/Storage/PaginatedStorageNodesTable/columns/hooks.ts +8 -1
- package/src/containers/Storage/PaginatedStorageNodesTable/columns/types.ts +2 -0
- package/src/containers/Storage/StorageExpertModePanel/StorageGroupsExpertModePanel.tsx +63 -0
- package/src/containers/Storage/StorageExpertModePanel/StorageNodesExpertModePanel.tsx +67 -0
- package/src/containers/Storage/StorageExpertModePanel/components/ExpertModePanelLayout.tsx +63 -0
- package/src/containers/Storage/StorageExpertModePanel/components/FrontQueuesLegend.tsx +1 -0
- package/src/containers/Storage/StorageExpertModePanel/components/PDiskDecommitLegend.tsx +1 -0
- package/src/containers/Storage/StorageExpertModePanel/components/PDiskDriveLegend.tsx +3 -2
- package/src/containers/Storage/StorageExpertModePanel/components/PDiskMaintenanceLegend.tsx +1 -0
- package/src/containers/Storage/StorageExpertModePanel/components/SpaceLegend.tsx +3 -0
- package/src/containers/Storage/StorageExpertModePanel/components/StatusPairLegend.tsx +7 -9
- package/src/containers/Storage/StorageExpertModePanel/components/getSpaceLegendSelection.ts +1 -1
- package/src/containers/Storage/StorageExpertModePanel/components/renderExpertModeLegend.tsx +58 -0
- package/src/containers/Storage/StorageExpertModePanel/constants.ts +26 -0
- package/src/containers/Storage/StorageExpertModePanel/i18n/en.json +2 -2
- package/src/containers/Storage/TableGroup/TableGroup.tsx +6 -1
- package/src/containers/Storage/VDisks/VDisks.scss +3 -0
- package/src/containers/Storage/VDisks/VDisks.tsx +29 -7
- package/src/containers/Storage/useStoragePDiskDisplayStateGetter.ts +94 -135
- package/src/containers/Storage/useStorageQueryParams.ts +120 -1
- package/src/containers/Storage/useStorageVDiskDisplayStateGetter.ts +65 -10
- package/src/containers/Storage/utils/useStorageColumnsSettings.ts +77 -49
- package/src/containers/Storage/utils/useVirtualizedDiskList.ts +156 -0
- package/src/containers/Tablet/Tablet.tsx +4 -2
- package/src/containers/Tablet/components/TabletControls/TabletControls.tsx +7 -3
- package/src/containers/Tablet/components/TabletInfo/TabletInfo.tsx +13 -3
- package/src/containers/Tablets/TabletsTable.tsx +50 -10
- package/src/containers/Tablets/i18n/en.json +2 -1
- package/src/containers/Tenant/Diagnostics/Overview/Overview.tsx +2 -1
- package/src/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/ResourcePoolInfo.tsx +106 -0
- package/src/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/i18n/en.json +9 -0
- package/src/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/i18n/index.ts +7 -0
- package/src/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/index.ts +1 -0
- package/src/containers/Tenant/Diagnostics/Overview/utils/prepareTopicSchemaInfo.ts +3 -3
- package/src/containers/Tenant/Diagnostics/TopQueries/QueriesTableWithDrawer.tsx +6 -0
- package/src/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.tsx +4 -0
- package/src/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.tsx +7 -1
- package/src/containers/Tenant/Diagnostics/TopShards/TopShards.tsx +1 -1
- package/src/containers/Tenant/Query/QueriesHistory/QueriesHistory.tsx +5 -0
- package/src/containers/Tenant/Query/SavedQueries/SavedQueries.tsx +6 -0
- package/src/containers/Tenants/TenantsTable.tsx +70 -12
- package/src/containers/VDiskPage/VDiskPage.tsx +1 -1
- package/src/services/api/tablets.ts +16 -7
- package/src/store/reducers/capabilities/hooks.ts +9 -0
- package/src/store/reducers/nodesList.ts +2 -3
- package/src/store/reducers/settings/constants.ts +4 -0
- package/src/store/reducers/storage/prepareGroupsDisks.ts +16 -11
- package/src/store/reducers/storage/utils.ts +12 -5
- package/src/store/reducers/tableData.ts +1 -1
- package/src/store/reducers/tablet.ts +25 -6
- package/src/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.ts +1 -1
- package/src/types/api/capabilities.ts +2 -2
- package/src/types/api/pdisk.ts +2 -0
- package/src/types/api/schema/persQueueGroup.ts +2 -2
- package/src/types/api/schema/schema.ts +18 -0
- package/src/types/api/schema/tableIndex.ts +1 -0
- package/src/types/api/storage.ts +4 -0
- package/src/types/api/vdisk.ts +2 -0
- package/src/utils/developerUI/tabletDevUi.ts +3 -0
- package/src/utils/disks/displayState.ts +2 -0
- package/src/utils/disks/getDiskBarTone.ts +8 -0
- package/src/utils/disks/pdiskState.ts +2 -2
- package/src/utils/disks/prepareDisks.ts +25 -9
- package/src/utils/disks/types.ts +2 -1
- package/src/utils/query.ts +7 -0
- package/dist/containers/Storage/PDisk/PDiskVDisks.d.ts +0 -13
- package/dist/containers/Storage/PDisk/PDiskVDisks.js +0 -20
- package/dist/containers/Storage/PDisk/PDiskVDisks.js.map +0 -1
- package/dist/containers/Storage/StorageExpertModePanel/StorageExpertModePanel.d.ts +0 -6
- package/dist/containers/Storage/StorageExpertModePanel/StorageExpertModePanel.js +0 -66
- package/dist/containers/Storage/StorageExpertModePanel/StorageExpertModePanel.js.map +0 -1
- package/src/containers/Storage/PDisk/PDiskVDisks.tsx +0 -65
- package/src/containers/Storage/StorageExpertModePanel/StorageExpertModePanel.tsx +0 -151
|
@@ -1,78 +1,106 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
+
import {VDisksGroupBy} from '../../../utils/disks/groupBy';
|
|
4
|
+
import {
|
|
5
|
+
NODE_EXPERT_ALL_PDISK_WIDTH,
|
|
6
|
+
NODE_EXPERT_PDISK_WIDTH,
|
|
7
|
+
STORAGE_NODES_DEFAULT_PDISK_HEIGHT,
|
|
8
|
+
STORAGE_NODES_DEFAULT_ROW_HEIGHT,
|
|
9
|
+
getNodeExpertPDiskHeight,
|
|
10
|
+
getStorageNodesExpertRowHeight,
|
|
11
|
+
} from '../PaginatedStorageNodes/nodeExpertModeLayout';
|
|
3
12
|
import type {StorageNodesColumnsSettings} from '../PaginatedStorageNodesTable/columns/types';
|
|
4
13
|
import type {StorageNodesPaginatedTableData} from '../types';
|
|
14
|
+
import {useNodesVDisksGroupByParam} from '../useStorageQueryParams';
|
|
5
15
|
|
|
6
16
|
/**
|
|
7
17
|
* Storage → Nodes → column "PDisks": size coupling notes (keep in sync)
|
|
8
18
|
*
|
|
9
19
|
* Data flow:
|
|
10
20
|
* - `window.api.viewer.getNodes()` returns `MaximumSlotsPerDisk` / `MaximumDisksPerNode`
|
|
11
|
-
* → `prepareStorageNodesResponse()` maps them into `columnsSettings
|
|
12
|
-
*
|
|
13
|
-
* →
|
|
14
|
-
* → `PaginatedStorageNodesTable` column width uses `pDiskContainerWidth`
|
|
15
|
-
* and each `PDisk` instance gets `width={pDiskWidth}`.
|
|
21
|
+
* → `prepareStorageNodesResponse()` maps them into `columnsSettings`
|
|
22
|
+
* → `handleDataFetched()` retains the largest dimensions observed while the table is mounted
|
|
23
|
+
* → this hook derives the PDisk column width, PDisk content height, and virtualized row height.
|
|
16
24
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* - Each VDisk "slot" has a hard minimum width and a gap between slots:
|
|
21
|
-
* - slot min-width is effectively 8px:
|
|
22
|
-
* - `--pdisk-vdisk-width: 8px` (`src/containers/Storage/PDisk/PDisk.scss`)
|
|
23
|
-
* - `DiskStateProgressBar` compact min-width is 8px
|
|
24
|
-
* (`src/components/DiskStateProgressBar/DiskStateProgressBar.scss`)
|
|
25
|
-
* - gap is 2px: `--pdisk-gap-width: 2px` (`src/containers/Storage/PDisk/PDisk.scss`)
|
|
26
|
-
*
|
|
27
|
-
* Therefore, the `pDiskWidth` formula below MUST use the same slot/gap values,
|
|
28
|
-
* otherwise with large `maxSlotsPerDisk` the VDisks row will overflow the PDisk width.
|
|
25
|
+
* Default mode keeps VDisks in one row and grows PDisk width when necessary. Expert mode uses
|
|
26
|
+
* rows of 8; VDisk All uses rows of 4 fixed-width disks with size indicators above them.
|
|
27
|
+
* nodeExpertModeLayout owns the dimensions used for both the content and virtualized rows.
|
|
29
28
|
*/
|
|
30
29
|
const PDISK_VDISK_WIDTH = 8;
|
|
31
30
|
const PDISK_GAP_WIDTH = 2;
|
|
32
|
-
const PDISK_MIN_WIDTH = 165;
|
|
33
31
|
const PDISK_MARGIN = 10;
|
|
34
32
|
const MAX_SLOTS_DEFAULT = 1;
|
|
35
|
-
const
|
|
33
|
+
const PAGINATED_TABLE_CELL_HORIZONTAL_PADDING = 10;
|
|
36
34
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
);
|
|
35
|
+
interface StorageDisksLayoutData {
|
|
36
|
+
maxSlotsPerDisk: number;
|
|
37
|
+
maxDisksPerNode: number;
|
|
38
|
+
}
|
|
42
39
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const maxSlots = maxSlotsPerDisk || MAX_SLOTS_DEFAULT;
|
|
48
|
-
const maxDisks = maxDisksPerNode || MAX_SLOTS_DEFAULT;
|
|
40
|
+
export function useStorageColumnsSettings({expertMode = false} = {}) {
|
|
41
|
+
const vDisksGroupBy = useNodesVDisksGroupByParam();
|
|
42
|
+
const isAllVDisksLayout = expertMode && vDisksGroupBy === VDisksGroupBy.All;
|
|
43
|
+
const [layoutData, setLayoutData] = React.useState<StorageDisksLayoutData>();
|
|
49
44
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
const handleDataFetched = React.useCallback((data: StorageNodesPaginatedTableData) => {
|
|
46
|
+
if (!data.columnsSettings) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
54
49
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
const nextLayoutData = data.columnsSettings;
|
|
51
|
+
setLayoutData((currentLayoutData) => {
|
|
52
|
+
const maxSlotsPerDisk = Math.max(
|
|
53
|
+
currentLayoutData?.maxSlotsPerDisk ?? 0,
|
|
54
|
+
nextLayoutData.maxSlotsPerDisk,
|
|
55
|
+
);
|
|
56
|
+
const maxDisksPerNode = Math.max(
|
|
57
|
+
currentLayoutData?.maxDisksPerNode ?? 0,
|
|
58
|
+
nextLayoutData.maxDisksPerNode,
|
|
59
|
+
);
|
|
59
60
|
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
if (
|
|
62
|
+
currentLayoutData?.maxSlotsPerDisk === maxSlotsPerDisk &&
|
|
63
|
+
currentLayoutData.maxDisksPerNode === maxDisksPerNode
|
|
64
|
+
) {
|
|
65
|
+
return currentLayoutData;
|
|
62
66
|
}
|
|
63
|
-
},
|
|
64
|
-
[pDiskWidth],
|
|
65
|
-
);
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
return {maxSlotsPerDisk, maxDisksPerNode};
|
|
69
|
+
});
|
|
70
|
+
}, []);
|
|
71
|
+
|
|
72
|
+
const maxSlotsPerDisk = layoutData?.maxSlotsPerDisk || MAX_SLOTS_DEFAULT;
|
|
73
|
+
const maxDisksPerNode = layoutData?.maxDisksPerNode || MAX_SLOTS_DEFAULT;
|
|
74
|
+
|
|
75
|
+
const expertPDiskWidth = isAllVDisksLayout
|
|
76
|
+
? NODE_EXPERT_ALL_PDISK_WIDTH
|
|
77
|
+
: NODE_EXPERT_PDISK_WIDTH;
|
|
78
|
+
const pDiskWidth = expertMode
|
|
79
|
+
? expertPDiskWidth
|
|
80
|
+
: Math.max(
|
|
81
|
+
maxSlotsPerDisk * PDISK_VDISK_WIDTH + (maxSlotsPerDisk - 1) * PDISK_GAP_WIDTH,
|
|
82
|
+
NODE_EXPERT_PDISK_WIDTH,
|
|
83
|
+
);
|
|
84
|
+
const pDiskHeight = expertMode
|
|
85
|
+
? getNodeExpertPDiskHeight(maxSlotsPerDisk, isAllVDisksLayout)
|
|
86
|
+
: STORAGE_NODES_DEFAULT_PDISK_HEIGHT;
|
|
87
|
+
const rowHeight = expertMode
|
|
88
|
+
? getStorageNodesExpertRowHeight(maxSlotsPerDisk, isAllVDisksLayout)
|
|
89
|
+
: STORAGE_NODES_DEFAULT_ROW_HEIGHT;
|
|
90
|
+
const pDiskContainerWidth = layoutData
|
|
91
|
+
? maxDisksPerNode * pDiskWidth +
|
|
92
|
+
(maxDisksPerNode - 1) * PDISK_MARGIN +
|
|
93
|
+
2 * PAGINATED_TABLE_CELL_HORIZONTAL_PADDING
|
|
94
|
+
: undefined;
|
|
95
|
+
|
|
96
|
+
const columnsSettings: StorageNodesColumnsSettings = React.useMemo(
|
|
97
|
+
() => ({pDiskWidth, pDiskContainerWidth, pDiskHeight, expertMode}),
|
|
98
|
+
[pDiskContainerWidth, pDiskHeight, pDiskWidth, expertMode],
|
|
99
|
+
);
|
|
73
100
|
|
|
74
101
|
return {
|
|
75
102
|
handleDataFetched,
|
|
76
103
|
columnsSettings,
|
|
104
|
+
rowHeight,
|
|
77
105
|
};
|
|
78
106
|
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface DiskItem {
|
|
4
|
+
StringifiedId?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
const MIN_VIRTUALIZED_DISKS_COUNT = 10;
|
|
8
|
+
|
|
9
|
+
function getDiskKey(disks: readonly DiskItem[], index: number) {
|
|
10
|
+
return disks[index]?.StringifiedId || index;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function getElementDiskKey(element: Element, index: number) {
|
|
14
|
+
return element.getAttribute('data-disk-id') || index;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function useVirtualizedDiskList(disks: readonly DiskItem[], enabled = true) {
|
|
18
|
+
const shouldVirtualize = enabled && disks.length >= MIN_VIRTUALIZED_DISKS_COUNT;
|
|
19
|
+
const containerRef = React.useRef<HTMLDivElement | null>(null);
|
|
20
|
+
const pendingFocusRef = React.useRef<{element: HTMLDivElement; fromEnd: boolean}>();
|
|
21
|
+
const [visibleKeys, setVisibleKeys] = React.useState<Set<string | number>>(() => new Set());
|
|
22
|
+
const [lastFocusedKey, setLastFocusedKey] = React.useState<string | number>();
|
|
23
|
+
const lastFocusedIndex = disks.findIndex(
|
|
24
|
+
(_, index) => getDiskKey(disks, index) === lastFocusedKey,
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
React.useEffect(() => {
|
|
28
|
+
if (lastFocusedKey !== undefined && lastFocusedIndex === -1) {
|
|
29
|
+
setLastFocusedKey(undefined);
|
|
30
|
+
}
|
|
31
|
+
}, [lastFocusedIndex, lastFocusedKey]);
|
|
32
|
+
|
|
33
|
+
const placeholderProps = React.useMemo<React.HTMLAttributes<HTMLDivElement>>(
|
|
34
|
+
() => ({
|
|
35
|
+
// Wrappers fall back to -1 when content mounts: removing tabIndex would
|
|
36
|
+
// blur the placeholder before the layout effect can focus its link.
|
|
37
|
+
tabIndex: 0,
|
|
38
|
+
// Record the handoff before native focusin tracking can mount the disk
|
|
39
|
+
// and remove the placeholder's React event handler.
|
|
40
|
+
onFocusCapture: (event) => {
|
|
41
|
+
if (event.target !== event.currentTarget) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const elements = Array.from(containerRef.current?.children ?? []);
|
|
45
|
+
const index = elements.findIndex((element) =>
|
|
46
|
+
element.contains(event.currentTarget),
|
|
47
|
+
);
|
|
48
|
+
if (index !== -1) {
|
|
49
|
+
pendingFocusRef.current = {
|
|
50
|
+
element: event.currentTarget,
|
|
51
|
+
fromEnd: index === elements.length - 1,
|
|
52
|
+
};
|
|
53
|
+
setLastFocusedKey(getElementDiskKey(elements[index], index));
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
}),
|
|
57
|
+
[],
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
React.useLayoutEffect(() => {
|
|
61
|
+
const pendingFocus = pendingFocusRef.current;
|
|
62
|
+
pendingFocusRef.current = undefined;
|
|
63
|
+
if (!pendingFocus || document.activeElement !== pendingFocus.element) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
// Mount the boundary disk before handing focus to its first/last link.
|
|
67
|
+
const links = pendingFocus.element.querySelectorAll<HTMLAnchorElement>('a[href]');
|
|
68
|
+
const link = pendingFocus.fromEnd ? links[links.length - 1] : links[0];
|
|
69
|
+
link?.focus();
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
React.useEffect(() => {
|
|
73
|
+
const container = containerRef.current;
|
|
74
|
+
if (!container) {
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const onFocus = (event: FocusEvent) => {
|
|
79
|
+
const target = event.target;
|
|
80
|
+
if (!(target instanceof Node)) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const elements = Array.from(container.children);
|
|
84
|
+
const index = elements.findIndex((element) => element.contains(target));
|
|
85
|
+
if (index !== -1) {
|
|
86
|
+
// React restores focus before effects update after a reorder. Read
|
|
87
|
+
// the committed DOM identity, not an index into the previous data.
|
|
88
|
+
setLastFocusedKey(getElementDiskKey(elements[index], index));
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
container.addEventListener('focusin', onFocus);
|
|
92
|
+
|
|
93
|
+
if (!shouldVirtualize) {
|
|
94
|
+
return () => container.removeEventListener('focusin', onFocus);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Each disk keeps one direct child as its sized placeholder.
|
|
98
|
+
const keysByElement = new Map(
|
|
99
|
+
Array.from(container.children, (element, index) => [
|
|
100
|
+
element,
|
|
101
|
+
getElementDiskKey(element, index),
|
|
102
|
+
]),
|
|
103
|
+
);
|
|
104
|
+
const intersectingKeys = new Set<string | number>();
|
|
105
|
+
let active = true;
|
|
106
|
+
const observer = new IntersectionObserver((entries) => {
|
|
107
|
+
if (!active) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
for (const entry of entries) {
|
|
111
|
+
const key = keysByElement.get(entry.target);
|
|
112
|
+
if (key === undefined) {
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
if (entry.isIntersecting) {
|
|
116
|
+
intersectingKeys.add(key);
|
|
117
|
+
} else {
|
|
118
|
+
intersectingKeys.delete(key);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
const next = new Set(intersectingKeys);
|
|
122
|
+
setVisibleKeys((previous) => {
|
|
123
|
+
return next.size === previous.size && [...next].every((key) => previous.has(key))
|
|
124
|
+
? previous
|
|
125
|
+
: next;
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
keysByElement.forEach((_, element) => observer.observe(element));
|
|
129
|
+
|
|
130
|
+
return () => {
|
|
131
|
+
active = false;
|
|
132
|
+
observer.disconnect();
|
|
133
|
+
container.removeEventListener('focusin', onFocus);
|
|
134
|
+
};
|
|
135
|
+
}, [disks, shouldVirtualize]);
|
|
136
|
+
|
|
137
|
+
const shouldRenderDisk = (index: number) =>
|
|
138
|
+
!shouldVirtualize ||
|
|
139
|
+
visibleKeys.has(getDiskKey(disks, index)) ||
|
|
140
|
+
// Keep neighbors for scrolling and Tab/Shift+Tab navigation.
|
|
141
|
+
visibleKeys.has(getDiskKey(disks, index - 1)) ||
|
|
142
|
+
visibleKeys.has(getDiskKey(disks, index + 1)) ||
|
|
143
|
+
// Keep the last keyboard target reachable when returning from the next row.
|
|
144
|
+
(lastFocusedIndex !== -1 && Math.abs(index - lastFocusedIndex) <= 1);
|
|
145
|
+
|
|
146
|
+
return {
|
|
147
|
+
containerRef,
|
|
148
|
+
shouldRenderDisk,
|
|
149
|
+
getPlaceholderProps: (index: number) =>
|
|
150
|
+
shouldVirtualize &&
|
|
151
|
+
!shouldRenderDisk(index) &&
|
|
152
|
+
(index === 0 || index === disks.length - 1)
|
|
153
|
+
? placeholderProps
|
|
154
|
+
: undefined,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
@@ -14,6 +14,7 @@ import {InternalLink} from '../../components/InternalLink';
|
|
|
14
14
|
import {LoaderWrapper} from '../../components/LoaderWrapper/LoaderWrapper';
|
|
15
15
|
import {PageMetaWithAutorefresh} from '../../components/PageMeta/PageMeta';
|
|
16
16
|
import {tabletPageQueryParams, useTabletPagePath} from '../../routes';
|
|
17
|
+
import {useTabletDevUiSecurePath} from '../../store/reducers/capabilities/hooks';
|
|
17
18
|
import {setHeaderBreadcrumbs} from '../../store/reducers/header/header';
|
|
18
19
|
import {tabletApi} from '../../store/reducers/tablet';
|
|
19
20
|
import {EFlag} from '../../types/api/enums';
|
|
@@ -202,7 +203,7 @@ function TabletTabs({
|
|
|
202
203
|
}, [activeTab, tabletTab, setParams]);
|
|
203
204
|
|
|
204
205
|
return (
|
|
205
|
-
<Flex gap={5} direction="column">
|
|
206
|
+
<Flex gap={5} direction="column" qa="tablet-tabs">
|
|
206
207
|
{/* block wrapper fror tabs to preserve height */}
|
|
207
208
|
<div>
|
|
208
209
|
<TabProvider value={tabletTab}>
|
|
@@ -232,8 +233,9 @@ function TabletTabs({
|
|
|
232
233
|
|
|
233
234
|
function Channels({id, hiveId}: {id: string; hiveId: string}) {
|
|
234
235
|
const [autoRefreshInterval] = useAutoRefreshInterval();
|
|
236
|
+
const useSecurePath = useTabletDevUiSecurePath();
|
|
235
237
|
const {currentData, error, isFetching} = tabletApi.useGetAdvancedTableInfoQuery(
|
|
236
|
-
{id, hiveId},
|
|
238
|
+
{id, hiveId, useSecurePath},
|
|
237
239
|
{
|
|
238
240
|
pollingInterval: autoRefreshInterval,
|
|
239
241
|
},
|
|
@@ -4,6 +4,7 @@ import {ArrowRotateLeft, StopFill, TriangleRightFill} from '@gravity-ui/icons';
|
|
|
4
4
|
import {Flex, Icon} from '@gravity-ui/uikit';
|
|
5
5
|
|
|
6
6
|
import {ButtonWithConfirmDialog} from '../../../../components/ButtonWithConfirmDialog/ButtonWithConfirmDialog';
|
|
7
|
+
import {useTabletDevUiSecurePath} from '../../../../store/reducers/capabilities/hooks';
|
|
7
8
|
import {tabletApi} from '../../../../store/reducers/tablet';
|
|
8
9
|
import {ETabletState} from '../../../../types/api/tablet';
|
|
9
10
|
import type {TTabletStateInfo} from '../../../../types/api/tablet';
|
|
@@ -19,6 +20,7 @@ export const TabletControls = ({tablet}: TabletControlsProps) => {
|
|
|
19
20
|
const {TabletId, HiveId} = tablet;
|
|
20
21
|
|
|
21
22
|
const isUserAllowedToMakeChanges = useIsUserAllowedToMakeChanges();
|
|
23
|
+
const useSecurePath = useTabletDevUiSecurePath();
|
|
22
24
|
|
|
23
25
|
const [killTablet] = tabletApi.useKillTabletMutation();
|
|
24
26
|
const [stopTablet] = tabletApi.useStopTabletMutation();
|
|
@@ -39,7 +41,7 @@ export const TabletControls = ({tablet}: TabletControlsProps) => {
|
|
|
39
41
|
tablet.State === ETabletState.Stopped || tablet.State === ETabletState.Deleted;
|
|
40
42
|
|
|
41
43
|
return (
|
|
42
|
-
<Flex gap={2} wrap="nowrap">
|
|
44
|
+
<Flex gap={2} wrap="nowrap" qa="tablet-controls">
|
|
43
45
|
<ButtonWithConfirmDialog
|
|
44
46
|
dialogHeader={i18n('dialog.kill-header')}
|
|
45
47
|
dialogText={i18n('dialog.kill-text')}
|
|
@@ -63,7 +65,9 @@ export const TabletControls = ({tablet}: TabletControlsProps) => {
|
|
|
63
65
|
dialogText={i18n('dialog.stop-text')}
|
|
64
66
|
applyButtonText={i18n('dialog.stop-header')}
|
|
65
67
|
applyButtonView="outlined-danger"
|
|
66
|
-
onConfirmAction={() =>
|
|
68
|
+
onConfirmAction={() =>
|
|
69
|
+
stopTablet({id: TabletId, hiveId: HiveId, useSecurePath}).unwrap()
|
|
70
|
+
}
|
|
67
71
|
buttonDisabled={isDisabledStop || !isUserAllowedToMakeChanges}
|
|
68
72
|
withPopover
|
|
69
73
|
buttonView="normal"
|
|
@@ -80,7 +84,7 @@ export const TabletControls = ({tablet}: TabletControlsProps) => {
|
|
|
80
84
|
applyButtonText={i18n('dialog.resume-header')}
|
|
81
85
|
applyButtonView="action"
|
|
82
86
|
onConfirmAction={() =>
|
|
83
|
-
resumeTablet({id: TabletId, hiveId: HiveId}).unwrap()
|
|
87
|
+
resumeTablet({id: TabletId, hiveId: HiveId, useSecurePath}).unwrap()
|
|
84
88
|
}
|
|
85
89
|
buttonDisabled={isDisabledResume || !isUserAllowedToMakeChanges}
|
|
86
90
|
withPopover
|
|
@@ -8,13 +8,15 @@ import {TabletUptime} from '../../../../components/UptimeViewer/UptimeViewer';
|
|
|
8
8
|
import type {YDBDefinitionListItem} from '../../../../components/YDBDefinitionList/YDBDefinitionList';
|
|
9
9
|
import {YDBDefinitionList} from '../../../../components/YDBDefinitionList/YDBDefinitionList';
|
|
10
10
|
import {getDefaultNodePath, useTabletPagePath} from '../../../../routes';
|
|
11
|
-
import {
|
|
11
|
+
import {useTabletDevUiSecurePath} from '../../../../store/reducers/capabilities/hooks';
|
|
12
|
+
import {ETabletState, EType} from '../../../../types/api/tablet';
|
|
12
13
|
import type {TTabletStateInfo} from '../../../../types/api/tablet';
|
|
13
14
|
import {cn} from '../../../../utils/cn';
|
|
14
15
|
import {
|
|
15
16
|
createTabletDeveloperUIHref,
|
|
16
17
|
useHasDeveloperUi,
|
|
17
18
|
} from '../../../../utils/developerUI/developerUI';
|
|
19
|
+
import {getTabletDevUiAppPage} from '../../../../utils/developerUI/tabletDevUi';
|
|
18
20
|
import {useDatabaseFromQuery} from '../../../../utils/hooks/useDatabaseFromQuery';
|
|
19
21
|
import {transformPath} from '../../../Tenant/ObjectSummary/transformPath';
|
|
20
22
|
import {getTabletObjectKind, hasHive} from '../../utils';
|
|
@@ -34,6 +36,7 @@ interface TabletInfoProps {
|
|
|
34
36
|
export const TabletInfo = ({tablet, objectPath, objectDatabase}: TabletInfoProps) => {
|
|
35
37
|
const getTabletPagePath = useTabletPagePath();
|
|
36
38
|
const hasDeveloperUi = useHasDeveloperUi();
|
|
39
|
+
const useSecurePath = useTabletDevUiSecurePath();
|
|
37
40
|
const database = useDatabaseFromQuery();
|
|
38
41
|
|
|
39
42
|
const {
|
|
@@ -51,6 +54,10 @@ export const TabletInfo = ({tablet, objectPath, objectDatabase}: TabletInfoProps
|
|
|
51
54
|
const hasHiveId = hasHive(HiveId);
|
|
52
55
|
const hasUptime = State === ETabletState.Active;
|
|
53
56
|
const objectKind = getTabletObjectKind(Type);
|
|
57
|
+
// These tablet types move the whole App page to the secure subtree.
|
|
58
|
+
const secureApp =
|
|
59
|
+
useSecurePath &&
|
|
60
|
+
(Type === EType.DataShard || Type === EType.Hive || Type === EType.BSController);
|
|
54
61
|
|
|
55
62
|
const tabletInfo: YDBDefinitionListItem[] = [];
|
|
56
63
|
|
|
@@ -136,7 +143,10 @@ export const TabletInfo = ({tablet, objectPath, objectDatabase}: TabletInfoProps
|
|
|
136
143
|
<Flex direction="column" gap={3}>
|
|
137
144
|
<LinkWithIcon
|
|
138
145
|
title={tabletInfoKeyset('field_developer-ui-app')}
|
|
139
|
-
url={createTabletDeveloperUIHref(
|
|
146
|
+
url={createTabletDeveloperUIHref(
|
|
147
|
+
TabletId,
|
|
148
|
+
getTabletDevUiAppPage(secureApp),
|
|
149
|
+
)}
|
|
140
150
|
/>
|
|
141
151
|
<LinkWithIcon
|
|
142
152
|
title={tabletInfoKeyset('field_developer-ui-counters')}
|
|
@@ -156,7 +166,7 @@ export const TabletInfo = ({tablet, objectPath, objectDatabase}: TabletInfoProps
|
|
|
156
166
|
};
|
|
157
167
|
|
|
158
168
|
return (
|
|
159
|
-
<Flex gap={10} wrap="nowrap">
|
|
169
|
+
<Flex gap={10} wrap="nowrap" qa="tablet-info">
|
|
160
170
|
<YDBDefinitionList
|
|
161
171
|
title={tabletInfoKeyset('title_info')}
|
|
162
172
|
items={tabletInfo}
|
|
@@ -4,6 +4,7 @@ import {ArrowRotateLeft} from '@gravity-ui/icons';
|
|
|
4
4
|
import type {Column as DataTableColumn, SortOrder} from '@gravity-ui/react-data-table';
|
|
5
5
|
import {Icon, Select, Text} from '@gravity-ui/uikit';
|
|
6
6
|
import {isNil} from 'lodash';
|
|
7
|
+
import {useHistory} from 'react-router-dom';
|
|
7
8
|
|
|
8
9
|
import {ButtonWithConfirmDialog} from '../../components/ButtonWithConfirmDialog/ButtonWithConfirmDialog';
|
|
9
10
|
import {EntitiesCount} from '../../components/EntitiesCount';
|
|
@@ -16,6 +17,7 @@ import {TableWithControlsLayout} from '../../components/TableWithControlsLayout/
|
|
|
16
17
|
import {TabletNameWrapper} from '../../components/TabletNameWrapper/TabletNameWrapper';
|
|
17
18
|
import {TabletState} from '../../components/TabletState/TabletState';
|
|
18
19
|
import {TabletUptime} from '../../components/UptimeViewer/UptimeViewer';
|
|
20
|
+
import {useTabletPagePath} from '../../routes';
|
|
19
21
|
import {tabletApi} from '../../store/reducers/tablet';
|
|
20
22
|
import {ETabletState} from '../../types/api/tablet';
|
|
21
23
|
import type {TTabletStateInfo} from '../../types/api/tablet';
|
|
@@ -259,12 +261,31 @@ export function TabletsTable({
|
|
|
259
261
|
[nodeId, showEndOfRange],
|
|
260
262
|
);
|
|
261
263
|
|
|
264
|
+
const history = useHistory();
|
|
265
|
+
const getTabletPagePath = useTabletPagePath();
|
|
266
|
+
const openTablet = React.useCallback(
|
|
267
|
+
(tablet: TTabletStateInfo) => {
|
|
268
|
+
if (tablet.TabletId) {
|
|
269
|
+
history.push(
|
|
270
|
+
getTabletPagePath(tablet.TabletId, {
|
|
271
|
+
followerId: tablet.FollowerId ? String(tablet.FollowerId) : undefined,
|
|
272
|
+
}),
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
[getTabletPagePath, history],
|
|
277
|
+
);
|
|
278
|
+
|
|
262
279
|
const filtersActive = Boolean(tabletsSearch.trim()) || tabletTypes.length > 0;
|
|
263
280
|
|
|
264
281
|
return (
|
|
265
|
-
<TableWithControlsLayout
|
|
282
|
+
<TableWithControlsLayout
|
|
283
|
+
fullHeight
|
|
284
|
+
keyboardNavigationResetKey={JSON.stringify(tabletTypes)}
|
|
285
|
+
>
|
|
266
286
|
<TableWithControlsLayout.Controls>
|
|
267
287
|
<Search
|
|
288
|
+
tableFilter
|
|
268
289
|
placeholder={i18n('controls.search-placeholder')}
|
|
269
290
|
onChange={handleTabletsSearchChange}
|
|
270
291
|
value={tabletsSearch}
|
|
@@ -296,15 +317,34 @@ export function TabletsTable({
|
|
|
296
317
|
scrollDependencies={[tabletsSearch, tabletTypes, sortParams]}
|
|
297
318
|
loading={loading}
|
|
298
319
|
>
|
|
299
|
-
<
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
320
|
+
<div>
|
|
321
|
+
<ResizeableDataTable
|
|
322
|
+
onKeyboardActivate={openTablet}
|
|
323
|
+
getKeyboardRowKey={(tablet) =>
|
|
324
|
+
JSON.stringify([tablet.TabletId, tablet.FollowerId ?? 0])
|
|
325
|
+
}
|
|
326
|
+
getKeyboardRowLabel={(tablet) =>
|
|
327
|
+
[
|
|
328
|
+
tablet.Type,
|
|
329
|
+
tablet.TabletId,
|
|
330
|
+
tablet.FollowerId || isFollowerTablet(tablet)
|
|
331
|
+
? i18n('value_follower', {
|
|
332
|
+
id: tablet.FollowerId ?? EMPTY_DATA_PLACEHOLDER,
|
|
333
|
+
})
|
|
334
|
+
: undefined,
|
|
335
|
+
]
|
|
336
|
+
.filter(Boolean)
|
|
337
|
+
.join(', ') || EMPTY_DATA_PLACEHOLDER
|
|
338
|
+
}
|
|
339
|
+
columns={columns}
|
|
340
|
+
data={filteredTablets}
|
|
341
|
+
settings={DEFAULT_TABLE_SETTINGS}
|
|
342
|
+
emptyDataMessage={
|
|
343
|
+
filtersActive ? i18n('noTabletsMatchFilters') : i18n('noTabletsData')
|
|
344
|
+
}
|
|
345
|
+
onSortChange={setSortParams}
|
|
346
|
+
/>
|
|
347
|
+
</div>
|
|
308
348
|
</TableWithControlsLayout.Table>
|
|
309
349
|
</TableWithControlsLayout>
|
|
310
350
|
);
|
|
@@ -16,5 +16,6 @@
|
|
|
16
16
|
"controls.search-placeholder": "Tablet ID",
|
|
17
17
|
"controls.type-filter-label": "Type",
|
|
18
18
|
"controls.type-filter-placeholder": "All types",
|
|
19
|
-
"controls.entities-count-label": "Tablets"
|
|
19
|
+
"controls.entities-count-label": "Tablets",
|
|
20
|
+
"value_follower": "follower {{id}}"
|
|
20
21
|
}
|
|
@@ -15,6 +15,7 @@ import {AsyncReplicationInfo} from './AsyncReplicationInfo';
|
|
|
15
15
|
import {ChangefeedInfo} from './ChangefeedInfo';
|
|
16
16
|
import {DatabaseInfo} from './DatabaseInfo/DatabaseInfo';
|
|
17
17
|
import {DefaultEntityInfo} from './DefaultEntityInfo';
|
|
18
|
+
import {ResourcePoolInfo} from './ResourcePoolInfo';
|
|
18
19
|
import {SchemaObjectInfoContainer} from './SchemaObjectInfo/SchemaObjectInfoContainer';
|
|
19
20
|
import {StreamingQueryInfo} from './StreamingQueryInfo';
|
|
20
21
|
import {TableInfo} from './TableInfo';
|
|
@@ -55,7 +56,7 @@ function Overview({type, path, database, databaseFullPath}: OverviewProps) {
|
|
|
55
56
|
const pathTypeToComponent: Record<EPathType, (() => React.ReactNode) | undefined> = {
|
|
56
57
|
[EPathType.EPathTypeInvalid]: undefined,
|
|
57
58
|
[EPathType.EPathTypeDir]: undefined,
|
|
58
|
-
[EPathType.EPathTypeResourcePool]:
|
|
59
|
+
[EPathType.EPathTypeResourcePool]: () => <ResourcePoolInfo data={data} />,
|
|
59
60
|
[EPathType.EPathTypeSecret]: undefined,
|
|
60
61
|
[EPathType.EPathTypeTable]: renderTableInfo,
|
|
61
62
|
[EPathType.EPathTypeSysView]: undefined,
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {Flex, Text} from '@gravity-ui/uikit';
|
|
4
|
+
|
|
5
|
+
import type {YDBDefinitionListItem} from '../../../../../components/YDBDefinitionList/YDBDefinitionList';
|
|
6
|
+
import {YDBDefinitionList} from '../../../../../components/YDBDefinitionList/YDBDefinitionList';
|
|
7
|
+
import type {TEvDescribeSchemeResult} from '../../../../../types/api/schema';
|
|
8
|
+
import {EMPTY_DATA_PLACEHOLDER} from '../../../../../utils/constants';
|
|
9
|
+
|
|
10
|
+
import i18n from './i18n';
|
|
11
|
+
|
|
12
|
+
/** Sentinel value meaning "no limit" for a resource-pool property. */
|
|
13
|
+
const NO_LIMIT_VALUE = '-1';
|
|
14
|
+
|
|
15
|
+
interface PropertyGroup {
|
|
16
|
+
title: string;
|
|
17
|
+
properties: {key: string; label: string}[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const PROPERTY_GROUPS: PropertyGroup[] = [
|
|
21
|
+
{
|
|
22
|
+
title: i18n('group_queue'),
|
|
23
|
+
properties: [
|
|
24
|
+
{key: 'concurrent_query_limit', label: i18n('field_concurrent-query-limit')},
|
|
25
|
+
{key: 'queue_size', label: i18n('field_queue-size')},
|
|
26
|
+
{key: 'database_load_cpu_threshold', label: i18n('field_database-load-cpu-threshold')},
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: i18n('group_cpu'),
|
|
31
|
+
properties: [
|
|
32
|
+
{
|
|
33
|
+
key: 'total_cpu_limit_percent_per_node',
|
|
34
|
+
label: i18n('field_total-cpu-limit-percent-per-node'),
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
function isAbsent(value: string | undefined): value is undefined | '' {
|
|
41
|
+
return value === undefined || value === '';
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function formatValue(value: string | undefined): React.ReactNode {
|
|
45
|
+
if (isAbsent(value) || value === NO_LIMIT_VALUE) {
|
|
46
|
+
return EMPTY_DATA_PLACEHOLDER;
|
|
47
|
+
}
|
|
48
|
+
return <Text variant="code-inline-2">{value}</Text>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Only present copyText for values that are shown as concrete numbers. */
|
|
52
|
+
function getCopyText(value: string | undefined): string | undefined {
|
|
53
|
+
if (isAbsent(value) || value === NO_LIMIT_VALUE) {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function prepareGroupItems(
|
|
60
|
+
properties: Record<string, string>,
|
|
61
|
+
group: PropertyGroup,
|
|
62
|
+
): YDBDefinitionListItem[] {
|
|
63
|
+
return group.properties.map(({key, label}) => {
|
|
64
|
+
const value = properties[key];
|
|
65
|
+
return {
|
|
66
|
+
name: label,
|
|
67
|
+
content: formatValue(value),
|
|
68
|
+
copyText: getCopyText(value),
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
interface ResourcePoolInfoProps {
|
|
74
|
+
data?: TEvDescribeSchemeResult;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** Displays overview for ResourcePool EPathType */
|
|
78
|
+
export function ResourcePoolInfo({data}: ResourcePoolInfoProps) {
|
|
79
|
+
if (!data) {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const properties = data.PathDescription?.ResourcePoolDescription?.Properties?.Properties || {};
|
|
84
|
+
|
|
85
|
+
const sections = PROPERTY_GROUPS.map((group) => ({
|
|
86
|
+
title: group.title,
|
|
87
|
+
items: prepareGroupItems(properties, group),
|
|
88
|
+
})).filter((section) => section.items.length > 0);
|
|
89
|
+
|
|
90
|
+
if (sections.length === 0) {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<Flex direction="column" gap={3}>
|
|
96
|
+
{sections.map((section) => (
|
|
97
|
+
<YDBDefinitionList
|
|
98
|
+
key={section.title}
|
|
99
|
+
title={section.title}
|
|
100
|
+
items={section.items}
|
|
101
|
+
responsive
|
|
102
|
+
/>
|
|
103
|
+
))}
|
|
104
|
+
</Flex>
|
|
105
|
+
);
|
|
106
|
+
}
|