ydb-embedded-ui 22.4.0 → 22.6.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/AutoRefreshControl/StickyAutoRefreshControl.d.ts +2 -0
- package/dist/components/AutoRefreshControl/StickyAutoRefreshControl.js +9 -0
- package/dist/components/AutoRefreshControl/StickyAutoRefreshControl.js.map +1 -0
- package/dist/components/AutoRefreshControl/StickyAutoRefreshControl.scss +18 -0
- 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 +1 -21
- package/dist/components/DiskCapacityInfo/DiskCapacityInfo.js +40 -126
- 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/EntityStatus/EntityStatus.d.ts +18 -6
- package/dist/components/EntityStatus/EntityStatus.js +5 -1
- 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/HideUnavailableNodesSwitch/HideUnavailableNodesSwitch.d.ts +3 -0
- package/dist/components/HideUnavailableNodesSwitch/HideUnavailableNodesSwitch.js +12 -0
- package/dist/components/HideUnavailableNodesSwitch/HideUnavailableNodesSwitch.js.map +1 -0
- package/dist/components/HideUnavailableNodesSwitch/i18n/en.json +3 -0
- package/dist/components/HideUnavailableNodesSwitch/i18n/index.d.ts +2 -0
- package/dist/components/HideUnavailableNodesSwitch/i18n/index.js +6 -0
- package/dist/components/HideUnavailableNodesSwitch/i18n/index.js.map +1 -0
- package/dist/components/HideUnavailableNodesSwitch/i18n/ru.json +3 -0
- package/dist/components/HoverPopup/HoverPopup.d.ts +1 -0
- package/dist/components/HoverPopup/HoverPopup.js +87 -16
- package/dist/components/HoverPopup/HoverPopup.js.map +1 -1
- 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.js +1 -1
- package/dist/components/PDiskInfo/PDiskLogSize.js.map +1 -1
- package/dist/components/PDiskInfo/i18n/en.json +6 -3
- package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/PDiskInfo/statuses.js +12 -3
- package/dist/components/PDiskInfo/statuses.js.map +1 -1
- package/dist/components/PageMeta/PageMeta.d.ts +0 -2
- package/dist/components/PageMeta/PageMeta.js +1 -6
- package/dist/components/PageMeta/PageMeta.js.map +1 -1
- package/dist/components/Search/Search.js +3 -1
- package/dist/components/Search/Search.js.map +1 -1
- package/dist/components/StorageGroupInfo/StorageGroupInfo.js +4 -9
- package/dist/components/StorageGroupInfo/StorageGroupInfo.js.map +1 -1
- 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.js +2 -2
- package/dist/components/VDisk/VDisk.js.map +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 +7 -1
- package/dist/components/VDiskInfo/getVDiskDetails.js +14 -1
- package/dist/components/VDiskInfo/getVDiskDetails.js.map +1 -1
- package/dist/components/VDiskInfo/i18n/en.json +4 -13
- package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/VDiskPopup/VDiskPopup.d.ts +2 -1
- package/dist/components/VDiskPopup/VDiskPopup.js +10 -26
- package/dist/components/VDiskPopup/VDiskPopup.js.map +1 -1
- package/dist/components/VDiskPopup/i18n/en.json +0 -2
- package/dist/components/VDiskPopup/i18n/index.d.ts +1 -1
- package/dist/components/VDiskStatus/VDiskReplicationStatus.js +1 -1
- package/dist/components/VDiskStatus/VDiskReplicationStatus.js.map +1 -1
- package/dist/components/VDiskStatus/VDiskStatus.js +2 -2
- package/dist/components/VDiskStatus/VDiskStatus.js.map +1 -1
- package/dist/components/VDiskStatus/VDiskStatus.scss +4 -0
- package/dist/components/VDiskStatus/statuses.js +2 -2
- package/dist/components/VDiskStatus/statuses.js.map +1 -1
- 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/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 +8 -0
- 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/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 +4 -1
- package/dist/containers/Header/i18n/index.d.ts +1 -1
- package/dist/containers/Node/Node.js +4 -3
- package/dist/containers/Node/Node.js.map +1 -1
- package/dist/containers/Node/Node.scss +14 -2
- package/dist/containers/Nodes/NodesControls/NodesControls.js +2 -1
- package/dist/containers/Nodes/NodesControls/NodesControls.js.map +1 -1
- package/dist/containers/Nodes/NodesTable.js +4 -0
- package/dist/containers/Nodes/NodesTable.js.map +1 -1
- package/dist/containers/Nodes/PaginatedNodes/GroupedNodesComponent.js +8 -3
- package/dist/containers/Nodes/PaginatedNodes/GroupedNodesComponent.js.map +1 -1
- package/dist/containers/Nodes/PaginatedNodes/NodesComponent.js +12 -2
- package/dist/containers/Nodes/PaginatedNodes/NodesComponent.js.map +1 -1
- package/dist/containers/Nodes/getNodes.js +2 -1
- package/dist/containers/Nodes/getNodes.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/PDiskPage/PDiskPage.js +24 -34
- package/dist/containers/PDiskPage/PDiskPage.js.map +1 -1
- package/dist/containers/PDiskPage/PDiskPage.scss +29 -11
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js +3 -3
- 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 +1 -0
- package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.js +3 -0
- package/dist/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageNodes/StorageNodesComponent.js +8 -1
- package/dist/containers/Storage/PaginatedStorageNodes/StorageNodesComponent.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageNodes/StorageNodesControls.js +2 -1
- package/dist/containers/Storage/PaginatedStorageNodes/StorageNodesControls.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageNodesTable/PaginatedStorageNodesTable.js +4 -0
- package/dist/containers/Storage/PaginatedStorageNodesTable/PaginatedStorageNodesTable.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageNodesTable/getNodes.js +2 -1
- package/dist/containers/Storage/PaginatedStorageNodesTable/getNodes.js.map +1 -1
- package/dist/containers/Storage/Storage.scss +4 -0
- 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/useStorageQueryParams.d.ts +4 -4
- package/dist/containers/StorageGroupPage/StorageGroupPage.js +5 -14
- package/dist/containers/StorageGroupPage/StorageGroupPage.js.map +1 -1
- package/dist/containers/StorageGroupPage/StorageGroupPage.scss +19 -4
- package/dist/containers/StorageGroupPage/i18n/en.json +0 -2
- package/dist/containers/StorageGroupPage/i18n/index.d.ts +1 -1
- package/dist/containers/Tablet/Tablet.js +3 -2
- package/dist/containers/Tablet/Tablet.js.map +1 -1
- package/dist/containers/Tablet/Tablet.scss +15 -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/TopQueries/columns/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Healthcheck/Healthcheck.scss +6 -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 +10 -2
- package/dist/containers/Tenant/TenantDrawerHealthcheck.js.map +1 -1
- package/dist/containers/VDiskPage/VDiskPage.js +27 -36
- package/dist/containers/VDiskPage/VDiskPage.js.map +1 -1
- package/dist/containers/VDiskPage/VDiskPage.scss +39 -7
- 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 +2 -12
- package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
- package/dist/store/reducers/capabilities/hooks.d.ts +1 -0
- package/dist/store/reducers/capabilities/hooks.js +3 -0
- package/dist/store/reducers/capabilities/hooks.js.map +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/nodes/types.d.ts +1 -0
- package/dist/store/reducers/storage/prepareGroupsDisks.d.ts +1 -1
- package/dist/store/reducers/storage/prepareGroupsDisks.js +2 -1
- package/dist/store/reducers/storage/prepareGroupsDisks.js.map +1 -1
- package/dist/store/reducers/storage/types.d.ts +1 -0
- package/dist/store/reducers/storage/utils.js +10 -3
- package/dist/store/reducers/storage/utils.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/types/api/capabilities.d.ts +1 -1
- package/dist/types/api/meta.d.ts +1 -0
- package/dist/types/api/nodes.d.ts +2 -0
- package/dist/types/api/nodesList.d.ts +2 -0
- 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/useHideUnavailableNodes.d.ts +5 -0
- package/dist/utils/hooks/useHideUnavailableNodes.js +21 -0
- package/dist/utils/hooks/useHideUnavailableNodes.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 +3 -3
- package/dist/utils/nodes.js.map +1 -1
- package/dist/utils/storageMetrics.d.ts +1 -0
- package/dist/utils/storageMetrics.js +8 -0
- package/dist/utils/storageMetrics.js.map +1 -1
- package/package.json +1 -1
- package/src/components/AutoRefreshControl/StickyAutoRefreshControl.scss +18 -0
- package/src/components/AutoRefreshControl/StickyAutoRefreshControl.tsx +15 -0
- 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 +40 -185
- package/src/components/DiskCapacityInfo/i18n/en.json +0 -1
- package/src/components/EntityStatus/EntityStatus.scss +5 -0
- package/src/components/EntityStatus/EntityStatus.tsx +38 -5
- 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/HideUnavailableNodesSwitch/HideUnavailableNodesSwitch.tsx +24 -0
- package/src/components/HideUnavailableNodesSwitch/i18n/en.json +3 -0
- package/src/components/HideUnavailableNodesSwitch/i18n/index.ts +7 -0
- package/src/components/HideUnavailableNodesSwitch/i18n/ru.json +3 -0
- package/src/components/HoverPopup/HoverPopup.tsx +95 -19
- 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.tsx +12 -8
- package/src/components/PDiskInfo/i18n/en.json +6 -3
- package/src/components/PDiskInfo/statuses.ts +16 -3
- package/src/components/PageMeta/PageMeta.tsx +0 -18
- package/src/components/Search/Search.tsx +5 -2
- package/src/components/StorageGroupInfo/StorageGroupInfo.tsx +8 -13
- package/src/components/VDisk/VDisk.tsx +3 -2
- package/src/components/VDiskInfo/VDiskInfo.scss +19 -3
- package/src/components/VDiskInfo/VDiskInfo.tsx +119 -341
- package/src/components/VDiskInfo/getVDiskDetails.tsx +24 -2
- package/src/components/VDiskInfo/i18n/en.json +4 -13
- package/src/components/VDiskPopup/VDiskPopup.tsx +16 -24
- package/src/components/VDiskPopup/i18n/en.json +0 -2
- package/src/components/VDiskStatus/VDiskReplicationStatus.tsx +1 -1
- package/src/components/VDiskStatus/VDiskStatus.scss +4 -0
- package/src/components/VDiskStatus/VDiskStatus.tsx +13 -2
- package/src/components/VDiskStatus/statuses.ts +2 -2
- package/src/components/nodesColumns/columns.tsx +26 -12
- 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 +8 -0
- package/src/containers/Header/HeaderLeftControls.tsx +3 -1
- package/src/containers/Header/PDiskLeftControls.tsx +41 -0
- package/src/containers/Header/VDiskLeftControls.tsx +40 -0
- package/src/containers/Header/breadcrumbs.tsx +4 -2
- package/src/containers/Header/i18n/en.json +4 -1
- package/src/containers/Node/Node.scss +14 -2
- package/src/containers/Node/Node.tsx +6 -6
- package/src/containers/Nodes/NodesControls/NodesControls.tsx +3 -0
- package/src/containers/Nodes/NodesTable.tsx +4 -0
- package/src/containers/Nodes/PaginatedNodes/GroupedNodesComponent.tsx +8 -3
- package/src/containers/Nodes/PaginatedNodes/NodesComponent.tsx +12 -2
- package/src/containers/Nodes/getNodes.ts +2 -0
- package/src/containers/Nodes/useDebouncedSearch.ts +13 -0
- package/src/containers/PDiskPage/PDiskPage.scss +29 -11
- package/src/containers/PDiskPage/PDiskPage.tsx +69 -63
- package/src/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.tsx +3 -9
- package/src/containers/PDiskPage/PDiskStorageDetails.scss +51 -0
- package/src/containers/PDiskPage/PDiskStorageDetails.tsx +64 -0
- package/src/containers/PDiskPage/i18n/en.json +1 -0
- package/src/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.tsx +3 -0
- package/src/containers/Storage/PaginatedStorageNodes/StorageNodesComponent.tsx +8 -1
- package/src/containers/Storage/PaginatedStorageNodes/StorageNodesControls.tsx +2 -0
- package/src/containers/Storage/PaginatedStorageNodesTable/PaginatedStorageNodesTable.tsx +4 -0
- package/src/containers/Storage/PaginatedStorageNodesTable/getNodes.ts +2 -0
- package/src/containers/Storage/Storage.scss +4 -0
- package/src/containers/StorageGroupPage/StorageGroupPage.scss +19 -4
- package/src/containers/StorageGroupPage/StorageGroupPage.tsx +25 -45
- package/src/containers/StorageGroupPage/i18n/en.json +0 -2
- package/src/containers/Tablet/Tablet.scss +15 -1
- package/src/containers/Tablet/Tablet.tsx +21 -15
- 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/HealthcheckIssue.tsx +18 -8
- package/src/containers/Tenant/TenantDrawerHealthcheck.tsx +14 -1
- package/src/containers/VDiskPage/VDiskPage.scss +39 -7
- package/src/containers/VDiskPage/VDiskPage.tsx +84 -72
- package/src/containers/VDiskPage/VDiskStorageDetails.scss +24 -93
- package/src/containers/VDiskPage/VDiskStorageDetails.tsx +50 -158
- package/src/containers/VDiskPage/i18n/en.json +2 -14
- package/src/store/reducers/capabilities/hooks.ts +4 -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/nodes/types.ts +1 -0
- package/src/store/reducers/storage/prepareGroupsDisks.ts +2 -0
- package/src/store/reducers/storage/types.ts +1 -0
- package/src/store/reducers/storage/utils.ts +13 -3
- package/src/store/reducers/vdisk/types.ts +2 -1
- package/src/store/reducers/vdisk/utils.ts +4 -5
- package/src/types/api/capabilities.ts +1 -0
- package/src/types/api/meta.ts +1 -0
- package/src/types/api/nodes.ts +2 -0
- package/src/types/api/nodesList.ts +3 -0
- package/src/utils/hooks/useDatabaseHealthcheckAvailable.ts +9 -0
- package/src/utils/hooks/useHideUnavailableNodes.ts +33 -0
- package/src/utils/memory.ts +16 -0
- package/src/utils/nodes.ts +3 -2
- package/src/utils/storageMetrics.ts +11 -0
- 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,195 +1,87 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Text} from '@gravity-ui/uikit';
|
|
2
|
+
import {isNil} from 'lodash';
|
|
2
3
|
|
|
3
4
|
import {CellWithPopover} from '../../components/CellWithPopover/CellWithPopover';
|
|
4
|
-
import {
|
|
5
|
+
import {CopyableValue} from '../../components/CopyableValue/CopyableValue';
|
|
6
|
+
import {InternalLinkButton} from '../../components/InternalLinkButton';
|
|
7
|
+
import {getVDiskLocationItems} from '../../components/VDiskInfo/getVDiskDetails';
|
|
5
8
|
import {getPDiskPagePath} from '../../routes';
|
|
9
|
+
import {useNewStorageViewEnabled} from '../../store/reducers/capabilities/hooks';
|
|
6
10
|
import type {VDiskData} from '../../store/reducers/vdisk/types';
|
|
7
11
|
import {cn} from '../../utils/cn';
|
|
8
|
-
import {
|
|
12
|
+
import type {DiskDetailItem} from '../../utils/disks/diskInfo/getDiskLocationItems';
|
|
9
13
|
import {useIsViewerUser} from '../../utils/hooks/useIsUserAllowedToMakeChanges';
|
|
10
|
-
import {
|
|
11
|
-
formatMetricBytes,
|
|
12
|
-
formatMetricPercent,
|
|
13
|
-
getMetricBytesCommonSize,
|
|
14
|
-
} from '../../utils/storageMetrics';
|
|
15
14
|
|
|
16
15
|
import {vDiskPageKeyset} from './i18n';
|
|
17
16
|
|
|
18
17
|
import './VDiskStorageDetails.scss';
|
|
19
18
|
|
|
20
19
|
const b = cn('ydb-vdisk-storage-details');
|
|
20
|
+
const LOCATION_IDS = ['datacenter', 'rack', 'fqdn', 'pdisk-path'];
|
|
21
21
|
|
|
22
22
|
interface VDiskStorageDetailsProps {
|
|
23
23
|
className?: string;
|
|
24
24
|
data?: VDiskData;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
value: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
interface CopyableDetailItemProps {
|
|
33
|
-
title: string;
|
|
34
|
-
value?: string | number;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
interface DetailItemProps {
|
|
38
|
-
title: string;
|
|
39
|
-
value?: string | number;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
interface TruncatedDetailValueProps {
|
|
43
|
-
value?: string | number;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function MetricItem({title, value}: MetricItemProps) {
|
|
47
|
-
return (
|
|
48
|
-
<div className={b('metric')}>
|
|
49
|
-
<Text variant="subheader-2" className={b('value')}>
|
|
50
|
-
{value}
|
|
51
|
-
</Text>
|
|
52
|
-
<Text color="secondary" className={b('label')}>
|
|
53
|
-
{title}
|
|
54
|
-
</Text>
|
|
55
|
-
</div>
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function DetailItem({title, value}: DetailItemProps) {
|
|
60
|
-
return (
|
|
61
|
-
<div className={b('detail')}>
|
|
62
|
-
<TruncatedDetailValue value={value} />
|
|
63
|
-
<Text color="secondary" className={b('label')}>
|
|
64
|
-
{title}
|
|
65
|
-
</Text>
|
|
66
|
-
</div>
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function TruncatedDetailValue({value}: TruncatedDetailValueProps) {
|
|
71
|
-
const normalizedValue =
|
|
72
|
-
value === undefined || value === null || value === '' ? undefined : String(value);
|
|
73
|
-
const displayValue = normalizedValue ?? EMPTY_DATA_PLACEHOLDER;
|
|
74
|
-
|
|
27
|
+
function DetailItem({item}: {item: DiskDetailItem}) {
|
|
28
|
+
const copyText = item.copyText === undefined ? undefined : String(item.copyText);
|
|
75
29
|
return (
|
|
76
|
-
<
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
placement={['top', 'bottom']}
|
|
80
|
-
fullWidth
|
|
81
|
-
wrapperClassName={b('value-popover')}
|
|
82
|
-
className={b('value-popover-content')}
|
|
30
|
+
<div
|
|
31
|
+
className={b('detail', {location: LOCATION_IDS.includes(item.id)})}
|
|
32
|
+
data-qa={`vdisk-location-${item.id}`}
|
|
83
33
|
>
|
|
84
|
-
<Text
|
|
85
|
-
|
|
86
|
-
</Text>
|
|
87
|
-
</CellWithPopover>
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function CopyableDetailItem({title, value}: CopyableDetailItemProps) {
|
|
92
|
-
const normalizedValue =
|
|
93
|
-
value === undefined || value === null || value === '' ? undefined : String(value);
|
|
94
|
-
const displayValue = normalizedValue ?? EMPTY_DATA_PLACEHOLDER;
|
|
95
|
-
|
|
96
|
-
return (
|
|
97
|
-
<div className={b('detail')}>
|
|
98
|
-
<Flex alignItems="center" gap="1" className={b('value-row', {copyable: true})}>
|
|
34
|
+
<Text color="secondary">{item.name}</Text>
|
|
35
|
+
<CopyableValue copyText={copyText} fieldName={item.name}>
|
|
99
36
|
<CellWithPopover
|
|
100
|
-
content={
|
|
101
|
-
disabled={!
|
|
37
|
+
content={copyText}
|
|
38
|
+
disabled={!copyText}
|
|
102
39
|
placement={['top', 'bottom']}
|
|
103
40
|
fullWidth
|
|
104
|
-
wrapperClassName={b('value-popover'
|
|
105
|
-
className={b('value-popover-content', {
|
|
41
|
+
wrapperClassName={b('value-popover')}
|
|
42
|
+
className={b('value-popover-content', {
|
|
43
|
+
'with-left-trim': item.id === 'pdisk-path',
|
|
44
|
+
})}
|
|
106
45
|
>
|
|
107
|
-
<
|
|
108
|
-
{displayValue}
|
|
109
|
-
</Text>
|
|
46
|
+
<span tabIndex={copyText ? 0 : undefined}>{item.content}</span>
|
|
110
47
|
</CellWithPopover>
|
|
111
|
-
|
|
112
|
-
copyText={normalizedValue}
|
|
113
|
-
withLabel={false}
|
|
114
|
-
view="flat-secondary"
|
|
115
|
-
size="s"
|
|
116
|
-
/>
|
|
117
|
-
</Flex>
|
|
118
|
-
<Text color="secondary" className={b('label')}>
|
|
119
|
-
{title}
|
|
120
|
-
</Text>
|
|
48
|
+
</CopyableValue>
|
|
121
49
|
</div>
|
|
122
50
|
);
|
|
123
51
|
}
|
|
124
52
|
|
|
125
|
-
export function VDiskStorageDetails({className, data}: VDiskStorageDetailsProps) {
|
|
53
|
+
export function VDiskStorageDetails({className, data = {}}: VDiskStorageDetailsProps) {
|
|
126
54
|
const isViewerUser = useIsViewerUser();
|
|
127
|
-
|
|
128
|
-
const used = Number(data?.AllocatedSize);
|
|
129
|
-
const total = Number(data?.SizeLimit);
|
|
130
|
-
const usage = Number(data?.AllocatedPercent);
|
|
131
|
-
const free = Number(data?.FreeSize);
|
|
132
|
-
const metricsSize = getMetricBytesCommonSize([used, total, free]);
|
|
133
|
-
|
|
134
|
-
const {NodeDC, NodeRack, NodeHost, NodeId, PDiskId} = data || {};
|
|
135
|
-
|
|
55
|
+
const newStorageViewEnabled = useNewStorageViewEnabled();
|
|
136
56
|
const pDiskPath =
|
|
137
|
-
isViewerUser && NodeId
|
|
138
|
-
? getPDiskPagePath(PDiskId, NodeId
|
|
57
|
+
isViewerUser && !isNil(data.NodeId) && !isNil(data.PDiskId)
|
|
58
|
+
? getPDiskPagePath(data.PDiskId, data.NodeId)
|
|
139
59
|
: undefined;
|
|
60
|
+
const items = getVDiskLocationItems(data, {
|
|
61
|
+
Host: data.NodeHost,
|
|
62
|
+
Rack: data.NodeRack,
|
|
63
|
+
DC: data.NodeDC,
|
|
64
|
+
}).filter(({id}) => newStorageViewEnabled || (id !== 'rack' && id !== 'pdisk-path'));
|
|
140
65
|
|
|
141
66
|
return (
|
|
142
|
-
<div className={b(null, className)}>
|
|
143
|
-
<
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
<
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
<Divider orientation="vertical" />
|
|
161
|
-
<MetricItem
|
|
162
|
-
title={vDiskPageKeyset('field_storage-details-usage')}
|
|
163
|
-
value={formatMetricPercent(usage)}
|
|
164
|
-
/>
|
|
165
|
-
</div>
|
|
166
|
-
<div className={b('card', {details: true})}>
|
|
167
|
-
<div className={b('details')}>
|
|
168
|
-
<DetailItem title={vDiskPageKeyset('field_datacenter')} value={NodeDC} />
|
|
169
|
-
<CopyableDetailItem
|
|
170
|
-
title={vDiskPageKeyset('field_rack')}
|
|
171
|
-
value={NodeRack}
|
|
172
|
-
/>
|
|
173
|
-
<CopyableDetailItem
|
|
174
|
-
title={vDiskPageKeyset('field_node')}
|
|
175
|
-
value={NodeHost}
|
|
176
|
-
/>
|
|
177
|
-
<CopyableDetailItem
|
|
178
|
-
title={vDiskPageKeyset('field_pdisk-id')}
|
|
179
|
-
value={PDiskId}
|
|
180
|
-
/>
|
|
181
|
-
</div>
|
|
182
|
-
{pDiskPath ? (
|
|
183
|
-
<Button
|
|
184
|
-
href={pDiskPath}
|
|
185
|
-
view="action"
|
|
186
|
-
size="m"
|
|
187
|
-
className={BRAND_BUTTON_CLASS}
|
|
188
|
-
>
|
|
189
|
-
{vDiskPageKeyset('action_go-to-pdisk')}
|
|
190
|
-
</Button>
|
|
191
|
-
) : null}
|
|
192
|
-
</div>
|
|
67
|
+
<div className={b(null, className)} data-qa="vdisk-location">
|
|
68
|
+
<div className={b('card')}>
|
|
69
|
+
{LOCATION_IDS.map((id) => {
|
|
70
|
+
const item = items.find((entry) => entry.id === id);
|
|
71
|
+
return item ? <DetailItem key={id} item={item} /> : null;
|
|
72
|
+
})}
|
|
73
|
+
</div>
|
|
74
|
+
<div className={b('card', {ids: true})}>
|
|
75
|
+
{items
|
|
76
|
+
.filter(({id}) => !LOCATION_IDS.includes(id))
|
|
77
|
+
.map((item) => (
|
|
78
|
+
<DetailItem key={item.id} item={item} />
|
|
79
|
+
))}
|
|
80
|
+
{pDiskPath && (
|
|
81
|
+
<InternalLinkButton href={pDiskPath} size="s" view="normal">
|
|
82
|
+
{vDiskPageKeyset('action_go-to-pdisk')}
|
|
83
|
+
</InternalLinkButton>
|
|
84
|
+
)}
|
|
193
85
|
</div>
|
|
194
86
|
</div>
|
|
195
87
|
);
|
|
@@ -1,25 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"fqdn": "FQDN",
|
|
3
2
|
"node": "Node",
|
|
4
3
|
"pdisk": "PDisk",
|
|
5
4
|
"vdisk": "VDisk",
|
|
6
5
|
"storage": "Storage",
|
|
7
6
|
"tablets": "Tablets",
|
|
8
|
-
"title_storage-details": "Storage details",
|
|
9
|
-
"field_storage-details-used": "Used",
|
|
10
|
-
"field_storage-details-total": "Total",
|
|
11
|
-
"field_storage-details-free": "Free",
|
|
12
|
-
"field_storage-details-usage": "Usage",
|
|
13
|
-
"field_datacenter": "Datacenter",
|
|
14
|
-
"field_rack": "Rack",
|
|
15
|
-
"field_node": "Node",
|
|
16
|
-
"field_pdisk-id": "PDisk ID",
|
|
17
7
|
"action_go-to-pdisk": "Go to PDisk",
|
|
18
|
-
|
|
8
|
+
"action_open-in-developer-ui": "Open in Developer UI",
|
|
19
9
|
"tablet-id": "Tablet ID",
|
|
20
10
|
"channel-id": "Channel ID",
|
|
21
11
|
"count": "Count",
|
|
22
|
-
"size": "Size"
|
|
23
|
-
|
|
24
|
-
"label_donor": "Donor"
|
|
12
|
+
"size": "Size"
|
|
25
13
|
}
|
|
@@ -106,6 +106,10 @@ export const useStorageGroupsHandlerHasGrouping = () => {
|
|
|
106
106
|
return useGetFeatureVersion('/storage/groups') > 4;
|
|
107
107
|
};
|
|
108
108
|
|
|
109
|
+
export const useViewerNodesAliveFilterAvailable = () => {
|
|
110
|
+
return useGetFeatureVersion('/viewer/nodes/alive') >= 1;
|
|
111
|
+
};
|
|
112
|
+
|
|
109
113
|
export const useViewerNodesHandlerHasGrouping = () => {
|
|
110
114
|
return useGetFeatureVersion('/viewer/nodes') > 6;
|
|
111
115
|
};
|
|
@@ -118,6 +118,7 @@ export function parseLoggingUrls(
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
const settingsSchema = z.object({
|
|
121
|
+
unavailable: z.boolean().optional().catch(undefined),
|
|
121
122
|
use_meta_proxy: z.boolean().optional(),
|
|
122
123
|
cluster_domain: z.string().optional(),
|
|
123
124
|
cluster_external_name: z.string().optional(),
|
|
@@ -9,6 +9,7 @@ export const selectStatusFilter = (state: ClustersStateSlice) => state.clusters.
|
|
|
9
9
|
export const selectServiceFilter = (state: ClustersStateSlice) => state.clusters.service;
|
|
10
10
|
export const selectVersionFilter = (state: ClustersStateSlice) => state.clusters.version;
|
|
11
11
|
export const selectGalaxyFilter = (state: ClustersStateSlice) => state.clusters.galaxy;
|
|
12
|
+
export const selectAvailabilityFilter = (state: ClustersStateSlice) => state.clusters.availability;
|
|
12
13
|
|
|
13
14
|
// ==== Filters ====
|
|
14
15
|
|
|
@@ -85,6 +86,9 @@ const isMatchesByTextQuery = (clusterData: PreparedCluster, searchQuery = '') =>
|
|
|
85
86
|
export function filterClusters(clusters: PreparedCluster[], filters: ClustersFilters) {
|
|
86
87
|
return clusters.filter((cluster) => {
|
|
87
88
|
return (
|
|
89
|
+
filters.availability.includes(
|
|
90
|
+
cluster.settings?.unavailable === true ? 'unavailable' : 'available',
|
|
91
|
+
) &&
|
|
88
92
|
isMatchesByGalaxy(cluster, filters.galaxy) &&
|
|
89
93
|
isMatchesByStatus(cluster, filters.status) &&
|
|
90
94
|
isMatchesByService(cluster, filters.service) &&
|
|
@@ -26,7 +26,10 @@ export interface PreparedCluster extends Omit<MetaExtendedClusterInfo, 'name' |
|
|
|
26
26
|
clusterExternalName?: string;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
export type ClusterAvailability = 'available' | 'unavailable';
|
|
30
|
+
|
|
29
31
|
export interface ClustersFilters {
|
|
32
|
+
availability: ClusterAvailability[];
|
|
30
33
|
status: string[];
|
|
31
34
|
service: string[];
|
|
32
35
|
version: string[];
|
|
@@ -137,6 +137,8 @@ export function prepareGroupsPDisk(data: TStoragePDisk & {NodeId?: number} = {})
|
|
|
137
137
|
Type,
|
|
138
138
|
Severity,
|
|
139
139
|
SlotSize,
|
|
140
|
+
ExpectedSlotCount:
|
|
141
|
+
mergedPDiskData.ExpectedSlotCount ?? parseOptionalNonNegativeNumber(bscPDisk.SlotCount),
|
|
140
142
|
DriveStatus,
|
|
141
143
|
};
|
|
142
144
|
}
|
|
@@ -37,6 +37,16 @@ const normalizeMaxPercent = (value: number | string | null | undefined): number
|
|
|
37
37
|
|
|
38
38
|
// ==== Prepare groups ====
|
|
39
39
|
|
|
40
|
+
function parseLatencyUsToMs(value: unknown): number | undefined {
|
|
41
|
+
if (typeof value !== 'string' && typeof value !== 'number') {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const latency = parseOptionalNonNegativeNumber(value);
|
|
46
|
+
|
|
47
|
+
return latency === undefined ? undefined : parseUsToMs(latency);
|
|
48
|
+
}
|
|
49
|
+
|
|
40
50
|
function getGroupDiskSpaceStatus(group: TGroupsStorageGroupInfo): EFlag {
|
|
41
51
|
const {DiskSpace, VDisks = []} = group;
|
|
42
52
|
|
|
@@ -247,9 +257,9 @@ export function prepareGroupsResponse(data: StorageGroupsResponse): PreparedStor
|
|
|
247
257
|
Used: Number(Used),
|
|
248
258
|
Limit: Number(Limit),
|
|
249
259
|
|
|
250
|
-
LatencyPutTabletLogMs:
|
|
251
|
-
LatencyPutUserDataMs:
|
|
252
|
-
LatencyGetFastMs:
|
|
260
|
+
LatencyPutTabletLogMs: parseLatencyUsToMs(LatencyPutTabletLog),
|
|
261
|
+
LatencyPutUserDataMs: parseLatencyUsToMs(LatencyPutUserData),
|
|
262
|
+
LatencyGetFastMs: parseLatencyUsToMs(LatencyGetFast),
|
|
253
263
|
|
|
254
264
|
Degraded: Number(MissingDisks),
|
|
255
265
|
Overall,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type {StorageGroupsResponse} from '../../../types/api/storage';
|
|
2
2
|
import type {TEvSystemStateResponse} from '../../../types/api/systemState';
|
|
3
|
-
import type {PreparedVDisk} from '../../../utils/disks/types';
|
|
4
3
|
import {prepareNodeSystemState} from '../../../utils/nodes';
|
|
5
4
|
import {prepareGroupsVDisk} from '../storage/prepareGroupsDisks';
|
|
6
5
|
|
|
@@ -20,14 +19,16 @@ export function prepareVDiskDataResponse(
|
|
|
20
19
|
|
|
21
20
|
const preparedVDisk = prepareGroupsVDisk(rawVDisk);
|
|
22
21
|
|
|
23
|
-
let currentVDisk:
|
|
22
|
+
let currentVDisk: VDiskData = {};
|
|
24
23
|
|
|
25
24
|
if (preparedVDisk.StringifiedId === vDiskId) {
|
|
26
25
|
currentVDisk = preparedVDisk;
|
|
27
26
|
} else {
|
|
28
27
|
for (const donor of preparedVDisk.Donors ?? []) {
|
|
29
28
|
if (donor.StringifiedId === vDiskId) {
|
|
30
|
-
|
|
29
|
+
// Keep the recipient's metrics without a back-reference to this donor.
|
|
30
|
+
const {Donors: _donors, ...recipient} = preparedVDisk;
|
|
31
|
+
currentVDisk = {...donor, Recipient: recipient};
|
|
31
32
|
break;
|
|
32
33
|
}
|
|
33
34
|
}
|
|
@@ -40,7 +41,6 @@ export function prepareVDiskDataResponse(
|
|
|
40
41
|
|
|
41
42
|
const NodeId = currentVDisk.NodeId ?? preparedPDisk?.NodeId ?? preparedNode.NodeId;
|
|
42
43
|
const NodeHost = preparedNode.Host;
|
|
43
|
-
const NodeType = preparedNode.Roles?.[0];
|
|
44
44
|
const NodeDC = preparedNode.DC;
|
|
45
45
|
const NodeRack = preparedNode.Rack;
|
|
46
46
|
|
|
@@ -52,7 +52,6 @@ export function prepareVDiskDataResponse(
|
|
|
52
52
|
|
|
53
53
|
NodeId,
|
|
54
54
|
NodeHost,
|
|
55
|
-
NodeType,
|
|
56
55
|
NodeDC,
|
|
57
56
|
NodeRack,
|
|
58
57
|
|
package/src/types/api/meta.ts
CHANGED
package/src/types/api/nodes.ts
CHANGED
|
@@ -363,6 +363,8 @@ export interface NodesRequestParams {
|
|
|
363
363
|
uptime?: number;
|
|
364
364
|
/** return nodes with SystemState !== EFlag.Green */
|
|
365
365
|
problems_only?: boolean;
|
|
366
|
+
/** exclude disconnected nodes; requires /viewer/nodes/alive capability */
|
|
367
|
+
alive?: boolean;
|
|
366
368
|
/** filter nodes by id or host */
|
|
367
369
|
filter?: string;
|
|
368
370
|
filter_peer_role?: NodesPeerRole; // v14
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type {TSystemStateInfo} from './nodes';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* endpoint: /viewer/json/nodesList
|
|
3
5
|
*
|
|
@@ -11,6 +13,7 @@ export interface TNodeInfo {
|
|
|
11
13
|
ResolveHost?: string;
|
|
12
14
|
Address?: string;
|
|
13
15
|
Port?: number;
|
|
16
|
+
Location?: TSystemStateInfo['Location'];
|
|
14
17
|
PhysicalLocation?: TNodeLocation;
|
|
15
18
|
}
|
|
16
19
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type {ETenantType} from '../../types/api/tenant';
|
|
2
|
+
|
|
3
|
+
import {useIsUserAllowedToMakeChanges} from './useIsUserAllowedToMakeChanges';
|
|
4
|
+
|
|
5
|
+
export function useDatabaseHealthcheckAvailable(databaseType?: ETenantType) {
|
|
6
|
+
const isUserAllowedToMakeChanges = useIsUserAllowedToMakeChanges();
|
|
7
|
+
|
|
8
|
+
return isUserAllowedToMakeChanges && databaseType !== 'Serverless';
|
|
9
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {BooleanParam, useQueryParam} from 'use-query-params';
|
|
4
|
+
import {z} from 'zod';
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
useCapabilitiesLoaded,
|
|
8
|
+
useViewerNodesAliveFilterAvailable,
|
|
9
|
+
} from '../../store/reducers/capabilities/hooks';
|
|
10
|
+
|
|
11
|
+
const hideUnavailableSchema = z.boolean().catch(false);
|
|
12
|
+
|
|
13
|
+
export function useHideUnavailableNodes() {
|
|
14
|
+
const [value, setValue] = useQueryParam('hideUnavailable', BooleanParam);
|
|
15
|
+
const available = useViewerNodesAliveFilterAvailable();
|
|
16
|
+
const capabilitiesLoaded = useCapabilitiesLoaded();
|
|
17
|
+
const hideUnavailable = available && hideUnavailableSchema.parse(value);
|
|
18
|
+
|
|
19
|
+
React.useEffect(() => {
|
|
20
|
+
if (capabilitiesLoaded && !available && value !== undefined) {
|
|
21
|
+
setValue(undefined, 'replaceIn');
|
|
22
|
+
}
|
|
23
|
+
}, [available, capabilitiesLoaded, setValue, value]);
|
|
24
|
+
|
|
25
|
+
const handleHideUnavailableChange = React.useCallback(
|
|
26
|
+
(checked: boolean) => {
|
|
27
|
+
setValue(checked || undefined, 'replaceIn');
|
|
28
|
+
},
|
|
29
|
+
[setValue],
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
return {available, hideUnavailable, handleHideUnavailableChange};
|
|
33
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type {TSystemStateInfo} from '../types/api/nodes';
|
|
2
|
+
|
|
3
|
+
import {parseOptionalNonNegativeNumber} from './utils';
|
|
4
|
+
|
|
5
|
+
export function getNodeMemory(
|
|
6
|
+
node: Pick<TSystemStateInfo, 'MemoryStats' | 'MemoryUsed' | 'MemoryLimit'>,
|
|
7
|
+
) {
|
|
8
|
+
// Match the backend's process usage and sorting, including its allocator fallback.
|
|
9
|
+
const memoryUsed =
|
|
10
|
+
parseOptionalNonNegativeNumber(node.MemoryUsed) ??
|
|
11
|
+
parseOptionalNonNegativeNumber(node.MemoryStats?.AnonRss) ??
|
|
12
|
+
parseOptionalNonNegativeNumber(node.MemoryStats?.AllocatedMemory);
|
|
13
|
+
const memoryLimit = parseOptionalNonNegativeNumber(node.MemoryLimit) || undefined;
|
|
14
|
+
|
|
15
|
+
return {memoryUsed, memoryLimit};
|
|
16
|
+
}
|
package/src/utils/nodes.ts
CHANGED
|
@@ -34,11 +34,12 @@ export const prepareNodesMap = (nodesList?: TNodeInfo[]) => {
|
|
|
34
34
|
if (valueIsDefined(node.Id)) {
|
|
35
35
|
const physicalLocation = node.PhysicalLocation;
|
|
36
36
|
// The legacy numeric Rack can be a hash of the actual rack name.
|
|
37
|
-
const Rack =
|
|
37
|
+
const Rack =
|
|
38
|
+
node.Location?.Rack || physicalLocation?.Location?.match(/(?:^|\/)R=([^/]+)/)?.[1];
|
|
38
39
|
|
|
39
40
|
nodeHosts.set(node.Id, {
|
|
40
41
|
Host: node.Host,
|
|
41
|
-
DC: physicalLocation?.DataCenterId,
|
|
42
|
+
DC: node.Location?.DataCenter || physicalLocation?.DataCenterId,
|
|
42
43
|
Rack,
|
|
43
44
|
});
|
|
44
45
|
}
|
|
@@ -201,6 +201,17 @@ export function formatStorageMetricPair(
|
|
|
201
201
|
.join(' / ');
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
+
export function formatStorageThroughput(value?: string | number) {
|
|
205
|
+
return (
|
|
206
|
+
formatBytes({
|
|
207
|
+
value: parseOptionalNonNegativeNumber(value),
|
|
208
|
+
size: 'mb',
|
|
209
|
+
fixedDecimalPlaces: 2,
|
|
210
|
+
withSpeedLabel: true,
|
|
211
|
+
}) || EMPTY_DATA_PLACEHOLDER
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
204
215
|
export function formatNormalizedMetricPercent(value?: number) {
|
|
205
216
|
const parsedValue = parseOptionalNonNegativeNumber(value);
|
|
206
217
|
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { PreparedVDisk } from '../../utils/disks/types';
|
|
2
|
-
import type { YDBDefinitionListItem } from '../YDBDefinitionList/YDBDefinitionList';
|
|
3
|
-
interface GetVDiskCapacityColumnsParams {
|
|
4
|
-
data?: PreparedVDisk;
|
|
5
|
-
isViewerUser?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare function getVDiskCapacityColumns({ data, isViewerUser }: GetVDiskCapacityColumnsParams): {
|
|
8
|
-
leftColumn: YDBDefinitionListItem[];
|
|
9
|
-
rightColumn: YDBDefinitionListItem[];
|
|
10
|
-
};
|
|
11
|
-
export {};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { isNil } from 'lodash';
|
|
3
|
-
import { getPDiskPagePath } from '../../routes';
|
|
4
|
-
import { getVDiskCapacityInfoItems, toDefinitionListItems, } from '../DiskCapacityInfo/DiskCapacityInfo';
|
|
5
|
-
import { InternalLink } from '../InternalLink';
|
|
6
|
-
import { vDiskInfoKeyset } from './i18n';
|
|
7
|
-
export function getVDiskCapacityColumns({ data, isViewerUser }) {
|
|
8
|
-
const { Guid, VDiskState, VDiskSlotId, Kind, IncarnationGuid, InstanceGuid, StoragePoolName, PDiskId, NodeId, } = data || {};
|
|
9
|
-
const leftColumn = [];
|
|
10
|
-
const rightColumn = [];
|
|
11
|
-
if (!isNil(StoragePoolName)) {
|
|
12
|
-
leftColumn.push({ name: vDiskInfoKeyset('pool-name'), content: StoragePoolName });
|
|
13
|
-
}
|
|
14
|
-
if (!isNil(VDiskSlotId)) {
|
|
15
|
-
leftColumn.push({ name: vDiskInfoKeyset('slot-id'), content: VDiskSlotId });
|
|
16
|
-
}
|
|
17
|
-
if (!isNil(Kind)) {
|
|
18
|
-
leftColumn.push({ name: vDiskInfoKeyset('kind'), content: Kind });
|
|
19
|
-
}
|
|
20
|
-
const capacityItems = getVDiskCapacityInfoItems(data, { withRawUsage: true });
|
|
21
|
-
const groupSizeItem = capacityItems.find(({ id }) => id === 'group-size-in-units');
|
|
22
|
-
const runtimeCapacityItems = capacityItems.filter(({ id }) => id !== 'group-size-in-units');
|
|
23
|
-
if (groupSizeItem) {
|
|
24
|
-
leftColumn.push(...toDefinitionListItems([groupSizeItem]));
|
|
25
|
-
}
|
|
26
|
-
if (!isNil(Guid)) {
|
|
27
|
-
leftColumn.push({ name: vDiskInfoKeyset('guid'), content: Guid });
|
|
28
|
-
}
|
|
29
|
-
if (!isNil(IncarnationGuid)) {
|
|
30
|
-
leftColumn.push({ name: vDiskInfoKeyset('incarnation-guid'), content: IncarnationGuid });
|
|
31
|
-
}
|
|
32
|
-
if (!isNil(InstanceGuid)) {
|
|
33
|
-
leftColumn.push({ name: vDiskInfoKeyset('instance-guid'), content: InstanceGuid });
|
|
34
|
-
}
|
|
35
|
-
if (!isNil(PDiskId)) {
|
|
36
|
-
const pDiskPath = isViewerUser && !isNil(NodeId) ? getPDiskPagePath(PDiskId, NodeId) : undefined;
|
|
37
|
-
const content = pDiskPath ? _jsx(InternalLink, { to: pDiskPath, children: PDiskId }) : PDiskId;
|
|
38
|
-
leftColumn.push({
|
|
39
|
-
name: vDiskInfoKeyset('label_pdisk-id'),
|
|
40
|
-
content,
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
if (!isNil(VDiskState)) {
|
|
44
|
-
rightColumn.push({
|
|
45
|
-
name: vDiskInfoKeyset('state-status'),
|
|
46
|
-
content: VDiskState,
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
rightColumn.push(...toDefinitionListItems(runtimeCapacityItems));
|
|
50
|
-
return { leftColumn, rightColumn };
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=getVDiskCapacityColumns.js.map
|