ydb-embedded-ui 6.17.2 → 6.19.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/icons/decommission.svg +6 -0
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.d.ts +3 -2
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js +10 -16
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js.map +1 -1
- package/dist/components/ComponentsProvider/ComponentsProvider.d.ts +2 -2
- package/dist/components/CriticalActionDialog/CriticalActionDialog.d.ts +4 -2
- package/dist/components/CriticalActionDialog/CriticalActionDialog.js +7 -4
- package/dist/components/CriticalActionDialog/CriticalActionDialog.js.map +1 -1
- package/dist/components/CriticalActionDialog/CriticalActionDialog.scss +23 -1
- package/dist/components/CriticalActionDialog/utils.d.ts +5 -0
- package/dist/components/CriticalActionDialog/utils.js +4 -0
- package/dist/components/CriticalActionDialog/utils.js.map +1 -0
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.scss +5 -3
- package/dist/components/EntityPageTitle/EntityPageTitle.d.ts +1 -2
- package/dist/components/EntityPageTitle/EntityPageTitle.js +2 -2
- package/dist/components/EntityPageTitle/EntityPageTitle.js.map +1 -1
- package/dist/components/GroupInfo/GroupInfo.js +3 -3
- package/dist/components/InfoViewerSkeleton/InfoViewerSkeleton.js +1 -1
- package/dist/components/InfoViewerSkeleton/InfoViewerSkeleton.js.map +1 -1
- package/dist/components/LinkWithIcon/LinkWithIcon.d.ts +2 -1
- package/dist/components/LinkWithIcon/LinkWithIcon.js +3 -3
- package/dist/components/LinkWithIcon/LinkWithIcon.js.map +1 -1
- package/dist/components/Loader/Loader.js +1 -1
- package/dist/components/Loader/Loader.js.map +1 -1
- package/dist/components/MetricChart/reducer.d.ts +2 -2
- package/dist/components/PDiskInfo/PDiskInfo.js +1 -7
- package/dist/components/PDiskInfo/PDiskInfo.js.map +1 -1
- package/dist/components/PDiskInfo/i18n/en.json +0 -1
- package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/PDiskPopup/PDiskPopup.js +3 -5
- package/dist/components/PDiskPopup/PDiskPopup.js.map +1 -1
- package/dist/components/PaginatedTable/PaginatedTable.d.ts +2 -1
- package/dist/components/PaginatedTable/PaginatedTable.js +2 -2
- package/dist/components/PaginatedTable/PaginatedTable.js.map +1 -1
- package/dist/components/PaginatedTable/PaginatedTable.scss +16 -14
- package/dist/components/PaginatedTable/ResizeablePaginatedTable.js +2 -1
- package/dist/components/PaginatedTable/ResizeablePaginatedTable.js.map +1 -1
- package/dist/components/PaginatedTable/TableChunk.js +12 -4
- package/dist/components/PaginatedTable/TableChunk.js.map +1 -1
- package/dist/components/PaginatedTable/TableHead.js +14 -10
- package/dist/components/PaginatedTable/TableHead.js.map +1 -1
- package/dist/components/PaginatedTable/TableRow.js +14 -6
- package/dist/components/PaginatedTable/TableRow.js.map +1 -1
- package/dist/components/PaginatedTable/types.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +1 -1
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/TableWithControlsLayout/TableWithControlsLayout.scss +5 -0
- package/dist/components/VDisk/VDisk.d.ts +6 -3
- package/dist/components/VDisk/VDisk.js +6 -4
- package/dist/components/VDisk/VDisk.js.map +1 -1
- package/dist/components/VDisk/VDiskWithDonorsStack.d.ts +3 -5
- package/dist/components/VDisk/VDiskWithDonorsStack.js +4 -4
- package/dist/components/VDisk/VDiskWithDonorsStack.js.map +1 -1
- package/dist/components/VDiskPopup/VDiskPopup.js +1 -1
- package/dist/components/VDiskPopup/VDiskPopup.js.map +1 -1
- package/dist/containers/AppWithClusters/ExtendedNode/ExtendedNode.js +4 -2
- package/dist/containers/AppWithClusters/ExtendedNode/ExtendedNode.js.map +1 -1
- package/dist/containers/AppWithClusters/ExtendedTenant/ExtendedTenant.js +4 -3
- package/dist/containers/AppWithClusters/ExtendedTenant/ExtendedTenant.js.map +1 -1
- package/dist/containers/AppWithClusters/useClusterData.d.ts +7 -1
- package/dist/containers/AppWithClusters/useClusterData.js +8 -8
- package/dist/containers/AppWithClusters/useClusterData.js.map +1 -1
- package/dist/containers/AsideNavigation/AsideNavigation.d.ts +3 -0
- package/dist/containers/AsideNavigation/AsideNavigation.js +6 -10
- package/dist/containers/AsideNavigation/AsideNavigation.js.map +1 -1
- package/dist/containers/AsideNavigation/Navigation.js +4 -1
- package/dist/containers/AsideNavigation/Navigation.js.map +1 -1
- package/dist/containers/AsideNavigation/YdbInternalUser/YdbInternalUser.d.ts +3 -1
- package/dist/containers/AsideNavigation/YdbInternalUser/YdbInternalUser.js +2 -4
- package/dist/containers/AsideNavigation/YdbInternalUser/YdbInternalUser.js.map +1 -1
- package/dist/containers/Cluster/Cluster.js +5 -13
- package/dist/containers/Cluster/Cluster.js.map +1 -1
- package/dist/containers/Cluster/Cluster.scss +1 -0
- package/dist/containers/Header/Header.js +3 -7
- package/dist/containers/Header/Header.js.map +1 -1
- package/dist/containers/Node/Node.js +1 -5
- package/dist/containers/Node/Node.js.map +1 -1
- package/dist/containers/Node/NodePages.js +5 -4
- package/dist/containers/Node/NodePages.js.map +1 -1
- package/dist/containers/Node/NodeStructure/NodeStructure.js +9 -3
- package/dist/containers/Node/NodeStructure/NodeStructure.js.map +1 -1
- package/dist/containers/PDiskPage/DecommissionButton/DecommissionButton.d.ts +11 -0
- package/dist/containers/PDiskPage/DecommissionButton/DecommissionButton.js +91 -0
- package/dist/containers/PDiskPage/DecommissionButton/DecommissionButton.js.map +1 -0
- package/dist/containers/PDiskPage/DecommissionButton/DecommissionButton.scss +6 -0
- package/dist/containers/PDiskPage/DecommissionLabel/DecommissionLabel.d.ts +6 -0
- package/dist/containers/PDiskPage/DecommissionLabel/DecommissionLabel.js +20 -0
- package/dist/containers/PDiskPage/DecommissionLabel/DecommissionLabel.js.map +1 -0
- package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.js +19 -14
- package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.js.map +1 -1
- package/dist/containers/PDiskPage/PDiskGroups/utils.d.ts +2 -0
- package/dist/containers/PDiskPage/PDiskGroups/utils.js +14 -0
- package/dist/containers/PDiskPage/PDiskGroups/utils.js.map +1 -0
- package/dist/containers/PDiskPage/PDiskPage.js +33 -15
- package/dist/containers/PDiskPage/PDiskPage.js.map +1 -1
- package/dist/containers/PDiskPage/PDiskPage.scss +7 -0
- package/dist/containers/PDiskPage/i18n/en.json +16 -2
- package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/Disks/Disks.d.ts +9 -0
- package/dist/containers/Storage/Disks/Disks.js +37 -0
- package/dist/containers/Storage/Disks/Disks.js.map +1 -0
- package/dist/containers/Storage/Disks/Disks.scss +46 -0
- package/dist/containers/Storage/PDisk/PDisk.d.ts +6 -2
- package/dist/containers/Storage/PDisk/PDisk.js +14 -7
- package/dist/containers/Storage/PDisk/PDisk.js.map +1 -1
- package/dist/containers/Storage/PDisk/PDisk.scss +4 -2
- package/dist/containers/Storage/PaginatedStorage.js +1 -4
- package/dist/containers/Storage/PaginatedStorage.js.map +1 -1
- package/dist/containers/Storage/Storage.js +11 -13
- package/dist/containers/Storage/Storage.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/PaginatedStorageGroups.d.ts +1 -3
- package/dist/containers/Storage/StorageGroups/PaginatedStorageGroups.js +11 -7
- package/dist/containers/Storage/StorageGroups/PaginatedStorageGroups.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/StorageGroups.d.ts +1 -4
- package/dist/containers/Storage/StorageGroups/StorageGroups.js +4 -7
- package/dist/containers/Storage/StorageGroups/StorageGroups.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/{StorageGroups.scss → columns/StorageGroupsColumns.scss} +3 -2
- package/dist/containers/Storage/StorageGroups/columns/getStorageGroupsColumns.d.ts +21 -0
- package/dist/containers/Storage/StorageGroups/{getStorageGroupsColumns.js → columns/getStorageGroupsColumns.js} +47 -40
- package/dist/containers/Storage/StorageGroups/columns/getStorageGroupsColumns.js.map +1 -0
- package/dist/containers/Storage/StorageGroups/columns/hooks.d.ts +3 -0
- package/dist/containers/Storage/StorageGroups/columns/hooks.js +19 -0
- package/dist/containers/Storage/StorageGroups/columns/hooks.js.map +1 -0
- package/dist/containers/Storage/StorageGroups/columns/types.d.ts +14 -0
- package/dist/containers/Storage/StorageGroups/columns/types.js.map +1 -0
- package/dist/containers/Storage/StorageGroups/getGroups.d.ts +3 -1
- package/dist/containers/Storage/StorageGroups/getGroups.js +27 -24
- package/dist/containers/Storage/StorageGroups/getGroups.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/PaginatedStorageNodes.js +1 -1
- package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.d.ts +1 -1
- package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.js +1 -1
- package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.js.map +1 -1
- package/dist/containers/Storage/utils/index.js +3 -4
- package/dist/containers/Storage/utils/index.js.map +1 -1
- package/dist/containers/Tablet/Tablet.js +13 -11
- package/dist/containers/Tablet/Tablet.js.map +1 -1
- package/dist/containers/Tablet/components/TabletControls/TabletControls.js +1 -1
- package/dist/containers/Tablet/components/TabletControls/TabletControls.js.map +1 -1
- package/dist/containers/Tablet/i18n/en.json +6 -3
- package/dist/containers/Tablet/i18n/index.d.ts +1 -1
- package/dist/containers/Tablets/Tablets.js +1 -1
- package/dist/containers/Tablets/Tablets.js.map +1 -1
- package/dist/containers/Tablets/i18n/en.json +2 -1
- package/dist/containers/Tablets/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Configs/Configs.d.ts +6 -0
- package/dist/containers/Tenant/Diagnostics/Configs/Configs.js +79 -0
- package/dist/containers/Tenant/Diagnostics/Configs/Configs.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/Configs/Configs.scss +8 -0
- package/dist/containers/Tenant/Diagnostics/Configs/i18n/en.json +11 -0
- package/dist/containers/Tenant/Diagnostics/Configs/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Diagnostics/Configs/i18n/index.js +5 -0
- package/dist/containers/Tenant/Diagnostics/Configs/i18n/index.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js +4 -0
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +3 -0
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +5 -0
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +22 -5
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/utils.d.ts +2 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/utils.js +7 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/utils.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +1 -1
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js.map +1 -1
- package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.js +8 -3
- package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.js.map +1 -1
- package/dist/containers/Tenant/Query/CancelQueryButton/CancelQueryButton.d.ts +7 -0
- package/dist/containers/Tenant/Query/CancelQueryButton/CancelQueryButton.js +17 -0
- package/dist/containers/Tenant/Query/CancelQueryButton/CancelQueryButton.js.map +1 -0
- package/dist/containers/Tenant/Query/CancelQueryButton/CancelQueryButton.scss +9 -0
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.d.ts +5 -9
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +8 -6
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js.map +1 -1
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.scss +0 -6
- package/dist/containers/Tenant/Query/ExecuteResult/TraceButton.d.ts +5 -0
- package/dist/containers/Tenant/Query/ExecuteResult/TraceButton.js +28 -0
- package/dist/containers/Tenant/Query/ExecuteResult/TraceButton.js.map +1 -0
- package/dist/containers/Tenant/Query/ExecuteResult/i18n/en.json +2 -2
- package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.d.ts +4 -12
- package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +7 -5
- package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js.map +1 -1
- package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.scss +0 -6
- package/dist/containers/Tenant/Query/ExplainResult/i18n/en.json +1 -2
- package/dist/containers/Tenant/Query/ExplainResult/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Query/Query.js +14 -2
- package/dist/containers/Tenant/Query/Query.js.map +1 -1
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +3 -2
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +18 -36
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js.map +1 -1
- package/dist/containers/Tenant/Query/i18n/en.json +1 -0
- package/dist/containers/Tenant/Query/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Query/utils/__test__/replaceParams.test.d.ts +1 -0
- package/dist/containers/Tenant/Query/utils/__test__/replaceParams.test.js +50 -0
- package/dist/containers/Tenant/Query/utils/__test__/replaceParams.test.js.map +1 -0
- package/dist/containers/Tenant/Query/utils/replaceParams.d.ts +1 -0
- package/dist/containers/Tenant/Query/utils/replaceParams.js +6 -0
- package/dist/containers/Tenant/Query/utils/replaceParams.js.map +1 -0
- package/dist/containers/Tenant/utils/queryTemplates.js +1 -1
- package/dist/containers/Tenant/utils/queryTemplates.js.map +1 -1
- package/dist/containers/UserSettings/i18n/en.json +2 -0
- package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
- package/dist/containers/UserSettings/settings.d.ts +1 -0
- package/dist/containers/UserSettings/settings.js +12 -2
- package/dist/containers/UserSettings/settings.js.map +1 -1
- package/dist/containers/VDiskPage/VDiskPage.d.ts +3 -4
- package/dist/containers/VDiskPage/VDiskPage.js +37 -17
- package/dist/containers/VDiskPage/VDiskPage.js.map +1 -1
- package/dist/containers/VDiskPage/i18n/en.json +2 -1
- package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
- package/dist/containers/VDiskPage/utils.d.ts +2 -0
- package/dist/containers/VDiskPage/utils.js +7 -0
- package/dist/containers/VDiskPage/utils.js.map +1 -0
- package/dist/lib.d.ts +1 -0
- package/dist/lib.js +1 -0
- package/dist/lib.js.map +1 -1
- package/dist/services/api.d.ts +27 -11
- package/dist/services/api.js +110 -21
- package/dist/services/api.js.map +1 -1
- package/dist/services/parsers/parseMetaCluster.d.ts +14 -0
- package/dist/services/parsers/parseMetaCluster.js +20 -1
- package/dist/services/parsers/parseMetaCluster.js.map +1 -1
- package/dist/services/settings.d.ts +1 -0
- package/dist/services/settings.js +2 -1
- package/dist/services/settings.js.map +1 -1
- package/dist/store/configureStore.d.ts +4 -4
- package/dist/store/defaultStore.d.ts +2 -2
- package/dist/store/getUrlData.js +9 -6
- package/dist/store/getUrlData.js.map +1 -1
- package/dist/store/reducers/api.d.ts +1 -1
- package/dist/store/reducers/api.js +1 -1
- package/dist/store/reducers/api.js.map +1 -1
- package/dist/store/reducers/authentication/authentication.d.ts +4 -4
- package/dist/store/reducers/cancelQuery.d.ts +2 -2
- package/dist/store/reducers/cancelQuery.js.map +1 -1
- package/dist/store/reducers/capabilities/capabilities.d.ts +6 -6
- package/dist/store/reducers/capabilities/hooks.d.ts +2 -0
- package/dist/store/reducers/capabilities/hooks.js +8 -1
- package/dist/store/reducers/capabilities/hooks.js.map +1 -1
- package/dist/store/reducers/cluster/cluster.d.ts +230 -2
- package/dist/store/reducers/cluster/cluster.js +36 -3
- package/dist/store/reducers/cluster/cluster.js.map +1 -1
- package/dist/store/reducers/cluster/utils.d.ts +1 -0
- package/dist/store/reducers/cluster/utils.js +7 -0
- package/dist/store/reducers/cluster/utils.js.map +1 -1
- package/dist/store/reducers/clusters/clusters.d.ts +2 -2
- package/dist/store/reducers/describe.d.ts +2 -2
- package/dist/store/reducers/executeQuery.d.ts +8 -4
- package/dist/store/reducers/executeQuery.js +36 -1
- package/dist/store/reducers/executeQuery.js.map +1 -1
- package/dist/store/reducers/executeTopQueries/executeTopQueries.d.ts +2 -2
- package/dist/store/reducers/explainQuery/explainQuery.d.ts +2 -3
- package/dist/store/reducers/explainQuery/explainQuery.js +23 -2
- package/dist/store/reducers/explainQuery/explainQuery.js.map +1 -1
- package/dist/store/reducers/explainQuery/types.d.ts +1 -0
- package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +58 -58
- package/dist/store/reducers/heatmap.d.ts +2 -2
- package/dist/store/reducers/hotKeys/hotKeys.d.ts +2 -2
- package/dist/store/reducers/index.d.ts +3 -3
- package/dist/store/reducers/network/network.d.ts +2 -2
- package/dist/store/reducers/node/node.d.ts +3 -3
- package/dist/store/reducers/node/selectors.d.ts +1 -1
- package/dist/store/reducers/nodes/nodes.d.ts +3 -3
- package/dist/store/reducers/nodes/nodes.js +1 -2
- package/dist/store/reducers/nodes/nodes.js.map +1 -1
- package/dist/store/reducers/nodesList.d.ts +3 -3
- package/dist/store/reducers/overview/overview.d.ts +2 -2
- package/dist/store/reducers/partitions/partitions.d.ts +2 -2
- package/dist/store/reducers/pdisk/pdisk.d.ts +2 -3
- package/dist/store/reducers/pdisk/pdisk.js +1 -21
- package/dist/store/reducers/pdisk/pdisk.js.map +1 -1
- package/dist/store/reducers/pdisk/utils.d.ts +0 -3
- package/dist/store/reducers/pdisk/utils.js +0 -22
- package/dist/store/reducers/pdisk/utils.js.map +1 -1
- package/dist/store/reducers/preview.d.ts +2 -2
- package/dist/store/reducers/schema/schema.d.ts +3 -3
- package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +2 -2
- package/dist/store/reducers/shardsWorkload/shardsWorkload.d.ts +2 -2
- package/dist/store/reducers/storage/requestStorageData.d.ts +5 -0
- package/dist/store/reducers/storage/requestStorageData.js +12 -0
- package/dist/store/reducers/storage/requestStorageData.js.map +1 -0
- package/dist/store/reducers/storage/selectors.js +1 -1
- package/dist/store/reducers/storage/storage.d.ts +6 -4
- package/dist/store/reducers/storage/storage.js +6 -6
- package/dist/store/reducers/storage/storage.js.map +1 -1
- package/dist/store/reducers/storage/types.d.ts +11 -23
- package/dist/store/reducers/storage/utils.d.ts +3 -2
- package/dist/store/reducers/storage/utils.js +52 -26
- package/dist/store/reducers/storage/utils.js.map +1 -1
- package/dist/store/reducers/tableData.d.ts +1 -1
- package/dist/store/reducers/tablet.d.ts +7 -7
- package/dist/store/reducers/tablets.d.ts +13 -13
- package/dist/store/reducers/tenant/constants.d.ts +1 -0
- package/dist/store/reducers/tenant/constants.js +1 -0
- package/dist/store/reducers/tenant/constants.js.map +1 -1
- package/dist/store/reducers/tenant/tenant.d.ts +5 -2
- package/dist/store/reducers/tenant/tenant.js +12 -0
- package/dist/store/reducers/tenant/tenant.js.map +1 -1
- package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.d.ts +2 -2
- 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/tenants/selectors.d.ts +27 -27
- package/dist/store/reducers/tenants/tenants.d.ts +2 -2
- package/dist/store/reducers/topic.d.ts +44 -44
- package/dist/store/reducers/trace.d.ts +7 -0
- package/dist/store/reducers/trace.js +18 -0
- package/dist/store/reducers/trace.js.map +1 -0
- package/dist/store/reducers/vdisk/utils.d.ts +0 -2
- package/dist/store/reducers/vdisk/utils.js +0 -10
- package/dist/store/reducers/vdisk/utils.js.map +1 -1
- package/dist/store/reducers/vdisk/vdisk.d.ts +8 -5
- package/dist/store/reducers/vdisk/vdisk.js +17 -32
- package/dist/store/reducers/vdisk/vdisk.js.map +1 -1
- package/dist/store/reducers/viewSchema/viewSchema.d.ts +2 -2
- package/dist/types/api/capabilities.d.ts +1 -1
- package/dist/types/api/cluster.d.ts +3 -0
- package/dist/types/api/compute.d.ts +1 -4
- package/dist/types/api/compute.js +1 -5
- package/dist/types/api/compute.js.map +1 -1
- package/dist/types/api/featureFlags.d.ts +13 -0
- package/dist/types/api/featureFlags.js +2 -0
- package/dist/types/api/featureFlags.js.map +1 -0
- package/dist/types/api/meta.d.ts +5 -1
- package/dist/types/api/modifyDisk.d.ts +1 -0
- package/dist/types/api/pdisk.d.ts +2 -2
- package/dist/types/api/query.d.ts +7 -1
- package/dist/types/api/storage.d.ts +132 -6
- package/dist/types/api/storage.js +1 -5
- package/dist/types/api/storage.js.map +1 -1
- package/dist/types/api/trace.d.ts +17 -0
- package/dist/types/api/trace.js +8 -0
- package/dist/types/api/trace.js.map +1 -0
- package/dist/types/api/vdisk.d.ts +1 -1
- package/dist/types/store/executeQuery.d.ts +25 -3
- package/dist/types/store/executeQuery.js +5 -1
- package/dist/types/store/executeQuery.js.map +1 -1
- package/dist/types/store/query.d.ts +1 -0
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/constants.js +1 -0
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/disks/helpers.d.ts +5 -2
- package/dist/utils/disks/helpers.js +12 -2
- package/dist/utils/disks/helpers.js.map +1 -1
- package/dist/utils/disks/prepareDisks.js +10 -5
- package/dist/utils/disks/prepareDisks.js.map +1 -1
- package/dist/utils/hooks/useDelayed.d.ts +1 -1
- package/dist/utils/hooks/useDelayed.js +6 -1
- package/dist/utils/hooks/useDelayed.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/monaco/yql/generateSuggestions.js +8 -3
- package/dist/utils/monaco/yql/generateSuggestions.js.map +1 -1
- package/dist/utils/query.js.map +1 -1
- package/dist/utils/storage.d.ts +2 -21
- package/dist/utils/storage.js +14 -19
- package/dist/utils/storage.js.map +1 -1
- package/package.json +1 -6
- package/dist/components/CriticalActionDialog/index.d.ts +0 -1
- package/dist/components/CriticalActionDialog/index.js +0 -2
- package/dist/components/CriticalActionDialog/index.js.map +0 -1
- package/dist/components/NotRenderUntilFirstVisible/NotRenderUntilFirstVisible.d.ts +0 -9
- package/dist/components/NotRenderUntilFirstVisible/NotRenderUntilFirstVisible.js +0 -9
- package/dist/components/NotRenderUntilFirstVisible/NotRenderUntilFirstVisible.js.map +0 -1
- package/dist/components/NotRenderUntilFirstVisible/NotRenderUntilFirstVisible.scss +0 -3
- package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.d.ts +0 -62
- package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js.map +0 -1
- package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.d.ts +0 -4
- package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.js +0 -29
- package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.js.map +0 -1
- package/dist/store/reducers/tenantOverview/topStorageGroups/types.d.ts +0 -4
- package/dist/store/reducers/tenantOverview/topStorageGroups/types.js.map +0 -1
- package/dist/store/reducers/tenantOverview/topStorageGroups/utils.d.ts +0 -3
- package/dist/store/reducers/tenantOverview/topStorageGroups/utils.js +0 -13
- package/dist/store/reducers/tenantOverview/topStorageGroups/utils.js.map +0 -1
- /package/dist/{store/reducers/tenantOverview/topStorageGroups → containers/Storage/StorageGroups/columns}/types.js +0 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import React from 'react';
|
3
|
+
import { StopFill } from '@gravity-ui/icons';
|
4
|
+
import { Button, Icon } from '@gravity-ui/uikit';
|
5
|
+
import { cancelQueryApi } from '../../../../store/reducers/cancelQuery';
|
6
|
+
import { cn } from '../../../../utils/cn';
|
7
|
+
import i18n from '../i18n';
|
8
|
+
import './CancelQueryButton.scss';
|
9
|
+
const b = cn('cancel-query-button');
|
10
|
+
export function CancelQueryButton({ queryId, tenantName }) {
|
11
|
+
const [sendCancelQuery, cancelQueryResponse] = cancelQueryApi.useCancelQueryMutation();
|
12
|
+
const onStopButtonClick = React.useCallback(() => {
|
13
|
+
sendCancelQuery({ queryId, database: tenantName });
|
14
|
+
}, [queryId, sendCancelQuery, tenantName]);
|
15
|
+
return (_jsxs(Button, { loading: cancelQueryResponse.isLoading, onClick: onStopButtonClick, className: b('stop-button', { error: Boolean(cancelQueryResponse.error) }), children: [_jsx(Icon, { data: StopFill, size: 16 }), i18n('action.stop')] }));
|
16
|
+
}
|
17
|
+
//# sourceMappingURL=CancelQueryButton.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CancelQueryButton.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/CancelQueryButton/CancelQueryButton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAC,MAAM,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAC,cAAc,EAAC,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAC,EAAE,EAAC,MAAM,sBAAsB,CAAC;AACxC,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,0BAA0B,CAAC;AAElC,MAAM,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,CAAC;AAOpC,MAAM,UAAU,iBAAiB,CAAC,EAAC,OAAO,EAAE,UAAU,EAAyB;IAC3E,MAAM,CAAC,eAAe,EAAE,mBAAmB,CAAC,GAAG,cAAc,CAAC,sBAAsB,EAAE,CAAC;IAEvF,MAAM,iBAAiB,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QAC7C,eAAe,CAAC,EAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAC,CAAC,CAAC;IACrD,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC;IAE3C,OAAO,CACH,MAAC,MAAM,IACH,OAAO,EAAE,mBAAmB,CAAC,SAAS,EACtC,OAAO,EAAE,iBAAiB,EAC1B,SAAS,EAAE,CAAC,CAAC,aAAa,EAAE,EAAC,KAAK,EAAE,OAAO,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAC,CAAC,aAExE,KAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,GAAI,EACjC,IAAI,CAAC,aAAa,CAAC,IACf,CACZ,CAAC;AACN,CAAC"}
|
@@ -1,16 +1,12 @@
|
|
1
|
-
import type {
|
1
|
+
import type { ExecuteQueryResult } from '../../../../types/store/executeQuery';
|
2
2
|
import './ExecuteResult.scss';
|
3
3
|
interface ExecuteResultProps {
|
4
|
-
|
5
|
-
error: unknown;
|
6
|
-
cancelError: unknown;
|
4
|
+
result: ExecuteQueryResult;
|
7
5
|
isResultsCollapsed?: boolean;
|
6
|
+
theme?: string;
|
7
|
+
tenantName: string;
|
8
8
|
onCollapseResults: VoidFunction;
|
9
9
|
onExpandResults: VoidFunction;
|
10
|
-
onStopButtonClick: VoidFunction;
|
11
|
-
theme?: string;
|
12
|
-
loading?: boolean;
|
13
|
-
cancelQueryLoading?: boolean;
|
14
10
|
}
|
15
|
-
export declare function ExecuteResult({
|
11
|
+
export declare function ExecuteResult({ result, isResultsCollapsed, theme, tenantName, onCollapseResults, onExpandResults, }: ExecuteResultProps): import("react/jsx-runtime").JSX.Element;
|
16
12
|
export {};
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import React from 'react';
|
3
|
-
import {
|
4
|
-
import { Button, Icon, RadioButton, Tabs } from '@gravity-ui/uikit';
|
3
|
+
import { RadioButton, Tabs } from '@gravity-ui/uikit';
|
5
4
|
import JSONTree from 'react-json-inspector';
|
6
5
|
import { ClipboardButton } from '../../../../components/ClipboardButton';
|
7
6
|
import Divider from '../../../../components/Divider/Divider';
|
@@ -19,12 +18,14 @@ import { getStringifiedData } from '../../../../utils/dataFormatters/dataFormatt
|
|
19
18
|
import { useTypedDispatch } from '../../../../utils/hooks';
|
20
19
|
import { parseQueryError } from '../../../../utils/query';
|
21
20
|
import { PaneVisibilityToggleButtons } from '../../utils/paneVisibilityToggleHelpers';
|
21
|
+
import { CancelQueryButton } from '../CancelQueryButton/CancelQueryButton';
|
22
22
|
import { SimplifiedPlan } from '../ExplainResult/components/SimplifiedPlan/SimplifiedPlan';
|
23
23
|
import { ResultIssues } from '../Issues/Issues';
|
24
24
|
import { QueryDuration } from '../QueryDuration/QueryDuration';
|
25
25
|
import { QuerySettingsBanner } from '../QuerySettingsBanner/QuerySettingsBanner';
|
26
26
|
import { getPreparedResult } from '../utils/getPreparedResult';
|
27
27
|
import { isQueryCancelledError } from '../utils/isQueryCancelledError';
|
28
|
+
import { TraceButton } from './TraceButton';
|
28
29
|
import i18n from './i18n';
|
29
30
|
import { getPlan } from './utils';
|
30
31
|
import './ExecuteResult.scss';
|
@@ -35,11 +36,12 @@ const resultOptionsIds = {
|
|
35
36
|
schema: 'schema',
|
36
37
|
simplified: 'simplified',
|
37
38
|
};
|
38
|
-
export function ExecuteResult({
|
39
|
+
export function ExecuteResult({ result, isResultsCollapsed, theme, tenantName, onCollapseResults, onExpandResults, }) {
|
39
40
|
var _a, _b, _c;
|
40
41
|
const [selectedResultSet, setSelectedResultSet] = React.useState(0);
|
41
42
|
const [activeSection, setActiveSection] = React.useState(resultOptionsIds.result);
|
42
43
|
const dispatch = useTypedDispatch();
|
44
|
+
const { error, isLoading, queryId, data } = result;
|
43
45
|
const stats = data === null || data === void 0 ? void 0 : data.stats;
|
44
46
|
const resultsSetsCount = (_a = data === null || data === void 0 ? void 0 : data.resultSets) === null || _a === void 0 ? void 0 : _a.length;
|
45
47
|
const isMulti = resultsSetsCount && resultsSetsCount > 0;
|
@@ -68,8 +70,8 @@ export function ExecuteResult({ data, error, cancelError, isResultsCollapsed, on
|
|
68
70
|
const onSelectSection = (value) => {
|
69
71
|
setActiveSection(value);
|
70
72
|
};
|
71
|
-
const renderResultTable = (
|
72
|
-
return _jsx(QueryResultTable, { data:
|
73
|
+
const renderResultTable = (resultSet, columns) => {
|
74
|
+
return _jsx(QueryResultTable, { data: resultSet, columns: columns, settings: { sortable: false } });
|
73
75
|
};
|
74
76
|
const renderResult = () => {
|
75
77
|
return (_jsxs("div", { className: b('result-wrapper'), children: [isMulti && resultsSetsCount > 1 && (_jsx("div", { children: _jsx(Tabs, { className: b('result-tabs'), size: "l", items: getArray(resultsSetsCount).map((item) => ({
|
@@ -145,6 +147,6 @@ export function ExecuteResult({ data, error, cancelError, isResultsCollapsed, on
|
|
145
147
|
}
|
146
148
|
return null;
|
147
149
|
};
|
148
|
-
return (_jsxs(React.Fragment, { children: [_jsxs("div", { className: b('controls'), children: [_jsxs("div", { className: b('controls-right'), children: [_jsx(QueryExecutionStatus, { error: error, loading:
|
150
|
+
return (_jsxs(React.Fragment, { children: [_jsxs("div", { className: b('controls'), children: [_jsxs("div", { className: b('controls-right'), children: [_jsx(QueryExecutionStatus, { error: error, loading: isLoading }), !error && !isLoading && (_jsxs(React.Fragment, { children: [(stats === null || stats === void 0 ? void 0 : stats.DurationUs) !== undefined && (_jsx(QueryDuration, { duration: Number(stats.DurationUs) })), resultOptions && activeSection && (_jsxs(React.Fragment, { children: [_jsx(Divider, {}), _jsx(RadioButton, { options: resultOptions, value: activeSection, onUpdate: onSelectSection })] }))] })), isLoading ? (_jsxs(React.Fragment, { children: [_jsx(ElapsedTime, { className: b('elapsed-time') }), _jsx(CancelQueryButton, { queryId: queryId, tenantName: tenantName })] })) : null, (data === null || data === void 0 ? void 0 : data.traceId) ? _jsx(TraceButton, { traceId: data.traceId }) : null] }), _jsxs("div", { className: b('controls-left'), children: [renderClipboardButton(), _jsx(EnableFullscreenButton, {}), _jsx(PaneVisibilityToggleButtons, { onCollapse: onCollapseResults, onExpand: onExpandResults, isCollapsed: isResultsCollapsed, initialDirection: "bottom" })] })] }), isLoading || isQueryCancelledError(error) ? null : _jsx(QuerySettingsBanner, {}), _jsx(LoaderWrapper, { loading: isLoading, children: _jsx(Fullscreen, { children: renderResultSection() }) })] }));
|
149
151
|
}
|
150
152
|
//# sourceMappingURL=ExecuteResult.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ExecuteResult.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/ExecuteResult/ExecuteResult.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"ExecuteResult.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/ExecuteResult/ExecuteResult.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAC,WAAW,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAC;AACpD,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAE5C,OAAO,EAAC,eAAe,EAAC,MAAM,wCAAwC,CAAC;AACvE,OAAO,OAAO,MAAM,wCAAwC,CAAC;AAC7D,OAAO,WAAW,MAAM,gDAAgD,CAAC;AACzE,OAAO,sBAAsB,MAAM,sEAAsE,CAAC;AAC1G,OAAO,UAAU,MAAM,8CAA8C,CAAC;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAC,aAAa,EAAC,MAAM,oDAAoD,CAAC;AACjF,OAAO,EAAC,oBAAoB,EAAC,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAAC,gBAAgB,EAAC,MAAM,0DAA0D,CAAC;AAC1F,OAAO,EAAC,iBAAiB,EAAC,MAAM,uCAAuC,CAAC;AAIxE,OAAO,EAAC,QA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AI,CAC/B,MAAC,KAAK,CAAC,QAAQ,eACX,KAAC,OAAO,KAAG,EACX,KAAC,WAAW,IACR,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,aAAa,EACpB,QAAQ,EAAE,eAAe,GAC3B,IACW,CACpB,IACY,CACpB,EACA,SAAS,CAAC,CAAC,CAAC,CACT,MAAC,KAAK,CAAC,QAAQ,eACX,KAAC,WAAW,IAAC,SAAS,EAAE,CAAC,CAAC,cAAc,CAAC,GAAI,EAC7C,KAAC,iBAAiB,IAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,GAAI,IAClD,CACpB,CAAC,CAAC,CAAC,IAAI,EACP,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,EAAC,CAAC,CAAC,KAAC,WAAW,IAAC,OAAO,EAAE,IAAI,CAAC,OAAO,GAAI,CAAC,CAAC,CAAC,IAAI,IAC5D,EACN,eAAK,SAAS,EAAE,CAAC,CAAC,eAAe,CAAC,aAC7B,qBAAqB,EAAE,EACxB,KAAC,sBAAsB,KAAG,EAC1B,KAAC,2BAA2B,IACxB,UAAU,EAAE,iBAAiB,EAC7B,QAAQ,EAAE,eAAe,EACzB,WAAW,EAAE,kBAAkB,EAC/B,gBAAgB,EAAC,QAAQ,GAC3B,IACA,IACJ,EACL,SAAS,IAAI,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAC,mBAAmB,KAAG,EAC3E,KAAC,aAAa,IAAC,OAAO,EAAE,SAAS,YAC7B,KAAC,UAAU,cAAE,mBAAmB,EAAE,GAAc,GACpC,IACH,CACpB,CAAC;AACN,CAAC"}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import React from 'react';
|
3
|
+
import { ArrowUpRightFromSquare } from '@gravity-ui/icons';
|
4
|
+
import { Button } from '@gravity-ui/uikit';
|
5
|
+
import { useClusterBaseInfo } from '../../../../store/reducers/cluster/cluster';
|
6
|
+
import { traceApi } from '../../../../store/reducers/trace';
|
7
|
+
import { SECOND_IN_MS } from '../../../../utils/constants';
|
8
|
+
import { useDelayed } from '../../../../utils/hooks/useDelayed';
|
9
|
+
import { replaceParams } from '../utils/replaceParams';
|
10
|
+
import i18n from './i18n';
|
11
|
+
const TIME_BEFORE_CHECK = 15 * SECOND_IN_MS;
|
12
|
+
export function TraceButton({ traceId }) {
|
13
|
+
const { traceCheck, traceView } = useClusterBaseInfo();
|
14
|
+
const checkTraceUrl = (traceCheck === null || traceCheck === void 0 ? void 0 : traceCheck.url) ? replaceParams(traceCheck.url, { traceId }) : '';
|
15
|
+
const traceUrl = (traceView === null || traceView === void 0 ? void 0 : traceView.url) ? replaceParams(traceView.url, { traceId }) : '';
|
16
|
+
// We won't get any trace data at first 15 seconds for sure
|
17
|
+
const [readyToFetch, resetDelay] = useDelayed(TIME_BEFORE_CHECK);
|
18
|
+
React.useEffect(() => {
|
19
|
+
resetDelay();
|
20
|
+
}, [traceId, resetDelay]);
|
21
|
+
const { isFetching } = traceApi.useCheckTraceQuery({ url: checkTraceUrl }, { skip: !checkTraceUrl || !readyToFetch });
|
22
|
+
if (!traceUrl) {
|
23
|
+
return null;
|
24
|
+
}
|
25
|
+
const loading = !readyToFetch || isFetching;
|
26
|
+
return (_jsxs(Button, { view: loading ? 'flat-secondary' : 'flat-info', loading: loading, href: traceUrl, target: "_blank", children: [i18n('trace'), _jsx(Button.Icon, { children: _jsx(ArrowUpRightFromSquare, {}) })] }));
|
27
|
+
}
|
28
|
+
//# sourceMappingURL=TraceButton.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TraceButton.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/ExecuteResult/TraceButton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,sBAAsB,EAAC,MAAM,mBAAmB,CA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,CAAC,aAAa,IAAI,CAAC,YAAY,EAAC,CAC1C,CAAC;IAEF,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,OAAO,GAAG,CAAC,YAAY,IAAI,UAAU,CAAC;IAC5C,OAAO,CACH,MAAC,MAAM,IACH,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,WAAW,EAC9C,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,QAAQ,EACd,MAAM,EAAC,QAAQ,aAEd,IAAI,CAAC,OAAO,CAAC,EACd,KAAC,MAAM,CAAC,IAAI,cACR,KAAC,sBAAsB,KAAG,GAChB,IACT,CACZ,CAAC;AACN,CAAC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: (key: "description.graph-is-not-supported" | "action.result" | "action.stats" | "action.schema" | "action.
|
1
|
+
declare const _default: (key: "trace" | "description.graph-is-not-supported" | "action.result" | "action.stats" | "action.schema" | "action.explain-plan" | "action.copy", params?: import("@gravity-ui/i18n").Params) => string;
|
2
2
|
export default _default;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import type { PreparedExplainResponse } from '../../../../store/reducers/explainQuery/types';
|
2
1
|
import type { ValueOf } from '../../../../types/common';
|
2
|
+
import type { ExplainQueryResult } from '../../../../types/store/executeQuery';
|
3
3
|
import './ExplainResult.scss';
|
4
4
|
declare const EXPLAIN_OPTIONS_IDS: {
|
5
5
|
readonly schema: "schema";
|
@@ -10,19 +10,11 @@ declare const EXPLAIN_OPTIONS_IDS: {
|
|
10
10
|
export type QueryExplainTab = ValueOf<typeof EXPLAIN_OPTIONS_IDS>;
|
11
11
|
interface ExplainResultProps {
|
12
12
|
theme: string;
|
13
|
-
|
14
|
-
|
15
|
-
};
|
16
|
-
simplifiedPlan?: PreparedExplainResponse['simplifiedPlan'];
|
17
|
-
ast?: string;
|
18
|
-
loading?: boolean;
|
19
|
-
cancelQueryLoading?: boolean;
|
13
|
+
result: ExplainQueryResult;
|
14
|
+
tenantName: string;
|
20
15
|
isResultsCollapsed?: boolean;
|
21
|
-
error: unknown;
|
22
|
-
cancelError: unknown;
|
23
16
|
onCollapseResults: VoidFunction;
|
24
17
|
onExpandResults: VoidFunction;
|
25
|
-
onStopButtonClick: VoidFunction;
|
26
18
|
}
|
27
|
-
export declare function ExplainResult({
|
19
|
+
export declare function ExplainResult({ theme, result, tenantName, onCollapseResults, onExpandResults, isResultsCollapsed, }: ExplainResultProps): import("react/jsx-runtime").JSX.Element;
|
28
20
|
export {};
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import React from 'react';
|
3
|
-
import {
|
4
|
-
import { Button, Icon, RadioButton } from '@gravity-ui/uikit';
|
3
|
+
import { RadioButton } from '@gravity-ui/uikit';
|
5
4
|
import { ClipboardButton } from '../../../../components/ClipboardButton';
|
6
5
|
import Divider from '../../../../components/Divider/Divider';
|
7
6
|
import ElapsedTime from '../../../../components/ElapsedTime/ElapsedTime';
|
@@ -15,6 +14,7 @@ import { getStringifiedData } from '../../../../utils/dataFormatters/dataFormatt
|
|
15
14
|
import { useTypedDispatch } from '../../../../utils/hooks';
|
16
15
|
import { parseQueryErrorToString } from '../../../../utils/query';
|
17
16
|
import { PaneVisibilityToggleButtons } from '../../utils/paneVisibilityToggleHelpers';
|
17
|
+
import { CancelQueryButton } from '../CancelQueryButton/CancelQueryButton';
|
18
18
|
import { QueryDuration } from '../QueryDuration/QueryDuration';
|
19
19
|
import { QuerySettingsBanner } from '../QuerySettingsBanner/QuerySettingsBanner';
|
20
20
|
import { isQueryCancelledError } from '../utils/isQueryCancelledError';
|
@@ -46,10 +46,12 @@ const explainOptions = [
|
|
46
46
|
{ value: EXPLAIN_OPTIONS_IDS.json, content: EXPLAIN_OPTIONS_NAMES[EXPLAIN_OPTIONS_IDS.json] },
|
47
47
|
{ value: EXPLAIN_OPTIONS_IDS.ast, content: EXPLAIN_OPTIONS_NAMES[EXPLAIN_OPTIONS_IDS.ast] },
|
48
48
|
];
|
49
|
-
export function ExplainResult({
|
49
|
+
export function ExplainResult({ theme, result, tenantName, onCollapseResults, onExpandResults, isResultsCollapsed, }) {
|
50
50
|
const dispatch = useTypedDispatch();
|
51
51
|
const [activeOption, setActiveOption] = React.useState(EXPLAIN_OPTIONS_IDS.schema);
|
52
52
|
const [isPending, startTransition] = React.useTransition();
|
53
|
+
const { error, isLoading, queryId } = result;
|
54
|
+
const { plan: explain, ast, simplifiedPlan } = result.data || {};
|
53
55
|
React.useEffect(() => {
|
54
56
|
return () => {
|
55
57
|
dispatch(disableFullscreen());
|
@@ -112,8 +114,8 @@ export function ExplainResult({ explain, ast, theme, error, cancelError, loading
|
|
112
114
|
};
|
113
115
|
const statsToCopy = getStatsToCopy();
|
114
116
|
const copyText = getStringifiedData(statsToCopy);
|
115
|
-
return (_jsxs(React.Fragment, { children: [_jsxs("div", { className: b('controls'), children: [_jsxs("div", { className: b('controls-right'), children: [_jsx(QueryExecutionStatus, { error: error, loading:
|
117
|
+
return (_jsxs(React.Fragment, { children: [_jsxs("div", { className: b('controls'), children: [_jsxs("div", { className: b('controls-right'), children: [_jsx(QueryExecutionStatus, { error: error, loading: isLoading }), !error && !isLoading && (_jsxs(React.Fragment, { children: [(explain === null || explain === void 0 ? void 0 : explain.DurationUs) !== undefined && (_jsx(QueryDuration, { duration: explain.DurationUs })), _jsxs(React.Fragment, { children: [_jsx(Divider, {}), _jsx(RadioButton, { options: explainOptions, value: activeOption, onUpdate: (tabId) => {
|
116
118
|
startTransition(() => setActiveOption(tabId));
|
117
|
-
} })] })] })),
|
119
|
+
} })] })] })), isLoading ? (_jsxs(React.Fragment, { children: [_jsx(ElapsedTime, { className: b('elapsed-time') }), _jsx(CancelQueryButton, { queryId: queryId, tenantName: tenantName })] })) : null] }), _jsxs("div", { className: b('controls-left'), children: [copyText && (_jsx(ClipboardButton, { text: copyText, view: "flat-secondary", title: i18n('action.copy', { activeOption }) })), _jsx(EnableFullscreenButton, { disabled: Boolean(error) }), _jsx(PaneVisibilityToggleButtons, { onCollapse: onCollapseResults, onExpand: onExpandResults, isCollapsed: isResultsCollapsed, initialDirection: "bottom" })] })] }), isLoading || isQueryCancelledError(error) ? null : _jsx(QuerySettingsBanner, {}), _jsx(LoaderWrapper, { loading: isLoading || isPending, children: _jsx(Fullscreen, { className: b('result'), children: renderContent() }) })] }));
|
118
120
|
}
|
119
121
|
//# sourceMappingURL=ExplainResult.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ExplainResult.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/ExplainResult/ExplainResult.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,
|
1
|
+
{"version":3,"file":"ExplainResult.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/ExplainResult/ExplainResult.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAC,eAAe,EAAC,MAAM,wCAAwC,CAAC;AACvE,OAAO,OAAO,MAAM,wCAAwC,CAAC;AAC7D,OAAO,WAAW,MAAM,gDAAgD,CAAC;AACzE,OAAO,sBAAsB,MAAM,sEAAsE,CAAC;AAC1G,OAAO,UAAU,MAAM,8CAA8C,CAAC;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,oDAAoD,CAAC;AACjF,OAAO,EAAC,oBAAoB,EAAC,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAAC,iBAAiB,EAAC,MAAM,uCAAuC,CAAC;AAGxE,OAAO,EAAC,EAAE,EAAC,MAAM,sBAAsB,CAAC;AACxC,OAAO,EAAC,kBAAkB,EAAC,MAAM,iDAAiD,CAAC;AACnF,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,C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(key: "description.graph-is-not-supported" | "action.schema" | "action.
|
1
|
+
declare const _default: (key: "description.graph-is-not-supported" | "action.schema" | "action.explain-plan" | "action.copy" | "description.empty-result" | "action.json" | "action.ast", params?: import("@gravity-ui/i18n").Params) => string;
|
2
2
|
export default _default;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import React from 'react';
|
3
3
|
import { Helmet } from 'react-helmet-async';
|
4
|
-
import NotRenderUntilFirstVisible from '../../../components/NotRenderUntilFirstVisible/NotRenderUntilFirstVisible';
|
5
4
|
import { changeUserInput } from '../../../store/reducers/executeQuery';
|
6
5
|
import { TENANT_QUERY_TABS_ID } from '../../../store/reducers/tenant/constants';
|
7
6
|
import { cn } from '../../../utils/cn';
|
@@ -20,7 +19,20 @@ export const Query = (props) => {
|
|
20
19
|
};
|
21
20
|
const activeTab = React.useMemo(() => queryEditorTabs.find(({ id }) => id === queryTab), [queryTab]);
|
22
21
|
const renderContent = () => {
|
23
|
-
|
22
|
+
switch (queryTab) {
|
23
|
+
case TENANT_QUERY_TABS_ID.newQuery: {
|
24
|
+
return _jsx(QueryEditor, { changeUserInput: handleUserInputChange, ...props });
|
25
|
+
}
|
26
|
+
case TENANT_QUERY_TABS_ID.history: {
|
27
|
+
return _jsx(QueriesHistory, { changeUserInput: handleUserInputChange });
|
28
|
+
}
|
29
|
+
case TENANT_QUERY_TABS_ID.saved: {
|
30
|
+
return _jsx(SavedQueries, { changeUserInput: handleUserInputChange });
|
31
|
+
}
|
32
|
+
default: {
|
33
|
+
return null;
|
34
|
+
}
|
35
|
+
}
|
24
36
|
};
|
25
37
|
return (_jsxs("div", { className: b(), children: [activeTab ? (_jsx(Helmet, { children: _jsx("title", { children: activeTab.title }) })) : null, _jsx(QueryTabs, { className: b('tabs'), activeTab: queryTab }), _jsx("div", { className: b('content'), children: renderContent() })] }));
|
26
38
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Query.js","sourceRoot":"","sources":["../../../../src/containers/Tenant/Query/Query.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAE1C,OAAO,
|
1
|
+
{"version":3,"file":"Query.js","sourceRoot":"","sources":["../../../../src/containers/Tenant/Query/Query.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAE1C,OAAO,EAAC,eAAe,EAAC,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAC,oBAAoB,EAAC,MAAM,0CAA0C,CAAC;AAE9E,OAAO,EAAC,EAAE,EAAC,MAAM,mBAAmB,CAAC;AACrC,OAAO,EAAC,gBAAgB,EAAE,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAExE,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAC,SAAS,EAAE,eAAe,EAAC,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAC,YAAY,EAAC,MAAM,6BAA6B,CAAC;AAEzD,OAAO,cAAc,CAAC;AAEtB,MAAM,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC;AAS1B,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,KAAiB,EAAE,EAAE;IACvC,MAAM,QAAQ,GAAG,gBAAgB,EAAE,CAAC;IAEpC,MAAM,EAAC,QAAQ,GAAG,oBAAoB,CAAC,QAAQ,EAAC,GAAG,gBAAgB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAE7F,MAAM,qBAAqB,GAAG,CAAC,KAAsB,EAAE,EAAE;QACrD,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;IACrC,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAC3B,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAE,CAAC,EAAE,KAAK,QAAQ,CAAC,EACrD,CAAC,QAAQ,CAAC,CACb,CAAC;IAEF,MAAM,aAAa,GAAG,GAAG,EAAE;QACvB,QAAQ,QAAQ,EAAE,CAAC;YACf,KAAK,oBAAoB,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACjC,OAAO,KAAC,WAAW,IAAC,eAAe,EAAE,qBAAqB,KAAM,KAAK,GAAI,CAAC;YAC9E,CAAC;YACD,KAAK,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC;gBAChC,OAAO,KAAC,cAAc,IAAC,eAAe,EAAE,qBAAqB,GAAI,CAAC;YACtE,CAAC;YACD,KAAK,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC;gBAC9B,OAAO,KAAC,YAAY,IAAC,eAAe,EAAE,qBAAqB,GAAI,CAAC;YACpE,CAAC;YACD,OAAO,CAAC,CAAC,CAAC;gBACN,OAAO,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,CACH,eAAK,SAAS,EAAE,CAAC,EAAE,aACd,SAAS,CAAC,CAAC,CAAC,CACT,KAAC,MAAM,cACH,0BAAQ,SAAS,CAAC,KAAK,GAAS,GAC3B,CACZ,CAAC,CAAC,CAAC,IAAI,EACR,KAAC,SAAS,IAAC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,QAAQ,GAAI,EACxD,cAAK,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,YAAG,aAAa,EAAE,GAAO,IACnD,CACT,CAAC;AACN,CAAC,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { goToNextQuery, goToPreviousQuery, saveQueryToHistory, setTenantPath } from '../../../../store/reducers/executeQuery';
|
2
|
+
import { goToNextQuery, goToPreviousQuery, saveQueryToHistory, setQueryResult, setTenantPath } from '../../../../store/reducers/executeQuery';
|
3
3
|
import { setQueryAction } from '../../../../store/reducers/queryActions/queryActions';
|
4
4
|
import { setShowPreview } from '../../../../store/reducers/schema/schema';
|
5
5
|
import type { EPathType } from '../../../../types/api/schema';
|
@@ -15,6 +15,7 @@ interface QueryEditorProps {
|
|
15
15
|
goToPreviousQuery: (...args: Parameters<typeof goToPreviousQuery>) => void;
|
16
16
|
setTenantPath: (...args: Parameters<typeof setTenantPath>) => void;
|
17
17
|
setQueryAction: (...args: Parameters<typeof setQueryAction>) => void;
|
18
|
+
setQueryResult: (...args: Parameters<typeof setQueryResult>) => void;
|
18
19
|
executeQuery: ExecuteQueryState;
|
19
20
|
theme: string;
|
20
21
|
type?: EPathType;
|
@@ -24,9 +25,9 @@ interface QueryEditorProps {
|
|
24
25
|
}
|
25
26
|
declare function QueryEditor(props: QueryEditorProps): import("react/jsx-runtime").JSX.Element;
|
26
27
|
declare const _default: import("react-redux").ConnectedComponent<typeof QueryEditor, {
|
27
|
-
type?: EPathType;
|
28
28
|
theme: string;
|
29
29
|
path: string;
|
30
|
+
type?: EPathType;
|
30
31
|
tenantName: string;
|
31
32
|
changeUserInput: (arg: {
|
32
33
|
input: string;
|
@@ -6,12 +6,12 @@ import { connect } from 'react-redux';
|
|
6
6
|
import { v4 as uuidv4 } from 'uuid';
|
7
7
|
import { MonacoEditor } from '../../../../components/MonacoEditor/MonacoEditor';
|
8
8
|
import SplitPane from '../../../../components/SplitPane';
|
9
|
-
import { cancelQueryApi } from '../../../../store/reducers/cancelQuery';
|
10
9
|
import { useTracingLevelOptionAvailable } from '../../../../store/reducers/capabilities/hooks';
|
11
|
-
import { executeQueryApi, goToNextQuery, goToPreviousQuery, saveQueryToHistory, setTenantPath, } from '../../../../store/reducers/executeQuery';
|
10
|
+
import { executeQueryApi, goToNextQuery, goToPreviousQuery, saveQueryToHistory, setQueryResult, setTenantPath, } from '../../../../store/reducers/executeQuery';
|
12
11
|
import { explainQueryApi } from '../../../../store/reducers/explainQuery/explainQuery';
|
13
12
|
import { setQueryAction } from '../../../../store/reducers/queryActions/queryActions';
|
14
13
|
import { setShowPreview } from '../../../../store/reducers/schema/schema';
|
14
|
+
import { ResultType } from '../../../../types/store/executeQuery';
|
15
15
|
import { cn } from '../../../../utils/cn';
|
16
16
|
import { DEFAULT_IS_QUERY_RESULT_COLLAPSED, DEFAULT_SIZE_RESULT_PANE_KEY, LAST_USED_QUERY_ACTION_KEY, QUERY_USE_MULTI_SCHEMA_KEY, } from '../../../../utils/constants';
|
17
17
|
import { useEventHandler, useQueryExecutionSettings, useSetting } from '../../../../utils/hooks';
|
@@ -31,10 +31,6 @@ import { useEditorOptions } from './helpers';
|
|
31
31
|
import { getKeyBindings } from './keybindings';
|
32
32
|
import './QueryEditor.scss';
|
33
33
|
const CONTEXT_MENU_GROUP_ID = 'navigation';
|
34
|
-
const RESULT_TYPES = {
|
35
|
-
EXECUTE: 'execute',
|
36
|
-
EXPLAIN: 'explain',
|
37
|
-
};
|
38
34
|
const b = cn('query-editor');
|
39
35
|
const initialTenantCommonInfoState = {
|
40
36
|
triggerExpand: false,
|
@@ -42,29 +38,28 @@ const initialTenantCommonInfoState = {
|
|
42
38
|
collapsed: true,
|
43
39
|
};
|
44
40
|
function QueryEditor(props) {
|
45
|
-
var _a
|
41
|
+
var _a;
|
46
42
|
const editorOptions = useEditorOptions();
|
47
|
-
const { tenantName, path, setTenantPath: setPath, executeQuery, type, theme, changeUserInput, showPreview, } = props;
|
43
|
+
const { tenantName, path, setTenantPath: setPath, executeQuery, type, theme, changeUserInput, setQueryResult, showPreview, } = props;
|
48
44
|
const { tenantPath: savedPath } = executeQuery;
|
49
|
-
const
|
50
|
-
const [isResultLoaded, setIsResultLoaded] = React.useState(false);
|
45
|
+
const isResultLoaded = Boolean(executeQuery.result);
|
51
46
|
const [querySettings] = useQueryExecutionSettings();
|
52
47
|
const enableTracingLevel = useTracingLevelOptionAvailable();
|
53
48
|
const [lastQueryExecutionSettings, setLastQueryExecutionSettings] = useLastQueryExecutionSettings();
|
54
49
|
const { resetBanner } = useChangedQuerySettings();
|
55
50
|
const [useMultiSchema] = useSetting(QUERY_USE_MULTI_SCHEMA_KEY);
|
56
51
|
const [lastUsedQueryAction, setLastUsedQueryAction] = useSetting(LAST_USED_QUERY_ACTION_KEY);
|
57
|
-
const [sendExecuteQuery
|
58
|
-
const [sendExplainQuery
|
59
|
-
const [sendCancelQuery, cancelQueryResult] = cancelQueryApi.useCancelQueryMutation();
|
52
|
+
const [sendExecuteQuery] = executeQueryApi.useExecuteQueryMutation();
|
53
|
+
const [sendExplainQuery] = explainQueryApi.useExplainQueryMutation();
|
60
54
|
React.useEffect(() => {
|
61
55
|
if (savedPath !== tenantName) {
|
62
56
|
if (savedPath) {
|
63
57
|
changeUserInput({ input: '' });
|
58
|
+
setQueryResult();
|
64
59
|
}
|
65
60
|
setPath(tenantName);
|
66
61
|
}
|
67
|
-
}, [changeUserInput, setPath, tenantName, savedPath]);
|
62
|
+
}, [changeUserInput, setPath, setQueryResult, tenantName, savedPath]);
|
68
63
|
const [resultVisibilityState, dispatchResultVisibilityState] = React.useReducer(paneVisibilityToggleReducerCreator(DEFAULT_IS_QUERY_RESULT_COLLAPSED), initialTenantCommonInfoState);
|
69
64
|
React.useEffect(() => {
|
70
65
|
dispatchResultVisibilityState(PaneVisibilityActionTypes.triggerCollapse);
|
@@ -93,7 +88,6 @@ function QueryEditor(props) {
|
|
93
88
|
setLastQueryExecutionSettings(querySettings);
|
94
89
|
}
|
95
90
|
const queryId = uuidv4();
|
96
|
-
setResultType(RESULT_TYPES.EXECUTE);
|
97
91
|
sendExecuteQuery({
|
98
92
|
query,
|
99
93
|
database: tenantName,
|
@@ -102,9 +96,7 @@ function QueryEditor(props) {
|
|
102
96
|
enableTracingLevel,
|
103
97
|
queryId,
|
104
98
|
});
|
105
|
-
setIsResultLoaded(true);
|
106
99
|
props.setShowPreview(false);
|
107
|
-
cancelQueryResult.reset();
|
108
100
|
// Don't save partial queries in history
|
109
101
|
if (!text) {
|
110
102
|
const { queries, currentIndex } = history;
|
@@ -125,7 +117,6 @@ function QueryEditor(props) {
|
|
125
117
|
setLastQueryExecutionSettings(querySettings);
|
126
118
|
}
|
127
119
|
const queryId = uuidv4();
|
128
|
-
setResultType(RESULT_TYPES.EXPLAIN);
|
129
120
|
sendExplainQuery({
|
130
121
|
query: input,
|
131
122
|
database: tenantName,
|
@@ -133,19 +124,9 @@ function QueryEditor(props) {
|
|
133
124
|
enableTracingLevel,
|
134
125
|
queryId,
|
135
126
|
});
|
136
|
-
setIsResultLoaded(true);
|
137
127
|
props.setShowPreview(false);
|
138
|
-
cancelQueryResult.reset();
|
139
128
|
dispatchResultVisibilityState(PaneVisibilityActionTypes.triggerExpand);
|
140
129
|
});
|
141
|
-
const currentQueryId = executeQueryResult.isLoading
|
142
|
-
? (_a = executeQueryResult.originalArgs) === null || _a === void 0 ? void 0 : _a.queryId
|
143
|
-
: (_b = explainQueryResult.originalArgs) === null || _b === void 0 ? void 0 : _b.queryId;
|
144
|
-
const handleStopButtonClick = React.useCallback(() => {
|
145
|
-
if (currentQueryId) {
|
146
|
-
sendCancelQuery({ queryId: currentQueryId, database: tenantName });
|
147
|
-
}
|
148
|
-
}, [currentQueryId, sendCancelQuery, tenantName]);
|
149
130
|
const handleSendQuery = useEventHandler(() => {
|
150
131
|
if (lastUsedQueryAction === QUERY_ACTIONS.explain) {
|
151
132
|
handleGetExplainQueryClick();
|
@@ -243,11 +224,12 @@ function QueryEditor(props) {
|
|
243
224
|
dispatchResultVisibilityState(PaneVisibilityActionTypes.clear);
|
244
225
|
};
|
245
226
|
const renderControls = () => {
|
246
|
-
|
227
|
+
var _a;
|
228
|
+
return (_jsx(QueryEditorControls, { handleSendExecuteClick: handleSendExecuteClick, onSettingsButtonClick: handleSettingsClick, isLoading: Boolean((_a = executeQuery.result) === null || _a === void 0 ? void 0 : _a.isLoading), handleGetExplainQueryClick: handleGetExplainQueryClick, disabled: !executeQuery.input, highlightedAction: lastUsedQueryAction }));
|
247
229
|
};
|
248
230
|
return (_jsxs("div", { className: b(), children: [_jsxs(SplitPane, { direction: "vertical", defaultSizePaneKey: DEFAULT_SIZE_RESULT_PANE_KEY, triggerCollapse: resultVisibilityState.triggerCollapse, triggerExpand: resultVisibilityState.triggerExpand, minSize: [0, 52], collapsedSizes: [100, 0], onSplitStartDragAdditional: onSplitStartDragAdditional, children: [_jsxs("div", { className: b('pane-wrapper', {
|
249
231
|
top: true,
|
250
|
-
}), children: [_jsx("div", { className: b('monaco-wrapper'), children: _jsx("div", { className: b('monaco'), children: _jsx(MonacoEditor, { language: YQL_LANGUAGE_ID, value: executeQuery.input, options: editorOptions, onChange: onChange, editorDidMount: editorDidMount, theme: `vs-${theme}` }) }) }), renderControls()] }), _jsx("div", { className: b('pane-wrapper'), children: _jsx(Result, {
|
232
|
+
}), children: [_jsx("div", { className: b('monaco-wrapper'), children: _jsx("div", { className: b('monaco'), children: _jsx(MonacoEditor, { language: YQL_LANGUAGE_ID, value: executeQuery.input, options: editorOptions, onChange: onChange, editorDidMount: editorDidMount, theme: `vs-${theme}` }) }) }), renderControls()] }), _jsx("div", { className: b('pane-wrapper'), children: _jsx(Result, { resultVisibilityState: resultVisibilityState, onExpandResultHandler: onExpandResultHandler, onCollapseResultHandler: onCollapseResultHandler, type: type, theme: theme, result: executeQuery.result, tenantName: tenantName, path: path, showPreview: showPreview }, (_a = executeQuery.result) === null || _a === void 0 ? void 0 : _a.queryId) })] }), _jsx(SaveQueryDialog, {}), _jsx(QuerySettingsDialog, {})] }));
|
251
233
|
}
|
252
234
|
const mapStateToProps = (state) => {
|
253
235
|
return {
|
@@ -262,18 +244,18 @@ const mapDispatchToProps = {
|
|
262
244
|
setShowPreview,
|
263
245
|
setTenantPath,
|
264
246
|
setQueryAction,
|
247
|
+
setQueryResult,
|
265
248
|
};
|
266
249
|
export default connect(mapStateToProps, mapDispatchToProps)(QueryEditor);
|
267
|
-
function Result({
|
250
|
+
function Result({ resultVisibilityState, onExpandResultHandler, onCollapseResultHandler, type, theme, result, tenantName, path, showPreview, }) {
|
268
251
|
if (showPreview) {
|
269
252
|
return _jsx(Preview, { database: tenantName, path: path, type: type });
|
270
253
|
}
|
271
|
-
if (
|
272
|
-
return (_jsx(ExecuteResult, {
|
254
|
+
if ((result === null || result === void 0 ? void 0 : result.type) === ResultType.EXECUTE) {
|
255
|
+
return (_jsx(ExecuteResult, { result: result, isResultsCollapsed: resultVisibilityState.collapsed, onExpandResults: onExpandResultHandler, onCollapseResults: onCollapseResultHandler, theme: theme, tenantName: tenantName }));
|
273
256
|
}
|
274
|
-
if (
|
275
|
-
|
276
|
-
return (_jsx(ExplainResult, { error: explainQueryError, cancelError: cancelQueryError, explain: plan, simplifiedPlan: simplifiedPlan, ast: ast, loading: explainQueryLoading, cancelQueryLoading: cancelQueryLoading, theme: theme, isResultsCollapsed: resultVisibilityState.collapsed, onExpandResults: onExpandResultHandler, onCollapseResults: onCollapseResultHandler, onStopButtonClick: onStopButtonClick }));
|
257
|
+
if ((result === null || result === void 0 ? void 0 : result.type) === ResultType.EXPLAIN) {
|
258
|
+
return (_jsx(ExplainResult, { result: result, theme: theme, tenantName: tenantName, isResultsCollapsed: resultVisibilityState.collapsed, onExpandResults: onExpandResultHandler, onCollapseResults: onCollapseResultHandler }));
|
277
259
|
}
|
278
260
|
return null;
|
279
261
|
}
|