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
|
@@ -1,152 +1,40 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Flex } from '@gravity-ui/uikit';
|
|
3
3
|
import { useBlobStorageCapacityMetricsEnabled } from '../../store/reducers/capabilities/hooks';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { LinkWithIcon } from '../LinkWithIcon/LinkWithIcon';
|
|
12
|
-
import { PDiskPageLink } from '../PDiskPageLink/PDiskPageLink';
|
|
13
|
-
import { ProgressViewer } from '../ProgressViewer/ProgressViewer';
|
|
14
|
-
import { StatusIcon } from '../StatusIcon/StatusIcon';
|
|
4
|
+
import { cn } from '../../utils/cn';
|
|
5
|
+
import { EMPTY_DATA_PLACEHOLDER } from '../../utils/constants';
|
|
6
|
+
import { formatMetricPercent } from '../../utils/storageMetrics';
|
|
7
|
+
import { CopyableValue } from '../CopyableValue/CopyableValue';
|
|
8
|
+
import { getPDiskCapacityItems } from '../DiskCapacityInfo/DiskCapacityInfo';
|
|
9
|
+
import { YDBDefinitionList } from '../YDBDefinitionList/YDBDefinitionList';
|
|
10
|
+
import { getPDiskLogItems, getPDiskRuntimeItems } from './getPDiskDetails';
|
|
15
11
|
import { pDiskInfoKeyset } from './i18n';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
// SerialNumber could be an empty string ""
|
|
30
|
-
if (SerialNumber) {
|
|
31
|
-
generalInfo.push({
|
|
32
|
-
label: pDiskInfoKeyset('serial-number'),
|
|
33
|
-
value: SerialNumber,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
if (SharedWithOs) {
|
|
37
|
-
generalInfo.push({
|
|
38
|
-
label: pDiskInfoKeyset('shared-with-os'),
|
|
39
|
-
value: pDiskInfoKeyset('yes'),
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
const statusInfo = [];
|
|
43
|
-
if (valueIsDefined(StatusV2)) {
|
|
44
|
-
statusInfo.push({ label: pDiskInfoKeyset('drive-status'), value: StatusV2 });
|
|
45
|
-
}
|
|
46
|
-
if (valueIsDefined(State)) {
|
|
47
|
-
statusInfo.push({ label: pDiskInfoKeyset('state'), value: State });
|
|
48
|
-
}
|
|
49
|
-
if (valueIsDefined(Device)) {
|
|
50
|
-
statusInfo.push({
|
|
51
|
-
label: pDiskInfoKeyset('device'),
|
|
52
|
-
value: _jsx(StatusIcon, { status: Device }),
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
if (valueIsDefined(Realtime)) {
|
|
56
|
-
statusInfo.push({
|
|
57
|
-
label: pDiskInfoKeyset('realtime'),
|
|
58
|
-
value: _jsx(StatusIcon, { status: Realtime }),
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
const additionalInfo = [];
|
|
62
|
-
const shouldDisplayLinks = (withPDiskPageLink || hasDeveloperUi) && valueIsDefined(PDiskId) && valueIsDefined(nodeId);
|
|
63
|
-
if (shouldDisplayLinks) {
|
|
64
|
-
const pDiskInternalViewerPath = createPDiskDeveloperUILink({
|
|
65
|
-
nodeId,
|
|
66
|
-
pDiskId: PDiskId,
|
|
67
|
-
});
|
|
68
|
-
additionalInfo.push({
|
|
69
|
-
label: pDiskInfoKeyset('links'),
|
|
70
|
-
value: (_jsxs(Flex, { wrap: "wrap", gap: 2, children: [withPDiskPageLink && _jsx(PDiskPageLink, { pDiskId: PDiskId, nodeId: nodeId }), hasDeveloperUi && (_jsx(LinkWithIcon, { title: pDiskInfoKeyset('developer-ui'), url: pDiskInternalViewerPath }))] })),
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
if (capacityMetricsEnabled) {
|
|
74
|
-
const configurationInfo = [...generalInfo];
|
|
75
|
-
const runtimeInfo = [...statusInfo];
|
|
76
|
-
const capacityItems = getPDiskCapacityInfoItems(pDisk, {
|
|
77
|
-
withUsage: true,
|
|
78
|
-
withCapacityAlert: false,
|
|
79
|
-
});
|
|
80
|
-
const slotSizeItem = capacityItems.find(({ id }) => id === 'slot-size-in-units');
|
|
81
|
-
const runtimeCapacityItems = capacityItems.filter(({ id }) => id !== 'slot-size-in-units');
|
|
82
|
-
if (slotSizeItem) {
|
|
83
|
-
configurationInfo.push(...toInfoViewerItems([slotSizeItem]));
|
|
84
|
-
}
|
|
85
|
-
configurationInfo.push(...additionalInfo);
|
|
86
|
-
runtimeInfo.push(...toInfoViewerItems(runtimeCapacityItems));
|
|
87
|
-
if (valueIsDefined(LogUsedSize) && valueIsDefined(LogTotalSize)) {
|
|
88
|
-
runtimeInfo.push({
|
|
89
|
-
label: pDiskInfoKeyset('log-size'),
|
|
90
|
-
value: (_jsx(ProgressViewer, { value: LogUsedSize, capacity: LogTotalSize, formatValues: formatStorageValuesToGb })),
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
if (valueIsDefined(SystemSize)) {
|
|
94
|
-
runtimeInfo.push({
|
|
95
|
-
label: pDiskInfoKeyset('system-size'),
|
|
96
|
-
value: formatBytes({ value: SystemSize }),
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
return [configurationInfo, runtimeInfo];
|
|
100
|
-
}
|
|
101
|
-
const spaceInfo = [];
|
|
102
|
-
const hasSpaceData = Number.isFinite(Number(AllocatedSize)) && Number.isFinite(Number(TotalSize));
|
|
103
|
-
spaceInfo.push({
|
|
104
|
-
label: pDiskInfoKeyset('space'),
|
|
105
|
-
value: hasSpaceData
|
|
106
|
-
? formatStorageValuesToGb(Number(AllocatedSize), Number(TotalSize)).join(' / ')
|
|
107
|
-
: pDiskInfoKeyset('value_no-data'),
|
|
108
|
-
});
|
|
109
|
-
if (!isNaN(Number(AllocatedPercent))) {
|
|
110
|
-
spaceInfo.push({
|
|
111
|
-
label: pDiskInfoKeyset('usage'),
|
|
112
|
-
value: `${AllocatedPercent}%`,
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
if (valueIsDefined(NumActiveSlots) && valueIsDefined(ExpectedSlotCount)) {
|
|
116
|
-
spaceInfo.push({
|
|
117
|
-
label: pDiskInfoKeyset('slots'),
|
|
118
|
-
value: _jsx(ProgressViewer, { value: NumActiveSlots, capacity: ExpectedSlotCount }),
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
if (valueIsDefined(LogUsedSize) && valueIsDefined(LogTotalSize)) {
|
|
122
|
-
spaceInfo.push({
|
|
123
|
-
label: pDiskInfoKeyset('log-size'),
|
|
124
|
-
value: (_jsx(ProgressViewer, { value: LogUsedSize, capacity: LogTotalSize, formatValues: formatStorageValuesToGb })),
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
if (valueIsDefined(SystemSize)) {
|
|
128
|
-
spaceInfo.push({
|
|
129
|
-
label: pDiskInfoKeyset('system-size'),
|
|
130
|
-
value: formatBytes({ value: SystemSize }),
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
return [generalInfo, statusInfo, spaceInfo, additionalInfo];
|
|
12
|
+
import './PDiskInfo.scss';
|
|
13
|
+
const b = cn('ydb-pdisk-info');
|
|
14
|
+
function getPageCapacityItems(data, capacityMetricsEnabled) {
|
|
15
|
+
const items = getPDiskCapacityItems(data, { useWhiteboardSize: capacityMetricsEnabled }).filter(({ id }) => capacityMetricsEnabled || id === 'space' || id === 'slots');
|
|
16
|
+
if (!capacityMetricsEnabled) {
|
|
17
|
+
items.splice(1, 0, {
|
|
18
|
+
id: 'usage',
|
|
19
|
+
name: pDiskInfoKeyset('usage'),
|
|
20
|
+
content: formatMetricPercent(data.AllocatedPercent, 2),
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return [...items, ...getPDiskLogItems(data)];
|
|
134
24
|
}
|
|
135
|
-
export function PDiskInfo({ pDisk
|
|
136
|
-
const hasDeveloperUi = useHasDeveloperUi();
|
|
25
|
+
export function PDiskInfo({ pDisk = {}, className }) {
|
|
137
26
|
const capacityMetricsEnabled = useBlobStorageCapacityMetricsEnabled();
|
|
138
|
-
const
|
|
139
|
-
pDisk,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
return (_jsxs(Flex, { className: className, gap: 2, direction: "row", wrap: true, children: [_jsxs(Flex, { direction: "column", gap: 2, width: 500, children: [_jsx(InfoViewer, { info: generalInfo, renderEmptyState: () => null }), _jsx(InfoViewer, { info: spaceInfo, renderEmptyState: () => null })] }), _jsxs(Flex, { direction: "column", gap: 2, width: 500, children: [_jsx(InfoViewer, { info: statusInfo, renderEmptyState: () => null }), _jsx(InfoViewer, { info: additionalInfo, renderEmptyState: () => null })] })] }));
|
|
27
|
+
const identityItems = [
|
|
28
|
+
{ name: pDiskInfoKeyset('guid'), value: pDisk.Guid },
|
|
29
|
+
{ name: pDiskInfoKeyset('serial-number'), value: pDisk.SerialNumber },
|
|
30
|
+
].map(({ name, value }) => ({
|
|
31
|
+
name,
|
|
32
|
+
content: (_jsx(CopyableValue, { copyText: value || undefined, fieldName: name, children: _jsx("span", { className: b('identity-value'), children: value || EMPTY_DATA_PLACEHOLDER }) })),
|
|
33
|
+
}));
|
|
34
|
+
const runtimeItems = [
|
|
35
|
+
...getPDiskRuntimeItems(pDisk),
|
|
36
|
+
...identityItems,
|
|
37
|
+
];
|
|
38
|
+
return (_jsxs(Flex, { className: b(null, className), gap: 6, gapRow: 3, wrap: "wrap", qa: "pdisk-page-info", children: [_jsx(YDBDefinitionList, { items: runtimeItems, nameMaxWidth: 200, wrapperClassName: b('column') }), _jsx(YDBDefinitionList, { items: getPageCapacityItems(pDisk, capacityMetricsEnabled), nameMaxWidth: 200, wrapperClassName: b('column') })] }));
|
|
151
39
|
}
|
|
152
40
|
//# sourceMappingURL=PDiskInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PDiskInfo.js","sourceRoot":"","sources":["../../../src/components/PDiskInfo/PDiskInfo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAC,oCAAoC,EAAC,MAAM,yCAAyC,CAAC;AAC7F,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"PDiskInfo.js","sourceRoot":"","sources":["../../../src/components/PDiskInfo/PDiskInfo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAC,oCAAoC,EAAC,MAAM,yCAAyC,CAAC;AAC7F,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAC,sBAAsB,EAAC,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EAAC,mBAAmB,EAAC,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAC,aAAa,EAAC,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAC,qBAAqB,EAAC,MAAM,sCAAsC,CAAC;AAE3E,OAAO,EAAC,iBAAiB,EAAC,MAAM,wCAAwC,CAAC;AAEzE,OAAO,EAAC,gBAAgB,EAAE,oBAAoB,EAAC,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAC,eAAe,EAAC,MAAM,QAAQ,CAAC;AAEvC,OAAO,kBAAkB,CAAC;AAE1B,MAAM,CAAC,GAAG,EAAE,CAAC,gBAAgB,CAAC,CAAC;AAO/B,SAAS,oBAAoB,CAAC,IAAmB,EAAE,sBAA+B;IAC9E,MAAM,KAAK,GAAG,qBAAqB,CAAC,IAAI,EAAE,EAAC,iBAAiB,EAAE,sBAAsB,EAAC,CAAC,CAAC,MAAM,CACzF,CAAC,EAAC,EAAE,EAAC,EAAE,EAAE,CAAC,sBAAsB,IAAI,EAAE,KAAK,OAAO,IAAI,EAAE,KAAK,OAAO,CACvE,CAAC;IACF,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAC1B,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE;YACf,EAAE,EAAE,OAAO;YACX,IAAI,EAAE,eAAe,CAAC,OAAO,CAAC;YAC9B,OAAO,EAAE,mBAAmB,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;SACzD,CAAC,CAAC;IACP,CAAC;IACD,OAAO,CAAC,GAAG,KAAK,EAAE,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,EAAC,KAAK,GAAG,EAAE,EAAE,SAAS,EAAiB;IAC7D,MAAM,sBAAsB,GAAG,oCAAoC,EAAE,CAAC;IACtE,MAAM,aAAa,GAAG;QAClB,EAAC,IAAI,EAAE,eAAe,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAC;QAClD,EAAC,IAAI,EAAE,eAAe,CAAC,eAAe,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,YAAY,EAAC;KACtE,CAAC,GAAG,CAAC,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,EAAE,EAAE,CAAC,CAAC;QACtB,IAAI;QACJ,OAAO,EAAE,CACL,KAAC,aAAa,IAAC,QAAQ,EAAE,KAAK,IAAI,SAAS,EAAE,SAAS,EAAE,IAAI,YACxD,eAAM,SAAS,EAAE,CAAC,CAAC,gBAAgB,CAAC,YAAG,KAAK,IAAI,sBAAsB,GAAQ,GAClE,CACnB;KACJ,CAAC,CAAC,CAAC;IACJ,MAAM,YAAY,GAA4B;QAC1C,GAAG,oBAAoB,CAAC,KAAK,CAAC;QAC9B,GAAG,aAAa;KACnB,CAAC;IAEF,OAAO,CACH,MAAC,IAAI,IAAC,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAC,MAAM,EAAC,EAAE,EAAC,iBAAiB,aACpF,KAAC,iBAAiB,IACd,KAAK,EAAE,YAAY,EACnB,YAAY,EAAE,GAAG,EACjB,gBAAgB,EAAE,CAAC,CAAC,QAAQ,CAAC,GAC/B,EACF,KAAC,iBAAiB,IACd,KAAK,EAAE,oBAAoB,CAAC,KAAK,EAAE,sBAAsB,CAAC,EAC1D,YAAY,EAAE,GAAG,EACjB,gBAAgB,EAAE,CAAC,CAAC,QAAQ,CAAC,GAC/B,IACC,CACV,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Flex, Progress } from '@gravity-ui/uikit';
|
|
3
|
+
import { cn } from '../../utils/cn';
|
|
4
|
+
import { formatStorageMetricPair } from '../../utils/storageMetrics';
|
|
5
|
+
import { parseOptionalNonNegativeNumber } from '../../utils/utils';
|
|
6
|
+
import { pDiskInfoKeyset as i18n } from './i18n';
|
|
7
|
+
import './PDiskLogSize.scss';
|
|
8
|
+
const b = cn('ydb-pdisk-log-size');
|
|
9
|
+
export function PDiskLogSize({ used, total }) {
|
|
10
|
+
const usedSize = parseOptionalNonNegativeNumber(used);
|
|
11
|
+
const totalSize = parseOptionalNonNegativeNumber(total);
|
|
12
|
+
const percentage = usedSize !== undefined && totalSize !== undefined && totalSize > 0
|
|
13
|
+
? Math.min(100, (usedSize / totalSize) * 100)
|
|
14
|
+
: undefined;
|
|
15
|
+
if (percentage === undefined) {
|
|
16
|
+
return formatStorageMetricPair(usedSize, totalSize, 2);
|
|
17
|
+
}
|
|
18
|
+
return (_jsxs(Flex, { gap: 1, alignItems: "center", className: b(), role: "meter", "aria-label": i18n('log-size'), "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": percentage, "aria-valuetext": formatStorageMetricPair(usedSize, totalSize, 2), children: [_jsx(Progress, { className: b('progress'), value: percentage, theme: "success", size: "s" }), _jsx("span", { children: formatStorageMetricPair(usedSize, totalSize, 2) })] }));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=PDiskLogSize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PDiskLogSize.js","sourceRoot":"","sources":["../../../src/components/PDiskInfo/PDiskLogSize.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAC,uBAAuB,EAAC,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAC,8BAA8B,EAAC,MAAM,mBAAmB,CAAC;AAEjE,OAAO,EAAC,eAAe,IAAI,IAAI,EAAC,MAAM,QAAQ,CAAC;AAE/C,OAAO,qBAAqB,CAAC;AAE7B,MAAM,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC,CAAC;AAEnC,MAAM,UAAU,YAAY,CAAC,EAAC,IAAI,EAAE,KAAK,EAAkC;IACvE,MAAM,QAAQ,GAAG,8BAA8B,CAAC,IAAI,CAAC,CAAC;IACtD,MAAM,SAAS,GAAG,8BAA8B,CAAC,KAAK,CAAC,CAAC;IACxD,MAAM,UAAU,GACZ,QAAQ,KAAK,SAAS,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,GAAG,CAAC;QAC9D,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,QAAQ,GAAG,SAAS,CAAC,GAAG,GAAG,CAAC;QAC7C,CAAC,CAAC,SAAS,CAAC;IAEpB,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,uBAAuB,CAAC,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,CACH,MAAC,IAAI,IACD,GAAG,EAAE,CAAC,EACN,UAAU,EAAC,QAAQ,EACnB,SAAS,EAAE,CAAC,EAAE,EACd,IAAI,EAAC,OAAO,gBACA,IAAI,CAAC,UAAU,CAAC,mBACb,CAAC,mBACD,GAAG,mBACH,UAAU,oBACT,uBAAuB,CAAC,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC,aAE/D,KAAC,QAAQ,IAAC,SAAS,EAAE,CAAC,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAC,SAAS,EAAC,IAAI,EAAC,GAAG,GAAG,EAClF,yBAAO,uBAAuB,CAAC,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC,GAAQ,IAC3D,CACV,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DiskDetailItem } from '../../utils/disks/diskInfo/getDiskLocationItems';
|
|
2
|
+
import type { PreparedPDisk } from '../../utils/disks/types';
|
|
3
|
+
export declare function getPDiskRuntimeItems(data: PreparedPDisk): DiskDetailItem[];
|
|
4
|
+
export declare function getPDiskLogItems(data: PreparedPDisk): DiskDetailItem[];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { formatBytes } from '../../utils/bytesParsers';
|
|
3
|
+
import { EMPTY_DATA_PLACEHOLDER } from '../../utils/constants';
|
|
4
|
+
import { parseOptionalNonNegativeNumber } from '../../utils/utils';
|
|
5
|
+
import { DiskFlagLabel } from '../DiskStatus/DiskStatus';
|
|
6
|
+
import { PDiskLogSize } from './PDiskLogSize';
|
|
7
|
+
import { pDiskInfoKeyset as i18n } from './i18n';
|
|
8
|
+
export function getPDiskRuntimeItems(data) {
|
|
9
|
+
return [
|
|
10
|
+
{ id: 'device', name: i18n('device'), content: _jsx(DiskFlagLabel, { flag: data.Device }) },
|
|
11
|
+
{ id: 'realtime', name: i18n('realtime'), content: _jsx(DiskFlagLabel, { flag: data.Realtime }) },
|
|
12
|
+
];
|
|
13
|
+
}
|
|
14
|
+
export function getPDiskLogItems(data) {
|
|
15
|
+
const systemSize = parseOptionalNonNegativeNumber(data.SystemSize);
|
|
16
|
+
return [
|
|
17
|
+
{
|
|
18
|
+
id: 'log-size',
|
|
19
|
+
name: i18n('log-size'),
|
|
20
|
+
content: _jsx(PDiskLogSize, { used: data.LogUsedSize, total: data.LogTotalSize }),
|
|
21
|
+
note: i18n('context_log-size'),
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: 'system-size',
|
|
25
|
+
name: i18n('system-size'),
|
|
26
|
+
content: systemSize === undefined
|
|
27
|
+
? EMPTY_DATA_PLACEHOLDER
|
|
28
|
+
: formatBytes({ value: systemSize, fixedDecimalPlaces: 2 }),
|
|
29
|
+
note: i18n('context_system-size'),
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=getPDiskDetails.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPDiskDetails.js","sourceRoot":"","sources":["../../../src/components/PDiskInfo/getPDiskDetails.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAC,sBAAsB,EAAC,MAAM,uBAAuB,CAAC;AAG7D,OAAO,EAAC,8BAA8B,EAAC,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,eAAe,IAAI,IAAI,EAAC,MAAM,QAAQ,CAAC;AAE/C,MAAM,UAAU,oBAAoB,CAAC,IAAmB;IACpD,OAAO;QACH,EAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAC,aAAa,IAAC,IAAI,EAAE,IAAI,CAAC,MAAM,GAAI,EAAC;QACnF,EAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,KAAC,aAAa,IAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,GAAI,EAAC;KAC5F,CAAC;AACN,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAmB;IAChD,MAAM,UAAU,GAAG,8BAA8B,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACnE,OAAO;QACH;YACI,EAAE,EAAE,UAAU;YACd,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC;YACtB,OAAO,EAAE,KAAC,YAAY,IAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,GAAI;YAC3E,IAAI,EAAE,IAAI,CAAC,kBAAkB,CAAC;SACjC;QACD;YACI,EAAE,EAAE,aAAa;YACjB,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC;YACzB,OAAO,EACH,UAAU,KAAK,SAAS;gBACpB,CAAC,CAAC,sBAAsB;gBACxB,CAAC,CAAC,WAAW,CAAC,EAAC,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,CAAC,EAAC,CAAC;YACjE,IAAI,EAAE,IAAI,CAAC,qBAAqB,CAAC;SACpC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -3,18 +3,83 @@
|
|
|
3
3
|
"path": "Path",
|
|
4
4
|
"guid": "GUID",
|
|
5
5
|
"serial-number": "Serial Number",
|
|
6
|
-
"shared-with-os": "SharedWithOs",
|
|
7
6
|
"drive-status": "Drive Status",
|
|
8
7
|
"state": "State",
|
|
9
8
|
"device": "Device",
|
|
10
9
|
"realtime": "Realtime",
|
|
11
|
-
"value_no-data": "
|
|
10
|
+
"value_no-data": "Not Available",
|
|
12
11
|
"space": "Space",
|
|
13
12
|
"usage": "Usage",
|
|
14
13
|
"slots": "Slots",
|
|
15
14
|
"log-size": "Log Size",
|
|
16
15
|
"system-size": "System Size",
|
|
17
|
-
"links": "Links",
|
|
18
16
|
"developer-ui": "Developer UI",
|
|
19
|
-
"
|
|
17
|
+
"context_slots": "The number of VDisks residing on this PDisk",
|
|
18
|
+
"context_log-size": "The size of the Common Log shared by the residing VDisks",
|
|
19
|
+
"context_system-size": "The size reserved for the PDisk system components. Includes SysLog",
|
|
20
|
+
"field_drive": "Drive status",
|
|
21
|
+
"field_decommit": "Decommission",
|
|
22
|
+
"value_not-available": "N/A",
|
|
23
|
+
"context_drive-not-available": "Drive is not available",
|
|
24
|
+
"context_decommit-not-available": "Decommission status is not available",
|
|
25
|
+
"context_maintenance-not-available": "Maintenance status is not available",
|
|
26
|
+
"value_unknown": "Unknown",
|
|
27
|
+
"value_ok": "Ok",
|
|
28
|
+
"value_initial": "Initial",
|
|
29
|
+
"value_initial-format-read": "Initial Format Read",
|
|
30
|
+
"value_initial-sys-log-read": "Initial Sys Log Read",
|
|
31
|
+
"value_initial-common-log-read": "Initial Common Log Read",
|
|
32
|
+
"value_open-file-error": "Open File Error",
|
|
33
|
+
"value_device-io-error": "Device Io Error",
|
|
34
|
+
"value_stopped": "Stopped",
|
|
35
|
+
"value_initial-format-read-error": "Initial Format Read Error",
|
|
36
|
+
"value_initial-sys-log-read-error": "Initial Sys Log Read Error",
|
|
37
|
+
"value_initial-sys-log-parse-error": "Initial Sys Log Parse Error",
|
|
38
|
+
"value_common-logger-init-error": "Common Logger Init Error",
|
|
39
|
+
"value_initial-common-log-read-error": "Initial Common Log Read Error",
|
|
40
|
+
"value_initial-common-log-parse-error": "Initial Common Log Parse Error",
|
|
41
|
+
"value_chunk-quota-error": "Chunk Quota Error",
|
|
42
|
+
"value_active": "Active",
|
|
43
|
+
"value_inactive": "Inactive",
|
|
44
|
+
"value_to-be-removed": "To be removed",
|
|
45
|
+
"value_faulty": "Faulty",
|
|
46
|
+
"value_broken": "Broken",
|
|
47
|
+
"value_decommit-none": "No decommission",
|
|
48
|
+
"value_decommit-pending": "Decommission pending",
|
|
49
|
+
"value_decommit-rejected": "Decommission rejected",
|
|
50
|
+
"value_decommit-imminent": "Decommission imminent",
|
|
51
|
+
"label_maintenance": "Maintenance",
|
|
52
|
+
"value_maintenance-none": "None",
|
|
53
|
+
"value_maintenance-unset": "Unset",
|
|
54
|
+
"value_maintenance-no-new-vdisks": "No new VDisks",
|
|
55
|
+
"value_maintenance-long-term": "Long term",
|
|
56
|
+
"context_unknown": "Value of status is unknown (default)",
|
|
57
|
+
"context_state-normal": "The PDisk is operating normally",
|
|
58
|
+
"context_state-initial": "The PDisk actor is starting and has not yet begun reading disk metadata",
|
|
59
|
+
"context_initial-format-read": "The PDisk is reading and validating its format record",
|
|
60
|
+
"context_initial-sys-log-read": "The PDisk is reading its system log during startup",
|
|
61
|
+
"context_initial-common-log-read": "The PDisk is reading VDisk common log during startup",
|
|
62
|
+
"context_open-file-error": "The PDisk could not open its backing device",
|
|
63
|
+
"context_device-io-error": "The PDisk encountered a fatal physical device I/O error",
|
|
64
|
+
"context_stopped": "The PDisk was explicitly stopped by a control request",
|
|
65
|
+
"context_initial-format-read-error": "The format record could not be read or validated",
|
|
66
|
+
"context_initial-sys-log-read-error": "The system log could not be read",
|
|
67
|
+
"context_initial-sys-log-parse-error": "The system log was read but could not be parsed",
|
|
68
|
+
"context_common-logger-init-error": "The PDisk failed to initialize the VDisk common log writer",
|
|
69
|
+
"context_initial-common-log-read-error": "VDisk common log could not be read",
|
|
70
|
+
"context_initial-common-log-parse-error": "VDisk common log was read but could not be parsed",
|
|
71
|
+
"context_chunk-quota-error": "The PDisk failed to calculate or initialize chunk quotas",
|
|
72
|
+
"context_active": "Working as expected",
|
|
73
|
+
"context_inactive": "New groups are not created over this drive, but existing ones continue to work as expected",
|
|
74
|
+
"context_to-be-removed": "Same as INACTIVE, but drive is counted in fault model as not working",
|
|
75
|
+
"context_faulty": "Drive is expected to become BROKEN soon, new groups are not created, old groups are asynchronously moved out from this drive",
|
|
76
|
+
"context_broken": "Drive is not working, groups are automatically moved out of this drive upon reception of this status",
|
|
77
|
+
"context_decommit-none": "The PDisk is not being decommissioned",
|
|
78
|
+
"context_decommit-pending": "Decommissioning is planned; allocation of new VDisks is blocked, existing VDisks are not moved",
|
|
79
|
+
"context_decommit-rejected": "The PDisk is operational but cannot receive VDisks moved from the other decommitted PDisks",
|
|
80
|
+
"context_decommit-imminent": "Active phase of decommissioning, existing VDisks are moved from the PDisk asynchronously",
|
|
81
|
+
"context_maintenance-none": "There is no active maintenance request for this PDisk",
|
|
82
|
+
"context_maintenance-unset": "No maintenance status has been explicitly provided",
|
|
83
|
+
"context_maintenance-no-new-vdisks": "Allocation of new VDisks is blocked, existing VDisks are not moved",
|
|
84
|
+
"context_maintenance-long-term": "Device is requested for a long-term maintenance, existing VDisks are moved from the PDisk asynchronously"
|
|
20
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pDiskInfoKeyset: (key: "type" | "
|
|
1
|
+
export declare const pDiskInfoKeyset: (key: "type" | "space" | "path" | "state" | "value_ok" | "value_no-data" | "device" | "guid" | "serial-number" | "drive-status" | "realtime" | "usage" | "slots" | "log-size" | "system-size" | "developer-ui" | "context_slots" | "context_log-size" | "context_system-size" | "field_drive" | "field_decommit" | "value_not-available" | "context_drive-not-available" | "context_decommit-not-available" | "context_maintenance-not-available" | "value_unknown" | "value_initial" | "value_initial-format-read" | "value_initial-sys-log-read" | "value_initial-common-log-read" | "value_open-file-error" | "value_device-io-error" | "value_stopped" | "value_initial-format-read-error" | "value_initial-sys-log-read-error" | "value_initial-sys-log-parse-error" | "value_common-logger-init-error" | "value_initial-common-log-read-error" | "value_initial-common-log-parse-error" | "value_chunk-quota-error" | "value_active" | "value_inactive" | "value_to-be-removed" | "value_faulty" | "value_broken" | "value_decommit-none" | "value_decommit-pending" | "value_decommit-rejected" | "value_decommit-imminent" | "label_maintenance" | "value_maintenance-none" | "value_maintenance-unset" | "value_maintenance-no-new-vdisks" | "value_maintenance-long-term" | "context_unknown" | "context_state-normal" | "context_state-initial" | "context_initial-format-read" | "context_initial-sys-log-read" | "context_initial-common-log-read" | "context_open-file-error" | "context_device-io-error" | "context_stopped" | "context_initial-format-read-error" | "context_initial-sys-log-read-error" | "context_initial-sys-log-parse-error" | "context_common-logger-init-error" | "context_initial-common-log-read-error" | "context_initial-common-log-parse-error" | "context_chunk-quota-error" | "context_active" | "context_inactive" | "context_to-be-removed" | "context_faulty" | "context_broken" | "context_decommit-none" | "context_decommit-pending" | "context_decommit-rejected" | "context_decommit-imminent" | "context_maintenance-none" | "context_maintenance-unset" | "context_maintenance-no-new-vdisks" | "context_maintenance-long-term", params?: import("@gravity-ui/i18n").Params) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EDecommitStatus, EDriveStatus, EMaintenanceStatus } from '../../types/api/pdisk';
|
|
2
|
+
import { TPDiskState } from '../../types/api/pdisk';
|
|
3
|
+
import type { DiskStatusLabelData } from '../DiskStatus/DiskStatus';
|
|
4
|
+
export declare function getPDiskStateLabel(state?: TPDiskState): DiskStatusLabelData;
|
|
5
|
+
export declare function getPDiskDriveLabel(status?: EDriveStatus): DiskStatusLabelData | undefined;
|
|
6
|
+
export declare function getPDiskDecommitLabel(status?: EDecommitStatus): DiskStatusLabelData | undefined;
|
|
7
|
+
export declare function getPDiskMaintenanceLabel(status?: EMaintenanceStatus): DiskStatusLabelData | undefined;
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { Ban, Check, CircleQuestionFill, CircleXmarkFill } from '@gravity-ui/icons';
|
|
2
|
+
import { TPDiskState } from '../../types/api/pdisk';
|
|
3
|
+
import { NOT_AVAILABLE_SEVERITY, NUMERIC_SEVERITY_TO_LABEL_VIEW } from '../../utils/disks/constants';
|
|
4
|
+
import { getPDiskDecommitDisplayState, getPDiskDriveDisplayState, getPDiskMaintenanceDisplayState, getPDiskStateDisplayState, } from '../../utils/disks/pdiskState';
|
|
5
|
+
import { pDiskInfoKeyset as i18n } from './i18n';
|
|
6
|
+
function unknownLabel() {
|
|
7
|
+
return {
|
|
8
|
+
value: i18n('value_unknown'),
|
|
9
|
+
tooltip: i18n('context_unknown'),
|
|
10
|
+
theme: 'unknown',
|
|
11
|
+
icon: CircleQuestionFill,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function unavailableLabel(title, tooltip) {
|
|
15
|
+
return {
|
|
16
|
+
title,
|
|
17
|
+
value: i18n('value_not-available'),
|
|
18
|
+
tooltip,
|
|
19
|
+
theme: 'unknown',
|
|
20
|
+
icon: CircleQuestionFill,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function getLabelView({ severity, icon, }) {
|
|
24
|
+
const labelView = NUMERIC_SEVERITY_TO_LABEL_VIEW[severity];
|
|
25
|
+
return {
|
|
26
|
+
theme: severity === NOT_AVAILABLE_SEVERITY ? 'unknown' : labelView === null || labelView === void 0 ? void 0 : labelView.theme,
|
|
27
|
+
icon,
|
|
28
|
+
dangerHeavy: Boolean(labelView === null || labelView === void 0 ? void 0 : labelView.dangerHeavy),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export function getPDiskStateLabel(state) {
|
|
32
|
+
const labels = {
|
|
33
|
+
[TPDiskState.Normal]: { value: i18n('value_ok'), tooltip: i18n('context_state-normal') },
|
|
34
|
+
[TPDiskState.Initial]: {
|
|
35
|
+
value: i18n('value_initial'),
|
|
36
|
+
tooltip: i18n('context_state-initial'),
|
|
37
|
+
},
|
|
38
|
+
[TPDiskState.InitialFormatRead]: {
|
|
39
|
+
value: i18n('value_initial-format-read'),
|
|
40
|
+
tooltip: i18n('context_initial-format-read'),
|
|
41
|
+
},
|
|
42
|
+
[TPDiskState.InitialSysLogRead]: {
|
|
43
|
+
value: i18n('value_initial-sys-log-read'),
|
|
44
|
+
tooltip: i18n('context_initial-sys-log-read'),
|
|
45
|
+
},
|
|
46
|
+
[TPDiskState.InitialCommonLogRead]: {
|
|
47
|
+
value: i18n('value_initial-common-log-read'),
|
|
48
|
+
tooltip: i18n('context_initial-common-log-read'),
|
|
49
|
+
},
|
|
50
|
+
[TPDiskState.OpenFileError]: {
|
|
51
|
+
value: i18n('value_open-file-error'),
|
|
52
|
+
tooltip: i18n('context_open-file-error'),
|
|
53
|
+
},
|
|
54
|
+
[TPDiskState.DeviceIoError]: {
|
|
55
|
+
value: i18n('value_device-io-error'),
|
|
56
|
+
tooltip: i18n('context_device-io-error'),
|
|
57
|
+
},
|
|
58
|
+
[TPDiskState.Stopped]: { value: i18n('value_stopped'), tooltip: i18n('context_stopped') },
|
|
59
|
+
[TPDiskState.InitialFormatReadError]: {
|
|
60
|
+
value: i18n('value_initial-format-read-error'),
|
|
61
|
+
tooltip: i18n('context_initial-format-read-error'),
|
|
62
|
+
},
|
|
63
|
+
[TPDiskState.InitialSysLogReadError]: {
|
|
64
|
+
value: i18n('value_initial-sys-log-read-error'),
|
|
65
|
+
tooltip: i18n('context_initial-sys-log-read-error'),
|
|
66
|
+
},
|
|
67
|
+
[TPDiskState.InitialSysLogParseError]: {
|
|
68
|
+
value: i18n('value_initial-sys-log-parse-error'),
|
|
69
|
+
tooltip: i18n('context_initial-sys-log-parse-error'),
|
|
70
|
+
},
|
|
71
|
+
[TPDiskState.CommonLoggerInitError]: {
|
|
72
|
+
value: i18n('value_common-logger-init-error'),
|
|
73
|
+
tooltip: i18n('context_common-logger-init-error'),
|
|
74
|
+
},
|
|
75
|
+
[TPDiskState.InitialCommonLogReadError]: {
|
|
76
|
+
value: i18n('value_initial-common-log-read-error'),
|
|
77
|
+
tooltip: i18n('context_initial-common-log-read-error'),
|
|
78
|
+
},
|
|
79
|
+
[TPDiskState.InitialCommonLogParseError]: {
|
|
80
|
+
value: i18n('value_initial-common-log-parse-error'),
|
|
81
|
+
tooltip: i18n('context_initial-common-log-parse-error'),
|
|
82
|
+
},
|
|
83
|
+
[TPDiskState.ChunkQuotaError]: {
|
|
84
|
+
value: i18n('value_chunk-quota-error'),
|
|
85
|
+
tooltip: i18n('context_chunk-quota-error'),
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
const label = state && Object.hasOwn(labels, state) ? labels[state] : undefined;
|
|
89
|
+
if (!label) {
|
|
90
|
+
return unknownLabel();
|
|
91
|
+
}
|
|
92
|
+
const { theme, icon, dangerHeavy } = getLabelView(getPDiskStateDisplayState(state));
|
|
93
|
+
return {
|
|
94
|
+
...label,
|
|
95
|
+
theme,
|
|
96
|
+
icon: state === TPDiskState.Normal ? Check : icon,
|
|
97
|
+
dangerHeavy,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
export function getPDiskDriveLabel(status) {
|
|
101
|
+
if (!status || status === 'UNKNOWN') {
|
|
102
|
+
return unavailableLabel(i18n('field_drive'), i18n('context_drive-not-available'));
|
|
103
|
+
}
|
|
104
|
+
const labels = {
|
|
105
|
+
ACTIVE: { value: i18n('value_active'), tooltip: i18n('context_active') },
|
|
106
|
+
INACTIVE: { value: i18n('value_inactive'), tooltip: i18n('context_inactive') },
|
|
107
|
+
TO_BE_REMOVED: { value: i18n('value_to-be-removed'), tooltip: i18n('context_to-be-removed') },
|
|
108
|
+
FAULTY: { value: i18n('value_faulty'), tooltip: i18n('context_faulty') },
|
|
109
|
+
BROKEN: { value: i18n('value_broken'), tooltip: i18n('context_broken') },
|
|
110
|
+
};
|
|
111
|
+
if (!Object.hasOwn(labels, status)) {
|
|
112
|
+
return undefined;
|
|
113
|
+
}
|
|
114
|
+
const { theme, icon: defaultIcon } = getLabelView(getPDiskDriveDisplayState(status));
|
|
115
|
+
let icon = defaultIcon;
|
|
116
|
+
if (status === 'ACTIVE') {
|
|
117
|
+
icon = Check;
|
|
118
|
+
}
|
|
119
|
+
else if (status === 'BROKEN') {
|
|
120
|
+
icon = CircleXmarkFill;
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
...labels[status],
|
|
124
|
+
theme,
|
|
125
|
+
icon,
|
|
126
|
+
dangerHeavy: status === 'BROKEN',
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
export function getPDiskDecommitLabel(status) {
|
|
130
|
+
if (!status || status === 'DECOMMIT_UNSET') {
|
|
131
|
+
return unavailableLabel(i18n('field_decommit'), i18n('context_decommit-not-available'));
|
|
132
|
+
}
|
|
133
|
+
const labels = {
|
|
134
|
+
DECOMMIT_NONE: { value: i18n('value_decommit-none'), tooltip: i18n('context_decommit-none') },
|
|
135
|
+
DECOMMIT_PENDING: {
|
|
136
|
+
value: i18n('value_decommit-pending'),
|
|
137
|
+
tooltip: i18n('context_decommit-pending'),
|
|
138
|
+
},
|
|
139
|
+
DECOMMIT_REJECTED: {
|
|
140
|
+
value: i18n('value_decommit-rejected'),
|
|
141
|
+
tooltip: i18n('context_decommit-rejected'),
|
|
142
|
+
},
|
|
143
|
+
DECOMMIT_IMMINENT: {
|
|
144
|
+
value: i18n('value_decommit-imminent'),
|
|
145
|
+
tooltip: i18n('context_decommit-imminent'),
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
if (!Object.hasOwn(labels, status)) {
|
|
149
|
+
return undefined;
|
|
150
|
+
}
|
|
151
|
+
const { theme, icon, dangerHeavy } = getLabelView(getPDiskDecommitDisplayState(status));
|
|
152
|
+
return {
|
|
153
|
+
...labels[status],
|
|
154
|
+
theme,
|
|
155
|
+
icon: status === 'DECOMMIT_NONE' ? Ban : icon,
|
|
156
|
+
dangerHeavy,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
export function getPDiskMaintenanceLabel(status) {
|
|
160
|
+
if (!status) {
|
|
161
|
+
return unavailableLabel(i18n('label_maintenance'), i18n('context_maintenance-not-available'));
|
|
162
|
+
}
|
|
163
|
+
const labels = {
|
|
164
|
+
NO_REQUEST: {
|
|
165
|
+
value: i18n('value_maintenance-none'),
|
|
166
|
+
tooltip: i18n('context_maintenance-none'),
|
|
167
|
+
},
|
|
168
|
+
NOT_SET: {
|
|
169
|
+
value: i18n('value_maintenance-unset'),
|
|
170
|
+
tooltip: i18n('context_maintenance-unset'),
|
|
171
|
+
},
|
|
172
|
+
NO_NEW_VDISKS: {
|
|
173
|
+
value: i18n('value_maintenance-no-new-vdisks'),
|
|
174
|
+
tooltip: i18n('context_maintenance-no-new-vdisks'),
|
|
175
|
+
},
|
|
176
|
+
LONG_TERM_MAINTENANCE_PLANNED: {
|
|
177
|
+
value: i18n('value_maintenance-long-term'),
|
|
178
|
+
tooltip: i18n('context_maintenance-long-term'),
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
if (!Object.hasOwn(labels, status)) {
|
|
182
|
+
return undefined;
|
|
183
|
+
}
|
|
184
|
+
const { theme, icon, dangerHeavy } = getLabelView(getPDiskMaintenanceDisplayState(status));
|
|
185
|
+
return {
|
|
186
|
+
...labels[status],
|
|
187
|
+
title: i18n('label_maintenance'),
|
|
188
|
+
// An explicitly unset status is shown as a normal state in the popup design.
|
|
189
|
+
theme: status === 'NOT_SET' ? 'success' : theme,
|
|
190
|
+
icon: status === 'NOT_SET' ? undefined : icon,
|
|
191
|
+
dangerHeavy,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
//# sourceMappingURL=statuses.js.map
|