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,5 +1,3 @@
|
|
1
|
-
@import '../../../../styles/mixins.scss';
|
2
|
-
|
3
1
|
.ydb-query-explain-result {
|
4
2
|
&__result {
|
5
3
|
display: flex;
|
@@ -10,6 +8,7 @@
|
|
10
8
|
&__text-message {
|
11
9
|
padding: 15px 20px;
|
12
10
|
}
|
11
|
+
|
13
12
|
&__controls {
|
14
13
|
position: sticky;
|
15
14
|
z-index: 2;
|
@@ -35,34 +34,6 @@
|
|
35
34
|
display: flex;
|
36
35
|
gap: 4px;
|
37
36
|
}
|
38
|
-
&__explain-canvas-container {
|
39
|
-
overflow-y: auto;
|
40
|
-
|
41
|
-
width: 100%;
|
42
|
-
height: 100%;
|
43
|
-
&_hidden {
|
44
|
-
display: none;
|
45
|
-
}
|
46
|
-
}
|
47
|
-
&__inspector {
|
48
|
-
overflow-y: auto;
|
49
|
-
|
50
|
-
padding: 15px 20px;
|
51
|
-
@include json-tree-styles();
|
52
|
-
|
53
|
-
&_fullscreen {
|
54
|
-
padding: 10px;
|
55
|
-
}
|
56
|
-
}
|
57
|
-
|
58
|
-
&__ast {
|
59
|
-
overflow: hidden;
|
60
|
-
|
61
|
-
width: 100%;
|
62
|
-
height: 100%;
|
63
|
-
|
64
|
-
white-space: pre-wrap;
|
65
|
-
}
|
66
37
|
&__loader {
|
67
38
|
display: flex;
|
68
39
|
justify-content: center;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import MonacoEditor from 'react-monaco-editor';
|
3
|
+
import { cn } from '../../../../../../utils/cn';
|
4
|
+
import { S_EXPRESSION_LANGUAGE_ID } from '../../../../../../utils/monaco/constats';
|
5
|
+
import './Ast.scss';
|
6
|
+
const b = cn('ydb-query-explain-ast');
|
7
|
+
const EDITOR_OPTIONS = {
|
8
|
+
automaticLayout: true,
|
9
|
+
selectOnLineNumbers: true,
|
10
|
+
readOnly: true,
|
11
|
+
minimap: {
|
12
|
+
enabled: false,
|
13
|
+
},
|
14
|
+
wrappingIndent: 'indent',
|
15
|
+
};
|
16
|
+
export function Ast({ ast, theme }) {
|
17
|
+
return (_jsx("div", { className: b(), children: _jsx(MonacoEditor, { language: S_EXPRESSION_LANGUAGE_ID, value: ast, options: EDITOR_OPTIONS, theme: `vs-${theme}` }) }));
|
18
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { PreparedExplainResponse } from '../../../../../../store/reducers/explainQuery/types';
|
2
|
+
import './Graph.scss';
|
3
|
+
interface GraphProps {
|
4
|
+
explain: PreparedExplainResponse['plan'];
|
5
|
+
theme: string;
|
6
|
+
}
|
7
|
+
export declare function Graph({ explain, theme }: GraphProps): import("react/jsx-runtime").JSX.Element;
|
8
|
+
export {};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { YDBGraph } from '../../../../../../components/Graph/Graph';
|
3
|
+
import { explainVersions } from '../../../../../../store/reducers/explainQuery/utils';
|
4
|
+
import { cn } from '../../../../../../utils/cn';
|
5
|
+
import i18n from '../../i18n';
|
6
|
+
import './Graph.scss';
|
7
|
+
const b = cn('ydb-query-explain-graph');
|
8
|
+
export function Graph({ explain, theme }) {
|
9
|
+
const { links, nodes, version } = explain !== null && explain !== void 0 ? explain : {};
|
10
|
+
const isSupportedVersion = version === explainVersions.v2;
|
11
|
+
const isEnoughDataForGraph = links && nodes && nodes.length;
|
12
|
+
const content = isSupportedVersion && isEnoughDataForGraph ? (_jsx("div", { className: b('canvas-container'), children: _jsx(YDBGraph, { data: { links, nodes } }, theme) })) : (_jsx("div", { className: b('text-message'), children: i18n('description.graph-is-not-supported') }));
|
13
|
+
return content;
|
14
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { isNumeric } from '../../../../../../utils/utils';
|
3
|
+
import { block } from './utils';
|
4
|
+
export function MetricsCell({ value, formatter }) {
|
5
|
+
if (!isNumeric(value)) {
|
6
|
+
return undefined;
|
7
|
+
}
|
8
|
+
const numberValue = Number(value);
|
9
|
+
const content = formatter(numberValue);
|
10
|
+
return _jsx("div", { className: block('metrics-cell'), children: content });
|
11
|
+
}
|
package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationCell.d.ts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { Row } from '@tanstack/react-table';
|
2
|
+
import type { SimlifiedPlanOperatorOtherParams } from '../../../../../../types/api/query';
|
3
|
+
interface OperationCellProps<TData> {
|
4
|
+
row: Row<TData>;
|
5
|
+
depth?: number;
|
6
|
+
params: {
|
7
|
+
name: string;
|
8
|
+
operationParams?: SimlifiedPlanOperatorOtherParams;
|
9
|
+
lines?: string;
|
10
|
+
};
|
11
|
+
}
|
12
|
+
export declare function OperationCell<TData>({ row, depth, params }: OperationCellProps<TData>): import("react/jsx-runtime").JSX.Element;
|
13
|
+
export {};
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import React from 'react';
|
3
|
+
import { ArrowToggle, Button, Flex } from '@gravity-ui/uikit';
|
4
|
+
import { OperationParams } from './OperationParams';
|
5
|
+
import { block } from './utils';
|
6
|
+
const LEVEL_PADDING = 25;
|
7
|
+
const FIRST_PADDING = 9;
|
8
|
+
function Divider({ modifiers, left }) {
|
9
|
+
return (_jsx("div", { className: block('divider', modifiers), style: {
|
10
|
+
left,
|
11
|
+
} }));
|
12
|
+
}
|
13
|
+
function getDividers(lines, hasLeafs) {
|
14
|
+
const linesArray = lines.split('.').map(Number);
|
15
|
+
const dividers = [];
|
16
|
+
for (let i = 0; i < linesArray.length; i++) {
|
17
|
+
//logic for calculating left coordinate: FIRST_PADDING - is a padding from start of a level to the middle of toggle button
|
18
|
+
// LEVEL_PADDING is a difference between levels
|
19
|
+
// (i-1): in `lines` we have digits that point, should we paint a line for previous levels or not
|
20
|
+
if (i === linesArray.length - 1 && i !== 0) {
|
21
|
+
if (linesArray[i]) {
|
22
|
+
//horizontal pointer to the node (├)
|
23
|
+
dividers.push(_jsx(Divider, { modifiers: { horizontal: true }, left: FIRST_PADDING + 1 + LEVEL_PADDING * (i - 1) }, 'last'));
|
24
|
+
}
|
25
|
+
else {
|
26
|
+
//pointer to the last child in the branch (└)
|
27
|
+
dividers.push(_jsx(Divider, { modifiers: { last: true }, left: FIRST_PADDING + LEVEL_PADDING * (i - 1) }, 'last'));
|
28
|
+
}
|
29
|
+
}
|
30
|
+
if (i === linesArray.length - 1 && hasLeafs) {
|
31
|
+
//starting vertical line if node has leafs
|
32
|
+
dividers.push(_jsx(Divider, { modifiers: { first: true }, left: FIRST_PADDING + LEVEL_PADDING * i }, 'first'));
|
33
|
+
}
|
34
|
+
if (linesArray[i]) {
|
35
|
+
//vertical line indicating level
|
36
|
+
dividers.push(_jsx(Divider, { left: FIRST_PADDING + LEVEL_PADDING * (i - 1) }, i));
|
37
|
+
}
|
38
|
+
}
|
39
|
+
return dividers;
|
40
|
+
}
|
41
|
+
export function OperationCell({ row, depth = 0, params }) {
|
42
|
+
const { name, operationParams, lines = '' } = params;
|
43
|
+
const hasLeafs = row.getLeafRows().length > 0;
|
44
|
+
const dividers = React.useMemo(() => getDividers(lines, hasLeafs), [lines, hasLeafs]);
|
45
|
+
return (_jsxs("div", { style: {
|
46
|
+
paddingLeft: LEVEL_PADDING * depth,
|
47
|
+
}, className: block('operation-name'), children: [dividers, _jsxs(Flex, { gap: 1, alignItems: "flex-start", className: block('operation-content'), children: [row.getCanExpand() && (_jsx(Button, { view: "flat", size: "xs", onClick: row.getToggleExpandedHandler(), children: _jsx(Button.Icon, { children: _jsx(ArrowToggle, { direction: row.getIsExpanded() ? 'bottom' : 'right', size: 14 }) }) })), _jsx("div", { className: block('operation-name-content'), children: _jsxs("div", { children: [name, "\u00A0", _jsx(OperationParams, { params: operationParams })] }) })] })] }));
|
48
|
+
}
|
package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationParams.d.ts
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { SimlifiedPlanOperatorOtherParams } from '../../../../../../types/api/query';
|
2
|
+
interface OperationParamsProps {
|
3
|
+
params?: SimlifiedPlanOperatorOtherParams;
|
4
|
+
}
|
5
|
+
export declare function OperationParams({ params }: OperationParamsProps): import("react/jsx-runtime").JSX.Element | null;
|
6
|
+
export {};
|
package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationParams.js
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { block } from './utils';
|
3
|
+
const operatorPropertyToColor = {
|
4
|
+
Table: 'var(--g-color-text-info)',
|
5
|
+
Predicate: 'var(--g-color-text-positive)',
|
6
|
+
Condition: 'var(--g-color-text-utility)',
|
7
|
+
};
|
8
|
+
function getOperatorPropertyColor(property) {
|
9
|
+
if (property in operatorPropertyToColor) {
|
10
|
+
return operatorPropertyToColor[property];
|
11
|
+
}
|
12
|
+
return 'var(--g-color-text-secondary)';
|
13
|
+
}
|
14
|
+
function prepareValue(value) {
|
15
|
+
if (value === undefined) {
|
16
|
+
return '';
|
17
|
+
}
|
18
|
+
if (typeof value === 'object') {
|
19
|
+
return JSON.stringify(value);
|
20
|
+
}
|
21
|
+
else {
|
22
|
+
return value.toString();
|
23
|
+
}
|
24
|
+
}
|
25
|
+
function reorderParamsEntries(params) {
|
26
|
+
const reordered = [];
|
27
|
+
const { Table, Predicate, Condition, ...rest } = params;
|
28
|
+
if (Table) {
|
29
|
+
reordered.push(['Table', Table]);
|
30
|
+
}
|
31
|
+
if (Predicate) {
|
32
|
+
reordered.push(['Predicate', Predicate]);
|
33
|
+
}
|
34
|
+
if (Condition) {
|
35
|
+
reordered.push(['Condition', Condition]);
|
36
|
+
}
|
37
|
+
return reordered.concat(Object.entries(rest));
|
38
|
+
}
|
39
|
+
function getOperationParams(params = {}) {
|
40
|
+
const result = [];
|
41
|
+
const paramsEntries = Object.entries(params);
|
42
|
+
if (paramsEntries.length === 1) {
|
43
|
+
const value = paramsEntries[0][1];
|
44
|
+
const color = getOperatorPropertyColor(paramsEntries[0][0]);
|
45
|
+
// if there is only one param, display value without key
|
46
|
+
result.push(_jsx("span", { style: { color }, children: prepareValue(value) }, "param"));
|
47
|
+
}
|
48
|
+
else {
|
49
|
+
const reorderedParamsEntries = reorderParamsEntries(params);
|
50
|
+
for (let i = 0; i < reorderedParamsEntries.length; i++) {
|
51
|
+
const [key, value] = reorderedParamsEntries[i];
|
52
|
+
const color = getOperatorPropertyColor(key);
|
53
|
+
if (i > 0) {
|
54
|
+
result.push(', ');
|
55
|
+
}
|
56
|
+
result.push(_jsxs("span", { style: { color }, children: [key, ": ", prepareValue(value)] }, i));
|
57
|
+
}
|
58
|
+
}
|
59
|
+
return result;
|
60
|
+
}
|
61
|
+
export function OperationParams({ params }) {
|
62
|
+
if (!params) {
|
63
|
+
return null;
|
64
|
+
}
|
65
|
+
return _jsxs("span", { className: block('operation-params'), children: ["(", getOperationParams(params), ")"] });
|
66
|
+
}
|
package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/SimplifiedPlan.d.ts
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
import type { SimplifiedPlanItem } from '../../../../../../store/reducers/explainQuery/types';
|
2
|
+
import './SimplifiedPlan.scss';
|
3
|
+
interface SimplifiedPlanProps {
|
4
|
+
plan: SimplifiedPlanItem[];
|
5
|
+
}
|
6
|
+
export declare function SimplifiedPlan({ plan }: SimplifiedPlanProps): import("react/jsx-runtime").JSX.Element;
|
7
|
+
export {};
|
package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/SimplifiedPlan.js
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import React from 'react';
|
3
|
+
import { Table, useTable } from '@gravity-ui/table';
|
4
|
+
import { configuredNumeral } from '../../../../../../utils/numeral';
|
5
|
+
import { formatToMs } from '../../../../../../utils/timeParsers';
|
6
|
+
import { toExponential } from '../../../../../../utils/utils';
|
7
|
+
import { MetricsCell } from './MetricsCell';
|
8
|
+
import { OperationCell } from './OperationCell';
|
9
|
+
import { block, getExtendedTreeNodes, getTreeNodesCoordinates } from './utils';
|
10
|
+
import './SimplifiedPlan.scss';
|
11
|
+
function nameAccessorFn(row) {
|
12
|
+
return { name: row.name, operationParams: row.operationParams, lines: row.lines };
|
13
|
+
}
|
14
|
+
function metricsCell(info) {
|
15
|
+
const formatter = (value) => value < 1e8 ? configuredNumeral(value).format() : toExponential(value, 1);
|
16
|
+
return _jsx(MetricsCell, { value: info.getValue(), formatter: formatter });
|
17
|
+
}
|
18
|
+
function cpuCell(info) {
|
19
|
+
const formatter = (value) => formatToMs(Math.round(value));
|
20
|
+
return _jsx(MetricsCell, { value: info.getValue(), formatter: formatter });
|
21
|
+
}
|
22
|
+
function ColumnHeader({ name }) {
|
23
|
+
return _jsx("div", { className: block('table-header-content'), children: name });
|
24
|
+
}
|
25
|
+
const columns = [
|
26
|
+
{
|
27
|
+
accessorKey: 'name',
|
28
|
+
accessorFn: nameAccessorFn,
|
29
|
+
header: () => _jsx(ColumnHeader, { name: "Operation" }),
|
30
|
+
size: 600,
|
31
|
+
cell: (info) => (_jsx(OperationCell, { row: info.row, depth: info.row.depth, params: info.getValue() })),
|
32
|
+
},
|
33
|
+
{
|
34
|
+
accessorKey: 'aCpu',
|
35
|
+
header: () => _jsx(ColumnHeader, { name: "A-Cpu" }),
|
36
|
+
size: 90,
|
37
|
+
minSize: 100,
|
38
|
+
cell: cpuCell,
|
39
|
+
meta: { align: 'right', verticalAlign: 'top' },
|
40
|
+
},
|
41
|
+
{
|
42
|
+
accessorKey: 'aRows',
|
43
|
+
header: () => _jsx(ColumnHeader, { name: "A-Rows" }),
|
44
|
+
size: 90,
|
45
|
+
minSize: 100,
|
46
|
+
cell: metricsCell,
|
47
|
+
meta: { align: 'right', verticalAlign: 'top' },
|
48
|
+
},
|
49
|
+
{
|
50
|
+
accessorKey: 'eCost',
|
51
|
+
header: () => _jsx(ColumnHeader, { name: "E-Cost" }),
|
52
|
+
size: 90,
|
53
|
+
minSize: 100,
|
54
|
+
cell: metricsCell,
|
55
|
+
meta: { align: 'right', verticalAlign: 'top' },
|
56
|
+
},
|
57
|
+
{
|
58
|
+
accessorKey: 'eRows',
|
59
|
+
header: () => _jsx(ColumnHeader, { name: "E-Rows" }),
|
60
|
+
size: 90,
|
61
|
+
minSize: 100,
|
62
|
+
cell: metricsCell,
|
63
|
+
meta: { align: 'right', verticalAlign: 'top' },
|
64
|
+
},
|
65
|
+
{
|
66
|
+
accessorKey: 'eSize',
|
67
|
+
header: () => _jsx(ColumnHeader, { name: "E-Size" }),
|
68
|
+
size: 90,
|
69
|
+
minSize: 100,
|
70
|
+
cell: metricsCell,
|
71
|
+
meta: { align: 'right', verticalAlign: 'top' },
|
72
|
+
},
|
73
|
+
];
|
74
|
+
export function SimplifiedPlan({ plan }) {
|
75
|
+
const planWithLinesInfo = React.useMemo(() => getExtendedTreeNodes(plan), [plan]);
|
76
|
+
const [expanded, setExpanded] = React.useState(() => {
|
77
|
+
const coordinates = getTreeNodesCoordinates(plan);
|
78
|
+
return Object.fromEntries(coordinates.map((id) => [id, true]));
|
79
|
+
});
|
80
|
+
const table = useTable({
|
81
|
+
columns,
|
82
|
+
data: planWithLinesInfo,
|
83
|
+
getSubRows: (item) => item.children,
|
84
|
+
enableExpanding: true,
|
85
|
+
onExpandedChange: setExpanded,
|
86
|
+
state: {
|
87
|
+
expanded,
|
88
|
+
},
|
89
|
+
});
|
90
|
+
return (_jsx("div", { className: block(), children: _jsx(Table, { table: table, headerCellClassName: ({ column }) => {
|
91
|
+
var _a;
|
92
|
+
const align = (_a = column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.align;
|
93
|
+
return block('table-header-cell', { align });
|
94
|
+
}, cellClassName: (cell) => {
|
95
|
+
var _a, _b;
|
96
|
+
const align = (_a = cell === null || cell === void 0 ? void 0 : cell.column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.align;
|
97
|
+
const verticalAlign = (_b = cell === null || cell === void 0 ? void 0 : cell.column.columnDef.meta) === null || _b === void 0 ? void 0 : _b.verticalAlign;
|
98
|
+
return block('table-cell', { align, 'vertical-align': verticalAlign });
|
99
|
+
}, className: block('table'), stickyHeader: true }) }));
|
100
|
+
}
|
package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/SimplifiedPlan.scss
ADDED
@@ -0,0 +1,128 @@
|
|
1
|
+
@import '../../../../../../styles/mixins.scss';
|
2
|
+
|
3
|
+
.ydb-query-explain-simplified-plan {
|
4
|
+
$block: &;
|
5
|
+
overflow: auto;
|
6
|
+
|
7
|
+
height: 100%;
|
8
|
+
padding: 0 0 15px;
|
9
|
+
&__table {
|
10
|
+
width: 100%;
|
11
|
+
max-width: 100%;
|
12
|
+
|
13
|
+
table-layout: fixed;
|
14
|
+
border-spacing: 0px;
|
15
|
+
border-collapse: collapse;
|
16
|
+
tr {
|
17
|
+
&:hover {
|
18
|
+
background-color: var(--g-color-base-generic-hover) !important;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
tr:nth-of-type(2n + 1) {
|
22
|
+
background-color: var(--g-color-base-generic-ultralight);
|
23
|
+
}
|
24
|
+
}
|
25
|
+
&__name {
|
26
|
+
display: flex;
|
27
|
+
align-items: center;
|
28
|
+
gap: var(--g-spacing-1);
|
29
|
+
|
30
|
+
max-width: 100%;
|
31
|
+
}
|
32
|
+
&__table-header-cell {
|
33
|
+
height: 40px;
|
34
|
+
padding: 0;
|
35
|
+
|
36
|
+
text-align: left;
|
37
|
+
|
38
|
+
background-color: var(--g-color-base-background);
|
39
|
+
@include text-subheader-2();
|
40
|
+
&_align_right {
|
41
|
+
text-align: right;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
&__table-header-content {
|
45
|
+
height: 100%;
|
46
|
+
padding: 0 var(--g-spacing-2);
|
47
|
+
|
48
|
+
line-height: 40px;
|
49
|
+
|
50
|
+
border-bottom: 1px solid var(--g-color-line-generic);
|
51
|
+
}
|
52
|
+
&__metrics-cell {
|
53
|
+
padding: var(--g-spacing-1) var(--g-spacing-2);
|
54
|
+
}
|
55
|
+
&__table-cell {
|
56
|
+
height: 30px;
|
57
|
+
padding: 0;
|
58
|
+
@include text-body-2();
|
59
|
+
&_align_right {
|
60
|
+
text-align: right;
|
61
|
+
}
|
62
|
+
&_vertical-align_top {
|
63
|
+
vertical-align: top;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
&__operation-params {
|
67
|
+
color: var(--g-color-text-secondary);
|
68
|
+
}
|
69
|
+
&__operation-name {
|
70
|
+
position: relative;
|
71
|
+
|
72
|
+
max-width: 100%;
|
73
|
+
height: 100%;
|
74
|
+
}
|
75
|
+
|
76
|
+
&__divider {
|
77
|
+
position: absolute;
|
78
|
+
bottom: 0;
|
79
|
+
|
80
|
+
width: 12px;
|
81
|
+
height: 100%;
|
82
|
+
|
83
|
+
box-shadow: 1px 0 0 0 var(--g-color-line-generic) inset;
|
84
|
+
|
85
|
+
&_last {
|
86
|
+
top: 0;
|
87
|
+
bottom: unset;
|
88
|
+
|
89
|
+
width: 12px;
|
90
|
+
height: 14px;
|
91
|
+
|
92
|
+
border-radius: 0 0 0 1px;
|
93
|
+
box-shadow: 1px -1px 0 0 var(--g-color-line-generic) inset;
|
94
|
+
}
|
95
|
+
&_horizontal {
|
96
|
+
top: 0;
|
97
|
+
bottom: unset;
|
98
|
+
|
99
|
+
width: 12px;
|
100
|
+
height: 14px;
|
101
|
+
|
102
|
+
box-shadow: 0 -1px 0 0 var(--g-color-line-generic) inset;
|
103
|
+
}
|
104
|
+
&_first {
|
105
|
+
height: calc(100% - 24px);
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
109
|
+
&__operation-content {
|
110
|
+
align-items: baseline;
|
111
|
+
|
112
|
+
max-width: 100%;
|
113
|
+
height: 100%;
|
114
|
+
padding: var(--g-spacing-1) 0;
|
115
|
+
|
116
|
+
word-break: break-word;
|
117
|
+
}
|
118
|
+
|
119
|
+
&__operation-name-content {
|
120
|
+
display: flex;
|
121
|
+
flex-grow: 1;
|
122
|
+
|
123
|
+
height: 100%;
|
124
|
+
}
|
125
|
+
.gt-table__cell_id_name {
|
126
|
+
border: unset;
|
127
|
+
}
|
128
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { SimplifiedPlanItem } from '../../../../../../store/reducers/explainQuery/types';
|
2
|
+
import type { ExtendedSimplifiesPlanItem } from './types';
|
3
|
+
export declare const block: import("@bem-react/classname").ClassNameFormatter;
|
4
|
+
export declare function getTreeNodesCoordinates(items?: SimplifiedPlanItem[], prefix?: string): string[];
|
5
|
+
export declare function getExtendedTreeNodes(items?: SimplifiedPlanItem[], prefix?: string): ExtendedSimplifiesPlanItem[];
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import { cn } from '../../../../../../utils/cn';
|
2
|
+
export const block = cn('ydb-query-explain-simplified-plan');
|
3
|
+
export function getTreeNodesCoordinates(items, prefix = '') {
|
4
|
+
const result = [];
|
5
|
+
const stack = [];
|
6
|
+
if (items) {
|
7
|
+
stack.push({ items, prefix });
|
8
|
+
}
|
9
|
+
while (stack.length > 0) {
|
10
|
+
const { items, prefix } = stack.pop();
|
11
|
+
items === null || items === void 0 ? void 0 : items.forEach((item, index) => {
|
12
|
+
let newPrefix = `${prefix}.${index}`;
|
13
|
+
if (!prefix) {
|
14
|
+
newPrefix = String(index);
|
15
|
+
}
|
16
|
+
result.push(newPrefix);
|
17
|
+
if (item.children) {
|
18
|
+
stack.push({ items: item.children, prefix: newPrefix });
|
19
|
+
}
|
20
|
+
});
|
21
|
+
}
|
22
|
+
return result;
|
23
|
+
}
|
24
|
+
export function getExtendedTreeNodes(items, prefix = '') {
|
25
|
+
if (!items) {
|
26
|
+
return [];
|
27
|
+
}
|
28
|
+
const stack = [{ items, prefix, parentIndex: -1, parentArray: [] }];
|
29
|
+
const newItems = [];
|
30
|
+
while (stack.length > 0) {
|
31
|
+
const { items, prefix, parentIndex, parentArray } = stack.pop();
|
32
|
+
const localItems = [];
|
33
|
+
for (let i = 0; i < items.length; i++) {
|
34
|
+
const newItem = { ...items[i] };
|
35
|
+
const line = i < items.length - 1 ? 1 : 0;
|
36
|
+
let newPrefix = `${prefix}.${line}`;
|
37
|
+
if (!prefix) {
|
38
|
+
newPrefix = String(line);
|
39
|
+
}
|
40
|
+
newItem['lines'] = newPrefix;
|
41
|
+
localItems.push(newItem);
|
42
|
+
if (newItem.children) {
|
43
|
+
stack.push({
|
44
|
+
items: newItem.children,
|
45
|
+
prefix: newPrefix,
|
46
|
+
parentIndex: i,
|
47
|
+
parentArray: localItems,
|
48
|
+
});
|
49
|
+
}
|
50
|
+
}
|
51
|
+
if (parentIndex === -1) {
|
52
|
+
newItems.push(...localItems);
|
53
|
+
}
|
54
|
+
else {
|
55
|
+
parentArray[parentIndex].children = localItems;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
return newItems;
|
59
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { QueryPlan, ScriptPlan } from '../../../../../../types/api/query';
|
2
|
+
import './TextExplain.scss';
|
3
|
+
import 'react-json-inspector/json-inspector.css';
|
4
|
+
interface TextExplainProps {
|
5
|
+
explain: QueryPlan | ScriptPlan;
|
6
|
+
}
|
7
|
+
export declare function TextExplain({ explain }: TextExplainProps): import("react/jsx-runtime").JSX.Element;
|
8
|
+
export {};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import JSONTree from 'react-json-inspector';
|
3
|
+
import { cn } from '../../../../../../utils/cn';
|
4
|
+
import './TextExplain.scss';
|
5
|
+
import 'react-json-inspector/json-inspector.css';
|
6
|
+
const b = cn('ydb-query-explain-text');
|
7
|
+
export function TextExplain({ explain }) {
|
8
|
+
return (_jsx(JSONTree, { data: explain, isExpanded: () => true, className: b('inspector'), searchOptions: {
|
9
|
+
debounceTime: 300,
|
10
|
+
} }));
|
11
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
{
|
2
|
+
"description.empty-result": "There is no {{activeOption}} for the request",
|
3
|
+
"description.graph-is-not-supported": "Graph can not be rendered",
|
4
|
+
"action.schema": "Schema",
|
5
|
+
"action.explain-plan": "Explain Plan",
|
6
|
+
"action.json": "JSON",
|
7
|
+
"action.ast": "AST"
|
8
|
+
}
|