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,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
// Only the previously active popup needs updating when another one is entered.
|
|
4
|
+
const activePopups = new WeakMap<Document, VoidFunction>();
|
|
5
|
+
|
|
6
|
+
export function usePopupPriority() {
|
|
7
|
+
const [active, setActive] = React.useState(false);
|
|
8
|
+
const documentRef = React.useRef<Document>();
|
|
9
|
+
const deactivate = React.useCallback(() => setActive(false), []);
|
|
10
|
+
const activate = React.useCallback(
|
|
11
|
+
(element: HTMLElement | null) => {
|
|
12
|
+
if (!element) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const doc = element.ownerDocument;
|
|
16
|
+
const previous = activePopups.get(doc);
|
|
17
|
+
if (previous !== deactivate) {
|
|
18
|
+
previous?.();
|
|
19
|
+
activePopups.set(doc, deactivate);
|
|
20
|
+
}
|
|
21
|
+
documentRef.current = doc;
|
|
22
|
+
setActive(true);
|
|
23
|
+
},
|
|
24
|
+
[deactivate],
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
React.useEffect(
|
|
28
|
+
() => () => {
|
|
29
|
+
const doc = documentRef.current;
|
|
30
|
+
if (doc && activePopups.get(doc) === deactivate) {
|
|
31
|
+
activePopups.delete(doc);
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
[deactivate],
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
// Keep tooltips, menus and modal dialogs (Gravity UI's default 1000) above cards.
|
|
38
|
+
return {activate, zIndex: active ? 999 : 998};
|
|
39
|
+
}
|
|
@@ -3,14 +3,15 @@ import {DefinitionList, Flex, useTheme} from '@gravity-ui/uikit';
|
|
|
3
3
|
import type {TMemoryStats} from '../../types/api/nodes';
|
|
4
4
|
import {formatBytes} from '../../utils/bytesParsers';
|
|
5
5
|
import {cn} from '../../utils/cn';
|
|
6
|
-
import {GIGABYTE} from '../../utils/constants';
|
|
6
|
+
import {EMPTY_DATA_PLACEHOLDER, GIGABYTE} from '../../utils/constants';
|
|
7
|
+
import {getNodeMemory} from '../../utils/memory';
|
|
7
8
|
import type {FormatProgressViewerValues} from '../../utils/progress';
|
|
8
9
|
import {calculateProgressStatus} from '../../utils/progress';
|
|
9
|
-
import {isNumeric} from '../../utils/utils';
|
|
10
|
+
import {isNumeric, parseOptionalNonNegativeNumber} from '../../utils/utils';
|
|
10
11
|
import {HoverPopup} from '../HoverPopup/HoverPopup';
|
|
11
12
|
import {ProgressViewer} from '../ProgressViewer/ProgressViewer';
|
|
12
13
|
|
|
13
|
-
import {
|
|
14
|
+
import {getMemorySegments} from './utils';
|
|
14
15
|
|
|
15
16
|
import './MemoryViewer.scss';
|
|
16
17
|
|
|
@@ -38,6 +39,8 @@ const formatDetailedValues: FormatProgressViewerValues = (value, total) => {
|
|
|
38
39
|
|
|
39
40
|
export interface MemoryProgressViewerProps {
|
|
40
41
|
stats: TMemoryStats;
|
|
42
|
+
memoryUsed?: string;
|
|
43
|
+
memoryLimit?: string;
|
|
41
44
|
className?: string;
|
|
42
45
|
warningThreshold?: number;
|
|
43
46
|
dangerThreshold?: number;
|
|
@@ -47,29 +50,35 @@ export interface MemoryProgressViewerProps {
|
|
|
47
50
|
|
|
48
51
|
export function MemoryViewer({
|
|
49
52
|
stats,
|
|
53
|
+
memoryUsed,
|
|
54
|
+
memoryLimit,
|
|
50
55
|
percents,
|
|
51
56
|
formatValues,
|
|
52
57
|
className,
|
|
53
58
|
warningThreshold,
|
|
54
59
|
dangerThreshold,
|
|
55
60
|
}: MemoryProgressViewerProps) {
|
|
56
|
-
const memoryUsage
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
const {memoryUsed: memoryUsage, memoryLimit: capacity} = getNodeMemory({
|
|
62
|
+
MemoryStats: stats,
|
|
63
|
+
MemoryUsed: memoryUsed,
|
|
64
|
+
MemoryLimit: memoryLimit,
|
|
65
|
+
});
|
|
60
66
|
const theme = useTheme();
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
67
|
+
|
|
68
|
+
if (memoryUsage === undefined) {
|
|
69
|
+
return EMPTY_DATA_PLACEHOLDER;
|
|
70
|
+
}
|
|
71
|
+
const fillWidth =
|
|
72
|
+
capacity === undefined ? 0 : Math.min(100, Math.floor((memoryUsage / capacity) * 100));
|
|
64
73
|
let valueText: number | string | undefined = memoryUsage,
|
|
65
74
|
capacityText: number | string | undefined = capacity,
|
|
66
75
|
divider = '/';
|
|
67
|
-
if (percents) {
|
|
76
|
+
if (percents && capacity !== undefined) {
|
|
68
77
|
valueText = fillWidth + '%';
|
|
69
78
|
capacityText = '';
|
|
70
79
|
divider = '';
|
|
71
80
|
} else if (formatValues) {
|
|
72
|
-
[valueText, capacityText] = formatValues(
|
|
81
|
+
[valueText, capacityText] = formatValues(memoryUsage, capacity);
|
|
73
82
|
}
|
|
74
83
|
|
|
75
84
|
const renderContent = () => {
|
|
@@ -81,13 +90,17 @@ export function MemoryViewer({
|
|
|
81
90
|
};
|
|
82
91
|
|
|
83
92
|
const calculateMemoryShare = (segmentSize: number) => {
|
|
84
|
-
if (!memoryUsage) {
|
|
93
|
+
if (!memoryUsage || capacity === undefined) {
|
|
85
94
|
return 0;
|
|
86
95
|
}
|
|
87
|
-
return (segmentSize /
|
|
96
|
+
return (segmentSize / capacity) * 100;
|
|
88
97
|
};
|
|
89
98
|
|
|
90
|
-
|
|
99
|
+
// Without anonymous RSS, the backend's MemoryUsed excludes allocator caches.
|
|
100
|
+
const memorySegments = getMemorySegments(stats, memoryUsage, {
|
|
101
|
+
allocatorCachesIncludedInUsage: parseOptionalNonNegativeNumber(stats.AnonRss) !== undefined,
|
|
102
|
+
memoryLimit: capacity,
|
|
103
|
+
});
|
|
91
104
|
|
|
92
105
|
const status = calculateProgressStatus({
|
|
93
106
|
fillWidth,
|
|
@@ -135,9 +148,9 @@ export function MemoryViewer({
|
|
|
135
148
|
)}
|
|
136
149
|
>
|
|
137
150
|
<div className={b({theme, status}, className)}>
|
|
138
|
-
<div className={b('progress-container')}>
|
|
151
|
+
<div className={capacity === undefined ? undefined : b('progress-container')}>
|
|
139
152
|
{memorySegments
|
|
140
|
-
.filter(({isInfo}) => !isInfo)
|
|
153
|
+
.filter(({isInfo}) => !isInfo && capacity !== undefined)
|
|
141
154
|
.map((segment) => {
|
|
142
155
|
if (segment.value < MIN_VISIBLE_MEMORY_VALUE) {
|
|
143
156
|
return null;
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
"text_memtable": "MemTable",
|
|
6
6
|
"text_query-execution": "Query Execution",
|
|
7
7
|
"text_usage": "Usage",
|
|
8
|
-
"text_soft-limit": "Soft Limit",
|
|
9
|
-
"text_hard-limit": "Hard Limit",
|
|
8
|
+
"text_soft-limit": "Memory Controller Soft Limit",
|
|
9
|
+
"text_hard-limit": "Memory Controller Hard Limit",
|
|
10
10
|
"text_other": "Other",
|
|
11
|
-
"text_memory-details": "Memory Details"
|
|
11
|
+
"text_memory-details": "Memory Details",
|
|
12
|
+
"text_memory-limit": "Memory Limit"
|
|
12
13
|
}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import type {TMemoryStats} from '../../types/api/nodes';
|
|
2
|
-
import {isNumeric} from '../../utils/utils';
|
|
2
|
+
import {isNumeric, parseOptionalNonNegativeNumber} from '../../utils/utils';
|
|
3
3
|
|
|
4
4
|
import i18n from './i18n';
|
|
5
5
|
|
|
6
|
-
export function calculateAllocatedMemory(stats: TMemoryStats) {
|
|
7
|
-
const allocatedMemory = getMaybeNumber(stats.AllocatedMemory) || 0;
|
|
8
|
-
const allocatorCaches = getMaybeNumber(stats.AllocatorCachesMemory) || 0;
|
|
9
|
-
return String(allocatedMemory + allocatorCaches);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
6
|
function getMaybeNumber(value: string | number | undefined): number | undefined {
|
|
13
7
|
return isNumeric(value) ? parseFloat(String(value)) : undefined;
|
|
14
8
|
}
|
|
@@ -34,7 +28,14 @@ export function getMemorySegmentColor(key: string): string {
|
|
|
34
28
|
return MEMORY_SEGMENT_COLORS[key] || MEMORY_SEGMENT_COLORS['Other'];
|
|
35
29
|
}
|
|
36
30
|
|
|
37
|
-
export function getMemorySegments(
|
|
31
|
+
export function getMemorySegments(
|
|
32
|
+
stats: TMemoryStats,
|
|
33
|
+
memoryUsage: number,
|
|
34
|
+
{
|
|
35
|
+
allocatorCachesIncludedInUsage = true,
|
|
36
|
+
memoryLimit,
|
|
37
|
+
}: {allocatorCachesIncludedInUsage?: boolean; memoryLimit?: number} = {},
|
|
38
|
+
): MemorySegment[] {
|
|
38
39
|
const segments = [
|
|
39
40
|
{
|
|
40
41
|
label: i18n('text_shared-cache'),
|
|
@@ -61,12 +62,12 @@ export function getMemorySegments(stats: TMemoryStats, memoryUsage: number): Mem
|
|
|
61
62
|
label: i18n('text_allocator-caches'),
|
|
62
63
|
key: 'AllocatorCachesMemory',
|
|
63
64
|
value: getMaybeNumber(stats.AllocatorCachesMemory),
|
|
64
|
-
isInfo:
|
|
65
|
+
isInfo: !allocatorCachesIncludedInUsage,
|
|
65
66
|
},
|
|
66
67
|
];
|
|
67
68
|
|
|
68
69
|
const nonInfoSegments = segments.filter(
|
|
69
|
-
(segment) => segment.value !== undefined,
|
|
70
|
+
(segment) => !segment.isInfo && segment.value !== undefined,
|
|
70
71
|
) as MemorySegment[];
|
|
71
72
|
const sumNonInfoSegments = nonInfoSegments.reduce((acc, segment) => acc + segment.value, 0);
|
|
72
73
|
|
|
@@ -92,16 +93,22 @@ export function getMemorySegments(stats: TMemoryStats, memoryUsage: number): Mem
|
|
|
92
93
|
value: memoryUsage,
|
|
93
94
|
isInfo: true,
|
|
94
95
|
},
|
|
96
|
+
{
|
|
97
|
+
label: i18n('text_memory-limit'),
|
|
98
|
+
key: 'MemoryLimit',
|
|
99
|
+
value: memoryLimit,
|
|
100
|
+
isInfo: true,
|
|
101
|
+
},
|
|
95
102
|
{
|
|
96
103
|
label: i18n('text_soft-limit'),
|
|
97
104
|
key: 'SoftLimit',
|
|
98
|
-
value:
|
|
105
|
+
value: parseOptionalNonNegativeNumber(stats.SoftLimit) || undefined,
|
|
99
106
|
isInfo: true,
|
|
100
107
|
},
|
|
101
108
|
{
|
|
102
109
|
label: i18n('text_hard-limit'),
|
|
103
110
|
key: 'HardLimit',
|
|
104
|
-
value:
|
|
111
|
+
value: parseOptionalNonNegativeNumber(stats.HardLimit) || undefined,
|
|
105
112
|
isInfo: true,
|
|
106
113
|
},
|
|
107
114
|
);
|
|
@@ -1,263 +1,71 @@
|
|
|
1
1
|
import {Flex} from '@gravity-ui/uikit';
|
|
2
2
|
|
|
3
3
|
import {useBlobStorageCapacityMetricsEnabled} from '../../store/reducers/capabilities/hooks';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {formatStorageValuesToGb} from '../../utils/dataFormatters/dataFormatters';
|
|
7
|
-
import {createPDiskDeveloperUILink, useHasDeveloperUi} from '../../utils/developerUI/developerUI';
|
|
8
|
-
import {formatPDiskType} from '../../utils/disks/getPDiskType';
|
|
4
|
+
import {cn} from '../../utils/cn';
|
|
5
|
+
import {EMPTY_DATA_PLACEHOLDER} from '../../utils/constants';
|
|
9
6
|
import type {PreparedPDisk} from '../../utils/disks/types';
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {ProgressViewer} from '../ProgressViewer/ProgressViewer';
|
|
16
|
-
import {StatusIcon} from '../StatusIcon/StatusIcon';
|
|
7
|
+
import {formatMetricPercent} from '../../utils/storageMetrics';
|
|
8
|
+
import {CopyableValue} from '../CopyableValue/CopyableValue';
|
|
9
|
+
import {getPDiskCapacityItems} from '../DiskCapacityInfo/DiskCapacityInfo';
|
|
10
|
+
import type {YDBDefinitionListItem} from '../YDBDefinitionList/YDBDefinitionList';
|
|
11
|
+
import {YDBDefinitionList} from '../YDBDefinitionList/YDBDefinitionList';
|
|
17
12
|
|
|
13
|
+
import {getPDiskLogItems, getPDiskRuntimeItems} from './getPDiskDetails';
|
|
18
14
|
import {pDiskInfoKeyset} from './i18n';
|
|
19
15
|
|
|
20
|
-
|
|
21
|
-
pDisk?: T;
|
|
22
|
-
nodeId?: number | string | null;
|
|
23
|
-
withPDiskPageLink?: boolean;
|
|
24
|
-
hasDeveloperUi?: boolean;
|
|
25
|
-
capacityMetricsEnabled?: boolean;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// eslint-disable-next-line complexity
|
|
29
|
-
function getPDiskInfo<T extends PreparedPDisk>({
|
|
30
|
-
pDisk,
|
|
31
|
-
nodeId,
|
|
32
|
-
withPDiskPageLink,
|
|
33
|
-
hasDeveloperUi,
|
|
34
|
-
capacityMetricsEnabled,
|
|
35
|
-
}: GetPDiskInfoOptions<T>) {
|
|
36
|
-
const {
|
|
37
|
-
PDiskId,
|
|
38
|
-
Path,
|
|
39
|
-
Guid,
|
|
40
|
-
Category,
|
|
41
|
-
Type,
|
|
42
|
-
Device,
|
|
43
|
-
Realtime,
|
|
44
|
-
State,
|
|
45
|
-
SerialNumber,
|
|
46
|
-
TotalSize,
|
|
47
|
-
AllocatedSize,
|
|
48
|
-
AllocatedPercent,
|
|
49
|
-
StatusV2,
|
|
50
|
-
NumActiveSlots,
|
|
51
|
-
ExpectedSlotCount,
|
|
52
|
-
LogUsedSize,
|
|
53
|
-
LogTotalSize,
|
|
54
|
-
SystemSize,
|
|
55
|
-
SharedWithOs,
|
|
56
|
-
} = pDisk || {};
|
|
16
|
+
import './PDiskInfo.scss';
|
|
57
17
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
if (valueIsDefined(Category)) {
|
|
61
|
-
generalInfo.push({label: pDiskInfoKeyset('type'), value: formatPDiskType(Type)});
|
|
62
|
-
}
|
|
63
|
-
if (valueIsDefined(Path)) {
|
|
64
|
-
generalInfo.push({label: pDiskInfoKeyset('path'), value: Path});
|
|
65
|
-
}
|
|
66
|
-
if (valueIsDefined(Guid)) {
|
|
67
|
-
generalInfo.push({label: pDiskInfoKeyset('guid'), value: Guid});
|
|
68
|
-
}
|
|
69
|
-
// SerialNumber could be an empty string ""
|
|
70
|
-
if (SerialNumber) {
|
|
71
|
-
generalInfo.push({
|
|
72
|
-
label: pDiskInfoKeyset('serial-number'),
|
|
73
|
-
value: SerialNumber,
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
if (SharedWithOs) {
|
|
77
|
-
generalInfo.push({
|
|
78
|
-
label: pDiskInfoKeyset('shared-with-os'),
|
|
79
|
-
value: pDiskInfoKeyset('yes'),
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const statusInfo: InfoViewerItem[] = [];
|
|
84
|
-
|
|
85
|
-
if (valueIsDefined(StatusV2)) {
|
|
86
|
-
statusInfo.push({label: pDiskInfoKeyset('drive-status'), value: StatusV2});
|
|
87
|
-
}
|
|
88
|
-
if (valueIsDefined(State)) {
|
|
89
|
-
statusInfo.push({label: pDiskInfoKeyset('state'), value: State});
|
|
90
|
-
}
|
|
91
|
-
if (valueIsDefined(Device)) {
|
|
92
|
-
statusInfo.push({
|
|
93
|
-
label: pDiskInfoKeyset('device'),
|
|
94
|
-
value: <StatusIcon status={Device} />,
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
if (valueIsDefined(Realtime)) {
|
|
98
|
-
statusInfo.push({
|
|
99
|
-
label: pDiskInfoKeyset('realtime'),
|
|
100
|
-
value: <StatusIcon status={Realtime} />,
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const additionalInfo: InfoViewerItem[] = [];
|
|
105
|
-
|
|
106
|
-
const shouldDisplayLinks =
|
|
107
|
-
(withPDiskPageLink || hasDeveloperUi) && valueIsDefined(PDiskId) && valueIsDefined(nodeId);
|
|
108
|
-
|
|
109
|
-
if (shouldDisplayLinks) {
|
|
110
|
-
const pDiskInternalViewerPath = createPDiskDeveloperUILink({
|
|
111
|
-
nodeId,
|
|
112
|
-
pDiskId: PDiskId,
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
additionalInfo.push({
|
|
116
|
-
label: pDiskInfoKeyset('links'),
|
|
117
|
-
value: (
|
|
118
|
-
<Flex wrap="wrap" gap={2}>
|
|
119
|
-
{withPDiskPageLink && <PDiskPageLink pDiskId={PDiskId} nodeId={nodeId} />}
|
|
120
|
-
{hasDeveloperUi && (
|
|
121
|
-
<LinkWithIcon
|
|
122
|
-
title={pDiskInfoKeyset('developer-ui')}
|
|
123
|
-
url={pDiskInternalViewerPath}
|
|
124
|
-
/>
|
|
125
|
-
)}
|
|
126
|
-
</Flex>
|
|
127
|
-
),
|
|
128
|
-
});
|
|
129
|
-
}
|
|
18
|
+
const b = cn('ydb-pdisk-info');
|
|
130
19
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
withUsage: true,
|
|
136
|
-
withCapacityAlert: false,
|
|
137
|
-
});
|
|
138
|
-
const slotSizeItem = capacityItems.find(({id}) => id === 'slot-size-in-units');
|
|
139
|
-
const runtimeCapacityItems = capacityItems.filter(({id}) => id !== 'slot-size-in-units');
|
|
140
|
-
|
|
141
|
-
if (slotSizeItem) {
|
|
142
|
-
configurationInfo.push(...toInfoViewerItems([slotSizeItem]));
|
|
143
|
-
}
|
|
144
|
-
configurationInfo.push(...additionalInfo);
|
|
145
|
-
runtimeInfo.push(...toInfoViewerItems(runtimeCapacityItems));
|
|
146
|
-
|
|
147
|
-
if (valueIsDefined(LogUsedSize) && valueIsDefined(LogTotalSize)) {
|
|
148
|
-
runtimeInfo.push({
|
|
149
|
-
label: pDiskInfoKeyset('log-size'),
|
|
150
|
-
value: (
|
|
151
|
-
<ProgressViewer
|
|
152
|
-
value={LogUsedSize}
|
|
153
|
-
capacity={LogTotalSize}
|
|
154
|
-
formatValues={formatStorageValuesToGb}
|
|
155
|
-
/>
|
|
156
|
-
),
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
if (valueIsDefined(SystemSize)) {
|
|
160
|
-
runtimeInfo.push({
|
|
161
|
-
label: pDiskInfoKeyset('system-size'),
|
|
162
|
-
value: formatBytes({value: SystemSize}),
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
return [configurationInfo, runtimeInfo];
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
const spaceInfo: InfoViewerItem[] = [];
|
|
20
|
+
interface PDiskInfoProps {
|
|
21
|
+
pDisk?: PreparedPDisk;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
170
24
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
:
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
spaceInfo.push({
|
|
181
|
-
label: pDiskInfoKeyset('usage'),
|
|
182
|
-
value: `${AllocatedPercent}%`,
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
if (valueIsDefined(NumActiveSlots) && valueIsDefined(ExpectedSlotCount)) {
|
|
186
|
-
spaceInfo.push({
|
|
187
|
-
label: pDiskInfoKeyset('slots'),
|
|
188
|
-
value: <ProgressViewer value={NumActiveSlots} capacity={ExpectedSlotCount} />,
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
if (valueIsDefined(LogUsedSize) && valueIsDefined(LogTotalSize)) {
|
|
192
|
-
spaceInfo.push({
|
|
193
|
-
label: pDiskInfoKeyset('log-size'),
|
|
194
|
-
value: (
|
|
195
|
-
<ProgressViewer
|
|
196
|
-
value={LogUsedSize}
|
|
197
|
-
capacity={LogTotalSize}
|
|
198
|
-
formatValues={formatStorageValuesToGb}
|
|
199
|
-
/>
|
|
200
|
-
),
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
if (valueIsDefined(SystemSize)) {
|
|
204
|
-
spaceInfo.push({
|
|
205
|
-
label: pDiskInfoKeyset('system-size'),
|
|
206
|
-
value: formatBytes({value: SystemSize}),
|
|
25
|
+
function getPageCapacityItems(data: PreparedPDisk, capacityMetricsEnabled: boolean) {
|
|
26
|
+
const items = getPDiskCapacityItems(data, {useWhiteboardSize: capacityMetricsEnabled}).filter(
|
|
27
|
+
({id}) => capacityMetricsEnabled || id === 'space' || id === 'slots',
|
|
28
|
+
);
|
|
29
|
+
if (!capacityMetricsEnabled) {
|
|
30
|
+
items.splice(1, 0, {
|
|
31
|
+
id: 'usage',
|
|
32
|
+
name: pDiskInfoKeyset('usage'),
|
|
33
|
+
content: formatMetricPercent(data.AllocatedPercent, 2),
|
|
207
34
|
});
|
|
208
35
|
}
|
|
209
|
-
|
|
210
|
-
return [generalInfo, statusInfo, spaceInfo, additionalInfo];
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
interface PDiskInfoProps<T extends PreparedPDisk> extends GetPDiskInfoOptions<T> {
|
|
214
|
-
className?: string;
|
|
36
|
+
return [...items, ...getPDiskLogItems(data)];
|
|
215
37
|
}
|
|
216
38
|
|
|
217
|
-
export function PDiskInfo
|
|
218
|
-
pDisk,
|
|
219
|
-
nodeId,
|
|
220
|
-
withPDiskPageLink,
|
|
221
|
-
className,
|
|
222
|
-
}: PDiskInfoProps<T>) {
|
|
223
|
-
const hasDeveloperUi = useHasDeveloperUi();
|
|
39
|
+
export function PDiskInfo({pDisk = {}, className}: PDiskInfoProps) {
|
|
224
40
|
const capacityMetricsEnabled = useBlobStorageCapacityMetricsEnabled();
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
pDisk,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
<InfoViewer info={configurationInfo} renderEmptyState={() => null} />
|
|
241
|
-
</Flex>
|
|
242
|
-
<Flex direction="column" gap={2} width={500}>
|
|
243
|
-
<InfoViewer info={runtimeInfo} renderEmptyState={() => null} />
|
|
244
|
-
</Flex>
|
|
245
|
-
</Flex>
|
|
246
|
-
);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
const [generalInfo, statusInfo, spaceInfo, additionalInfo] = infoGroups;
|
|
41
|
+
const identityItems = [
|
|
42
|
+
{name: pDiskInfoKeyset('guid'), value: pDisk.Guid},
|
|
43
|
+
{name: pDiskInfoKeyset('serial-number'), value: pDisk.SerialNumber},
|
|
44
|
+
].map(({name, value}) => ({
|
|
45
|
+
name,
|
|
46
|
+
content: (
|
|
47
|
+
<CopyableValue copyText={value || undefined} fieldName={name}>
|
|
48
|
+
<span className={b('identity-value')}>{value || EMPTY_DATA_PLACEHOLDER}</span>
|
|
49
|
+
</CopyableValue>
|
|
50
|
+
),
|
|
51
|
+
}));
|
|
52
|
+
const runtimeItems: YDBDefinitionListItem[] = [
|
|
53
|
+
...getPDiskRuntimeItems(pDisk),
|
|
54
|
+
...identityItems,
|
|
55
|
+
];
|
|
250
56
|
|
|
251
57
|
return (
|
|
252
|
-
<Flex className={className} gap={
|
|
253
|
-
<
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
58
|
+
<Flex className={b(null, className)} gap={6} gapRow={3} wrap="wrap" qa="pdisk-page-info">
|
|
59
|
+
<YDBDefinitionList
|
|
60
|
+
items={runtimeItems}
|
|
61
|
+
nameMaxWidth={200}
|
|
62
|
+
wrapperClassName={b('column')}
|
|
63
|
+
/>
|
|
64
|
+
<YDBDefinitionList
|
|
65
|
+
items={getPageCapacityItems(pDisk, capacityMetricsEnabled)}
|
|
66
|
+
nameMaxWidth={200}
|
|
67
|
+
wrapperClassName={b('column')}
|
|
68
|
+
/>
|
|
261
69
|
</Flex>
|
|
262
70
|
);
|
|
263
71
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {Flex, Progress} from '@gravity-ui/uikit';
|
|
2
|
+
|
|
3
|
+
import {cn} from '../../utils/cn';
|
|
4
|
+
import {formatStorageMetricPair} from '../../utils/storageMetrics';
|
|
5
|
+
import {parseOptionalNonNegativeNumber} from '../../utils/utils';
|
|
6
|
+
|
|
7
|
+
import {pDiskInfoKeyset as i18n} from './i18n';
|
|
8
|
+
|
|
9
|
+
import './PDiskLogSize.scss';
|
|
10
|
+
|
|
11
|
+
const b = cn('ydb-pdisk-log-size');
|
|
12
|
+
|
|
13
|
+
export function PDiskLogSize({used, total}: {used?: string; total?: string}) {
|
|
14
|
+
const usedSize = parseOptionalNonNegativeNumber(used);
|
|
15
|
+
const totalSize = parseOptionalNonNegativeNumber(total);
|
|
16
|
+
const percentage =
|
|
17
|
+
usedSize !== undefined && totalSize !== undefined && totalSize > 0
|
|
18
|
+
? Math.min(100, (usedSize / totalSize) * 100)
|
|
19
|
+
: undefined;
|
|
20
|
+
|
|
21
|
+
if (percentage === undefined) {
|
|
22
|
+
return formatStorageMetricPair(usedSize, totalSize, 2);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<Flex
|
|
27
|
+
gap={1}
|
|
28
|
+
alignItems="center"
|
|
29
|
+
className={b()}
|
|
30
|
+
role="meter"
|
|
31
|
+
aria-label={i18n('log-size')}
|
|
32
|
+
aria-valuemin={0}
|
|
33
|
+
aria-valuemax={100}
|
|
34
|
+
aria-valuenow={percentage}
|
|
35
|
+
aria-valuetext={formatStorageMetricPair(usedSize, totalSize, 2)}
|
|
36
|
+
>
|
|
37
|
+
<Progress className={b('progress')} value={percentage} theme="success" size="s" />
|
|
38
|
+
<span>{formatStorageMetricPair(usedSize, totalSize, 2)}</span>
|
|
39
|
+
</Flex>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {formatBytes} from '../../utils/bytesParsers';
|
|
2
|
+
import {EMPTY_DATA_PLACEHOLDER} from '../../utils/constants';
|
|
3
|
+
import type {DiskDetailItem} from '../../utils/disks/diskInfo/getDiskLocationItems';
|
|
4
|
+
import type {PreparedPDisk} from '../../utils/disks/types';
|
|
5
|
+
import {parseOptionalNonNegativeNumber} from '../../utils/utils';
|
|
6
|
+
import {DiskFlagLabel} from '../DiskStatus/DiskStatus';
|
|
7
|
+
|
|
8
|
+
import {PDiskLogSize} from './PDiskLogSize';
|
|
9
|
+
import {pDiskInfoKeyset as i18n} from './i18n';
|
|
10
|
+
|
|
11
|
+
export function getPDiskRuntimeItems(data: PreparedPDisk): DiskDetailItem[] {
|
|
12
|
+
return [
|
|
13
|
+
{id: 'device', name: i18n('device'), content: <DiskFlagLabel flag={data.Device} />},
|
|
14
|
+
{id: 'realtime', name: i18n('realtime'), content: <DiskFlagLabel flag={data.Realtime} />},
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function getPDiskLogItems(data: PreparedPDisk): DiskDetailItem[] {
|
|
19
|
+
const systemSize = parseOptionalNonNegativeNumber(data.SystemSize);
|
|
20
|
+
return [
|
|
21
|
+
{
|
|
22
|
+
id: 'log-size',
|
|
23
|
+
name: i18n('log-size'),
|
|
24
|
+
content: <PDiskLogSize used={data.LogUsedSize} total={data.LogTotalSize} />,
|
|
25
|
+
note: i18n('context_log-size'),
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 'system-size',
|
|
29
|
+
name: i18n('system-size'),
|
|
30
|
+
content:
|
|
31
|
+
systemSize === undefined
|
|
32
|
+
? EMPTY_DATA_PLACEHOLDER
|
|
33
|
+
: formatBytes({value: systemSize, fixedDecimalPlaces: 2}),
|
|
34
|
+
note: i18n('context_system-size'),
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
}
|