ydb-embedded-ui 22.3.0 → 22.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.d.ts +3 -2
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js +19 -4
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js.map +1 -1
- package/dist/components/CopyableValue/CopyableValue.d.ts +10 -0
- package/dist/components/CopyableValue/CopyableValue.js +10 -0
- package/dist/components/CopyableValue/CopyableValue.js.map +1 -0
- package/dist/components/CopyableValue/CopyableValue.scss +16 -0
- package/dist/components/CopyableValue/i18n/en.json +3 -0
- package/dist/components/CopyableValue/i18n/index.d.ts +2 -0
- package/dist/components/CopyableValue/i18n/index.js +6 -0
- package/dist/components/CopyableValue/i18n/index.js.map +1 -0
- package/dist/components/CriticalActionDialog/CriticalActionDialog.d.ts +2 -1
- package/dist/components/CriticalActionDialog/CriticalActionDialog.js +2 -1
- package/dist/components/CriticalActionDialog/CriticalActionDialog.js.map +1 -1
- package/dist/components/DiskCapacityInfo/DiskCapacityInfo.d.ts +8 -19
- package/dist/components/DiskCapacityInfo/DiskCapacityInfo.js +68 -92
- package/dist/components/DiskCapacityInfo/DiskCapacityInfo.js.map +1 -1
- package/dist/components/DiskCapacityInfo/i18n/en.json +0 -1
- package/dist/components/DiskCapacityInfo/i18n/index.d.ts +1 -1
- package/dist/components/DiskPopup/DiskPopup.d.ts +25 -0
- package/dist/components/DiskPopup/DiskPopup.js +44 -0
- package/dist/components/DiskPopup/DiskPopup.js.map +1 -0
- package/dist/components/DiskPopup/DiskPopup.scss +203 -0
- package/dist/components/DiskPopup/i18n/en.json +3 -0
- package/dist/components/DiskPopup/i18n/index.d.ts +2 -0
- package/dist/components/DiskPopup/i18n/index.js +4 -0
- package/dist/components/DiskPopup/i18n/index.js.map +1 -0
- package/dist/components/DiskStatus/DiskStatus.d.ts +31 -0
- package/dist/components/DiskStatus/DiskStatus.js +61 -0
- package/dist/components/DiskStatus/DiskStatus.js.map +1 -0
- package/dist/components/DiskStatus/DiskStatus.scss +59 -0
- package/dist/components/DiskStatus/i18n/en.json +6 -0
- package/dist/components/DiskStatus/i18n/index.d.ts +2 -0
- package/dist/components/DiskStatus/i18n/index.js +4 -0
- package/dist/components/DiskStatus/i18n/index.js.map +1 -0
- package/dist/components/EntityStatus/EntityStatus.d.ts +19 -6
- package/dist/components/EntityStatus/EntityStatus.js +6 -2
- package/dist/components/EntityStatus/EntityStatus.js.map +1 -1
- package/dist/components/EntityStatus/EntityStatus.scss +5 -0
- package/dist/components/EvictVDiskButton/EvictVDiskButton.d.ts +5 -2
- package/dist/components/EvictVDiskButton/EvictVDiskButton.js +3 -2
- package/dist/components/EvictVDiskButton/EvictVDiskButton.js.map +1 -1
- package/dist/components/EvictVDiskButton/i18n/en.json +2 -2
- package/dist/components/FullNodeViewer/FullNodeViewer.js +4 -7
- package/dist/components/FullNodeViewer/FullNodeViewer.js.map +1 -1
- package/dist/components/FullNodeViewer/i18n/index.d.ts +1 -1
- package/dist/components/HoverPopup/HoverPopup.d.ts +3 -1
- package/dist/components/HoverPopup/HoverPopup.js +131 -28
- package/dist/components/HoverPopup/HoverPopup.js.map +1 -1
- package/dist/components/HoverPopup/usePopupPriority.d.ts +4 -0
- package/dist/components/HoverPopup/usePopupPriority.js +30 -0
- package/dist/components/HoverPopup/usePopupPriority.js.map +1 -0
- package/dist/components/MemoryViewer/MemoryViewer.d.ts +3 -1
- package/dist/components/MemoryViewer/MemoryViewer.js +25 -16
- package/dist/components/MemoryViewer/MemoryViewer.js.map +1 -1
- package/dist/components/MemoryViewer/i18n/en.json +4 -3
- package/dist/components/MemoryViewer/i18n/index.d.ts +1 -1
- package/dist/components/MemoryViewer/utils.d.ts +4 -2
- package/dist/components/MemoryViewer/utils.js +11 -11
- package/dist/components/MemoryViewer/utils.js.map +1 -1
- package/dist/components/PDiskInfo/PDiskInfo.d.ts +4 -9
- package/dist/components/PDiskInfo/PDiskInfo.js +32 -144
- package/dist/components/PDiskInfo/PDiskInfo.js.map +1 -1
- package/dist/components/PDiskInfo/PDiskInfo.scss +15 -0
- package/dist/components/PDiskInfo/PDiskLogSize.d.ts +5 -0
- package/dist/components/PDiskInfo/PDiskLogSize.js +20 -0
- package/dist/components/PDiskInfo/PDiskLogSize.js.map +1 -0
- package/dist/components/PDiskInfo/PDiskLogSize.scss +12 -0
- package/dist/components/PDiskInfo/getPDiskDetails.d.ts +4 -0
- package/dist/components/PDiskInfo/getPDiskDetails.js +33 -0
- package/dist/components/PDiskInfo/getPDiskDetails.js.map +1 -0
- package/dist/components/PDiskInfo/i18n/en.json +69 -4
- package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/PDiskInfo/statuses.d.ts +7 -0
- package/dist/components/PDiskInfo/statuses.js +194 -0
- package/dist/components/PDiskInfo/statuses.js.map +1 -0
- package/dist/components/PDiskPopup/PDiskPopup.d.ts +4 -7
- package/dist/components/PDiskPopup/PDiskPopup.js +28 -99
- package/dist/components/PDiskPopup/PDiskPopup.js.map +1 -1
- package/dist/components/PDiskPopup/i18n/en.json +2 -12
- package/dist/components/PDiskPopup/i18n/index.d.ts +1 -1
- package/dist/components/Search/Search.js +3 -1
- package/dist/components/Search/Search.js.map +1 -1
- package/dist/components/StorageGroupInfo/StorageGroupInfo.d.ts +3 -3
- package/dist/components/StorageGroupInfo/StorageGroupInfo.js +73 -218
- package/dist/components/StorageGroupInfo/StorageGroupInfo.js.map +1 -1
- package/dist/components/StorageGroupInfo/StorageGroupInfo.scss +21 -0
- package/dist/components/StorageGroupInfo/i18n/en.json +1 -9
- package/dist/components/StorageGroupInfo/i18n/index.d.ts +1 -1
- package/dist/components/TenantNameWrapper/i18n/index.d.ts +1 -1
- package/dist/components/VDisk/VDisk.d.ts +2 -1
- package/dist/components/VDisk/VDisk.js +24 -33
- package/dist/components/VDisk/VDisk.js.map +1 -1
- package/dist/components/VDisk/VDiskWithDonorsStack.d.ts +1 -1
- package/dist/components/VDisk/VDiskWithDonorsStack.js +2 -1
- package/dist/components/VDisk/VDiskWithDonorsStack.js.map +1 -1
- package/dist/components/VDisk/getFlagStatusText.d.ts +2 -0
- package/dist/components/VDisk/getFlagStatusText.js +18 -0
- package/dist/components/VDisk/getFlagStatusText.js.map +1 -0
- package/dist/components/VDisk/i18n/en.json +1 -1
- package/dist/components/VDisk/i18n/index.d.ts +1 -1
- package/dist/components/VDiskInfo/VDiskInfo.d.ts +3 -7
- package/dist/components/VDiskInfo/VDiskInfo.js +57 -235
- package/dist/components/VDiskInfo/VDiskInfo.js.map +1 -1
- package/dist/components/VDiskInfo/VDiskInfo.scss +19 -3
- package/dist/components/VDiskInfo/getVDiskDetails.d.ts +11 -0
- package/dist/components/VDiskInfo/getVDiskDetails.js +42 -0
- package/dist/components/VDiskInfo/getVDiskDetails.js.map +1 -0
- package/dist/components/VDiskInfo/i18n/en.json +5 -12
- package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/VDiskPopup/VDiskPopup.d.ts +7 -8
- package/dist/components/VDiskPopup/VDiskPopup.js +91 -241
- package/dist/components/VDiskPopup/VDiskPopup.js.map +1 -1
- package/dist/components/VDiskPopup/VDiskPopup.scss +3 -10
- package/dist/components/VDiskPopup/i18n/en.json +4 -22
- package/dist/components/VDiskPopup/i18n/index.d.ts +1 -1
- package/dist/components/VDiskStatus/VDiskReplicationStatus.d.ts +8 -0
- package/dist/components/VDiskStatus/VDiskReplicationStatus.js +32 -0
- package/dist/components/VDiskStatus/VDiskReplicationStatus.js.map +1 -0
- package/dist/components/VDiskStatus/VDiskStatus.d.ts +16 -0
- package/dist/components/VDiskStatus/VDiskStatus.js +20 -0
- package/dist/components/VDiskStatus/VDiskStatus.js.map +1 -0
- package/dist/components/VDiskStatus/VDiskStatus.scss +36 -0
- package/dist/components/VDiskStatus/i18n/en.json +33 -0
- package/dist/components/VDiskStatus/i18n/index.d.ts +1 -0
- package/dist/components/VDiskStatus/i18n/index.js +5 -0
- package/dist/components/VDiskStatus/i18n/index.js.map +1 -0
- package/dist/components/VDiskStatus/index.d.ts +2 -0
- package/dist/components/VDiskStatus/index.js +3 -0
- package/dist/components/VDiskStatus/index.js.map +1 -0
- package/dist/components/VDiskStatus/statuses.d.ts +4 -0
- package/dist/components/VDiskStatus/statuses.js +120 -0
- package/dist/components/VDiskStatus/statuses.js.map +1 -0
- package/dist/components/capacityMetricsColumns/i18n/en.json +4 -4
- package/dist/components/nodesColumns/columns.d.ts +1 -0
- package/dist/components/nodesColumns/columns.js +13 -6
- package/dist/components/nodesColumns/columns.js.map +1 -1
- package/dist/containers/Cluster/ClusterDrawerHealthcheck.js +6 -1
- package/dist/containers/Cluster/ClusterDrawerHealthcheck.js.map +1 -1
- package/dist/containers/Clusters/ClusterDrawerHealthcheck.js +1 -1
- package/dist/containers/Clusters/ClusterDrawerHealthcheck.js.map +1 -1
- package/dist/containers/Clusters/Clusters.js +35 -6
- package/dist/containers/Clusters/Clusters.js.map +1 -1
- package/dist/containers/Clusters/Clusters.scss +24 -6
- package/dist/containers/Clusters/columns.js +9 -4
- package/dist/containers/Clusters/columns.js.map +1 -1
- package/dist/containers/Clusters/i18n/en.json +6 -0
- package/dist/containers/Clusters/i18n/index.d.ts +1 -1
- package/dist/containers/Header/Header.js +16 -2
- package/dist/containers/Header/Header.js.map +1 -1
- package/dist/containers/Header/HeaderLeftControls.js +3 -1
- package/dist/containers/Header/HeaderLeftControls.js.map +1 -1
- package/dist/containers/Header/PDiskLeftControls.d.ts +1 -0
- package/dist/containers/Header/PDiskLeftControls.js +24 -0
- package/dist/containers/Header/PDiskLeftControls.js.map +1 -0
- package/dist/containers/Header/StorageGroupLeftControls.d.ts +1 -0
- package/dist/containers/Header/StorageGroupLeftControls.js +23 -0
- package/dist/containers/Header/StorageGroupLeftControls.js.map +1 -0
- package/dist/containers/Header/VDiskLeftControls.d.ts +1 -0
- package/dist/containers/Header/VDiskLeftControls.js +23 -0
- package/dist/containers/Header/VDiskLeftControls.js.map +1 -0
- package/dist/containers/Header/breadcrumbs.js +5 -2
- package/dist/containers/Header/breadcrumbs.js.map +1 -1
- package/dist/containers/Header/i18n/en.json +6 -1
- package/dist/containers/Header/i18n/index.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/PaginatedNodes/GroupedNodesComponent.js +5 -3
- package/dist/containers/Nodes/PaginatedNodes/GroupedNodesComponent.js.map +1 -1
- package/dist/containers/Nodes/PaginatedNodes/NodesComponent.js +4 -2
- package/dist/containers/Nodes/PaginatedNodes/NodesComponent.js.map +1 -1
- package/dist/containers/Nodes/useDebouncedSearch.d.ts +2 -0
- package/dist/containers/Nodes/useDebouncedSearch.js +11 -0
- package/dist/containers/Nodes/useDebouncedSearch.js.map +1 -0
- package/dist/containers/Operations/constants.d.ts +1 -1
- package/dist/containers/PDiskPage/PDiskPage.js +30 -31
- package/dist/containers/PDiskPage/PDiskPage.js.map +1 -1
- package/dist/containers/PDiskPage/PDiskPage.scss +22 -11
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js +7 -7
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js.map +1 -1
- package/dist/containers/PDiskPage/PDiskStorageDetails.d.ts +6 -0
- package/dist/containers/PDiskPage/PDiskStorageDetails.js +28 -0
- package/dist/containers/PDiskPage/PDiskStorageDetails.js.map +1 -0
- package/dist/containers/PDiskPage/PDiskStorageDetails.scss +51 -0
- package/dist/containers/PDiskPage/i18n/en.json +2 -0
- package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/Disks/Disks.js +36 -9
- package/dist/containers/Storage/Disks/Disks.js.map +1 -1
- package/dist/containers/Storage/PDisk/PDisk.d.ts +2 -1
- package/dist/containers/Storage/PDisk/PDisk.js +2 -2
- package/dist/containers/Storage/PDisk/PDisk.js.map +1 -1
- package/dist/containers/Storage/PDisk/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/columns.js +7 -2
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/columns.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/StorageExpertModePanel/components/SpaceLegend.scss +14 -82
- package/dist/containers/Storage/StorageExpertModePanel/constants.d.ts +1 -1
- package/dist/containers/Storage/StorageExpertModePanel/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/StorageGroupStateLabel.d.ts +4 -0
- package/dist/containers/Storage/StorageGroupStateLabel.js +9 -0
- package/dist/containers/Storage/StorageGroupStateLabel.js.map +1 -0
- package/dist/containers/Storage/useStorageQueryParams.d.ts +4 -4
- package/dist/containers/Storage/utils/getStorageGroupStateLabel.d.ts +2 -0
- package/dist/containers/Storage/utils/getStorageGroupStateLabel.js +35 -0
- package/dist/containers/Storage/utils/getStorageGroupStateLabel.js.map +1 -0
- package/dist/containers/StorageGroupPage/StorageGroupPage.js +20 -13
- package/dist/containers/StorageGroupPage/StorageGroupPage.js.map +1 -1
- package/dist/containers/StorageGroupPage/StorageGroupPage.scss +18 -12
- package/dist/containers/StorageGroupPage/i18n/en.json +2 -1
- package/dist/containers/StorageGroupPage/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +4 -1
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/SchemaObjectInfo.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/SchemaObjectInfo.js +11 -2
- package/dist/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/SchemaObjectInfo.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/prepareSchemaObjectInfo.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/prepareSchemaObjectInfo.js +9 -8
- package/dist/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/prepareSchemaObjectInfo.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/StreamingQueryInfo.d.ts +16 -1
- package/dist/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/StreamingQueryInfo.js +56 -19
- package/dist/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/StreamingQueryInfo.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/i18n/en.json +5 -1
- package/dist/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/ManagePartitioningDialog/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +5 -12
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/columns/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Healthcheck/Healthcheck.scss +6 -1
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckDrawer.d.ts +3 -1
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckDrawer.js +3 -3
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckDrawer.js.map +1 -1
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssue.js +2 -2
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssue.js.map +1 -1
- package/dist/containers/Tenant/TenantDrawerHealthcheck.js +17 -2
- package/dist/containers/Tenant/TenantDrawerHealthcheck.js.map +1 -1
- package/dist/containers/Tenants/DatabaseDrawerHealthcheck.js +8 -1
- package/dist/containers/Tenants/DatabaseDrawerHealthcheck.js.map +1 -1
- package/dist/containers/VDiskPage/VDiskPage.js +33 -33
- package/dist/containers/VDiskPage/VDiskPage.js.map +1 -1
- package/dist/containers/VDiskPage/VDiskPage.scss +21 -8
- package/dist/containers/VDiskPage/VDiskStorageDetails.js +27 -29
- package/dist/containers/VDiskPage/VDiskStorageDetails.js.map +1 -1
- package/dist/containers/VDiskPage/VDiskStorageDetails.scss +24 -93
- package/dist/containers/VDiskPage/i18n/en.json +3 -12
- package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
- package/dist/lib.d.ts +1 -1
- package/dist/lib.js.map +1 -1
- package/dist/store/configureStore.d.ts +2 -2
- package/dist/store/defaultStore.d.ts +1 -1
- package/dist/store/reducers/cluster/parseFields.js +1 -0
- package/dist/store/reducers/cluster/parseFields.js.map +1 -1
- package/dist/store/reducers/clusters/clusters.js +1 -0
- package/dist/store/reducers/clusters/clusters.js.map +1 -1
- package/dist/store/reducers/clusters/selectors.d.ts +1 -0
- package/dist/store/reducers/clusters/selectors.js +4 -1
- package/dist/store/reducers/clusters/selectors.js.map +1 -1
- package/dist/store/reducers/clusters/types.d.ts +2 -0
- package/dist/store/reducers/header/types.d.ts +1 -1
- package/dist/store/reducers/index.d.ts +2 -2
- package/dist/store/reducers/pdisk/types.d.ts +1 -0
- package/dist/store/reducers/pdisk/utils.js +6 -1
- package/dist/store/reducers/pdisk/utils.js.map +1 -1
- package/dist/store/reducers/storage/prepareGroupsDisks.d.ts +2 -1
- package/dist/store/reducers/storage/prepareGroupsDisks.js +9 -19
- package/dist/store/reducers/storage/prepareGroupsDisks.js.map +1 -1
- package/dist/store/reducers/storage/utils.js +14 -3
- package/dist/store/reducers/storage/utils.js.map +1 -1
- package/dist/store/reducers/streamingQuery/streamingQuery.js +2 -4
- package/dist/store/reducers/streamingQuery/streamingQuery.js.map +1 -1
- package/dist/store/reducers/vdisk/types.d.ts +1 -1
- package/dist/store/reducers/vdisk/utils.js +5 -5
- package/dist/store/reducers/vdisk/utils.js.map +1 -1
- package/dist/styles/mixins.scss +22 -0
- package/dist/types/api/meta.d.ts +1 -0
- package/dist/types/api/nodesList.d.ts +2 -0
- package/dist/types/api/pdisk.d.ts +4 -0
- package/dist/types/api/pdisk.js.map +1 -1
- package/dist/types/api/vdisk.d.ts +8 -0
- package/dist/types/api/vdisk.js +7 -0
- package/dist/types/api/vdisk.js.map +1 -1
- package/dist/types/store/nodesList.d.ts +4 -2
- package/dist/uiFactory/types.d.ts +5 -2
- package/dist/utils/bytesParsers/formatBytes.d.ts +3 -1
- package/dist/utils/bytesParsers/formatBytes.js +12 -3
- package/dist/utils/bytesParsers/formatBytes.js.map +1 -1
- package/dist/utils/disks/constants.d.ts +1 -0
- package/dist/utils/disks/constants.js +4 -0
- package/dist/utils/disks/constants.js.map +1 -1
- package/dist/utils/disks/diskInfo/getDiskLocationItems.d.ts +16 -0
- package/dist/utils/disks/diskInfo/getDiskLocationItems.js +30 -0
- package/dist/utils/disks/diskInfo/getDiskLocationItems.js.map +1 -0
- package/dist/utils/disks/diskInfo/i18n/en.json +9 -0
- package/dist/utils/disks/diskInfo/i18n/index.d.ts +2 -0
- package/dist/utils/disks/diskInfo/i18n/index.js +4 -0
- package/dist/utils/disks/diskInfo/i18n/index.js.map +1 -0
- package/dist/utils/disks/iconCalculators.d.ts +5 -0
- package/dist/utils/disks/iconCalculators.js +1 -1
- package/dist/utils/disks/iconCalculators.js.map +1 -1
- package/dist/utils/disks/prepareDisks.d.ts +6 -2
- package/dist/utils/disks/prepareDisks.js +22 -35
- package/dist/utils/disks/prepareDisks.js.map +1 -1
- package/dist/utils/disks/types.d.ts +9 -2
- package/dist/utils/hooks/useDatabaseHealthcheckAvailable.d.ts +2 -0
- package/dist/utils/hooks/useDatabaseHealthcheckAvailable.js +6 -0
- package/dist/utils/hooks/useDatabaseHealthcheckAvailable.js.map +1 -0
- package/dist/utils/hooks/useNodeMetadata.d.ts +2 -0
- package/dist/utils/hooks/useNodeMetadata.js +15 -0
- package/dist/utils/hooks/useNodeMetadata.js.map +1 -0
- package/dist/utils/memory.d.ts +5 -0
- package/dist/utils/memory.js +9 -0
- package/dist/utils/memory.js.map +1 -0
- package/dist/utils/nodes.js +6 -2
- package/dist/utils/nodes.js.map +1 -1
- package/dist/utils/storageMetrics.d.ts +3 -2
- package/dist/utils/storageMetrics.js +30 -10
- package/dist/utils/storageMetrics.js.map +1 -1
- package/dist/utils/timeParsers/formatDuration.d.ts +4 -1
- package/dist/utils/timeParsers/formatDuration.js +16 -1
- package/dist/utils/timeParsers/formatDuration.js.map +1 -1
- package/dist/utils/timeParsers/i18n/en.json +5 -1
- package/dist/utils/timeParsers/i18n/index.d.ts +1 -1
- package/dist/utils/timeParsers/i18n/ru.json +5 -1
- package/package.json +2 -2
- package/src/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.tsx +22 -3
- package/src/components/CopyableValue/CopyableValue.scss +16 -0
- package/src/components/CopyableValue/CopyableValue.tsx +40 -0
- package/src/components/CopyableValue/i18n/en.json +3 -0
- package/src/components/CopyableValue/i18n/index.ts +8 -0
- package/src/components/CriticalActionDialog/CriticalActionDialog.tsx +3 -0
- package/src/components/DiskCapacityInfo/DiskCapacityInfo.tsx +75 -129
- package/src/components/DiskCapacityInfo/i18n/en.json +0 -1
- package/src/components/DiskPopup/DiskPopup.scss +203 -0
- package/src/components/DiskPopup/DiskPopup.tsx +123 -0
- package/src/components/DiskPopup/i18n/en.json +3 -0
- package/src/components/DiskPopup/i18n/index.ts +5 -0
- package/src/components/DiskStatus/DiskStatus.scss +59 -0
- package/src/components/DiskStatus/DiskStatus.tsx +149 -0
- package/src/components/DiskStatus/i18n/en.json +6 -0
- package/src/components/DiskStatus/i18n/index.ts +5 -0
- package/src/components/EntityStatus/EntityStatus.scss +5 -0
- package/src/components/EntityStatus/EntityStatus.tsx +39 -6
- package/src/components/EvictVDiskButton/EvictVDiskButton.tsx +10 -2
- package/src/components/EvictVDiskButton/i18n/en.json +2 -2
- package/src/components/FullNodeViewer/FullNodeViewer.tsx +4 -9
- package/src/components/HoverPopup/HoverPopup.tsx +157 -34
- package/src/components/HoverPopup/usePopupPriority.ts +39 -0
- package/src/components/MemoryViewer/MemoryViewer.tsx +30 -17
- package/src/components/MemoryViewer/i18n/en.json +4 -3
- package/src/components/MemoryViewer/utils.ts +19 -12
- package/src/components/PDiskInfo/PDiskInfo.scss +15 -0
- package/src/components/PDiskInfo/PDiskInfo.tsx +51 -243
- package/src/components/PDiskInfo/PDiskLogSize.scss +12 -0
- package/src/components/PDiskInfo/PDiskLogSize.tsx +41 -0
- package/src/components/PDiskInfo/getPDiskDetails.tsx +37 -0
- package/src/components/PDiskInfo/i18n/en.json +69 -10
- package/src/components/PDiskInfo/statuses.ts +222 -0
- package/src/components/PDiskPopup/PDiskPopup.tsx +62 -147
- package/src/components/PDiskPopup/i18n/en.json +2 -12
- package/src/components/Search/Search.tsx +5 -2
- package/src/components/StorageGroupInfo/StorageGroupInfo.scss +21 -0
- package/src/components/StorageGroupInfo/StorageGroupInfo.tsx +119 -263
- package/src/components/StorageGroupInfo/i18n/en.json +1 -9
- package/src/components/VDisk/VDisk.tsx +34 -36
- package/src/components/VDisk/VDiskWithDonorsStack.tsx +2 -0
- package/src/components/VDisk/getFlagStatusText.ts +19 -0
- package/src/components/VDisk/i18n/en.json +1 -1
- package/src/components/VDiskInfo/VDiskInfo.scss +19 -3
- package/src/components/VDiskInfo/VDiskInfo.tsx +119 -341
- package/src/components/VDiskInfo/getVDiskDetails.tsx +63 -0
- package/src/components/VDiskInfo/i18n/en.json +5 -21
- package/src/components/VDiskPopup/VDiskPopup.scss +3 -10
- package/src/components/VDiskPopup/VDiskPopup.tsx +192 -424
- package/src/components/VDiskPopup/i18n/en.json +4 -22
- package/src/components/VDiskStatus/VDiskReplicationStatus.tsx +77 -0
- package/src/components/VDiskStatus/VDiskStatus.scss +36 -0
- package/src/components/VDiskStatus/VDiskStatus.tsx +49 -0
- package/src/components/VDiskStatus/i18n/en.json +33 -0
- package/src/components/VDiskStatus/i18n/index.ts +7 -0
- package/src/components/VDiskStatus/index.ts +7 -0
- package/src/components/VDiskStatus/statuses.ts +139 -0
- package/src/components/capacityMetricsColumns/i18n/en.json +4 -4
- package/src/components/nodesColumns/columns.tsx +26 -12
- package/src/containers/Cluster/ClusterDrawerHealthcheck.tsx +6 -0
- package/src/containers/Clusters/ClusterDrawerHealthcheck.tsx +1 -0
- package/src/containers/Clusters/Clusters.scss +24 -6
- package/src/containers/Clusters/Clusters.tsx +74 -5
- package/src/containers/Clusters/columns.tsx +36 -6
- package/src/containers/Clusters/i18n/en.json +6 -0
- package/src/containers/Header/Header.tsx +19 -3
- package/src/containers/Header/HeaderLeftControls.tsx +3 -1
- package/src/containers/Header/PDiskLeftControls.tsx +41 -0
- package/src/containers/Header/StorageGroupLeftControls.tsx +38 -0
- package/src/containers/Header/VDiskLeftControls.tsx +40 -0
- package/src/containers/Header/breadcrumbs.tsx +4 -2
- package/src/containers/Header/i18n/en.json +6 -1
- package/src/containers/Nodes/NodesControls/NodesControls.tsx +1 -0
- package/src/containers/Nodes/PaginatedNodes/GroupedNodesComponent.tsx +5 -3
- package/src/containers/Nodes/PaginatedNodes/NodesComponent.tsx +4 -2
- package/src/containers/Nodes/useDebouncedSearch.ts +13 -0
- package/src/containers/PDiskPage/PDiskPage.scss +22 -11
- package/src/containers/PDiskPage/PDiskPage.tsx +88 -56
- package/src/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.tsx +16 -11
- package/src/containers/PDiskPage/PDiskStorageDetails.scss +51 -0
- package/src/containers/PDiskPage/PDiskStorageDetails.tsx +64 -0
- package/src/containers/PDiskPage/i18n/en.json +2 -0
- package/src/containers/Storage/Disks/Disks.tsx +66 -12
- package/src/containers/Storage/PDisk/PDisk.tsx +3 -0
- package/src/containers/Storage/PaginatedStorageGroupsTable/columns/columns.tsx +24 -3
- package/src/containers/Storage/StorageExpertModePanel/components/SpaceLegend.scss +14 -82
- package/src/containers/Storage/StorageGroupStateLabel.tsx +22 -0
- package/src/containers/Storage/utils/getStorageGroupStateLabel.ts +49 -0
- package/src/containers/StorageGroupPage/StorageGroupPage.scss +18 -12
- package/src/containers/StorageGroupPage/StorageGroupPage.tsx +63 -26
- package/src/containers/StorageGroupPage/i18n/en.json +2 -1
- package/src/containers/Tenant/Diagnostics/Overview/Overview.tsx +5 -1
- package/src/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/SchemaObjectInfo.tsx +12 -1
- package/src/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/prepareSchemaObjectInfo.tsx +11 -10
- package/src/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/StreamingQueryInfo.tsx +83 -20
- package/src/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/i18n/en.json +5 -1
- package/src/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.tsx +5 -32
- package/src/containers/Tenant/Healthcheck/Healthcheck.scss +6 -1
- package/src/containers/Tenant/Healthcheck/components/HealthcheckDrawer.tsx +5 -2
- package/src/containers/Tenant/Healthcheck/components/HealthcheckIssue.tsx +18 -8
- package/src/containers/Tenant/TenantDrawerHealthcheck.tsx +24 -1
- package/src/containers/Tenants/DatabaseDrawerHealthcheck.tsx +10 -0
- package/src/containers/VDiskPage/VDiskPage.scss +21 -8
- package/src/containers/VDiskPage/VDiskPage.tsx +103 -64
- package/src/containers/VDiskPage/VDiskStorageDetails.scss +24 -93
- package/src/containers/VDiskPage/VDiskStorageDetails.tsx +50 -158
- package/src/containers/VDiskPage/i18n/en.json +3 -14
- package/src/lib.ts +1 -0
- package/src/store/reducers/cluster/parseFields.ts +1 -0
- package/src/store/reducers/clusters/clusters.ts +1 -0
- package/src/store/reducers/clusters/selectors.ts +4 -0
- package/src/store/reducers/clusters/types.ts +3 -0
- package/src/store/reducers/header/types.ts +3 -1
- package/src/store/reducers/pdisk/types.ts +1 -0
- package/src/store/reducers/pdisk/utils.ts +6 -3
- package/src/store/reducers/storage/prepareGroupsDisks.ts +9 -22
- package/src/store/reducers/storage/utils.ts +17 -3
- package/src/store/reducers/streamingQuery/streamingQuery.ts +2 -4
- package/src/store/reducers/vdisk/types.ts +2 -1
- package/src/store/reducers/vdisk/utils.ts +4 -5
- package/src/styles/mixins.scss +22 -0
- package/src/types/api/meta.ts +1 -0
- package/src/types/api/nodesList.ts +3 -0
- package/src/types/api/pdisk.ts +4 -0
- package/src/types/api/vdisk.ts +9 -0
- package/src/types/store/nodesList.ts +7 -7
- package/src/uiFactory/types.ts +9 -2
- package/src/utils/bytesParsers/formatBytes.ts +23 -4
- package/src/utils/disks/constants.ts +5 -0
- package/src/utils/disks/diskInfo/getDiskLocationItems.ts +50 -0
- package/src/utils/disks/diskInfo/i18n/en.json +9 -0
- package/src/utils/disks/diskInfo/i18n/index.ts +5 -0
- package/src/utils/disks/iconCalculators.ts +1 -1
- package/src/utils/disks/prepareDisks.ts +21 -47
- package/src/utils/disks/types.ts +10 -2
- package/src/utils/hooks/useDatabaseHealthcheckAvailable.ts +9 -0
- package/src/utils/hooks/useNodeMetadata.ts +21 -0
- package/src/utils/memory.ts +16 -0
- package/src/utils/nodes.ts +7 -1
- package/src/utils/storageMetrics.ts +38 -14
- package/src/utils/timeParsers/formatDuration.ts +22 -1
- package/src/utils/timeParsers/i18n/en.json +5 -1
- package/src/utils/timeParsers/i18n/ru.json +5 -1
- package/dist/components/VDiskInfo/getVDiskCapacityColumns.d.ts +0 -11
- package/dist/components/VDiskInfo/getVDiskCapacityColumns.js +0 -52
- package/dist/components/VDiskInfo/getVDiskCapacityColumns.js.map +0 -1
- package/src/components/VDiskInfo/getVDiskCapacityColumns.tsx +0 -83
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import type {IconData, LabelProps} from '@gravity-ui/uikit';
|
|
2
|
+
import {Icon, Label, Tooltip} from '@gravity-ui/uikit';
|
|
3
|
+
import {capitalize} from 'lodash';
|
|
4
|
+
|
|
5
|
+
import {EFlag, isCapacityAlert} from '../../types/api/enums';
|
|
6
|
+
import {normalizeCapacityAlert} from '../../utils/capacityAlerts';
|
|
7
|
+
import {cn} from '../../utils/cn';
|
|
8
|
+
import {formatPDiskType} from '../../utils/disks/getPDiskType';
|
|
9
|
+
import {getDisplaySeverityColor} from '../../utils/disks/helpers';
|
|
10
|
+
import {getFlagIconWithColor} from '../../utils/disks/iconCalculators';
|
|
11
|
+
import {normalizeMediaType} from '../../utils/disks/normalizeMediaType';
|
|
12
|
+
import {calculateSpaceSeverity} from '../../utils/disks/severityCalculators';
|
|
13
|
+
import {EFlagToLabelTheme} from '../EntityStatus/EntityStatus';
|
|
14
|
+
import {getFlagStatusText} from '../VDisk/getFlagStatusText';
|
|
15
|
+
|
|
16
|
+
import i18n from './i18n';
|
|
17
|
+
|
|
18
|
+
import './DiskStatus.scss';
|
|
19
|
+
|
|
20
|
+
const b = cn('ydb-disk-status');
|
|
21
|
+
|
|
22
|
+
export interface DiskStatusLabelData {
|
|
23
|
+
value: string;
|
|
24
|
+
title?: string;
|
|
25
|
+
theme?: LabelProps['theme'];
|
|
26
|
+
icon?: IconData;
|
|
27
|
+
tooltip?: string;
|
|
28
|
+
dangerHeavy?: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type TitledDiskStatusLabelData = Omit<DiskStatusLabelData, 'title' | 'value'> & {
|
|
32
|
+
title: string;
|
|
33
|
+
value?: string;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export function DiskStatusLabel({
|
|
37
|
+
value,
|
|
38
|
+
theme = 'normal',
|
|
39
|
+
icon,
|
|
40
|
+
title,
|
|
41
|
+
tooltip,
|
|
42
|
+
dangerHeavy,
|
|
43
|
+
size = 's',
|
|
44
|
+
iconSize = 12,
|
|
45
|
+
className,
|
|
46
|
+
}: (DiskStatusLabelData | TitledDiskStatusLabelData) &
|
|
47
|
+
Pick<LabelProps, 'size' | 'className'> & {iconSize?: number}) {
|
|
48
|
+
const label = (
|
|
49
|
+
<Label
|
|
50
|
+
size={size}
|
|
51
|
+
theme={theme}
|
|
52
|
+
className={b('label', {'danger-heavy': dangerHeavy}, className)}
|
|
53
|
+
icon={icon ? <Icon data={icon} size={iconSize} /> : undefined}
|
|
54
|
+
value={title ? value : undefined}
|
|
55
|
+
>
|
|
56
|
+
{title ?? value}
|
|
57
|
+
</Label>
|
|
58
|
+
);
|
|
59
|
+
return tooltip ? (
|
|
60
|
+
<Tooltip content={tooltip} placement="top">
|
|
61
|
+
<span tabIndex={0} className={b('tooltip')}>
|
|
62
|
+
{label}
|
|
63
|
+
</span>
|
|
64
|
+
</Tooltip>
|
|
65
|
+
) : (
|
|
66
|
+
label
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function DiskTypeLabel({type, size}: {type?: string} & Pick<LabelProps, 'size'>) {
|
|
71
|
+
if (!type?.trim()) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
const mediaType = normalizeMediaType(type);
|
|
75
|
+
const value = formatPDiskType(mediaType) ?? mediaType;
|
|
76
|
+
let tooltip: string | undefined;
|
|
77
|
+
switch (mediaType) {
|
|
78
|
+
case 'HDD':
|
|
79
|
+
tooltip = i18n('context_hdd');
|
|
80
|
+
break;
|
|
81
|
+
case 'SSD':
|
|
82
|
+
tooltip = i18n('context_ssd');
|
|
83
|
+
break;
|
|
84
|
+
case 'NVME':
|
|
85
|
+
tooltip = i18n('context_nvme');
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
return (
|
|
89
|
+
<DiskStatusLabel
|
|
90
|
+
value={value}
|
|
91
|
+
tooltip={tooltip}
|
|
92
|
+
size={size}
|
|
93
|
+
className={b('type', {
|
|
94
|
+
hdd: mediaType === 'HDD',
|
|
95
|
+
ssd: mediaType === 'SSD',
|
|
96
|
+
nvme: mediaType === 'NVME',
|
|
97
|
+
})}
|
|
98
|
+
/>
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function DiskCapacityAlertLabel({
|
|
103
|
+
value,
|
|
104
|
+
emptyText = i18n('value_no-data'),
|
|
105
|
+
}: {
|
|
106
|
+
value?: string;
|
|
107
|
+
emptyText?: string;
|
|
108
|
+
}) {
|
|
109
|
+
const capacityAlert = normalizeCapacityAlert(value);
|
|
110
|
+
if (!capacityAlert) {
|
|
111
|
+
return <DiskStatusLabel size="xs" value={emptyText} theme="unknown" />;
|
|
112
|
+
}
|
|
113
|
+
const color = isCapacityAlert(capacityAlert)
|
|
114
|
+
? getDisplaySeverityColor(
|
|
115
|
+
calculateSpaceSeverity({CapacityAlert: capacityAlert}),
|
|
116
|
+
).toLowerCase()
|
|
117
|
+
: undefined;
|
|
118
|
+
return (
|
|
119
|
+
<DiskStatusLabel
|
|
120
|
+
size="xs"
|
|
121
|
+
value={capitalize(capacityAlert.replaceAll('_', ' '))}
|
|
122
|
+
className={b('capacity-alert', {color})}
|
|
123
|
+
/>
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function DiskFlagLabel({
|
|
128
|
+
flag,
|
|
129
|
+
title,
|
|
130
|
+
icon,
|
|
131
|
+
emptyText = i18n('value_no-data'),
|
|
132
|
+
}: {
|
|
133
|
+
flag?: EFlag;
|
|
134
|
+
title?: string;
|
|
135
|
+
icon?: IconData;
|
|
136
|
+
emptyText?: string;
|
|
137
|
+
}) {
|
|
138
|
+
const resolvedFlag = flag || EFlag.Grey;
|
|
139
|
+
return (
|
|
140
|
+
<DiskStatusLabel
|
|
141
|
+
value={resolvedFlag === EFlag.Grey ? emptyText : getFlagStatusText(resolvedFlag)}
|
|
142
|
+
title={title}
|
|
143
|
+
theme={EFlagToLabelTheme[resolvedFlag] ?? 'normal'}
|
|
144
|
+
icon={icon ?? getFlagIconWithColor(resolvedFlag)?.icon}
|
|
145
|
+
dangerHeavy={resolvedFlag === EFlag.Red}
|
|
146
|
+
size="xs"
|
|
147
|
+
/>
|
|
148
|
+
);
|
|
149
|
+
}
|
|
@@ -14,7 +14,7 @@ import './EntityStatus.scss';
|
|
|
14
14
|
|
|
15
15
|
const b = cn('ydb-entity-status');
|
|
16
16
|
|
|
17
|
-
const EFlagToLabelTheme: Record<EFlag, LabelProps['theme']> = {
|
|
17
|
+
export const EFlagToLabelTheme: Record<EFlag, LabelProps['theme']> = {
|
|
18
18
|
[EFlag.Red]: 'danger',
|
|
19
19
|
[EFlag.Blue]: 'success',
|
|
20
20
|
[EFlag.Green]: 'success',
|
|
@@ -44,31 +44,64 @@ const EFlagToStatusName: Record<EFlag, string> = {
|
|
|
44
44
|
},
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
interface
|
|
47
|
+
interface EntityStatusLabelBaseProps {
|
|
48
48
|
status: EFlag;
|
|
49
|
+
className?: string;
|
|
50
|
+
size?: LabelProps['size'];
|
|
51
|
+
iconSize?: number;
|
|
52
|
+
qa?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface DefaultEntityStatusLabelProps {
|
|
56
|
+
view?: 'default';
|
|
49
57
|
note?: React.ReactNode;
|
|
50
58
|
children?: React.ReactNode;
|
|
51
|
-
className?: string;
|
|
52
59
|
endContent?: React.ReactNode;
|
|
53
60
|
withStatusName?: boolean;
|
|
54
|
-
size?: LabelProps['size'];
|
|
55
|
-
iconSize?: number;
|
|
56
61
|
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
57
|
-
qa?: string;
|
|
58
62
|
}
|
|
59
63
|
|
|
64
|
+
interface CompactEntityStatusLabelProps {
|
|
65
|
+
view: 'compact';
|
|
66
|
+
note?: never;
|
|
67
|
+
children?: never;
|
|
68
|
+
endContent?: never;
|
|
69
|
+
withStatusName?: never;
|
|
70
|
+
onClick?: never;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
type EntityStatusLabelProps = EntityStatusLabelBaseProps &
|
|
74
|
+
(DefaultEntityStatusLabelProps | CompactEntityStatusLabelProps);
|
|
75
|
+
|
|
60
76
|
function EntityStatusLabel({
|
|
61
77
|
children,
|
|
62
78
|
className,
|
|
63
79
|
endContent,
|
|
64
80
|
status,
|
|
65
81
|
withStatusName = true,
|
|
82
|
+
view = 'default',
|
|
66
83
|
note,
|
|
67
84
|
size = 'm',
|
|
68
85
|
iconSize = 14,
|
|
69
86
|
onClick,
|
|
70
87
|
qa,
|
|
71
88
|
}: EntityStatusLabelProps) {
|
|
89
|
+
if (view === 'compact') {
|
|
90
|
+
const statusName = EFlagToStatusName[status];
|
|
91
|
+
return (
|
|
92
|
+
<ActionTooltip title={statusName}>
|
|
93
|
+
<span className={b('compact')} role="img" aria-label={statusName}>
|
|
94
|
+
<Label
|
|
95
|
+
theme={status === EFlag.Blue ? 'info' : EFlagToLabelTheme[status]}
|
|
96
|
+
icon={<StatusIcon size={iconSize} status={status} />}
|
|
97
|
+
size={size}
|
|
98
|
+
className={b(null, className)}
|
|
99
|
+
qa={qa}
|
|
100
|
+
/>
|
|
101
|
+
</span>
|
|
102
|
+
</ActionTooltip>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
72
105
|
const theme = EFlagToLabelTheme[status];
|
|
73
106
|
const isClickable = Boolean(onClick);
|
|
74
107
|
return (
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import {ArrowsOppositeToDots} from '@gravity-ui/icons';
|
|
4
4
|
import {Icon} from '@gravity-ui/uikit';
|
|
5
|
+
import type {ButtonProps} from '@gravity-ui/uikit';
|
|
5
6
|
import {isNil} from 'lodash';
|
|
6
7
|
|
|
7
8
|
import {
|
|
@@ -10,6 +11,7 @@ import {
|
|
|
10
11
|
} from '../../store/reducers/capabilities/hooks';
|
|
11
12
|
import type {ModifyDiskResponse} from '../../types/api/modifyDisk';
|
|
12
13
|
import type {TVDiskID} from '../../types/api/vdisk';
|
|
14
|
+
import {BRAND_BUTTON_CLASS} from '../../utils/constants';
|
|
13
15
|
import {useIsUserAllowedToMakeChanges} from '../../utils/hooks/useIsUserAllowedToMakeChanges';
|
|
14
16
|
import {ButtonWithConfirmDialog} from '../ButtonWithConfirmDialog/ButtonWithConfirmDialog';
|
|
15
17
|
|
|
@@ -19,7 +21,9 @@ interface EvictVDiskButtonProps {
|
|
|
19
21
|
vDiskId: Required<TVDiskID>;
|
|
20
22
|
donorMode?: boolean;
|
|
21
23
|
fullWidth?: boolean;
|
|
22
|
-
|
|
24
|
+
view?: ButtonProps['view'];
|
|
25
|
+
onSuccess?: (isDialogOpen: boolean) => void;
|
|
26
|
+
onDialogOpen?: () => VoidFunction;
|
|
23
27
|
}
|
|
24
28
|
|
|
25
29
|
export function isAllVdiskParamsDefined(vDiskId?: TVDiskID): vDiskId is Required<TVDiskID> {
|
|
@@ -36,7 +40,9 @@ export const EvictVDiskButton = ({
|
|
|
36
40
|
vDiskId,
|
|
37
41
|
donorMode,
|
|
38
42
|
fullWidth,
|
|
43
|
+
view = 'normal',
|
|
39
44
|
onSuccess,
|
|
45
|
+
onDialogOpen,
|
|
40
46
|
}: EvictVDiskButtonProps) => {
|
|
41
47
|
const isUserAllowedToMakeChanges = useIsUserAllowedToMakeChanges();
|
|
42
48
|
const newDiskApiAvailable = useDiskPagesAvailable();
|
|
@@ -79,8 +85,10 @@ export const EvictVDiskButton = ({
|
|
|
79
85
|
<ButtonWithConfirmDialog
|
|
80
86
|
onConfirmAction={handleEvictVDisk}
|
|
81
87
|
onConfirmActionSuccess={onSuccess}
|
|
88
|
+
onDialogOpen={onDialogOpen}
|
|
82
89
|
buttonDisabled={!isUserAllowedToMakeChanges || donorMode}
|
|
83
|
-
buttonView=
|
|
90
|
+
buttonView={view}
|
|
91
|
+
buttonClassName={view === 'action' ? BRAND_BUTTON_CLASS : undefined}
|
|
84
92
|
buttonWidth={fullWidth ? 'max' : undefined}
|
|
85
93
|
dialogHeader={evictVDiskButtonKeyset('title_evict-dialog')}
|
|
86
94
|
dialogText={evictVDiskButtonKeyset('confirm_evict')}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"action_evict-short": "Evict",
|
|
4
4
|
"action_force-evict": "Evict anyway",
|
|
5
5
|
"title_evict-dialog": "Evict VDisk?",
|
|
6
|
-
"confirm_evict": "The VDisk will be evicted from the PDisk.
|
|
7
|
-
"alert_evict": "This
|
|
6
|
+
"confirm_evict": "The VDisk will be evicted from the PDisk.",
|
|
7
|
+
"alert_evict": "This VDisk will be replaced by a new one in the group. Data will be replicated to the new disk. The old VDisk will serve as\u00a0a\u00a0donor until replication is complete, and then it will be\u00a0removed.",
|
|
8
8
|
"alert_not-allowed": "You don't have enough rights to evict VDisk",
|
|
9
9
|
"alert_donor-mode-impossible": "Evicting a donor VDisk is not possible"
|
|
10
10
|
}
|
|
@@ -5,7 +5,7 @@ import {cn} from '../../utils/cn';
|
|
|
5
5
|
import {EMPTY_DATA_PLACEHOLDER} from '../../utils/constants';
|
|
6
6
|
import {formatStorageValues} from '../../utils/dataFormatters/dataFormatters';
|
|
7
7
|
import {useNodeDeveloperUIHref} from '../../utils/hooks/useNodeDeveloperUIHref';
|
|
8
|
-
import {
|
|
8
|
+
import {getNodeMemory} from '../../utils/memory';
|
|
9
9
|
import {LinkWithIcon} from '../LinkWithIcon/LinkWithIcon';
|
|
10
10
|
import {PoolUsage} from '../PoolUsage/PoolUsage';
|
|
11
11
|
import {ProgressViewer} from '../ProgressViewer/ProgressViewer';
|
|
@@ -90,18 +90,13 @@ export const FullNodeViewer = ({node, className}: FullNodeViewerProps) => {
|
|
|
90
90
|
return <div className="error">{i18n('no-data')}</div>;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
const memoryUsed =
|
|
94
|
-
const memoryLimit = isNumeric(node.MemoryLimit) ? Number(node.MemoryLimit) : undefined;
|
|
95
|
-
const hasMemoryUsed =
|
|
96
|
-
memoryUsed !== undefined && Number.isFinite(memoryUsed) && memoryUsed >= 0;
|
|
97
|
-
const hasMemoryLimit =
|
|
98
|
-
memoryLimit !== undefined && Number.isFinite(memoryLimit) && memoryLimit > 0;
|
|
93
|
+
const {memoryUsed, memoryLimit} = getNodeMemory(node);
|
|
99
94
|
|
|
100
95
|
const renderMemory = () => {
|
|
101
|
-
if (
|
|
96
|
+
if (memoryUsed === undefined) {
|
|
102
97
|
return EMPTY_DATA_PLACEHOLDER;
|
|
103
98
|
}
|
|
104
|
-
if (
|
|
99
|
+
if (memoryLimit === undefined) {
|
|
105
100
|
return formatMemoryValues(memoryUsed)[0];
|
|
106
101
|
}
|
|
107
102
|
|
|
@@ -8,35 +8,51 @@ import {YDB_POPOVER_CLASS_NAME} from '../../utils/constants';
|
|
|
8
8
|
import {useEventHandler} from '../../utils/hooks/useEventHandler';
|
|
9
9
|
|
|
10
10
|
import {getPopupScrollContainer} from './getPopupScrollContainer';
|
|
11
|
+
import {usePopupPriority} from './usePopupPriority';
|
|
11
12
|
|
|
12
13
|
const DEBOUNCE_TIMEOUT = 100;
|
|
13
14
|
|
|
14
|
-
function useVisibleAnchor(
|
|
15
|
+
function useVisibleAnchor(
|
|
16
|
+
anchorElement: HTMLElement | null,
|
|
17
|
+
open: boolean,
|
|
18
|
+
onHidden: VoidFunction,
|
|
19
|
+
) {
|
|
15
20
|
const [visibleAnchor, setVisibleAnchor] = React.useState<HTMLElement | null>(null);
|
|
21
|
+
// Mouse events can arrive before React renders the observer's next visibility state.
|
|
22
|
+
const visibleAnchorRef = React.useRef<HTMLElement | null>(null);
|
|
16
23
|
|
|
17
24
|
React.useLayoutEffect(() => {
|
|
18
25
|
setVisibleAnchor(null);
|
|
26
|
+
visibleAnchorRef.current = null;
|
|
19
27
|
if (!open || !anchorElement) {
|
|
20
28
|
return undefined;
|
|
21
29
|
}
|
|
22
30
|
|
|
23
31
|
const observer = new IntersectionObserver(([entry]) => {
|
|
24
|
-
|
|
32
|
+
visibleAnchorRef.current = entry.isIntersecting ? anchorElement : null;
|
|
33
|
+
setVisibleAnchor(visibleAnchorRef.current);
|
|
34
|
+
if (!entry.isIntersecting) {
|
|
35
|
+
onHidden();
|
|
36
|
+
}
|
|
25
37
|
});
|
|
26
38
|
observer.observe(anchorElement);
|
|
27
39
|
return () => observer.disconnect();
|
|
28
|
-
}, [anchorElement, open]);
|
|
40
|
+
}, [anchorElement, open, onHidden]);
|
|
29
41
|
|
|
30
|
-
return anchorElement !== null && visibleAnchor === anchorElement;
|
|
42
|
+
return [anchorElement !== null && visibleAnchor === anchorElement, visibleAnchorRef] as const;
|
|
31
43
|
}
|
|
32
44
|
|
|
33
45
|
type HoverPopupProps = {
|
|
34
46
|
children: React.ReactNode;
|
|
35
|
-
renderPopupContent: (controls: {
|
|
47
|
+
renderPopupContent: (controls: {
|
|
48
|
+
onClose: VoidFunction;
|
|
49
|
+
holdOpen: () => VoidFunction;
|
|
50
|
+
}) => React.ReactNode;
|
|
36
51
|
showPopup?: boolean;
|
|
37
52
|
anchorRef?: React.RefObject<HTMLElement>;
|
|
38
53
|
onShowPopup?: VoidFunction;
|
|
39
54
|
onHidePopup?: VoidFunction;
|
|
55
|
+
onClosePopup?: VoidFunction;
|
|
40
56
|
delayOpen?: number;
|
|
41
57
|
delayClose?: number;
|
|
42
58
|
contentClassName?: string;
|
|
@@ -50,6 +66,7 @@ export const HoverPopup = ({
|
|
|
50
66
|
anchorRef,
|
|
51
67
|
onShowPopup,
|
|
52
68
|
onHidePopup,
|
|
69
|
+
onClosePopup,
|
|
53
70
|
placement = ['top', 'bottom', 'left', 'right'],
|
|
54
71
|
contentClassName,
|
|
55
72
|
delayClose = DEBOUNCE_TIMEOUT,
|
|
@@ -58,8 +75,13 @@ export const HoverPopup = ({
|
|
|
58
75
|
const [isPopupVisible, setIsPopupVisible] = React.useState(false);
|
|
59
76
|
const [isPopupContentHovered, setIsPopupContentHovered] = React.useState(false);
|
|
60
77
|
const [isFocused, setIsFocused] = React.useState(false);
|
|
78
|
+
const [hoverClosing, setHoverClosing] = React.useState(false);
|
|
79
|
+
const dialogHoldRef = React.useRef<object | null>(null);
|
|
61
80
|
|
|
62
81
|
const anchor = React.useRef<HTMLSpanElement>(null);
|
|
82
|
+
const popupContent = React.useRef<HTMLDivElement>(null);
|
|
83
|
+
const {activate, zIndex} = usePopupPriority();
|
|
84
|
+
const bringToFront = useEventHandler(() => activate(anchorRef?.current || anchor.current));
|
|
63
85
|
|
|
64
86
|
const reportedOpenRef = React.useRef(false);
|
|
65
87
|
|
|
@@ -86,36 +108,113 @@ export const HoverPopup = ({
|
|
|
86
108
|
[delayOpen, reportOpen],
|
|
87
109
|
);
|
|
88
110
|
|
|
89
|
-
const hidePopup =
|
|
111
|
+
const hidePopup = useEventHandler(() => {
|
|
112
|
+
if (dialogHoldRef.current || isFocused) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
setHoverClosing(open && visibleAnchorRef.current === anchorElement);
|
|
90
116
|
setIsPopupVisible(false);
|
|
91
|
-
|
|
117
|
+
reportOpen(false);
|
|
118
|
+
});
|
|
92
119
|
|
|
93
120
|
const debouncedHandleHidePopup = React.useMemo(
|
|
94
|
-
() =>
|
|
95
|
-
|
|
96
|
-
hidePopup();
|
|
97
|
-
reportOpen(false);
|
|
98
|
-
}, delayClose),
|
|
99
|
-
[delayClose, reportOpen, hidePopup],
|
|
121
|
+
() => debounce(hidePopup, delayClose),
|
|
122
|
+
[delayClose, hidePopup],
|
|
100
123
|
);
|
|
101
124
|
|
|
102
125
|
React.useEffect(() => {
|
|
103
126
|
return () => {
|
|
104
127
|
debouncedHandleShowPopup.cancel();
|
|
105
128
|
debouncedHandleHidePopup.cancel();
|
|
129
|
+
dialogHoldRef.current = null;
|
|
106
130
|
};
|
|
107
131
|
}, [debouncedHandleShowPopup, debouncedHandleHidePopup]);
|
|
108
132
|
|
|
109
133
|
const closePopup = React.useCallback(() => {
|
|
110
134
|
debouncedHandleShowPopup.cancel();
|
|
111
135
|
debouncedHandleHidePopup.cancel();
|
|
136
|
+
dialogHoldRef.current = null;
|
|
112
137
|
setIsPopupVisible(false);
|
|
113
138
|
setIsPopupContentHovered(false);
|
|
114
139
|
setIsFocused(false);
|
|
140
|
+
setHoverClosing(false);
|
|
115
141
|
reportOpen(false, true);
|
|
116
|
-
|
|
142
|
+
onClosePopup?.();
|
|
143
|
+
}, [debouncedHandleHidePopup, debouncedHandleShowPopup, onClosePopup, reportOpen]);
|
|
144
|
+
|
|
145
|
+
const hideClippedPopup = useEventHandler(() => {
|
|
146
|
+
debouncedHandleShowPopup.cancel();
|
|
147
|
+
setIsPopupContentHovered(false);
|
|
148
|
+
setIsFocused(false);
|
|
149
|
+
setHoverClosing(false);
|
|
150
|
+
debouncedHandleHidePopup();
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
const internalOpen = isPopupVisible || isPopupContentHovered || isFocused;
|
|
154
|
+
const open = Boolean(internalOpen || showPopup);
|
|
155
|
+
|
|
156
|
+
const anchorElement = anchorRef?.current || anchor.current;
|
|
157
|
+
// Release only this popup's hover source; a hovered peer can keep the pair open.
|
|
158
|
+
const [isAnchorVisible, visibleAnchorRef] = useVisibleAnchor(
|
|
159
|
+
anchorElement,
|
|
160
|
+
open || hoverClosing,
|
|
161
|
+
hideClippedPopup,
|
|
162
|
+
);
|
|
163
|
+
const container = getPopupScrollContainer(anchorElement);
|
|
164
|
+
|
|
165
|
+
React.useEffect(() => {
|
|
166
|
+
if (!hoverClosing || !anchorElement) {
|
|
167
|
+
return undefined;
|
|
168
|
+
}
|
|
169
|
+
// Escape may close this popup through its paired sibling's handler.
|
|
170
|
+
const preventHoverReturn = (event: KeyboardEvent) => {
|
|
171
|
+
if (event.key === 'Escape') {
|
|
172
|
+
setHoverClosing(false);
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
const doc = anchorElement.ownerDocument;
|
|
176
|
+
doc.addEventListener('keydown', preventHoverReturn, true);
|
|
177
|
+
return () => doc.removeEventListener('keydown', preventHoverReturn, true);
|
|
178
|
+
}, [anchorElement, hoverClosing]);
|
|
179
|
+
|
|
180
|
+
const resumeHover = useEventHandler(() => {
|
|
181
|
+
const contentHovered = Boolean(popupContent.current?.matches(':hover'));
|
|
182
|
+
const hovered =
|
|
183
|
+
visibleAnchorRef.current === anchorElement &&
|
|
184
|
+
(anchorElement?.matches(':hover') || contentHovered);
|
|
185
|
+
debouncedHandleShowPopup.cancel();
|
|
186
|
+
debouncedHandleHidePopup.cancel();
|
|
187
|
+
setIsFocused(false);
|
|
188
|
+
setIsPopupContentHovered(Boolean(hovered && contentHovered));
|
|
189
|
+
if (hovered) {
|
|
190
|
+
setIsPopupVisible(true);
|
|
191
|
+
reportOpen(true);
|
|
192
|
+
} else {
|
|
193
|
+
debouncedHandleHidePopup();
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
const holdOpen = () => {
|
|
198
|
+
const interaction = {};
|
|
199
|
+
dialogHoldRef.current = interaction;
|
|
200
|
+
debouncedHandleShowPopup.cancel();
|
|
201
|
+
debouncedHandleHidePopup.cancel();
|
|
202
|
+
setIsFocused(false);
|
|
203
|
+
setIsPopupVisible(true);
|
|
204
|
+
reportOpen(true);
|
|
205
|
+
return () => {
|
|
206
|
+
if (dialogHoldRef.current === interaction) {
|
|
207
|
+
dialogHoldRef.current = null;
|
|
208
|
+
resumeHover();
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
};
|
|
117
212
|
|
|
118
|
-
const onMouseEnter = () => {
|
|
213
|
+
const onMouseEnter = (event: React.MouseEvent<HTMLSpanElement>) => {
|
|
214
|
+
if (event.buttons !== 0) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
bringToFront();
|
|
119
218
|
debouncedHandleHidePopup.cancel();
|
|
120
219
|
debouncedHandleShowPopup();
|
|
121
220
|
};
|
|
@@ -125,11 +224,30 @@ export const HoverPopup = ({
|
|
|
125
224
|
debouncedHandleHidePopup();
|
|
126
225
|
};
|
|
127
226
|
|
|
128
|
-
const onPopupMouseEnter = React.useCallback(
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
227
|
+
const onPopupMouseEnter = React.useCallback(
|
|
228
|
+
(event: React.MouseEvent<HTMLDivElement>) => {
|
|
229
|
+
if ((!open && !hoverClosing) || visibleAnchorRef.current !== anchorElement) {
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
if (event.buttons === 0) {
|
|
233
|
+
bringToFront();
|
|
234
|
+
}
|
|
235
|
+
debouncedHandleHidePopup.cancel();
|
|
236
|
+
setHoverClosing(false);
|
|
237
|
+
setIsPopupVisible(true);
|
|
238
|
+
setIsPopupContentHovered(true);
|
|
239
|
+
reportOpen(true);
|
|
240
|
+
},
|
|
241
|
+
[
|
|
242
|
+
bringToFront,
|
|
243
|
+
reportOpen,
|
|
244
|
+
debouncedHandleHidePopup,
|
|
245
|
+
open,
|
|
246
|
+
hoverClosing,
|
|
247
|
+
visibleAnchorRef,
|
|
248
|
+
anchorElement,
|
|
249
|
+
],
|
|
250
|
+
);
|
|
133
251
|
|
|
134
252
|
const onPopupMouseLeave = React.useCallback(() => {
|
|
135
253
|
setIsPopupContentHovered(false);
|
|
@@ -137,26 +255,26 @@ export const HoverPopup = ({
|
|
|
137
255
|
}, [debouncedHandleHidePopup]);
|
|
138
256
|
|
|
139
257
|
const onPopupContextMenu = React.useCallback(() => {
|
|
258
|
+
if (dialogHoldRef.current || !open || visibleAnchorRef.current !== anchorElement) {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
bringToFront();
|
|
140
262
|
setIsFocused(true);
|
|
141
263
|
reportOpen(true);
|
|
142
|
-
}, [reportOpen]);
|
|
264
|
+
}, [bringToFront, reportOpen, open, visibleAnchorRef, anchorElement]);
|
|
143
265
|
|
|
144
|
-
const onPopupBlur =
|
|
145
|
-
|
|
146
|
-
|
|
266
|
+
const onPopupBlur = useEventHandler(() => {
|
|
267
|
+
if (isFocused && !dialogHoldRef.current) {
|
|
268
|
+
resumeHover();
|
|
269
|
+
}
|
|
270
|
+
});
|
|
147
271
|
|
|
148
272
|
const onPopupEscapeKeyDown = React.useCallback(() => {
|
|
149
|
-
|
|
273
|
+
if (!dialogHoldRef.current) {
|
|
274
|
+
closePopup();
|
|
275
|
+
}
|
|
150
276
|
}, [closePopup]);
|
|
151
277
|
|
|
152
|
-
const internalOpen = isPopupVisible || isPopupContentHovered || isFocused;
|
|
153
|
-
const open = Boolean(internalOpen || showPopup);
|
|
154
|
-
|
|
155
|
-
const anchorElement = anchorRef?.current || anchor.current;
|
|
156
|
-
// Clipping a paired disk must not clear the shared hover state via onHidePopup.
|
|
157
|
-
const isAnchorVisible = useVisibleAnchor(anchorElement, open);
|
|
158
|
-
const container = getPopupScrollContainer(anchorElement);
|
|
159
|
-
|
|
160
278
|
return (
|
|
161
279
|
<React.Fragment>
|
|
162
280
|
<span ref={anchor} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave}>
|
|
@@ -165,12 +283,15 @@ export const HoverPopup = ({
|
|
|
165
283
|
{anchorElement ? (
|
|
166
284
|
<Popup
|
|
167
285
|
container={container}
|
|
286
|
+
zIndex={zIndex}
|
|
168
287
|
// Keep portal typography when the page uses a different font.
|
|
169
288
|
floatingStyles={{fontFamily: 'var(--g-text-body-font-family)'}}
|
|
170
289
|
anchorElement={anchorElement}
|
|
171
290
|
onOpenChange={(_open, _event, reason) => {
|
|
172
291
|
if (reason === 'escape-key') {
|
|
173
292
|
onPopupEscapeKeyDown();
|
|
293
|
+
} else if (reason === 'outside-press') {
|
|
294
|
+
onPopupBlur();
|
|
174
295
|
}
|
|
175
296
|
}}
|
|
176
297
|
placement={placement}
|
|
@@ -179,11 +300,13 @@ export const HoverPopup = ({
|
|
|
179
300
|
returnFocus={false}
|
|
180
301
|
hasArrow
|
|
181
302
|
open={open && isAnchorVisible}
|
|
303
|
+
onTransitionOutComplete={() => setHoverClosing(false)}
|
|
182
304
|
// bigger offset for easier switching to neighbour nodes
|
|
183
305
|
// matches the default offset for popup with arrow out of a sense of beauty
|
|
184
306
|
offset={offset || {mainAxis: 12, crossAxis: 0}}
|
|
185
307
|
>
|
|
186
308
|
<div
|
|
309
|
+
ref={popupContent}
|
|
187
310
|
className={contentClassName}
|
|
188
311
|
onContextMenu={onPopupContextMenu}
|
|
189
312
|
onMouseEnter={onPopupMouseEnter}
|
|
@@ -191,7 +314,7 @@ export const HoverPopup = ({
|
|
|
191
314
|
onBlur={onPopupBlur}
|
|
192
315
|
>
|
|
193
316
|
<div className={YDB_POPOVER_CLASS_NAME}>
|
|
194
|
-
{renderPopupContent({onClose: closePopup})}
|
|
317
|
+
{renderPopupContent({onClose: closePopup, holdOpen})}
|
|
195
318
|
</div>
|
|
196
319
|
</div>
|
|
197
320
|
</Popup>
|