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,116 +1,72 @@
|
|
1
1
|
import { createSelector } from '@reduxjs/toolkit';
|
2
2
|
import { isEntityWithMergedImplementation } from '../../../containers/Tenant/utils/schema';
|
3
|
-
import {
|
4
|
-
import { AUTO_REFRESH_INTERVAL } from '../../../utils/constants';
|
5
|
-
import { createApiRequest, createRequestActionTypes } from '../../utils';
|
6
|
-
export const FETCH_SCHEMA = createRequestActionTypes('schema', 'FETCH_SCHEMA');
|
7
|
-
const PRELOAD_SCHEMAS = 'schema/PRELOAD_SCHEMAS';
|
8
|
-
const SET_SCHEMA = 'schema/SET_SCHEMA';
|
3
|
+
import { api } from '../api';
|
9
4
|
const SET_SHOW_PREVIEW = 'schema/SET_SHOW_PREVIEW';
|
10
|
-
export const SET_AUTOREFRESH_INTERVAL = 'schema/SET_AUTOREFRESH_INTERVAL';
|
11
|
-
const RESET_LOADING_STATE = 'schema/RESET_LOADING_STATE';
|
12
|
-
const autoRefreshLS = Number(settingsManager.readUserSettingsValue(AUTO_REFRESH_INTERVAL, 0));
|
13
5
|
export const initialState = {
|
14
6
|
loading: true,
|
15
|
-
wasLoaded: false,
|
16
7
|
data: {},
|
17
8
|
currentSchemaPath: undefined,
|
18
|
-
autorefresh: isNaN(autoRefreshLS) ? 0 : autoRefreshLS,
|
19
9
|
showPreview: false,
|
20
10
|
};
|
21
11
|
const schema = (state = initialState, action) => {
|
22
|
-
var _a;
|
23
12
|
switch (action.type) {
|
24
|
-
case FETCH_SCHEMA.REQUEST: {
|
25
|
-
return Object.assign(Object.assign({}, state), { loading: true });
|
26
|
-
}
|
27
|
-
case FETCH_SCHEMA.SUCCESS: {
|
28
|
-
const isCurrentSchema = !state.currentSchemaPath || state.currentSchemaPath === action.data.path;
|
29
|
-
const newData = Object.assign(Object.assign({}, state.data), action.data.data);
|
30
|
-
if (!isCurrentSchema) {
|
31
|
-
return Object.assign(Object.assign({}, state), { data: newData });
|
32
|
-
}
|
33
|
-
return Object.assign(Object.assign({}, state), { error: undefined, data: newData, currentSchema: action.data.currentSchema, currentSchemaPath: action.data.path, loading: false, wasLoaded: true });
|
34
|
-
}
|
35
|
-
case FETCH_SCHEMA.FAILURE: {
|
36
|
-
if ((_a = action.error) === null || _a === void 0 ? void 0 : _a.isCancelled) {
|
37
|
-
return state;
|
38
|
-
}
|
39
|
-
return Object.assign(Object.assign({}, state), { error: action.error, loading: false });
|
40
|
-
}
|
41
|
-
case PRELOAD_SCHEMAS: {
|
42
|
-
return Object.assign(Object.assign({}, state), { data: Object.assign(Object.assign({}, action.data), state.data) });
|
43
|
-
}
|
44
|
-
case SET_SCHEMA: {
|
45
|
-
return Object.assign(Object.assign({}, state), { currentSchemaPath: action.data });
|
46
|
-
}
|
47
|
-
case SET_AUTOREFRESH_INTERVAL: {
|
48
|
-
return Object.assign(Object.assign({}, state), { autorefresh: action.data });
|
49
|
-
}
|
50
13
|
case SET_SHOW_PREVIEW: {
|
51
14
|
return Object.assign(Object.assign({}, state), { showPreview: action.data });
|
52
15
|
}
|
53
|
-
case RESET_LOADING_STATE: {
|
54
|
-
return Object.assign(Object.assign({}, state), { wasLoaded: initialState.wasLoaded });
|
55
|
-
}
|
56
16
|
default:
|
57
17
|
return state;
|
58
18
|
}
|
59
19
|
};
|
60
|
-
export function getSchema({ path }) {
|
61
|
-
const request = window.api.getSchema({ path });
|
62
|
-
return createApiRequest({
|
63
|
-
request,
|
64
|
-
actions: FETCH_SCHEMA,
|
65
|
-
dataHandler: (data) => {
|
66
|
-
const newData = {};
|
67
|
-
if (data === null || data === void 0 ? void 0 : data.Path) {
|
68
|
-
newData[data.Path] = data;
|
69
|
-
}
|
70
|
-
return {
|
71
|
-
path: data === null || data === void 0 ? void 0 : data.Path,
|
72
|
-
currentSchema: data !== null && data !== void 0 ? data : undefined,
|
73
|
-
data: newData,
|
74
|
-
};
|
75
|
-
},
|
76
|
-
});
|
77
|
-
}
|
78
|
-
export function setCurrentSchemaPath(currentSchemaPath) {
|
79
|
-
return {
|
80
|
-
type: SET_SCHEMA,
|
81
|
-
data: currentSchemaPath,
|
82
|
-
};
|
83
|
-
}
|
84
|
-
export function setAutorefreshInterval(interval) {
|
85
|
-
return (dispatch) => {
|
86
|
-
settingsManager.setUserSettingsValue(AUTO_REFRESH_INTERVAL, interval);
|
87
|
-
dispatch({
|
88
|
-
type: SET_AUTOREFRESH_INTERVAL,
|
89
|
-
data: interval,
|
90
|
-
});
|
91
|
-
};
|
92
|
-
}
|
93
20
|
export function setShowPreview(value) {
|
94
21
|
return {
|
95
22
|
type: SET_SHOW_PREVIEW,
|
96
23
|
data: value,
|
97
24
|
};
|
98
25
|
}
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
}
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
}
|
112
|
-
|
113
|
-
|
26
|
+
export default schema;
|
27
|
+
export const schemaApi = api.injectEndpoints({
|
28
|
+
endpoints: (builder) => ({
|
29
|
+
getSchema: builder.query({
|
30
|
+
queryFn: async ({ path }, { signal }) => {
|
31
|
+
try {
|
32
|
+
const data = await window.api.getSchema({ path }, { signal });
|
33
|
+
return { data: data !== null && data !== void 0 ? data : {} };
|
34
|
+
}
|
35
|
+
catch (error) {
|
36
|
+
return { error };
|
37
|
+
}
|
38
|
+
},
|
39
|
+
keepUnusedDataFor: Infinity,
|
40
|
+
forceRefetch: ({ endpointState }) => {
|
41
|
+
const data = endpointState === null || endpointState === void 0 ? void 0 : endpointState.data;
|
42
|
+
if (data && typeof data === 'object' && 'partial' in data && data.partial) {
|
43
|
+
return true;
|
44
|
+
}
|
45
|
+
return false;
|
46
|
+
},
|
47
|
+
onQueryStarted: async ({ path }, { dispatch, getState, queryFulfilled }) => {
|
48
|
+
const { data } = await queryFulfilled;
|
49
|
+
if (data) {
|
50
|
+
const state = getState();
|
51
|
+
const { PathDescription: { Children = [] } = {} } = data;
|
52
|
+
for (const child of Children) {
|
53
|
+
const { Name = '' } = child;
|
54
|
+
const childPath = `${path}/${Name}`;
|
55
|
+
const cachedData = schemaApi.endpoints.getSchema.select({ path: childPath })(state).data;
|
56
|
+
if (!cachedData) {
|
57
|
+
// not full data, but it contains PathType, which ensures seamless switch between nodes
|
58
|
+
dispatch(schemaApi.util.upsertQueryData('getSchema', { path: childPath }, { PathDescription: { Self: child }, partial: true }));
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
},
|
63
|
+
}),
|
64
|
+
}),
|
65
|
+
overrideExisting: 'throw',
|
66
|
+
});
|
67
|
+
const getSchemaSelector = createSelector((path) => path, (path) => schemaApi.endpoints.getSchema.select({ path }));
|
68
|
+
const selectGetSchema = createSelector((state) => state, (_state, path) => getSchemaSelector(path), (state, selectTabletsInfo) => selectTabletsInfo(state).data);
|
69
|
+
const selectSchemaChildren = (state, path) => { var _a, _b; return (_b = (_a = selectGetSchema(state, path)) === null || _a === void 0 ? void 0 : _a.PathDescription) === null || _b === void 0 ? void 0 : _b.Children; };
|
114
70
|
export const selectSchemaMergedChildrenPaths = createSelector([
|
115
71
|
(_, path) => path,
|
116
72
|
(_, _path, type) => type,
|
@@ -120,4 +76,3 @@ export const selectSchemaMergedChildrenPaths = createSelector([
|
|
120
76
|
? children === null || children === void 0 ? void 0 : children.map(({ Name }) => path + '/' + Name)
|
121
77
|
: undefined;
|
122
78
|
});
|
123
|
-
export default schema;
|
@@ -1,29 +1,10 @@
|
|
1
|
-
import type { IResponseError } from '../../../types/api/error';
|
2
1
|
import type { TEvDescribeSchemeResult } from '../../../types/api/schema';
|
3
|
-
import type {
|
4
|
-
import type { FETCH_SCHEMA, SET_AUTOREFRESH_INTERVAL, preloadSchemas, resetLoadingState, setCurrentSchemaPath, setShowPreview } from './schema';
|
2
|
+
import type { setShowPreview } from './schema';
|
5
3
|
export type SchemaData = Record<string, TEvDescribeSchemeResult>;
|
6
4
|
export interface SchemaState {
|
7
|
-
loading: boolean;
|
8
|
-
wasLoaded: boolean;
|
9
|
-
data: SchemaData;
|
10
|
-
currentSchema?: TEvDescribeSchemeResult;
|
11
|
-
currentSchemaPath?: string;
|
12
|
-
autorefresh: number;
|
13
5
|
showPreview: boolean;
|
14
|
-
error?: IResponseError;
|
15
6
|
}
|
16
|
-
export
|
17
|
-
path?: string;
|
18
|
-
currentSchema?: TEvDescribeSchemeResult;
|
19
|
-
data?: SchemaData;
|
20
|
-
}
|
21
|
-
type SchemaApiRequestAction = ApiRequestAction<typeof FETCH_SCHEMA, SchemaHandledResponse, IResponseError>;
|
22
|
-
export type SchemaAction = SchemaApiRequestAction | (ReturnType<typeof setCurrentSchemaPath> | {
|
23
|
-
type: typeof SET_AUTOREFRESH_INTERVAL;
|
24
|
-
data: number;
|
25
|
-
} | ReturnType<typeof setShowPreview> | ReturnType<typeof preloadSchemas> | ReturnType<typeof resetLoadingState>);
|
7
|
+
export type SchemaAction = ReturnType<typeof setShowPreview>;
|
26
8
|
export interface SchemaStateSlice {
|
27
9
|
schema: SchemaState;
|
28
10
|
}
|
29
|
-
export {};
|
@@ -1,135 +1,8 @@
|
|
1
|
-
|
2
|
-
import
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
}
|
8
|
-
|
9
|
-
export declare function getSchemaAcl({ path }: {
|
10
|
-
path: string;
|
11
|
-
}): (dispatch: import("redux-thunk").ThunkDispatch<{
|
12
|
-
api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
|
13
|
-
singleClusterMode: boolean;
|
14
|
-
cluster: import("../cluster/types").ClusterState;
|
15
|
-
tenant: import("../tenant/types").TenantState;
|
16
|
-
tooltip: import("../../../types/store/tooltip").ITooltipState;
|
17
|
-
tablets: import("../../../types/store/tablets").TabletsState;
|
18
|
-
schema: import("../schema/types").SchemaState;
|
19
|
-
host: import("../../../types/store/host").IHostState;
|
20
|
-
tenants: import("../tenants/types").TenantsState;
|
21
|
-
partitions: import("../partitions/types").PartitionsState;
|
22
|
-
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
23
|
-
tabletsFilters: {
|
24
|
-
loading: boolean;
|
25
|
-
requestTime: number;
|
26
|
-
data: undefined;
|
27
|
-
wasLoaded: boolean;
|
28
|
-
stateFilter: never[];
|
29
|
-
typeFilter: never[];
|
30
|
-
} | {
|
31
|
-
tabletsData: any;
|
32
|
-
nodes: any;
|
33
|
-
loading: boolean;
|
34
|
-
wasLoaded: boolean;
|
35
|
-
timeoutForRequest: number;
|
36
|
-
error: undefined;
|
37
|
-
data: undefined;
|
38
|
-
stateFilter: never[];
|
39
|
-
typeFilter: never[];
|
40
|
-
} | {
|
41
|
-
error: any;
|
42
|
-
loading: boolean;
|
43
|
-
data: undefined;
|
44
|
-
wasLoaded: boolean;
|
45
|
-
stateFilter: never[];
|
46
|
-
typeFilter: never[];
|
47
|
-
} | {
|
48
|
-
stateFilter: any;
|
49
|
-
data: undefined;
|
50
|
-
loading: boolean;
|
51
|
-
wasLoaded: boolean;
|
52
|
-
typeFilter: never[];
|
53
|
-
} | {
|
54
|
-
typeFilter: any;
|
55
|
-
data: undefined;
|
56
|
-
loading: boolean;
|
57
|
-
wasLoaded: boolean;
|
58
|
-
stateFilter: never[];
|
59
|
-
};
|
60
|
-
heatmap: import("../../../types/store/heatmap").IHeatmapState;
|
61
|
-
settings: import("../settings/types").SettingsState;
|
62
|
-
schemaAcl: SchemaAclState;
|
63
|
-
executeTopQueries: import("../executeTopQueries/types").TopQueriesFilters;
|
64
|
-
shardsWorkload: import("../shardsWorkload/types").ShardsWorkloadFilters;
|
65
|
-
hotKeys: import("../hotKeys/types").HotKeysState;
|
66
|
-
authentication: import("../authentication/types").AuthenticationState;
|
67
|
-
header: import("../header/types").HeaderState;
|
68
|
-
saveQuery: string | null;
|
69
|
-
fullscreen: boolean;
|
70
|
-
clusters: import("../clusters/types").ClustersFilters;
|
71
|
-
}, undefined, import("redux").UnknownAction> & import("redux").Dispatch<any>, getState: () => {
|
72
|
-
api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
|
73
|
-
singleClusterMode: boolean;
|
74
|
-
cluster: import("../cluster/types").ClusterState;
|
75
|
-
tenant: import("../tenant/types").TenantState;
|
76
|
-
tooltip: import("../../../types/store/tooltip").ITooltipState;
|
77
|
-
tablets: import("../../../types/store/tablets").TabletsState;
|
78
|
-
schema: import("../schema/types").SchemaState;
|
79
|
-
host: import("../../../types/store/host").IHostState;
|
80
|
-
tenants: import("../tenants/types").TenantsState;
|
81
|
-
partitions: import("../partitions/types").PartitionsState;
|
82
|
-
executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
|
83
|
-
tabletsFilters: {
|
84
|
-
loading: boolean;
|
85
|
-
requestTime: number;
|
86
|
-
data: undefined;
|
87
|
-
wasLoaded: boolean;
|
88
|
-
stateFilter: never[];
|
89
|
-
typeFilter: never[];
|
90
|
-
} | {
|
91
|
-
tabletsData: any;
|
92
|
-
nodes: any;
|
93
|
-
loading: boolean;
|
94
|
-
wasLoaded: boolean;
|
95
|
-
timeoutForRequest: number;
|
96
|
-
error: undefined;
|
97
|
-
data: undefined;
|
98
|
-
stateFilter: never[];
|
99
|
-
typeFilter: never[];
|
100
|
-
} | {
|
101
|
-
error: any;
|
102
|
-
loading: boolean;
|
103
|
-
data: undefined;
|
104
|
-
wasLoaded: boolean;
|
105
|
-
stateFilter: never[];
|
106
|
-
typeFilter: never[];
|
107
|
-
} | {
|
108
|
-
stateFilter: any;
|
109
|
-
data: undefined;
|
110
|
-
loading: boolean;
|
111
|
-
wasLoaded: boolean;
|
112
|
-
typeFilter: never[];
|
113
|
-
} | {
|
114
|
-
typeFilter: any;
|
115
|
-
data: undefined;
|
116
|
-
loading: boolean;
|
117
|
-
wasLoaded: boolean;
|
118
|
-
stateFilter: never[];
|
119
|
-
};
|
120
|
-
heatmap: import("../../../types/store/heatmap").IHeatmapState;
|
121
|
-
settings: import("../settings/types").SettingsState;
|
122
|
-
schemaAcl: SchemaAclState;
|
123
|
-
executeTopQueries: import("../executeTopQueries/types").TopQueriesFilters;
|
124
|
-
shardsWorkload: import("../shardsWorkload/types").ShardsWorkloadFilters;
|
125
|
-
hotKeys: import("../hotKeys/types").HotKeysState;
|
126
|
-
authentication: import("../authentication/types").AuthenticationState;
|
127
|
-
header: import("../header/types").HeaderState;
|
128
|
-
saveQuery: string | null;
|
129
|
-
fullscreen: boolean;
|
130
|
-
clusters: import("../clusters/types").ClustersFilters;
|
131
|
-
}) => Promise<unknown>;
|
132
|
-
export declare const setAclWasNotLoaded: () => {
|
133
|
-
readonly type: "schemaAcl/SET_DATA_WAS_NOT_LOADED";
|
134
|
-
};
|
135
|
-
export default schemaAcl;
|
1
|
+
export declare const schemaAclApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, {
|
2
|
+
getSchemaAcl: import("@reduxjs/toolkit/query").QueryDefinition<{
|
3
|
+
path: string;
|
4
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All", {
|
5
|
+
acl: import("../../../types/api/acl").TACE[] | undefined;
|
6
|
+
owner: string | undefined;
|
7
|
+
} | undefined, "api">;
|
8
|
+
}, "api", "All", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/dist/query/react").reactHooksModuleName>;
|
@@ -1,44 +1,18 @@
|
|
1
|
-
import {
|
2
|
-
export const
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
};
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
}
|
20
|
-
case FETCH_SCHEMA_ACL.FAILURE: {
|
21
|
-
if ((_c = action.error) === null || _c === void 0 ? void 0 : _c.isCancelled) {
|
22
|
-
return state;
|
23
|
-
}
|
24
|
-
return Object.assign(Object.assign({}, state), { error: action.error, loading: false });
|
25
|
-
}
|
26
|
-
case SET_ACL_WAS_NOT_LOADED: {
|
27
|
-
return Object.assign(Object.assign({}, state), { wasLoaded: false });
|
28
|
-
}
|
29
|
-
default:
|
30
|
-
return state;
|
31
|
-
}
|
32
|
-
};
|
33
|
-
export function getSchemaAcl({ path }) {
|
34
|
-
return createApiRequest({
|
35
|
-
request: window.api.getSchemaAcl({ path }),
|
36
|
-
actions: FETCH_SCHEMA_ACL,
|
37
|
-
});
|
38
|
-
}
|
39
|
-
export const setAclWasNotLoaded = () => {
|
40
|
-
return {
|
41
|
-
type: SET_ACL_WAS_NOT_LOADED,
|
42
|
-
};
|
43
|
-
};
|
44
|
-
export default schemaAcl;
|
1
|
+
import { api } from '../api';
|
2
|
+
export const schemaAclApi = api.injectEndpoints({
|
3
|
+
endpoints: (build) => ({
|
4
|
+
getSchemaAcl: build.query({
|
5
|
+
queryFn: async ({ path }, { signal }) => {
|
6
|
+
try {
|
7
|
+
const data = await window.api.getSchemaAcl({ path }, { signal });
|
8
|
+
return { data: { acl: data.Common.ACL, owner: data.Common.Owner } };
|
9
|
+
}
|
10
|
+
catch (error) {
|
11
|
+
return { error };
|
12
|
+
}
|
13
|
+
},
|
14
|
+
providesTags: ['All'],
|
15
|
+
}),
|
16
|
+
}),
|
17
|
+
overrideExisting: 'throw',
|
18
|
+
});
|
@@ -1,28 +1,22 @@
|
|
1
|
-
import type {
|
2
|
-
import type {
|
3
|
-
import type {
|
4
|
-
import type { ProblemFilterValue, SetSettingValueAction, SettingsAction, SettingsRootStateSlice, SettingsState } from './types';
|
5
|
-
export declare const SET_SETTING_VALUE = "settings/SET_VALUE";
|
6
|
-
export declare const SET_USER_SETTINGS = "settings/SET_USER_SETTINGS";
|
1
|
+
import type { Store } from '@reduxjs/toolkit';
|
2
|
+
import type { AppDispatch } from '../../defaultStore';
|
3
|
+
import type { ProblemFilterValue, SettingsState } from './types';
|
7
4
|
export declare const ProblemFilterValues: {
|
8
5
|
readonly ALL: "All";
|
9
6
|
readonly PROBLEMS: "With problems";
|
10
7
|
};
|
11
|
-
export declare const initialState:
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
export declare const initialState: SettingsState;
|
9
|
+
export declare const changeFilter: import("@reduxjs/toolkit").ActionCreatorWithPayload<ProblemFilterValue, "settings/changeFilter">;
|
10
|
+
export declare const getSettingValue: import("reselect").Selector<{
|
11
|
+
settings: SettingsState;
|
12
|
+
}, unknown, [name: string]> & {
|
13
|
+
unwrapped: (state: SettingsState, name: string) => unknown;
|
14
|
+
}, selectProblemFilter: import("reselect").Selector<{
|
15
|
+
settings: SettingsState;
|
16
|
+
}, ProblemFilterValue, []> & {
|
17
|
+
unwrapped: (state: SettingsState) => ProblemFilterValue;
|
15
18
|
};
|
16
|
-
declare const
|
17
|
-
export declare
|
18
|
-
|
19
|
-
|
20
|
-
readonly data: SettingsObject;
|
21
|
-
};
|
22
|
-
export declare const getSettingValue: (state: SettingsRootStateSlice, name: string) => unknown;
|
23
|
-
export declare const changeFilter: (filter: ProblemFilterValue) => {
|
24
|
-
readonly type: "settings/CHANGE_PROBLEM_FILTER";
|
25
|
-
readonly data: ProblemFilterValue;
|
26
|
-
};
|
27
|
-
export declare const selectProblemFilter: (state: SettingsRootStateSlice) => ProblemFilterValue;
|
28
|
-
export default settings;
|
19
|
+
export declare const setSettingValue: (name: string, value: unknown) => (dispatch: AppDispatch) => void;
|
20
|
+
export declare function syncUserSettingsFromLS(store: Store): void;
|
21
|
+
declare const _default: import("redux").Reducer<SettingsState>;
|
22
|
+
export default _default;
|
@@ -1,7 +1,6 @@
|
|
1
|
+
import { createSlice } from '@reduxjs/toolkit';
|
1
2
|
import { DEFAULT_USER_SETTINGS, settingsManager } from '../../../services/settings';
|
2
|
-
|
3
|
-
export const SET_SETTING_VALUE = 'settings/SET_VALUE';
|
4
|
-
export const SET_USER_SETTINGS = 'settings/SET_USER_SETTINGS';
|
3
|
+
import { parseJson } from '../../../utils/utils';
|
5
4
|
export const ProblemFilterValues = {
|
6
5
|
ALL: 'All',
|
7
6
|
PROBLEMS: 'With problems',
|
@@ -13,38 +12,46 @@ export const initialState = {
|
|
13
12
|
userSettings,
|
14
13
|
systemSettings,
|
15
14
|
};
|
16
|
-
const
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
}
|
15
|
+
const settingsSlice = createSlice({
|
16
|
+
name: 'settings',
|
17
|
+
initialState,
|
18
|
+
reducers: (create) => ({
|
19
|
+
changeFilter: create.reducer((state, action) => {
|
20
|
+
state.problemFilter = action.payload;
|
21
|
+
}),
|
22
|
+
setSettingValue: create.reducer((state, action) => {
|
23
|
+
state.userSettings[action.payload.name] = action.payload.value;
|
24
|
+
}),
|
25
|
+
}),
|
26
|
+
selectors: {
|
27
|
+
getSettingValue: (state, name) => state.userSettings[name],
|
28
|
+
selectProblemFilter: (state) => state.problemFilter,
|
29
|
+
},
|
30
|
+
});
|
31
|
+
export const { changeFilter } = settingsSlice.actions;
|
32
|
+
export const { getSettingValue, selectProblemFilter } = settingsSlice.selectors;
|
31
33
|
export const setSettingValue = (name, value) => {
|
32
34
|
return (dispatch) => {
|
33
|
-
dispatch({
|
35
|
+
dispatch(settingsSlice.actions.setSettingValue({ name, value }));
|
34
36
|
settingsManager.setUserSettingsValue(name, value);
|
35
37
|
};
|
36
38
|
};
|
37
|
-
export
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
39
|
+
export function syncUserSettingsFromLS(store) {
|
40
|
+
if (typeof window === 'undefined') {
|
41
|
+
return;
|
42
|
+
}
|
43
|
+
window.addEventListener('storage', (event) => {
|
44
|
+
if (event.key && event.key in DEFAULT_USER_SETTINGS) {
|
45
|
+
const name = event.key;
|
46
|
+
let value = DEFAULT_USER_SETTINGS[name];
|
47
|
+
if (event.newValue !== null) {
|
48
|
+
value = parseJson(event.newValue);
|
49
|
+
}
|
50
|
+
store.dispatch(settingsSlice.actions.setSettingValue({
|
51
|
+
name,
|
52
|
+
value,
|
53
|
+
}));
|
54
|
+
}
|
55
|
+
});
|
56
|
+
}
|
57
|
+
export default settingsSlice.reducer;
|
@@ -1,20 +1,9 @@
|
|
1
1
|
import type { SettingsObject } from '../../../services/settings';
|
2
2
|
import type { ValueOf } from '../../../types/common';
|
3
|
-
import type { ProblemFilterValues
|
3
|
+
import type { ProblemFilterValues } from './settings';
|
4
4
|
export type ProblemFilterValue = ValueOf<typeof ProblemFilterValues>;
|
5
5
|
export interface SettingsState {
|
6
6
|
problemFilter: ProblemFilterValue;
|
7
7
|
userSettings: SettingsObject;
|
8
8
|
systemSettings: SettingsObject;
|
9
9
|
}
|
10
|
-
export type SetSettingValueAction = {
|
11
|
-
type: typeof SET_SETTING_VALUE;
|
12
|
-
data: {
|
13
|
-
name: string;
|
14
|
-
value: unknown;
|
15
|
-
};
|
16
|
-
};
|
17
|
-
export type SettingsAction = ReturnType<typeof changeFilter> | ReturnType<typeof setUserSettings> | SetSettingValueAction;
|
18
|
-
export interface SettingsRootStateSlice {
|
19
|
-
settings: SettingsState;
|
20
|
-
}
|