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
|
@@ -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
|
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {Text} from '@gravity-ui/uikit';
|
|
3
|
+
import {Flex, Text} from '@gravity-ui/uikit';
|
|
4
4
|
import {Helmet} from 'react-helmet-async';
|
|
5
5
|
|
|
6
|
+
import {CopyableValue} from '../../../components/CopyableValue/CopyableValue';
|
|
6
7
|
import {DrawerContextProvider} from '../../../components/Drawer/DrawerContext';
|
|
7
8
|
import {TENANT_DIAGNOSTICS_TABS_IDS} from '../../../store/reducers/tenant/constants';
|
|
8
9
|
import {setDiagnosticsTab, useTenantBaseInfo} from '../../../store/reducers/tenant/tenant';
|
|
9
10
|
import type {AdditionalTenantsProps} from '../../../types/additionalProps';
|
|
10
11
|
import type {EPathSubType, EPathType} from '../../../types/api/schema';
|
|
11
12
|
import {useScrollPosition, useTypedDispatch, useTypedSelector} from '../../../utils/hooks';
|
|
13
|
+
import i18n from '../i18n';
|
|
12
14
|
import {useNavigationV2Enabled} from '../utils/useNavigationV2Enabled';
|
|
13
15
|
|
|
14
16
|
import type {DatabasePagesDisplay} from './DiagnosticsPages';
|
|
@@ -47,7 +49,8 @@ function Diagnostics({
|
|
|
47
49
|
|
|
48
50
|
const isV2NavigationEnabled = useNavigationV2Enabled();
|
|
49
51
|
|
|
50
|
-
const {name} = useTenantBaseInfo(database);
|
|
52
|
+
const {name, id, controlPlane, metaErrors} = useTenantBaseInfo(database);
|
|
53
|
+
const showDatabaseId = Boolean(id && (controlPlane || metaErrors?.control_plane));
|
|
51
54
|
|
|
52
55
|
const pages = useDiagnosticsPages({
|
|
53
56
|
path,
|
|
@@ -94,9 +97,22 @@ function Diagnostics({
|
|
|
94
97
|
const renderDBName = () => {
|
|
95
98
|
if (isV2NavigationEnabled && databasePagesDisplay === 'database') {
|
|
96
99
|
return (
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
<Flex
|
|
101
|
+
alignItems="center"
|
|
102
|
+
gap={3}
|
|
103
|
+
wrap="wrap"
|
|
104
|
+
className={b('db-name')}
|
|
105
|
+
qa="database-header"
|
|
106
|
+
>
|
|
107
|
+
<Text variant="header-1">{name}</Text>
|
|
108
|
+
{showDatabaseId && (
|
|
109
|
+
<CopyableValue copyText={id} fieldName={i18n('title_database')}>
|
|
110
|
+
<Text variant="header-1" color="hint">
|
|
111
|
+
{id}
|
|
112
|
+
</Text>
|
|
113
|
+
</CopyableValue>
|
|
114
|
+
)}
|
|
115
|
+
</Flex>
|
|
100
116
|
);
|
|
101
117
|
}
|
|
102
118
|
|
|
@@ -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) {
|
|
@@ -36,7 +36,8 @@ export function useDiagnosticsPages({
|
|
|
36
36
|
}: UseDiagnosticsPagesParams): Page[] {
|
|
37
37
|
const isDatabase = isDatabaseEntityType(type) || path === databaseFullPath;
|
|
38
38
|
|
|
39
|
-
const {controlPlane, databaseType} = useTenantBaseInfo(isDatabase ? database : '');
|
|
39
|
+
const {controlPlane, databaseType, metaErrors} = useTenantBaseInfo(isDatabase ? database : '');
|
|
40
|
+
const controlPlaneError = metaErrors?.control_plane;
|
|
40
41
|
const {monitoring: clusterMonitoring} = useClusterBaseInfo();
|
|
41
42
|
|
|
42
43
|
const hasConfigs = useConfigAvailable();
|
|
@@ -52,7 +53,9 @@ export function useDiagnosticsPages({
|
|
|
52
53
|
hasTopicData,
|
|
53
54
|
isDatabase,
|
|
54
55
|
hasStorageUsage,
|
|
55
|
-
hasBackups:
|
|
56
|
+
hasBackups:
|
|
57
|
+
typeof uiFactory.renderBackups === 'function' &&
|
|
58
|
+
Boolean(controlPlane || controlPlaneError),
|
|
56
59
|
hasConfigs: isViewerUser && hasConfigs,
|
|
57
60
|
hasAccess: uiFactory.hasAccess({userPermissions}),
|
|
58
61
|
hasMonitoring: canShowTenantMonitoringTab(controlPlane, clusterMonitoring),
|
|
@@ -66,6 +69,7 @@ export function useDiagnosticsPages({
|
|
|
66
69
|
isDatabase,
|
|
67
70
|
hasStorageUsage,
|
|
68
71
|
controlPlane,
|
|
72
|
+
controlPlaneError,
|
|
69
73
|
isViewerUser,
|
|
70
74
|
hasConfigs,
|
|
71
75
|
clusterMonitoring,
|
|
@@ -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
|
|
|
@@ -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,10 +3,10 @@ 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';
|
|
9
|
-
import {useNewStorageViewEnabled} from '../../store/reducers/capabilities/hooks';
|
|
10
10
|
import type {VDiskData} from '../../store/reducers/vdisk/types';
|
|
11
11
|
import {cn} from '../../utils/cn';
|
|
12
12
|
import type {DiskDetailItem} from '../../utils/disks/diskInfo/getDiskLocationItems';
|
|
@@ -24,7 +24,13 @@ interface VDiskStorageDetailsProps {
|
|
|
24
24
|
data?: VDiskData;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function DetailItem({
|
|
27
|
+
function DetailItem({
|
|
28
|
+
item,
|
|
29
|
+
datacenterColorKey,
|
|
30
|
+
}: {
|
|
31
|
+
item: DiskDetailItem;
|
|
32
|
+
datacenterColorKey?: string;
|
|
33
|
+
}) {
|
|
28
34
|
const copyText = item.copyText === undefined ? undefined : String(item.copyText);
|
|
29
35
|
return (
|
|
30
36
|
<div
|
|
@@ -43,7 +49,17 @@ function DetailItem({item}: {item: DiskDetailItem}) {
|
|
|
43
49
|
'with-left-trim': item.id === 'pdisk-path',
|
|
44
50
|
})}
|
|
45
51
|
>
|
|
46
|
-
<span tabIndex={copyText ? 0 : undefined}>
|
|
52
|
+
<span tabIndex={copyText ? 0 : undefined}>
|
|
53
|
+
{item.id === 'datacenter' && copyText ? (
|
|
54
|
+
<DatacenterLabel
|
|
55
|
+
name={copyText}
|
|
56
|
+
colorKey={datacenterColorKey}
|
|
57
|
+
size="xxs"
|
|
58
|
+
/>
|
|
59
|
+
) : (
|
|
60
|
+
item.content
|
|
61
|
+
)}
|
|
62
|
+
</span>
|
|
47
63
|
</CellWithPopover>
|
|
48
64
|
</CopyableValue>
|
|
49
65
|
</div>
|
|
@@ -52,7 +68,6 @@ function DetailItem({item}: {item: DiskDetailItem}) {
|
|
|
52
68
|
|
|
53
69
|
export function VDiskStorageDetails({className, data = {}}: VDiskStorageDetailsProps) {
|
|
54
70
|
const isViewerUser = useIsViewerUser();
|
|
55
|
-
const newStorageViewEnabled = useNewStorageViewEnabled();
|
|
56
71
|
const pDiskPath =
|
|
57
72
|
isViewerUser && !isNil(data.NodeId) && !isNil(data.PDiskId)
|
|
58
73
|
? getPDiskPagePath(data.PDiskId, data.NodeId)
|
|
@@ -61,14 +76,16 @@ export function VDiskStorageDetails({className, data = {}}: VDiskStorageDetailsP
|
|
|
61
76
|
Host: data.NodeHost,
|
|
62
77
|
Rack: data.NodeRack,
|
|
63
78
|
DC: data.NodeDC,
|
|
64
|
-
})
|
|
79
|
+
});
|
|
65
80
|
|
|
66
81
|
return (
|
|
67
82
|
<div className={b(null, className)} data-qa="vdisk-location">
|
|
68
83
|
<div className={b('card')}>
|
|
69
84
|
{LOCATION_IDS.map((id) => {
|
|
70
85
|
const item = items.find((entry) => entry.id === id);
|
|
71
|
-
return item ?
|
|
86
|
+
return item ? (
|
|
87
|
+
<DetailItem key={id} item={item} datacenterColorKey={data.NodeDCKey} />
|
|
88
|
+
) : null;
|
|
72
89
|
})}
|
|
73
90
|
</div>
|
|
74
91
|
<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,
|