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,10 +1,10 @@
|
|
1
1
|
import { settingsManager } from '../../services/settings';
|
2
|
+
import { TracingLevelNumber } from '../../types/api/query';
|
2
3
|
import { QUERIES_HISTORY_KEY } from '../../utils/constants';
|
3
|
-
import {
|
4
|
-
import {
|
4
|
+
import { QUERY_SYNTAX, isQueryErrorResponse, parseQueryAPIExecuteResponse } from '../../utils/query';
|
5
|
+
import { isNumeric } from '../../utils/utils';
|
5
6
|
import { api } from './api';
|
6
7
|
const MAXIMUM_QUERIES_IN_HISTORY = 20;
|
7
|
-
export const SEND_QUERY = createRequestActionTypes('query', 'SEND_QUERY');
|
8
8
|
const CHANGE_USER_INPUT = 'query/CHANGE_USER_INPUT';
|
9
9
|
const SAVE_QUERY_TO_HISTORY = 'query/SAVE_QUERY_TO_HISTORY';
|
10
10
|
const GO_TO_PREVIOUS_QUERY = 'query/GO_TO_PREVIOUS_QUERY';
|
@@ -33,10 +33,8 @@ const executeQuery = (state = initialState, action) => {
|
|
33
33
|
};
|
34
34
|
}
|
35
35
|
case SAVE_QUERY_TO_HISTORY: {
|
36
|
-
const queryText = action.data
|
37
|
-
|
38
|
-
const syntax = action.data.mode === QUERY_MODES.pg ? QUERY_SYNTAX.pg : undefined;
|
39
|
-
const newQueries = [...state.history.queries, { queryText, syntax }].slice(state.history.queries.length >= MAXIMUM_QUERIES_IN_HISTORY ? 1 : 0);
|
36
|
+
const queryText = action.data;
|
37
|
+
const newQueries = [...state.history.queries, { queryText }].slice(state.history.queries.length >= MAXIMUM_QUERIES_IN_HISTORY ? 1 : 0);
|
40
38
|
settingsManager.setUserSettingsValue(QUERIES_HISTORY_KEY, newQueries);
|
41
39
|
const currentIndex = newQueries.length - 1;
|
42
40
|
return {
|
@@ -93,15 +91,15 @@ const executeQuery = (state = initialState, action) => {
|
|
93
91
|
export const executeQueryApi = api.injectEndpoints({
|
94
92
|
endpoints: (build) => ({
|
95
93
|
executeQuery: build.mutation({
|
96
|
-
queryFn: async ({ query, database,
|
94
|
+
queryFn: async ({ query, database, querySettings = {}, schema = 'modern', enableTracingLevel, }) => {
|
97
95
|
let action = 'execute';
|
98
96
|
let syntax = QUERY_SYNTAX.yql;
|
99
|
-
if (
|
97
|
+
if (querySettings.queryMode === 'pg') {
|
100
98
|
action = 'execute-query';
|
101
99
|
syntax = QUERY_SYNTAX.pg;
|
102
100
|
}
|
103
|
-
else if (
|
104
|
-
action = `execute-${
|
101
|
+
else if (querySettings.queryMode) {
|
102
|
+
action = `execute-${querySettings.queryMode}`;
|
105
103
|
}
|
106
104
|
try {
|
107
105
|
const response = await window.api.sendQuery({
|
@@ -110,7 +108,14 @@ export const executeQueryApi = api.injectEndpoints({
|
|
110
108
|
database,
|
111
109
|
action,
|
112
110
|
syntax,
|
113
|
-
stats:
|
111
|
+
stats: querySettings.statisticsMode,
|
112
|
+
tracingLevel: querySettings.tracingLevel && enableTracingLevel
|
113
|
+
? TracingLevelNumber[querySettings.tracingLevel]
|
114
|
+
: undefined,
|
115
|
+
transaction_mode: querySettings.isolationLevel,
|
116
|
+
timeout: isNumeric(querySettings.timeout)
|
117
|
+
? Number(querySettings.timeout) * 1000
|
118
|
+
: undefined,
|
114
119
|
});
|
115
120
|
if (isQueryErrorResponse(response)) {
|
116
121
|
return { error: response };
|
@@ -126,10 +131,10 @@ export const executeQueryApi = api.injectEndpoints({
|
|
126
131
|
}),
|
127
132
|
overrideExisting: 'throw',
|
128
133
|
});
|
129
|
-
export const saveQueryToHistory = (queryText
|
134
|
+
export const saveQueryToHistory = (queryText) => {
|
130
135
|
return {
|
131
136
|
type: SAVE_QUERY_TO_HISTORY,
|
132
|
-
data:
|
137
|
+
data: queryText,
|
133
138
|
};
|
134
139
|
};
|
135
140
|
export const goToPreviousQuery = () => {
|
@@ -6,5 +6,5 @@ export declare const topQueriesApi: import("@reduxjs/toolkit/query").Api<import(
|
|
6
6
|
getTopQueries: import("@reduxjs/toolkit/query").QueryDefinition<{
|
7
7
|
database: string;
|
8
8
|
filters?: TopQueriesFilters;
|
9
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All", import("../../../types/store/query").IQueryResult | undefined, "api">;
|
10
|
-
}, "api", "All", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
|
9
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "PDiskData" | "UserData", import("../../../types/store/query").IQueryResult | undefined, "api">;
|
10
|
+
}, "api", "All" | "PDiskData" | "UserData", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
|
@@ -1,5 +1,5 @@
|
|
1
|
+
import { isLikeRelative } from '@gravity-ui/date-utils';
|
1
2
|
import { createSlice } from '@reduxjs/toolkit';
|
2
|
-
import { HOUR_IN_SECONDS } from '../../../utils/constants';
|
3
3
|
import { isQueryErrorResponse, parseQueryAPIExecuteResponse } from '../../../utils/query';
|
4
4
|
import { api } from '../api';
|
5
5
|
import { getFiltersConditions } from './utils';
|
@@ -35,34 +35,39 @@ ORDER BY CPUTimeUs DESC
|
|
35
35
|
export const topQueriesApi = api.injectEndpoints({
|
36
36
|
endpoints: (build) => ({
|
37
37
|
getTopQueries: build.query({
|
38
|
-
queryFn: async ({ database, filters }, { signal
|
39
|
-
|
38
|
+
queryFn: async ({ database, filters }, { signal }) => {
|
39
|
+
const preparedFilters = {
|
40
|
+
...filters,
|
41
|
+
from: (filters === null || filters === void 0 ? void 0 : filters.from) || 'now-1h',
|
42
|
+
to: (filters === null || filters === void 0 ? void 0 : filters.to) || 'now',
|
43
|
+
};
|
40
44
|
try {
|
41
45
|
const response = await window.api.sendQuery({
|
42
46
|
schema: 'modern',
|
43
|
-
query: getQueryText(database,
|
47
|
+
query: getQueryText(database, preparedFilters),
|
44
48
|
database,
|
45
49
|
action: 'execute-scan',
|
46
|
-
}, { signal });
|
50
|
+
}, { signal, withRetries: true });
|
47
51
|
if (isQueryErrorResponse(response)) {
|
48
52
|
return { error: response };
|
49
53
|
}
|
50
54
|
const data = parseQueryAPIExecuteResponse(response);
|
51
|
-
// FIXME: do we really need this?
|
52
|
-
if (!(filters === null || filters === void 0 ? void 0 : filters.from) && !(filters === null || filters === void 0 ? void 0 : filters.to)) {
|
53
|
-
const intervalEnd = (_b = (_a = data === null || data === void 0 ? void 0 : data.result) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.IntervalEnd;
|
54
|
-
if (intervalEnd) {
|
55
|
-
const to = new Date(intervalEnd).getTime();
|
56
|
-
const from = new Date(to - HOUR_IN_SECONDS * 1000).getTime();
|
57
|
-
dispatch(setTopQueriesFilters({ from, to }));
|
58
|
-
}
|
59
|
-
}
|
60
55
|
return { data };
|
61
56
|
}
|
62
57
|
catch (error) {
|
63
58
|
return { error };
|
64
59
|
}
|
65
60
|
},
|
61
|
+
forceRefetch: ({ currentArg }) => {
|
62
|
+
var _a, _b, _c, _d;
|
63
|
+
if (!((_a = currentArg === null || currentArg === void 0 ? void 0 : currentArg.filters) === null || _a === void 0 ? void 0 : _a.from) ||
|
64
|
+
!((_b = currentArg === null || currentArg === void 0 ? void 0 : currentArg.filters) === null || _b === void 0 ? void 0 : _b.to) ||
|
65
|
+
isLikeRelative((_c = currentArg === null || currentArg === void 0 ? void 0 : currentArg.filters) === null || _c === void 0 ? void 0 : _c.from) ||
|
66
|
+
isLikeRelative((_d = currentArg === null || currentArg === void 0 ? void 0 : currentArg.filters) === null || _d === void 0 ? void 0 : _d.to)) {
|
67
|
+
return true;
|
68
|
+
}
|
69
|
+
return false;
|
70
|
+
},
|
66
71
|
}),
|
67
72
|
}),
|
68
73
|
overrideExisting: 'throw',
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { dateTimeParse } from '@gravity-ui/date-utils';
|
1
2
|
const endTimeColumn = 'EndTime';
|
2
3
|
const intervalEndColumn = 'IntervalEnd';
|
3
4
|
const getMaxIntervalSubquery = (path) => `(
|
@@ -6,21 +7,24 @@ const getMaxIntervalSubquery = (path) => `(
|
|
6
7
|
FROM \`${path}/.sys/top_queries_by_cpu_time_one_hour\`
|
7
8
|
)`;
|
8
9
|
export function getFiltersConditions(path, filters) {
|
10
|
+
var _a, _b;
|
9
11
|
const conditions = [];
|
10
|
-
|
12
|
+
const to = (_a = dateTimeParse(Number(filters === null || filters === void 0 ? void 0 : filters.to) || (filters === null || filters === void 0 ? void 0 : filters.to))) === null || _a === void 0 ? void 0 : _a.valueOf();
|
13
|
+
const from = (_b = dateTimeParse(Number(filters === null || filters === void 0 ? void 0 : filters.from) || (filters === null || filters === void 0 ? void 0 : filters.from))) === null || _b === void 0 ? void 0 : _b.valueOf();
|
14
|
+
if (from && to && from > to) {
|
11
15
|
throw new Error('Invalid date range');
|
12
16
|
}
|
13
|
-
if (
|
17
|
+
if (from) {
|
14
18
|
// matching `from` & `to` is an edge case
|
15
19
|
// other cases should not include the starting point, since intervals are stored using the ending time
|
16
|
-
const gt =
|
17
|
-
conditions.push(`${endTimeColumn} ${gt} Timestamp('${new Date(
|
20
|
+
const gt = to === from ? '>=' : '>';
|
21
|
+
conditions.push(`${endTimeColumn} ${gt} Timestamp('${new Date(from).toISOString()}')`);
|
18
22
|
}
|
19
|
-
if (
|
20
|
-
conditions.push(`${endTimeColumn} <= Timestamp('${new Date(
|
23
|
+
if (to) {
|
24
|
+
conditions.push(`${endTimeColumn} <= Timestamp('${new Date(to).toISOString()}')`);
|
21
25
|
}
|
22
26
|
// If there is no filters, return queries, that were executed in the last hour
|
23
|
-
if (!
|
27
|
+
if (!from && !to) {
|
24
28
|
conditions.push(`${intervalEndColumn} IN ${getMaxIntervalSubquery(path)}`);
|
25
29
|
}
|
26
30
|
if (filters === null || filters === void 0 ? void 0 : filters.text) {
|
@@ -1,9 +1,10 @@
|
|
1
|
-
import type {
|
1
|
+
import type { QueryRequestParams, QuerySettings } from '../../../types/store/query';
|
2
2
|
import type { PreparedExplainResponse } from './types';
|
3
3
|
interface ExplainQueryParams extends QueryRequestParams {
|
4
|
-
|
4
|
+
querySettings?: Partial<QuerySettings>;
|
5
|
+
enableTracingLevel?: boolean;
|
5
6
|
}
|
6
7
|
export declare const explainQueryApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, {
|
7
|
-
explainQuery: import("@reduxjs/toolkit/query").MutationDefinition<ExplainQueryParams, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All", PreparedExplainResponse, "api">;
|
8
|
-
}, "api", "All", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
|
8
|
+
explainQuery: import("@reduxjs/toolkit/query").MutationDefinition<ExplainQueryParams, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "PDiskData" | "UserData", PreparedExplainResponse, "api">;
|
9
|
+
}, "api", "All" | "PDiskData" | "UserData", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
|
9
10
|
export {};
|
@@ -1,21 +1,36 @@
|
|
1
|
+
import { TracingLevelNumber } from '../../../types/api/query';
|
1
2
|
import { QUERY_SYNTAX, isQueryErrorResponse } from '../../../utils/query';
|
3
|
+
import { isNumeric } from '../../../utils/utils';
|
2
4
|
import { api } from '../api';
|
3
5
|
import { prepareExplainResponse } from './utils';
|
4
6
|
export const explainQueryApi = api.injectEndpoints({
|
5
7
|
endpoints: (build) => ({
|
6
8
|
explainQuery: build.mutation({
|
7
|
-
queryFn: async ({ query, database,
|
9
|
+
queryFn: async ({ query, database, querySettings, enableTracingLevel }) => {
|
8
10
|
let action = 'explain';
|
9
11
|
let syntax = QUERY_SYNTAX.yql;
|
10
|
-
if (
|
12
|
+
if ((querySettings === null || querySettings === void 0 ? void 0 : querySettings.queryMode) === 'pg') {
|
11
13
|
action = 'explain-query';
|
12
14
|
syntax = QUERY_SYNTAX.pg;
|
13
15
|
}
|
14
|
-
else if (
|
15
|
-
action = `explain-${
|
16
|
+
else if (querySettings === null || querySettings === void 0 ? void 0 : querySettings.queryMode) {
|
17
|
+
action = `explain-${querySettings === null || querySettings === void 0 ? void 0 : querySettings.queryMode}`;
|
16
18
|
}
|
17
19
|
try {
|
18
|
-
const response = await window.api.
|
20
|
+
const response = await window.api.sendQuery({
|
21
|
+
query,
|
22
|
+
database,
|
23
|
+
action,
|
24
|
+
syntax,
|
25
|
+
stats: querySettings === null || querySettings === void 0 ? void 0 : querySettings.statisticsMode,
|
26
|
+
tracingLevel: (querySettings === null || querySettings === void 0 ? void 0 : querySettings.tracingLevel) && enableTracingLevel
|
27
|
+
? TracingLevelNumber[querySettings === null || querySettings === void 0 ? void 0 : querySettings.tracingLevel]
|
28
|
+
: undefined,
|
29
|
+
transaction_mode: querySettings === null || querySettings === void 0 ? void 0 : querySettings.isolationLevel,
|
30
|
+
timeout: isNumeric(querySettings === null || querySettings === void 0 ? void 0 : querySettings.timeout)
|
31
|
+
? Number(querySettings === null || querySettings === void 0 ? void 0 : querySettings.timeout) * 1000
|
32
|
+
: undefined,
|
33
|
+
});
|
19
34
|
if (isQueryErrorResponse(response)) {
|
20
35
|
return { error: response };
|
21
36
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { ExplainPlanNodeData, GraphNode, Link } from '@gravity-ui/paranoid';
|
2
|
-
import type { PlanTable, QueryPlan, ScriptPlan } from '../../../types/api/query';
|
2
|
+
import type { PlanTable, QueryPlan, ScriptPlan, SimlifiedPlanOperatorOtherParams } from '../../../types/api/query';
|
3
3
|
export interface PreparedExplainResponse {
|
4
4
|
plan?: {
|
5
5
|
links?: Link[];
|
@@ -8,5 +8,17 @@ export interface PreparedExplainResponse {
|
|
8
8
|
version?: string;
|
9
9
|
pristine?: QueryPlan | ScriptPlan;
|
10
10
|
};
|
11
|
+
simplifiedPlan?: SimplifiedPlanItem[];
|
11
12
|
ast?: string;
|
12
13
|
}
|
14
|
+
export interface SimplifiedPlanItem {
|
15
|
+
parentId?: string;
|
16
|
+
name: string;
|
17
|
+
operationParams: SimlifiedPlanOperatorOtherParams;
|
18
|
+
aCpu?: number;
|
19
|
+
aRows?: number;
|
20
|
+
eCost?: string;
|
21
|
+
eRows?: string;
|
22
|
+
eSize?: string;
|
23
|
+
children?: SimplifiedPlanItem[];
|
24
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { preparePlan } from '../../../utils/prepareQueryExplain';
|
1
|
+
import { preparePlan, prepareSimplifiedPlan } from '../../../utils/prepareQueryExplain';
|
2
2
|
import { parseQueryAPIExplainResponse, parseQueryExplainPlan } from '../../../utils/query';
|
3
3
|
export const explainVersions = {
|
4
4
|
v2: '0.2',
|
@@ -9,7 +9,7 @@ export const prepareExplainResponse = (response) => {
|
|
9
9
|
if (!rawPlan) {
|
10
10
|
return { ast };
|
11
11
|
}
|
12
|
-
const { tables, meta, Plan } = parseQueryExplainPlan(rawPlan);
|
12
|
+
const { tables, meta, Plan, SimplifiedPlan } = parseQueryExplainPlan(rawPlan);
|
13
13
|
if (supportedExplainQueryVersions.indexOf(meta.version) === -1) {
|
14
14
|
// Do not prepare plan for not supported versions
|
15
15
|
return {
|
@@ -27,6 +27,10 @@ export const prepareExplainResponse = (response) => {
|
|
27
27
|
links = preparedPlan.links;
|
28
28
|
nodes = preparedPlan.nodes;
|
29
29
|
}
|
30
|
+
let preparedSimplifiedPlan;
|
31
|
+
if (SimplifiedPlan) {
|
32
|
+
preparedSimplifiedPlan = prepareSimplifiedPlan([SimplifiedPlan]);
|
33
|
+
}
|
30
34
|
return {
|
31
35
|
plan: {
|
32
36
|
links,
|
@@ -35,6 +39,7 @@ export const prepareExplainResponse = (response) => {
|
|
35
39
|
version: meta.version,
|
36
40
|
pristine: rawPlan,
|
37
41
|
},
|
42
|
+
simplifiedPlan: preparedSimplifiedPlan,
|
38
43
|
ast,
|
39
44
|
};
|
40
45
|
};
|