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
@@ -2,12 +2,7 @@ import type { TVDiskID, TVSlotId } from '../../types/api/vdisk';
|
|
2
2
|
import type { BytesSizes } from '../bytesParsers/formatBytes';
|
3
3
|
export declare const formatBytes: (bytes?: string | number) => string;
|
4
4
|
export declare const formatBps: (bytes?: string | number) => string;
|
5
|
-
export declare const formatBytesToGigabyte: (bytes: number | string) => string;
|
6
5
|
export declare const stringifyVdiskId: (id?: TVDiskID | TVSlotId) => string;
|
7
|
-
export declare const getPDiskId: (info: {
|
8
|
-
NodeId?: number;
|
9
|
-
PDiskId?: number;
|
10
|
-
}) => string | undefined;
|
11
6
|
export declare const formatUptime: (seconds: number) => string;
|
12
7
|
export declare const formatMsToUptime: (ms?: number) => string | 0 | undefined;
|
13
8
|
export declare const formatStorageValues: (value?: number, total?: number, size?: BytesSizes) => string[];
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { dateTimeParse } from '@gravity-ui/date-utils';
|
2
2
|
import { formatBytes as formatBytesCustom, getSizeWithSignificantDigits, } from '../bytesParsers/formatBytes';
|
3
|
-
import { DAY_IN_SECONDS,
|
3
|
+
import { DAY_IN_SECONDS, HOUR_IN_SECONDS } from '../constants';
|
4
4
|
import { configuredNumeral } from '../numeral';
|
5
5
|
import { isNumeric } from '../utils';
|
6
6
|
import i18n from './i18n';
|
@@ -20,15 +20,9 @@ export const formatBps = (bytes) => {
|
|
20
20
|
}
|
21
21
|
return formattedBytes + '/s';
|
22
22
|
};
|
23
|
-
export const formatBytesToGigabyte = (bytes) => {
|
24
|
-
return `${Math.floor(Number(bytes) / GIGABYTE)} GB`;
|
25
|
-
};
|
26
23
|
export const stringifyVdiskId = (id) => {
|
27
24
|
return id ? Object.values(id).join('-') : '';
|
28
25
|
};
|
29
|
-
export const getPDiskId = (info) => {
|
30
|
-
return info.NodeId && info.PDiskId ? `${info.NodeId}-${info.PDiskId}` : undefined;
|
31
|
-
};
|
32
26
|
export const formatUptime = (seconds) => {
|
33
27
|
const days = Math.floor(seconds / DAY_IN_SECONDS);
|
34
28
|
const remain = seconds % DAY_IN_SECONDS;
|
@@ -103,13 +97,10 @@ export const formatCPUWithLabel = (value) => {
|
|
103
97
|
const localizedCores = configuredNumeral(cores).format('0.[000]');
|
104
98
|
return `${localizedCores} ${i18n('format-cpu.cores', { count: cores })}`;
|
105
99
|
};
|
106
|
-
export const formatDateTime = (value, defaultValue = '
|
100
|
+
export const formatDateTime = (value, defaultValue = '') => {
|
107
101
|
var _a;
|
108
|
-
if (!isNumeric(value)) {
|
109
|
-
return '';
|
110
|
-
}
|
111
102
|
const formattedData = (_a = dateTimeParse(Number(value))) === null || _a === void 0 ? void 0 : _a.format('YYYY-MM-DD HH:mm');
|
112
|
-
return
|
103
|
+
return formattedData !== null && formattedData !== void 0 ? formattedData : defaultValue;
|
113
104
|
};
|
114
105
|
export const calcUptimeInSeconds = (milliseconds) => {
|
115
106
|
const currentDate = new Date();
|
@@ -9,4 +9,5 @@ interface VDiskDeveloperUILinkParams extends PDiskDeveloperUILinkParams {
|
|
9
9
|
vDiskSlotId: number | string;
|
10
10
|
}
|
11
11
|
export declare const createVDiskDeveloperUILink: ({ nodeId, pDiskId, vDiskSlotId, host, }: VDiskDeveloperUILinkParams) => string;
|
12
|
+
export declare function createTabletDeveloperUIHref(tabletId: number | string, host?: string | undefined): string;
|
12
13
|
export {};
|
@@ -18,3 +18,6 @@ export const createVDiskDeveloperUILink = ({ nodeId, pDiskId, vDiskSlotId, host,
|
|
18
18
|
const vdiskPath = 'actors/vdisks/vdisk' + pad9(pDiskId) + '_' + pad9(vDiskSlotId);
|
19
19
|
return createDeveloperUILinkWithNodeId(nodeId, host) + vdiskPath;
|
20
20
|
};
|
21
|
+
export function createTabletDeveloperUIHref(tabletId, host = backend) {
|
22
|
+
return `${host}/tablets?TabletID=${tabletId}`;
|
23
|
+
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { PDiskType } from './types';
|
2
2
|
export declare const PDISK_TYPES: {
|
3
|
-
HDD:
|
4
|
-
SSD:
|
5
|
-
MVME:
|
3
|
+
readonly HDD: "HDD";
|
4
|
+
readonly SSD: "SSD";
|
5
|
+
readonly MVME: "NVME";
|
6
6
|
};
|
7
7
|
export declare function getPDiskType(category?: string): PDiskType | undefined;
|
@@ -1,3 +1,4 @@
|
|
1
1
|
import type { TVDiskStateInfo, TVSlotId } from '../../types/api/vdisk';
|
2
2
|
export declare function isFullVDiskData(disk: TVDiskStateInfo | TVSlotId): disk is TVDiskStateInfo;
|
3
3
|
export declare function getSeverityColor(severity: number | undefined): import("../../types/api/enums").EFlag;
|
4
|
+
export declare function getPDiskId(nodeId: string | number, pDiskId: string | number): string;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import type { TPDiskStateInfo } from '../../types/api/pdisk';
|
1
|
+
import type { TPDiskInfo, TPDiskStateInfo } from '../../types/api/pdisk';
|
2
2
|
import type { TVDiskStateInfo } from '../../types/api/vdisk';
|
3
3
|
import type { PreparedPDisk, PreparedVDisk } from './types';
|
4
4
|
export declare function prepareVDiskData(vdiskState?: TVDiskStateInfo): PreparedVDisk;
|
5
|
-
export declare function preparePDiskData(pdiskState?: TPDiskStateInfo): PreparedPDisk;
|
5
|
+
export declare function preparePDiskData(pdiskState?: TPDiskStateInfo, bscPDiskInfo?: TPDiskInfo): PreparedPDisk;
|
@@ -1,14 +1,16 @@
|
|
1
|
-
import { isNumeric } from '../utils';
|
2
1
|
import { calculatePDiskSeverity } from './calculatePDiskSeverity';
|
3
2
|
import { calculateVDiskSeverity } from './calculateVDiskSeverity';
|
4
3
|
import { getPDiskType } from './getPDiskType';
|
5
4
|
export function prepareVDiskData(vdiskState = {}) {
|
6
|
-
var _a, _b;
|
5
|
+
var _a, _b, _c;
|
7
6
|
// Prepare PDisk only if it is present
|
8
7
|
const PDisk = vdiskState.PDisk ? preparePDiskData(vdiskState.PDisk) : undefined;
|
9
8
|
const PDiskId = (_a = vdiskState.PDiskId) !== null && _a !== void 0 ? _a : PDisk === null || PDisk === void 0 ? void 0 : PDisk.PDiskId;
|
10
|
-
const
|
11
|
-
const
|
9
|
+
const available = Number((_b = vdiskState.AvailableSize) !== null && _b !== void 0 ? _b : PDisk === null || PDisk === void 0 ? void 0 : PDisk.AvailableSize);
|
10
|
+
const allocated = Number(vdiskState.AllocatedSize);
|
11
|
+
const total = allocated + available;
|
12
|
+
const allocatedPercent = Math.round((allocated * 100) / total);
|
13
|
+
const Donors = (_c = vdiskState.Donors) === null || _c === void 0 ? void 0 : _c.map((donor) => {
|
12
14
|
return prepareVDiskData({ ...donor, DonorMode: true });
|
13
15
|
});
|
14
16
|
const Severity = calculateVDiskSeverity(vdiskState);
|
@@ -16,33 +18,26 @@ export function prepareVDiskData(vdiskState = {}) {
|
|
16
18
|
...vdiskState,
|
17
19
|
PDisk,
|
18
20
|
PDiskId,
|
19
|
-
AllocatedPercent,
|
20
21
|
Donors,
|
21
22
|
Severity,
|
23
|
+
TotalSize: total,
|
24
|
+
AllocatedPercent: allocatedPercent,
|
22
25
|
};
|
23
26
|
}
|
24
|
-
export function preparePDiskData(pdiskState = {}) {
|
27
|
+
export function preparePDiskData(pdiskState = {}, bscPDiskInfo = {}) {
|
25
28
|
const { AvailableSize, TotalSize, Category } = pdiskState;
|
26
29
|
const Type = getPDiskType(Category);
|
27
|
-
const
|
28
|
-
const
|
30
|
+
const available = Number(AvailableSize);
|
31
|
+
const total = Number(TotalSize);
|
32
|
+
const allocated = total - available;
|
33
|
+
const allocatedPercent = Math.round((allocated * 100) / total);
|
34
|
+
const Severity = calculatePDiskSeverity(pdiskState, allocatedPercent);
|
29
35
|
return {
|
36
|
+
...bscPDiskInfo,
|
30
37
|
...pdiskState,
|
31
38
|
Type,
|
32
|
-
AllocatedPercent,
|
33
39
|
Severity,
|
40
|
+
AllocatedSize: allocated,
|
41
|
+
AllocatedPercent: allocatedPercent,
|
34
42
|
};
|
35
43
|
}
|
36
|
-
function calculatePDiskAllocatedPercent(available, total) {
|
37
|
-
if (!isNumeric(available) || !isNumeric(total)) {
|
38
|
-
return undefined;
|
39
|
-
}
|
40
|
-
return Math.round(((Number(total) - Number(available)) * 100) / Number(total));
|
41
|
-
}
|
42
|
-
function calculateVDiskAllocatedPercent(allocated, availableOnVDisk, availableOnPDisk) {
|
43
|
-
const available = availableOnVDisk !== null && availableOnVDisk !== void 0 ? availableOnVDisk : availableOnPDisk;
|
44
|
-
if (!isNumeric(allocated) || !isNumeric(available)) {
|
45
|
-
return undefined;
|
46
|
-
}
|
47
|
-
return Math.round((Number(allocated) * 100) / (Number(allocated) + Number(available)));
|
48
|
-
}
|
@@ -1,16 +1,18 @@
|
|
1
|
-
import type { TPDiskStateInfo } from '../../types/api/pdisk';
|
1
|
+
import type { TPDiskInfo, TPDiskStateInfo } from '../../types/api/pdisk';
|
2
2
|
import type { TVDiskStateInfo, TVSlotId } from '../../types/api/vdisk';
|
3
3
|
import type { ValueOf } from '../../types/common';
|
4
4
|
import type { PDISK_TYPES } from './getPDiskType';
|
5
|
-
export
|
5
|
+
export type PreparedPDisk = TPDiskStateInfo & Omit<Partial<TPDiskInfo>, 'Type'> & {
|
6
6
|
Type?: PDiskType;
|
7
|
-
AllocatedPercent?: number;
|
8
7
|
Severity?: number;
|
9
|
-
|
8
|
+
AllocatedSize?: number;
|
9
|
+
AllocatedPercent?: number;
|
10
|
+
};
|
10
11
|
export interface PreparedVDisk extends TVDiskStateInfo {
|
11
12
|
PDisk?: PreparedPDisk;
|
12
|
-
AllocatedPercent?: number;
|
13
13
|
Severity?: number;
|
14
|
+
TotalSize?: number;
|
15
|
+
AllocatedPercent?: number;
|
14
16
|
}
|
15
17
|
export type PDiskType = ValueOf<typeof PDISK_TYPES>;
|
16
18
|
export interface UnavailableDonor extends TVSlotId {
|
@@ -1,7 +1,8 @@
|
|
1
1
|
export * from './useTypedSelector';
|
2
2
|
export * from './useTypedDispatch';
|
3
3
|
export * from './useSetting';
|
4
|
-
export * from './
|
4
|
+
export * from './useQueryExecutionSettings';
|
5
5
|
export * from './useTableSort';
|
6
6
|
export * from './useSearchQuery';
|
7
7
|
export * from './useAutoRefreshInterval';
|
8
|
+
export * from './useEventHandler';
|
@@ -1,7 +1,8 @@
|
|
1
1
|
export * from './useTypedSelector';
|
2
2
|
export * from './useTypedDispatch';
|
3
3
|
export * from './useSetting';
|
4
|
-
export * from './
|
4
|
+
export * from './useQueryExecutionSettings';
|
5
5
|
export * from './useTableSort';
|
6
6
|
export * from './useSearchQuery';
|
7
7
|
export * from './useAutoRefreshInterval';
|
8
|
+
export * from './useEventHandler';
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export declare const useChangedQuerySettings: () => {
|
2
|
+
isBannerShown: boolean;
|
3
|
+
isIndicatorShown: boolean | 0 | undefined;
|
4
|
+
closeBanner: () => void;
|
5
|
+
resetBanner: () => void;
|
6
|
+
changedCurrentSettings: (keyof import("../../types/store/query").QuerySettings)[];
|
7
|
+
changedCurrentSettingsDescriptions: Record<string, string>;
|
8
|
+
changedLastExucutionSettings: (keyof import("../../types/store/query").QuerySettings)[];
|
9
|
+
changedLastExecutionSettingsDescriptions: Record<string, string>;
|
10
|
+
};
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import getChangedQueryExecutionSettings from '../../containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings';
|
2
|
+
import getChangedQueryExecutionSettingsDescription from '../../containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription';
|
3
|
+
import { DEFAULT_QUERY_SETTINGS, QUERY_SETTINGS_BANNER_LAST_CLOSED_KEY, WEEK_IN_SECONDS, } from '../constants';
|
4
|
+
import { useLastQueryExecutionSettings } from './useLastQueryExecutionSettings';
|
5
|
+
import { useQueryExecutionSettings } from './useQueryExecutionSettings';
|
6
|
+
import { useSetting } from './useSetting';
|
7
|
+
export const useChangedQuerySettings = () => {
|
8
|
+
const [bannerLastClosedTimestamp, setBannerLastClosedTimestamp] = useSetting(QUERY_SETTINGS_BANNER_LAST_CLOSED_KEY);
|
9
|
+
const [lastQuerySettings] = useLastQueryExecutionSettings();
|
10
|
+
const [currentQuerySettings] = useQueryExecutionSettings();
|
11
|
+
const changedLastExucutionSettings = lastQuerySettings
|
12
|
+
? getChangedQueryExecutionSettings(lastQuerySettings, DEFAULT_QUERY_SETTINGS)
|
13
|
+
: [];
|
14
|
+
const changedCurrentSettings = currentQuerySettings
|
15
|
+
? getChangedQueryExecutionSettings(currentQuerySettings, DEFAULT_QUERY_SETTINGS)
|
16
|
+
: [];
|
17
|
+
const hasChangedLastExucutionSettings = changedLastExucutionSettings.length > 0;
|
18
|
+
const changedLastExecutionSettingsDescriptions = lastQuerySettings
|
19
|
+
? getChangedQueryExecutionSettingsDescription({
|
20
|
+
currentSettings: lastQuerySettings,
|
21
|
+
defaultSettings: DEFAULT_QUERY_SETTINGS,
|
22
|
+
})
|
23
|
+
: {};
|
24
|
+
const changedCurrentSettingsDescriptions = currentQuerySettings
|
25
|
+
? getChangedQueryExecutionSettingsDescription({
|
26
|
+
currentSettings: currentQuerySettings,
|
27
|
+
defaultSettings: DEFAULT_QUERY_SETTINGS,
|
28
|
+
})
|
29
|
+
: {};
|
30
|
+
const isClosedRecently = bannerLastClosedTimestamp &&
|
31
|
+
Date.now() - bannerLastClosedTimestamp < WEEK_IN_SECONDS * 1000;
|
32
|
+
const isBannerShown = hasChangedLastExucutionSettings && !isClosedRecently;
|
33
|
+
const isIndicatorShown = hasChangedLastExucutionSettings && isClosedRecently;
|
34
|
+
const closeBanner = () => setBannerLastClosedTimestamp(Date.now());
|
35
|
+
const resetBanner = () => setBannerLastClosedTimestamp(undefined);
|
36
|
+
return {
|
37
|
+
isBannerShown,
|
38
|
+
isIndicatorShown,
|
39
|
+
closeBanner,
|
40
|
+
resetBanner,
|
41
|
+
changedCurrentSettings,
|
42
|
+
changedCurrentSettingsDescriptions,
|
43
|
+
changedLastExucutionSettings,
|
44
|
+
changedLastExecutionSettingsDescriptions,
|
45
|
+
};
|
46
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function useDelayed(delay?: number): boolean;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
export function useDelayed(delay = 600) {
|
3
|
+
const [show, setShow] = React.useState(false);
|
4
|
+
React.useEffect(() => {
|
5
|
+
const timerId = setTimeout(() => {
|
6
|
+
setShow(true);
|
7
|
+
}, delay);
|
8
|
+
return () => {
|
9
|
+
clearTimeout(timerId);
|
10
|
+
};
|
11
|
+
}, []);
|
12
|
+
return show;
|
13
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/**
|
2
|
+
* The hook returns a stable function (an empty list of dependencies),
|
3
|
+
* but this function always calls the actual function associated with the last render.
|
4
|
+
* The returned function should be used as an event handler or inside a useEffect.
|
5
|
+
*/
|
6
|
+
export declare function useEventHandler<T extends Function>(handler?: T): T;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
/**
|
3
|
+
* The hook returns a stable function (an empty list of dependencies),
|
4
|
+
* but this function always calls the actual function associated with the last render.
|
5
|
+
* The returned function should be used as an event handler or inside a useEffect.
|
6
|
+
*/
|
7
|
+
export function useEventHandler(handler) {
|
8
|
+
const ref = React.useRef(handler);
|
9
|
+
React.useLayoutEffect(() => {
|
10
|
+
ref.current = handler;
|
11
|
+
}, [handler]);
|
12
|
+
// @ts-expect-error
|
13
|
+
return React.useCallback((...args) => {
|
14
|
+
var _a;
|
15
|
+
return (_a = ref.current) === null || _a === void 0 ? void 0 : _a.call(ref, ...args);
|
16
|
+
}, []);
|
17
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { QuerySettings } from '../../types/store/query';
|
2
|
+
export declare const useQueryExecutionSettings: () => readonly [{
|
3
|
+
readonly tracingLevel: import("../../types/store/query").TracingLevel | undefined;
|
4
|
+
readonly queryMode: import("../../types/store/query").QueryMode;
|
5
|
+
readonly isolationLevel: import("../../types/store/query").IsolationLevel;
|
6
|
+
readonly timeout?: string;
|
7
|
+
readonly statisticsMode?: import("../../types/store/query").StatisticsMode;
|
8
|
+
}, (value: QuerySettings) => void];
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { DEFAULT_QUERY_SETTINGS, ENABLE_TRACING_LEVEL_KEY, QUERY_EXECUTION_SETTINGS_KEY, } from '../constants';
|
2
|
+
import { useSetting } from './useSetting';
|
3
|
+
export const useQueryExecutionSettings = () => {
|
4
|
+
const [enableTracingLevel] = useSetting(ENABLE_TRACING_LEVEL_KEY);
|
5
|
+
const [setting, setSetting] = useSetting(QUERY_EXECUTION_SETTINGS_KEY);
|
6
|
+
return [
|
7
|
+
{
|
8
|
+
...setting,
|
9
|
+
tracingLevel: enableTracingLevel
|
10
|
+
? setting.tracingLevel
|
11
|
+
: DEFAULT_QUERY_SETTINGS.tracingLevel,
|
12
|
+
},
|
13
|
+
setSetting,
|
14
|
+
];
|
15
|
+
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as monaco from 'monaco-editor';
|
2
|
-
import {
|
2
|
+
import { LANGUAGE_ID } from 'monaco-yql-languages/build/yql/yql.contribution';
|
3
3
|
import { createProvideSuggestionsFunction } from './yqlSuggestions';
|
4
4
|
let completionProvider;
|
5
5
|
function disableCodeSuggestions() {
|
@@ -9,7 +9,7 @@ function disableCodeSuggestions() {
|
|
9
9
|
}
|
10
10
|
export function registerYQLCompletionItemProvider(database) {
|
11
11
|
disableCodeSuggestions();
|
12
|
-
completionProvider = monaco.languages.registerCompletionItemProvider(
|
12
|
+
completionProvider = monaco.languages.registerCompletionItemProvider(LANGUAGE_ID, {
|
13
13
|
triggerCharacters: [' ', '.', '`', '(', '/'],
|
14
14
|
provideCompletionItems: createProvideSuggestionsFunction(database),
|
15
15
|
});
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import type { ExplainPlanNodeData, GraphNode, Link } from '@gravity-ui/paranoid';
|
2
|
-
import type {
|
2
|
+
import type { SimplifiedPlanItem } from '../store/reducers/explainQuery/types';
|
3
|
+
import type { PlanNode, SimplifiedNode } from '../types/api/query';
|
3
4
|
export declare function preparePlan(plan: PlanNode): {
|
4
5
|
nodes: GraphNode<ExplainPlanNodeData>[];
|
5
6
|
links: Link[];
|
6
7
|
};
|
8
|
+
export declare function prepareSimplifiedPlan(plans: SimplifiedNode[]): SimplifiedPlanItem[];
|
@@ -9,7 +9,7 @@ function prepareStats(plan) {
|
|
9
9
|
if (name === 'Name') {
|
10
10
|
continue;
|
11
11
|
}
|
12
|
-
const value =
|
12
|
+
const value = typeof data === 'string' ? data : JSON.stringify(data);
|
13
13
|
section.items.push({ name, value });
|
14
14
|
}
|
15
15
|
operatorsSections.push(section);
|
@@ -25,7 +25,10 @@ function prepareStats(plan) {
|
|
25
25
|
if (CONNECTION_NODE_META_FIELDS.has(key)) {
|
26
26
|
continue;
|
27
27
|
}
|
28
|
-
attrStats.push({
|
28
|
+
attrStats.push({
|
29
|
+
name: key,
|
30
|
+
value: typeof value === 'string' ? value : JSON.stringify(value),
|
31
|
+
});
|
29
32
|
}
|
30
33
|
if (attrStats.length > 0) {
|
31
34
|
stats.push({
|
@@ -34,6 +37,19 @@ function prepareStats(plan) {
|
|
34
37
|
});
|
35
38
|
}
|
36
39
|
}
|
40
|
+
if (plan.Stats) {
|
41
|
+
const attrStats = [];
|
42
|
+
for (const [key, value] of Object.entries(plan.Stats)) {
|
43
|
+
attrStats.push({
|
44
|
+
name: key,
|
45
|
+
value: typeof value === 'string' ? value : JSON.stringify(value),
|
46
|
+
});
|
47
|
+
}
|
48
|
+
stats.push({
|
49
|
+
group: 'Stats',
|
50
|
+
stats: attrStats,
|
51
|
+
});
|
52
|
+
}
|
37
53
|
return stats;
|
38
54
|
}
|
39
55
|
function getNodeType(plan) {
|
@@ -86,3 +102,39 @@ export function preparePlan(plan) {
|
|
86
102
|
links,
|
87
103
|
};
|
88
104
|
}
|
105
|
+
export function prepareSimplifiedPlan(plans) {
|
106
|
+
var _a;
|
107
|
+
const result = [];
|
108
|
+
const stack = plans.map((plan) => ({ node: plan }));
|
109
|
+
while (stack.length > 0) {
|
110
|
+
const { node, subNodes } = stack.pop();
|
111
|
+
const plans = node['Plans'];
|
112
|
+
const operator = (_a = node['Operators']) === null || _a === void 0 ? void 0 : _a[0];
|
113
|
+
const children = subNodes || result;
|
114
|
+
if (operator) {
|
115
|
+
const { ['A-Cpu']: aCpu, ['A-Rows']: aRows, ['E-Cost']: eCost, ['E-Rows']: eRows, ['E-Size']: eSize, ['SsaProgram']: _ssaProgram, ['Name']: name, ...rest } = operator;
|
116
|
+
const newNode = {
|
117
|
+
name,
|
118
|
+
operationParams: rest,
|
119
|
+
aCpu,
|
120
|
+
aRows,
|
121
|
+
eCost,
|
122
|
+
eRows,
|
123
|
+
eSize,
|
124
|
+
children: [],
|
125
|
+
};
|
126
|
+
children.push(newNode);
|
127
|
+
if (plans) {
|
128
|
+
for (let i = plans.length - 1; i >= 0; i--) {
|
129
|
+
stack.push({ node: plans[i], subNodes: newNode.children });
|
130
|
+
}
|
131
|
+
}
|
132
|
+
}
|
133
|
+
else if (plans) {
|
134
|
+
for (let i = plans.length - 1; i >= 0; i--) {
|
135
|
+
stack.push({ node: plans[i], subNodes: children });
|
136
|
+
}
|
137
|
+
}
|
138
|
+
}
|
139
|
+
return result;
|
140
|
+
}
|
package/dist/utils/query.d.ts
CHANGED
@@ -1,5 +1,28 @@
|
|
1
1
|
import type { AnyExecuteResponse, AnyExplainResponse, ErrorResponse, KeyValueRow, QueryPlan, ScriptPlan } from '../types/api/query';
|
2
|
-
import type { IQueryResult, QueryMode } from '../types/store/query';
|
2
|
+
import type { IQueryResult, IsolationLevel, QueryMode, StatisticsMode, TracingLevel } from '../types/store/query';
|
3
|
+
export declare const ISOLATION_LEVELS: {
|
4
|
+
readonly serializable: "serializable-read-write";
|
5
|
+
readonly stalero: "stale-read-only";
|
6
|
+
readonly onlinero: "online-read-only";
|
7
|
+
readonly snapshot: "snapshot-read-only";
|
8
|
+
};
|
9
|
+
export declare const ISOLATION_LEVELS_TITLES: Record<IsolationLevel, string>;
|
10
|
+
export declare const STATISTICS_MODES: {
|
11
|
+
readonly none: "none";
|
12
|
+
readonly basic: "basic";
|
13
|
+
readonly full: "full";
|
14
|
+
readonly profile: "profile";
|
15
|
+
};
|
16
|
+
export declare const STATISTICS_MODES_TITLES: Record<StatisticsMode, string>;
|
17
|
+
export declare const TRACING_LEVELS: {
|
18
|
+
readonly off: "off";
|
19
|
+
readonly toplevel: "toplevel";
|
20
|
+
readonly basic: "basic";
|
21
|
+
readonly detailed: "detailed";
|
22
|
+
readonly diagnostic: "diagnostic";
|
23
|
+
readonly trace: "trace";
|
24
|
+
};
|
25
|
+
export declare const TRACING_LEVELS_TITLES: Record<TracingLevel, string>;
|
3
26
|
export declare const QUERY_ACTIONS: {
|
4
27
|
readonly execute: "execute";
|
5
28
|
readonly explain: "explain";
|
package/dist/utils/query.js
CHANGED
@@ -1,5 +1,45 @@
|
|
1
1
|
import { YQLType } from '../types';
|
2
2
|
import { isAxiosResponse, isNetworkError } from './response';
|
3
|
+
export const ISOLATION_LEVELS = {
|
4
|
+
serializable: 'serializable-read-write',
|
5
|
+
stalero: 'stale-read-only',
|
6
|
+
onlinero: 'online-read-only',
|
7
|
+
snapshot: 'snapshot-read-only',
|
8
|
+
};
|
9
|
+
export const ISOLATION_LEVELS_TITLES = {
|
10
|
+
[ISOLATION_LEVELS.serializable]: 'Serializable',
|
11
|
+
[ISOLATION_LEVELS.stalero]: 'Stale Read-Only',
|
12
|
+
[ISOLATION_LEVELS.onlinero]: 'Online Read-Only',
|
13
|
+
[ISOLATION_LEVELS.snapshot]: 'Snapshot Read-Only',
|
14
|
+
};
|
15
|
+
export const STATISTICS_MODES = {
|
16
|
+
none: 'none',
|
17
|
+
basic: 'basic',
|
18
|
+
full: 'full',
|
19
|
+
profile: 'profile',
|
20
|
+
};
|
21
|
+
export const STATISTICS_MODES_TITLES = {
|
22
|
+
[STATISTICS_MODES.none]: 'None',
|
23
|
+
[STATISTICS_MODES.full]: 'Full',
|
24
|
+
[STATISTICS_MODES.basic]: 'Basic',
|
25
|
+
[STATISTICS_MODES.profile]: 'Profile',
|
26
|
+
};
|
27
|
+
export const TRACING_LEVELS = {
|
28
|
+
off: 'off',
|
29
|
+
toplevel: 'toplevel',
|
30
|
+
basic: 'basic',
|
31
|
+
detailed: 'detailed',
|
32
|
+
diagnostic: 'diagnostic',
|
33
|
+
trace: 'trace',
|
34
|
+
};
|
35
|
+
export const TRACING_LEVELS_TITLES = {
|
36
|
+
[TRACING_LEVELS.off]: 'Off',
|
37
|
+
[TRACING_LEVELS.toplevel]: 'TopLevel',
|
38
|
+
[TRACING_LEVELS.basic]: 'Basic',
|
39
|
+
[TRACING_LEVELS.detailed]: 'Detailed',
|
40
|
+
[TRACING_LEVELS.diagnostic]: 'Diagnostic',
|
41
|
+
[TRACING_LEVELS.trace]: 'Trace',
|
42
|
+
};
|
3
43
|
export const QUERY_ACTIONS = {
|
4
44
|
execute: 'execute',
|
5
45
|
explain: 'explain',
|
@@ -147,6 +187,7 @@ export const parseQueryExplainPlan = (plan) => {
|
|
147
187
|
Plan: plan.queries[0].Plan,
|
148
188
|
tables: plan.queries[0].tables,
|
149
189
|
meta: plan.meta,
|
190
|
+
SimplifiedPlan: plan.queries[0].SimplifiedPlan,
|
150
191
|
};
|
151
192
|
}
|
152
193
|
return plan;
|
package/dist/utils/query.test.js
CHANGED
@@ -131,6 +131,7 @@ describe('API utils', () => {
|
|
131
131
|
describe('parseQueryExplainPlan', () => {
|
132
132
|
it('should parse explain script plan to explain scan', () => {
|
133
133
|
const plan = {};
|
134
|
+
const simplifiedPlan = {};
|
134
135
|
const tables = [];
|
135
136
|
const meta = { version: '0.2', type: 'script' };
|
136
137
|
const rawPlan = {
|
@@ -138,12 +139,14 @@ describe('API utils', () => {
|
|
138
139
|
{
|
139
140
|
Plan: plan,
|
140
141
|
tables,
|
142
|
+
SimplifiedPlan: simplifiedPlan,
|
141
143
|
},
|
142
144
|
],
|
143
145
|
meta,
|
144
146
|
};
|
145
147
|
const parsedPlan = parseQueryExplainPlan(rawPlan);
|
146
148
|
expect(parsedPlan.Plan).toEqual(plan);
|
149
|
+
expect(parsedPlan.SimplifiedPlan).toEqual(simplifiedPlan);
|
147
150
|
expect(parsedPlan.tables).toBe(tables);
|
148
151
|
expect(parsedPlan.meta).toEqual(meta);
|
149
152
|
});
|
package/dist/utils/utils.d.ts
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
export function parseJson(value
|
2
|
-
export function getValueFromLS(key:
|
3
|
-
export function bytesToSize(bytes:
|
4
|
-
export function bytesToSpeed(bytes
|
5
|
-
export function bytesToGB(bytes
|
6
|
-
export function pad9(val:
|
7
|
-
export function isNumeric(value
|
1
|
+
export declare function parseJson(value?: string | null): any;
|
2
|
+
export declare function getValueFromLS(key: string, defaultValue: string): string | undefined;
|
3
|
+
export declare function bytesToSize(bytes: number): string;
|
4
|
+
export declare function bytesToSpeed(bytes?: number | string): string;
|
5
|
+
export declare function bytesToGB(bytes?: number | string, shouldRound?: boolean): string;
|
6
|
+
export declare function pad9(val: number | string): string;
|
7
|
+
export declare function isNumeric(value?: unknown): value is number | string;
|
8
|
+
export declare function toExponential(value: number, precision?: number): string;
|