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
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
// Datacenter palette from Figma. Token names are independent of DC identities.
|
|
2
|
+
|
|
3
|
+
.g-root_theme_light,
|
|
4
|
+
.g-root_theme_light-hc {
|
|
5
|
+
--ydb-dc-turquoise-text: #005c54;
|
|
6
|
+
--ydb-dc-turquoise-base: #00b8a933;
|
|
7
|
+
--ydb-dc-turquoise-base-hover: #00b8a947;
|
|
8
|
+
--ydb-dc-turquoise-outline-base: #00b8a900;
|
|
9
|
+
--ydb-dc-turquoise-outline-base-hover: #00b8a91a;
|
|
10
|
+
--ydb-dc-turquoise-outline-stroke: #00b8a9d9;
|
|
11
|
+
--ydb-dc-turquoise-filled-outline-base: #00b8a91f;
|
|
12
|
+
--ydb-dc-turquoise-filled-outline-base-hover: #00b8a933;
|
|
13
|
+
--ydb-dc-turquoise-filled-outline-stroke: #00b8a9ad;
|
|
14
|
+
|
|
15
|
+
--ydb-dc-purple-text: #6420aa;
|
|
16
|
+
--ydb-dc-purple-base: #9836f433;
|
|
17
|
+
--ydb-dc-purple-base-hover: #9836f447;
|
|
18
|
+
--ydb-dc-purple-outline-base: #9836f400;
|
|
19
|
+
--ydb-dc-purple-outline-base-hover: #9836f41a;
|
|
20
|
+
--ydb-dc-purple-outline-stroke: #9836f4d9;
|
|
21
|
+
--ydb-dc-purple-filled-outline-base: #9836f41f;
|
|
22
|
+
--ydb-dc-purple-filled-outline-base-hover: #9836f433;
|
|
23
|
+
--ydb-dc-purple-filled-outline-stroke: #9836f4ad;
|
|
24
|
+
|
|
25
|
+
--ydb-dc-blue-text: #153ab0;
|
|
26
|
+
--ydb-dc-blue-base: #2059ff33;
|
|
27
|
+
--ydb-dc-blue-base-hover: #2059ff47;
|
|
28
|
+
--ydb-dc-blue-outline-base: #2059ff00;
|
|
29
|
+
--ydb-dc-blue-outline-base-hover: #2059ff1a;
|
|
30
|
+
--ydb-dc-blue-outline-stroke: #2059ffd9;
|
|
31
|
+
--ydb-dc-blue-filled-outline-base: #2059ff1f;
|
|
32
|
+
--ydb-dc-blue-filled-outline-base-hover: #2059ff33;
|
|
33
|
+
--ydb-dc-blue-filled-outline-stroke: #2059ffad;
|
|
34
|
+
|
|
35
|
+
--ydb-dc-orange-text: #843e00;
|
|
36
|
+
--ydb-dc-orange-base: #f5840033;
|
|
37
|
+
--ydb-dc-orange-base-hover: #f5840047;
|
|
38
|
+
--ydb-dc-orange-outline-base: #f5840000;
|
|
39
|
+
--ydb-dc-orange-outline-base-hover: #f584001a;
|
|
40
|
+
--ydb-dc-orange-outline-stroke: #f58400d9;
|
|
41
|
+
--ydb-dc-orange-filled-outline-base: #f584001f;
|
|
42
|
+
--ydb-dc-orange-filled-outline-base-hover: #f5840033;
|
|
43
|
+
--ydb-dc-orange-filled-outline-stroke: #f58400ad;
|
|
44
|
+
|
|
45
|
+
--ydb-dc-red-text: #951121;
|
|
46
|
+
--ydb-dc-red-base: #e62e4033;
|
|
47
|
+
--ydb-dc-red-base-hover: #e62e4047;
|
|
48
|
+
--ydb-dc-red-outline-base: #e62e4000;
|
|
49
|
+
--ydb-dc-red-outline-base-hover: #e62e401a;
|
|
50
|
+
--ydb-dc-red-outline-stroke: #e62e40d9;
|
|
51
|
+
--ydb-dc-red-filled-outline-base: #e62e401f;
|
|
52
|
+
--ydb-dc-red-filled-outline-base-hover: #e62e4033;
|
|
53
|
+
--ydb-dc-red-filled-outline-stroke: #e62e40ad;
|
|
54
|
+
|
|
55
|
+
--ydb-dc-pink-text: #86115b;
|
|
56
|
+
--ydb-dc-pink-base: #e3269f33;
|
|
57
|
+
--ydb-dc-pink-base-hover: #e3269f47;
|
|
58
|
+
--ydb-dc-pink-outline-base: #e3269f00;
|
|
59
|
+
--ydb-dc-pink-outline-base-hover: #e3269f1a;
|
|
60
|
+
--ydb-dc-pink-outline-stroke: #e3269fd9;
|
|
61
|
+
--ydb-dc-pink-filled-outline-base: #e3269f1f;
|
|
62
|
+
--ydb-dc-pink-filled-outline-base-hover: #e3269f33;
|
|
63
|
+
--ydb-dc-pink-filled-outline-stroke: #e3269fad;
|
|
64
|
+
|
|
65
|
+
--ydb-dc-sky-text: #00577f;
|
|
66
|
+
--ydb-dc-sky-base: #00a7ef33;
|
|
67
|
+
--ydb-dc-sky-base-hover: #00a7ef47;
|
|
68
|
+
--ydb-dc-sky-outline-base: #00a7ef00;
|
|
69
|
+
--ydb-dc-sky-outline-base-hover: #00a7ef1a;
|
|
70
|
+
--ydb-dc-sky-outline-stroke: #00a7efd9;
|
|
71
|
+
--ydb-dc-sky-filled-outline-base: #00a7ef1f;
|
|
72
|
+
--ydb-dc-sky-filled-outline-base-hover: #00a7ef33;
|
|
73
|
+
--ydb-dc-sky-filled-outline-stroke: #00a7efad;
|
|
74
|
+
|
|
75
|
+
--ydb-dc-brown-text: #5f3b23;
|
|
76
|
+
--ydb-dc-brown-base: #865a3d33;
|
|
77
|
+
--ydb-dc-brown-base-hover: #865a3d47;
|
|
78
|
+
--ydb-dc-brown-outline-base: #865a3d00;
|
|
79
|
+
--ydb-dc-brown-outline-base-hover: #865a3d1a;
|
|
80
|
+
--ydb-dc-brown-outline-stroke: #865a3dd9;
|
|
81
|
+
--ydb-dc-brown-filled-outline-base: #865a3d1f;
|
|
82
|
+
--ydb-dc-brown-filled-outline-base-hover: #865a3d33;
|
|
83
|
+
--ydb-dc-brown-filled-outline-stroke: #865a3dad;
|
|
84
|
+
|
|
85
|
+
--ydb-dc-green-text: #166020;
|
|
86
|
+
--ydb-dc-green-base: #36b23b33;
|
|
87
|
+
--ydb-dc-green-base-hover: #36b23b47;
|
|
88
|
+
--ydb-dc-green-outline-base: #36b23b00;
|
|
89
|
+
--ydb-dc-green-outline-base-hover: #36b23b1a;
|
|
90
|
+
--ydb-dc-green-outline-stroke: #36b23bd9;
|
|
91
|
+
--ydb-dc-green-filled-outline-base: #36b23b1f;
|
|
92
|
+
--ydb-dc-green-filled-outline-base-hover: #36b23b33;
|
|
93
|
+
--ydb-dc-green-filled-outline-stroke: #36b23bad;
|
|
94
|
+
|
|
95
|
+
--ydb-dc-yellow-text: #655500;
|
|
96
|
+
--ydb-dc-yellow-base: #e6c80033;
|
|
97
|
+
--ydb-dc-yellow-base-hover: #e6c80047;
|
|
98
|
+
--ydb-dc-yellow-outline-base: #e6c80000;
|
|
99
|
+
--ydb-dc-yellow-outline-base-hover: #e6c8001a;
|
|
100
|
+
--ydb-dc-yellow-outline-stroke: #e6c800d9;
|
|
101
|
+
--ydb-dc-yellow-filled-outline-base: #e6c8001f;
|
|
102
|
+
--ydb-dc-yellow-filled-outline-base-hover: #e6c80033;
|
|
103
|
+
--ydb-dc-yellow-filled-outline-stroke: #e6c800ad;
|
|
104
|
+
|
|
105
|
+
--ydb-dc-sage-text: #305851;
|
|
106
|
+
--ydb-dc-sage-base: #4d9b8733;
|
|
107
|
+
--ydb-dc-sage-base-hover: #4d9b8747;
|
|
108
|
+
--ydb-dc-sage-outline-base: #4d9b8700;
|
|
109
|
+
--ydb-dc-sage-outline-base-hover: #4d9b871a;
|
|
110
|
+
--ydb-dc-sage-outline-stroke: #4d9b87d9;
|
|
111
|
+
--ydb-dc-sage-filled-outline-base: #4d9b871f;
|
|
112
|
+
--ydb-dc-sage-filled-outline-base-hover: #4d9b8733;
|
|
113
|
+
--ydb-dc-sage-filled-outline-stroke: #4d9b87ad;
|
|
114
|
+
|
|
115
|
+
--ydb-dc-slate-text: #44465f;
|
|
116
|
+
--ydb-dc-slate-base: #7476a433;
|
|
117
|
+
--ydb-dc-slate-base-hover: #7476a447;
|
|
118
|
+
--ydb-dc-slate-outline-base: #7476a400;
|
|
119
|
+
--ydb-dc-slate-outline-base-hover: #7476a41a;
|
|
120
|
+
--ydb-dc-slate-outline-stroke: #7476a4d9;
|
|
121
|
+
--ydb-dc-slate-filled-outline-base: #7476a41f;
|
|
122
|
+
--ydb-dc-slate-filled-outline-base-hover: #7476a433;
|
|
123
|
+
--ydb-dc-slate-filled-outline-stroke: #7476a4ad;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.g-root_theme_dark,
|
|
127
|
+
.g-root_theme_dark-hc {
|
|
128
|
+
--ydb-dc-turquoise-text: #71f1de;
|
|
129
|
+
--ydb-dc-turquoise-base: #00c9ba33;
|
|
130
|
+
--ydb-dc-turquoise-base-hover: #00c9ba47;
|
|
131
|
+
--ydb-dc-turquoise-outline-base: #00c9ba00;
|
|
132
|
+
--ydb-dc-turquoise-outline-base-hover: #00c9ba1a;
|
|
133
|
+
--ydb-dc-turquoise-outline-stroke: #00c9bad1;
|
|
134
|
+
--ydb-dc-turquoise-filled-outline-base: #00c9ba29;
|
|
135
|
+
--ydb-dc-turquoise-filled-outline-base-hover: #00c9ba3d;
|
|
136
|
+
--ydb-dc-turquoise-filled-outline-stroke: #00c9baa6;
|
|
137
|
+
|
|
138
|
+
--ydb-dc-purple-text: #e3beff;
|
|
139
|
+
--ydb-dc-purple-base: #ad60ff33;
|
|
140
|
+
--ydb-dc-purple-base-hover: #ad60ff47;
|
|
141
|
+
--ydb-dc-purple-outline-base: #ad60ff00;
|
|
142
|
+
--ydb-dc-purple-outline-base-hover: #ad60ff1a;
|
|
143
|
+
--ydb-dc-purple-outline-stroke: #ad60ffd1;
|
|
144
|
+
--ydb-dc-purple-filled-outline-base: #ad60ff29;
|
|
145
|
+
--ydb-dc-purple-filled-outline-base-hover: #ad60ff3d;
|
|
146
|
+
--ydb-dc-purple-filled-outline-stroke: #ad60ffa6;
|
|
147
|
+
|
|
148
|
+
--ydb-dc-blue-text: #abc4ff;
|
|
149
|
+
--ydb-dc-blue-base: #4176ff33;
|
|
150
|
+
--ydb-dc-blue-base-hover: #4176ff47;
|
|
151
|
+
--ydb-dc-blue-outline-base: #4176ff00;
|
|
152
|
+
--ydb-dc-blue-outline-base-hover: #4176ff1a;
|
|
153
|
+
--ydb-dc-blue-outline-stroke: #4176ffd1;
|
|
154
|
+
--ydb-dc-blue-filled-outline-base: #4176ff29;
|
|
155
|
+
--ydb-dc-blue-filled-outline-base-hover: #4176ff3d;
|
|
156
|
+
--ydb-dc-blue-filled-outline-stroke: #4176ffa6;
|
|
157
|
+
|
|
158
|
+
--ydb-dc-orange-text: #ffce95;
|
|
159
|
+
--ydb-dc-orange-base: #ff880033;
|
|
160
|
+
--ydb-dc-orange-base-hover: #ff880047;
|
|
161
|
+
--ydb-dc-orange-outline-base: #ff880000;
|
|
162
|
+
--ydb-dc-orange-outline-base-hover: #ff88001a;
|
|
163
|
+
--ydb-dc-orange-outline-stroke: #ff8800d1;
|
|
164
|
+
--ydb-dc-orange-filled-outline-base: #ff880029;
|
|
165
|
+
--ydb-dc-orange-filled-outline-base-hover: #ff88003d;
|
|
166
|
+
--ydb-dc-orange-filled-outline-stroke: #ff8800a6;
|
|
167
|
+
|
|
168
|
+
--ydb-dc-red-text: #ffb4ba;
|
|
169
|
+
--ydb-dc-red-base: #ff405233;
|
|
170
|
+
--ydb-dc-red-base-hover: #ff405247;
|
|
171
|
+
--ydb-dc-red-outline-base: #ff405200;
|
|
172
|
+
--ydb-dc-red-outline-base-hover: #ff40521a;
|
|
173
|
+
--ydb-dc-red-outline-stroke: #ff4052d1;
|
|
174
|
+
--ydb-dc-red-filled-outline-base: #ff405229;
|
|
175
|
+
--ydb-dc-red-filled-outline-base-hover: #ff40523d;
|
|
176
|
+
--ydb-dc-red-filled-outline-stroke: #ff4052a6;
|
|
177
|
+
|
|
178
|
+
--ydb-dc-pink-text: #ffb0e2;
|
|
179
|
+
--ydb-dc-pink-base: #f444b733;
|
|
180
|
+
--ydb-dc-pink-base-hover: #f444b747;
|
|
181
|
+
--ydb-dc-pink-outline-base: #f444b700;
|
|
182
|
+
--ydb-dc-pink-outline-base-hover: #f444b71a;
|
|
183
|
+
--ydb-dc-pink-outline-stroke: #f444b7d1;
|
|
184
|
+
--ydb-dc-pink-filled-outline-base: #f444b729;
|
|
185
|
+
--ydb-dc-pink-filled-outline-base-hover: #f444b73d;
|
|
186
|
+
--ydb-dc-pink-filled-outline-stroke: #f444b7a6;
|
|
187
|
+
|
|
188
|
+
--ydb-dc-sky-text: #98e4ff;
|
|
189
|
+
--ydb-dc-sky-base: #24bfff33;
|
|
190
|
+
--ydb-dc-sky-base-hover: #24bfff47;
|
|
191
|
+
--ydb-dc-sky-outline-base: #24bfff00;
|
|
192
|
+
--ydb-dc-sky-outline-base-hover: #24bfff1a;
|
|
193
|
+
--ydb-dc-sky-outline-stroke: #24bfffd1;
|
|
194
|
+
--ydb-dc-sky-filled-outline-base: #24bfff29;
|
|
195
|
+
--ydb-dc-sky-filled-outline-base-hover: #24bfff3d;
|
|
196
|
+
--ydb-dc-sky-filled-outline-stroke: #24bfffa6;
|
|
197
|
+
|
|
198
|
+
--ydb-dc-brown-text: #eac5a7;
|
|
199
|
+
--ydb-dc-brown-base: #ac795833;
|
|
200
|
+
--ydb-dc-brown-base-hover: #ac795847;
|
|
201
|
+
--ydb-dc-brown-outline-base: #ac795800;
|
|
202
|
+
--ydb-dc-brown-outline-base-hover: #ac79581a;
|
|
203
|
+
--ydb-dc-brown-outline-stroke: #ac7958d1;
|
|
204
|
+
--ydb-dc-brown-filled-outline-base: #ac795829;
|
|
205
|
+
--ydb-dc-brown-filled-outline-base-hover: #ac79583d;
|
|
206
|
+
--ydb-dc-brown-filled-outline-stroke: #ac7958a6;
|
|
207
|
+
|
|
208
|
+
--ydb-dc-green-text: #a0f485;
|
|
209
|
+
--ydb-dc-green-base: #49ce4533;
|
|
210
|
+
--ydb-dc-green-base-hover: #49ce4547;
|
|
211
|
+
--ydb-dc-green-outline-base: #49ce4500;
|
|
212
|
+
--ydb-dc-green-outline-base-hover: #49ce451a;
|
|
213
|
+
--ydb-dc-green-outline-stroke: #49ce45d1;
|
|
214
|
+
--ydb-dc-green-filled-outline-base: #49ce4529;
|
|
215
|
+
--ydb-dc-green-filled-outline-base-hover: #49ce453d;
|
|
216
|
+
--ydb-dc-green-filled-outline-stroke: #49ce45a6;
|
|
217
|
+
|
|
218
|
+
--ydb-dc-yellow-text: #fff278;
|
|
219
|
+
--ydb-dc-yellow-base: #ebd50033;
|
|
220
|
+
--ydb-dc-yellow-base-hover: #ebd50047;
|
|
221
|
+
--ydb-dc-yellow-outline-base: #ebd50000;
|
|
222
|
+
--ydb-dc-yellow-outline-base-hover: #ebd5001a;
|
|
223
|
+
--ydb-dc-yellow-outline-stroke: #ebd500d1;
|
|
224
|
+
--ydb-dc-yellow-filled-outline-base: #ebd50029;
|
|
225
|
+
--ydb-dc-yellow-filled-outline-base-hover: #ebd5003d;
|
|
226
|
+
--ydb-dc-yellow-filled-outline-stroke: #ebd500a6;
|
|
227
|
+
|
|
228
|
+
--ydb-dc-sage-text: #b8d7cf;
|
|
229
|
+
--ydb-dc-sage-base: #65a49533;
|
|
230
|
+
--ydb-dc-sage-base-hover: #65a49547;
|
|
231
|
+
--ydb-dc-sage-outline-base: #65a49500;
|
|
232
|
+
--ydb-dc-sage-outline-base-hover: #65a4951a;
|
|
233
|
+
--ydb-dc-sage-outline-stroke: #65a495d1;
|
|
234
|
+
--ydb-dc-sage-filled-outline-base: #65a49529;
|
|
235
|
+
--ydb-dc-sage-filled-outline-base-hover: #65a4953d;
|
|
236
|
+
--ydb-dc-sage-filled-outline-stroke: #65a495a6;
|
|
237
|
+
|
|
238
|
+
--ydb-dc-slate-text: #c7c8db;
|
|
239
|
+
--ydb-dc-slate-base: #8586ac33;
|
|
240
|
+
--ydb-dc-slate-base-hover: #8586ac47;
|
|
241
|
+
--ydb-dc-slate-outline-base: #8586ac00;
|
|
242
|
+
--ydb-dc-slate-outline-base-hover: #8586ac1a;
|
|
243
|
+
--ydb-dc-slate-outline-stroke: #8586acd1;
|
|
244
|
+
--ydb-dc-slate-filled-outline-base: #8586ac29;
|
|
245
|
+
--ydb-dc-slate-filled-outline-base-hover: #8586ac3d;
|
|
246
|
+
--ydb-dc-slate-filled-outline-stroke: #8586aca6;
|
|
247
|
+
}
|
package/src/types/api/meta.ts
CHANGED
package/src/types/api/storage.ts
CHANGED
|
@@ -29,6 +29,18 @@ export interface StorageGroupGroups {
|
|
|
29
29
|
GroupCount?: string;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
export type TStorageGroupStateCount =
|
|
33
|
+
| {Disks: {Value?: number}; FailRealms?: never}
|
|
34
|
+
| {Disks?: never; FailRealms: {Value?: number}};
|
|
35
|
+
|
|
36
|
+
export interface TStorageGroupStateInfo {
|
|
37
|
+
Status?: string;
|
|
38
|
+
/** Disks for none/block-4-2; affected fail realms for mirror-3-dc. Omitted for ok. */
|
|
39
|
+
Count?: TStorageGroupStateCount;
|
|
40
|
+
/** Non-zero failed-domain counts per affected realm, in descending order. */
|
|
41
|
+
FailedDomainsPerRealm?: number[];
|
|
42
|
+
}
|
|
43
|
+
|
|
32
44
|
export interface TGroupsStorageGroupInfo {
|
|
33
45
|
GroupId?: string;
|
|
34
46
|
/** uint64 */
|
|
@@ -55,6 +67,8 @@ export interface TGroupsStorageGroupInfo {
|
|
|
55
67
|
* dead:n - group is not okay, n fail realms are not available
|
|
56
68
|
*/
|
|
57
69
|
State?: string;
|
|
70
|
+
/** May be absent even on newer backends when the state cannot be determined. */
|
|
71
|
+
StateInfo?: TStorageGroupStateInfo;
|
|
58
72
|
/** uint64 */
|
|
59
73
|
MissingDisks?: string;
|
|
60
74
|
|
package/src/types/api/tenant.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type {EFlag} from './enums';
|
|
2
|
+
import type {MetaTenants} from './meta';
|
|
2
3
|
import type {TMemoryStats, TPoolStats} from './nodes';
|
|
3
4
|
import type {TTabletStateInfo} from './tablet';
|
|
4
5
|
|
|
@@ -19,6 +20,8 @@ export interface TTenants {
|
|
|
19
20
|
export interface TTenantInfo {
|
|
20
21
|
TenantInfo?: TTenant[];
|
|
21
22
|
Errors?: string[];
|
|
23
|
+
/** Partial errors from meta; database data may still be available. */
|
|
24
|
+
errors?: MetaTenants['errors'];
|
|
22
25
|
}
|
|
23
26
|
|
|
24
27
|
export interface TTenant {
|
package/src/uiFactory/types.ts
CHANGED
|
@@ -18,6 +18,7 @@ import type {ClusterLink, DatabaseLink} from '../types/additionalProps';
|
|
|
18
18
|
import type {MetaBaseClusterInfo} from '../types/api/meta';
|
|
19
19
|
import type {ETenantType} from '../types/api/tenant';
|
|
20
20
|
import type {TUserToken} from '../types/api/whoami';
|
|
21
|
+
import type {DatacenterColorIndexes} from '../utils/datacenters';
|
|
21
22
|
import type {GetLogsLink} from '../utils/logs';
|
|
22
23
|
import type {GetMonitoringClusterLink, GetMonitoringLink} from '../utils/monitoring';
|
|
23
24
|
|
|
@@ -43,6 +44,14 @@ export interface UIFactory<H extends string = CommonIssueCategory, T extends str
|
|
|
43
44
|
|
|
44
45
|
homePageTitle?: string;
|
|
45
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Permanent positive indexes keyed by the full uppercase DC name.
|
|
49
|
+
* Other DCs get session-local indexes after the registry's maximum as responses arrive.
|
|
50
|
+
* Existing assignments are retained; only newly received names are sorted.
|
|
51
|
+
* Invalid indexes remain neutral.
|
|
52
|
+
*/
|
|
53
|
+
datacenterColorIndexes?: DatacenterColorIndexes;
|
|
54
|
+
|
|
46
55
|
getLogsLink?: GetLogsLink;
|
|
47
56
|
getMonitoringLink?: GetMonitoringLink;
|
|
48
57
|
getMonitoringClusterLink?: GetMonitoringClusterLink;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type {TNodeInfo, TSystemStateInfo} from '../types/api/nodes';
|
|
2
|
+
|
|
3
|
+
export type DatacenterColorIndexes = Readonly<Record<string, number>>;
|
|
4
|
+
|
|
5
|
+
// Base hues in priority order; every appearance uses the same hue sequence.
|
|
6
|
+
export const DATACENTER_COLORS = [
|
|
7
|
+
'turquoise',
|
|
8
|
+
'purple',
|
|
9
|
+
'blue',
|
|
10
|
+
'orange',
|
|
11
|
+
'red',
|
|
12
|
+
'pink',
|
|
13
|
+
'sky',
|
|
14
|
+
'brown',
|
|
15
|
+
'green',
|
|
16
|
+
'yellow',
|
|
17
|
+
'sage',
|
|
18
|
+
'slate',
|
|
19
|
+
] as const;
|
|
20
|
+
|
|
21
|
+
export type DatacenterColor = (typeof DATACENTER_COLORS)[number] | 'neutral';
|
|
22
|
+
|
|
23
|
+
const DATACENTER_COLOR_VARIANTS = ['soft', 'outline', 'filled-outline'] as const;
|
|
24
|
+
export type DatacenterColorVariant = (typeof DATACENTER_COLOR_VARIANTS)[number];
|
|
25
|
+
|
|
26
|
+
const DATACENTER_PALETTE = DATACENTER_COLOR_VARIANTS.flatMap((variant) =>
|
|
27
|
+
DATACENTER_COLORS.map((color) => ({color, variant})),
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
export function normalizeDatacenter(name?: string) {
|
|
31
|
+
return name ? name.toUpperCase() : undefined;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Keep the nameservice's full identity, including a bridge pile with an empty DC. */
|
|
35
|
+
export function getDatacenterKey(location?: TSystemStateInfo['Location'], fallback?: string) {
|
|
36
|
+
const dc = location?.DataCenter || fallback;
|
|
37
|
+
if (location?.BridgePileName && !dc?.toUpperCase().startsWith('P=')) {
|
|
38
|
+
return normalizeDatacenter(`P=${location.BridgePileName}/${dc || ''}`);
|
|
39
|
+
}
|
|
40
|
+
return normalizeDatacenter(dc);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function getNodeDatacenterKey(node: Pick<TNodeInfo, 'SystemState' | 'PileName'>) {
|
|
44
|
+
return getDatacenterKey(
|
|
45
|
+
{
|
|
46
|
+
...node.SystemState?.Location,
|
|
47
|
+
BridgePileName: node.SystemState?.Location?.BridgePileName || node.PileName,
|
|
48
|
+
},
|
|
49
|
+
node.SystemState?.DataCenter,
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Extend existing assignments without renumbering previously encountered DCs. */
|
|
54
|
+
export function createDatacenterColorIndexes(
|
|
55
|
+
names: readonly (string | undefined)[],
|
|
56
|
+
configuredIndexes: DatacenterColorIndexes = {},
|
|
57
|
+
): DatacenterColorIndexes {
|
|
58
|
+
const normalized = names.map(normalizeDatacenter).filter((name) => name !== undefined);
|
|
59
|
+
const indexes = {...configuredIndexes};
|
|
60
|
+
let lastIndex = Object.values(indexes).reduce(
|
|
61
|
+
(max, index) => (Number.isInteger(index) && index > max ? index : max),
|
|
62
|
+
0,
|
|
63
|
+
);
|
|
64
|
+
// Preserve configured and accumulated assignments, including absent DCs.
|
|
65
|
+
// Sort only the new batch; later responses must not change earlier colors.
|
|
66
|
+
for (const name of [...new Set(normalized)].sort()) {
|
|
67
|
+
if (!Object.hasOwn(indexes, name)) {
|
|
68
|
+
indexes[name] = ++lastIndex;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return indexes;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function getDatacenterColorIndex(name?: string, indexes?: DatacenterColorIndexes) {
|
|
75
|
+
const key = normalizeDatacenter(name);
|
|
76
|
+
const index = key && indexes && Object.hasOwn(indexes, key) ? indexes[key] : undefined;
|
|
77
|
+
return typeof index === 'number' && Number.isInteger(index) && index > 0 ? index : undefined;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function getDatacenterColor(
|
|
81
|
+
name?: string,
|
|
82
|
+
indexes?: DatacenterColorIndexes,
|
|
83
|
+
): DatacenterColor {
|
|
84
|
+
const index = getDatacenterColorIndex(name, indexes);
|
|
85
|
+
return index === undefined
|
|
86
|
+
? 'neutral'
|
|
87
|
+
: (DATACENTER_PALETTE[(index - 1) % DATACENTER_PALETTE.length]?.color ?? 'neutral');
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function getDatacenterColorVariant(
|
|
91
|
+
name?: string,
|
|
92
|
+
indexes?: DatacenterColorIndexes,
|
|
93
|
+
): DatacenterColorVariant {
|
|
94
|
+
const index = getDatacenterColorIndex(name, indexes);
|
|
95
|
+
if (index === undefined) {
|
|
96
|
+
return 'soft';
|
|
97
|
+
}
|
|
98
|
+
return DATACENTER_PALETTE[(index - 1) % DATACENTER_PALETTE.length]?.variant ?? 'soft';
|
|
99
|
+
}
|
|
@@ -27,6 +27,9 @@ export function getDiskLocationItems(
|
|
|
27
27
|
{id: 'fqdn', name: i18n('field_fqdn'), value: nodeData.Host},
|
|
28
28
|
{id: 'rack', name: i18n('field_rack'), value: nodeData.Rack},
|
|
29
29
|
{id: 'datacenter', name: i18n('field_datacenter'), value: nodeData.DC},
|
|
30
|
+
...(nodeData.PileName
|
|
31
|
+
? [{id: 'pile-name', name: i18n('field_pile-name'), value: nodeData.PileName}]
|
|
32
|
+
: []),
|
|
30
33
|
{id: 'pdisk-path', name: i18n('field_pdisk-path'), value: data.Path},
|
|
31
34
|
{id: 'node-id', name: i18n('field_node-id'), value: data.NodeId || undefined},
|
|
32
35
|
{id: 'pdisk-id', name: i18n('field_pdisk-id'), value: data.PDiskId},
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type {IconData} from '@gravity-ui/uikit';
|
|
2
2
|
|
|
3
|
+
import type {DatacenterColor, DatacenterColorVariant} from '../datacenters';
|
|
4
|
+
|
|
3
5
|
import {DATA_SEVERITY, DISK_COLOR_STATE_TO_NUMERIC_SEVERITY} from './constants';
|
|
4
6
|
import type {IconWithColor} from './iconCalculators';
|
|
5
7
|
import type {DisplaySeverity, PDiskType, PreparedPDisk, PreparedVDisk} from './types';
|
|
@@ -10,6 +12,7 @@ export type DiskDisplayMode =
|
|
|
10
12
|
| 'frontQueues'
|
|
11
13
|
| 'compaction'
|
|
12
14
|
| 'driveType'
|
|
15
|
+
| 'datacenter'
|
|
13
16
|
| 'all'
|
|
14
17
|
| 'drive'
|
|
15
18
|
| 'decommit'
|
|
@@ -44,6 +47,7 @@ export interface PDiskAllModeDisplayState {
|
|
|
44
47
|
|
|
45
48
|
export interface BaseDiskDisplayState {
|
|
46
49
|
driveType?: PDiskType;
|
|
50
|
+
datacenter?: {name?: string; color: DatacenterColor; variant?: DatacenterColorVariant};
|
|
47
51
|
severity: DisplaySeverity;
|
|
48
52
|
icon: DiskIndicatorValue | undefined;
|
|
49
53
|
mode: DiskDisplayMode | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {uiFactory} from '../../uiFactory/uiFactory';
|
|
4
|
+
|
|
5
|
+
import {useTypedSelector} from './useTypedSelector';
|
|
6
|
+
|
|
7
|
+
export function useDatacenterColorIndexes() {
|
|
8
|
+
const indexes = useTypedSelector((state) => state.datacenters.indexes);
|
|
9
|
+
const configuredIndexes = uiFactory.datacenterColorIndexes;
|
|
10
|
+
return React.useMemo(() => ({...indexes, ...configuredIndexes}), [indexes, configuredIndexes]);
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {useStore} from 'react-redux';
|
|
4
|
+
|
|
5
|
+
import {createDatacenterRegistrar} from '../../store/reducers/datacenters';
|
|
6
|
+
|
|
7
|
+
/** Register DCs from node fetchers used by the generic RTK Query table endpoint. */
|
|
8
|
+
export function useDatacenterNodesFetcher<
|
|
9
|
+
Params,
|
|
10
|
+
Result extends {data: readonly {DCKey?: string}[]},
|
|
11
|
+
>(fetchData: (params: Params) => Promise<Result>) {
|
|
12
|
+
const store = useStore();
|
|
13
|
+
return React.useCallback(
|
|
14
|
+
async (params: Params) => {
|
|
15
|
+
const registerDatacenters = createDatacenterRegistrar(store);
|
|
16
|
+
const result = await fetchData(params);
|
|
17
|
+
registerDatacenters(result.data.map((node) => node.DCKey));
|
|
18
|
+
return result;
|
|
19
|
+
},
|
|
20
|
+
[fetchData, store],
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import {isNil} from 'lodash';
|
|
2
2
|
|
|
3
|
-
import {selectNodesMap} from '../../store/reducers/nodesList';
|
|
4
3
|
import type {NodeMetadata} from '../../types/store/nodesList';
|
|
5
|
-
import {useTypedSelector} from '../hooks';
|
|
6
4
|
|
|
7
|
-
import {
|
|
5
|
+
import {useNodesMap} from './useNodesMap';
|
|
8
6
|
|
|
9
7
|
export function useNodeMetadata(
|
|
10
8
|
nodeId: number | undefined,
|
|
11
9
|
parentNodeData?: NodeMetadata,
|
|
12
10
|
): NodeMetadata {
|
|
13
|
-
const
|
|
14
|
-
const nodesMap = useTypedSelector((state) => selectNodesMap(state, database));
|
|
11
|
+
const nodesMap = useNodesMap();
|
|
15
12
|
const storedNodeData = isNil(nodeId) ? undefined : nodesMap?.get(nodeId);
|
|
16
13
|
return {
|
|
17
14
|
Host: parentNodeData?.Host || storedNodeData?.Host,
|
|
18
15
|
DC: parentNodeData?.DC || storedNodeData?.DC,
|
|
16
|
+
DCKey: parentNodeData?.DCKey || storedNodeData?.DCKey,
|
|
19
17
|
Rack: parentNodeData?.Rack || storedNodeData?.Rack,
|
|
18
|
+
PileName: parentNodeData?.PileName || storedNodeData?.PileName,
|
|
20
19
|
};
|
|
21
20
|
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import {matchPath, useLocation} from 'react-router-dom';
|
|
2
|
+
import {StringParam, useQueryParams} from 'use-query-params';
|
|
3
|
+
|
|
4
|
+
import routes from '../../routes';
|
|
5
|
+
import {authenticationApi} from '../../store/reducers/authentication/authentication';
|
|
6
|
+
import type {NodesListQueryArgs} from '../../store/reducers/nodesList';
|
|
7
|
+
import {SETTING_KEYS} from '../../store/reducers/settings/constants';
|
|
8
|
+
import {getSettingValue} from '../../store/reducers/settings/settings';
|
|
9
|
+
import {TENANT_DIAGNOSTICS_TABS_IDS, TENANT_PAGES_IDS} from '../../store/reducers/tenant/constants';
|
|
10
|
+
import {tenantPageSchema} from '../../store/reducers/tenant/types';
|
|
11
|
+
|
|
12
|
+
import {useDatabaseFromQuery} from './useDatabaseFromQuery';
|
|
13
|
+
import {useTypedSelector} from './useTypedSelector';
|
|
14
|
+
|
|
15
|
+
function isStoragePage(pathname: string, page: string, diagnosticsTab: string) {
|
|
16
|
+
if (matchPath(pathname, {path: routes.storageGroup, exact: true})) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
return (
|
|
20
|
+
Boolean(matchPath(pathname, {path: routes.database, exact: true})) &&
|
|
21
|
+
page !== TENANT_PAGES_IDS.query &&
|
|
22
|
+
diagnosticsTab === TENANT_DIAGNOSTICS_TABS_IDS.storage
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function isClusterStoragePage(pathname: string) {
|
|
27
|
+
const match = matchPath<{activeTab?: string}>(pathname, {path: routes.cluster, exact: true});
|
|
28
|
+
return match?.params.activeTab === 'storage';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function isNodeStoragePage(pathname: string) {
|
|
32
|
+
const match = matchPath<{activeTab?: string}>(pathname, {path: routes.node, exact: true});
|
|
33
|
+
// The old "structure" route is redirected to Storage by the Node page.
|
|
34
|
+
return match?.params.activeTab === 'storage' || match?.params.activeTab === 'structure';
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function isDiskStoragePage(pathname: string, activeTab?: string | null) {
|
|
38
|
+
if (matchPath(pathname, {path: routes.pDisk, exact: true})) {
|
|
39
|
+
return activeTab === 'storage';
|
|
40
|
+
}
|
|
41
|
+
// Storage is the default (and the invalid-value fallback) on the VDisk page.
|
|
42
|
+
return (
|
|
43
|
+
Boolean(matchPath(pathname, {path: routes.vDisk, exact: true})) && activeTab !== 'tablets'
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function useIsStoragePage() {
|
|
48
|
+
const {pathname} = useLocation();
|
|
49
|
+
const [query] = useQueryParams({
|
|
50
|
+
databasePage: StringParam,
|
|
51
|
+
tenantPage: StringParam,
|
|
52
|
+
diagnosticsTab: StringParam,
|
|
53
|
+
activeTab: StringParam,
|
|
54
|
+
});
|
|
55
|
+
const initialPage = useTypedSelector((state) =>
|
|
56
|
+
getSettingValue(state, SETTING_KEYS.TENANT_INITIAL_PAGE),
|
|
57
|
+
);
|
|
58
|
+
const diagnosticsTab = useTypedSelector((state) => state.tenant.diagnosticsTab);
|
|
59
|
+
const defaultPage = tenantPageSchema.catch(TENANT_PAGES_IDS.query).parse(initialPage);
|
|
60
|
+
const page = tenantPageSchema.catch(defaultPage).parse(query.databasePage ?? query.tenantPage);
|
|
61
|
+
return (
|
|
62
|
+
isStoragePage(pathname, page, query.diagnosticsTab ?? diagnosticsTab) ||
|
|
63
|
+
isClusterStoragePage(pathname) ||
|
|
64
|
+
isNodeStoragePage(pathname) ||
|
|
65
|
+
isDiskStoragePage(pathname, query.activeTab)
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function useNodesListQueryArgs(): NodesListQueryArgs {
|
|
70
|
+
const database = useDatabaseFromQuery();
|
|
71
|
+
const storagePage = useIsStoragePage();
|
|
72
|
+
const {currentData: permissions} = authenticationApi.endpoints.whoami.useQueryState({database});
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
database,
|
|
76
|
+
include_storage: (storagePage && permissions?.IsViewerAllowed === true) || undefined,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import {selectNodesMap} from '../../store/reducers/nodesList';
|
|
2
|
+
|
|
3
|
+
import {useNodesListQueryArgs} from './useNodesListQueryArgs';
|
|
4
|
+
import {useTypedSelector} from './useTypedSelector';
|
|
5
|
+
|
|
6
|
+
export function useNodesMap() {
|
|
7
|
+
const {database, include_storage: includeStorage} = useNodesListQueryArgs();
|
|
8
|
+
return useTypedSelector((state) => selectNodesMap(state, database, includeStorage));
|
|
9
|
+
}
|