ydb-embedded-ui 5.2.1 → 5.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/BasicNodeViewer/BasicNodeViewer.js +1 -1
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.d.ts +13 -0
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js +32 -0
- package/dist/components/CellWithPopover/CellWithPopover.js +1 -11
- package/dist/components/ClipboardButton/ClipboardButton.js +1 -11
- package/dist/components/ComponentsProvider/ComponentsProvider.d.ts +2 -2
- package/dist/components/ComponentsProvider/componentsRegistry.d.ts +1 -1
- package/dist/components/ComponentsProvider/registry.d.ts +3 -3
- package/dist/components/ContentWithPopup/ContentWithPopup.js +1 -11
- package/dist/components/CriticalActionDialog/CriticalActionDialog.d.ts +6 -4
- package/dist/components/CriticalActionDialog/CriticalActionDialog.js +32 -7
- package/dist/components/CriticalActionDialog/CriticalActionDialog.scss +8 -19
- package/dist/components/CriticalActionDialog/i18n/en.json +7 -0
- package/dist/components/CriticalActionDialog/i18n/index.d.ts +1 -0
- package/dist/components/CriticalActionDialog/i18n/index.js +4 -0
- package/dist/components/EnableFullscreenButton/EnableFullscreenButton.js +2 -2
- package/dist/components/EntityStatus/EntityStatus.d.ts +20 -37
- package/dist/components/EntityStatus/EntityStatus.js +17 -66
- package/dist/components/EntityStatus/EntityStatus.scss +1 -57
- package/dist/components/Errors/403/AccessDenied.js +1 -11
- package/dist/components/FormattedBytes/FormattedBytes.d.ts +1 -1
- package/dist/components/FormattedBytes/FormattedBytes.js +1 -11
- package/dist/components/FormattedBytes/utils.d.ts +1 -1
- package/dist/components/Fullscreen/Fullscreen.js +11 -11
- package/dist/components/Illustration/Illustration.js +1 -11
- package/dist/components/InfoViewer/InfoViewer.d.ts +2 -2
- package/dist/components/InfoViewer/InfoViewer.js +1 -1
- package/dist/components/InfoViewer/formatters/cdcStream.d.ts +1 -1
- package/dist/components/InfoViewer/formatters/common.d.ts +1 -1
- package/dist/components/InfoViewer/formatters/pqGroup.d.ts +3 -3
- package/dist/components/InfoViewer/formatters/schema.d.ts +1 -1
- package/dist/components/InfoViewer/formatters/table.d.ts +4 -4
- package/dist/components/InfoViewer/utils.d.ts +3 -3
- package/dist/components/InfoViewerSkeleton/InfoViewerSkeleton.d.ts +7 -0
- package/dist/components/InfoViewerSkeleton/InfoViewerSkeleton.js +7 -0
- package/dist/{containers/Cluster/ClusterInfoSkeleton/ClusterInfoSkeleton.scss → components/InfoViewerSkeleton/InfoViewerSkeleton.scss} +1 -9
- package/dist/components/InternalLink/InternalLink.js +1 -11
- package/dist/components/LinkToSchemaObject/LinkToSchemaObject.js +1 -11
- package/dist/components/LinkWithIcon/LinkWithIcon.d.ts +8 -0
- package/dist/components/LinkWithIcon/LinkWithIcon.js +14 -0
- package/dist/components/{ExternalLinkWithIcon/ExternalLinkWithIcon.scss → LinkWithIcon/LinkWithIcon.scss} +1 -1
- package/dist/components/MetricChart/MetricChart.d.ts +2 -1
- package/dist/components/MetricChart/MetricChart.js +8 -3
- package/dist/components/MetricChart/getChartData.d.ts +2 -1
- package/dist/components/MetricChart/getChartData.js +2 -2
- package/dist/components/MetricChart/getDefaultDataFormatter.d.ts +1 -1
- package/dist/components/MetricChart/i18n/en.json +3 -0
- package/dist/components/MetricChart/i18n/index.d.ts +2 -0
- package/dist/components/MetricChart/i18n/index.js +4 -0
- package/dist/components/MetricChart/reducer.d.ts +1 -1
- package/dist/components/MetricChart/types.d.ts +5 -5
- package/dist/components/NodeHostWrapper/NodeHostWrapper.js +1 -1
- package/dist/components/PDiskInfo/PDiskInfo.d.ts +11 -0
- package/dist/components/PDiskInfo/PDiskInfo.js +71 -0
- package/dist/components/PDiskInfo/PDiskInfo.scss +8 -0
- package/dist/components/PDiskInfo/i18n/en.json +14 -0
- package/dist/components/PDiskInfo/i18n/index.d.ts +1 -0
- package/dist/components/PDiskInfo/i18n/index.js +4 -0
- package/dist/components/PageMeta/PageMeta.d.ts +8 -0
- package/dist/components/PageMeta/PageMeta.js +7 -0
- package/dist/components/PageMeta/PageMeta.scss +10 -0
- package/dist/components/ProgressViewer/ProgressViewer.d.ts +1 -1
- package/dist/components/QueryResultTable/Cell/Cell.js +2 -2
- package/dist/components/QueryResultTable/QueryResultTable.js +1 -11
- package/dist/components/ShortyString/ShortyString.d.ts +1 -1
- package/dist/components/StatusIcon/StatusIcon.d.ts +12 -0
- package/dist/components/StatusIcon/StatusIcon.js +23 -0
- package/dist/components/StatusIcon/StatusIcon.scss +69 -0
- package/dist/components/Tablet/Tablet.scss +1 -1
- package/dist/components/TabletsOverall/TabletsOverall.js +6 -6
- package/dist/components/TabletsStatistic/TabletsStatistic.d.ts +1 -1
- package/dist/components/TabletsStatistic/TabletsStatistic.scss +1 -1
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/components/UsageLabel/UsageLabel.js +1 -11
- package/dist/components/VirtualTable/TableHead.js +2 -2
- package/dist/components/VirtualTable/reducer.d.ts +2 -2
- package/dist/components/VirtualTable/types.d.ts +13 -13
- package/dist/components/slots/types.d.ts +1 -1
- package/dist/containers/App/App.d.ts +1 -1
- package/dist/containers/App/Content.js +10 -4
- package/dist/containers/App/Providers.d.ts +1 -1
- package/dist/containers/App/appSlots.d.ts +6 -0
- package/dist/containers/App/appSlots.js +1 -0
- package/dist/containers/AppWithClusters/AppWithClusters.d.ts +1 -1
- package/dist/containers/AppWithClusters/AppWithClusters.js +1 -1
- package/dist/containers/AsideNavigation/YdbInternalUser/YdbInternalUser.js +2 -3
- package/dist/containers/Authentication/Authentication.js +2 -5
- package/dist/containers/Cluster/Cluster.js +4 -5
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +4 -4
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +4 -0
- package/dist/containers/Cluster/ClusterInfo/utils.d.ts +1 -1
- package/dist/containers/Cluster/utils.d.ts +2 -2
- package/dist/containers/Clusters/Clusters.js +2 -4
- package/dist/containers/Clusters/Clusters.scss +1 -1
- package/dist/containers/Clusters/constants.d.ts +1 -1
- package/dist/containers/Clusters/useClustersList.js +2 -2
- package/dist/containers/Clusters/useSelectedColumns.d.ts +1 -1
- package/dist/containers/Header/Header.js +4 -5
- package/dist/containers/Header/breadcrumbs.js +28 -5
- package/dist/containers/Header/i18n/en.json +7 -0
- package/dist/containers/Header/i18n/index.d.ts +1 -0
- package/dist/containers/Header/i18n/index.js +4 -0
- package/dist/containers/Heatmap/Heatmap.js +3 -4
- package/dist/containers/Heatmap/HeatmapCanvas/HeatmapCanvas.js +1 -1
- package/dist/containers/Node/Node.js +2 -3
- package/dist/containers/Node/NodeStructure/NodeStructure.d.ts +0 -1
- package/dist/containers/Node/NodeStructure/NodeStructure.js +2 -6
- package/dist/containers/Node/NodeStructure/Pdisk.js +9 -65
- package/dist/containers/Node/NodeStructure/Vdisk.d.ts +1 -1
- package/dist/containers/Node/NodeStructure/Vdisk.js +5 -3
- package/dist/containers/Nodes/Nodes.js +2 -3
- package/dist/containers/Nodes/NodesWrapper.js +1 -11
- package/dist/containers/Nodes/getNodes.js +1 -11
- package/dist/containers/Nodes/getNodesColumns.d.ts +1 -1
- package/dist/containers/PDisk/PDisk.d.ts +3 -0
- package/dist/containers/PDisk/PDisk.js +68 -0
- package/dist/containers/PDisk/PDisk.scss +41 -0
- package/dist/containers/PDisk/PDiskGroups.d.ts +10 -0
- package/dist/containers/PDisk/PDiskGroups.js +20 -0
- package/dist/containers/PDisk/i18n/en.json +6 -0
- package/dist/containers/PDisk/i18n/index.d.ts +1 -0
- package/dist/containers/PDisk/i18n/index.js +4 -0
- package/dist/containers/PDisk/shared.d.ts +10 -0
- package/dist/containers/PDisk/shared.js +2 -0
- package/dist/containers/ReduxTooltip/ReduxTooltip.d.ts +1 -1
- package/dist/containers/ReduxTooltip/ReduxTooltip.js +3 -2
- package/dist/containers/Storage/DiskStateProgressBar/DiskStateProgressBar.d.ts +1 -9
- package/dist/containers/Storage/DiskStateProgressBar/DiskStateProgressBar.js +2 -12
- package/dist/containers/Storage/PDisk/PDisk.d.ts +3 -3
- package/dist/containers/Storage/PDisk/PDisk.js +6 -53
- package/dist/containers/Storage/PDiskPopup/PDiskPopup.d.ts +3 -3
- package/dist/containers/Storage/PDiskPopup/PDiskPopup.js +3 -14
- package/dist/containers/Storage/Storage.js +2 -3
- package/dist/containers/Storage/StorageGroups/getGroups.js +1 -11
- package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.d.ts +2 -1
- package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js +22 -8
- package/dist/containers/Storage/StorageNodes/getNodes.js +1 -11
- package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.js +1 -1
- package/dist/containers/Storage/StorageWrapper.js +1 -11
- package/dist/containers/Storage/UsageFilter/UsageFilter.js +1 -1
- package/dist/containers/Storage/VDisk/VDisk.d.ts +2 -3
- package/dist/containers/Storage/VDisk/VDisk.js +4 -64
- package/dist/containers/Storage/VDiskPopup/VDiskPopup.js +2 -12
- package/dist/containers/Storage/VirtualStorage.js +2 -3
- package/dist/containers/Storage/utils/index.d.ts +1 -3
- package/dist/containers/Storage/utils/index.js +0 -6
- package/dist/containers/Tablet/Tablet.js +4 -5
- package/dist/containers/Tablet/TabletControls/TabletControls.d.ts +3 -2
- package/dist/containers/Tablet/TabletControls/TabletControls.js +2 -49
- package/dist/containers/Tablet/TabletTable/TabletTable.js +1 -1
- package/dist/containers/Tablets/Tablets.js +2 -3
- package/dist/containers/TabletsFilters/TabletsFilters.d.ts +2 -2
- package/dist/containers/Tenant/Acl/Acl.js +2 -3
- package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.js +2 -3
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.js +3 -3
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js +6 -4
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +2 -2
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +2 -3
- package/dist/containers/Tenant/Diagnostics/Network/Network.d.ts +2 -2
- package/dist/containers/Tenant/Diagnostics/Network/NodeNetwork/NodeNetwork.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Network/NodeNetwork/NodeNetwork.js +7 -5
- package/dist/containers/Tenant/Diagnostics/Network/NodeNetwork/NodeNetwork.scss +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +9 -5
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/utils/prepareTopicSchemaInfo.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +2 -3
- package/dist/containers/Tenant/Diagnostics/Partitions/columns/columns.js +1 -1
- package/dist/containers/Tenant/Diagnostics/Partitions/utils/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/DefaultOverviewContent/DefaultOverviewContent.d.ts +5 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/DefaultOverviewContent/DefaultOverviewContent.js +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/Healthcheck.scss +0 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckDetails.d.ts +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.js +3 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTree.d.ts +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTree.js +3 -12
- package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTreeItem/IssueTreeItem.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTreeItem/IssueTreeItem.js +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TenantCpu.js +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js +2 -3
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.js +2 -3
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +2 -3
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js +2 -3
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantDashboard/TenantDashboard.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantDashboard/TenantDashboard.js +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TenantMemory.js +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js +2 -3
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +6 -7
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverviewTableLayout.js +1 -11
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TenantStorage.js +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +2 -3
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.js +2 -3
- package/dist/containers/Tenant/Diagnostics/TenantOverview/useHealthcheck.d.ts +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/useHealthcheck.js +3 -4
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +2 -5
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +2 -3
- package/dist/containers/Tenant/Info/ExternalDataSource/ExternalDataSource.js +1 -1
- package/dist/containers/Tenant/Info/ExternalTable/ExternalTable.js +3 -3
- package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.d.ts +1 -0
- package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.js +3 -2
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +2 -3
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +2 -3
- package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +3 -3
- package/dist/containers/Tenant/Query/Issues/models.d.ts +1 -1
- package/dist/containers/Tenant/Query/Preview/Preview.js +2 -3
- package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js +2 -3
- package/dist/containers/Tenant/Query/Query.js +2 -3
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +3 -8
- package/dist/containers/Tenant/Query/QueryEditor/helpers.d.ts +4 -0
- package/dist/containers/Tenant/Query/QueryEditor/helpers.js +17 -0
- package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.js +4 -4
- package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js +2 -2
- package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.js +5 -3
- package/dist/containers/Tenant/Tenant.js +24 -8
- package/dist/containers/Tenant/utils/index.d.ts +1 -1
- package/dist/containers/Tenant/utils/schema.d.ts +12 -12
- package/dist/containers/Tenant/utils/schemaActions.d.ts +1 -1
- package/dist/containers/Tenants/Tenants.js +3 -4
- package/dist/containers/UserSettings/Setting.d.ts +1 -1
- package/dist/containers/UserSettings/i18n/en.json +4 -0
- package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
- package/dist/containers/UserSettings/settings.d.ts +4 -1
- package/dist/containers/UserSettings/settings.js +21 -6
- package/dist/containers/Versions/NodesTable/NodesTable.js +1 -1
- package/dist/containers/Versions/Versions.js +2 -3
- package/dist/reportWebVitals.d.ts +1 -1
- package/dist/routes.d.ts +5 -2
- package/dist/routes.js +6 -1
- package/dist/services/api.d.ts +8 -7
- package/dist/services/api.js +3 -13
- package/dist/services/settings.d.ts +1 -1
- package/dist/services/settings.js +2 -1
- package/dist/store/configureStore.d.ts +310 -0
- package/dist/store/configureStore.js +56 -0
- package/dist/store/defaultStore.d.ts +168 -0
- package/dist/store/defaultStore.js +2 -0
- package/dist/store/getUrlData.d.ts +3 -3
- package/dist/store/getUrlData.js +4 -4
- package/dist/store/index.d.ts +3 -97
- package/dist/store/index.js +2 -49
- package/dist/store/reducers/authentication/authentication.d.ts +247 -4
- package/dist/store/reducers/authentication/types.d.ts +1 -1
- package/dist/store/reducers/cluster/cluster.d.ts +83 -2
- package/dist/store/reducers/cluster/types.d.ts +3 -3
- package/dist/store/reducers/clusterNodes/clusterNodes.d.ts +83 -2
- package/dist/store/reducers/clusterNodes/types.d.ts +1 -1
- package/dist/store/reducers/clusters/clusters.d.ts +83 -2
- package/dist/store/reducers/clusters/selectors.d.ts +20 -6
- package/dist/store/reducers/clusters/selectors.js +1 -1
- package/dist/store/reducers/clusters/types.d.ts +1 -1
- package/dist/store/reducers/describe.d.ts +165 -3
- package/dist/store/reducers/describe.js +4 -3
- package/dist/store/reducers/executeQuery.d.ts +83 -2
- package/dist/store/reducers/executeTopQueries/executeTopQueries.d.ts +3 -3
- package/dist/store/reducers/executeTopQueries/types.d.ts +1 -1
- package/dist/store/reducers/explainQuery.d.ts +165 -3
- package/dist/store/reducers/header/header.d.ts +1 -1
- package/dist/store/reducers/header/types.d.ts +7 -4
- package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +101 -0
- package/dist/store/reducers/{healthcheckInfo.js → healthcheckInfo/healthcheckInfo.js} +2 -2
- package/dist/store/reducers/healthcheckInfo/types.d.ts +19 -0
- package/dist/store/reducers/healthcheckInfo/utils.d.ts +3 -0
- package/dist/store/reducers/healthcheckInfo/utils.js +11 -0
- package/dist/store/reducers/heatmap.d.ts +83 -2
- package/dist/store/reducers/heatmap.js +2 -2
- package/dist/store/reducers/host.d.ts +83 -2
- package/dist/store/reducers/hotKeys/hotKeys.d.ts +1 -1
- package/dist/store/reducers/hotKeys/types.d.ts +1 -1
- package/dist/store/reducers/index.d.ts +95 -45
- package/dist/store/reducers/index.js +4 -2
- package/dist/store/reducers/network/network.d.ts +83 -2
- package/dist/store/reducers/network/types.d.ts +1 -1
- package/dist/store/reducers/node/node.d.ts +165 -3
- package/dist/store/reducers/node/selectors.d.ts +1 -1
- package/dist/store/reducers/node/selectors.js +5 -4
- package/dist/store/reducers/node/types.d.ts +6 -6
- package/dist/store/reducers/nodes/nodes.d.ts +165 -3
- package/dist/store/reducers/nodes/nodes.js +1 -11
- package/dist/store/reducers/nodes/selectors.d.ts +1 -1
- package/dist/store/reducers/nodes/selectors.js +1 -1
- package/dist/store/reducers/nodes/types.d.ts +4 -3
- package/dist/store/reducers/nodes/utils.d.ts +1 -1
- package/dist/store/reducers/nodesList.d.ts +83 -2
- package/dist/store/reducers/olapStats.d.ts +83 -2
- package/dist/store/reducers/overview/overview.d.ts +166 -4
- package/dist/store/reducers/overview/overview.js +3 -3
- package/dist/store/reducers/overview/types.d.ts +6 -5
- package/dist/store/reducers/partitions/partitions.d.ts +83 -2
- package/dist/store/reducers/partitions/types.d.ts +1 -1
- package/dist/store/reducers/partitions/utils.d.ts +2 -2
- package/dist/store/reducers/pdisk/pdisk.d.ts +210 -0
- package/dist/store/reducers/pdisk/pdisk.js +64 -0
- package/dist/store/reducers/pdisk/types.d.ts +23 -0
- package/dist/store/reducers/pdisk/types.js +1 -0
- package/dist/store/reducers/pdisk/utils.d.ts +32 -0
- package/dist/store/reducers/pdisk/utils.js +32 -0
- package/dist/store/reducers/preview.d.ts +82 -1
- package/dist/store/reducers/saveQuery.d.ts +3 -3
- package/dist/store/reducers/schema/schema.d.ts +84 -4
- package/dist/store/reducers/schema/schema.js +4 -4
- package/dist/store/reducers/schema/types.d.ts +3 -3
- package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +83 -2
- package/dist/store/reducers/schemaAcl/types.d.ts +1 -1
- package/dist/store/reducers/settings/settings.d.ts +2 -2
- package/dist/store/reducers/settings/types.d.ts +3 -3
- package/dist/store/reducers/shardsWorkload/shardsWorkload.d.ts +83 -2
- package/dist/store/reducers/shardsWorkload/types.d.ts +1 -1
- package/dist/store/reducers/storage/selectors.d.ts +1 -1
- package/dist/store/reducers/storage/selectors.js +1 -1
- package/dist/store/reducers/storage/storage.d.ts +165 -3
- package/dist/store/reducers/storage/storage.js +1 -11
- package/dist/store/reducers/storage/types.d.ts +10 -10
- package/dist/store/reducers/storage/utils.d.ts +4 -2
- package/dist/store/reducers/storage/utils.js +21 -15
- package/dist/store/reducers/tablet.d.ts +165 -3
- package/dist/store/reducers/tablet.js +1 -1
- package/dist/store/reducers/tablets.d.ts +83 -2
- package/dist/store/reducers/tabletsFilters.d.ts +101 -2
- package/dist/store/reducers/tabletsFilters.js +1 -1
- package/dist/store/reducers/tenant/tenant.d.ts +83 -2
- package/dist/store/reducers/tenant/types.d.ts +6 -6
- package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.d.ts +83 -2
- package/dist/store/reducers/tenantOverview/executeTopTables/types.d.ts +1 -1
- package/dist/store/reducers/tenantOverview/topNodesByCpu/topNodesByCpu.d.ts +83 -2
- package/dist/store/reducers/tenantOverview/topNodesByCpu/topNodesByCpu.js +1 -11
- package/dist/store/reducers/tenantOverview/topNodesByCpu/types.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/topNodesByLoad/topNodesByLoad.d.ts +83 -2
- package/dist/store/reducers/tenantOverview/topNodesByLoad/topNodesByLoad.js +1 -11
- package/dist/store/reducers/tenantOverview/topNodesByLoad/types.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/topNodesByMemory/topNodesByMemory.d.ts +83 -2
- package/dist/store/reducers/tenantOverview/topNodesByMemory/topNodesByMemory.js +1 -11
- package/dist/store/reducers/tenantOverview/topNodesByMemory/types.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.d.ts +83 -2
- package/dist/store/reducers/tenantOverview/topQueries/types.d.ts +1 -1
- package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.d.ts +83 -2
- package/dist/store/reducers/tenantOverview/topShards/types.d.ts +1 -1
- package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.d.ts +83 -2
- package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.js +1 -11
- package/dist/store/reducers/tenantOverview/topStorageGroups/types.d.ts +2 -2
- package/dist/store/reducers/tenants/selectors.d.ts +2 -2
- package/dist/store/reducers/tenants/selectors.js +1 -1
- package/dist/store/reducers/tenants/tenants.d.ts +83 -2
- package/dist/store/reducers/tenants/types.d.ts +2 -2
- package/dist/store/reducers/tenants/utils.d.ts +6 -6
- package/dist/store/reducers/tooltip.d.ts +4 -3
- package/dist/store/reducers/tooltip.js +2 -4
- package/dist/store/reducers/topic.d.ts +83 -3
- package/dist/store/reducers/topic.js +1 -1
- package/dist/store/state-url-mapping.d.ts +5 -3
- package/dist/store/state-url-mapping.js +9 -18
- package/dist/store/utils.d.ts +4 -4
- package/dist/types/additionalProps.d.ts +2 -2
- package/dist/types/api/enums.d.ts +1 -0
- package/dist/types/api/enums.js +1 -0
- package/dist/types/api/error.d.ts +1 -1
- package/dist/types/api/nodes.d.ts +1 -1
- package/dist/types/api/nodesList.d.ts +1 -1
- package/dist/types/api/query.d.ts +19 -19
- package/dist/types/api/render.d.ts +6 -3
- package/dist/types/api/storage.d.ts +1 -1
- package/dist/types/api/tablet.d.ts +1 -1
- package/dist/types/common.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/store/describe.d.ts +3 -3
- package/dist/types/store/executeQuery.d.ts +2 -2
- package/dist/types/store/explainQuery.d.ts +3 -3
- package/dist/types/store/heatmap.d.ts +3 -3
- package/dist/types/store/host.d.ts +1 -1
- package/dist/types/store/nodesList.d.ts +2 -2
- package/dist/types/store/olapStats.d.ts +1 -1
- package/dist/types/store/query.d.ts +5 -5
- package/dist/types/store/tablet.d.ts +3 -3
- package/dist/types/store/tablets.d.ts +2 -2
- package/dist/types/store/tooltip.d.ts +3 -5
- package/dist/types/store/topic.d.ts +1 -1
- package/dist/types/versions.d.ts +2 -2
- package/dist/utils/additionalProps.d.ts +1 -1
- package/dist/utils/additionalProps.js +1 -1
- package/dist/utils/bytesParsers/formatBytes.d.ts +2 -2
- package/dist/utils/bytesParsers/formatBytes.js +1 -11
- package/dist/utils/clusterVersionColors.d.ts +1 -1
- package/dist/utils/clusterVersionColors.js +2 -2
- package/dist/utils/constants.d.ts +2 -1
- package/dist/utils/constants.js +5 -4
- package/dist/utils/dataFormatters/dataFormatters.d.ts +12 -11
- package/dist/utils/developerUI/developerUI.d.ts +1 -1
- package/dist/utils/diagnostics.d.ts +2 -2
- package/dist/utils/disks/__test__/calculatePDiskSeverity.test.d.ts +1 -0
- package/dist/utils/disks/__test__/calculatePDiskSeverity.test.js +36 -0
- package/dist/utils/disks/__test__/calculateVDiskSeverity.test.d.ts +1 -0
- package/dist/utils/disks/__test__/calculateVDiskSeverity.test.js +142 -0
- package/dist/utils/disks/calculatePDiskSeverity.d.ts +2 -0
- package/dist/utils/disks/calculatePDiskSeverity.js +18 -0
- package/dist/utils/disks/calculateVDiskSeverity.d.ts +2 -0
- package/dist/utils/disks/calculateVDiskSeverity.js +36 -0
- package/dist/utils/disks/constants.d.ts +25 -0
- package/dist/utils/disks/constants.js +38 -0
- package/dist/utils/disks/getPDiskType.d.ts +7 -0
- package/dist/utils/{pdisk.js → disks/getPDiskType.js} +13 -15
- package/dist/utils/disks/helpers.d.ts +3 -0
- package/dist/utils/disks/helpers.js +10 -0
- package/dist/utils/disks/prepareDisks.d.ts +5 -0
- package/dist/utils/disks/prepareDisks.js +40 -0
- package/dist/utils/disks/types.d.ts +15 -0
- package/dist/utils/disks/types.js +1 -0
- package/dist/utils/hooks/index.d.ts +1 -0
- package/dist/utils/hooks/index.js +1 -0
- package/dist/utils/hooks/useSetting.js +2 -2
- package/dist/utils/hooks/useTableResize.d.ts +3 -3
- package/dist/utils/hooks/useTableSort.d.ts +1 -1
- package/dist/utils/hooks/useTypedDispatch.d.ts +2 -0
- package/dist/utils/hooks/useTypedDispatch.js +2 -0
- package/dist/utils/hooks/useTypedSelector.d.ts +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/monaco.d.ts +1 -0
- package/dist/utils/monaco.js +14 -0
- package/dist/utils/monitoring.d.ts +3 -3
- package/dist/utils/nodes.d.ts +2 -2
- package/dist/utils/prepareBackend.d.ts +2 -2
- package/dist/utils/query.d.ts +2 -2
- package/dist/utils/query.js +1 -11
- package/dist/utils/storage.d.ts +1 -3
- package/dist/utils/storage.js +0 -1
- package/dist/utils/tablet.d.ts +1 -1
- package/dist/utils/timeframes.d.ts +1 -1
- package/dist/utils/typecheckers.d.ts +1 -0
- package/dist/utils/versions/getVersionsColors.d.ts +1 -1
- package/dist/utils/versions/getVersionsColors.js +2 -2
- package/dist/utils/versions/parseNodesToVersionsValues.d.ts +1 -1
- package/dist/utils/yqlSuggestions/constants.d.ts +7 -0
- package/dist/utils/yqlSuggestions/constants.js +696 -0
- package/dist/utils/yqlSuggestions/generateSuggestions.d.ts +27 -0
- package/dist/utils/yqlSuggestions/generateSuggestions.js +252 -0
- package/dist/utils/yqlSuggestions/yqlSuggestions.d.ts +4 -0
- package/dist/utils/yqlSuggestions/yqlSuggestions.js +76 -0
- package/package.json +14 -10
- package/dist/assets/icons/flask.svg +0 -3
- package/dist/assets/icons/star.svg +0 -1
- package/dist/components/ExternalLinkWithIcon/ExternalLinkWithIcon.d.ts +0 -7
- package/dist/components/ExternalLinkWithIcon/ExternalLinkWithIcon.js +0 -9
- package/dist/containers/Cluster/ClusterInfoSkeleton/ClusterInfoSkeleton.d.ts +0 -7
- package/dist/containers/Cluster/ClusterInfoSkeleton/ClusterInfoSkeleton.js +0 -7
- package/dist/containers/Storage/utils/constants.d.ts +0 -2
- package/dist/containers/Storage/utils/constants.js +0 -2
- package/dist/store/reducers/healthcheckInfo.d.ts +0 -21
- package/dist/types/store/healthcheck.d.ts +0 -20
- package/dist/utils/pdisk.d.ts +0 -17
- /package/dist/{types/store/healthcheck.js → store/reducers/healthcheckInfo/types.js} +0 -0
@@ -0,0 +1,252 @@
|
|
1
|
+
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
2
|
+
import { AggregateFunctions, Pragmas, SimpleFunctions, SimpleTypes, TableFunction, Udfs, WindowFunctions, } from './constants';
|
3
|
+
const re = /[\s'"-/@]/;
|
4
|
+
function wrapStringToBackticks(value) {
|
5
|
+
let result = value;
|
6
|
+
if (value.match(re)) {
|
7
|
+
result = `\`${value}\``;
|
8
|
+
}
|
9
|
+
return result;
|
10
|
+
}
|
11
|
+
function removeBackticks(value) {
|
12
|
+
let normalizedValue = value;
|
13
|
+
if (value.startsWith('`')) {
|
14
|
+
normalizedValue = value.slice(1, -1);
|
15
|
+
}
|
16
|
+
return normalizedValue;
|
17
|
+
}
|
18
|
+
const SuggestionsWeight = {
|
19
|
+
suggestTemplates: 0,
|
20
|
+
suggestPragmas: 1,
|
21
|
+
suggestEntity: 2,
|
22
|
+
suggestColumns: 3,
|
23
|
+
suggestColumnAliases: 4,
|
24
|
+
suggestKeywords: 5,
|
25
|
+
suggestAggregateFunctions: 6,
|
26
|
+
suggestTableFunctions: 7,
|
27
|
+
suggestWindowFunctions: 8,
|
28
|
+
suggestFunctions: 9,
|
29
|
+
suggestUdfs: 10,
|
30
|
+
suggestSimpleTypes: 11,
|
31
|
+
};
|
32
|
+
const KEEP_CACHE_MILLIS = 5 * 60 * 1000;
|
33
|
+
function getColumnsWithCache() {
|
34
|
+
const cache = new Map();
|
35
|
+
return async (path) => {
|
36
|
+
var _a, _b, _c, _d;
|
37
|
+
const normalizedPath = removeBackticks(path);
|
38
|
+
const existed = cache.get(path);
|
39
|
+
if (existed) {
|
40
|
+
return existed;
|
41
|
+
}
|
42
|
+
const columns = [];
|
43
|
+
const data = await window.api.getDescribe({ path: normalizedPath });
|
44
|
+
if ((data === null || data === void 0 ? void 0 : data.Status) === 'StatusSuccess') {
|
45
|
+
const desc = data.PathDescription;
|
46
|
+
if ((_a = desc === null || desc === void 0 ? void 0 : desc.Table) === null || _a === void 0 ? void 0 : _a.Columns) {
|
47
|
+
for (const c of desc.Table.Columns) {
|
48
|
+
if (c.Name) {
|
49
|
+
columns.push(c.Name);
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
if ((_c = (_b = desc === null || desc === void 0 ? void 0 : desc.ColumnTableDescription) === null || _b === void 0 ? void 0 : _b.Schema) === null || _c === void 0 ? void 0 : _c.Columns) {
|
54
|
+
for (const c of desc.ColumnTableDescription.Schema.Columns) {
|
55
|
+
if (c.Name) {
|
56
|
+
columns.push(c.Name);
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
if ((_d = desc === null || desc === void 0 ? void 0 : desc.ExternalTableDescription) === null || _d === void 0 ? void 0 : _d.Columns) {
|
61
|
+
for (const c of desc.ExternalTableDescription.Columns) {
|
62
|
+
if (c.Name) {
|
63
|
+
columns.push(c.Name);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
67
|
+
}
|
68
|
+
cache.set(path, columns);
|
69
|
+
setTimeout(() => {
|
70
|
+
cache.delete(path);
|
71
|
+
}, KEEP_CACHE_MILLIS);
|
72
|
+
return columns;
|
73
|
+
};
|
74
|
+
}
|
75
|
+
const getColumns = getColumnsWithCache();
|
76
|
+
function getSuggestionIndex(suggestionType) {
|
77
|
+
return SuggestionsWeight[suggestionType];
|
78
|
+
}
|
79
|
+
async function getSimpleFunctions() {
|
80
|
+
return SimpleFunctions;
|
81
|
+
}
|
82
|
+
async function getWindowFunctions() {
|
83
|
+
return WindowFunctions;
|
84
|
+
}
|
85
|
+
async function getTableFunctions() {
|
86
|
+
return TableFunction;
|
87
|
+
}
|
88
|
+
async function getAggregateFunctions() {
|
89
|
+
return AggregateFunctions;
|
90
|
+
}
|
91
|
+
async function getPragmas() {
|
92
|
+
return Pragmas;
|
93
|
+
}
|
94
|
+
async function getUdfs() {
|
95
|
+
return Udfs;
|
96
|
+
}
|
97
|
+
async function getSimpleTypes() {
|
98
|
+
return SimpleTypes;
|
99
|
+
}
|
100
|
+
export async function generateColumnsSuggestion(rangeToInsertSuggestion, suggestColumns, database) {
|
101
|
+
var _a;
|
102
|
+
if (!(suggestColumns === null || suggestColumns === void 0 ? void 0 : suggestColumns.tables)) {
|
103
|
+
return [];
|
104
|
+
}
|
105
|
+
const suggestions = [];
|
106
|
+
const multi = suggestColumns.tables.length > 1;
|
107
|
+
for (const entity of (_a = suggestColumns.tables) !== null && _a !== void 0 ? _a : []) {
|
108
|
+
let normalizedEntityName = removeBackticks(entity.name);
|
109
|
+
// if it's relative entity path
|
110
|
+
if (!normalizedEntityName.startsWith('/')) {
|
111
|
+
normalizedEntityName = `${database}/${normalizedEntityName}`;
|
112
|
+
}
|
113
|
+
const fields = await getColumns(normalizedEntityName);
|
114
|
+
fields.forEach((columnName) => {
|
115
|
+
const normalizedName = wrapStringToBackticks(columnName);
|
116
|
+
let columnNameSuggestion = normalizedName;
|
117
|
+
if (entity.alias) {
|
118
|
+
columnNameSuggestion = `${entity.alias}.${normalizedName}`;
|
119
|
+
}
|
120
|
+
else if (multi) {
|
121
|
+
// no need to wrap entity.name to backticks, because it's already with them if needed
|
122
|
+
columnNameSuggestion = `${entity.name}.${normalizedName}`;
|
123
|
+
}
|
124
|
+
suggestions.push({
|
125
|
+
label: columnNameSuggestion,
|
126
|
+
insertText: columnNameSuggestion,
|
127
|
+
kind: monaco.languages.CompletionItemKind.Field,
|
128
|
+
detail: 'Column',
|
129
|
+
range: rangeToInsertSuggestion,
|
130
|
+
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestColumns')),
|
131
|
+
});
|
132
|
+
});
|
133
|
+
}
|
134
|
+
return suggestions;
|
135
|
+
}
|
136
|
+
export function generateColumnAliasesSuggestion(rangeToInsertSuggestion, suggestColumnAliases) {
|
137
|
+
if (!suggestColumnAliases) {
|
138
|
+
return [];
|
139
|
+
}
|
140
|
+
return suggestColumnAliases === null || suggestColumnAliases === void 0 ? void 0 : suggestColumnAliases.map((columnAliasSuggestion) => ({
|
141
|
+
label: columnAliasSuggestion.name,
|
142
|
+
insertText: columnAliasSuggestion.name,
|
143
|
+
kind: monaco.languages.CompletionItemKind.Field,
|
144
|
+
detail: 'Column alias',
|
145
|
+
range: rangeToInsertSuggestion,
|
146
|
+
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestColumnAliases')),
|
147
|
+
}));
|
148
|
+
}
|
149
|
+
export function generateKeywordsSuggestion(rangeToInsertSuggestion, suggestKeywords) {
|
150
|
+
if (!suggestKeywords) {
|
151
|
+
return [];
|
152
|
+
}
|
153
|
+
return suggestKeywords === null || suggestKeywords === void 0 ? void 0 : suggestKeywords.map((keywordSuggestion) => ({
|
154
|
+
label: keywordSuggestion.value,
|
155
|
+
insertText: keywordSuggestion.value,
|
156
|
+
kind: monaco.languages.CompletionItemKind.Keyword,
|
157
|
+
detail: 'Keyword',
|
158
|
+
range: rangeToInsertSuggestion,
|
159
|
+
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestKeywords')),
|
160
|
+
}));
|
161
|
+
}
|
162
|
+
export async function generateEntitiesSuggestion(_rangeToInsertSuggestion) {
|
163
|
+
return [];
|
164
|
+
}
|
165
|
+
export async function generateSimpleFunctionsSuggestion(rangeToInsertSuggestion) {
|
166
|
+
const functions = await getSimpleFunctions();
|
167
|
+
return functions.map((el) => ({
|
168
|
+
label: el,
|
169
|
+
insertText: el,
|
170
|
+
kind: monaco.languages.CompletionItemKind.Function,
|
171
|
+
detail: 'Function',
|
172
|
+
range: rangeToInsertSuggestion,
|
173
|
+
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestFunctions')),
|
174
|
+
}));
|
175
|
+
}
|
176
|
+
export async function generateSimpleTypesSuggestion(rangeToInsertSuggestion) {
|
177
|
+
const simpleTypes = await getSimpleTypes();
|
178
|
+
return simpleTypes.map((el) => ({
|
179
|
+
label: el,
|
180
|
+
insertText: el,
|
181
|
+
kind: monaco.languages.CompletionItemKind.TypeParameter,
|
182
|
+
detail: 'Type',
|
183
|
+
range: rangeToInsertSuggestion,
|
184
|
+
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestSimpleTypes')),
|
185
|
+
}));
|
186
|
+
}
|
187
|
+
export async function generateUdfSuggestion(rangeToInsertSuggestion) {
|
188
|
+
const udfs = await getUdfs();
|
189
|
+
return udfs.map((el) => ({
|
190
|
+
label: el,
|
191
|
+
insertText: el,
|
192
|
+
kind: monaco.languages.CompletionItemKind.Function,
|
193
|
+
detail: 'UDF',
|
194
|
+
range: rangeToInsertSuggestion,
|
195
|
+
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestUdfs')),
|
196
|
+
}));
|
197
|
+
}
|
198
|
+
export async function generateWindowFunctionsSuggestion(rangeToInsertSuggestion) {
|
199
|
+
const windowFunctions = await getWindowFunctions();
|
200
|
+
return windowFunctions.map((el) => ({
|
201
|
+
label: el,
|
202
|
+
insertText: el,
|
203
|
+
kind: monaco.languages.CompletionItemKind.Function,
|
204
|
+
detail: 'Window function',
|
205
|
+
range: rangeToInsertSuggestion,
|
206
|
+
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestWindowFunctions')),
|
207
|
+
}));
|
208
|
+
}
|
209
|
+
export async function generateTableFunctionsSuggestion(rangeToInsertSuggestion) {
|
210
|
+
const tableFunctions = await getTableFunctions();
|
211
|
+
return tableFunctions.map((el) => ({
|
212
|
+
label: el,
|
213
|
+
insertText: el,
|
214
|
+
kind: monaco.languages.CompletionItemKind.Function,
|
215
|
+
detail: 'Table function',
|
216
|
+
range: rangeToInsertSuggestion,
|
217
|
+
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestTableFunctions')),
|
218
|
+
}));
|
219
|
+
}
|
220
|
+
export async function generateAggregateFunctionsSuggestion(rangeToInsertSuggestion) {
|
221
|
+
const aggreagteFunctions = await getAggregateFunctions();
|
222
|
+
return aggreagteFunctions.map((el) => ({
|
223
|
+
label: el,
|
224
|
+
insertText: el,
|
225
|
+
kind: monaco.languages.CompletionItemKind.Function,
|
226
|
+
detail: 'Aggregate function',
|
227
|
+
range: rangeToInsertSuggestion,
|
228
|
+
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestAggregateFunctions')),
|
229
|
+
}));
|
230
|
+
}
|
231
|
+
export async function generatePragmasSuggestion(rangeToInsertSuggestion) {
|
232
|
+
const pragmas = await getPragmas();
|
233
|
+
return pragmas.map((el) => ({
|
234
|
+
label: el,
|
235
|
+
insertText: el,
|
236
|
+
kind: monaco.languages.CompletionItemKind.Module,
|
237
|
+
detail: 'Pragma',
|
238
|
+
range: rangeToInsertSuggestion,
|
239
|
+
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestPragmas')),
|
240
|
+
}));
|
241
|
+
}
|
242
|
+
const alphabet = 'abcdefghijklmnopqrstuvwxyz';
|
243
|
+
function suggestionIndexToWeight(index) {
|
244
|
+
const characterInsideAlphabet = alphabet[index];
|
245
|
+
if (characterInsideAlphabet) {
|
246
|
+
return characterInsideAlphabet;
|
247
|
+
}
|
248
|
+
const duplicateTimes = Math.floor(index / alphabet.length);
|
249
|
+
const remains = index % alphabet.length;
|
250
|
+
const lastCharacter = alphabet.slice(-1);
|
251
|
+
return lastCharacter.repeat(duplicateTimes) + alphabet[remains];
|
252
|
+
}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import type Monaco from 'monaco-editor';
|
2
|
+
export declare function createProvideSuggestionsFunction(database: string): (model: Monaco.editor.ITextModel, monacoCursorPosition: Monaco.Position, _context: Monaco.languages.CompletionContext, _token: Monaco.CancellationToken) => Promise<{
|
3
|
+
suggestions: Monaco.languages.CompletionItem[];
|
4
|
+
}>;
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import { parseYqlQuery } from '@gravity-ui/websql-autocomplete';
|
2
|
+
import { generateAggregateFunctionsSuggestion, generateColumnAliasesSuggestion, generateColumnsSuggestion, generateEntitiesSuggestion, generateKeywordsSuggestion, generatePragmasSuggestion, generateSimpleFunctionsSuggestion, generateSimpleTypesSuggestion, generateTableFunctionsSuggestion, generateUdfSuggestion, generateWindowFunctionsSuggestion, } from './generateSuggestions';
|
3
|
+
export function createProvideSuggestionsFunction(database) {
|
4
|
+
return async (model, monacoCursorPosition, _context, _token) => {
|
5
|
+
const cursorPosition = {
|
6
|
+
line: monacoCursorPosition.lineNumber,
|
7
|
+
column: monacoCursorPosition.column,
|
8
|
+
};
|
9
|
+
const rangeToInsertSuggestion = getRangeToInsertSuggestion(model, monacoCursorPosition);
|
10
|
+
const suggestions = await getSuggestions(model, cursorPosition, rangeToInsertSuggestion, database);
|
11
|
+
return { suggestions };
|
12
|
+
};
|
13
|
+
}
|
14
|
+
async function getSuggestions(model, cursorPosition, rangeToInsertSuggestion, database) {
|
15
|
+
const parseResult = parseYqlQuery(model.getValue(), cursorPosition);
|
16
|
+
let entitiesSuggestions = [];
|
17
|
+
let functionsSuggestions = [];
|
18
|
+
let aggregateFunctionsSuggestions = [];
|
19
|
+
let windowFunctionsSuggestions = [];
|
20
|
+
let tableFunctionsSuggestions = [];
|
21
|
+
let udfsSuggestions = [];
|
22
|
+
let simpleTypesSuggestions = [];
|
23
|
+
let pragmasSuggestions = [];
|
24
|
+
if (parseResult.suggestEntity) {
|
25
|
+
entitiesSuggestions = await generateEntitiesSuggestion(rangeToInsertSuggestion);
|
26
|
+
}
|
27
|
+
if (parseResult.suggestFunctions) {
|
28
|
+
functionsSuggestions = await generateSimpleFunctionsSuggestion(rangeToInsertSuggestion);
|
29
|
+
}
|
30
|
+
if (parseResult.suggestAggregateFunctions) {
|
31
|
+
aggregateFunctionsSuggestions = await generateAggregateFunctionsSuggestion(rangeToInsertSuggestion);
|
32
|
+
}
|
33
|
+
if (parseResult.suggestWindowFunctions) {
|
34
|
+
windowFunctionsSuggestions = await generateWindowFunctionsSuggestion(rangeToInsertSuggestion);
|
35
|
+
}
|
36
|
+
if (parseResult.suggestTableFunctions) {
|
37
|
+
tableFunctionsSuggestions = await generateTableFunctionsSuggestion(rangeToInsertSuggestion);
|
38
|
+
}
|
39
|
+
if (parseResult.suggestSimpleTypes) {
|
40
|
+
simpleTypesSuggestions = await generateSimpleTypesSuggestion(rangeToInsertSuggestion);
|
41
|
+
}
|
42
|
+
if (parseResult.suggestUdfs) {
|
43
|
+
udfsSuggestions = await generateUdfSuggestion(rangeToInsertSuggestion);
|
44
|
+
}
|
45
|
+
if (parseResult.suggestPragmas) {
|
46
|
+
pragmasSuggestions = await generatePragmasSuggestion(rangeToInsertSuggestion);
|
47
|
+
}
|
48
|
+
const columnAliasSuggestion = await generateColumnAliasesSuggestion(rangeToInsertSuggestion, parseResult.suggestColumnAliases);
|
49
|
+
const columnsSuggestions = await generateColumnsSuggestion(rangeToInsertSuggestion, parseResult.suggestColumns, database);
|
50
|
+
const keywordsSuggestions = generateKeywordsSuggestion(rangeToInsertSuggestion, parseResult.suggestKeywords);
|
51
|
+
const suggestions = [
|
52
|
+
...entitiesSuggestions,
|
53
|
+
...functionsSuggestions,
|
54
|
+
...windowFunctionsSuggestions,
|
55
|
+
...tableFunctionsSuggestions,
|
56
|
+
...udfsSuggestions,
|
57
|
+
...simpleTypesSuggestions,
|
58
|
+
...pragmasSuggestions,
|
59
|
+
...columnAliasSuggestion,
|
60
|
+
...columnsSuggestions,
|
61
|
+
...keywordsSuggestions,
|
62
|
+
...aggregateFunctionsSuggestions,
|
63
|
+
];
|
64
|
+
return suggestions;
|
65
|
+
}
|
66
|
+
function getRangeToInsertSuggestion(model, cursorPosition) {
|
67
|
+
const { startColumn: lastWordStartColumn, endColumn: lastWordEndColumn } = model.getWordUntilPosition(cursorPosition);
|
68
|
+
// https://github.com/microsoft/Monaco-editor/discussions/3639#discussioncomment-5190373 if user already typed "$" sign, it should not be duplicated
|
69
|
+
const dollarBeforeLastWordStart = model.getLineContent(cursorPosition.lineNumber)[lastWordStartColumn - 2] === '$' ? 1 : 0;
|
70
|
+
return {
|
71
|
+
startColumn: lastWordStartColumn - dollarBeforeLastWordStart,
|
72
|
+
startLineNumber: cursorPosition.lineNumber,
|
73
|
+
endColumn: lastWordEndColumn,
|
74
|
+
endLineNumber: cursorPosition.lineNumber,
|
75
|
+
};
|
76
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ydb-embedded-ui",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.3.0",
|
4
4
|
"files": [
|
5
5
|
"dist"
|
6
6
|
],
|
@@ -10,7 +10,7 @@
|
|
10
10
|
"url": "git@github.com:ydb-platform/ydb-embedded-ui.git"
|
11
11
|
},
|
12
12
|
"dependencies": {
|
13
|
-
"@gravity-ui/axios-wrapper": "^1.
|
13
|
+
"@gravity-ui/axios-wrapper": "^1.4.1",
|
14
14
|
"@gravity-ui/chartkit": "^4.20.1",
|
15
15
|
"@gravity-ui/components": "^2.12.0",
|
16
16
|
"@gravity-ui/date-utils": "^1.4.2",
|
@@ -20,7 +20,9 @@
|
|
20
20
|
"@gravity-ui/paranoid": "^1.4.0",
|
21
21
|
"@gravity-ui/react-data-table": "^1.2.0",
|
22
22
|
"@gravity-ui/uikit": "^5.30.1",
|
23
|
-
"
|
23
|
+
"@gravity-ui/websql-autocomplete": "^8.0.2",
|
24
|
+
"@reduxjs/toolkit": "^2.2.1",
|
25
|
+
"axios": "^1.6.7",
|
24
26
|
"bem-cn-lite": "^4.1.0",
|
25
27
|
"copy-to-clipboard": "^3.3.3",
|
26
28
|
"crc-32": "^1.2.2",
|
@@ -31,18 +33,17 @@
|
|
31
33
|
"path-to-regexp": "^3.0.0",
|
32
34
|
"qs": "^6.11.0",
|
33
35
|
"react-error-boundary": "^4.0.12",
|
34
|
-
"react-json-inspector": "^7.1.1",
|
35
36
|
"react-helmet-async": "2.0.4",
|
37
|
+
"react-json-inspector": "^7.1.1",
|
36
38
|
"react-list": "^0.8.11",
|
37
39
|
"react-monaco-editor": "^0.47.0",
|
38
40
|
"react-redux": "^7.2.6",
|
39
41
|
"react-router": "^5.2.1",
|
40
42
|
"react-router-dom": "^5.3.0",
|
41
43
|
"react-split": "^2.0.14",
|
42
|
-
"redux": "^
|
43
|
-
"redux-location-state": "^2.
|
44
|
-
"
|
45
|
-
"reselect": "^4.1.6",
|
44
|
+
"redux": "^5.0.1",
|
45
|
+
"redux-location-state": "^2.8.2",
|
46
|
+
"tslib": "^2.6.2",
|
46
47
|
"url": "^0.11.0",
|
47
48
|
"use-query-params": "^2.2.1",
|
48
49
|
"web-vitals": "^1.1.2",
|
@@ -99,7 +100,8 @@
|
|
99
100
|
],
|
100
101
|
"testEnvironment": "jsdom",
|
101
102
|
"moduleNameMapper": {
|
102
|
-
"\\.(css|less|scss|sass)$": "jest-transform-css"
|
103
|
+
"\\.(css|less|scss|sass)$": "jest-transform-css",
|
104
|
+
"^axios$": "axios/dist/node/axios.cjs"
|
103
105
|
}
|
104
106
|
},
|
105
107
|
"browserslist": {
|
@@ -141,6 +143,7 @@
|
|
141
143
|
"npm-run-all": "^4.1.5",
|
142
144
|
"postcss": "^8.4.6",
|
143
145
|
"prettier": "^2.5.1",
|
146
|
+
"prop-types": "^15.8.1",
|
144
147
|
"react": "^17.0.2",
|
145
148
|
"react-app-rewired": "^2.1.11",
|
146
149
|
"react-dom": "^17.0.2",
|
@@ -151,12 +154,13 @@
|
|
151
154
|
"typescript": "^4.5.5"
|
152
155
|
},
|
153
156
|
"peerDependencies": {
|
157
|
+
"prop-types": "^15.8.1",
|
154
158
|
"react": "^17.0.2",
|
155
159
|
"react-dom": "^17.0.2"
|
156
160
|
},
|
157
161
|
"overrides": {
|
158
162
|
"react": "^17.0.2",
|
159
163
|
"react-dom": "^17.0.2",
|
160
|
-
"redux": "^
|
164
|
+
"redux": "^5.0.1"
|
161
165
|
}
|
162
166
|
}
|
@@ -1,3 +0,0 @@
|
|
1
|
-
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
|
2
|
-
<path d="M437.2 403.5L320 215V64h8c13.3 0 24-10.7 24-24V24c0-13.3-10.7-24-24-24H120c-13.3 0-24 10.7-24 24v16c0 13.3 10.7 24 24 24h8v151L10.8 403.5C-18.5 450.6 15.3 512 70.9 512h306.2c55.7 0 89.4-61.5 60.1-108.5zM137.9 320l48.2-77.6c3.7-5.2 5.8-11.6 5.8-18.4V64h64v160c0 6.9 2.2 13.2 5.8 18.4l48.2 77.6h-172z"/>
|
3
|
-
</svg>
|
@@ -1 +0,0 @@
|
|
1
|
-
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="star" class="svg-inline--fa fa-star" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M316.7 17.8l65.43 132.4l146.4 21.29c26.27 3.796 36.79 36.09 17.75 54.59l-105.9 102.1l25.05 145.5c4.508 26.31-23.23 45.9-46.49 33.7L288 439.6l-130.9 68.7C133.8 520.5 106.1 500.9 110.6 474.6l25.05-145.5L29.72 226.1c-19.03-18.5-8.516-50.79 17.75-54.59l146.4-21.29l65.43-132.4C271.1-6.083 305-5.786 316.7 17.8z"></path></svg>
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import block from 'bem-cn-lite';
|
3
|
-
import { Link } from '@gravity-ui/uikit';
|
4
|
-
import { Icon } from '../Icon/Icon';
|
5
|
-
import './ExternalLinkWithIcon.scss';
|
6
|
-
const b = block('ydb-external-link-with-icon');
|
7
|
-
export const ExternalLinkWithIcon = ({ title, url }) => {
|
8
|
-
return (_jsxs(Link, Object.assign({ href: url, target: "_blank", className: b() }, { children: [title, '\u00a0', _jsx(Icon, { name: "external", viewBox: '0 0 16 16', width: 16, height: 16 })] })));
|
9
|
-
};
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import block from 'bem-cn-lite';
|
3
|
-
import { Skeleton } from '@gravity-ui/uikit';
|
4
|
-
import './ClusterInfoSkeleton.scss';
|
5
|
-
const b = block('ydb-cluster-info-skeleton');
|
6
|
-
const SkeletonLabel = () => (_jsxs("div", Object.assign({ className: b('label') }, { children: [_jsx(Skeleton, { className: b('label__text') }), _jsx("div", { className: b('label__dots') })] })));
|
7
|
-
export const ClusterInfoSkeleton = ({ rows = 8, className }) => (_jsxs("div", Object.assign({ className: b(null, className) }, { children: [[...new Array(rows)].map((_, index) => (_jsxs("div", Object.assign({ className: b('row') }, { children: [_jsx(SkeletonLabel, {}), _jsx(Skeleton, { className: b('value') })] }), `skeleton-row-${index}`))), _jsxs("div", Object.assign({ className: b('row') }, { children: [_jsx(SkeletonLabel, {}), _jsx(Skeleton, { className: b('versions') })] }), "versions")] })));
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import { Selector } from 'reselect';
|
2
|
-
import { Reducer } from 'redux';
|
3
|
-
import type { IHealthCheckInfoAction, IHealthcheckInfoRootStateSlice, IHealthcheckInfoState, IIssuesTree } from '../../types/store/healthcheck';
|
4
|
-
import type { IssueLog, StatusFlag } from '../../types/api/healthcheck';
|
5
|
-
export declare const FETCH_HEALTHCHECK: {
|
6
|
-
readonly REQUEST: "cluster/FETCH_HEALTHCHECK_REQUEST";
|
7
|
-
readonly SUCCESS: "cluster/FETCH_HEALTHCHECK_SUCCESS";
|
8
|
-
readonly FAILURE: "cluster/FETCH_HEALTHCHECK_FAILURE";
|
9
|
-
};
|
10
|
-
declare const healthcheckInfo: Reducer<IHealthcheckInfoState, IHealthCheckInfoAction>;
|
11
|
-
export declare const selectIssuesTreesRoots: Selector<IHealthcheckInfoRootStateSlice, IssueLog[]>;
|
12
|
-
export declare const selectIssuesTrees: Selector<IHealthcheckInfoRootStateSlice, IIssuesTree[]>;
|
13
|
-
export declare const selectIssuesStatistics: Selector<IHealthcheckInfoRootStateSlice, [
|
14
|
-
StatusFlag,
|
15
|
-
number
|
16
|
-
][]>;
|
17
|
-
export declare function getHealthcheckInfo(database: string): (dispatch: import("redux").Dispatch<import("redux").AnyAction>, getState: import(".").GetState) => Promise<unknown>;
|
18
|
-
export declare const setDataWasNotLoaded: () => {
|
19
|
-
readonly type: "healthcheckInfo/SET_DATA_WAS_NOT_LOADED";
|
20
|
-
};
|
21
|
-
export default healthcheckInfo;
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import { ApiRequestAction } from '../../store/utils';
|
2
|
-
import { FETCH_HEALTHCHECK, setDataWasNotLoaded } from '../../store/reducers/healthcheckInfo';
|
3
|
-
import { IResponseError } from '../api/error';
|
4
|
-
import type { HealthCheckAPIResponse, IssueLog } from '../api/healthcheck';
|
5
|
-
export interface IIssuesTree extends IssueLog {
|
6
|
-
reasonsItems?: IIssuesTree[];
|
7
|
-
}
|
8
|
-
export declare type IHealthCheck = HealthCheckAPIResponse;
|
9
|
-
export interface IHealthcheckInfoState {
|
10
|
-
loading: boolean;
|
11
|
-
wasLoaded: boolean;
|
12
|
-
data?: HealthCheckAPIResponse;
|
13
|
-
error?: IResponseError;
|
14
|
-
}
|
15
|
-
declare type IHealthCheckApiRequestAction = ApiRequestAction<typeof FETCH_HEALTHCHECK, HealthCheckAPIResponse, IResponseError>;
|
16
|
-
export declare type IHealthCheckInfoAction = IHealthCheckApiRequestAction | ReturnType<typeof setDataWasNotLoaded>;
|
17
|
-
export interface IHealthcheckInfoRootStateSlice {
|
18
|
-
healthcheckInfo: IHealthcheckInfoState;
|
19
|
-
}
|
20
|
-
export {};
|
package/dist/utils/pdisk.d.ts
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
import type { TPDiskStateInfo } from '../types/api/pdisk';
|
2
|
-
/**
|
3
|
-
* Parses a binary string containing a bit field into an object with binary values.
|
4
|
-
* This is an implementation based on string manipulation, since JS can only perform
|
5
|
-
* bitwise operations with 32-bits integers, and YDB sends uint64.
|
6
|
-
* @see https://en.cppreference.com/w/c/language/bit_field
|
7
|
-
* @param binaryString - binary string representing a bit field
|
8
|
-
* @param bitFieldStruct - bit field description, <field => size in bits>, in order starting from the rightmost bit
|
9
|
-
* @returns object with binary values
|
10
|
-
*/
|
11
|
-
export declare const parseBitField: <T extends Record<string, number>>(binaryString: string, bitFieldStruct: T) => Record<keyof T, string>;
|
12
|
-
export declare enum IPDiskType {
|
13
|
-
HDD = "HDD",
|
14
|
-
SSD = "SSD",
|
15
|
-
MVME = "NVME"
|
16
|
-
}
|
17
|
-
export declare const getPDiskType: (data: TPDiskStateInfo) => IPDiskType | undefined;
|
File without changes
|