ydb-embedded-ui 22.7.0 → 22.9.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/Datacenter/DatacenterLabel.d.ts +9 -0
- package/dist/components/Datacenter/DatacenterLabel.js +23 -0
- package/dist/components/Datacenter/DatacenterLabel.js.map +1 -0
- package/dist/components/Datacenter/DatacenterLabel.scss +8 -0
- package/dist/components/Datacenter/datacenterColors.scss +27 -0
- package/dist/components/Datacenter/i18n/en.json +5 -0
- package/dist/components/Datacenter/i18n/index.d.ts +2 -0
- package/dist/components/Datacenter/i18n/index.js +4 -0
- package/dist/components/Datacenter/i18n/index.js.map +1 -0
- package/dist/components/DiskPopup/DiskPopup.d.ts +4 -2
- package/dist/components/DiskPopup/DiskPopup.js +12 -4
- package/dist/components/DiskPopup/DiskPopup.js.map +1 -1
- package/dist/components/DiskPopup/DiskPopup.scss +6 -0
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.d.ts +5 -3
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.js +17 -3
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.js.map +1 -1
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.scss +29 -0
- package/dist/components/PDiskPopup/PDiskPopup.js +1 -1
- package/dist/components/PDiskPopup/PDiskPopup.js.map +1 -1
- package/dist/components/TooltipsContent/NodeEndpointsTooltipContent/i18n/index.d.ts +1 -1
- package/dist/components/VDisk/VDisk.js +8 -2
- package/dist/components/VDisk/VDisk.js.map +1 -1
- package/dist/components/VDiskPopup/VDiskPopup.js +1 -1
- package/dist/components/VDiskPopup/VDiskPopup.js.map +1 -1
- package/dist/components/nodesColumns/columns.d.ts +4 -0
- package/dist/components/nodesColumns/columns.js +18 -1
- package/dist/components/nodesColumns/columns.js.map +1 -1
- package/dist/components/nodesColumns/constants.d.ts +2 -0
- package/dist/components/nodesColumns/constants.js +6 -0
- package/dist/components/nodesColumns/constants.js.map +1 -1
- package/dist/components/nodesColumns/i18n/en.json +1 -0
- package/dist/components/nodesColumns/i18n/index.d.ts +1 -1
- package/dist/containers/App/App.js +1 -1
- package/dist/containers/App/App.js.map +1 -1
- package/dist/containers/App/App.scss +0 -2
- package/dist/containers/App/Content.js +7 -3
- package/dist/containers/App/Content.js.map +1 -1
- package/dist/containers/Cluster/Cluster.js +3 -2
- package/dist/containers/Cluster/Cluster.js.map +1 -1
- package/dist/containers/Cluster/ClusterDrawerHealthcheck.js +18 -2
- package/dist/containers/Cluster/ClusterDrawerHealthcheck.js.map +1 -1
- package/dist/containers/Cluster/ClusterOverview/components/BridgeInfoTable.js +10 -5
- package/dist/containers/Cluster/ClusterOverview/components/BridgeInfoTable.js.map +1 -1
- package/dist/containers/Clusters/Clusters.js +7 -3
- package/dist/containers/Clusters/Clusters.js.map +1 -1
- package/dist/containers/Clusters/columns.d.ts +1 -0
- package/dist/containers/Clusters/columns.js +4 -1
- package/dist/containers/Clusters/columns.js.map +1 -1
- package/dist/containers/Header/StorageGroupLeftControls.js +2 -2
- package/dist/containers/Header/StorageGroupLeftControls.js.map +1 -1
- package/dist/containers/Node/NodePages.d.ts +1 -1
- package/dist/containers/Nodes/NodesTable.js +3 -1
- package/dist/containers/Nodes/NodesTable.js.map +1 -1
- package/dist/containers/Nodes/PaginatedNodes/GroupedNodesComponent.js +8 -1
- package/dist/containers/Nodes/PaginatedNodes/GroupedNodesComponent.js.map +1 -1
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js +6 -1
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js.map +1 -1
- package/dist/containers/PDiskPage/PDiskStorageDetails.js +2 -1
- package/dist/containers/PDiskPage/PDiskStorageDetails.js.map +1 -1
- package/dist/containers/Storage/PDisk/PDisk.js +13 -2
- package/dist/containers/Storage/PDisk/PDisk.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/columns.js +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/columns.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageNodesTable/PaginatedStorageNodesTable.js +3 -1
- package/dist/containers/Storage/PaginatedStorageNodesTable/PaginatedStorageNodesTable.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageNodesTable/columns/columns.js +2 -1
- package/dist/containers/Storage/PaginatedStorageNodesTable/columns/columns.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageNodesTable/columns/hooks.js +15 -8
- package/dist/containers/Storage/PaginatedStorageNodesTable/columns/hooks.js.map +1 -1
- package/dist/containers/Storage/StorageExpertModePanel/StorageExpertModePanel.scss +6 -0
- package/dist/containers/Storage/StorageExpertModePanel/StorageGroupsExpertModePanel.js +6 -2
- package/dist/containers/Storage/StorageExpertModePanel/StorageGroupsExpertModePanel.js.map +1 -1
- package/dist/containers/Storage/StorageExpertModePanel/components/DatacenterLegend.d.ts +4 -0
- package/dist/containers/Storage/StorageExpertModePanel/components/DatacenterLegend.js +38 -0
- package/dist/containers/Storage/StorageExpertModePanel/components/DatacenterLegend.js.map +1 -0
- package/dist/containers/Storage/StorageExpertModePanel/components/DatacenterLegend.scss +54 -0
- package/dist/containers/Storage/StorageExpertModePanel/components/renderExpertModeLegend.js +5 -0
- package/dist/containers/Storage/StorageExpertModePanel/components/renderExpertModeLegend.js.map +1 -1
- package/dist/containers/Storage/StorageExpertModePanel/constants.d.ts +3 -0
- package/dist/containers/Storage/StorageExpertModePanel/constants.js +1 -0
- package/dist/containers/Storage/StorageExpertModePanel/constants.js.map +1 -1
- package/dist/containers/Storage/StorageExpertModePanel/i18n/en.json +6 -0
- package/dist/containers/Storage/StorageExpertModePanel/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/StorageGroupStateLabel.d.ts +4 -2
- package/dist/containers/Storage/StorageGroupStateLabel.js +4 -3
- package/dist/containers/Storage/StorageGroupStateLabel.js.map +1 -1
- package/dist/containers/Storage/useStorageDatacenter.d.ts +2 -0
- package/dist/containers/Storage/useStorageDatacenter.js +28 -0
- package/dist/containers/Storage/useStorageDatacenter.js.map +1 -0
- package/dist/containers/Storage/useStoragePDiskDisplayStateGetter.js +6 -1
- package/dist/containers/Storage/useStoragePDiskDisplayStateGetter.js.map +1 -1
- package/dist/containers/Storage/useStorageQueryParams.d.ts +4 -4
- package/dist/containers/Storage/useStorageVDiskDisplayStateGetter.js +6 -1
- package/dist/containers/Storage/useStorageVDiskDisplayStateGetter.js.map +1 -1
- package/dist/containers/Storage/utils/getStorageGroupStateLabel.d.ts +2 -1
- package/dist/containers/Storage/utils/getStorageGroupStateLabel.js +47 -11
- package/dist/containers/Storage/utils/getStorageGroupStateLabel.js.map +1 -1
- package/dist/containers/Storage/utils/index.js +2 -5
- package/dist/containers/Storage/utils/index.js.map +1 -1
- package/dist/containers/StorageGroupPage/StorageGroupPage.js +1 -2
- package/dist/containers/StorageGroupPage/StorageGroupPage.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.d.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.js +18 -11
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js +6 -3
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/en.json +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/DatabaseDatacenters.d.ts +4 -0
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/DatabaseDatacenters.js +11 -0
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/DatabaseDatacenters.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/DatabaseInfo.d.ts +1 -2
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/DatabaseInfo.js +20 -2
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/DatabaseInfo.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/i18n/en.json +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/utils.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/utils.js +23 -0
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/utils.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/useDiagnosticsPages.js +5 -2
- package/dist/containers/Tenant/Diagnostics/useDiagnosticsPages.js.map +1 -1
- package/dist/containers/Tenant/Query/QueryEditor/hooks/useEditorOptions.js +3 -1
- package/dist/containers/Tenant/Query/QueryEditor/hooks/useEditorOptions.js.map +1 -1
- package/dist/containers/Tenant/utils/schemaQueryTemplates.js +1 -6
- package/dist/containers/Tenant/utils/schemaQueryTemplates.js.map +1 -1
- package/dist/containers/UserSettings/i18n/en.json +3 -0
- package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
- package/dist/containers/UserSettings/settings.d.ts +1 -0
- package/dist/containers/UserSettings/settings.js +15 -1
- package/dist/containers/UserSettings/settings.js.map +1 -1
- package/dist/containers/VDiskPage/VDiskStorageDetails.js +5 -6
- package/dist/containers/VDiskPage/VDiskStorageDetails.js.map +1 -1
- package/dist/lib.d.ts +1 -0
- package/dist/services/api/viewer.d.ts +2 -1
- package/dist/services/api/viewer.js +2 -1
- package/dist/services/api/viewer.js.map +1 -1
- package/dist/services/parsers/parseMetaTenants.js +1 -0
- package/dist/services/parsers/parseMetaTenants.js.map +1 -1
- package/dist/store/configureStore.d.ts +4 -0
- package/dist/store/datacenterQueryContext.d.ts +7 -0
- package/dist/store/datacenterQueryContext.js +10 -0
- package/dist/store/datacenterQueryContext.js.map +1 -0
- package/dist/store/defaultStore.d.ts +2 -0
- package/dist/store/reducers/capabilities/capabilities.d.ts +28 -0
- package/dist/store/reducers/cluster/cluster.d.ts +2 -0
- package/dist/store/reducers/cluster/cluster.js +8 -4
- package/dist/store/reducers/cluster/cluster.js.map +1 -1
- package/dist/store/reducers/datacenters.d.ts +13 -0
- package/dist/store/reducers/datacenters.js +82 -0
- package/dist/store/reducers/datacenters.js.map +1 -0
- package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +36 -0
- package/dist/store/reducers/index.d.ts +3 -0
- package/dist/store/reducers/index.js +2 -0
- package/dist/store/reducers/index.js.map +1 -1
- package/dist/store/reducers/nodes/nodes.js +4 -2
- package/dist/store/reducers/nodes/nodes.js.map +1 -1
- package/dist/store/reducers/nodesList.d.ts +8 -3
- package/dist/store/reducers/nodesList.js +10 -5
- package/dist/store/reducers/nodesList.js.map +1 -1
- package/dist/store/reducers/pdisk/pdisk.js +3 -1
- package/dist/store/reducers/pdisk/pdisk.js.map +1 -1
- package/dist/store/reducers/pdisk/types.d.ts +1 -0
- package/dist/store/reducers/pdisk/utils.js +1 -0
- package/dist/store/reducers/pdisk/utils.js.map +1 -1
- package/dist/store/reducers/schema/schema.d.ts +4 -0
- package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +12 -0
- package/dist/store/reducers/settings/constants.d.ts +2 -0
- package/dist/store/reducers/settings/constants.js +2 -0
- package/dist/store/reducers/settings/constants.js.map +1 -1
- package/dist/store/reducers/settings/settings.d.ts +1 -0
- package/dist/store/reducers/settings/utils.d.ts +1 -1
- package/dist/store/reducers/storage/storage.js +4 -2
- package/dist/store/reducers/storage/storage.js.map +1 -1
- package/dist/store/reducers/storage/types.d.ts +2 -1
- package/dist/store/reducers/storage/utils.js +2 -0
- package/dist/store/reducers/storage/utils.js.map +1 -1
- package/dist/store/reducers/tablets.d.ts +1 -0
- package/dist/store/reducers/tenant/tenant.d.ts +4 -0
- package/dist/store/reducers/tenant/tenant.js +10 -2
- package/dist/store/reducers/tenant/tenant.js.map +1 -1
- package/dist/store/reducers/tenants/tenants.js +13 -1
- package/dist/store/reducers/tenants/tenants.js.map +1 -1
- package/dist/store/reducers/tenants/types.d.ts +3 -1
- package/dist/store/reducers/tenants/utils.d.ts +1 -1
- package/dist/store/reducers/tenants/utils.js +2 -1
- package/dist/store/reducers/tenants/utils.js.map +1 -1
- package/dist/store/reducers/topic/topic.d.ts +19 -0
- package/dist/store/reducers/vdisk/types.d.ts +1 -0
- package/dist/store/reducers/vdisk/utils.js +2 -0
- package/dist/store/reducers/vdisk/utils.js.map +1 -1
- package/dist/store/reducers/vdisk/vdisk.js +4 -2
- package/dist/store/reducers/vdisk/vdisk.js.map +1 -1
- package/dist/styles/datacenters.scss +247 -0
- package/dist/types/api/meta.d.ts +4 -0
- package/dist/types/api/storage.d.ts +20 -0
- package/dist/types/api/storage.js.map +1 -1
- package/dist/types/api/tenant.d.ts +3 -0
- package/dist/types/api/tenant.js.map +1 -1
- package/dist/types/store/nodesList.d.ts +2 -0
- package/dist/uiFactory/types.d.ts +8 -0
- package/dist/utils/datacenters.d.ts +15 -0
- package/dist/utils/datacenters.js +70 -0
- package/dist/utils/datacenters.js.map +1 -0
- package/dist/utils/disks/diskInfo/getDiskLocationItems.js +3 -0
- package/dist/utils/disks/diskInfo/getDiskLocationItems.js.map +1 -1
- package/dist/utils/disks/diskInfo/i18n/en.json +1 -0
- package/dist/utils/disks/diskInfo/i18n/index.d.ts +1 -1
- package/dist/utils/disks/displayState.d.ts +7 -1
- package/dist/utils/disks/displayState.js.map +1 -1
- package/dist/utils/disks/groupBy.d.ts +1 -0
- package/dist/utils/disks/groupBy.js +1 -0
- package/dist/utils/disks/groupBy.js.map +1 -1
- package/dist/utils/hooks/useDatacenterColorIndexes.d.ts +3 -0
- package/dist/utils/hooks/useDatacenterColorIndexes.js +9 -0
- package/dist/utils/hooks/useDatacenterColorIndexes.js.map +1 -0
- package/dist/utils/hooks/useDatacenterNodesFetcher.d.ts +6 -0
- package/dist/utils/hooks/useDatacenterNodesFetcher.js +14 -0
- package/dist/utils/hooks/useDatacenterNodesFetcher.js.map +1 -0
- package/dist/utils/hooks/useNodeMetadata.js +4 -5
- package/dist/utils/hooks/useNodeMetadata.js.map +1 -1
- package/dist/utils/hooks/useNodesListQueryArgs.d.ts +3 -0
- package/dist/utils/hooks/useNodesListQueryArgs.js +62 -0
- package/dist/utils/hooks/useNodesListQueryArgs.js.map +1 -0
- package/dist/utils/hooks/useNodesMap.d.ts +1 -0
- package/dist/utils/hooks/useNodesMap.js +8 -0
- package/dist/utils/hooks/useNodesMap.js.map +1 -0
- package/dist/utils/nodes.d.ts +1 -0
- package/dist/utils/nodes.js +9 -0
- package/dist/utils/nodes.js.map +1 -1
- package/dist/utils/query.d.ts +6 -6
- package/dist/utils/zod/zodParsers.d.ts +1 -1
- package/package.json +3 -3
- package/src/components/Datacenter/DatacenterLabel.scss +8 -0
- package/src/components/Datacenter/DatacenterLabel.tsx +54 -0
- package/src/components/Datacenter/datacenterColors.scss +27 -0
- package/src/components/Datacenter/i18n/en.json +5 -0
- package/src/components/Datacenter/i18n/index.ts +5 -0
- package/src/components/DiskPopup/DiskPopup.scss +6 -0
- package/src/components/DiskPopup/DiskPopup.tsx +25 -3
- package/src/components/DiskStateProgressBar/DiskStateProgressBar.scss +29 -0
- package/src/components/DiskStateProgressBar/DiskStateProgressBar.tsx +41 -4
- package/src/components/PDiskPopup/PDiskPopup.tsx +1 -1
- package/src/components/VDisk/VDisk.tsx +8 -1
- package/src/components/VDiskPopup/VDiskPopup.tsx +1 -1
- package/src/components/nodesColumns/columns.tsx +18 -2
- package/src/components/nodesColumns/constants.ts +6 -0
- package/src/components/nodesColumns/i18n/en.json +1 -0
- package/src/containers/App/App.scss +0 -2
- package/src/containers/App/App.tsx +8 -1
- package/src/containers/App/Content.tsx +7 -3
- package/src/containers/Cluster/Cluster.tsx +8 -2
- package/src/containers/Cluster/ClusterDrawerHealthcheck.tsx +30 -3
- package/src/containers/Cluster/ClusterOverview/components/BridgeInfoTable.tsx +33 -24
- package/src/containers/Clusters/Clusters.tsx +7 -3
- package/src/containers/Clusters/columns.tsx +6 -0
- package/src/containers/Header/StorageGroupLeftControls.tsx +5 -1
- package/src/containers/Nodes/NodesTable.tsx +3 -1
- package/src/containers/Nodes/PaginatedNodes/GroupedNodesComponent.tsx +18 -2
- package/src/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.tsx +6 -1
- package/src/containers/PDiskPage/PDiskStorageDetails.tsx +12 -1
- package/src/containers/Storage/PDisk/PDisk.tsx +19 -4
- package/src/containers/Storage/PaginatedStorageGroupsTable/columns/columns.tsx +1 -1
- package/src/containers/Storage/PaginatedStorageNodesTable/PaginatedStorageNodesTable.tsx +3 -1
- package/src/containers/Storage/PaginatedStorageNodesTable/columns/columns.tsx +2 -0
- package/src/containers/Storage/PaginatedStorageNodesTable/columns/hooks.ts +16 -8
- package/src/containers/Storage/StorageExpertModePanel/StorageExpertModePanel.scss +6 -0
- package/src/containers/Storage/StorageExpertModePanel/StorageGroupsExpertModePanel.tsx +9 -2
- package/src/containers/Storage/StorageExpertModePanel/components/DatacenterLegend.scss +54 -0
- package/src/containers/Storage/StorageExpertModePanel/components/DatacenterLegend.tsx +102 -0
- package/src/containers/Storage/StorageExpertModePanel/components/renderExpertModeLegend.tsx +5 -0
- package/src/containers/Storage/StorageExpertModePanel/constants.ts +1 -0
- package/src/containers/Storage/StorageExpertModePanel/i18n/en.json +6 -0
- package/src/containers/Storage/StorageGroupStateLabel.tsx +8 -3
- package/src/containers/Storage/useStorageDatacenter.ts +38 -0
- package/src/containers/Storage/useStoragePDiskDisplayStateGetter.ts +7 -1
- package/src/containers/Storage/useStorageVDiskDisplayStateGetter.ts +7 -1
- package/src/containers/Storage/utils/getStorageGroupStateLabel.ts +67 -12
- package/src/containers/Storage/utils/index.ts +2 -5
- package/src/containers/StorageGroupPage/StorageGroupPage.tsx +4 -2
- package/src/containers/Tenant/Diagnostics/Describe/Describe.tsx +39 -24
- package/src/containers/Tenant/Diagnostics/Diagnostics.tsx +21 -5
- package/src/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/en.json +1 -1
- package/src/containers/Tenant/Diagnostics/Overview/DatabaseInfo/DatabaseDatacenters.tsx +19 -0
- package/src/containers/Tenant/Diagnostics/Overview/DatabaseInfo/DatabaseInfo.tsx +19 -4
- package/src/containers/Tenant/Diagnostics/Overview/DatabaseInfo/i18n/en.json +1 -0
- package/src/containers/Tenant/Diagnostics/Overview/DatabaseInfo/utils.ts +28 -0
- package/src/containers/Tenant/Diagnostics/useDiagnosticsPages.ts +6 -2
- package/src/containers/Tenant/Query/QueryEditor/hooks/useEditorOptions.ts +3 -1
- package/src/containers/Tenant/utils/schemaQueryTemplates.ts +1 -6
- package/src/containers/UserSettings/i18n/en.json +4 -0
- package/src/containers/UserSettings/settings.tsx +16 -1
- package/src/containers/VDiskPage/VDiskStorageDetails.tsx +23 -6
- package/src/lib.ts +2 -0
- package/src/services/api/viewer.ts +5 -1
- package/src/services/parsers/parseMetaTenants.ts +1 -0
- package/src/store/datacenterQueryContext.ts +16 -0
- package/src/store/reducers/cluster/cluster.ts +8 -4
- package/src/store/reducers/datacenters.ts +139 -0
- package/src/store/reducers/index.ts +2 -0
- package/src/store/reducers/nodes/nodes.ts +4 -2
- package/src/store/reducers/nodesList.ts +25 -6
- package/src/store/reducers/pdisk/pdisk.ts +3 -1
- package/src/store/reducers/pdisk/types.ts +1 -0
- package/src/store/reducers/pdisk/utils.ts +1 -0
- package/src/store/reducers/settings/constants.ts +2 -0
- package/src/store/reducers/storage/storage.ts +4 -2
- package/src/store/reducers/storage/types.ts +2 -1
- package/src/store/reducers/storage/utils.ts +2 -0
- package/src/store/reducers/tenant/tenant.ts +13 -2
- package/src/store/reducers/tenants/tenants.ts +12 -1
- package/src/store/reducers/tenants/types.ts +3 -1
- package/src/store/reducers/tenants/utils.ts +5 -1
- package/src/store/reducers/vdisk/types.ts +1 -0
- package/src/store/reducers/vdisk/utils.ts +2 -0
- package/src/store/reducers/vdisk/vdisk.ts +4 -2
- package/src/styles/datacenters.scss +247 -0
- package/src/types/api/meta.ts +4 -0
- package/src/types/api/storage.ts +14 -0
- package/src/types/api/tenant.ts +3 -0
- package/src/types/store/nodesList.ts +2 -0
- package/src/uiFactory/types.ts +9 -0
- package/src/utils/datacenters.ts +99 -0
- package/src/utils/disks/diskInfo/getDiskLocationItems.ts +3 -0
- package/src/utils/disks/diskInfo/i18n/en.json +1 -0
- package/src/utils/disks/displayState.ts +4 -0
- package/src/utils/disks/groupBy.ts +1 -0
- package/src/utils/hooks/useDatacenterColorIndexes.ts +11 -0
- package/src/utils/hooks/useDatacenterNodesFetcher.ts +22 -0
- package/src/utils/hooks/useNodeMetadata.ts +4 -5
- package/src/utils/hooks/useNodesListQueryArgs.ts +78 -0
- package/src/utils/hooks/useNodesMap.ts +9 -0
- package/src/utils/nodes.ts +10 -0
|
@@ -6,6 +6,7 @@ import {isNil} from 'lodash';
|
|
|
6
6
|
import {cn} from '../../utils/cn';
|
|
7
7
|
import {EMPTY_DATA_PLACEHOLDER} from '../../utils/constants';
|
|
8
8
|
import type {DiskDetailItem} from '../../utils/disks/diskInfo/getDiskLocationItems';
|
|
9
|
+
import {DatacenterLabel} from '../Datacenter/DatacenterLabel';
|
|
9
10
|
import {DiskTypeLabel} from '../DiskStatus/DiskStatus';
|
|
10
11
|
import {YDBDefinitionList} from '../YDBDefinitionList/YDBDefinitionList';
|
|
11
12
|
|
|
@@ -81,9 +82,11 @@ export function DiskPopupHeader({
|
|
|
81
82
|
export function DiskPopupText({
|
|
82
83
|
value,
|
|
83
84
|
withLeftTrim = false,
|
|
85
|
+
children,
|
|
84
86
|
}: {
|
|
85
87
|
value?: string | number;
|
|
86
88
|
withLeftTrim?: boolean;
|
|
89
|
+
children?: React.ReactNode;
|
|
87
90
|
}) {
|
|
88
91
|
const hasValue = !isNil(value) && value !== '';
|
|
89
92
|
const text = hasValue ? value : EMPTY_DATA_PLACEHOLDER;
|
|
@@ -93,18 +96,37 @@ export function DiskPopupText({
|
|
|
93
96
|
className={b('text', {'with-left-trim': withLeftTrim})}
|
|
94
97
|
tabIndex={hasValue ? 0 : undefined}
|
|
95
98
|
>
|
|
96
|
-
{withLeftTrim ? <span>{text}</span> : text}
|
|
99
|
+
{children ?? (withLeftTrim ? <span>{text}</span> : text)}
|
|
97
100
|
</span>
|
|
98
101
|
</Tooltip>
|
|
99
102
|
);
|
|
100
103
|
}
|
|
101
104
|
|
|
102
|
-
export function DiskPopupLocation({
|
|
105
|
+
export function DiskPopupLocation({
|
|
106
|
+
items,
|
|
107
|
+
datacenterColorKey,
|
|
108
|
+
}: {
|
|
109
|
+
items: DiskDetailItem[];
|
|
110
|
+
datacenterColorKey?: string;
|
|
111
|
+
}) {
|
|
103
112
|
if (!items.length) {
|
|
104
113
|
return null;
|
|
105
114
|
}
|
|
106
115
|
const locationItems = items.map((item) => {
|
|
107
|
-
if (
|
|
116
|
+
if (item.id === 'datacenter') {
|
|
117
|
+
const name = item.copyText === undefined ? undefined : String(item.copyText);
|
|
118
|
+
return {
|
|
119
|
+
...item,
|
|
120
|
+
content: (
|
|
121
|
+
<DiskPopupText value={name}>
|
|
122
|
+
{name ? (
|
|
123
|
+
<DatacenterLabel name={name} colorKey={datacenterColorKey} size="xxs" />
|
|
124
|
+
) : undefined}
|
|
125
|
+
</DiskPopupText>
|
|
126
|
+
),
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
if (['fqdn', 'rack'].includes(item.id)) {
|
|
108
130
|
return {...item, content: <DiskPopupText value={item.copyText} />};
|
|
109
131
|
}
|
|
110
132
|
if (item.id === 'pdisk-path' && typeof item.copyText === 'string') {
|
|
@@ -684,3 +684,32 @@
|
|
|
684
684
|
color: var(--ydb-progress-bar-font-color, var(--entity-state-border-color));
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
+
|
|
688
|
+
.storage-disk-progress-bar_mode-datacenter {
|
|
689
|
+
gap: 2px;
|
|
690
|
+
|
|
691
|
+
box-sizing: border-box;
|
|
692
|
+
padding-inline: 4px 0;
|
|
693
|
+
|
|
694
|
+
color: var(--ydb-dc-text);
|
|
695
|
+
border: none;
|
|
696
|
+
border-radius: 6px;
|
|
697
|
+
background: var(--ydb-dc-background);
|
|
698
|
+
box-shadow: inset 0 0 0 1px var(--ydb-dc-outline);
|
|
699
|
+
|
|
700
|
+
&.storage-disk-progress-bar_highlighted,
|
|
701
|
+
&:hover {
|
|
702
|
+
color: var(--ydb-dc-hover-text);
|
|
703
|
+
background: var(--ydb-dc-hover);
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
.storage-disk-progress-bar__datacenter-name {
|
|
707
|
+
overflow: hidden;
|
|
708
|
+
|
|
709
|
+
min-width: 0;
|
|
710
|
+
|
|
711
|
+
font-size: var(--g-text-caption-2-font-size);
|
|
712
|
+
line-height: var(--g-text-caption-2-line-height);
|
|
713
|
+
white-space: nowrap;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {CircleQuestionFill} from '@gravity-ui/icons';
|
|
4
|
+
import {Flex, Icon} from '@gravity-ui/uikit';
|
|
4
5
|
|
|
5
6
|
import {SETTING_KEYS} from '../../store/reducers/settings/constants';
|
|
6
7
|
import {cn} from '../../utils/cn';
|
|
7
|
-
import type {DiskDisplayMode} from '../../utils/disks/displayState';
|
|
8
|
+
import type {BaseDiskDisplayState, DiskDisplayMode} from '../../utils/disks/displayState';
|
|
8
9
|
import type {DiskBarTone} from '../../utils/disks/types';
|
|
9
10
|
import {useSetting} from '../../utils/hooks';
|
|
10
11
|
import {isNumeric} from '../../utils/utils';
|
|
12
|
+
import datacenterI18n from '../Datacenter/i18n';
|
|
11
13
|
|
|
12
14
|
import './DiskStateProgressBar.scss';
|
|
15
|
+
import '../Datacenter/datacenterColors.scss';
|
|
13
16
|
|
|
14
17
|
const b = cn('storage-disk-progress-bar');
|
|
15
18
|
|
|
@@ -17,6 +20,7 @@ interface DiskStateProgressBarProps {
|
|
|
17
20
|
allocation?: number;
|
|
18
21
|
tone: DiskBarTone;
|
|
19
22
|
mode?: DiskDisplayMode;
|
|
23
|
+
datacenter?: BaseDiskDisplayState['datacenter'];
|
|
20
24
|
compact?: boolean;
|
|
21
25
|
faded?: boolean;
|
|
22
26
|
inactive?: boolean;
|
|
@@ -37,10 +41,39 @@ function getToneModifier(tone: DiskBarTone) {
|
|
|
37
41
|
return tone === 'LightGrey' ? 'light-grey' : tone.toLowerCase();
|
|
38
42
|
}
|
|
39
43
|
|
|
44
|
+
function DatacenterDiskBar({
|
|
45
|
+
datacenter,
|
|
46
|
+
className,
|
|
47
|
+
}: Pick<DiskStateProgressBarProps, 'datacenter' | 'className'>) {
|
|
48
|
+
const name = datacenter?.name || datacenterI18n('value_unknown');
|
|
49
|
+
const colorClass = cn('ydb-datacenter-color')({
|
|
50
|
+
color: datacenter?.color || 'neutral',
|
|
51
|
+
variant: datacenter?.variant,
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<Flex
|
|
56
|
+
alignItems="center"
|
|
57
|
+
justifyContent="flex-start"
|
|
58
|
+
className={[className, colorClass].filter(Boolean).join(' ')}
|
|
59
|
+
role="img"
|
|
60
|
+
aria-label={name}
|
|
61
|
+
title={name}
|
|
62
|
+
>
|
|
63
|
+
{datacenter?.name ? (
|
|
64
|
+
<span className={b('datacenter-name')}>{name}</span>
|
|
65
|
+
) : (
|
|
66
|
+
<Icon data={CircleQuestionFill} size={10} />
|
|
67
|
+
)}
|
|
68
|
+
</Flex>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
40
72
|
export function DiskStateProgressBar({
|
|
41
73
|
allocation,
|
|
42
74
|
tone,
|
|
43
75
|
mode,
|
|
76
|
+
datacenter,
|
|
44
77
|
compact,
|
|
45
78
|
faded,
|
|
46
79
|
inactive,
|
|
@@ -70,7 +103,7 @@ export function DiskStateProgressBar({
|
|
|
70
103
|
borderless,
|
|
71
104
|
'all-mode-has-issues': mode === 'all' && strongFill,
|
|
72
105
|
'overlap-icon-at-top-left': overflowVisible,
|
|
73
|
-
[getToneModifier(tone)]:
|
|
106
|
+
[getToneModifier(tone)]: mode !== 'datacenter',
|
|
74
107
|
};
|
|
75
108
|
|
|
76
109
|
if (mode) {
|
|
@@ -78,6 +111,10 @@ export function DiskStateProgressBar({
|
|
|
78
111
|
mods['expert-mode'] = true;
|
|
79
112
|
}
|
|
80
113
|
|
|
114
|
+
if (mode === 'datacenter') {
|
|
115
|
+
return <DatacenterDiskBar datacenter={datacenter} className={b(mods, className)} />;
|
|
116
|
+
}
|
|
117
|
+
|
|
81
118
|
const hasAllocation = isNumeric(allocation) && allocation >= 0;
|
|
82
119
|
|
|
83
120
|
let allocationElement: React.ReactNode = null;
|
|
@@ -109,7 +109,7 @@ export function PDiskPopupContent({data, nodeData: parentNodeData}: PDiskPopupPr
|
|
|
109
109
|
label ? <DiskStatusLabel key={id} {...label} size="xs" /> : null,
|
|
110
110
|
)}
|
|
111
111
|
/>
|
|
112
|
-
<DiskPopupLocation items={locationItems} />
|
|
112
|
+
<DiskPopupLocation items={locationItems} datacenterColorKey={nodeData.DCKey} />
|
|
113
113
|
<YDBDefinitionList items={getPDiskRuntimeItems(data)} nameMaxWidth={150} />
|
|
114
114
|
{storageItems.length > 0 && (
|
|
115
115
|
<React.Fragment>
|
|
@@ -17,6 +17,7 @@ import {formatPDiskType} from '../../utils/disks/getPDiskType';
|
|
|
17
17
|
import {getVDiskStatusIcon} from '../../utils/disks/helpers';
|
|
18
18
|
import type {PreparedVDisk} from '../../utils/disks/types';
|
|
19
19
|
import {isNumeric} from '../../utils/utils';
|
|
20
|
+
import datacenterI18n from '../Datacenter/i18n';
|
|
20
21
|
import {AllModeIndicators} from '../DiskStateProgressBar/AllModeIndicators';
|
|
21
22
|
import {DiskBarLabel} from '../DiskStateProgressBar/DiskBarLabel';
|
|
22
23
|
import {DiskIndicator} from '../DiskStateProgressBar/DiskIndicator';
|
|
@@ -172,7 +173,7 @@ function getAccessibleDiskName(
|
|
|
172
173
|
|
|
173
174
|
function getAccessibleName(
|
|
174
175
|
data: PreparedVDisk,
|
|
175
|
-
{mode, allMode, isNoData, driveType}: VDiskDisplayState,
|
|
176
|
+
{mode, allMode, isNoData, driveType, datacenter}: VDiskDisplayState,
|
|
176
177
|
) {
|
|
177
178
|
if (!mode) {
|
|
178
179
|
return getAccessibleDiskName(data, {mode, isNoData});
|
|
@@ -187,6 +188,11 @@ function getAccessibleName(
|
|
|
187
188
|
const {FreshRank, LevelRank} = SatisfactionRank ?? {};
|
|
188
189
|
|
|
189
190
|
switch (mode) {
|
|
191
|
+
case 'datacenter':
|
|
192
|
+
return datacenterI18n('context_disk-datacenter', {
|
|
193
|
+
disk: diskName,
|
|
194
|
+
datacenter: datacenter?.name || datacenterI18n('value_unknown'),
|
|
195
|
+
});
|
|
190
196
|
case 'driveType':
|
|
191
197
|
return i18n('context_drive-type-accessible-name', {
|
|
192
198
|
disk: diskName,
|
|
@@ -359,6 +365,7 @@ export const VDisk = ({
|
|
|
359
365
|
<DiskStateProgressBar
|
|
360
366
|
allocation={allocatedPercent}
|
|
361
367
|
tone={tone}
|
|
368
|
+
datacenter={displayState.datacenter}
|
|
362
369
|
mode={mode}
|
|
363
370
|
compact={compact}
|
|
364
371
|
inactive={inactive}
|
|
@@ -297,7 +297,7 @@ export function VDiskPopup({
|
|
|
297
297
|
{pdisk && <PDiskPopupContent data={pdisk} nodeData={nodeData} />}
|
|
298
298
|
<DiskPopupPanel footer={vdiskFooter}>
|
|
299
299
|
<DiskHeader data={fullData} donorMode={data.DonorMode} withPDiskType={!pdisk} />
|
|
300
|
-
<DiskPopupLocation items={locationItems} />
|
|
300
|
+
<DiskPopupLocation items={locationItems} datacenterColorKey={nodeData.DCKey} />
|
|
301
301
|
{runtimeItems.length > 0 && (
|
|
302
302
|
<YDBDefinitionList items={runtimeItems} nameMaxWidth={150} />
|
|
303
303
|
)}
|
|
@@ -18,6 +18,7 @@ import type {Column} from '../../utils/tableUtils/types';
|
|
|
18
18
|
import {formatToMs, parseUsToMs} from '../../utils/timeParsers';
|
|
19
19
|
import {bytesToSpeed, isNumeric} from '../../utils/utils';
|
|
20
20
|
import {CellWithPopover} from '../CellWithPopover/CellWithPopover';
|
|
21
|
+
import {DatacenterLabel} from '../Datacenter/DatacenterLabel';
|
|
21
22
|
import {MemoryViewer} from '../MemoryViewer/MemoryViewer';
|
|
22
23
|
import {NodeHostWrapper} from '../NodeHostWrapper/NodeHostWrapper';
|
|
23
24
|
import {PoolsGraph} from '../PoolsGraph/PoolsGraph';
|
|
@@ -116,12 +117,12 @@ export function getDatabaseColumn<T extends {Database?: string}>(): Column<T> {
|
|
|
116
117
|
width: 200,
|
|
117
118
|
};
|
|
118
119
|
}
|
|
119
|
-
export function getDataCenterColumn<T extends {DC?: string}>(): Column<T> {
|
|
120
|
+
export function getDataCenterColumn<T extends {DC?: string; DCKey?: string}>(): Column<T> {
|
|
120
121
|
return {
|
|
121
122
|
name: NODES_COLUMNS_IDS.DC,
|
|
122
123
|
header: NODES_COLUMNS_TITLES.DC,
|
|
123
124
|
align: DataTable.LEFT,
|
|
124
|
-
render: ({row}) => row.DC
|
|
125
|
+
render: ({row}) => <DatacenterLabel name={row.DC} colorKey={row.DCKey} />,
|
|
125
126
|
width: 60,
|
|
126
127
|
};
|
|
127
128
|
}
|
|
@@ -144,6 +145,21 @@ export function getPileNameColumn<T extends {PileName?: string}>(): Column<T> {
|
|
|
144
145
|
width: 100,
|
|
145
146
|
};
|
|
146
147
|
}
|
|
148
|
+
export function getRolesColumn<T extends {Roles?: string[]}>(): Column<T> {
|
|
149
|
+
return {
|
|
150
|
+
name: NODES_COLUMNS_IDS.Roles,
|
|
151
|
+
header: NODES_COLUMNS_TITLES.Roles,
|
|
152
|
+
width: 300,
|
|
153
|
+
align: DataTable.LEFT,
|
|
154
|
+
render: ({row}) => {
|
|
155
|
+
if (!row.Roles?.length) {
|
|
156
|
+
return EMPTY_DATA_PLACEHOLDER;
|
|
157
|
+
}
|
|
158
|
+
const roles = row.Roles.join(', ');
|
|
159
|
+
return <CellWithPopover content={roles}>{roles}</CellWithPopover>;
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
}
|
|
147
163
|
export function getVersionColumn<T extends {Version?: string}>(): Column<T> {
|
|
148
164
|
return {
|
|
149
165
|
name: NODES_COLUMNS_IDS.Version,
|
|
@@ -38,6 +38,7 @@ export const NODES_COLUMNS_IDS = {
|
|
|
38
38
|
Tablets: 'Tablets',
|
|
39
39
|
PDisks: 'PDisks',
|
|
40
40
|
PileName: 'PileName',
|
|
41
|
+
Roles: 'Roles',
|
|
41
42
|
PDiskUsage: CAPACITY_METRICS_COLUMN_IDS.MaxPDiskUsage,
|
|
42
43
|
VDiskSlotUsage: CAPACITY_METRICS_COLUMN_IDS.MaxVDiskSlotUsage,
|
|
43
44
|
VDiskRawUsage: CAPACITY_METRICS_COLUMN_IDS.MaxVDiskRawUsage,
|
|
@@ -146,6 +147,9 @@ export const NODES_COLUMNS_TITLES = {
|
|
|
146
147
|
get PileName() {
|
|
147
148
|
return i18n('field_pile-name');
|
|
148
149
|
},
|
|
150
|
+
get Roles() {
|
|
151
|
+
return i18n('field_roles');
|
|
152
|
+
},
|
|
149
153
|
get MaxPDiskUsage() {
|
|
150
154
|
return CAPACITY_METRICS_COLUMN_TITLES.MaxPDiskUsage;
|
|
151
155
|
},
|
|
@@ -249,6 +253,7 @@ export const NODES_COLUMNS_TO_DATA_FIELDS: Record<NodesColumnId, NodesRequiredFi
|
|
|
249
253
|
Tablets: ['Tablets', 'Database'],
|
|
250
254
|
PDisks: ['PDisks'],
|
|
251
255
|
PileName: ['PileName'],
|
|
256
|
+
Roles: ['SystemState'],
|
|
252
257
|
MaxPDiskUsage: ['MaxPDiskUsage'],
|
|
253
258
|
MaxVDiskSlotUsage: ['MaxVDiskSlotUsage', 'CapacityAlert'],
|
|
254
259
|
MaxVDiskRawUsage: ['MaxVDiskRawUsage'],
|
|
@@ -284,6 +289,7 @@ const NODES_COLUMNS_TO_SORT_FIELDS: Record<NodesColumnId, NodesSortValue | undef
|
|
|
284
289
|
Tablets: undefined,
|
|
285
290
|
PDisks: undefined,
|
|
286
291
|
PileName: undefined,
|
|
292
|
+
Roles: undefined,
|
|
287
293
|
MaxPDiskUsage: 'MaxPDiskUsage',
|
|
288
294
|
MaxVDiskSlotUsage: 'MaxVDiskSlotUsage',
|
|
289
295
|
MaxVDiskRawUsage: 'MaxVDiskRawUsage',
|
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
@forward '../../styles/versions.scss';
|
|
5
5
|
@forward '../../styles/unipika.scss';
|
|
6
6
|
|
|
7
|
-
@import url('https://fonts.googleapis.com/css2?family=Rubik&display=swap');
|
|
8
|
-
|
|
9
7
|
* {
|
|
10
8
|
// FIXME: this is an overkill, potentially could break external components, needs refactoring
|
|
11
9
|
box-sizing: border-box;
|
|
@@ -50,7 +50,14 @@ function AppContent({
|
|
|
50
50
|
|
|
51
51
|
return (
|
|
52
52
|
<React.Fragment>
|
|
53
|
-
<Helmet defaultTitle={appTitle} titleTemplate={`%s — ${appTitle}`}
|
|
53
|
+
<Helmet defaultTitle={appTitle} titleTemplate={`%s — ${appTitle}`}>
|
|
54
|
+
{singleClusterMode && (
|
|
55
|
+
<link
|
|
56
|
+
rel="stylesheet"
|
|
57
|
+
href="https://fonts.googleapis.com/css2?family=Rubik&display=swap"
|
|
58
|
+
/>
|
|
59
|
+
)}
|
|
60
|
+
</Helmet>
|
|
54
61
|
<FullscreenProvider fullscreenRootRef={fullscreenRootRef}>
|
|
55
62
|
<ContentWrapper>
|
|
56
63
|
<NavigationWrapper
|
|
@@ -20,9 +20,11 @@ import {
|
|
|
20
20
|
useMetaCapabilitiesQuery,
|
|
21
21
|
} from '../../store/reducers/capabilities/hooks';
|
|
22
22
|
import {nodesListApi} from '../../store/reducers/nodesList';
|
|
23
|
+
import {SETTING_KEYS} from '../../store/reducers/settings/constants';
|
|
23
24
|
import {cn} from '../../utils/cn';
|
|
24
|
-
import {useDatabaseFromQuery} from '../../utils/hooks/useDatabaseFromQuery';
|
|
25
25
|
import {useMetaAuthUnavailable} from '../../utils/hooks/useMetaAuth';
|
|
26
|
+
import {useNodesListQueryArgs} from '../../utils/hooks/useNodesListQueryArgs';
|
|
27
|
+
import {useSetting} from '../../utils/hooks/useSetting';
|
|
26
28
|
import {lazyComponent} from '../../utils/lazyComponent';
|
|
27
29
|
import {isForbiddenError, isRedirectToAuth, isUnauthenticatedError} from '../../utils/response';
|
|
28
30
|
import Authentication from '../Authentication/Authentication';
|
|
@@ -225,8 +227,10 @@ function HomePageDataWrapper({children}: {children: React.ReactNode}) {
|
|
|
225
227
|
}
|
|
226
228
|
|
|
227
229
|
function GetNodesList() {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
+
// Load the remote setting here; cache readers only use its value from the store.
|
|
231
|
+
useSetting(SETTING_KEYS.TENANT_INITIAL_PAGE);
|
|
232
|
+
const args = useNodesListQueryArgs();
|
|
233
|
+
nodesListApi.useGetNodesListQuery(args);
|
|
230
234
|
return null;
|
|
231
235
|
}
|
|
232
236
|
|
|
@@ -32,7 +32,10 @@ import {cn} from '../../utils/cn';
|
|
|
32
32
|
import {DEFAULT_CLUSTER_TAB_KEY} from '../../utils/constants';
|
|
33
33
|
import {isModifiedClickEvent} from '../../utils/events';
|
|
34
34
|
import {useAutoRefreshInterval, useTypedDispatch, useTypedSelector} from '../../utils/hooks';
|
|
35
|
-
import {
|
|
35
|
+
import {
|
|
36
|
+
useIsUserAllowedToMakeChanges,
|
|
37
|
+
useIsViewerUser,
|
|
38
|
+
} from '../../utils/hooks/useIsUserAllowedToMakeChanges';
|
|
36
39
|
import {useSetting} from '../../utils/hooks/useSetting';
|
|
37
40
|
import {useAppTitle} from '../App/AppTitleContext';
|
|
38
41
|
import {Configs} from '../Configs/Configs';
|
|
@@ -66,6 +69,7 @@ export function Cluster({additionalClusterProps, additionalTenantsProps}: Cluste
|
|
|
66
69
|
const shouldShowNetworkTable = useNodesHandlerHasWorkingClusterNetworkStats();
|
|
67
70
|
const shouldShowEventsTab = useShouldShowEventsTab();
|
|
68
71
|
const isViewerUser = useIsViewerUser();
|
|
72
|
+
const healthcheckAvailable = useIsUserAllowedToMakeChanges();
|
|
69
73
|
const isConfigsAvailable = useConfigAvailable();
|
|
70
74
|
|
|
71
75
|
const showConfigs = isViewerUser && isConfigsAvailable;
|
|
@@ -137,7 +141,9 @@ export function Cluster({additionalClusterProps, additionalTenantsProps}: Cluste
|
|
|
137
141
|
return (
|
|
138
142
|
<EntityStatus className={b('title')}>
|
|
139
143
|
{clusterTitle}
|
|
140
|
-
|
|
144
|
+
{healthcheckAvailable && (
|
|
145
|
+
<EntityStatus.Label status={clusterStatus} onClick={handleStatusClick} />
|
|
146
|
+
)}
|
|
141
147
|
</EntityStatus>
|
|
142
148
|
);
|
|
143
149
|
};
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
selectCheckStatus,
|
|
8
8
|
} from '../../store/reducers/healthcheckInfo/healthcheckInfo';
|
|
9
9
|
import {useTypedSelector} from '../../utils/hooks';
|
|
10
|
+
import {useIsUserAllowedToMakeChanges} from '../../utils/hooks/useIsUserAllowedToMakeChanges';
|
|
10
11
|
import {Healthcheck} from '../Tenant/Healthcheck/Healthcheck';
|
|
11
12
|
import {HealthcheckDrawer} from '../Tenant/Healthcheck/components/HealthcheckDrawer';
|
|
12
13
|
import {getDatabaseHealthcheckAssistantTarget} from '../Tenant/Healthcheck/utils';
|
|
@@ -100,8 +101,15 @@ export function ClusterDrawerHealthcheck({
|
|
|
100
101
|
database,
|
|
101
102
|
clusterName,
|
|
102
103
|
}: ClusterDrawerHealthcheckProps) {
|
|
103
|
-
const
|
|
104
|
-
|
|
104
|
+
const healthcheckAvailable = useIsUserAllowedToMakeChanges();
|
|
105
|
+
const {
|
|
106
|
+
showHealthcheck,
|
|
107
|
+
healthcheckIssue,
|
|
108
|
+
healthcheckLeaf,
|
|
109
|
+
issuesFilter,
|
|
110
|
+
view,
|
|
111
|
+
handleCloseHealthcheck,
|
|
112
|
+
} = useClusterHealthcheckQueryParams();
|
|
105
113
|
|
|
106
114
|
const healthcheckStatus = useTypedSelector((state) =>
|
|
107
115
|
selectCheckStatus(state, database, clusterName),
|
|
@@ -170,6 +178,25 @@ export function ClusterDrawerHealthcheck({
|
|
|
170
178
|
handleCloseHealthcheck();
|
|
171
179
|
}, [handleCloseHealthcheck]);
|
|
172
180
|
|
|
181
|
+
React.useEffect(() => {
|
|
182
|
+
if (
|
|
183
|
+
healthcheckAvailable === false &&
|
|
184
|
+
[showHealthcheck, healthcheckIssue, healthcheckLeaf, issuesFilter, view].some(
|
|
185
|
+
(value) => value !== undefined,
|
|
186
|
+
)
|
|
187
|
+
) {
|
|
188
|
+
handleCloseDrawer();
|
|
189
|
+
}
|
|
190
|
+
}, [
|
|
191
|
+
healthcheckAvailable,
|
|
192
|
+
showHealthcheck,
|
|
193
|
+
healthcheckIssue,
|
|
194
|
+
healthcheckLeaf,
|
|
195
|
+
issuesFilter,
|
|
196
|
+
view,
|
|
197
|
+
handleCloseDrawer,
|
|
198
|
+
]);
|
|
199
|
+
|
|
173
200
|
const renderDrawerContent = React.useCallback(() => {
|
|
174
201
|
return (
|
|
175
202
|
<Healthcheck
|
|
@@ -190,7 +217,7 @@ export function ClusterDrawerHealthcheck({
|
|
|
190
217
|
clusterName,
|
|
191
218
|
scope: 'cluster',
|
|
192
219
|
})}
|
|
193
|
-
isDrawerVisible={Boolean(showHealthcheck
|
|
220
|
+
isDrawerVisible={Boolean(healthcheckAvailable && showHealthcheck && database)}
|
|
194
221
|
onCloseDrawer={handleCloseDrawer}
|
|
195
222
|
onTransitionInComplete={
|
|
196
223
|
healthcheckIssue && healthcheckLeaf ? handleTransitionInComplete : undefined
|
|
@@ -25,6 +25,7 @@ import {cn} from '../../../../utils/cn';
|
|
|
25
25
|
import {EMPTY_DATA_PLACEHOLDER} from '../../../../utils/constants';
|
|
26
26
|
import {formatNumber} from '../../../../utils/dataFormatters/dataFormatters';
|
|
27
27
|
import {useAutoRefreshInterval, useTypedSelector} from '../../../../utils/hooks';
|
|
28
|
+
import {useIsUserAllowedToMakeChanges} from '../../../../utils/hooks/useIsUserAllowedToMakeChanges';
|
|
28
29
|
import {useClusterHealthcheckQueryParams} from '../../ClusterDrawerHealthcheck';
|
|
29
30
|
import i18n from '../../i18n';
|
|
30
31
|
|
|
@@ -106,6 +107,7 @@ interface BridgeInfoTableProps {
|
|
|
106
107
|
interface BridgePileCardProps {
|
|
107
108
|
pile: TBridgePile;
|
|
108
109
|
current: boolean;
|
|
110
|
+
healthcheckAllowed: boolean;
|
|
109
111
|
healthcheckAvailable: boolean;
|
|
110
112
|
healthcheckSupportsPiles: boolean;
|
|
111
113
|
healthcheckLoading: boolean;
|
|
@@ -116,6 +118,7 @@ interface BridgePileCardProps {
|
|
|
116
118
|
const BridgePileCard = React.memo(function BridgePileCard({
|
|
117
119
|
pile,
|
|
118
120
|
current,
|
|
121
|
+
healthcheckAllowed,
|
|
119
122
|
healthcheckAvailable,
|
|
120
123
|
healthcheckSupportsPiles,
|
|
121
124
|
healthcheckLoading,
|
|
@@ -187,28 +190,29 @@ const BridgePileCard = React.memo(function BridgePileCard({
|
|
|
187
190
|
</Flex>
|
|
188
191
|
<Flex gap={2} alignItems="center" wrap>
|
|
189
192
|
{stateStatus}
|
|
190
|
-
{
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
{
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
193
|
+
{healthcheckAllowed &&
|
|
194
|
+
(healthcheckLoading ? (
|
|
195
|
+
<Skeleton className={b('healthcheck-skeleton')} />
|
|
196
|
+
) : (
|
|
197
|
+
<EntityStatus.Label
|
|
198
|
+
status={pileHealthcheck.status}
|
|
199
|
+
size="xs"
|
|
200
|
+
className={b('healthcheck-status')}
|
|
201
|
+
onClick={pileHealthcheck.target ? handleHealthcheckClick : undefined}
|
|
202
|
+
endContent={
|
|
203
|
+
pileHealthcheck.target ? (
|
|
204
|
+
<Icon data={ChevronRight} size={12} />
|
|
205
|
+
) : undefined
|
|
206
|
+
}
|
|
207
|
+
qa="bridge-pile-healthcheck"
|
|
208
|
+
>
|
|
209
|
+
{pileHealthcheck.target ? (
|
|
210
|
+
<span className={b('healthcheck-accessible-prefix')}>
|
|
211
|
+
{i18n('label_bridge-pile-health-status-prefix', {pileName})}
|
|
212
|
+
</span>
|
|
213
|
+
) : null}
|
|
214
|
+
</EntityStatus.Label>
|
|
215
|
+
))}
|
|
212
216
|
</Flex>
|
|
213
217
|
<Flex gap={1} alignItems="center" className={b('nodes')}>
|
|
214
218
|
<Icon data={Archive} size={14} />
|
|
@@ -226,6 +230,7 @@ export const BridgeInfoTable = React.memo(function BridgeInfoTable({
|
|
|
226
230
|
clusterName,
|
|
227
231
|
}: BridgeInfoTableProps) {
|
|
228
232
|
const [autoRefreshInterval] = useAutoRefreshInterval();
|
|
233
|
+
const isMonitoringAllowed = useIsUserAllowedToMakeChanges();
|
|
229
234
|
const {handleOpenHealthcheckIssue} = useClusterHealthcheckQueryParams();
|
|
230
235
|
const {
|
|
231
236
|
currentData: healthcheckData,
|
|
@@ -235,14 +240,17 @@ export const BridgeInfoTable = React.memo(function BridgeInfoTable({
|
|
|
235
240
|
{database: database ?? '', clusterName},
|
|
236
241
|
{
|
|
237
242
|
pollingInterval: autoRefreshInterval,
|
|
238
|
-
skip: !database,
|
|
243
|
+
skip: !database || !isMonitoringAllowed,
|
|
239
244
|
},
|
|
240
245
|
);
|
|
241
246
|
const leavesIssues = useTypedSelector((state) =>
|
|
242
247
|
selectLeavesIssues(state, database ?? '', clusterName),
|
|
243
248
|
);
|
|
244
249
|
|
|
245
|
-
const healthcheckAvailable =
|
|
250
|
+
const healthcheckAvailable =
|
|
251
|
+
Boolean(isMonitoringAllowed) &&
|
|
252
|
+
healthcheckData !== undefined &&
|
|
253
|
+
healthcheckError === undefined;
|
|
246
254
|
const healthcheckLoading = healthcheckData === undefined && healthcheckFetching;
|
|
247
255
|
const currentPileName = healthcheckData?.location?.pile?.name;
|
|
248
256
|
const healthcheckSupportsPiles = healthcheckData?.location?.pile !== undefined;
|
|
@@ -267,6 +275,7 @@ export const BridgeInfoTable = React.memo(function BridgeInfoTable({
|
|
|
267
275
|
key={pile.PileId ?? pile.Name ?? index}
|
|
268
276
|
pile={pile}
|
|
269
277
|
current={Boolean(currentPileName?.trim() && pile.Name === currentPileName)}
|
|
278
|
+
healthcheckAllowed={Boolean(isMonitoringAllowed)}
|
|
270
279
|
healthcheckAvailable={healthcheckAvailable}
|
|
271
280
|
healthcheckSupportsPiles={healthcheckSupportsPiles}
|
|
272
281
|
healthcheckLoading={healthcheckLoading}
|
|
@@ -24,6 +24,7 @@ import type {ClusterAvailability, PreparedCluster} from '../../store/reducers/cl
|
|
|
24
24
|
import {uiFactory} from '../../uiFactory/uiFactory';
|
|
25
25
|
import {DEFAULT_TABLE_SETTINGS, EMPTY_DATA_PLACEHOLDER} from '../../utils/constants';
|
|
26
26
|
import {useAutoRefreshInterval, useTypedDispatch, useTypedSelector} from '../../utils/hooks';
|
|
27
|
+
import {useIsUserAllowedToMakeChanges} from '../../utils/hooks/useIsUserAllowedToMakeChanges';
|
|
27
28
|
import {useSelectedColumns} from '../../utils/hooks/useSelectedColumns';
|
|
28
29
|
import {getMinorVersion} from '../../utils/versions';
|
|
29
30
|
|
|
@@ -54,6 +55,8 @@ export function Clusters({scrollContainerRef}: ClustersProps) {
|
|
|
54
55
|
const dispatch = useTypedDispatch();
|
|
55
56
|
|
|
56
57
|
const emMetaAvailable = useEmMetaAvailable();
|
|
58
|
+
const isMonitoringAllowed = useIsUserAllowedToMakeChanges();
|
|
59
|
+
const healthcheckAvailable = !emMetaAvailable || isMonitoringAllowed;
|
|
57
60
|
const isEditClusterAvailable = emMetaAvailable && uiFactory.onEditCluster !== undefined;
|
|
58
61
|
const isDeleteClusterAvailable = emMetaAvailable && uiFactory.onDeleteCluster !== undefined;
|
|
59
62
|
|
|
@@ -106,11 +109,12 @@ export function Clusters({scrollContainerRef}: ClustersProps) {
|
|
|
106
109
|
}, []);
|
|
107
110
|
const rawColumns = React.useMemo(() => {
|
|
108
111
|
return getClustersColumns({
|
|
112
|
+
healthcheckAvailable: Boolean(healthcheckAvailable),
|
|
109
113
|
isEditClusterAvailable,
|
|
110
114
|
isDeleteClusterAvailable,
|
|
111
|
-
onStatusClick: handleStatusClick,
|
|
115
|
+
onStatusClick: healthcheckAvailable ? handleStatusClick : undefined,
|
|
112
116
|
});
|
|
113
|
-
}, [isDeleteClusterAvailable, isEditClusterAvailable, handleStatusClick]);
|
|
117
|
+
}, [isDeleteClusterAvailable, isEditClusterAvailable, handleStatusClick, healthcheckAvailable]);
|
|
114
118
|
|
|
115
119
|
const clusters = query.data;
|
|
116
120
|
const hasUnavailableClusters = clusters?.some(
|
|
@@ -376,7 +380,7 @@ export function Clusters({scrollContainerRef}: ClustersProps) {
|
|
|
376
380
|
return (
|
|
377
381
|
<ClusterDrawerHealthcheck
|
|
378
382
|
clusterName={healthcheckClusterName}
|
|
379
|
-
isVisible={Boolean(healthcheckClusterName)}
|
|
383
|
+
isVisible={Boolean(healthcheckAvailable && healthcheckClusterName)}
|
|
380
384
|
onClose={handleDrawerClose}
|
|
381
385
|
>
|
|
382
386
|
<div>
|
|
@@ -81,12 +81,14 @@ export function getFirstVersion(preparedVersions: PreparedVersion[]): string | u
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
interface ClustersColumnsParams {
|
|
84
|
+
healthcheckAvailable?: boolean;
|
|
84
85
|
isEditClusterAvailable?: boolean;
|
|
85
86
|
isDeleteClusterAvailable?: boolean;
|
|
86
87
|
onStatusClick?: (row: PreparedCluster) => void;
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
function getTitleColumn({
|
|
91
|
+
healthcheckAvailable = true,
|
|
90
92
|
isEditClusterAvailable,
|
|
91
93
|
isDeleteClusterAvailable,
|
|
92
94
|
onStatusClick,
|
|
@@ -190,6 +192,10 @@ function getTitleColumn({
|
|
|
190
192
|
};
|
|
191
193
|
|
|
192
194
|
const renderStatus = () => {
|
|
195
|
+
if (!healthcheckAvailable) {
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
|
|
193
199
|
const statusLabel = clusterStatus ? (
|
|
194
200
|
<EntityStatus.Label status={clusterStatus} size="xs" />
|
|
195
201
|
) : (
|