ydb-embedded-ui 6.11.0 → 6.13.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/AutoRefreshControl/i18n/index.d.ts +1 -1
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.d.ts +3 -2
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js +9 -5
- package/dist/components/CriticalActionDialog/CriticalActionDialog.d.ts +5 -3
- package/dist/components/CriticalActionDialog/CriticalActionDialog.js +8 -7
- package/dist/components/CriticalActionDialog/CriticalActionDialog.scss +1 -1
- package/dist/components/CriticalActionDialog/i18n/en.json +1 -0
- package/dist/components/CriticalActionDialog/i18n/index.d.ts +1 -1
- package/dist/components/DateRange/DateRange.d.ts +4 -4
- package/dist/components/DateRange/DateRange.js +23 -26
- package/dist/components/DateRange/DateRange.scss +14 -13
- package/dist/components/DateRange/__test__/fromDateRangeValues.test.js +80 -0
- package/dist/components/DateRange/__test__/getdatePickerSize.test.d.ts +1 -0
- package/dist/components/DateRange/__test__/getdatePickerSize.test.js +56 -0
- package/dist/components/DateRange/__test__/toDateRangeValues.test.d.ts +1 -0
- package/dist/components/DateRange/__test__/toDateRangeValues.test.js +80 -0
- package/dist/components/DateRange/i18n/en.json +4 -0
- package/dist/components/DateRange/i18n/index.d.ts +2 -0
- package/dist/components/DateRange/i18n/index.js +5 -0
- package/dist/components/DateRange/i18n/ru.json +4 -0
- package/dist/components/DateRange/utils.d.ts +5 -0
- package/dist/components/DateRange/utils.js +41 -0
- package/dist/components/DeveloperUILinkButton/DeveloperUILinkButton.d.ts +8 -0
- package/dist/components/{DeveloperUiLink/DeveloperUiLink.js → DeveloperUILinkButton/DeveloperUILinkButton.js} +3 -3
- package/dist/components/{DeveloperUiLink/DeveloperUiLink.scss → DeveloperUILinkButton/DeveloperUILinkButton.scss} +3 -2
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.d.ts +6 -1
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.js +22 -12
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.scss +45 -45
- package/dist/components/EntityStatus/EntityStatus.js +1 -1
- package/dist/components/EntityStatus/EntityStatus.scss +6 -2
- package/dist/components/Errors/PageError/PageError.d.ts +11 -0
- package/dist/components/Errors/PageError/PageError.js +19 -0
- package/dist/components/Errors/i18n/en.json +2 -1
- package/dist/components/Errors/i18n/index.d.ts +1 -1
- package/dist/components/Errors/i18n/ru.json +2 -1
- package/dist/components/Fullscreen/Fullscreen.d.ts +1 -1
- package/dist/components/Fullscreen/Fullscreen.js +34 -27
- package/dist/components/Fullscreen/Fullscreen.scss +16 -8
- package/dist/components/Graph/Graph.d.ts +13 -0
- package/dist/components/Graph/Graph.js +41 -0
- package/dist/components/LabelWithPopover/LabelWithPopover.d.ts +4 -1
- package/dist/components/LabelWithPopover/LabelWithPopover.js +1 -1
- package/dist/components/Loader/Loader.d.ts +2 -1
- package/dist/components/Loader/Loader.js +6 -1
- package/dist/components/LoaderWrapper/LoaderWrapper.d.ts +10 -0
- package/dist/components/LoaderWrapper/LoaderWrapper.js +8 -0
- package/dist/components/MetricChart/reducer.d.ts +2 -2
- package/dist/components/MonacoEditor/MonacoEditor.js +0 -2
- package/dist/components/NodeHostWrapper/NodeHostWrapper.d.ts +0 -1
- package/dist/components/NodeHostWrapper/NodeHostWrapper.js +3 -6
- package/dist/components/PDiskInfo/PDiskInfo.d.ts +8 -5
- package/dist/components/PDiskInfo/PDiskInfo.js +76 -26
- package/dist/components/PDiskInfo/PDiskInfo.scss +15 -1
- package/dist/components/PDiskInfo/i18n/en.json +11 -5
- package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/PDiskPopup/PDiskPopup.js +8 -2
- package/dist/components/ProgressViewer/ProgressViewer.js +3 -0
- package/dist/components/QueryExecutionStatus/QueryExecutionStatus.js +13 -3
- package/dist/components/QueryExecutionStatus/QueryExecutionStatus.scss +4 -0
- package/dist/components/QuerySettingsDescription/QuerySettingsDescription.d.ts +7 -0
- package/dist/components/QuerySettingsDescription/QuerySettingsDescription.js +8 -0
- package/dist/components/QuerySettingsDescription/QuerySettingsDescription.scss +8 -0
- package/dist/components/QuerySettingsDescription/index.d.ts +1 -0
- package/dist/components/QuerySettingsDescription/index.js +1 -0
- package/dist/components/VDisk/VDisk.js +3 -4
- package/dist/components/VDiskInfo/VDiskInfo.d.ts +4 -3
- package/dist/components/VDiskInfo/VDiskInfo.js +12 -5
- package/dist/components/VDiskInfo/VDiskInfo.scss +7 -1
- package/dist/components/VDiskInfo/i18n/en.json +2 -1
- package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
- package/dist/containers/App/Content.js +15 -19
- package/dist/containers/AsideNavigation/AsideNavigation.js +2 -1
- package/dist/containers/AsideNavigation/YdbInternalUser/YdbInternalUser.js +4 -4
- package/dist/containers/Authentication/Authentication.js +8 -10
- package/dist/containers/Authentication/utils.d.ts +8 -0
- package/dist/containers/Authentication/utils.js +15 -0
- package/dist/containers/Cluster/Cluster.scss +1 -4
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +6 -6
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +1 -1
- package/dist/containers/Clusters/constants.d.ts +1 -1
- package/dist/containers/Heatmap/Heatmap.d.ts +2 -1
- package/dist/containers/Heatmap/Heatmap.js +7 -6
- package/dist/containers/Node/Node.js +5 -7
- package/dist/containers/Node/Node.scss +5 -4
- package/dist/containers/Node/NodeStructure/NodeStructure.js +4 -4
- package/dist/containers/Node/NodeStructure/NodeStructure.scss +4 -20
- package/dist/containers/Node/NodeStructure/Pdisk.js +3 -3
- package/dist/containers/Nodes/Nodes.js +6 -8
- package/dist/containers/Nodes/getNodesColumns.js +6 -21
- package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.d.ts +6 -0
- package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.js +24 -0
- package/dist/containers/PDiskPage/PDiskPage.js +79 -30
- package/dist/containers/PDiskPage/PDiskPage.scss +8 -5
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.d.ts +7 -0
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js +93 -0
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.scss +52 -0
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/utils.d.ts +4 -0
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/utils.js +9 -0
- package/dist/containers/PDiskPage/i18n/en.json +9 -1
- package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/PDisk/PDisk.js +3 -4
- package/dist/containers/Storage/Storage.js +4 -6
- package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js +16 -6
- package/dist/containers/Tablet/Tablet.js +2 -2
- package/dist/containers/Tablet/TabletControls/TabletControls.js +2 -1
- package/dist/containers/Tablets/Tablets.js +14 -13
- package/dist/containers/Tenant/Acl/Acl.d.ts +2 -1
- package/dist/containers/Tenant/Acl/Acl.js +10 -8
- package/dist/containers/Tenant/Acl/Acl.scss +8 -8
- package/dist/containers/Tenant/Acl/i18n/en.json +6 -0
- package/dist/containers/Tenant/Acl/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Acl/i18n/index.js +4 -0
- package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.js +2 -5
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.js +14 -17
- package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.js +1 -1
- package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.scss +1 -0
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js +3 -3
- package/dist/containers/Tenant/Diagnostics/Diagnostics.scss +3 -1
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +3 -3
- package/dist/containers/Tenant/Diagnostics/Network/Network.js +8 -11
- package/dist/containers/Tenant/Diagnostics/Network/Network.scss +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.d.ts +2 -2
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +8 -10
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/en.json +14 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/index.js +1 -2
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo.js +36 -17
- package/dist/containers/Tenant/Diagnostics/Overview/TopicStats/TopicStats.js +3 -4
- package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +1 -4
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +8 -5
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverviewTableLayout.js +3 -3
- package/dist/containers/Tenant/Diagnostics/TenantOverview/getSectionTitle.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/getSectionTitle.js +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/en.json +3 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +6 -5
- package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.d.ts +2 -2
- package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.js +14 -14
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +7 -6
- package/dist/containers/Tenant/Diagnostics/TopShards/getTopShardsColumns.js +4 -4
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +31 -18
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.d.ts +2 -2
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +56 -20
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.scss +10 -6
- package/dist/containers/Tenant/Query/ExecuteResult/i18n/en.json +7 -0
- package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.js +4 -0
- package/dist/containers/Tenant/Query/ExecuteResult/utils.d.ts +18 -0
- package/dist/containers/Tenant/Query/ExecuteResult/utils.js +36 -0
- package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.d.ts +23 -1
- package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +56 -111
- package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.scss +1 -30
- package/dist/containers/Tenant/Query/ExplainResult/components/Ast/Ast.d.ts +7 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/Ast/Ast.js +18 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/Ast/Ast.scss +8 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/Graph/Graph.d.ts +8 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/Graph/Graph.js +14 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/Graph/Graph.scss +14 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/MetricsCell.d.ts +6 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/MetricsCell.js +11 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationCell.d.ts +13 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationCell.js +48 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationParams.d.ts +6 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationParams.js +66 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/SimplifiedPlan.d.ts +7 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/SimplifiedPlan.js +100 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/SimplifiedPlan.scss +128 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/types.d.ts +5 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/types.js +1 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/utils.d.ts +5 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/utils.js +59 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/TextExplain/TextExplain.d.ts +8 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/TextExplain/TextExplain.js +11 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/TextExplain/TextExplain.scss +14 -0
- package/dist/containers/Tenant/Query/ExplainResult/i18n/en.json +8 -0
- package/dist/containers/Tenant/Query/ExplainResult/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Query/ExplainResult/i18n/index.js +4 -0
- package/dist/containers/Tenant/Query/Preview/Preview.js +2 -3
- package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js +1 -19
- package/dist/containers/Tenant/Query/QueryDuration/QueryDuration.js +1 -1
- package/dist/containers/Tenant/Query/QueryDuration/QueryDuration.scss +11 -0
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +1 -1
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +96 -95
- package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.d.ts +5 -6
- package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +18 -47
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.d.ts +2 -0
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.js +5 -0
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.test.d.ts +1 -0
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.test.js +42 -0
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.d.ts +5 -0
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.js +19 -0
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.test.d.ts +1 -0
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.test.js +56 -0
- package/dist/containers/Tenant/Query/QuerySettingsBanner/QuerySettingsBanner.d.ts +2 -0
- package/dist/containers/Tenant/Query/QuerySettingsBanner/QuerySettingsBanner.js +12 -0
- package/dist/containers/Tenant/Query/QuerySettingsBanner/QuerySettingsBanner.scss +3 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.d.ts +2 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.js +35 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.scss +63 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.d.ts +15 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.js +14 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.scss +19 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.d.ts +215 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js +131 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/en.json +13 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/index.js +5 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/ru.json +13 -0
- package/dist/containers/Tenant/Query/i18n/en.json +17 -1
- package/dist/containers/Tenant/Query/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Schema/CreateDirectoryDialog/CreateDirectoryDialog.d.ts +3 -2
- package/dist/containers/Tenant/Schema/CreateDirectoryDialog/CreateDirectoryDialog.js +2 -2
- package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.js +8 -8
- package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +6 -3
- package/dist/containers/Tenant/Schema/SchemaViewer/columns.d.ts +2 -1
- package/dist/containers/Tenant/Schema/SchemaViewer/columns.js +13 -1
- package/dist/containers/Tenant/Schema/SchemaViewer/i18n/en.json +1 -0
- package/dist/containers/Tenant/Schema/SchemaViewer/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Schema/SchemaViewer/prepareData.js +3 -2
- package/dist/containers/Tenant/Schema/SchemaViewer/types.d.ts +1 -0
- package/dist/containers/Tenant/Tenant.js +4 -8
- package/dist/containers/Tenant/TenantPages.d.ts +12 -1
- package/dist/containers/Tenant/TenantPages.js +1 -1
- package/dist/containers/Tenant/i18n/en.json +2 -2
- package/dist/containers/Tenant/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/utils/schema.js +1 -1
- package/dist/containers/Tenant/utils/schemaActions.d.ts +2 -2
- package/dist/containers/Tenant/utils/schemaActions.js +2 -2
- package/dist/containers/Tenants/Tenants.js +5 -8
- package/dist/containers/Tenants/Tenants.scss +0 -4
- package/dist/containers/UserSettings/i18n/en.json +3 -3
- package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
- package/dist/containers/UserSettings/settings.d.ts +2 -2
- package/dist/containers/UserSettings/settings.js +18 -19
- package/dist/containers/VDiskPage/VDiskPage.js +27 -13
- package/dist/containers/VDiskPage/i18n/en.json +1 -0
- package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
- package/dist/routes.js +2 -2
- package/dist/services/api.d.ts +59 -28
- package/dist/services/api.js +74 -98
- package/dist/services/settings.d.ts +11 -3
- package/dist/services/settings.js +7 -5
- package/dist/store/configureStore.d.ts +7 -7
- package/dist/store/defaultStore.d.ts +3 -3
- package/dist/store/reducers/api.d.ts +1 -1
- package/dist/store/reducers/api.js +1 -1
- package/dist/store/reducers/authentication/authentication.d.ts +37 -24
- package/dist/store/reducers/authentication/authentication.js +77 -57
- package/dist/store/reducers/authentication/types.d.ts +0 -8
- package/dist/store/reducers/capabilities/capabilities.d.ts +106 -0
- package/dist/store/reducers/capabilities/capabilities.js +22 -0
- package/dist/store/reducers/capabilities/hooks.d.ts +2 -0
- package/dist/store/reducers/capabilities/hooks.js +13 -0
- package/dist/store/reducers/cluster/cluster.d.ts +2 -2
- package/dist/store/reducers/clusterNodes/clusterNodes.d.ts +2 -2
- package/dist/store/reducers/clusters/clusters.d.ts +2 -2
- package/dist/store/reducers/describe.d.ts +5 -2
- package/dist/store/reducers/describe.js +2 -2
- package/dist/store/reducers/executeQuery.d.ts +7 -14
- package/dist/store/reducers/executeQuery.js +19 -14
- package/dist/store/reducers/executeTopQueries/executeTopQueries.d.ts +2 -2
- package/dist/store/reducers/executeTopQueries/executeTopQueries.js +19 -14
- package/dist/store/reducers/executeTopQueries/types.d.ts +2 -2
- package/dist/store/reducers/executeTopQueries/utils.js +11 -7
- package/dist/store/reducers/explainQuery/explainQuery.d.ts +5 -4
- package/dist/store/reducers/explainQuery/explainQuery.js +20 -5
- package/dist/store/reducers/explainQuery/types.d.ts +13 -1
- package/dist/store/reducers/explainQuery/utils.js +7 -2
- package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +58 -58
- package/dist/store/reducers/heatmap.d.ts +2 -2
- package/dist/store/reducers/heatmap.js +3 -3
- package/dist/store/reducers/hotKeys/hotKeys.d.ts +3 -2
- package/dist/store/reducers/hotKeys/hotKeys.js +3 -3
- package/dist/store/reducers/index.d.ts +6 -6
- package/dist/store/reducers/network/network.d.ts +2 -2
- package/dist/store/reducers/network/network.js +1 -1
- package/dist/store/reducers/node/node.d.ts +3 -3
- package/dist/store/reducers/node/selectors.d.ts +1 -1
- package/dist/store/reducers/node/selectors.js +2 -2
- package/dist/store/reducers/nodes/nodes.d.ts +3 -3
- package/dist/store/reducers/nodesList.d.ts +3 -3
- package/dist/store/reducers/overview/overview.d.ts +5 -2
- package/dist/store/reducers/overview/overview.js +2 -2
- package/dist/store/reducers/partitions/partitions.d.ts +2 -2
- package/dist/store/reducers/pdisk/pdisk.d.ts +3 -3
- package/dist/store/reducers/pdisk/pdisk.js +15 -2
- package/dist/store/reducers/pdisk/types.d.ts +17 -1
- package/dist/store/reducers/pdisk/utils.d.ts +2 -2
- package/dist/store/reducers/pdisk/utils.js +68 -8
- package/dist/store/reducers/preview.d.ts +2 -2
- package/dist/store/reducers/preview.js +1 -1
- package/dist/store/reducers/queryActions/types.d.ts +1 -1
- package/dist/store/reducers/schema/schema.d.ts +28 -10
- package/dist/store/reducers/schema/schema.js +20 -14
- package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +4 -2
- package/dist/store/reducers/schemaAcl/schemaAcl.js +9 -3
- package/dist/store/reducers/shardsWorkload/shardsWorkload.d.ts +2 -2
- package/dist/store/reducers/shardsWorkload/shardsWorkload.js +22 -6
- package/dist/store/reducers/shardsWorkload/types.d.ts +2 -2
- package/dist/store/reducers/storage/storage.d.ts +3 -3
- package/dist/store/reducers/tablet.d.ts +3 -3
- package/dist/store/reducers/tablets.d.ts +13 -13
- package/dist/store/reducers/tabletsFilters.d.ts +1 -1
- package/dist/store/reducers/tenant/tenant.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.js +1 -1
- package/dist/store/reducers/tenantOverview/topNodes/topNodes.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js +1 -1
- package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.d.ts +2 -2
- package/dist/store/reducers/tenants/selectors.d.ts +31 -30
- package/dist/store/reducers/tenants/selectors.js +8 -2
- package/dist/store/reducers/tenants/tenants.d.ts +2 -2
- package/dist/store/reducers/topic.d.ts +44 -44
- package/dist/store/reducers/vdisk/vdisk.d.ts +2 -2
- package/dist/store/reducers/vdisk/vdisk.js +1 -1
- package/dist/store/reducers/viewSchema/viewSchema.d.ts +2 -2
- package/dist/store/reducers/viewSchema/viewSchema.js +1 -1
- package/dist/store/state-url-mapping.d.ts +70 -0
- package/dist/store/state-url-mapping.js +1 -5
- package/dist/styles/mixins.scss +13 -0
- package/dist/types/api/acl.d.ts +1 -0
- package/dist/types/api/capabilities.d.ts +7 -0
- package/dist/types/api/capabilities.js +1 -0
- package/dist/types/api/modifyDisk.d.ts +8 -0
- package/dist/types/api/modifyDisk.js +1 -0
- package/dist/types/api/pdisk.d.ts +65 -2
- package/dist/types/api/query.d.ts +39 -3
- package/dist/types/api/query.js +9 -1
- package/dist/types/api/schema/shared.d.ts +8 -0
- package/dist/types/api/vdisk.d.ts +33 -2
- package/dist/types/common.d.ts +3 -0
- package/dist/types/store/heatmap.d.ts +1 -0
- package/dist/types/store/query.d.ts +11 -1
- package/dist/utils/__test__/prepareQueryExplain.test.d.ts +1 -0
- package/dist/utils/__test__/prepareQueryExplain.test.js +115 -0
- package/dist/utils/constants.d.ts +13 -3
- package/dist/utils/constants.js +15 -3
- package/dist/utils/dataFormatters/dataFormatters.d.ts +0 -5
- package/dist/utils/dataFormatters/dataFormatters.js +3 -12
- package/dist/utils/developerUI/developerUI.d.ts +1 -0
- package/dist/utils/developerUI/developerUI.js +3 -0
- package/dist/utils/disks/getPDiskType.d.ts +3 -3
- package/dist/utils/disks/helpers.d.ts +1 -0
- package/dist/utils/disks/helpers.js +3 -0
- package/dist/utils/disks/prepareDisks.d.ts +2 -2
- package/dist/utils/disks/prepareDisks.js +17 -22
- package/dist/utils/disks/types.d.ts +7 -5
- package/dist/utils/hooks/index.d.ts +2 -1
- package/dist/utils/hooks/index.js +2 -1
- package/dist/utils/hooks/useChangedQuerySettings.d.ts +10 -0
- package/dist/utils/hooks/useChangedQuerySettings.js +46 -0
- package/dist/utils/hooks/useDelayed.d.ts +1 -0
- package/dist/utils/hooks/useDelayed.js +13 -0
- package/dist/utils/hooks/useEventHandler.d.ts +6 -0
- package/dist/utils/hooks/useEventHandler.js +17 -0
- package/dist/utils/hooks/useLastQueryExecutionSettings.d.ts +2 -0
- package/dist/utils/hooks/useLastQueryExecutionSettings.js +5 -0
- package/dist/utils/hooks/useQueryExecutionSettings.d.ts +8 -0
- package/dist/utils/hooks/useQueryExecutionSettings.js +15 -0
- package/dist/utils/monaco/constats.d.ts +2 -0
- package/dist/utils/monaco/constats.js +2 -0
- package/dist/utils/monaco/yql/constants.d.ts +0 -1
- package/dist/utils/monaco/yql/constants.js +0 -1
- package/dist/utils/monaco/yql/yql.completionItemProvider.js +2 -2
- package/dist/utils/prepareQueryExplain.d.ts +3 -1
- package/dist/utils/prepareQueryExplain.js +54 -2
- package/dist/utils/query.d.ts +24 -1
- package/dist/utils/query.js +41 -0
- package/dist/utils/query.test.js +3 -0
- package/dist/utils/utils.d.ts +8 -7
- package/dist/utils/utils.js +23 -11
- package/package.json +8 -2
- package/dist/components/DeveloperUiLink/DeveloperUiLink.d.ts +0 -8
- package/dist/components/NodeHostWrapper/NodeHostWrapper.scss +0 -15
- package/dist/containers/Node/NodeStructure/Vdisk.d.ts +0 -6
- package/dist/containers/Node/NodeStructure/Vdisk.js +0 -13
- package/dist/containers/PDiskPage/PDiskGroups.d.ts +0 -9
- package/dist/containers/PDiskPage/PDiskGroups.js +0 -20
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/ru.json +0 -5
- package/dist/containers/Tenant/Query/ExplainResult/utils.d.ts +0 -2
- package/dist/containers/Tenant/Query/ExplainResult/utils.js +0 -4
- package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.d.ts +0 -5
- package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.js +0 -38
- package/dist/store/utils.d.ts +0 -23
- package/dist/store/utils.js +0 -49
- package/dist/types/api/restartPDisk.d.ts +0 -4
- package/dist/utils/hooks/useQueryModes.d.ts +0 -2
- package/dist/utils/hooks/useQueryModes.js +0 -5
- package/dist/utils/monaco/index.d.ts +0 -1
- package/dist/utils/monaco/index.js +0 -6
- package/dist/utils/monaco/s-expression/constants.d.ts +0 -1
- package/dist/utils/monaco/s-expression/constants.js +0 -1
- package/dist/utils/monaco/s-expression/registerLanguage.d.ts +0 -1
- package/dist/utils/monaco/s-expression/registerLanguage.js +0 -59
- package/dist/utils/monaco/yql/registerLanguage.d.ts +0 -1
- package/dist/utils/monaco/yql/registerLanguage.js +0 -8
- package/dist/utils/monaco/yql/yql.d.ts +0 -7
- package/dist/utils/monaco/yql/yql.js +0 -180
- package/dist/utils/monaco/yql/yql.keywords.d.ts +0 -3
- package/dist/utils/monaco/yql/yql.keywords.js +0 -3
- /package/dist/{types/api/restartPDisk.js → components/DateRange/__test__/fromDateRangeValues.test.d.ts} +0 -0
@@ -1,14 +1,14 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import DataTable from '@gravity-ui/react-data-table';
|
3
|
-
import {
|
3
|
+
import { DeveloperUILinkButton } from '../../../../components/DeveloperUILinkButton/DeveloperUILinkButton';
|
4
4
|
import { EntityStatus } from '../../../../components/EntityStatus/EntityStatus';
|
5
5
|
import { InternalLink } from '../../../../components/InternalLink';
|
6
6
|
import { LinkToSchemaObject } from '../../../../components/LinkToSchemaObject/LinkToSchemaObject';
|
7
7
|
import { UsageLabel } from '../../../../components/UsageLabel/UsageLabel';
|
8
8
|
import routes, { createHref } from '../../../../routes';
|
9
|
-
import { backend } from '../../../../store';
|
10
9
|
import { getLoadSeverityForShard } from '../../../../store/reducers/tenantOverview/topShards/utils';
|
11
10
|
import { formatNumber, roundToPrecision } from '../../../../utils/dataFormatters/dataFormatters';
|
11
|
+
import { createTabletDeveloperUIHref } from '../../../../utils/developerUI/developerUI';
|
12
12
|
import { getDefaultNodePath } from '../../../Node/NodePages';
|
13
13
|
export const TOP_SHARDS_COLUMNS_WIDTH_LS_KEY = 'topShardsColumnsWidth';
|
14
14
|
const TOP_SHARDS_COLUMNS_IDS = {
|
@@ -68,10 +68,10 @@ const tabletIdColumn = {
|
|
68
68
|
if (!row.TabletId) {
|
69
69
|
return '–';
|
70
70
|
}
|
71
|
-
return (_jsx(EntityStatus, { name: (_a = row.TabletId) === null || _a === void 0 ? void 0 : _a.toString(), path: createHref(routes.tablet, { id: row.TabletId }), hasClipboardButton: true, showStatus: false, additionalControls: _jsx(
|
71
|
+
return (_jsx(EntityStatus, { name: (_a = row.TabletId) === null || _a === void 0 ? void 0 : _a.toString(), path: createHref(routes.tablet, { id: row.TabletId }), hasClipboardButton: true, showStatus: false, additionalControls: _jsx(DeveloperUILinkButton, { href: createTabletDeveloperUIHref(row.TabletId) }) }));
|
72
72
|
},
|
73
73
|
sortable: false,
|
74
|
-
width:
|
74
|
+
width: 220,
|
75
75
|
};
|
76
76
|
const nodeIdColumn = {
|
77
77
|
name: TOP_SHARDS_COLUMNS_IDS.NodeId,
|
@@ -8,6 +8,7 @@ import { Link, useLocation } from 'react-router-dom';
|
|
8
8
|
import { StringParam, useQueryParam } from 'use-query-params';
|
9
9
|
import { AsyncReplicationState } from '../../../components/AsyncReplicationState';
|
10
10
|
import { ClipboardButton } from '../../../components/ClipboardButton';
|
11
|
+
import { toFormattedSize } from '../../../components/FormattedBytes/utils';
|
11
12
|
import InfoViewer from '../../../components/InfoViewer/InfoViewer';
|
12
13
|
import { LinkWithIcon } from '../../../components/LinkWithIcon/LinkWithIcon';
|
13
14
|
import { Loader } from '../../../components/Loader';
|
@@ -19,7 +20,7 @@ import { setQueryTab, setSummaryTab, setTenantPage } from '../../../store/reduce
|
|
19
20
|
import { EPathSubType, EPathType } from '../../../types/api/schema';
|
20
21
|
import { cn } from '../../../utils/cn';
|
21
22
|
import { DEFAULT_IS_TENANT_COMMON_INFO_COLLAPSED, DEFAULT_SIZE_TENANT_SUMMARY_KEY, } from '../../../utils/constants';
|
22
|
-
import { formatDateTime, formatSecondsToHours } from '../../../utils/dataFormatters/dataFormatters';
|
23
|
+
import { formatDateTime, formatNumber, formatSecondsToHours, } from '../../../utils/dataFormatters/dataFormatters';
|
23
24
|
import { useTypedDispatch, useTypedSelector } from '../../../utils/hooks';
|
24
25
|
import { Acl } from '../Acl/Acl';
|
25
26
|
import { EntityTitle } from '../EntityTitle/EntityTitle';
|
@@ -48,7 +49,7 @@ export function ObjectSummary({ type, subType, tenantName, path, onCollapseSumma
|
|
48
49
|
const queryParams = qs.parse(location.search, {
|
49
50
|
ignoreQueryPrefix: true,
|
50
51
|
});
|
51
|
-
const { data: currentObjectData } = useGetSchemaQuery({ path });
|
52
|
+
const { data: currentObjectData } = useGetSchemaQuery({ path, database: tenantName });
|
52
53
|
const currentSchemaData = (_a = currentObjectData === null || currentObjectData === void 0 ? void 0 : currentObjectData.PathDescription) === null || _a === void 0 ? void 0 : _a.Self;
|
53
54
|
React.useEffect(() => {
|
54
55
|
const isTable = isTableType(type);
|
@@ -86,10 +87,33 @@ export function ObjectSummary({ type, subType, tenantName, path, onCollapseSumma
|
|
86
87
|
overview.push({ label: i18n('summary.version'), value: PathVersion });
|
87
88
|
overview.push({
|
88
89
|
label: i18n('summary.created'),
|
89
|
-
value: formatDateTime(CreateStep
|
90
|
+
value: formatDateTime(CreateStep),
|
90
91
|
});
|
91
92
|
const { PathDescription } = currentObjectData;
|
93
|
+
if (PathDescription === null || PathDescription === void 0 ? void 0 : PathDescription.TableStats) {
|
94
|
+
const { DataSize, RowCount } = PathDescription.TableStats;
|
95
|
+
overview.push({
|
96
|
+
label: i18n('summary.data-size'),
|
97
|
+
value: toFormattedSize(DataSize),
|
98
|
+
}, {
|
99
|
+
label: i18n('summary.row-count'),
|
100
|
+
value: formatNumber(RowCount),
|
101
|
+
});
|
102
|
+
}
|
92
103
|
const title = _jsx(EntityTitle, { data: PathDescription });
|
104
|
+
const getDatabaseOverview = () => {
|
105
|
+
var _a, _b;
|
106
|
+
return [
|
107
|
+
{
|
108
|
+
label: i18n('summary.paths'),
|
109
|
+
value: (_a = PathDescription === null || PathDescription === void 0 ? void 0 : PathDescription.DomainDescription) === null || _a === void 0 ? void 0 : _a.PathsInside,
|
110
|
+
},
|
111
|
+
{
|
112
|
+
label: i18n('summary.shards'),
|
113
|
+
value: (_b = PathDescription === null || PathDescription === void 0 ? void 0 : PathDescription.DomainDescription) === null || _b === void 0 ? void 0 : _b.ShardsInside,
|
114
|
+
},
|
115
|
+
];
|
116
|
+
};
|
93
117
|
const getPathTypeOverview = {
|
94
118
|
[EPathType.EPathTypeInvalid]: undefined,
|
95
119
|
[EPathType.EPathTypeDir]: undefined,
|
@@ -102,21 +126,9 @@ export function ObjectSummary({ type, subType, tenantName, path, onCollapseSumma
|
|
102
126
|
},
|
103
127
|
];
|
104
128
|
},
|
105
|
-
[EPathType.EPathTypeSubDomain]:
|
129
|
+
[EPathType.EPathTypeSubDomain]: getDatabaseOverview,
|
106
130
|
[EPathType.EPathTypeTableIndex]: undefined,
|
107
|
-
[EPathType.EPathTypeExtSubDomain]:
|
108
|
-
var _a, _b;
|
109
|
-
return [
|
110
|
-
{
|
111
|
-
label: i18n('summary.paths'),
|
112
|
-
value: (_a = PathDescription === null || PathDescription === void 0 ? void 0 : PathDescription.DomainDescription) === null || _a === void 0 ? void 0 : _a.PathsInside,
|
113
|
-
},
|
114
|
-
{
|
115
|
-
label: i18n('summary.shards'),
|
116
|
-
value: (_b = PathDescription === null || PathDescription === void 0 ? void 0 : PathDescription.DomainDescription) === null || _b === void 0 ? void 0 : _b.ShardsInside,
|
117
|
-
},
|
118
|
-
];
|
119
|
-
},
|
131
|
+
[EPathType.EPathTypeExtSubDomain]: getDatabaseOverview,
|
120
132
|
[EPathType.EPathTypeColumnStore]: () => {
|
121
133
|
var _a, _b;
|
122
134
|
return [
|
@@ -212,7 +224,7 @@ export function ObjectSummary({ type, subType, tenantName, path, onCollapseSumma
|
|
212
224
|
const renderTabContent = () => {
|
213
225
|
switch (summaryTab) {
|
214
226
|
case TENANT_SUMMARY_TABS_IDS.acl: {
|
215
|
-
return _jsx(Acl, { path: path });
|
227
|
+
return _jsx(Acl, { path: path, database: tenantName });
|
216
228
|
}
|
217
229
|
case TENANT_SUMMARY_TABS_IDS.schema: {
|
218
230
|
return _jsx(SchemaViewer, { type: type, path: path, tenantName: tenantName });
|
@@ -257,6 +269,7 @@ function ObjectTree({ tenantName, path }) {
|
|
257
269
|
var _a;
|
258
270
|
const { data: tenantData = {}, isLoading } = useGetSchemaQuery({
|
259
271
|
path: tenantName,
|
272
|
+
database: tenantName,
|
260
273
|
});
|
261
274
|
const pathData = (_a = tenantData === null || tenantData === void 0 ? void 0 : tenantData.PathDescription) === null || _a === void 0 ? void 0 : _a.Self;
|
262
275
|
const [, setCurrentPath] = useQueryParam('schema', StringParam);
|
@@ -2,11 +2,11 @@ import type { IQueryResult } from '../../../../types/store/query';
|
|
2
2
|
import './ExecuteResult.scss';
|
3
3
|
interface ExecuteResultProps {
|
4
4
|
data: IQueryResult | undefined;
|
5
|
-
stats: IQueryResult['stats'] | undefined;
|
6
5
|
error: unknown;
|
7
6
|
isResultsCollapsed?: boolean;
|
8
7
|
onCollapseResults: VoidFunction;
|
9
8
|
onExpandResults: VoidFunction;
|
9
|
+
theme?: string;
|
10
10
|
}
|
11
|
-
export declare function ExecuteResult({ data,
|
11
|
+
export declare function ExecuteResult({ data, error, isResultsCollapsed, onCollapseResults, onExpandResults, theme, }: ExecuteResultProps): import("react/jsx-runtime").JSX.Element;
|
12
12
|
export {};
|
@@ -6,39 +6,56 @@ import { ClipboardButton } from '../../../../components/ClipboardButton';
|
|
6
6
|
import Divider from '../../../../components/Divider/Divider';
|
7
7
|
import EnableFullscreenButton from '../../../../components/EnableFullscreenButton/EnableFullscreenButton';
|
8
8
|
import Fullscreen from '../../../../components/Fullscreen/Fullscreen';
|
9
|
+
import { YDBGraph } from '../../../../components/Graph/Graph';
|
9
10
|
import { QueryExecutionStatus } from '../../../../components/QueryExecutionStatus';
|
10
11
|
import { QueryResultTable } from '../../../../components/QueryResultTable/QueryResultTable';
|
11
12
|
import { disableFullscreen } from '../../../../store/reducers/fullscreen';
|
12
13
|
import { getArray } from '../../../../utils';
|
13
14
|
import { cn } from '../../../../utils/cn';
|
14
|
-
import { useTypedDispatch
|
15
|
+
import { useTypedDispatch } from '../../../../utils/hooks';
|
15
16
|
import { parseQueryError } from '../../../../utils/query';
|
16
17
|
import { PaneVisibilityToggleButtons } from '../../utils/paneVisibilityToggleHelpers';
|
18
|
+
import { SimplifiedPlan } from '../ExplainResult/components/SimplifiedPlan/SimplifiedPlan';
|
17
19
|
import { ResultIssues } from '../Issues/Issues';
|
18
20
|
import { QueryDuration } from '../QueryDuration/QueryDuration';
|
21
|
+
import { QuerySettingsBanner } from '../QuerySettingsBanner/QuerySettingsBanner';
|
19
22
|
import { getPreparedResult } from '../utils/getPreparedResult';
|
23
|
+
import i18n from './i18n';
|
24
|
+
import { getPlan } from './utils';
|
20
25
|
import './ExecuteResult.scss';
|
21
26
|
const b = cn('ydb-query-execute-result');
|
22
27
|
const resultOptionsIds = {
|
23
28
|
result: 'result',
|
24
29
|
stats: 'stats',
|
30
|
+
schema: 'schema',
|
31
|
+
simplified: 'simplified',
|
25
32
|
};
|
26
|
-
|
27
|
-
{ value: resultOptionsIds.result, content: 'Result' },
|
28
|
-
{ value: resultOptionsIds.stats, content: 'Stats' },
|
29
|
-
];
|
30
|
-
export function ExecuteResult({ data, stats, error, isResultsCollapsed, onCollapseResults, onExpandResults, }) {
|
33
|
+
export function ExecuteResult({ data, error, isResultsCollapsed, onCollapseResults, onExpandResults, theme, }) {
|
31
34
|
var _a, _b, _c;
|
32
35
|
const [selectedResultSet, setSelectedResultSet] = React.useState(0);
|
33
36
|
const [activeSection, setActiveSection] = React.useState(resultOptionsIds.result);
|
34
|
-
const isFullscreen = useTypedSelector((state) => state.fullscreen);
|
35
37
|
const dispatch = useTypedDispatch();
|
38
|
+
const stats = data === null || data === void 0 ? void 0 : data.stats;
|
36
39
|
const resultsSetsCount = (_a = data === null || data === void 0 ? void 0 : data.resultSets) === null || _a === void 0 ? void 0 : _a.length;
|
37
40
|
const isMulti = resultsSetsCount && resultsSetsCount > 0;
|
38
41
|
const currentResult = isMulti ? (_b = data === null || data === void 0 ? void 0 : data.resultSets) === null || _b === void 0 ? void 0 : _b[selectedResultSet].result : data === null || data === void 0 ? void 0 : data.result;
|
39
42
|
const currentColumns = isMulti ? (_c = data === null || data === void 0 ? void 0 : data.resultSets) === null || _c === void 0 ? void 0 : _c[selectedResultSet].columns : data === null || data === void 0 ? void 0 : data.columns;
|
40
43
|
const textResults = getPreparedResult(currentResult);
|
41
44
|
const copyDisabled = !textResults.length;
|
45
|
+
const { plan, simplifiedPlan } = React.useMemo(() => getPlan(data), [data]);
|
46
|
+
const resultOptions = [
|
47
|
+
{ value: resultOptionsIds.result, content: i18n('action.result') },
|
48
|
+
{ value: resultOptionsIds.stats, content: i18n('action.stats') },
|
49
|
+
];
|
50
|
+
if (plan) {
|
51
|
+
resultOptions.push({ value: resultOptionsIds.schema, content: i18n('action.schema') });
|
52
|
+
}
|
53
|
+
if (simplifiedPlan) {
|
54
|
+
resultOptions.push({
|
55
|
+
value: resultOptionsIds.simplified,
|
56
|
+
content: i18n('action.explain-plan'),
|
57
|
+
});
|
58
|
+
}
|
42
59
|
const parsedError = parseQueryError(error);
|
43
60
|
React.useEffect(() => {
|
44
61
|
return () => {
|
@@ -51,7 +68,7 @@ export function ExecuteResult({ data, stats, error, isResultsCollapsed, onCollap
|
|
51
68
|
const renderResultTable = (result, columns) => {
|
52
69
|
return _jsx(QueryResultTable, { data: result, columns: columns, settings: { sortable: false } });
|
53
70
|
};
|
54
|
-
const
|
71
|
+
const renderResult = () => {
|
55
72
|
return (_jsxs(React.Fragment, { children: [isMulti && resultsSetsCount > 1 && (_jsx("div", { children: _jsx(Tabs, { className: b('result-tabs'), size: "l", items: getArray(resultsSetsCount).map((item) => ({
|
56
73
|
id: String(item),
|
57
74
|
title: `Result #${item + 1}`,
|
@@ -61,30 +78,49 @@ export function ExecuteResult({ data, stats, error, isResultsCollapsed, onCollap
|
|
61
78
|
return (_jsx(ClipboardButton, { text: textResults, view: "flat-secondary", title: "Copy results", disabled: copyDisabled }));
|
62
79
|
};
|
63
80
|
const renderStats = () => {
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
return (_jsxs(React.Fragment, { children: [content, isFullscreen && (_jsx(Fullscreen, { children: _jsx("div", { className: b('inspector', { fullscreen: true }), children: content }) }))] }));
|
81
|
+
return (_jsx("div", { className: b('inspector'), children: _jsx(JSONTree, { data: stats, isExpanded: () => true, searchOptions: {
|
82
|
+
debounceTime: 300,
|
83
|
+
} }) }));
|
68
84
|
};
|
69
|
-
const
|
70
|
-
const
|
71
|
-
|
85
|
+
const renderSchema = () => {
|
86
|
+
const isEnoughDataForGraph = (plan === null || plan === void 0 ? void 0 : plan.links) && (plan === null || plan === void 0 ? void 0 : plan.nodes) && (plan === null || plan === void 0 ? void 0 : plan.nodes.length);
|
87
|
+
if (!isEnoughDataForGraph) {
|
88
|
+
return i18n('description.graph-is-not-supported');
|
89
|
+
}
|
90
|
+
return (_jsx("div", { className: b('explain-canvas-container'), children: _jsx(YDBGraph, { data: plan }, theme) }));
|
91
|
+
};
|
92
|
+
const renderSimplified = () => {
|
93
|
+
if (!simplifiedPlan) {
|
94
|
+
return null;
|
95
|
+
}
|
96
|
+
return _jsx(SimplifiedPlan, { plan: simplifiedPlan });
|
72
97
|
};
|
73
98
|
const renderIssues = () => {
|
74
99
|
if (!parsedError) {
|
75
100
|
return null;
|
76
101
|
}
|
77
102
|
if (typeof parsedError === 'object') {
|
78
|
-
|
79
|
-
return (_jsxs(React.Fragment, { children: [content, isFullscreen && (_jsx(Fullscreen, { children: _jsx("div", { className: b('result-fullscreen-wrapper', b('result')), children: content }) }))] }));
|
103
|
+
return _jsx(ResultIssues, { data: parsedError });
|
80
104
|
}
|
81
105
|
return _jsx("div", { className: b('error'), children: parsedError });
|
82
106
|
};
|
83
107
|
const renderResultSection = () => {
|
84
|
-
if (
|
108
|
+
if (error) {
|
109
|
+
return renderIssues();
|
110
|
+
}
|
111
|
+
if (activeSection === resultOptionsIds.result) {
|
85
112
|
return renderResult();
|
86
113
|
}
|
87
|
-
|
114
|
+
if (activeSection === resultOptionsIds.stats) {
|
115
|
+
return renderStats();
|
116
|
+
}
|
117
|
+
if (activeSection === resultOptionsIds.schema) {
|
118
|
+
return renderSchema();
|
119
|
+
}
|
120
|
+
if (activeSection === resultOptionsIds.simplified) {
|
121
|
+
return renderSimplified();
|
122
|
+
}
|
123
|
+
return null;
|
88
124
|
};
|
89
|
-
return (_jsxs(React.Fragment, { children: [_jsxs("div", { className: b('controls'), children: [_jsxs("div", { className: b('controls-right'), children: [_jsx(QueryExecutionStatus, { error: error }), stats && !error && (_jsxs(React.Fragment, { children: [_jsx(QueryDuration, { duration: stats === null || stats === void 0 ? void 0 : stats.DurationUs }), _jsx(Divider, {}), _jsx(RadioButton, { options: resultOptions, value: activeSection, onUpdate: onSelectSection })] }))] }), _jsxs("div", { className: b('controls-left'), children: [renderClipboardButton(), _jsx(EnableFullscreenButton, {}), _jsx(PaneVisibilityToggleButtons, { onCollapse: onCollapseResults, onExpand: onExpandResults, isCollapsed: isResultsCollapsed, initialDirection: "bottom" })] })] }), renderResultSection()] }));
|
125
|
+
return (_jsxs(React.Fragment, { children: [_jsxs("div", { className: b('controls'), children: [_jsxs("div", { className: b('controls-right'), children: [_jsx(QueryExecutionStatus, { error: error }), stats && !error && (_jsxs(React.Fragment, { children: [_jsx(QueryDuration, { duration: stats === null || stats === void 0 ? void 0 : stats.DurationUs }), _jsx(Divider, {}), _jsx(RadioButton, { options: resultOptions, value: activeSection, onUpdate: onSelectSection })] }))] }), _jsxs("div", { className: b('controls-left'), children: [renderClipboardButton(), _jsx(EnableFullscreenButton, {}), _jsx(PaneVisibilityToggleButtons, { onCollapse: onCollapseResults, onExpand: onExpandResults, isCollapsed: isResultsCollapsed, initialDirection: "bottom" })] })] }), _jsx(QuerySettingsBanner, {}), _jsx(Fullscreen, { children: renderResultSection() })] }));
|
90
126
|
}
|
@@ -57,14 +57,18 @@
|
|
57
57
|
gap: 4px;
|
58
58
|
}
|
59
59
|
&__inspector {
|
60
|
+
overflow: auto;
|
61
|
+
|
62
|
+
width: 100%;
|
63
|
+
height: 100%;
|
60
64
|
padding: 15px 10px;
|
61
65
|
@include json-tree-styles();
|
62
|
-
|
63
|
-
overflow: auto;
|
66
|
+
}
|
64
67
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
68
|
+
&__explain-canvas-container {
|
69
|
+
overflow-y: auto;
|
70
|
+
|
71
|
+
width: 100%;
|
72
|
+
height: 100%;
|
69
73
|
}
|
70
74
|
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import type { IQueryResult } from '../../../../types/store/query';
|
2
|
+
export declare function getPlan(data: IQueryResult | undefined): {
|
3
|
+
plan?: undefined;
|
4
|
+
simplifiedPlan?: undefined;
|
5
|
+
} | {
|
6
|
+
plan: {
|
7
|
+
tables: import("../../../../types/api/query").PlanTable[] | undefined;
|
8
|
+
nodes: import("@gravity-ui/paranoid").GraphNode<import("@gravity-ui/paranoid").ExplainPlanNodeData>[];
|
9
|
+
links: import("@gravity-ui/paranoid").Link[];
|
10
|
+
} | undefined;
|
11
|
+
simplifiedPlan: import("../../../../store/reducers/explainQuery/types").SimplifiedPlanItem[] | undefined;
|
12
|
+
} | {
|
13
|
+
plan: {
|
14
|
+
nodes: import("@gravity-ui/paranoid").GraphNode<import("@gravity-ui/paranoid").ExplainPlanNodeData>[];
|
15
|
+
links: import("@gravity-ui/paranoid").Link[];
|
16
|
+
};
|
17
|
+
simplifiedPlan?: undefined;
|
18
|
+
};
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { explainVersions } from '../../../../store/reducers/explainQuery/utils';
|
2
|
+
import { preparePlan, prepareSimplifiedPlan } from '../../../../utils/prepareQueryExplain';
|
3
|
+
import { parseQueryExplainPlan } from '../../../../utils/query';
|
4
|
+
export function getPlan(data) {
|
5
|
+
var _a, _b, _c;
|
6
|
+
if (!data) {
|
7
|
+
return {};
|
8
|
+
}
|
9
|
+
const { plan } = data;
|
10
|
+
if (plan) {
|
11
|
+
const queryPlan = parseQueryExplainPlan(plan);
|
12
|
+
const isSupportedVersion = queryPlan.meta.version === explainVersions.v2;
|
13
|
+
if (!isSupportedVersion) {
|
14
|
+
return {};
|
15
|
+
}
|
16
|
+
const { Plan: planWithStats, SimplifiedPlan: simplifiedPlan } = queryPlan;
|
17
|
+
return {
|
18
|
+
plan: planWithStats
|
19
|
+
? { ...preparePlan(planWithStats), tables: queryPlan.tables }
|
20
|
+
: undefined,
|
21
|
+
simplifiedPlan: simplifiedPlan ? prepareSimplifiedPlan([simplifiedPlan]) : undefined,
|
22
|
+
};
|
23
|
+
}
|
24
|
+
const { stats } = data;
|
25
|
+
const planFromStats = (_c = (_b = (_a = stats === null || stats === void 0 ? void 0 : stats.Executions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.TxPlansWithStats) === null || _c === void 0 ? void 0 : _c[0];
|
26
|
+
if (!planFromStats) {
|
27
|
+
return {};
|
28
|
+
}
|
29
|
+
try {
|
30
|
+
const planWithStats = JSON.parse(planFromStats);
|
31
|
+
return { plan: preparePlan(planWithStats) };
|
32
|
+
}
|
33
|
+
catch (e) {
|
34
|
+
return {};
|
35
|
+
}
|
36
|
+
}
|
@@ -1 +1,23 @@
|
|
1
|
-
|
1
|
+
import type { PreparedExplainResponse } from '../../../../store/reducers/explainQuery/types';
|
2
|
+
import type { ValueOf } from '../../../../types/common';
|
3
|
+
import './ExplainResult.scss';
|
4
|
+
declare const EXPLAIN_OPTIONS_IDS: {
|
5
|
+
readonly schema: "schema";
|
6
|
+
readonly json: "json";
|
7
|
+
readonly ast: "ast";
|
8
|
+
readonly simplified: "simplified";
|
9
|
+
};
|
10
|
+
export type QueryExplainTab = ValueOf<typeof EXPLAIN_OPTIONS_IDS>;
|
11
|
+
interface ExplainResultProps {
|
12
|
+
theme: string;
|
13
|
+
explain?: PreparedExplainResponse['plan'];
|
14
|
+
simplifiedPlan?: PreparedExplainResponse['simplifiedPlan'];
|
15
|
+
ast?: string;
|
16
|
+
loading?: boolean;
|
17
|
+
isResultsCollapsed?: boolean;
|
18
|
+
error: unknown;
|
19
|
+
onCollapseResults: VoidFunction;
|
20
|
+
onExpandResults: VoidFunction;
|
21
|
+
}
|
22
|
+
export declare function ExplainResult({ explain, ast, theme, error, loading, onCollapseResults, onExpandResults, isResultsCollapsed, simplifiedPlan, }: ExplainResultProps): import("react/jsx-runtime").JSX.Element;
|
23
|
+
export {};
|
@@ -1,149 +1,94 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import React from 'react';
|
3
|
-
import {
|
4
|
-
import { Loader, RadioButton } from '@gravity-ui/uikit';
|
5
|
-
import JSONTree from 'react-json-inspector';
|
3
|
+
import { RadioButton } from '@gravity-ui/uikit';
|
6
4
|
import Divider from '../../../../components/Divider/Divider';
|
7
5
|
import EnableFullscreenButton from '../../../../components/EnableFullscreenButton/EnableFullscreenButton';
|
8
6
|
import Fullscreen from '../../../../components/Fullscreen/Fullscreen';
|
9
|
-
import {
|
7
|
+
import { LoaderWrapper } from '../../../../components/LoaderWrapper/LoaderWrapper';
|
10
8
|
import { QueryExecutionStatus } from '../../../../components/QueryExecutionStatus';
|
11
|
-
import { explainVersions } from '../../../../store/reducers/explainQuery/utils';
|
12
9
|
import { disableFullscreen } from '../../../../store/reducers/fullscreen';
|
13
10
|
import { cn } from '../../../../utils/cn';
|
14
|
-
import { useTypedDispatch
|
15
|
-
import { LANGUAGE_S_EXPRESSION_ID } from '../../../../utils/monaco/s-expression/constants';
|
11
|
+
import { useTypedDispatch } from '../../../../utils/hooks';
|
16
12
|
import { parseQueryErrorToString } from '../../../../utils/query';
|
17
13
|
import { PaneVisibilityToggleButtons } from '../../utils/paneVisibilityToggleHelpers';
|
18
|
-
import {
|
14
|
+
import { QuerySettingsBanner } from '../QuerySettingsBanner/QuerySettingsBanner';
|
15
|
+
import { Ast } from './components/Ast/Ast';
|
16
|
+
import { Graph } from './components/Graph/Graph';
|
17
|
+
import { SimplifiedPlan } from './components/SimplifiedPlan/SimplifiedPlan';
|
18
|
+
import { TextExplain } from './components/TextExplain/TextExplain';
|
19
|
+
import i18n from './i18n';
|
19
20
|
import './ExplainResult.scss';
|
20
|
-
import 'react-json-inspector/json-inspector.css';
|
21
21
|
const b = cn('ydb-query-explain-result');
|
22
|
-
const
|
23
|
-
automaticLayout: true,
|
24
|
-
selectOnLineNumbers: true,
|
25
|
-
readOnly: true,
|
26
|
-
minimap: {
|
27
|
-
enabled: false,
|
28
|
-
},
|
29
|
-
wrappingIndent: 'indent',
|
30
|
-
};
|
31
|
-
const ExplainOptionIds = {
|
22
|
+
const EXPLAIN_OPTIONS_IDS = {
|
32
23
|
schema: 'schema',
|
33
24
|
json: 'json',
|
34
25
|
ast: 'ast',
|
26
|
+
simplified: 'simplified',
|
27
|
+
};
|
28
|
+
const EXPLAIN_OPTIONS_NAMES = {
|
29
|
+
[EXPLAIN_OPTIONS_IDS.schema]: i18n('action.schema'),
|
30
|
+
[EXPLAIN_OPTIONS_IDS.json]: i18n('action.json'),
|
31
|
+
[EXPLAIN_OPTIONS_IDS.ast]: i18n('action.ast'),
|
32
|
+
[EXPLAIN_OPTIONS_IDS.simplified]: i18n('action.explain-plan'),
|
35
33
|
};
|
36
34
|
const explainOptions = [
|
37
|
-
{ value:
|
38
|
-
{
|
39
|
-
|
35
|
+
{ value: EXPLAIN_OPTIONS_IDS.schema, content: EXPLAIN_OPTIONS_NAMES[EXPLAIN_OPTIONS_IDS.schema] },
|
36
|
+
{
|
37
|
+
value: EXPLAIN_OPTIONS_IDS.simplified,
|
38
|
+
content: EXPLAIN_OPTIONS_NAMES[EXPLAIN_OPTIONS_IDS.simplified],
|
39
|
+
},
|
40
|
+
{ value: EXPLAIN_OPTIONS_IDS.json, content: EXPLAIN_OPTIONS_NAMES[EXPLAIN_OPTIONS_IDS.json] },
|
41
|
+
{ value: EXPLAIN_OPTIONS_IDS.ast, content: EXPLAIN_OPTIONS_NAMES[EXPLAIN_OPTIONS_IDS.ast] },
|
40
42
|
];
|
41
|
-
function
|
42
|
-
const paranoid = React.useRef();
|
43
|
-
const { data, opts, shapes, theme } = props;
|
44
|
-
React.useEffect(() => {
|
45
|
-
const graphRoot = document.getElementById('graphRoot');
|
46
|
-
if (!graphRoot) {
|
47
|
-
throw new Error("Can't find element with id #graphRoot");
|
48
|
-
}
|
49
|
-
graphRoot.innerHTML = '';
|
50
|
-
paranoid.current = getTopology('graphRoot', data, opts, shapes);
|
51
|
-
paranoid.current.render();
|
52
|
-
return () => {
|
53
|
-
paranoid.current = undefined;
|
54
|
-
};
|
55
|
-
}, [theme]);
|
56
|
-
React.useEffect(() => {
|
57
|
-
var _a, _b;
|
58
|
-
(_b = (_a = paranoid.current) === null || _a === void 0 ? void 0 : _a.updateData) === null || _b === void 0 ? void 0 : _b.call(_a, props.data);
|
59
|
-
}, [props.data]);
|
60
|
-
return _jsx("div", { id: "graphRoot", style: { height: '100vh' } });
|
61
|
-
}
|
62
|
-
export function ExplainResult(props) {
|
43
|
+
export function ExplainResult({ explain, ast, theme, error, loading, onCollapseResults, onExpandResults, isResultsCollapsed, simplifiedPlan, }) {
|
63
44
|
const dispatch = useTypedDispatch();
|
64
|
-
const [activeOption, setActiveOption] = React.useState(
|
65
|
-
const
|
45
|
+
const [activeOption, setActiveOption] = React.useState(EXPLAIN_OPTIONS_IDS.schema);
|
46
|
+
const [isPending, startTransition] = React.useTransition();
|
66
47
|
React.useEffect(() => {
|
67
48
|
return () => {
|
68
49
|
dispatch(disableFullscreen());
|
69
50
|
};
|
70
51
|
}, [dispatch]);
|
71
|
-
const onSelectOption = (tabId) => {
|
72
|
-
setActiveOption(tabId);
|
73
|
-
};
|
74
|
-
const renderLoader = () => {
|
75
|
-
return (_jsx("div", { className: b('loader'), children: _jsx(Loader, { size: "m" }) }));
|
76
|
-
};
|
77
52
|
const renderStub = () => {
|
78
|
-
return (_jsx("div", { className: b('text-message'), children:
|
79
|
-
|
80
|
-
|
81
|
-
var _a, _b;
|
82
|
-
switch (activeOption) {
|
83
|
-
case ExplainOptionIds.schema:
|
84
|
-
return Boolean((_b = (_a = props.explain) === null || _a === void 0 ? void 0 : _a.nodes) === null || _b === void 0 ? void 0 : _b.length);
|
85
|
-
case ExplainOptionIds.json:
|
86
|
-
return Boolean(props.explain);
|
87
|
-
case ExplainOptionIds.ast:
|
88
|
-
return Boolean(props.ast);
|
89
|
-
default:
|
90
|
-
return false;
|
91
|
-
}
|
92
|
-
};
|
93
|
-
const renderTextExplain = () => {
|
94
|
-
var _a;
|
95
|
-
const content = (_jsx(JSONTree, { data: (_a = props.explain) === null || _a === void 0 ? void 0 : _a.pristine, isExpanded: () => true, className: b('inspector'), searchOptions: {
|
96
|
-
debounceTime: 300,
|
97
|
-
} }));
|
98
|
-
return (_jsxs(React.Fragment, { children: [content, isFullscreen && _jsx(Fullscreen, { children: content })] }));
|
99
|
-
};
|
100
|
-
const renderAstExplain = () => {
|
101
|
-
const content = (_jsx("div", { className: b('ast'), children: _jsx(MonacoEditor, { language: LANGUAGE_S_EXPRESSION_ID, value: props.ast, options: EDITOR_OPTIONS, wrappingIndent: "indent", theme: `vs-${props.theme}` }) }));
|
102
|
-
return (_jsxs(React.Fragment, { children: [content, isFullscreen && _jsx(Fullscreen, { children: content })] }));
|
103
|
-
};
|
104
|
-
const renderGraph = () => {
|
105
|
-
const { explain = {}, theme } = props;
|
106
|
-
const { links, nodes, version } = explain;
|
107
|
-
const isSupportedVersion = version === explainVersions.v2;
|
108
|
-
const isEnoughDataForGraph = links && nodes && nodes.length;
|
109
|
-
const content = isSupportedVersion && isEnoughDataForGraph ? (_jsx("div", { className: b('explain-canvas-container', {
|
110
|
-
hidden: activeOption !== ExplainOptionIds.schema,
|
111
|
-
}), children: _jsx(GraphRoot, { theme: theme, data: { links, nodes }, opts: {
|
112
|
-
renderNodeTitle: renderExplainNode,
|
113
|
-
textOverflow: 'normal',
|
114
|
-
initialZoomFitsCanvas: true,
|
115
|
-
}, shapes: {
|
116
|
-
node: getYdbPlanNodeShape,
|
117
|
-
} }) })) : null;
|
118
|
-
return (_jsxs(React.Fragment, { children: [!isFullscreen && content, isFullscreen && _jsx(Fullscreen, { children: content })] }));
|
119
|
-
};
|
120
|
-
const renderError = () => {
|
121
|
-
return _jsx("div", { className: b('text-message'), children: parseQueryErrorToString(props.error) });
|
53
|
+
return (_jsx("div", { className: b('text-message'), children: i18n('description.empty-result', {
|
54
|
+
activeOption: EXPLAIN_OPTIONS_NAMES[activeOption],
|
55
|
+
}) }));
|
122
56
|
};
|
123
57
|
const renderContent = () => {
|
124
|
-
|
125
|
-
if (loading) {
|
126
|
-
return renderLoader();
|
127
|
-
}
|
58
|
+
var _a;
|
128
59
|
if (error) {
|
129
|
-
return
|
130
|
-
}
|
131
|
-
if (!hasContent()) {
|
132
|
-
return renderStub();
|
60
|
+
return _jsx("div", { className: b('text-message'), children: parseQueryErrorToString(error) });
|
133
61
|
}
|
134
62
|
switch (activeOption) {
|
135
|
-
case
|
136
|
-
|
63
|
+
case EXPLAIN_OPTIONS_IDS.json: {
|
64
|
+
if (!(explain === null || explain === void 0 ? void 0 : explain.pristine)) {
|
65
|
+
return renderStub();
|
66
|
+
}
|
67
|
+
return _jsx(TextExplain, { explain: explain.pristine });
|
68
|
+
}
|
69
|
+
case EXPLAIN_OPTIONS_IDS.ast: {
|
70
|
+
if (!ast) {
|
71
|
+
return renderStub();
|
72
|
+
}
|
73
|
+
return _jsx(Ast, { ast: ast, theme: theme });
|
137
74
|
}
|
138
|
-
case
|
139
|
-
|
75
|
+
case EXPLAIN_OPTIONS_IDS.schema: {
|
76
|
+
if (!((_a = explain === null || explain === void 0 ? void 0 : explain.nodes) === null || _a === void 0 ? void 0 : _a.length)) {
|
77
|
+
return renderStub();
|
78
|
+
}
|
79
|
+
return _jsx(Graph, { theme: theme, explain: explain });
|
140
80
|
}
|
141
|
-
case
|
142
|
-
|
81
|
+
case EXPLAIN_OPTIONS_IDS.simplified: {
|
82
|
+
if (!(simplifiedPlan === null || simplifiedPlan === void 0 ? void 0 : simplifiedPlan.length)) {
|
83
|
+
return renderStub();
|
84
|
+
}
|
85
|
+
return _jsx(SimplifiedPlan, { plan: simplifiedPlan });
|
143
86
|
}
|
144
87
|
default:
|
145
88
|
return null;
|
146
89
|
}
|
147
90
|
};
|
148
|
-
return (_jsxs(React.Fragment, { children: [_jsx("div", { className: b('controls'), children: !
|
91
|
+
return (_jsxs(React.Fragment, { children: [_jsx("div", { className: b('controls'), children: !loading && (_jsxs(React.Fragment, { children: [_jsxs("div", { className: b('controls-right'), children: [_jsx(QueryExecutionStatus, { error: error }), !error && (_jsxs(React.Fragment, { children: [_jsx(Divider, {}), _jsx(RadioButton, { options: explainOptions, value: activeOption, onUpdate: (tabId) => {
|
92
|
+
startTransition(() => setActiveOption(tabId));
|
93
|
+
} })] }))] }), _jsxs("div", { className: b('controls-left'), children: [_jsx(EnableFullscreenButton, { disabled: Boolean(error) }), _jsx(PaneVisibilityToggleButtons, { onCollapse: onCollapseResults, onExpand: onExpandResults, isCollapsed: isResultsCollapsed, initialDirection: "bottom" })] })] })) }), _jsx(QuerySettingsBanner, {}), _jsx(LoaderWrapper, { loading: loading || isPending, children: _jsx(Fullscreen, { className: b('result'), children: renderContent() }) })] }));
|
149
94
|
}
|