ydb-embedded-ui 6.6.0 → 6.7.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/package.json +4 -3
- package/dist/src/containers/App/App.d.ts +1 -1
- package/dist/{containers → src/containers}/App/App.scss +5 -0
- package/dist/src/containers/App/Content.js +1 -1
- package/dist/src/containers/App/appSlots.d.ts +1 -1
- package/dist/src/containers/AsideNavigation/Navigation.js +1 -3
- package/dist/src/containers/AsideNavigation/i18n/en.json +0 -2
- package/dist/src/containers/AsideNavigation/i18n/index.d.ts +1 -1
- package/dist/src/containers/AsideNavigation/i18n/index.js +1 -2
- package/dist/src/containers/Cluster/i18n/index.d.ts +1 -1
- package/dist/src/containers/Clusters/constants.d.ts +1 -1
- package/dist/src/containers/Header/Header.js +17 -21
- package/dist/{containers → src/containers}/Header/Header.scss +14 -5
- package/dist/src/containers/Header/breadcrumbs.js +65 -71
- package/dist/src/containers/Heatmap/Heatmap.js +3 -3
- package/dist/src/containers/Nodes/Nodes.js +4 -4
- package/dist/src/containers/Nodes/VirtualNodes.js +2 -2
- package/dist/src/containers/Storage/Storage.js +2 -2
- package/dist/src/containers/Tablets/Tablets.js +8 -8
- package/dist/src/containers/TabletsFilters/TabletsFilters.d.ts +2 -57
- package/dist/src/containers/TabletsFilters/TabletsFilters.js +70 -180
- package/dist/src/containers/Tenant/Acl/Acl.d.ts +3 -1
- package/dist/src/containers/Tenant/Acl/Acl.js +7 -17
- package/dist/src/containers/Tenant/Diagnostics/Autorefresh/AutorefreshControl.js +4 -5
- package/dist/src/containers/Tenant/Diagnostics/Consumers/Consumers.js +3 -3
- package/dist/src/containers/Tenant/Diagnostics/Describe/Describe.d.ts +2 -2
- package/dist/src/containers/Tenant/Diagnostics/Describe/Describe.js +5 -6
- package/dist/src/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.d.ts +1 -0
- package/dist/src/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.js +3 -5
- package/dist/src/containers/Tenant/Diagnostics/Diagnostics.d.ts +2 -0
- package/dist/src/containers/Tenant/Diagnostics/Diagnostics.js +26 -50
- package/dist/{containers → src/containers}/Tenant/Diagnostics/Diagnostics.scss +1 -1
- package/dist/src/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +19 -58
- package/dist/src/containers/Tenant/Diagnostics/Network/Network.d.ts +2 -2
- package/dist/src/containers/Tenant/Diagnostics/Network/Network.js +5 -5
- package/dist/src/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/AsyncReplicationInfo.js +1 -6
- package/dist/src/containers/Tenant/Diagnostics/Overview/ChangefeedInfo/ChangefeedInfo.d.ts +2 -1
- package/dist/src/containers/Tenant/Diagnostics/Overview/ChangefeedInfo/ChangefeedInfo.js +3 -8
- package/dist/src/containers/Tenant/Diagnostics/Overview/Overview.d.ts +2 -2
- package/dist/src/containers/Tenant/Diagnostics/Overview/Overview.js +19 -21
- package/dist/{containers → src/containers}/Tenant/Diagnostics/Overview/TableInfo/TableInfo.scss +0 -2
- package/dist/src/containers/Tenant/Diagnostics/Overview/TopicInfo/TopicInfo.d.ts +2 -1
- package/dist/src/containers/Tenant/Diagnostics/Overview/TopicInfo/TopicInfo.js +3 -8
- package/dist/src/containers/Tenant/Diagnostics/Overview/TopicStats/TopicStats.d.ts +3 -1
- package/dist/src/containers/Tenant/Diagnostics/Overview/TopicStats/TopicStats.js +5 -5
- package/dist/src/containers/Tenant/Diagnostics/Partitions/Partitions.js +4 -12
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/Healthcheck.scss +100 -0
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckDetails.d.ts +2 -5
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckDetails.js +7 -2
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.d.ts +1 -6
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.js +22 -16
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.d.ts +2 -8
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.js +2 -2
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TenantCpu.d.ts +2 -2
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TenantCpu.js +2 -2
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.d.ts +2 -2
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js +4 -4
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.d.ts +2 -2
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.js +4 -4
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.d.ts +2 -2
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +4 -4
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.d.ts +2 -1
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js +5 -5
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantDashboard/TenantDashboard.js +3 -3
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TenantMemory.d.ts +2 -2
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TenantMemory.js +2 -2
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.d.ts +2 -2
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js +4 -4
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +7 -9
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +3 -3
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.js +3 -3
- package/dist/src/containers/Tenant/Diagnostics/TenantOverview/useHealthcheck.js +1 -1
- package/dist/src/containers/Tenant/Diagnostics/TopQueries/TopQueries.d.ts +2 -2
- package/dist/src/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +5 -5
- package/dist/src/containers/Tenant/Diagnostics/TopShards/TopShards.d.ts +3 -2
- package/dist/src/containers/Tenant/Diagnostics/TopShards/TopShards.js +8 -8
- package/dist/src/containers/Tenant/Info/ExternalDataSource/ExternalDataSource.js +0 -6
- package/dist/src/containers/Tenant/Info/ExternalTable/ExternalTable.js +0 -6
- package/dist/src/containers/Tenant/Info/View/View.js +0 -6
- package/dist/src/containers/Tenant/ObjectGeneral/ObjectGeneral.d.ts +2 -1
- package/dist/src/containers/Tenant/ObjectGeneral/ObjectGeneral.js +7 -13
- package/dist/src/containers/Tenant/ObjectSummary/ObjectSummary.d.ts +4 -4
- package/dist/src/containers/Tenant/ObjectSummary/ObjectSummary.js +159 -63
- package/dist/src/containers/Tenant/Query/Issues/Issues.js +6 -5
- package/dist/src/containers/Tenant/Query/Preview/Preview.d.ts +2 -1
- package/dist/src/containers/Tenant/Query/Preview/Preview.js +6 -6
- package/dist/src/containers/Tenant/Query/Query.d.ts +1 -0
- package/dist/{containers → src/containers}/Tenant/Query/Query.scss +1 -1
- package/dist/src/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +2 -0
- package/dist/src/containers/Tenant/Query/QueryEditor/QueryEditor.js +9 -22
- package/dist/src/containers/Tenant/Query/i18n/en.json +1 -1
- package/dist/src/containers/Tenant/Schema/SchemaTree/SchemaTree.d.ts +1 -0
- package/dist/src/containers/Tenant/Schema/SchemaTree/SchemaTree.js +11 -19
- package/dist/src/containers/Tenant/Schema/SchemaViewer/SchemaViewer.d.ts +2 -2
- package/dist/src/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +13 -8
- package/dist/src/containers/Tenant/Schema/SchemaViewer/columns.d.ts +2 -1
- package/dist/src/containers/Tenant/Schema/SchemaViewer/columns.js +21 -2
- package/dist/src/containers/Tenant/Schema/SchemaViewer/i18n/en.json +1 -0
- package/dist/src/containers/Tenant/Schema/SchemaViewer/i18n/index.d.ts +1 -1
- package/dist/src/containers/Tenant/Schema/SchemaViewer/prepareData.js +2 -1
- package/dist/src/containers/Tenant/Schema/SchemaViewer/types.d.ts +1 -0
- package/dist/src/containers/Tenant/Tenant.js +20 -36
- package/dist/{containers → src/containers}/Tenant/Tenant.scss +4 -0
- package/dist/src/containers/Tenant/TenantNavigation/TenantNavigation.d.ts +2 -0
- package/dist/src/containers/Tenant/TenantNavigation/TenantNavigation.js +19 -0
- package/dist/src/containers/Tenant/TenantNavigation/TenantNavigation.scss +18 -0
- package/dist/src/containers/Tenant/TenantNavigation/useTenantNavigation.d.ts +9 -0
- package/dist/src/containers/Tenant/TenantNavigation/useTenantNavigation.js +44 -0
- package/dist/src/containers/Tenant/i18n/en.json +17 -0
- package/dist/src/containers/Tenant/i18n/index.d.ts +1 -1
- package/dist/src/containers/Tenant/utils/queryTemplates.d.ts +1 -0
- package/dist/src/containers/Tenant/utils/queryTemplates.js +12 -0
- package/dist/src/containers/Tenant/utils/schema.d.ts +1 -1
- package/dist/src/containers/Tenant/utils/schema.js +5 -6
- package/dist/src/containers/Tenant/utils/schemaActions.js +3 -1
- package/dist/src/lib.d.ts +3 -2
- package/dist/src/lib.js +2 -2
- package/dist/src/routes.d.ts +1 -1
- package/dist/src/routes.js +3 -1
- package/dist/src/services/api.d.ts +6 -1
- package/dist/src/services/api.js +23 -3
- package/dist/src/services/settings.d.ts +1 -0
- package/dist/src/services/settings.js +3 -2
- package/dist/src/store/configureStore.d.ts +36 -134
- package/dist/src/store/configureStore.js +2 -15
- package/dist/src/store/defaultStore.d.ts +17 -81
- package/dist/src/store/reducers/api.js +0 -1
- package/dist/src/store/reducers/authentication/authentication.d.ts +51 -243
- package/dist/src/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +196 -849
- package/dist/src/store/reducers/healthcheckInfo/healthcheckInfo.js +3 -3
- package/dist/src/store/reducers/hotKeys/hotKeys.d.ts +6 -25
- package/dist/src/store/reducers/hotKeys/hotKeys.js +36 -49
- package/dist/src/store/reducers/index.d.ts +23 -100
- package/dist/src/store/reducers/index.js +0 -8
- package/dist/src/store/reducers/node/selectors.d.ts +0 -40
- package/dist/src/store/reducers/nodesList.d.ts +0 -40
- package/dist/src/store/reducers/schema/schema.d.ts +13 -149
- package/dist/src/store/reducers/schema/schema.js +45 -90
- package/dist/src/store/reducers/schema/types.d.ts +2 -21
- package/dist/src/store/reducers/schemaAcl/schemaAcl.d.ts +8 -135
- package/dist/src/store/reducers/schemaAcl/schemaAcl.js +18 -44
- package/dist/src/store/reducers/settings/settings.d.ts +17 -23
- package/dist/src/store/reducers/settings/settings.js +40 -33
- package/dist/src/store/reducers/settings/types.d.ts +1 -12
- package/dist/src/store/reducers/tablets.d.ts +288 -41
- package/dist/src/store/reducers/tablets.js +8 -4
- package/dist/src/store/reducers/tabletsFilters.d.ts +11 -164
- package/dist/src/store/reducers/tabletsFilters.js +14 -76
- package/dist/src/store/reducers/tenants/selectors.d.ts +8 -362
- package/dist/src/store/reducers/topic.d.ts +0 -600
- package/dist/src/store/state-url-mapping.js +0 -3
- package/dist/src/types/api/tenant.d.ts +1 -7
- package/dist/src/types/api/tenant.js +0 -8
- package/dist/src/utils/__test__/monitoring.test.js +1 -1
- package/dist/src/utils/constants.d.ts +1 -1
- package/dist/src/utils/constants.js +1 -1
- package/dist/src/utils/dataFormatters/dataFormatters.d.ts +2 -1
- package/dist/src/utils/dataFormatters/dataFormatters.js +7 -3
- package/dist/src/utils/hooks/index.d.ts +1 -0
- package/dist/src/utils/hooks/index.js +1 -0
- package/dist/src/utils/hooks/useAutoRefreshInterval.d.ts +1 -0
- package/dist/src/utils/hooks/useAutoRefreshInterval.js +5 -0
- package/dist/src/utils/monitoring.d.ts +2 -1
- package/dist/src/utils/monitoring.js +1 -4
- package/dist/src/utils/utils.js +2 -1
- package/package.json +4 -3
- package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/Healthcheck.scss +0 -109
- package/dist/src/components/InfoViewer/schemaOverview/CDCStreamOverview.d.ts +0 -6
- package/dist/src/components/InfoViewer/schemaOverview/CDCStreamOverview.js +0 -17
- package/dist/src/components/InfoViewer/schemaOverview/PersQueueGroupOverview.d.ts +0 -6
- package/dist/src/components/InfoViewer/schemaOverview/PersQueueGroupOverview.js +0 -20
- package/dist/src/components/InfoViewer/schemaOverview/index.d.ts +0 -2
- package/dist/src/components/InfoViewer/schemaOverview/index.js +0 -2
- package/dist/src/containers/AsideNavigation/i18n/ru.json +0 -10
- package/dist/src/containers/AsideNavigation/useNavigationMenuItems.d.ts +0 -2
- package/dist/src/containers/AsideNavigation/useNavigationMenuItems.js +0 -54
- package/dist/src/store/reducers/host.d.ts +0 -130
- package/dist/src/store/reducers/host.js +0 -26
- package/dist/src/store/reducers/hotKeys/types.d.ts +0 -10
- package/dist/src/store/reducers/hotKeys/types.js +0 -1
- package/dist/src/store/reducers/schemaAcl/types.d.ts +0 -12
- package/dist/src/store/reducers/schemaAcl/types.js +0 -1
- package/dist/src/types/store/host.d.ts +0 -15
- package/dist/src/types/store/host.js +0 -1
- package/dist/styles/constants.scss +0 -9
- /package/dist/{assets → src/assets}/icons/cluster.svg +0 -0
- /package/dist/{assets → src/assets}/icons/databases.svg +0 -0
- /package/dist/{assets → src/assets}/icons/disableFullscreen.svg +0 -0
- /package/dist/{assets → src/assets}/icons/emptyState.svg +0 -0
- /package/dist/{assets → src/assets}/icons/key.svg +0 -0
- /package/dist/{assets → src/assets}/icons/monitoring.svg +0 -0
- /package/dist/{assets → src/assets}/icons/network.svg +0 -0
- /package/dist/{assets → src/assets}/icons/user-check.svg +0 -0
- /package/dist/{assets → src/assets}/icons/user-secret.svg +0 -0
- /package/dist/{assets → src/assets}/icons/ydb.svg +0 -0
- /package/dist/{assets → src/assets}/illustrations/dark/403.svg +0 -0
- /package/dist/{assets → src/assets}/illustrations/dark/error.svg +0 -0
- /package/dist/{assets → src/assets}/illustrations/dark/thumbsUp.svg +0 -0
- /package/dist/{assets → src/assets}/illustrations/light/403.svg +0 -0
- /package/dist/{assets → src/assets}/illustrations/light/error.svg +0 -0
- /package/dist/{assets → src/assets}/illustrations/light/thumbsUp.svg +0 -0
- /package/dist/{components → src/components}/BasicNodeViewer/BasicNodeViewer.scss +0 -0
- /package/dist/{components → src/components}/CellWithPopover/CellWithPopover.scss +0 -0
- /package/dist/{components → src/components}/CircularProgressBar/CircularProgressBar.scss +0 -0
- /package/dist/{components → src/components}/CriticalActionDialog/CriticalActionDialog.scss +0 -0
- /package/dist/{components → src/components}/DateRange/DateRange.scss +0 -0
- /package/dist/{components → src/components}/DiagnosticCard/DiagnosticCard.scss +0 -0
- /package/dist/{components → src/components}/DiskPageTitle/DiskPageTitle.scss +0 -0
- /package/dist/{components → src/components}/DiskStateProgressBar/DiskStateProgressBar.scss +0 -0
- /package/dist/{components → src/components}/Divider/Divider.scss +0 -0
- /package/dist/{components → src/components}/EmptyState/EmptyState.scss +0 -0
- /package/dist/{components → src/components}/EntityStatus/EntityStatus.scss +0 -0
- /package/dist/{components → src/components}/ErrorBoundary/ErrorBoundary.scss +0 -0
- /package/dist/{components → src/components}/FullNodeViewer/FullNodeViewer.scss +0 -0
- /package/dist/{components → src/components}/Fullscreen/Fullscreen.scss +0 -0
- /package/dist/{components → src/components}/InfoViewer/InfoViewer.scss +0 -0
- /package/dist/{components → src/components}/InfoViewerSkeleton/InfoViewerSkeleton.scss +0 -0
- /package/dist/{components → src/components}/LagPopoverContent/LagPopoverContent.scss +0 -0
- /package/dist/{components → src/components}/LinkWithIcon/LinkWithIcon.scss +0 -0
- /package/dist/{components → src/components}/Loader/Loader.scss +0 -0
- /package/dist/{components → src/components}/MetricChart/MetricChart.scss +0 -0
- /package/dist/{components → src/components}/MonitoringButton/MonitoringButton.scss +0 -0
- /package/dist/{components → src/components}/NodeHostWrapper/NodeHostWrapper.scss +0 -0
- /package/dist/{components → src/components}/PDiskInfo/PDiskInfo.scss +0 -0
- /package/dist/{components → src/components}/PDiskPopup/PDiskPopup.scss +0 -0
- /package/dist/{components → src/components}/PageMeta/PageMeta.scss +0 -0
- /package/dist/{components → src/components}/PoolBar/PoolBar.scss +0 -0
- /package/dist/{components → src/components}/PoolUsage/PoolUsage.scss +0 -0
- /package/dist/{components → src/components}/PoolsGraph/PoolsGraph.scss +0 -0
- /package/dist/{components → src/components}/ProgressViewer/ProgressViewer.scss +0 -0
- /package/dist/{components → src/components}/QueryExecutionStatus/QueryExecutionStatus.scss +0 -0
- /package/dist/{components → src/components}/QueryResultTable/QueryResultTable.scss +0 -0
- /package/dist/{components → src/components}/ResizeableDataTable/ResizeableDataTable.scss +0 -0
- /package/dist/{components → src/components}/Search/Search.scss +0 -0
- /package/dist/{components → src/components}/ShortyString/ShortyString.scss +0 -0
- /package/dist/{components → src/components}/SpeedMultiMeter/SpeedMultiMeter.scss +0 -0
- /package/dist/{components → src/components}/SplitPane/SplitPane.scss +0 -0
- /package/dist/{components → src/components}/Stack/Stack.scss +0 -0
- /package/dist/{components → src/components}/StatusIcon/StatusIcon.scss +0 -0
- /package/dist/{components → src/components}/TableSkeleton/TableSkeleton.scss +0 -0
- /package/dist/{components → src/components}/TableWithControlsLayout/TableWithControlsLayout.scss +0 -0
- /package/dist/{components → src/components}/Tablet/Tablet.scss +0 -0
- /package/dist/{components → src/components}/TabletIcon/TabletIcon.scss +0 -0
- /package/dist/{components → src/components}/TabletsOverall/TabletsOverall.scss +0 -0
- /package/dist/{components → src/components}/TabletsStatistic/TabletsStatistic.scss +0 -0
- /package/dist/{components → src/components}/Tag/Tag.scss +0 -0
- /package/dist/{components → src/components}/Tags/Tags.scss +0 -0
- /package/dist/{components → src/components}/TimeFrameSelector/TimeFrameSelector.scss +0 -0
- /package/dist/{components → src/components}/TooltipsContent/NodeEndpointsTooltipContent/NodeEndpointsTooltipContent.scss +0 -0
- /package/dist/{components → src/components}/TruncatedQuery/TruncatedQuery.scss +0 -0
- /package/dist/{components → src/components}/UsageLabel/UsageLabel.scss +0 -0
- /package/dist/{components → src/components}/User/User.scss +0 -0
- /package/dist/{components → src/components}/VDisk/VDisk.scss +0 -0
- /package/dist/{components → src/components}/VDiskInfo/VDiskInfo.scss +0 -0
- /package/dist/{components → src/components}/VDiskPopup/VDiskPopup.scss +0 -0
- /package/dist/{components → src/components}/VirtualTable/VirtualTable.scss +0 -0
- /package/dist/{containers → src/containers}/AppWithClusters/ExtendedCluster/ExtendedCluster.scss +0 -0
- /package/dist/{containers → src/containers}/AsideNavigation/AsideNavigation.scss +0 -0
- /package/dist/{containers → src/containers}/AsideNavigation/YdbInternalUser/YdbInternalUser.scss +0 -0
- /package/dist/{containers → src/containers}/Authentication/Authentication.scss +0 -0
- /package/dist/{containers → src/containers}/Cluster/Cluster.scss +0 -0
- /package/dist/{containers → src/containers}/Cluster/ClusterInfo/ClusterInfo.scss +0 -0
- /package/dist/{containers → src/containers}/Cluster/VersionsBar/VersionsBar.scss +0 -0
- /package/dist/{containers → src/containers}/Clusters/Clusters.scss +0 -0
- /package/dist/{containers → src/containers}/Heatmap/Heatmap.scss +0 -0
- /package/dist/{containers → src/containers}/Heatmap/Histogram/Histogram.scss +0 -0
- /package/dist/{containers → src/containers}/Node/Node.scss +0 -0
- /package/dist/{containers → src/containers}/Node/NodeStructure/NodeStructure.scss +0 -0
- /package/dist/{containers → src/containers}/Nodes/Nodes.scss +0 -0
- /package/dist/{containers → src/containers}/PDiskPage/PDiskPage.scss +0 -0
- /package/dist/{containers → src/containers}/ReduxTooltip/ReduxTooltip.scss +0 -0
- /package/dist/{containers → src/containers}/Storage/PDisk/PDisk.scss +0 -0
- /package/dist/{containers → src/containers}/Storage/Storage.scss +0 -0
- /package/dist/{containers → src/containers}/Storage/StorageGroups/StorageGroups.scss +0 -0
- /package/dist/{containers → src/containers}/Storage/StorageNodes/StorageNodes.scss +0 -0
- /package/dist/{containers → src/containers}/Storage/UsageFilter/UsageFilter.scss +0 -0
- /package/dist/{containers → src/containers}/Tablet/Tablet.scss +0 -0
- /package/dist/{containers → src/containers}/TabletsFilters/TabletsFilters.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Acl/Acl.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/Autorefresh/AutorefreshControl.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/Consumers/Consumers.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/Consumers/Headers/Headers.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/Consumers/TopicStats/ConsumersTopicStats.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/Consumers/columns/Columns.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/Describe/Describe.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/DetailedOverview/DetailedOverview.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/HotKeys/HotKeys.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/Network/Network.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/Network/NodeNetwork/NodeNetwork.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/Overview/TopicStats/TopicStats.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/Partitions/Headers/Headers.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/Partitions/Partitions.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/Partitions/columns/Columns.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTree.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTreeItem/IssueTreeItem.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricCard/MetricCard.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/TenantOverview/TenantDashboard/TenantDashboard.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/TenantOverview/TenantOverview.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/TopQueries/TopQueries.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Diagnostics/TopShards/TopShards.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Info/ExternalDataSource/ExternalDataSource.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Info/ExternalTable/ExternalTable.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Info/View/View.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/ObjectGeneral/ObjectGeneral.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/ObjectSummary/ObjectSummary.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Query/ExecuteResult/ExecuteResult.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Query/ExplainResult/ExplainResult.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Query/Issues/Issues.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Query/Preview/Preview.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Query/QueriesHistory/QueriesHistory.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Query/QueryDuration/QueryDuration.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Query/QueryEditor/QueryEditor.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Query/QueryEditorControls/QueryEditorControls.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Query/SaveQuery/SaveQuery.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Query/SavedQueries/SavedQueries.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/Schema/SchemaViewer/SchemaViewer.scss +0 -0
- /package/dist/{containers → src/containers}/Tenant/utils/ToggleButton.scss +0 -0
- /package/dist/{containers → src/containers}/Tenants/Tenants.scss +0 -0
- /package/dist/{containers → src/containers}/UserSettings/UserSettings.scss +0 -0
- /package/dist/{containers → src/containers}/VDiskPage/VDiskPage.scss +0 -0
- /package/dist/{containers → src/containers}/Versions/GroupedNodesTree/GroupedNodesTree.scss +0 -0
- /package/dist/{containers → src/containers}/Versions/NodesTreeTitle/NodesTreeTitle.scss +0 -0
- /package/dist/{containers → src/containers}/Versions/Versions.scss +0 -0
- /package/dist/{index.css → src/index.css} +0 -0
- /package/dist/{styles → src/styles}/mixins.scss +0 -0
- /package/dist/{styles → src/styles}/themes/dark-hc.scss +0 -0
- /package/dist/{styles → src/styles}/themes/dark.scss +0 -0
- /package/dist/{styles → src/styles}/themes/light-hc.scss +0 -0
- /package/dist/{styles → src/styles}/themes/light.scss +0 -0
- /package/dist/{styles → src/styles}/themes.scss +0 -0
@@ -1,200 +1,90 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import React from 'react';
|
3
3
|
import { Loader, Select } from '@gravity-ui/uikit';
|
4
|
-
import isEqual from 'lodash/isEqual';
|
5
4
|
import map from 'lodash/map';
|
6
|
-
import PropTypes from 'prop-types';
|
7
5
|
import { Helmet } from 'react-helmet-async';
|
8
6
|
import ReactList from 'react-list';
|
9
|
-
import {
|
7
|
+
import { ArrayParam, StringParam, useQueryParams } from 'use-query-params';
|
8
|
+
import { z } from 'zod';
|
10
9
|
import { AccessDenied } from '../../components/Errors/403';
|
10
|
+
import { ResponseError } from '../../components/Errors/ResponseError';
|
11
11
|
import { Tablet } from '../../components/Tablet';
|
12
|
-
import { parseQuery } from '../../routes';
|
13
12
|
import { setHeaderBreadcrumbs } from '../../store/reducers/header/header';
|
14
|
-
import {
|
13
|
+
import { nodesListApi } from '../../store/reducers/nodesList';
|
14
|
+
import { tabletsApi } from '../../store/reducers/tablets';
|
15
|
+
import { getFilteredTablets } from '../../store/reducers/tabletsFilters';
|
15
16
|
import { cn } from '../../utils/cn';
|
16
|
-
import { CLUSTER_DEFAULT_TITLE } from '../../utils/constants';
|
17
|
+
import { AUTO_RELOAD_INTERVAL, CLUSTER_DEFAULT_TITLE } from '../../utils/constants';
|
18
|
+
import { useTypedDispatch, useTypedSelector } from '../../utils/hooks';
|
17
19
|
import { tabletColorToTabletState, tabletStates } from '../../utils/tablet';
|
18
20
|
import i18n from './i18n';
|
19
21
|
import './TabletsFilters.scss';
|
20
22
|
const b = cn('tablets-filters');
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
this.state = {
|
25
|
-
nodeFilter: [],
|
26
|
-
tenantPath: '',
|
27
|
-
clusterName: '',
|
28
|
-
};
|
29
|
-
this.reloadDescriptor = -1;
|
30
|
-
this.makeRequest = () => {
|
31
|
-
const { nodeFilter, tenantPath } = this.state;
|
32
|
-
this.props.getTabletsInfo({ nodes: nodeFilter, path: [tenantPath] });
|
33
|
-
};
|
34
|
-
this.getTablets = () => {
|
35
|
-
const { timeoutForRequest } = this.props;
|
36
|
-
clearInterval(this.reloadDescriptor);
|
37
|
-
this.reloadDescriptor = setTimeout(() => {
|
38
|
-
this.makeRequest();
|
39
|
-
this.reloadDescriptor = -1;
|
40
|
-
}, timeoutForRequest);
|
41
|
-
};
|
42
|
-
this.handleNodeFilterChange = (nodeFilter) => {
|
43
|
-
this.setState({ nodeFilter }, () => {
|
44
|
-
this.props.clearWasLoadingFlag();
|
45
|
-
this.makeRequest();
|
46
|
-
});
|
47
|
-
};
|
48
|
-
this.handleStateFilterChange = (stateFilter) => {
|
49
|
-
const { setStateFilter } = this.props;
|
50
|
-
setStateFilter(stateFilter);
|
51
|
-
};
|
52
|
-
this.handleTypeFilterChange = (typeFilter) => {
|
53
|
-
const { setTypeFilter } = this.props;
|
54
|
-
setTypeFilter(typeFilter);
|
55
|
-
};
|
56
|
-
this.renderTablet = (index, key) => {
|
57
|
-
const { filteredTablets, size } = this.props;
|
58
|
-
return (_jsx(Tablet, { tablet: filteredTablets[index], tenantName: this.state.tenantPath, size: size, className: b('tablet') }, key));
|
59
|
-
};
|
60
|
-
this.renderContent = () => {
|
61
|
-
const { nodeFilter, tenantPath } = this.state;
|
62
|
-
const { tablets, filteredTablets, nodes, stateFilter, typeFilter, error } = this.props;
|
63
|
-
const states = tabletStates.map((item) => ({ value: item, content: item }));
|
64
|
-
const types = Array.from(new Set(...[map(tablets, (tblt) => tblt.Type)])).map((item) => ({
|
65
|
-
value: item,
|
66
|
-
content: item,
|
67
|
-
}));
|
68
|
-
const nodesForSelect = map(nodes, (node) => ({
|
69
|
-
content: node.Id,
|
70
|
-
value: node.Id,
|
71
|
-
meta: node.Host,
|
72
|
-
}));
|
73
|
-
return (_jsxs("div", { className: b(), children: [tenantPath ? (_jsx("div", { className: b('tenant'), children: _jsxs(React.Fragment, { children: [_jsx("span", { className: b('label'), children: "Database: " }), " ", tenantPath] }) })) : null, _jsx(MemoizedFilters, { nodesForSelect: nodesForSelect, nodeFilter: nodeFilter, onChangeNodes: this.handleNodeFilterChange, states: states, stateFilter: stateFilter, onChangeStates: this.handleStateFilterChange, types: types, typeFilter: typeFilter, onChangeTypes: this.handleTypeFilterChange }), error && _jsx("div", { className: "error", children: error }), filteredTablets.length > 0 ? (_jsx("div", { className: b('items'), children: _jsx(ReactList, { itemRenderer: this.renderTablet, length: filteredTablets.length, type: "uniform" }) })) : (!error && _jsx("div", { className: b('empty-message'), children: "no tablets" }))] }));
|
74
|
-
};
|
75
|
-
this.renderView = () => {
|
76
|
-
const { loading, wasLoaded, error } = this.props;
|
77
|
-
if (loading && !wasLoaded) {
|
78
|
-
return TabletsFilters.renderLoader();
|
79
|
-
}
|
80
|
-
else if (error && typeof error === 'object') {
|
81
|
-
if (error.status === 403) {
|
82
|
-
return _jsx(AccessDenied, {});
|
83
|
-
}
|
84
|
-
return _jsx("div", { children: error.statusText });
|
85
|
-
}
|
86
|
-
else {
|
87
|
-
return this.renderContent();
|
88
|
-
}
|
89
|
-
};
|
23
|
+
const stringArrayParam = z.preprocess((arg) => {
|
24
|
+
if (Array.isArray(arg)) {
|
25
|
+
return arg.filter(Boolean).sort();
|
90
26
|
}
|
91
|
-
|
92
|
-
|
27
|
+
return [];
|
28
|
+
}, z.string().array());
|
29
|
+
const stateArrayParam = z.preprocess((arg) => {
|
30
|
+
if (Array.isArray(arg)) {
|
31
|
+
return arg
|
32
|
+
.flatMap((item) => tabletColorToTabletState[item] || item)
|
33
|
+
.filter(Boolean);
|
93
34
|
}
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
35
|
+
return [];
|
36
|
+
}, z.string().array());
|
37
|
+
const CONTROL_WIDTH = 220;
|
38
|
+
const POPUP_WIDTH = 300;
|
39
|
+
export function TabletsFilters() {
|
40
|
+
var _a;
|
41
|
+
const [params, setParams] = useQueryParams({
|
42
|
+
nodeIds: ArrayParam,
|
43
|
+
type: ArrayParam,
|
44
|
+
state: ArrayParam,
|
45
|
+
path: StringParam,
|
46
|
+
clusterName: StringParam,
|
47
|
+
});
|
48
|
+
const path = (_a = params.path) !== null && _a !== void 0 ? _a : undefined;
|
49
|
+
const dispatch = useTypedDispatch();
|
50
|
+
React.useEffect(() => {
|
51
|
+
dispatch(setHeaderBreadcrumbs('tablets', {
|
110
52
|
tenantName: path,
|
111
|
-
});
|
112
|
-
}
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
53
|
+
}));
|
54
|
+
}, [dispatch, path]);
|
55
|
+
const nodeIds = stringArrayParam.parse(params.nodeIds);
|
56
|
+
const { currentData, isFetching, error } = tabletsApi.useGetTabletsInfoQuery({ nodes: nodeIds, path }, {
|
57
|
+
pollingInterval: AUTO_RELOAD_INTERVAL,
|
58
|
+
});
|
59
|
+
const { data: nodes } = nodesListApi.useGetNodesListQuery({}, { pollingInterval: AUTO_RELOAD_INTERVAL });
|
60
|
+
const loading = isFetching && currentData === undefined;
|
61
|
+
const stateFilter = stateArrayParam.parse(params.state);
|
62
|
+
const states = tabletStates.map((item) => ({ value: item, content: item }));
|
63
|
+
const typeFilter = stringArrayParam.parse(params.type);
|
64
|
+
const types = Array.from(new Set(...[map(currentData === null || currentData === void 0 ? void 0 : currentData.TabletStateInfo, (tblt) => tblt.Type)])).map((item) => ({
|
65
|
+
value: String(item),
|
66
|
+
content: item,
|
67
|
+
}));
|
68
|
+
const filteredTablets = useTypedSelector((state) => getFilteredTablets(state, { nodes: nodeIds, path }, stateFilter, typeFilter));
|
69
|
+
const renderTablet = (index, key) => (_jsx(Tablet, { tablet: filteredTablets[index], tenantName: path }, key));
|
70
|
+
const nodesForSelect = map(nodes, (node) => ({
|
71
|
+
content: node.Id,
|
72
|
+
value: String(node.Id),
|
73
|
+
data: node.Host,
|
74
|
+
}));
|
75
|
+
const renderView = () => {
|
76
|
+
if (loading) {
|
77
|
+
return (_jsx("div", { className: 'loader', children: _jsx(Loader, { size: "l" }) }));
|
118
78
|
}
|
119
|
-
if (
|
120
|
-
|
79
|
+
if (error && typeof error === 'object' && 'status' in error && error.status === 403) {
|
80
|
+
return _jsx(AccessDenied, {});
|
121
81
|
}
|
122
|
-
|
123
|
-
componentWillUnmount() {
|
124
|
-
clearInterval(this.reloadDescriptor);
|
125
|
-
}
|
126
|
-
render() {
|
127
|
-
const { tenantPath, clusterName } = this.state;
|
128
|
-
return (_jsxs(React.Fragment, { children: [_jsx(Helmet, { children: _jsx("title", { children: `${i18n('page.title')} — ${tenantPath || clusterName || CLUSTER_DEFAULT_TITLE}` }) }), this.renderView()] }));
|
129
|
-
}
|
130
|
-
}
|
131
|
-
TabletsFilters.propTypes = {
|
132
|
-
wasLoaded: PropTypes.bool,
|
133
|
-
loading: PropTypes.bool,
|
134
|
-
getTabletsInfo: PropTypes.func,
|
135
|
-
timeoutForRequest: PropTypes.number,
|
136
|
-
path: PropTypes.string,
|
137
|
-
clearWasLoadingFlag: PropTypes.func,
|
138
|
-
nodes: PropTypes.array,
|
139
|
-
tablets: PropTypes.array,
|
140
|
-
filteredTablets: PropTypes.array,
|
141
|
-
setStateFilter: PropTypes.func,
|
142
|
-
setTypeFilter: PropTypes.func,
|
143
|
-
stateFilter: PropTypes.array,
|
144
|
-
typeFilter: PropTypes.array,
|
145
|
-
error: PropTypes.oneOf([PropTypes.string, PropTypes.object]),
|
146
|
-
setHeader: PropTypes.func,
|
147
|
-
};
|
148
|
-
TabletsFilters.parseNodes = (nodes) => {
|
149
|
-
if (Array.isArray(nodes)) {
|
150
|
-
return nodes.map(Number).filter(Number.isInteger);
|
151
|
-
}
|
152
|
-
};
|
153
|
-
TabletsFilters.getStateFiltersFromColor = (color) => {
|
154
|
-
return tabletColorToTabletState[color] || [color];
|
155
|
-
};
|
156
|
-
TabletsFilters.CONTROL_WIDTH = 220;
|
157
|
-
TabletsFilters.POPUP_WIDTH = 300;
|
158
|
-
const Filters = ({ nodesForSelect, nodeFilter, onChangeNodes, states, stateFilter, onChangeStates, types, typeFilter, onChangeTypes, }) => {
|
159
|
-
return (_jsxs("div", { className: b('filters'), children: [_jsx("div", { className: b('filter-wrapper'), children: _jsx(Select, { multiple: true, label: "Node ID", width: TabletsFilters.CONTROL_WIDTH, popupWidth: TabletsFilters.POPUP_WIDTH, placeholder: "All", options: nodesForSelect, value: nodeFilter, onUpdate: onChangeNodes, renderOption: (option) => {
|
160
|
-
return (_jsxs("div", { className: b('node'), children: [_jsx("div", { children: option.content }), _jsx("div", { className: b('node-meta'), title: option.meta, children: option.meta })] }));
|
161
|
-
}, getOptionHeight: () => 40 }) }), _jsx("div", { className: b('filter-wrapper'), children: _jsx(Select, { multiple: true, label: "multiple", width: TabletsFilters.CONTROL_WIDTH, placeholder: "All", options: states, value: stateFilter, onUpdate: onChangeStates }) }), _jsx("div", { className: b('filter-wrapper'), children: _jsx(Select, { multiple: true, label: "Types", width: TabletsFilters.CONTROL_WIDTH, placeholder: "All", options: types, value: typeFilter, onUpdate: onChangeTypes }) })] }));
|
162
|
-
};
|
163
|
-
Filters.propTypes = {
|
164
|
-
nodesForSelect: PropTypes.array,
|
165
|
-
nodeFilter: PropTypes.array,
|
166
|
-
onChangeNodes: PropTypes.func,
|
167
|
-
states: PropTypes.array,
|
168
|
-
stateFilter: PropTypes.array,
|
169
|
-
onChangeStates: PropTypes.func,
|
170
|
-
types: PropTypes.array,
|
171
|
-
typeFilter: PropTypes.array,
|
172
|
-
onChangeTypes: PropTypes.func,
|
173
|
-
};
|
174
|
-
const MemoizedFilters = React.memo(Filters, (prevProps, nextProps) => {
|
175
|
-
return (isEqual(prevProps.nodeFilter, nextProps.nodeFilter) &&
|
176
|
-
isEqual(prevProps.stateFilter, nextProps.stateFilter) &&
|
177
|
-
isEqual(prevProps.typeFilter, nextProps.typeFilter));
|
178
|
-
});
|
179
|
-
const mapStateToProps = (state) => {
|
180
|
-
const { nodes, wasLoaded, loading, timeoutForRequest, stateFilter, typeFilter, error } = state.tabletsFilters;
|
181
|
-
return {
|
182
|
-
tablets: getTablets(state),
|
183
|
-
filteredTablets: getFilteredTablets(state),
|
184
|
-
nodes,
|
185
|
-
timeoutForRequest,
|
186
|
-
wasLoaded,
|
187
|
-
loading,
|
188
|
-
stateFilter,
|
189
|
-
typeFilter,
|
190
|
-
error,
|
82
|
+
return (_jsxs("div", { className: b(), children: [path ? (_jsxs("div", { className: b('tenant'), children: [_jsx("span", { className: b('label'), children: "Database: " }), " ", path] })) : null, _jsx(Filters, { nodesForSelect: nodesForSelect, nodeFilter: nodeIds, onChangeNodes: (n) => setParams({ nodeIds: n }), states: states, stateFilter: stateFilter, onChangeStates: (s) => setParams({ state: s }), types: types, typeFilter: typeFilter, onChangeTypes: (t) => setParams({ type: t }) }), error ? _jsx(ResponseError, { error: error }) : null, filteredTablets.length > 0 ? (_jsx("div", { className: b('items'), children: _jsx(ReactList, { itemRenderer: renderTablet, length: filteredTablets.length, type: "uniform" }) })) : (!error && _jsx("div", { className: b('empty-message'), children: "no tablets" }))] }));
|
191
83
|
};
|
192
|
-
};
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
};
|
200
|
-
export default connect(mapStateToProps, mapDispatchToProps)(TabletsFilters);
|
84
|
+
return (_jsxs(React.Fragment, { children: [_jsx(Helmet, { children: _jsx("title", { children: `${i18n('page.title')} — ${path || params.clusterName || CLUSTER_DEFAULT_TITLE}` }) }), renderView()] }));
|
85
|
+
}
|
86
|
+
function Filters({ nodesForSelect, nodeFilter, onChangeNodes, states, stateFilter, onChangeStates, types, typeFilter, onChangeTypes, }) {
|
87
|
+
return (_jsxs("div", { className: b('filters'), children: [_jsx("div", { className: b('filter-wrapper'), children: _jsx(Select, { multiple: true, label: "Node ID", width: CONTROL_WIDTH, popupWidth: POPUP_WIDTH, placeholder: "All", options: nodesForSelect, value: nodeFilter, onUpdate: onChangeNodes, renderOption: (option) => {
|
88
|
+
return (_jsxs("div", { className: b('node'), children: [_jsx("div", { children: option.content }), _jsx("div", { className: b('node-meta'), title: option.data, children: option.data })] }));
|
89
|
+
}, getOptionHeight: () => 40 }) }), _jsx("div", { className: b('filter-wrapper'), children: _jsx(Select, { multiple: true, label: "multiple", width: CONTROL_WIDTH, placeholder: "All", options: states, value: stateFilter, onUpdate: onChangeStates }) }), _jsx("div", { className: b('filter-wrapper'), children: _jsx(Select, { multiple: true, label: "Types", width: CONTROL_WIDTH, placeholder: "All", options: types, value: typeFilter, onUpdate: onChangeTypes }) })] }));
|
90
|
+
}
|
@@ -3,10 +3,9 @@ import React from 'react';
|
|
3
3
|
import { ResponseError } from '../../../components/Errors/ResponseError';
|
4
4
|
import { Loader } from '../../../components/Loader';
|
5
5
|
import { ResizeableDataTable } from '../../../components/ResizeableDataTable/ResizeableDataTable';
|
6
|
-
import {
|
6
|
+
import { schemaAclApi } from '../../../store/reducers/schemaAcl/schemaAcl';
|
7
7
|
import { cn } from '../../../utils/cn';
|
8
8
|
import { DEFAULT_TABLE_SETTINGS } from '../../../utils/constants';
|
9
|
-
import { useTypedDispatch, useTypedSelector } from '../../../utils/hooks';
|
10
9
|
import i18n from '../i18n';
|
11
10
|
import './Acl.scss';
|
12
11
|
const b = cn('ydb-acl');
|
@@ -57,19 +56,10 @@ const columns = [
|
|
57
56
|
sortable: false,
|
58
57
|
},
|
59
58
|
];
|
60
|
-
export const Acl = () => {
|
61
|
-
const
|
62
|
-
const
|
63
|
-
const {
|
64
|
-
React.useEffect(() => {
|
65
|
-
if (currentSchemaPath) {
|
66
|
-
dispatch(getSchemaAcl({ path: currentSchemaPath }));
|
67
|
-
}
|
68
|
-
return () => {
|
69
|
-
// Ensures correct acl on path change
|
70
|
-
dispatch(setAclWasNotLoaded());
|
71
|
-
};
|
72
|
-
}, [currentSchemaPath, dispatch]);
|
59
|
+
export const Acl = ({ path }) => {
|
60
|
+
const { currentData, isFetching, error } = schemaAclApi.useGetSchemaAclQuery({ path });
|
61
|
+
const loading = isFetching && !currentData;
|
62
|
+
const { acl, owner } = currentData || {};
|
73
63
|
const renderTable = () => {
|
74
64
|
if (!acl || !acl.length) {
|
75
65
|
return null;
|
@@ -82,13 +72,13 @@ export const Acl = () => {
|
|
82
72
|
}
|
83
73
|
return (_jsxs("div", { className: b('owner-container'), children: [_jsx("span", { className: b('owner-label'), children: `${i18n('acl.owner')}: ` }), prepareLogin(owner)] }));
|
84
74
|
};
|
85
|
-
if (loading
|
75
|
+
if (loading) {
|
86
76
|
return _jsx(Loader, {});
|
87
77
|
}
|
88
78
|
if (error) {
|
89
79
|
return _jsx(ResponseError, { error: error });
|
90
80
|
}
|
91
|
-
if (!
|
81
|
+
if (!acl && !owner) {
|
92
82
|
return _jsx(React.Fragment, { children: i18n('acl.empty') });
|
93
83
|
}
|
94
84
|
return (_jsx("div", { className: b(), children: _jsxs("div", { className: b('result'), children: [renderOwner(), renderTable()] }) }));
|
@@ -2,18 +2,17 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ArrowsRotateLeft } from '@gravity-ui/icons';
|
3
3
|
import { Button, Select } from '@gravity-ui/uikit';
|
4
4
|
import { api } from '../../../../store/reducers/api';
|
5
|
-
import { setAutorefreshInterval } from '../../../../store/reducers/schema/schema';
|
6
5
|
import { cn } from '../../../../utils/cn';
|
7
|
-
import {
|
6
|
+
import { useAutoRefreshInterval, useTypedDispatch } from '../../../../utils/hooks';
|
8
7
|
import i18n from './i18n';
|
9
8
|
import './AutorefreshControl.scss';
|
10
9
|
const b = cn('autorefresh-control');
|
11
10
|
export function AutorefreshControl({ className }) {
|
12
11
|
const dispatch = useTypedDispatch();
|
13
|
-
const
|
12
|
+
const [autoRefreshInterval, setAutoRefreshInterval] = useAutoRefreshInterval();
|
14
13
|
return (_jsxs("div", { className: b(null, className), children: [_jsx(Button, { view: "flat", onClick: () => {
|
15
14
|
dispatch(api.util.invalidateTags(['All']));
|
16
|
-
}, extraProps: { 'aria-label': i18n('Refresh') }, children: _jsx(Button.Icon, { children: _jsx(ArrowsRotateLeft, {}) }) }), _jsxs(Select, { value: [String(
|
17
|
-
|
15
|
+
}, extraProps: { 'aria-label': i18n('Refresh') }, children: _jsx(Button.Icon, { children: _jsx(ArrowsRotateLeft, {}) }) }), _jsxs(Select, { value: [String(autoRefreshInterval)], onUpdate: (v) => {
|
16
|
+
setAutoRefreshInterval(Number(v));
|
18
17
|
}, width: 85, children: [_jsx(Select.Option, { value: "0", children: i18n('None') }), _jsx(Select.Option, { value: "15000", children: i18n('15 sec') }), _jsx(Select.Option, { value: "60000", children: i18n('1 min') }), _jsx(Select.Option, { value: "120000", children: i18n('2 min') }), _jsx(Select.Option, { value: "300000", children: i18n('5 min') })] })] }));
|
19
18
|
}
|
@@ -8,7 +8,7 @@ import { Search } from '../../../../components/Search';
|
|
8
8
|
import { selectPreparedConsumersData, selectPreparedTopicStats, topicApi, } from '../../../../store/reducers/topic';
|
9
9
|
import { cn } from '../../../../utils/cn';
|
10
10
|
import { DEFAULT_TABLE_SETTINGS } from '../../../../utils/constants';
|
11
|
-
import { useTypedSelector } from '../../../../utils/hooks';
|
11
|
+
import { useAutoRefreshInterval, useTypedSelector } from '../../../../utils/hooks';
|
12
12
|
import { isCdcStreamEntityType } from '../../utils/schema';
|
13
13
|
import { ConsumersTopicStats } from './TopicStats';
|
14
14
|
import { CONSUMERS_COLUMNS_WIDTH_LS_KEY, columns } from './columns';
|
@@ -18,8 +18,8 @@ const b = cn('ydb-diagnostics-consumers');
|
|
18
18
|
export const Consumers = ({ path, type }) => {
|
19
19
|
const isCdcStream = isCdcStreamEntityType(type);
|
20
20
|
const [searchValue, setSearchValue] = React.useState('');
|
21
|
-
const
|
22
|
-
const { currentData, isFetching, error } = topicApi.useGetTopicQuery({ path }, { pollingInterval:
|
21
|
+
const [autoRefreshInterval] = useAutoRefreshInterval();
|
22
|
+
const { currentData, isFetching, error } = topicApi.useGetTopicQuery({ path }, { pollingInterval: autoRefreshInterval });
|
23
23
|
const loading = isFetching && currentData === undefined;
|
24
24
|
const consumers = useTypedSelector((state) => selectPreparedConsumersData(state, path));
|
25
25
|
const topic = useTypedSelector((state) => selectPreparedTopicStats(state, path));
|
@@ -2,8 +2,8 @@ import type { EPathType } from '../../../../types/api/schema';
|
|
2
2
|
import './Describe.scss';
|
3
3
|
import 'react-json-inspector/json-inspector.css';
|
4
4
|
interface IDescribeProps {
|
5
|
-
|
5
|
+
path: string;
|
6
6
|
type?: EPathType;
|
7
7
|
}
|
8
|
-
declare const Describe: ({
|
8
|
+
declare const Describe: ({ path, type }: IDescribeProps) => import("react/jsx-runtime").JSX.Element;
|
9
9
|
export default Describe;
|
@@ -7,17 +7,16 @@ import { Loader } from '../../../../components/Loader';
|
|
7
7
|
import { describeApi } from '../../../../store/reducers/describe';
|
8
8
|
import { selectSchemaMergedChildrenPaths } from '../../../../store/reducers/schema/schema';
|
9
9
|
import { cn } from '../../../../utils/cn';
|
10
|
-
import { useTypedSelector } from '../../../../utils/hooks';
|
10
|
+
import { useAutoRefreshInterval, useTypedSelector } from '../../../../utils/hooks';
|
11
11
|
import { isEntityWithMergedImplementation } from '../../utils/schema';
|
12
12
|
import './Describe.scss';
|
13
13
|
import 'react-json-inspector/json-inspector.css';
|
14
14
|
const b = cn('kv-describe');
|
15
15
|
const expandMap = new Map();
|
16
|
-
const Describe = ({
|
17
|
-
const
|
16
|
+
const Describe = ({ path, type }) => {
|
17
|
+
const [autoRefreshInterval] = useAutoRefreshInterval();
|
18
18
|
const isEntityWithMergedImpl = isEntityWithMergedImplementation(type);
|
19
|
-
const mergedChildrenPaths = useTypedSelector((state) => selectSchemaMergedChildrenPaths(state,
|
20
|
-
const path = currentSchemaPath || tenant;
|
19
|
+
const mergedChildrenPaths = useTypedSelector((state) => selectSchemaMergedChildrenPaths(state, path, type), shallowEqual);
|
21
20
|
let paths = skipToken;
|
22
21
|
if (!isEntityWithMergedImpl) {
|
23
22
|
paths = [path];
|
@@ -26,7 +25,7 @@ const Describe = ({ tenant, type }) => {
|
|
26
25
|
paths = [path, ...mergedChildrenPaths];
|
27
26
|
}
|
28
27
|
const { currentData, isFetching, error } = describeApi.useGetDescribeQuery(paths, {
|
29
|
-
pollingInterval:
|
28
|
+
pollingInterval: autoRefreshInterval,
|
30
29
|
});
|
31
30
|
const loading = isFetching && currentData === undefined;
|
32
31
|
const currentDescribe = currentData;
|
@@ -1,17 +1,15 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { useSelector } from 'react-redux';
|
3
2
|
import { cn } from '../../../../utils/cn';
|
4
3
|
import Overview from '../Overview/Overview';
|
5
4
|
import { TenantOverview } from '../TenantOverview/TenantOverview';
|
6
5
|
import './DetailedOverview.scss';
|
7
6
|
const b = cn('kv-detailed-overview');
|
8
7
|
function DetailedOverview(props) {
|
9
|
-
const { type, tenantName, additionalTenantProps, additionalNodesProps } = props;
|
10
|
-
const { currentSchemaPath } = useSelector((state) => state.schema);
|
8
|
+
const { type, tenantName, path, additionalTenantProps, additionalNodesProps } = props;
|
11
9
|
const renderTenantOverview = () => {
|
12
10
|
return (_jsx("div", { className: b('section'), children: _jsx(TenantOverview, { tenantName: tenantName, additionalTenantProps: additionalTenantProps, additionalNodesProps: additionalNodesProps }) }));
|
13
11
|
};
|
14
|
-
const isTenant = tenantName ===
|
15
|
-
return (_jsx("div", { className: b(), children: isTenant ? renderTenantOverview() : _jsx(Overview, { type: type,
|
12
|
+
const isTenant = tenantName === path;
|
13
|
+
return (_jsx("div", { className: b(), children: isTenant ? renderTenantOverview() : _jsx(Overview, { type: type, path: path }) }));
|
16
14
|
}
|
17
15
|
export default DetailedOverview;
|
@@ -3,6 +3,8 @@ import type { EPathType } from '../../../types/api/schema';
|
|
3
3
|
import './Diagnostics.scss';
|
4
4
|
interface DiagnosticsProps {
|
5
5
|
type?: EPathType;
|
6
|
+
tenantName: string;
|
7
|
+
path: string;
|
6
8
|
additionalTenantProps?: AdditionalTenantsProps;
|
7
9
|
additionalNodesProps?: AdditionalNodesProps;
|
8
10
|
}
|
@@ -4,7 +4,6 @@ import { Tabs } from '@gravity-ui/uikit';
|
|
4
4
|
import { Helmet } from 'react-helmet-async';
|
5
5
|
import { Link } from 'react-router-dom';
|
6
6
|
import { StringParam, useQueryParams } from 'use-query-params';
|
7
|
-
import { Loader } from '../../../components/Loader';
|
8
7
|
import routes, { createHref } from '../../../routes';
|
9
8
|
import { TENANT_DIAGNOSTICS_TABS_IDS } from '../../../store/reducers/tenant/constants';
|
10
9
|
import { setDiagnosticsTab } from '../../../store/reducers/tenant/tenant';
|
@@ -32,83 +31,66 @@ const b = cn('kv-tenant-diagnostics');
|
|
32
31
|
function Diagnostics(props) {
|
33
32
|
const container = React.useRef(null);
|
34
33
|
const dispatch = useTypedDispatch();
|
35
|
-
const { currentSchemaPath, wasLoaded } = useTypedSelector((state) => state.schema);
|
36
34
|
const { diagnosticsTab = TENANT_DIAGNOSTICS_TABS_IDS.overview } = useTypedSelector((state) => state.tenant);
|
37
35
|
const [queryParams] = useQueryParams({
|
38
36
|
name: StringParam,
|
37
|
+
schema: StringParam,
|
39
38
|
backend: StringParam,
|
40
39
|
clusterName: StringParam,
|
41
40
|
});
|
42
|
-
const
|
43
|
-
const
|
44
|
-
const
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
dispatch(setDiagnosticsTab(tab));
|
53
|
-
};
|
54
|
-
const activeTab = React.useMemo(() => {
|
55
|
-
if (wasLoaded) {
|
56
|
-
let page = pages.find((el) => el.id === diagnosticsTab);
|
57
|
-
if (!page) {
|
58
|
-
page = pages[0];
|
59
|
-
}
|
60
|
-
if (page && page.id !== diagnosticsTab) {
|
61
|
-
forwardToDiagnosticTab(page.id);
|
62
|
-
}
|
63
|
-
return page;
|
41
|
+
const tenantName = isDatabaseEntityType(props.type) ? props.path : props.tenantName;
|
42
|
+
const isDatabase = isDatabaseEntityType(props.type) || props.path === props.tenantName;
|
43
|
+
const pages = isDatabase ? DATABASE_PAGES : getPagesByType(props.type);
|
44
|
+
let activeTab = pages.find((el) => el.id === diagnosticsTab);
|
45
|
+
if (!activeTab) {
|
46
|
+
activeTab = pages[0];
|
47
|
+
}
|
48
|
+
React.useEffect(() => {
|
49
|
+
if (activeTab && activeTab.id !== diagnosticsTab) {
|
50
|
+
dispatch(setDiagnosticsTab(activeTab.id));
|
64
51
|
}
|
65
|
-
|
66
|
-
}, [pages, diagnosticsTab, wasLoaded]);
|
52
|
+
}, [activeTab, diagnosticsTab, dispatch]);
|
67
53
|
const renderTabContent = () => {
|
68
|
-
const { type } = props;
|
69
|
-
const tenantNameString = tenantName;
|
54
|
+
const { type, path } = props;
|
70
55
|
switch (activeTab === null || activeTab === void 0 ? void 0 : activeTab.id) {
|
71
56
|
case TENANT_DIAGNOSTICS_TABS_IDS.overview: {
|
72
|
-
return (_jsx(DetailedOverview, { type: type, tenantName:
|
57
|
+
return (_jsx(DetailedOverview, { type: type, tenantName: tenantName, path: path, additionalTenantProps: props.additionalTenantProps, additionalNodesProps: props.additionalNodesProps }));
|
73
58
|
}
|
74
59
|
case TENANT_DIAGNOSTICS_TABS_IDS.schema: {
|
75
|
-
return
|
60
|
+
return _jsx(SchemaViewer, { path: path, tenantName: tenantName, type: type, extended: true });
|
76
61
|
}
|
77
62
|
case TENANT_DIAGNOSTICS_TABS_IDS.topQueries: {
|
78
|
-
return _jsx(TopQueries, {
|
63
|
+
return _jsx(TopQueries, { tenantName: tenantName, type: type });
|
79
64
|
}
|
80
65
|
case TENANT_DIAGNOSTICS_TABS_IDS.topShards: {
|
81
|
-
return _jsx(TopShards, {
|
66
|
+
return _jsx(TopShards, { tenantName: tenantName, path: path, type: type });
|
82
67
|
}
|
83
68
|
case TENANT_DIAGNOSTICS_TABS_IDS.nodes: {
|
84
|
-
return (_jsx(NodesWrapper, { path:
|
69
|
+
return (_jsx(NodesWrapper, { path: path, additionalNodesProps: props.additionalNodesProps, parentContainer: container.current }));
|
85
70
|
}
|
86
71
|
case TENANT_DIAGNOSTICS_TABS_IDS.tablets: {
|
87
|
-
return _jsx(Tablets, { path:
|
72
|
+
return _jsx(Tablets, { path: path });
|
88
73
|
}
|
89
74
|
case TENANT_DIAGNOSTICS_TABS_IDS.storage: {
|
90
|
-
return
|
75
|
+
return _jsx(StorageWrapper, { tenant: tenantName, parentContainer: container.current });
|
91
76
|
}
|
92
77
|
case TENANT_DIAGNOSTICS_TABS_IDS.network: {
|
93
|
-
return _jsx(Network, {
|
78
|
+
return _jsx(Network, { tenantName: tenantName });
|
94
79
|
}
|
95
80
|
case TENANT_DIAGNOSTICS_TABS_IDS.describe: {
|
96
|
-
return _jsx(Describe, {
|
81
|
+
return _jsx(Describe, { path: path, type: type });
|
97
82
|
}
|
98
83
|
case TENANT_DIAGNOSTICS_TABS_IDS.hotKeys: {
|
99
|
-
|
100
|
-
return _jsx(HotKeys, { path: currentSchemaPath });
|
84
|
+
return _jsx(HotKeys, { path: path });
|
101
85
|
}
|
102
86
|
case TENANT_DIAGNOSTICS_TABS_IDS.graph: {
|
103
|
-
|
104
|
-
return _jsx(Heatmap, { path: currentSchemaPath });
|
87
|
+
return _jsx(Heatmap, { path: path });
|
105
88
|
}
|
106
89
|
case TENANT_DIAGNOSTICS_TABS_IDS.consumers: {
|
107
|
-
|
108
|
-
return _jsx(Consumers, { path: currentSchemaPath, type: type });
|
90
|
+
return _jsx(Consumers, { path: path, type: type });
|
109
91
|
}
|
110
92
|
case TENANT_DIAGNOSTICS_TABS_IDS.partitions: {
|
111
|
-
return _jsx(Partitions, { path:
|
93
|
+
return _jsx(Partitions, { path: path });
|
112
94
|
}
|
113
95
|
default: {
|
114
96
|
return _jsx("div", { children: "No data..." });
|
@@ -121,12 +103,6 @@ function Diagnostics(props) {
|
|
121
103
|
return (_jsx(Link, { to: path, className: b('tab'), children: node }, id));
|
122
104
|
}, allowNotSelected: true }), _jsx(AutorefreshControl, {})] }) }));
|
123
105
|
};
|
124
|
-
// Loader prevents incorrect loading of tabs
|
125
|
-
// After tabs are initially loaded it is no longer needed
|
126
|
-
// Thus there is no also "loading" check as in other parts of the project
|
127
|
-
if (!wasLoaded) {
|
128
|
-
return _jsx(Loader, { size: "l" });
|
129
|
-
}
|
130
106
|
return (_jsxs("div", { className: b(), ref: container, children: [activeTab ? (_jsx(Helmet, { children: _jsx("title", { children: activeTab.title }) })) : null, renderTabs(), _jsx("div", { className: b('page-wrapper'), children: renderTabContent() })] }));
|
131
107
|
}
|
132
108
|
export default Diagnostics;
|