ydb-embedded-ui 22.6.0 → 22.8.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/TenantNameWrapper/TenantNameWrapper.js +3 -1
- package/dist/components/TenantNameWrapper/TenantNameWrapper.js.map +1 -1
- package/dist/components/TenantNameWrapper/utils.d.ts +4 -1
- package/dist/components/TenantNameWrapper/utils.js +9 -2
- package/dist/components/TenantNameWrapper/utils.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/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/Header/hooks/useSharedDatabasePath.js +14 -6
- package/dist/containers/Header/hooks/useSharedDatabasePath.js.map +1 -1
- package/dist/containers/Node/NodePages.d.ts +1 -1
- package/dist/containers/Nodes/NodesControls/NodesControls.js +1 -1
- package/dist/containers/Nodes/NodesControls/NodesControls.js.map +1 -1
- package/dist/containers/Nodes/NodesTable.js +3 -1
- package/dist/containers/Nodes/NodesTable.js.map +1 -1
- package/dist/containers/Nodes/PaginatedNodes/GroupedNodesComponent.js +11 -6
- package/dist/containers/Nodes/PaginatedNodes/GroupedNodesComponent.js.map +1 -1
- package/dist/containers/Nodes/PaginatedNodes/NodesComponent.js +2 -4
- package/dist/containers/Nodes/PaginatedNodes/NodesComponent.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/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/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/Tenants/TenantsTable.js +20 -6
- package/dist/containers/Tenants/TenantsTable.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 +4 -3
- 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/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 +10 -6
- package/dist/store/reducers/cluster/cluster.js.map +1 -1
- package/dist/store/reducers/cluster/parseFields.js +1 -0
- package/dist/store/reducers/cluster/parseFields.js.map +1 -1
- package/dist/store/reducers/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.js +6 -1
- package/dist/store/reducers/tenant/tenant.js.map +1 -1
- package/dist/store/reducers/tenants/types.d.ts +2 -0
- package/dist/store/reducers/tenants/utils.js +3 -0
- 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 +1 -0
- package/dist/types/api/storage.d.ts +20 -0
- package/dist/types/api/storage.js.map +1 -1
- package/dist/types/store/nodesList.d.ts +2 -0
- package/dist/uiFactory/types.d.ts +8 -0
- package/dist/utils/databaseId.d.ts +8 -0
- package/dist/utils/databaseId.js +10 -0
- package/dist/utils/databaseId.js.map +1 -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/useDebouncedValue.js +12 -0
- package/dist/utils/hooks/useDebouncedValue.js.map +1 -1
- 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/TenantNameWrapper/TenantNameWrapper.tsx +3 -1
- package/src/components/TenantNameWrapper/utils.ts +13 -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/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/Header/hooks/useSharedDatabasePath.ts +16 -7
- package/src/containers/Nodes/NodesControls/NodesControls.tsx +0 -1
- package/src/containers/Nodes/NodesTable.tsx +3 -1
- package/src/containers/Nodes/PaginatedNodes/GroupedNodesComponent.tsx +21 -7
- package/src/containers/Nodes/PaginatedNodes/NodesComponent.tsx +2 -4
- 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/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/Query/QueryEditor/hooks/useEditorOptions.ts +3 -1
- package/src/containers/Tenant/utils/schemaQueryTemplates.ts +1 -6
- package/src/containers/Tenants/TenantsTable.tsx +20 -7
- package/src/containers/UserSettings/i18n/en.json +4 -0
- package/src/containers/UserSettings/settings.tsx +16 -1
- package/src/containers/VDiskPage/VDiskStorageDetails.tsx +22 -3
- package/src/lib.ts +2 -0
- package/src/services/api/viewer.ts +5 -1
- package/src/store/datacenterQueryContext.ts +16 -0
- package/src/store/reducers/cluster/cluster.ts +12 -6
- package/src/store/reducers/cluster/parseFields.ts +1 -0
- 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 +4 -1
- package/src/store/reducers/tenants/types.ts +2 -0
- package/src/store/reducers/tenants/utils.ts +3 -0
- 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 +1 -0
- package/src/types/api/storage.ts +14 -0
- package/src/types/store/nodesList.ts +2 -0
- package/src/uiFactory/types.ts +9 -0
- package/src/utils/databaseId.ts +27 -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/useDebouncedValue.ts +16 -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
- package/dist/containers/Nodes/useDebouncedSearch.d.ts +0 -2
- package/dist/containers/Nodes/useDebouncedSearch.js +0 -11
- package/dist/containers/Nodes/useDebouncedSearch.js.map +0 -1
- package/src/containers/Nodes/useDebouncedSearch.ts +0 -13
|
@@ -30,6 +30,7 @@ import type {SpaceLegendSelectionScope} from './StorageExpertModePanel/component
|
|
|
30
30
|
import {useSpaceLegendSelection} from './StorageExpertModePanel/components/useSpaceLegendSelection';
|
|
31
31
|
import {PDisksGroupBy} from './StorageExpertModePanel/constants';
|
|
32
32
|
import type {PDisksGroupByValue} from './StorageExpertModePanel/constants';
|
|
33
|
+
import {useStorageDatacenter} from './useStorageDatacenter';
|
|
33
34
|
import {
|
|
34
35
|
useIsStorageExpertMode,
|
|
35
36
|
useNodesPDisksGroupByParam,
|
|
@@ -198,6 +199,7 @@ function usePDiskDisplayStateGetter(
|
|
|
198
199
|
selectionScope: SpaceLegendSelectionScope,
|
|
199
200
|
): PDiskDisplayStateGetter {
|
|
200
201
|
const isExpertMode = useIsStorageExpertMode();
|
|
202
|
+
const getDatacenter = useStorageDatacenter();
|
|
201
203
|
const inactiveAlerts = useSpaceLegendSelection(selectionScope);
|
|
202
204
|
|
|
203
205
|
return React.useCallback(
|
|
@@ -206,6 +208,10 @@ function usePDiskDisplayStateGetter(
|
|
|
206
208
|
return getDefaultPDiskDisplayState(pDisk);
|
|
207
209
|
}
|
|
208
210
|
|
|
211
|
+
if (pdisksGroupBy === PDisksGroupBy.Datacenter) {
|
|
212
|
+
return {...getDatacenter(pDisk.NodeId), width: EXPERT_MODE_PDISK_WIDTH};
|
|
213
|
+
}
|
|
214
|
+
|
|
209
215
|
if (pdisksGroupBy === PDisksGroupBy.DriveType) {
|
|
210
216
|
return {
|
|
211
217
|
...getDriveTypeDisplayState(pDisk),
|
|
@@ -287,7 +293,7 @@ function usePDiskDisplayStateGetter(
|
|
|
287
293
|
width: EXPERT_MODE_PDISK_WIDTH,
|
|
288
294
|
};
|
|
289
295
|
},
|
|
290
|
-
[inactiveAlerts, isExpertMode, pdisksGroupBy],
|
|
296
|
+
[getDatacenter, inactiveAlerts, isExpertMode, pdisksGroupBy],
|
|
291
297
|
);
|
|
292
298
|
}
|
|
293
299
|
|
|
@@ -31,6 +31,7 @@ import type {PreparedVDisk} from '../../utils/disks/types';
|
|
|
31
31
|
|
|
32
32
|
import type {SpaceLegendSelectionScope} from './StorageExpertModePanel/components/getSpaceLegendSelection';
|
|
33
33
|
import {useSpaceLegendSelection} from './StorageExpertModePanel/components/useSpaceLegendSelection';
|
|
34
|
+
import {useStorageDatacenter} from './useStorageDatacenter';
|
|
34
35
|
import {
|
|
35
36
|
useIsStorageExpertMode,
|
|
36
37
|
useNodesVDisksGroupByParam,
|
|
@@ -221,6 +222,7 @@ function useVDiskDisplayStateGetter(
|
|
|
221
222
|
selectionScope: SpaceLegendSelectionScope,
|
|
222
223
|
): VDiskDisplayStateGetter {
|
|
223
224
|
const isExpertMode = useIsStorageExpertMode();
|
|
225
|
+
const getDatacenter = useStorageDatacenter();
|
|
224
226
|
const inactiveLegendItems = useSpaceLegendSelection(selectionScope);
|
|
225
227
|
|
|
226
228
|
return React.useCallback(
|
|
@@ -229,6 +231,10 @@ function useVDiskDisplayStateGetter(
|
|
|
229
231
|
return getDefaultDiskDisplayState(vDisk, isDonor);
|
|
230
232
|
}
|
|
231
233
|
|
|
234
|
+
if (vdisksGroupBy === VDisksGroupBy.Datacenter) {
|
|
235
|
+
return getDatacenter(vDisk.NodeId);
|
|
236
|
+
}
|
|
237
|
+
|
|
232
238
|
return getExpertVDiskDisplayState({
|
|
233
239
|
inactiveLegendItems,
|
|
234
240
|
isDonor,
|
|
@@ -237,7 +243,7 @@ function useVDiskDisplayStateGetter(
|
|
|
237
243
|
vdisksGroupBy,
|
|
238
244
|
});
|
|
239
245
|
},
|
|
240
|
-
[inactiveLegendItems, isExpertMode, selectionScope, vdisksGroupBy],
|
|
246
|
+
[getDatacenter, inactiveLegendItems, isExpertMode, selectionScope, vdisksGroupBy],
|
|
241
247
|
);
|
|
242
248
|
}
|
|
243
249
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type {TitledDiskStatusLabelData} from '../../../components/DiskStatus/DiskStatus';
|
|
2
|
+
import type {TStorageGroupStateInfo} from '../../../types/api/storage';
|
|
2
3
|
import {
|
|
3
4
|
DATA_SEVERITY,
|
|
4
5
|
NUMERIC_SEVERITY_TO_LABEL_VIEW,
|
|
@@ -14,35 +15,89 @@ const stateSeverities = new Map<string, DisplaySeverity>([
|
|
|
14
15
|
['dead', SOLID_RED_SEVERITY],
|
|
15
16
|
]);
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
interface ParsedGroupState {
|
|
19
|
+
status: string;
|
|
20
|
+
count?: string;
|
|
21
|
+
value?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function isValidCount(value: unknown): value is number {
|
|
25
|
+
return (
|
|
26
|
+
typeof value === 'number' && Number.isInteger(value) && value >= 0 && value <= 0xffffffff
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function parseStructuredState(
|
|
31
|
+
stateInfo?: TStorageGroupStateInfo | null,
|
|
32
|
+
): ParsedGroupState | undefined {
|
|
33
|
+
const status = typeof stateInfo?.Status === 'string' ? stateInfo.Status.trim() : undefined;
|
|
34
|
+
if (!status) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
if (status === 'ok') {
|
|
38
|
+
return {status};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const {Disks, FailRealms} = stateInfo?.Count ?? {};
|
|
42
|
+
const count = Disks?.Value ?? FailRealms?.Value;
|
|
43
|
+
const domains = stateInfo?.FailedDomainsPerRealm;
|
|
44
|
+
|
|
45
|
+
// Incomplete or invalid structured data must not hide the legacy state details.
|
|
46
|
+
if (
|
|
47
|
+
Boolean(Disks) === Boolean(FailRealms) ||
|
|
48
|
+
!isValidCount(count) ||
|
|
49
|
+
(domains !== undefined && (!Array.isArray(domains) || !domains.every(isValidCount)))
|
|
50
|
+
) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
status,
|
|
56
|
+
count: String(count),
|
|
57
|
+
value: `${count}${domains?.length ? ` (${domains.join(',')})` : ''}`,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function parseLegacyState(state?: string | null): ParsedGroupState | undefined {
|
|
20
62
|
const normalizedState = state?.trim();
|
|
21
63
|
|
|
22
|
-
if (!normalizedState) {
|
|
64
|
+
if (!normalizedState || normalizedState.startsWith(':')) {
|
|
23
65
|
return undefined;
|
|
24
66
|
}
|
|
25
67
|
|
|
26
68
|
const match = normalizedState.match(/^([^:]+)(?::\s*(.+))?$/);
|
|
27
69
|
const status = (match?.[1] ?? normalizedState).trim();
|
|
28
70
|
const value = match?.[2]?.trim();
|
|
29
|
-
let severity = stateSeverities.get(status) ?? DATA_SEVERITY.GREY;
|
|
30
71
|
|
|
31
|
-
|
|
32
|
-
|
|
72
|
+
return {
|
|
73
|
+
status,
|
|
74
|
+
count: value?.split('(', 1)[0].trim(),
|
|
75
|
+
value: value?.replace(/\s*\(/g, ' ('),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function getStorageGroupStateLabel(
|
|
80
|
+
state?: string | null,
|
|
81
|
+
stateInfo?: TStorageGroupStateInfo | null,
|
|
82
|
+
): TitledDiskStatusLabelData | undefined {
|
|
83
|
+
const parsedState = parseStructuredState(stateInfo) ?? parseLegacyState(state);
|
|
84
|
+
if (!parsedState) {
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const {status, count, value} = parsedState;
|
|
89
|
+
let severity = stateSeverities.get(status) ?? DATA_SEVERITY.GREY;
|
|
33
90
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
91
|
+
if (status === 'degraded' && count === '2') {
|
|
92
|
+
severity = DATA_SEVERITY.RED;
|
|
37
93
|
}
|
|
38
94
|
|
|
39
95
|
const labelView = NUMERIC_SEVERITY_TO_LABEL_VIEW[severity];
|
|
40
96
|
const title = status[0].toUpperCase() + status.slice(1);
|
|
41
|
-
const formattedValue = value?.replace(/\s*\(/g, ' (');
|
|
42
97
|
|
|
43
98
|
return {
|
|
44
99
|
title,
|
|
45
|
-
value
|
|
100
|
+
value,
|
|
46
101
|
theme: labelView.theme,
|
|
47
102
|
dangerHeavy: Boolean(labelView.dangerHeavy),
|
|
48
103
|
};
|
|
@@ -2,13 +2,11 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import {isNil} from 'lodash';
|
|
4
4
|
|
|
5
|
-
import {selectNodesMap} from '../../../store/reducers/nodesList';
|
|
6
5
|
import type {PreparedStorageGroup} from '../../../store/reducers/storage/types';
|
|
7
6
|
import type {Erasure} from '../../../types/api/storage';
|
|
8
7
|
import type {PreparedPDisk, PreparedVDisk} from '../../../utils/disks/types';
|
|
9
8
|
import {generateEvaluator} from '../../../utils/generateEvaluator';
|
|
10
|
-
import {
|
|
11
|
-
import {useDatabaseFromQuery} from '../../../utils/hooks/useDatabaseFromQuery';
|
|
9
|
+
import {useNodesMap} from '../../../utils/hooks/useNodesMap';
|
|
12
10
|
import type {StorageViewContext} from '../types';
|
|
13
11
|
|
|
14
12
|
const defaultDegradationEvaluator = generateEvaluator(['success', 'warning', 'danger'], 1, 2);
|
|
@@ -109,8 +107,7 @@ function isErasureWithDifferentDC(erasure?: Erasure) {
|
|
|
109
107
|
}
|
|
110
108
|
|
|
111
109
|
export function useVDisksWithDCMargins(vDisks: PreparedVDisk[] = [], erasure?: Erasure) {
|
|
112
|
-
const
|
|
113
|
-
const nodesMap = useTypedSelector((state) => selectNodesMap(state, database));
|
|
110
|
+
const nodesMap = useNodesMap();
|
|
114
111
|
|
|
115
112
|
return React.useMemo(() => {
|
|
116
113
|
const disksWithMargins: number[] = [];
|
|
@@ -48,7 +48,6 @@ export function StorageGroupPage() {
|
|
|
48
48
|
);
|
|
49
49
|
|
|
50
50
|
const storageGroupData = groupQuery.currentData?.groups?.[0];
|
|
51
|
-
const state = storageGroupData?.State;
|
|
52
51
|
|
|
53
52
|
React.useEffect(() => {
|
|
54
53
|
dispatch(setHeaderBreadcrumbs('storageGroup', {groupId: groupId ?? undefined, database}));
|
|
@@ -94,7 +93,10 @@ export function StorageGroupPage() {
|
|
|
94
93
|
{groupId || EMPTY_DATA_PLACEHOLDER}
|
|
95
94
|
</Text>
|
|
96
95
|
</CopyableValue>
|
|
97
|
-
<StorageGroupStateLabel
|
|
96
|
+
<StorageGroupStateLabel
|
|
97
|
+
state={storageGroupData?.State}
|
|
98
|
+
stateInfo={storageGroupData?.StateInfo}
|
|
99
|
+
/>
|
|
98
100
|
</Flex>
|
|
99
101
|
</Flex>
|
|
100
102
|
);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
1
3
|
import {ResponseError} from '../../../../components/Errors/ResponseError';
|
|
2
4
|
import {JsonViewer} from '../../../../components/JsonViewer/JsonViewer';
|
|
3
5
|
import {Loader} from '../../../../components/Loader';
|
|
@@ -10,6 +12,15 @@ import './Describe.scss';
|
|
|
10
12
|
|
|
11
13
|
const b = cn('ydb-describe');
|
|
12
14
|
|
|
15
|
+
// react-unipika keeps the Full value dialog in its internal state when the viewer value changes
|
|
16
|
+
// and has no API to close it, so close it the same way a user would.
|
|
17
|
+
function closeFullValueDialog() {
|
|
18
|
+
const dialog = document
|
|
19
|
+
.querySelector('.g-ru-full-value-dialog__full-value')
|
|
20
|
+
?.closest('[role="dialog"]');
|
|
21
|
+
dialog?.dispatchEvent(new KeyboardEvent('keydown', {key: 'Escape', bubbles: true}));
|
|
22
|
+
}
|
|
23
|
+
|
|
13
24
|
interface IDescribeProps {
|
|
14
25
|
path: string;
|
|
15
26
|
database: string;
|
|
@@ -21,38 +32,42 @@ const Describe = ({path, database, databaseFullPath, scrollContainerRef}: IDescr
|
|
|
21
32
|
const [autoRefreshInterval] = useAutoRefreshInterval();
|
|
22
33
|
const useMetaProxy = useClusterWithProxy();
|
|
23
34
|
|
|
24
|
-
const {currentData, isFetching, error} = overviewApi.useGetOverviewQuery(
|
|
35
|
+
const {data, currentData, isFetching, error} = overviewApi.useGetOverviewQuery(
|
|
25
36
|
{path, database, databaseFullPath, useMetaProxy},
|
|
26
37
|
{pollingInterval: autoRefreshInterval},
|
|
27
38
|
);
|
|
28
39
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
40
|
+
// The viewer stays mounted between objects, so its Full value dialog must not outlive the object.
|
|
41
|
+
React.useEffect(() => {
|
|
42
|
+
closeFullValueDialog();
|
|
43
|
+
}, [path, database]);
|
|
34
44
|
|
|
35
|
-
|
|
36
|
-
return <div className={b('message-container')}>Empty</div>;
|
|
37
|
-
}
|
|
45
|
+
const loading = isFetching && currentData === undefined;
|
|
38
46
|
|
|
39
47
|
return (
|
|
40
|
-
<div className={b()}>
|
|
41
|
-
{
|
|
42
|
-
{currentData ? (
|
|
43
|
-
<div className={b('
|
|
44
|
-
<JsonViewer
|
|
45
|
-
value={currentData}
|
|
46
|
-
withClipboardButton={{
|
|
47
|
-
withLabel: false,
|
|
48
|
-
copyText: JSON.stringify(currentData),
|
|
49
|
-
}}
|
|
50
|
-
search
|
|
51
|
-
collapsedInitially
|
|
52
|
-
scrollContainerRef={scrollContainerRef}
|
|
53
|
-
/>
|
|
54
|
-
</div>
|
|
48
|
+
<div className={b()} data-qa="describe">
|
|
49
|
+
{loading ? <Loader size="m" /> : null}
|
|
50
|
+
{!loading && !currentData && !error ? (
|
|
51
|
+
<div className={b('message-container')}>Empty</div>
|
|
55
52
|
) : null}
|
|
53
|
+
{error ? <ResponseError error={error} /> : null}
|
|
54
|
+
{/* Keep the viewer mounted while the next object loads to preserve expanded paths. */}
|
|
55
|
+
<div hidden={!currentData}>
|
|
56
|
+
{data ? (
|
|
57
|
+
<div className={b('result')}>
|
|
58
|
+
<JsonViewer
|
|
59
|
+
value={data}
|
|
60
|
+
withClipboardButton={{
|
|
61
|
+
withLabel: false,
|
|
62
|
+
copyText: JSON.stringify(data),
|
|
63
|
+
}}
|
|
64
|
+
search
|
|
65
|
+
collapsedInitially
|
|
66
|
+
scrollContainerRef={scrollContainerRef}
|
|
67
|
+
/>
|
|
68
|
+
</div>
|
|
69
|
+
) : null}
|
|
70
|
+
</div>
|
|
56
71
|
</div>
|
|
57
72
|
);
|
|
58
73
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {Flex} from '@gravity-ui/uikit';
|
|
2
|
+
|
|
3
|
+
import {DatacenterLabel} from '../../../../../components/Datacenter/DatacenterLabel';
|
|
4
|
+
import {EMPTY_DATA_PLACEHOLDER} from '../../../../../utils/constants';
|
|
5
|
+
|
|
6
|
+
import type {DatacenterNodes} from './utils';
|
|
7
|
+
|
|
8
|
+
export function DatabaseDatacenters({datacenters}: {datacenters?: DatacenterNodes[] | null}) {
|
|
9
|
+
if (!datacenters?.length) {
|
|
10
|
+
return EMPTY_DATA_PLACEHOLDER;
|
|
11
|
+
}
|
|
12
|
+
return (
|
|
13
|
+
<Flex gap={2} wrap="wrap" qa="database-datacenters">
|
|
14
|
+
{datacenters.map(({name, count}) => (
|
|
15
|
+
<DatacenterLabel key={name ?? ''} name={name} count={count} />
|
|
16
|
+
))}
|
|
17
|
+
</Flex>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -3,30 +3,45 @@ import React from 'react';
|
|
|
3
3
|
import {Alert, Card, Flex, Text} from '@gravity-ui/uikit';
|
|
4
4
|
|
|
5
5
|
import {SegmentedProgress} from '../../../../../components/SegmentedProgress/SegmentedProgress';
|
|
6
|
+
import {selectNodesMap} from '../../../../../store/reducers/nodesList';
|
|
6
7
|
import {useTenantBaseInfo} from '../../../../../store/reducers/tenant/tenant';
|
|
7
8
|
import type {TEvDescribeSchemeResult} from '../../../../../types/api/schema';
|
|
8
9
|
import {cn} from '../../../../../utils/cn';
|
|
9
10
|
import {formatNumber} from '../../../../../utils/dataFormatters/dataFormatters';
|
|
11
|
+
import {useTypedSelector} from '../../../../../utils/hooks/useTypedSelector';
|
|
10
12
|
import {SchemaObjectInfo} from '../SchemaObjectInfo';
|
|
11
13
|
|
|
14
|
+
import {DatabaseDatacenters} from './DatabaseDatacenters';
|
|
12
15
|
import {dbInfoKeyset} from './i18n';
|
|
13
|
-
import {prepareAdditionalDatabaseInfoItems} from './utils';
|
|
16
|
+
import {countDatacenterNodes, prepareAdditionalDatabaseInfoItems} from './utils';
|
|
14
17
|
|
|
15
18
|
import './DatabaseInfo.scss';
|
|
16
19
|
|
|
17
20
|
const b = cn('ydb-diagnostics-database-info');
|
|
18
21
|
|
|
19
|
-
interface DBInfoProps {
|
|
22
|
+
export interface DBInfoProps {
|
|
20
23
|
data?: TEvDescribeSchemeResult;
|
|
21
24
|
path: string;
|
|
22
25
|
database: string;
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
export function DatabaseInfo({data, path, database}: DBInfoProps) {
|
|
29
|
+
const nodes = useTypedSelector((state) => selectNodesMap(state, database));
|
|
30
|
+
const datacenters = React.useMemo(() => countDatacenterNodes(nodes?.values() ?? []), [nodes]);
|
|
26
31
|
const {databaseData} = useTenantBaseInfo(database);
|
|
27
32
|
const additionalItems = React.useMemo(
|
|
28
|
-
() =>
|
|
29
|
-
|
|
33
|
+
() => [
|
|
34
|
+
...(databaseData && databaseData.Type !== 'Serverless'
|
|
35
|
+
? [
|
|
36
|
+
{
|
|
37
|
+
name: dbInfoKeyset('field_datacenters'),
|
|
38
|
+
content: <DatabaseDatacenters datacenters={datacenters} />,
|
|
39
|
+
},
|
|
40
|
+
]
|
|
41
|
+
: []),
|
|
42
|
+
...(prepareAdditionalDatabaseInfoItems(databaseData) ?? []),
|
|
43
|
+
],
|
|
44
|
+
[databaseData, datacenters],
|
|
30
45
|
);
|
|
31
46
|
|
|
32
47
|
const {PathsInside, PathsLimit, ShardsInside, ShardsLimit} =
|
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
import type {PreparedTenant} from '../../../../../store/reducers/tenants/types';
|
|
2
2
|
import {uiFactory} from '../../../../../uiFactory/uiFactory';
|
|
3
|
+
import {normalizeDatacenter} from '../../../../../utils/datacenters';
|
|
4
|
+
|
|
5
|
+
export interface DatacenterNodes {
|
|
6
|
+
name?: string;
|
|
7
|
+
count: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function countDatacenterNodes(nodes: Iterable<{DCKey?: string}>): DatacenterNodes[] {
|
|
11
|
+
const counts = new Map<string | undefined, number>();
|
|
12
|
+
for (const {DCKey} of nodes) {
|
|
13
|
+
const name = normalizeDatacenter(DCKey);
|
|
14
|
+
counts.set(name, (counts.get(name) ?? 0) + 1);
|
|
15
|
+
}
|
|
16
|
+
return [...counts]
|
|
17
|
+
.sort(([a], [b]) => {
|
|
18
|
+
if (a === b) {
|
|
19
|
+
return 0;
|
|
20
|
+
}
|
|
21
|
+
if (a === undefined) {
|
|
22
|
+
return 1;
|
|
23
|
+
}
|
|
24
|
+
if (b === undefined) {
|
|
25
|
+
return -1;
|
|
26
|
+
}
|
|
27
|
+
return a < b ? -1 : 1;
|
|
28
|
+
})
|
|
29
|
+
.map(([name, count]) => ({name, count}));
|
|
30
|
+
}
|
|
3
31
|
|
|
4
32
|
export function prepareAdditionalDatabaseInfoItems(databaseData?: PreparedTenant) {
|
|
5
33
|
if (!databaseData) {
|
|
@@ -22,6 +22,7 @@ const EDITOR_OPTIONS: EditorOptions = {
|
|
|
22
22
|
export function useEditorOptions() {
|
|
23
23
|
const [enableAutocomplete] = useSetting(SETTING_KEYS.ENABLE_AUTOCOMPLETE);
|
|
24
24
|
const [autocompleteOnEnter] = useSetting(SETTING_KEYS.AUTOCOMPLETE_ON_ENTER);
|
|
25
|
+
const [wordWrap] = useSetting(SETTING_KEYS.WORD_WRAP);
|
|
25
26
|
const isMultiTabQueryEditorEnabled = useMultiTabQueryEditorEnabled();
|
|
26
27
|
|
|
27
28
|
const options = React.useMemo<EditorOptions>(() => {
|
|
@@ -30,6 +31,7 @@ export function useEditorOptions() {
|
|
|
30
31
|
quickSuggestions: useAutocomplete,
|
|
31
32
|
suggestOnTriggerCharacters: useAutocomplete,
|
|
32
33
|
acceptSuggestionOnEnter: autocompleteOnEnter ? 'on' : 'off',
|
|
34
|
+
wordWrap: wordWrap === 'off' ? 'off' : 'on',
|
|
33
35
|
...EDITOR_OPTIONS,
|
|
34
36
|
};
|
|
35
37
|
|
|
@@ -42,7 +44,7 @@ export function useEditorOptions() {
|
|
|
42
44
|
padding: {top: MULTI_TAB_EDITOR_PADDING_TOP_PX},
|
|
43
45
|
scrollBeyondLastLine: false,
|
|
44
46
|
};
|
|
45
|
-
}, [enableAutocomplete, autocompleteOnEnter, isMultiTabQueryEditorEnabled]);
|
|
47
|
+
}, [enableAutocomplete, autocompleteOnEnter, wordWrap, isMultiTabQueryEditorEnabled]);
|
|
46
48
|
|
|
47
49
|
return options;
|
|
48
50
|
}
|
|
@@ -515,12 +515,7 @@ ADD INDEX \${2:my_vector_index}
|
|
|
515
515
|
GLOBAL USING vector_kmeans_tree
|
|
516
516
|
ON (\${3:embedding})
|
|
517
517
|
WITH (
|
|
518
|
-
distance=cosine
|
|
519
|
-
vector_type="uint8",
|
|
520
|
-
vector_dimension=\${4:512},
|
|
521
|
-
levels=\${5:2},
|
|
522
|
-
clusters=\${6:128},
|
|
523
|
-
overlap_clusters=\${7:3}
|
|
518
|
+
distance=cosine
|
|
524
519
|
);`;
|
|
525
520
|
};
|
|
526
521
|
|
|
@@ -140,14 +140,14 @@ const TenantsTableContent = ({
|
|
|
140
140
|
{clusterName, environmentName, isMetaDatabasesAvailable},
|
|
141
141
|
{pollingInterval: autoRefreshInterval},
|
|
142
142
|
);
|
|
143
|
-
const loading = isFetching && currentData === undefined;
|
|
144
143
|
|
|
145
144
|
// Track sort state for scroll dependencies
|
|
146
145
|
const [sortParams, setSortParams] = React.useState<SortOrder | SortOrder[] | undefined>();
|
|
147
146
|
|
|
148
147
|
const isCreateDBAvailable = useEmMetaAvailable() && uiFactory.onCreateDB !== undefined;
|
|
149
148
|
|
|
150
|
-
const {domain: domainRoot, settings} = useClusterBaseInfo();
|
|
149
|
+
const {domain: domainRoot, settings, isResolved: isClusterInfoResolved} = useClusterBaseInfo();
|
|
150
|
+
const loading = (isFetching && currentData === undefined) || !isClusterInfoResolved;
|
|
151
151
|
|
|
152
152
|
const {search, withProblems, handleSearchChange, handleWithProblemsChange} =
|
|
153
153
|
useTenantsQueryParams();
|
|
@@ -172,6 +172,8 @@ const TenantsTableContent = ({
|
|
|
172
172
|
return filteredBySearch;
|
|
173
173
|
}, [tenants, withProblems, search, showWithProblemsFilter]);
|
|
174
174
|
|
|
175
|
+
const useMetaProxySetting = settings?.use_meta_proxy;
|
|
176
|
+
const useDatabaseIdSetting = settings?.use_database_id;
|
|
175
177
|
const tenantLinks = React.useMemo(
|
|
176
178
|
() =>
|
|
177
179
|
new Map(
|
|
@@ -181,18 +183,29 @@ const TenantsTableContent = ({
|
|
|
181
183
|
tenant,
|
|
182
184
|
additionalTenantsProps,
|
|
183
185
|
externalLink: Boolean(environmentName),
|
|
184
|
-
useDatabaseId:
|
|
185
|
-
|
|
186
|
+
useDatabaseId: uiFactory.useDatabaseId,
|
|
187
|
+
isMetaDatabasesAvailable,
|
|
188
|
+
settings: {
|
|
189
|
+
use_meta_proxy: useMetaProxySetting,
|
|
190
|
+
use_database_id: useDatabaseIdSetting,
|
|
191
|
+
},
|
|
186
192
|
}),
|
|
187
193
|
]),
|
|
188
194
|
),
|
|
189
|
-
[
|
|
195
|
+
[
|
|
196
|
+
tenants,
|
|
197
|
+
additionalTenantsProps,
|
|
198
|
+
environmentName,
|
|
199
|
+
isMetaDatabasesAvailable,
|
|
200
|
+
useMetaProxySetting,
|
|
201
|
+
useDatabaseIdSetting,
|
|
202
|
+
],
|
|
190
203
|
);
|
|
191
204
|
|
|
192
205
|
const openTenant = React.useCallback(
|
|
193
206
|
(tenant: PreparedTenant) => {
|
|
194
207
|
const link = tenantLinks.get(tenant);
|
|
195
|
-
if (!link) {
|
|
208
|
+
if (!isClusterInfoResolved || !link) {
|
|
196
209
|
return;
|
|
197
210
|
}
|
|
198
211
|
if (link.isExternalLink) {
|
|
@@ -202,7 +215,7 @@ const TenantsTableContent = ({
|
|
|
202
215
|
|
|
203
216
|
history.push(link.href);
|
|
204
217
|
},
|
|
205
|
-
[tenantLinks, history],
|
|
218
|
+
[tenantLinks, history, isClusterInfoResolved],
|
|
206
219
|
);
|
|
207
220
|
|
|
208
221
|
const renderCreateDBButton = () => {
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
"settings.editor.autocomplete-on-enter.title": "Accept suggestion on Enter",
|
|
25
25
|
"settings.editor.autocomplete-on-enter.description": "Controls whether suggestions should be accepted on Enter, in addition to Tab. Helps to avoid ambiguity between inserting new lines or accepting suggestions.",
|
|
26
26
|
|
|
27
|
+
"field_word-wrap": "Word wrap",
|
|
28
|
+
"value_on": "On",
|
|
29
|
+
"value_off": "Off",
|
|
30
|
+
|
|
27
31
|
"settings.theme.title": "Interface theme",
|
|
28
32
|
"settings.theme.option-dark": "Dark",
|
|
29
33
|
"settings.theme.option-light": "Light",
|
|
@@ -200,6 +200,16 @@ export const autocompleteOnEnterSetting: SettingProps = {
|
|
|
200
200
|
description: i18n('settings.editor.autocomplete-on-enter.description'),
|
|
201
201
|
};
|
|
202
202
|
|
|
203
|
+
export const wordWrapSetting: SettingProps = {
|
|
204
|
+
settingKey: SETTING_KEYS.WORD_WRAP,
|
|
205
|
+
title: i18n('field_word-wrap'),
|
|
206
|
+
type: 'radio',
|
|
207
|
+
options: [
|
|
208
|
+
{value: 'on', content: i18n('value_on')},
|
|
209
|
+
{value: 'off', content: i18n('value_off')},
|
|
210
|
+
],
|
|
211
|
+
};
|
|
212
|
+
|
|
203
213
|
const aclSyntaxOptions = [
|
|
204
214
|
{
|
|
205
215
|
value: AclSyntax.Kikimr,
|
|
@@ -252,7 +262,12 @@ export const experimentsSection: SettingsSection = {
|
|
|
252
262
|
export const devSettingsSection: SettingsSection = {
|
|
253
263
|
id: SECTION_IDS.DEV_SETTINGS,
|
|
254
264
|
title: i18n('section.dev-setting'),
|
|
255
|
-
settings: [
|
|
265
|
+
settings: [
|
|
266
|
+
enableAutocompleteSetting,
|
|
267
|
+
autocompleteOnEnterSetting,
|
|
268
|
+
wordWrapSetting,
|
|
269
|
+
enableQueryStreamingSetting,
|
|
270
|
+
],
|
|
256
271
|
};
|
|
257
272
|
|
|
258
273
|
export const resultsSettingsSection: SettingsSection = {
|
|
@@ -3,6 +3,7 @@ import {isNil} from 'lodash';
|
|
|
3
3
|
|
|
4
4
|
import {CellWithPopover} from '../../components/CellWithPopover/CellWithPopover';
|
|
5
5
|
import {CopyableValue} from '../../components/CopyableValue/CopyableValue';
|
|
6
|
+
import {DatacenterLabel} from '../../components/Datacenter/DatacenterLabel';
|
|
6
7
|
import {InternalLinkButton} from '../../components/InternalLinkButton';
|
|
7
8
|
import {getVDiskLocationItems} from '../../components/VDiskInfo/getVDiskDetails';
|
|
8
9
|
import {getPDiskPagePath} from '../../routes';
|
|
@@ -24,7 +25,13 @@ interface VDiskStorageDetailsProps {
|
|
|
24
25
|
data?: VDiskData;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
function DetailItem({
|
|
28
|
+
function DetailItem({
|
|
29
|
+
item,
|
|
30
|
+
datacenterColorKey,
|
|
31
|
+
}: {
|
|
32
|
+
item: DiskDetailItem;
|
|
33
|
+
datacenterColorKey?: string;
|
|
34
|
+
}) {
|
|
28
35
|
const copyText = item.copyText === undefined ? undefined : String(item.copyText);
|
|
29
36
|
return (
|
|
30
37
|
<div
|
|
@@ -43,7 +50,17 @@ function DetailItem({item}: {item: DiskDetailItem}) {
|
|
|
43
50
|
'with-left-trim': item.id === 'pdisk-path',
|
|
44
51
|
})}
|
|
45
52
|
>
|
|
46
|
-
<span tabIndex={copyText ? 0 : undefined}>
|
|
53
|
+
<span tabIndex={copyText ? 0 : undefined}>
|
|
54
|
+
{item.id === 'datacenter' && copyText ? (
|
|
55
|
+
<DatacenterLabel
|
|
56
|
+
name={copyText}
|
|
57
|
+
colorKey={datacenterColorKey}
|
|
58
|
+
size="xxs"
|
|
59
|
+
/>
|
|
60
|
+
) : (
|
|
61
|
+
item.content
|
|
62
|
+
)}
|
|
63
|
+
</span>
|
|
47
64
|
</CellWithPopover>
|
|
48
65
|
</CopyableValue>
|
|
49
66
|
</div>
|
|
@@ -68,7 +85,9 @@ export function VDiskStorageDetails({className, data = {}}: VDiskStorageDetailsP
|
|
|
68
85
|
<div className={b('card')}>
|
|
69
86
|
{LOCATION_IDS.map((id) => {
|
|
70
87
|
const item = items.find((entry) => entry.id === id);
|
|
71
|
-
return item ?
|
|
88
|
+
return item ? (
|
|
89
|
+
<DetailItem key={id} item={item} datacenterColorKey={data.NodeDCKey} />
|
|
90
|
+
) : null;
|
|
72
91
|
})}
|
|
73
92
|
</div>
|
|
74
93
|
<div className={b('card', {ids: true})}>
|
package/src/lib.ts
CHANGED
|
@@ -430,12 +430,16 @@ export class ViewerAPI extends BaseYdbAPI {
|
|
|
430
430
|
);
|
|
431
431
|
}
|
|
432
432
|
|
|
433
|
-
getNodesList(
|
|
433
|
+
getNodesList(
|
|
434
|
+
{database, include_storage: includeStorage}: {database?: string; include_storage?: boolean},
|
|
435
|
+
{concurrentId, signal}: AxiosOptions = {},
|
|
436
|
+
) {
|
|
434
437
|
return this.get<TEvNodesInfo>(
|
|
435
438
|
this.getPath('/viewer/json/nodelist'),
|
|
436
439
|
{
|
|
437
440
|
enums: true,
|
|
438
441
|
database,
|
|
442
|
+
include_storage: includeStorage,
|
|
439
443
|
},
|
|
440
444
|
{
|
|
441
445
|
concurrentId,
|