ydb-embedded-ui 6.11.0 → 6.13.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/AutoRefreshControl/i18n/index.d.ts +1 -1
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.d.ts +3 -2
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js +9 -5
- package/dist/components/CriticalActionDialog/CriticalActionDialog.d.ts +5 -3
- package/dist/components/CriticalActionDialog/CriticalActionDialog.js +8 -7
- package/dist/components/CriticalActionDialog/CriticalActionDialog.scss +1 -1
- package/dist/components/CriticalActionDialog/i18n/en.json +1 -0
- package/dist/components/CriticalActionDialog/i18n/index.d.ts +1 -1
- package/dist/components/DateRange/DateRange.d.ts +4 -4
- package/dist/components/DateRange/DateRange.js +23 -26
- package/dist/components/DateRange/DateRange.scss +14 -13
- package/dist/components/DateRange/__test__/fromDateRangeValues.test.js +80 -0
- package/dist/components/DateRange/__test__/getdatePickerSize.test.d.ts +1 -0
- package/dist/components/DateRange/__test__/getdatePickerSize.test.js +56 -0
- package/dist/components/DateRange/__test__/toDateRangeValues.test.d.ts +1 -0
- package/dist/components/DateRange/__test__/toDateRangeValues.test.js +80 -0
- package/dist/components/DateRange/i18n/en.json +4 -0
- package/dist/components/DateRange/i18n/index.d.ts +2 -0
- package/dist/components/DateRange/i18n/index.js +5 -0
- package/dist/components/DateRange/i18n/ru.json +4 -0
- package/dist/components/DateRange/utils.d.ts +5 -0
- package/dist/components/DateRange/utils.js +41 -0
- package/dist/components/DeveloperUILinkButton/DeveloperUILinkButton.d.ts +8 -0
- package/dist/components/{DeveloperUiLink/DeveloperUiLink.js → DeveloperUILinkButton/DeveloperUILinkButton.js} +3 -3
- package/dist/components/{DeveloperUiLink/DeveloperUiLink.scss → DeveloperUILinkButton/DeveloperUILinkButton.scss} +3 -2
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.d.ts +6 -1
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.js +22 -12
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.scss +45 -45
- package/dist/components/EntityStatus/EntityStatus.js +1 -1
- package/dist/components/EntityStatus/EntityStatus.scss +6 -2
- package/dist/components/Errors/PageError/PageError.d.ts +11 -0
- package/dist/components/Errors/PageError/PageError.js +19 -0
- package/dist/components/Errors/i18n/en.json +2 -1
- package/dist/components/Errors/i18n/index.d.ts +1 -1
- package/dist/components/Errors/i18n/ru.json +2 -1
- package/dist/components/Fullscreen/Fullscreen.d.ts +1 -1
- package/dist/components/Fullscreen/Fullscreen.js +34 -27
- package/dist/components/Fullscreen/Fullscreen.scss +16 -8
- package/dist/components/Graph/Graph.d.ts +13 -0
- package/dist/components/Graph/Graph.js +41 -0
- package/dist/components/LabelWithPopover/LabelWithPopover.d.ts +4 -1
- package/dist/components/LabelWithPopover/LabelWithPopover.js +1 -1
- package/dist/components/Loader/Loader.d.ts +2 -1
- package/dist/components/Loader/Loader.js +6 -1
- package/dist/components/LoaderWrapper/LoaderWrapper.d.ts +10 -0
- package/dist/components/LoaderWrapper/LoaderWrapper.js +8 -0
- package/dist/components/MetricChart/reducer.d.ts +2 -2
- package/dist/components/MonacoEditor/MonacoEditor.js +0 -2
- package/dist/components/NodeHostWrapper/NodeHostWrapper.d.ts +0 -1
- package/dist/components/NodeHostWrapper/NodeHostWrapper.js +3 -6
- package/dist/components/PDiskInfo/PDiskInfo.d.ts +8 -5
- package/dist/components/PDiskInfo/PDiskInfo.js +76 -26
- package/dist/components/PDiskInfo/PDiskInfo.scss +15 -1
- package/dist/components/PDiskInfo/i18n/en.json +11 -5
- package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/PDiskPopup/PDiskPopup.js +8 -2
- package/dist/components/ProgressViewer/ProgressViewer.js +3 -0
- package/dist/components/QueryExecutionStatus/QueryExecutionStatus.js +13 -3
- package/dist/components/QueryExecutionStatus/QueryExecutionStatus.scss +4 -0
- package/dist/components/QuerySettingsDescription/QuerySettingsDescription.d.ts +7 -0
- package/dist/components/QuerySettingsDescription/QuerySettingsDescription.js +8 -0
- package/dist/components/QuerySettingsDescription/QuerySettingsDescription.scss +8 -0
- package/dist/components/QuerySettingsDescription/index.d.ts +1 -0
- package/dist/components/QuerySettingsDescription/index.js +1 -0
- package/dist/components/VDisk/VDisk.js +3 -4
- package/dist/components/VDiskInfo/VDiskInfo.d.ts +4 -3
- package/dist/components/VDiskInfo/VDiskInfo.js +12 -5
- package/dist/components/VDiskInfo/VDiskInfo.scss +7 -1
- package/dist/components/VDiskInfo/i18n/en.json +2 -1
- package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
- package/dist/containers/App/Content.js +15 -19
- package/dist/containers/AsideNavigation/AsideNavigation.js +2 -1
- package/dist/containers/AsideNavigation/YdbInternalUser/YdbInternalUser.js +4 -4
- package/dist/containers/Authentication/Authentication.js +8 -10
- package/dist/containers/Authentication/utils.d.ts +8 -0
- package/dist/containers/Authentication/utils.js +15 -0
- package/dist/containers/Cluster/Cluster.scss +1 -4
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +6 -6
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +1 -1
- package/dist/containers/Clusters/constants.d.ts +1 -1
- package/dist/containers/Heatmap/Heatmap.d.ts +2 -1
- package/dist/containers/Heatmap/Heatmap.js +7 -6
- package/dist/containers/Node/Node.js +5 -7
- package/dist/containers/Node/Node.scss +5 -4
- package/dist/containers/Node/NodeStructure/NodeStructure.js +4 -4
- package/dist/containers/Node/NodeStructure/NodeStructure.scss +4 -20
- package/dist/containers/Node/NodeStructure/Pdisk.js +3 -3
- package/dist/containers/Nodes/Nodes.js +6 -8
- package/dist/containers/Nodes/getNodesColumns.js +6 -21
- package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.d.ts +6 -0
- package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.js +24 -0
- package/dist/containers/PDiskPage/PDiskPage.js +79 -30
- package/dist/containers/PDiskPage/PDiskPage.scss +8 -5
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.d.ts +7 -0
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js +93 -0
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.scss +52 -0
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/utils.d.ts +4 -0
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/utils.js +9 -0
- package/dist/containers/PDiskPage/i18n/en.json +9 -1
- package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/PDisk/PDisk.js +3 -4
- package/dist/containers/Storage/Storage.js +4 -6
- package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js +16 -6
- package/dist/containers/Tablet/Tablet.js +2 -2
- package/dist/containers/Tablet/TabletControls/TabletControls.js +2 -1
- package/dist/containers/Tablets/Tablets.js +14 -13
- package/dist/containers/Tenant/Acl/Acl.d.ts +2 -1
- package/dist/containers/Tenant/Acl/Acl.js +10 -8
- package/dist/containers/Tenant/Acl/Acl.scss +8 -8
- package/dist/containers/Tenant/Acl/i18n/en.json +6 -0
- package/dist/containers/Tenant/Acl/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Acl/i18n/index.js +4 -0
- package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.js +2 -5
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.js +14 -17
- package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.js +1 -1
- package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.scss +1 -0
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js +3 -3
- package/dist/containers/Tenant/Diagnostics/Diagnostics.scss +3 -1
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +3 -3
- package/dist/containers/Tenant/Diagnostics/Network/Network.js +8 -11
- package/dist/containers/Tenant/Diagnostics/Network/Network.scss +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.d.ts +2 -2
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +8 -10
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/en.json +14 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/index.js +1 -2
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo.js +36 -17
- package/dist/containers/Tenant/Diagnostics/Overview/TopicStats/TopicStats.js +3 -4
- package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +1 -4
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +8 -5
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverviewTableLayout.js +3 -3
- package/dist/containers/Tenant/Diagnostics/TenantOverview/getSectionTitle.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/getSectionTitle.js +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/en.json +3 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +6 -5
- package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.d.ts +2 -2
- package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.js +14 -14
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +7 -6
- package/dist/containers/Tenant/Diagnostics/TopShards/getTopShardsColumns.js +4 -4
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +31 -18
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.d.ts +2 -2
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +56 -20
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.scss +10 -6
- package/dist/containers/Tenant/Query/ExecuteResult/i18n/en.json +7 -0
- package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.js +4 -0
- package/dist/containers/Tenant/Query/ExecuteResult/utils.d.ts +18 -0
- package/dist/containers/Tenant/Query/ExecuteResult/utils.js +36 -0
- package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.d.ts +23 -1
- package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +56 -111
- package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.scss +1 -30
- package/dist/containers/Tenant/Query/ExplainResult/components/Ast/Ast.d.ts +7 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/Ast/Ast.js +18 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/Ast/Ast.scss +8 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/Graph/Graph.d.ts +8 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/Graph/Graph.js +14 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/Graph/Graph.scss +14 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/MetricsCell.d.ts +6 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/MetricsCell.js +11 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationCell.d.ts +13 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationCell.js +48 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationParams.d.ts +6 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationParams.js +66 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/SimplifiedPlan.d.ts +7 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/SimplifiedPlan.js +100 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/SimplifiedPlan.scss +128 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/types.d.ts +5 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/types.js +1 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/utils.d.ts +5 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/utils.js +59 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/TextExplain/TextExplain.d.ts +8 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/TextExplain/TextExplain.js +11 -0
- package/dist/containers/Tenant/Query/ExplainResult/components/TextExplain/TextExplain.scss +14 -0
- package/dist/containers/Tenant/Query/ExplainResult/i18n/en.json +8 -0
- package/dist/containers/Tenant/Query/ExplainResult/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Query/ExplainResult/i18n/index.js +4 -0
- package/dist/containers/Tenant/Query/Preview/Preview.js +2 -3
- package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js +1 -19
- package/dist/containers/Tenant/Query/QueryDuration/QueryDuration.js +1 -1
- package/dist/containers/Tenant/Query/QueryDuration/QueryDuration.scss +11 -0
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +1 -1
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +96 -95
- package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.d.ts +5 -6
- package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +18 -47
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.d.ts +2 -0
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.js +5 -0
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.test.d.ts +1 -0
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.test.js +42 -0
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.d.ts +5 -0
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.js +19 -0
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.test.d.ts +1 -0
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.test.js +56 -0
- package/dist/containers/Tenant/Query/QuerySettingsBanner/QuerySettingsBanner.d.ts +2 -0
- package/dist/containers/Tenant/Query/QuerySettingsBanner/QuerySettingsBanner.js +12 -0
- package/dist/containers/Tenant/Query/QuerySettingsBanner/QuerySettingsBanner.scss +3 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.d.ts +2 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.js +35 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.scss +63 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.d.ts +15 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.js +14 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.scss +19 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.d.ts +215 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js +131 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/en.json +13 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/index.js +5 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/ru.json +13 -0
- package/dist/containers/Tenant/Query/i18n/en.json +17 -1
- package/dist/containers/Tenant/Query/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Schema/CreateDirectoryDialog/CreateDirectoryDialog.d.ts +3 -2
- package/dist/containers/Tenant/Schema/CreateDirectoryDialog/CreateDirectoryDialog.js +2 -2
- package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.js +8 -8
- package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +6 -3
- package/dist/containers/Tenant/Schema/SchemaViewer/columns.d.ts +2 -1
- package/dist/containers/Tenant/Schema/SchemaViewer/columns.js +13 -1
- package/dist/containers/Tenant/Schema/SchemaViewer/i18n/en.json +1 -0
- package/dist/containers/Tenant/Schema/SchemaViewer/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Schema/SchemaViewer/prepareData.js +3 -2
- package/dist/containers/Tenant/Schema/SchemaViewer/types.d.ts +1 -0
- package/dist/containers/Tenant/Tenant.js +4 -8
- package/dist/containers/Tenant/TenantPages.d.ts +12 -1
- package/dist/containers/Tenant/TenantPages.js +1 -1
- package/dist/containers/Tenant/i18n/en.json +2 -2
- package/dist/containers/Tenant/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/utils/schema.js +1 -1
- package/dist/containers/Tenant/utils/schemaActions.d.ts +2 -2
- package/dist/containers/Tenant/utils/schemaActions.js +2 -2
- package/dist/containers/Tenants/Tenants.js +5 -8
- package/dist/containers/Tenants/Tenants.scss +0 -4
- package/dist/containers/UserSettings/i18n/en.json +3 -3
- package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
- package/dist/containers/UserSettings/settings.d.ts +2 -2
- package/dist/containers/UserSettings/settings.js +18 -19
- package/dist/containers/VDiskPage/VDiskPage.js +27 -13
- package/dist/containers/VDiskPage/i18n/en.json +1 -0
- package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
- package/dist/routes.js +2 -2
- package/dist/services/api.d.ts +59 -28
- package/dist/services/api.js +74 -98
- package/dist/services/settings.d.ts +11 -3
- package/dist/services/settings.js +7 -5
- package/dist/store/configureStore.d.ts +7 -7
- package/dist/store/defaultStore.d.ts +3 -3
- package/dist/store/reducers/api.d.ts +1 -1
- package/dist/store/reducers/api.js +1 -1
- package/dist/store/reducers/authentication/authentication.d.ts +37 -24
- package/dist/store/reducers/authentication/authentication.js +77 -57
- package/dist/store/reducers/authentication/types.d.ts +0 -8
- package/dist/store/reducers/capabilities/capabilities.d.ts +106 -0
- package/dist/store/reducers/capabilities/capabilities.js +22 -0
- package/dist/store/reducers/capabilities/hooks.d.ts +2 -0
- package/dist/store/reducers/capabilities/hooks.js +13 -0
- package/dist/store/reducers/cluster/cluster.d.ts +2 -2
- package/dist/store/reducers/clusterNodes/clusterNodes.d.ts +2 -2
- package/dist/store/reducers/clusters/clusters.d.ts +2 -2
- package/dist/store/reducers/describe.d.ts +5 -2
- package/dist/store/reducers/describe.js +2 -2
- package/dist/store/reducers/executeQuery.d.ts +7 -14
- package/dist/store/reducers/executeQuery.js +19 -14
- package/dist/store/reducers/executeTopQueries/executeTopQueries.d.ts +2 -2
- package/dist/store/reducers/executeTopQueries/executeTopQueries.js +19 -14
- package/dist/store/reducers/executeTopQueries/types.d.ts +2 -2
- package/dist/store/reducers/executeTopQueries/utils.js +11 -7
- package/dist/store/reducers/explainQuery/explainQuery.d.ts +5 -4
- package/dist/store/reducers/explainQuery/explainQuery.js +20 -5
- package/dist/store/reducers/explainQuery/types.d.ts +13 -1
- package/dist/store/reducers/explainQuery/utils.js +7 -2
- package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +58 -58
- package/dist/store/reducers/heatmap.d.ts +2 -2
- package/dist/store/reducers/heatmap.js +3 -3
- package/dist/store/reducers/hotKeys/hotKeys.d.ts +3 -2
- package/dist/store/reducers/hotKeys/hotKeys.js +3 -3
- package/dist/store/reducers/index.d.ts +6 -6
- package/dist/store/reducers/network/network.d.ts +2 -2
- package/dist/store/reducers/network/network.js +1 -1
- package/dist/store/reducers/node/node.d.ts +3 -3
- package/dist/store/reducers/node/selectors.d.ts +1 -1
- package/dist/store/reducers/node/selectors.js +2 -2
- package/dist/store/reducers/nodes/nodes.d.ts +3 -3
- package/dist/store/reducers/nodesList.d.ts +3 -3
- package/dist/store/reducers/overview/overview.d.ts +5 -2
- package/dist/store/reducers/overview/overview.js +2 -2
- package/dist/store/reducers/partitions/partitions.d.ts +2 -2
- package/dist/store/reducers/pdisk/pdisk.d.ts +3 -3
- package/dist/store/reducers/pdisk/pdisk.js +15 -2
- package/dist/store/reducers/pdisk/types.d.ts +17 -1
- package/dist/store/reducers/pdisk/utils.d.ts +2 -2
- package/dist/store/reducers/pdisk/utils.js +68 -8
- package/dist/store/reducers/preview.d.ts +2 -2
- package/dist/store/reducers/preview.js +1 -1
- package/dist/store/reducers/queryActions/types.d.ts +1 -1
- package/dist/store/reducers/schema/schema.d.ts +28 -10
- package/dist/store/reducers/schema/schema.js +20 -14
- package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +4 -2
- package/dist/store/reducers/schemaAcl/schemaAcl.js +9 -3
- package/dist/store/reducers/shardsWorkload/shardsWorkload.d.ts +2 -2
- package/dist/store/reducers/shardsWorkload/shardsWorkload.js +22 -6
- package/dist/store/reducers/shardsWorkload/types.d.ts +2 -2
- package/dist/store/reducers/storage/storage.d.ts +3 -3
- package/dist/store/reducers/tablet.d.ts +3 -3
- package/dist/store/reducers/tablets.d.ts +13 -13
- package/dist/store/reducers/tabletsFilters.d.ts +1 -1
- package/dist/store/reducers/tenant/tenant.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.js +1 -1
- package/dist/store/reducers/tenantOverview/topNodes/topNodes.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js +1 -1
- package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.d.ts +2 -2
- package/dist/store/reducers/tenants/selectors.d.ts +31 -30
- package/dist/store/reducers/tenants/selectors.js +8 -2
- package/dist/store/reducers/tenants/tenants.d.ts +2 -2
- package/dist/store/reducers/topic.d.ts +44 -44
- package/dist/store/reducers/vdisk/vdisk.d.ts +2 -2
- package/dist/store/reducers/vdisk/vdisk.js +1 -1
- package/dist/store/reducers/viewSchema/viewSchema.d.ts +2 -2
- package/dist/store/reducers/viewSchema/viewSchema.js +1 -1
- package/dist/store/state-url-mapping.d.ts +70 -0
- package/dist/store/state-url-mapping.js +1 -5
- package/dist/styles/mixins.scss +13 -0
- package/dist/types/api/acl.d.ts +1 -0
- package/dist/types/api/capabilities.d.ts +7 -0
- package/dist/types/api/capabilities.js +1 -0
- package/dist/types/api/modifyDisk.d.ts +8 -0
- package/dist/types/api/modifyDisk.js +1 -0
- package/dist/types/api/pdisk.d.ts +65 -2
- package/dist/types/api/query.d.ts +39 -3
- package/dist/types/api/query.js +9 -1
- package/dist/types/api/schema/shared.d.ts +8 -0
- package/dist/types/api/vdisk.d.ts +33 -2
- package/dist/types/common.d.ts +3 -0
- package/dist/types/store/heatmap.d.ts +1 -0
- package/dist/types/store/query.d.ts +11 -1
- package/dist/utils/__test__/prepareQueryExplain.test.d.ts +1 -0
- package/dist/utils/__test__/prepareQueryExplain.test.js +115 -0
- package/dist/utils/constants.d.ts +13 -3
- package/dist/utils/constants.js +15 -3
- package/dist/utils/dataFormatters/dataFormatters.d.ts +0 -5
- package/dist/utils/dataFormatters/dataFormatters.js +3 -12
- package/dist/utils/developerUI/developerUI.d.ts +1 -0
- package/dist/utils/developerUI/developerUI.js +3 -0
- package/dist/utils/disks/getPDiskType.d.ts +3 -3
- package/dist/utils/disks/helpers.d.ts +1 -0
- package/dist/utils/disks/helpers.js +3 -0
- package/dist/utils/disks/prepareDisks.d.ts +2 -2
- package/dist/utils/disks/prepareDisks.js +17 -22
- package/dist/utils/disks/types.d.ts +7 -5
- package/dist/utils/hooks/index.d.ts +2 -1
- package/dist/utils/hooks/index.js +2 -1
- package/dist/utils/hooks/useChangedQuerySettings.d.ts +10 -0
- package/dist/utils/hooks/useChangedQuerySettings.js +46 -0
- package/dist/utils/hooks/useDelayed.d.ts +1 -0
- package/dist/utils/hooks/useDelayed.js +13 -0
- package/dist/utils/hooks/useEventHandler.d.ts +6 -0
- package/dist/utils/hooks/useEventHandler.js +17 -0
- package/dist/utils/hooks/useLastQueryExecutionSettings.d.ts +2 -0
- package/dist/utils/hooks/useLastQueryExecutionSettings.js +5 -0
- package/dist/utils/hooks/useQueryExecutionSettings.d.ts +8 -0
- package/dist/utils/hooks/useQueryExecutionSettings.js +15 -0
- package/dist/utils/monaco/constats.d.ts +2 -0
- package/dist/utils/monaco/constats.js +2 -0
- package/dist/utils/monaco/yql/constants.d.ts +0 -1
- package/dist/utils/monaco/yql/constants.js +0 -1
- package/dist/utils/monaco/yql/yql.completionItemProvider.js +2 -2
- package/dist/utils/prepareQueryExplain.d.ts +3 -1
- package/dist/utils/prepareQueryExplain.js +54 -2
- package/dist/utils/query.d.ts +24 -1
- package/dist/utils/query.js +41 -0
- package/dist/utils/query.test.js +3 -0
- package/dist/utils/utils.d.ts +8 -7
- package/dist/utils/utils.js +23 -11
- package/package.json +8 -2
- package/dist/components/DeveloperUiLink/DeveloperUiLink.d.ts +0 -8
- package/dist/components/NodeHostWrapper/NodeHostWrapper.scss +0 -15
- package/dist/containers/Node/NodeStructure/Vdisk.d.ts +0 -6
- package/dist/containers/Node/NodeStructure/Vdisk.js +0 -13
- package/dist/containers/PDiskPage/PDiskGroups.d.ts +0 -9
- package/dist/containers/PDiskPage/PDiskGroups.js +0 -20
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/ru.json +0 -5
- package/dist/containers/Tenant/Query/ExplainResult/utils.d.ts +0 -2
- package/dist/containers/Tenant/Query/ExplainResult/utils.js +0 -4
- package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.d.ts +0 -5
- package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.js +0 -38
- package/dist/store/utils.d.ts +0 -23
- package/dist/store/utils.js +0 -49
- package/dist/types/api/restartPDisk.d.ts +0 -4
- package/dist/utils/hooks/useQueryModes.d.ts +0 -2
- package/dist/utils/hooks/useQueryModes.js +0 -5
- package/dist/utils/monaco/index.d.ts +0 -1
- package/dist/utils/monaco/index.js +0 -6
- package/dist/utils/monaco/s-expression/constants.d.ts +0 -1
- package/dist/utils/monaco/s-expression/constants.js +0 -1
- package/dist/utils/monaco/s-expression/registerLanguage.d.ts +0 -1
- package/dist/utils/monaco/s-expression/registerLanguage.js +0 -59
- package/dist/utils/monaco/yql/registerLanguage.d.ts +0 -1
- package/dist/utils/monaco/yql/registerLanguage.js +0 -8
- package/dist/utils/monaco/yql/yql.d.ts +0 -7
- package/dist/utils/monaco/yql/yql.js +0 -180
- package/dist/utils/monaco/yql/yql.keywords.d.ts +0 -3
- package/dist/utils/monaco/yql/yql.keywords.js +0 -3
- /package/dist/{types/api/restartPDisk.js → components/DateRange/__test__/fromDateRangeValues.test.d.ts} +0 -0
@@ -1,10 +1,13 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import { getPDiskPagePath } from '../../routes';
|
3
|
+
import { selectIsUserAllowedToMakeChanges } from '../../store/reducers/authentication/authentication';
|
4
|
+
import { useDiskPagesAvailable } from '../../store/reducers/capabilities/hooks';
|
3
5
|
import { valueIsDefined } from '../../utils';
|
6
|
+
import { formatBytes } from '../../utils/bytesParsers';
|
4
7
|
import { cn } from '../../utils/cn';
|
5
|
-
import { EMPTY_DATA_PLACEHOLDER } from '../../utils/constants';
|
6
8
|
import { formatStorageValuesToGb } from '../../utils/dataFormatters/dataFormatters';
|
7
9
|
import { createPDiskDeveloperUILink } from '../../utils/developerUI/developerUI';
|
10
|
+
import { useTypedSelector } from '../../utils/hooks';
|
8
11
|
import { EntityStatus } from '../EntityStatus/EntityStatus';
|
9
12
|
import { InfoViewer } from '../InfoViewer/InfoViewer';
|
10
13
|
import { LinkWithIcon } from '../LinkWithIcon/LinkWithIcon';
|
@@ -12,58 +15,105 @@ import { ProgressViewer } from '../ProgressViewer/ProgressViewer';
|
|
12
15
|
import { pDiskInfoKeyset } from './i18n';
|
13
16
|
import './PDiskInfo.scss';
|
14
17
|
const b = cn('ydb-pdisk-info');
|
15
|
-
|
16
|
-
|
17
|
-
const
|
18
|
-
const
|
19
|
-
|
18
|
+
// eslint-disable-next-line complexity
|
19
|
+
function getPDiskInfo({ pDisk, nodeId, withPDiskPageLink, isUserAllowedToMakeChanges, }) {
|
20
|
+
const { PDiskId, Path, Guid, Category, Type, Device, Realtime, State, SerialNumber, TotalSize, AllocatedSize, DecommitStatus, StatusV2, NumActiveSlots, ExpectedSlotCount, LogUsedSize, LogTotalSize, SystemSize, SharedWithOs, } = pDisk || {};
|
21
|
+
const generalInfo = [];
|
22
|
+
if (valueIsDefined(DecommitStatus)) {
|
23
|
+
generalInfo.push({
|
24
|
+
label: pDiskInfoKeyset('decomission-status'),
|
25
|
+
value: DecommitStatus.replace('DECOMMIT_', ''),
|
26
|
+
});
|
27
|
+
}
|
28
|
+
if (valueIsDefined(Category)) {
|
29
|
+
generalInfo.push({ label: pDiskInfoKeyset('type'), value: Type });
|
30
|
+
}
|
20
31
|
if (valueIsDefined(Path)) {
|
21
|
-
|
32
|
+
generalInfo.push({ label: pDiskInfoKeyset('path'), value: Path });
|
22
33
|
}
|
23
34
|
if (valueIsDefined(Guid)) {
|
24
|
-
|
35
|
+
generalInfo.push({ label: pDiskInfoKeyset('guid'), value: Guid });
|
25
36
|
}
|
26
|
-
|
27
|
-
|
28
|
-
|
37
|
+
// SerialNumber could be an empty string ""
|
38
|
+
if (SerialNumber) {
|
39
|
+
generalInfo.push({
|
40
|
+
label: pDiskInfoKeyset('serial-number'),
|
41
|
+
value: SerialNumber,
|
42
|
+
});
|
29
43
|
}
|
30
|
-
if (
|
31
|
-
|
32
|
-
label: pDiskInfoKeyset('
|
33
|
-
value: (
|
44
|
+
if (valueIsDefined(SharedWithOs)) {
|
45
|
+
generalInfo.push({
|
46
|
+
label: pDiskInfoKeyset('shared-with-os'),
|
47
|
+
value: pDiskInfoKeyset('yes'),
|
34
48
|
});
|
35
49
|
}
|
50
|
+
const statusInfo = [];
|
51
|
+
if (valueIsDefined(StatusV2)) {
|
52
|
+
statusInfo.push({ label: pDiskInfoKeyset('drive-status'), value: StatusV2 });
|
53
|
+
}
|
36
54
|
if (valueIsDefined(State)) {
|
37
|
-
|
55
|
+
statusInfo.push({ label: pDiskInfoKeyset('state'), value: State });
|
38
56
|
}
|
39
57
|
if (valueIsDefined(Device)) {
|
40
|
-
|
58
|
+
statusInfo.push({
|
41
59
|
label: pDiskInfoKeyset('device'),
|
42
60
|
value: _jsx(EntityStatus, { status: Device }),
|
43
61
|
});
|
44
62
|
}
|
45
63
|
if (valueIsDefined(Realtime)) {
|
46
|
-
|
64
|
+
statusInfo.push({
|
47
65
|
label: pDiskInfoKeyset('realtime'),
|
48
66
|
value: _jsx(EntityStatus, { status: Realtime }),
|
49
67
|
});
|
50
68
|
}
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
69
|
+
const spaceInfo = [];
|
70
|
+
spaceInfo.push({
|
71
|
+
label: pDiskInfoKeyset('space'),
|
72
|
+
value: (_jsx(ProgressViewer, { value: AllocatedSize, capacity: TotalSize, formatValues: formatStorageValuesToGb, colorizeProgress: true })),
|
73
|
+
});
|
74
|
+
if (valueIsDefined(NumActiveSlots) && valueIsDefined(ExpectedSlotCount)) {
|
75
|
+
spaceInfo.push({
|
76
|
+
label: pDiskInfoKeyset('slots'),
|
77
|
+
value: _jsx(ProgressViewer, { value: NumActiveSlots, capacity: ExpectedSlotCount }),
|
78
|
+
});
|
79
|
+
}
|
80
|
+
if (valueIsDefined(LogUsedSize) && valueIsDefined(LogTotalSize)) {
|
81
|
+
spaceInfo.push({
|
82
|
+
label: pDiskInfoKeyset('log-size'),
|
83
|
+
value: (_jsx(ProgressViewer, { value: LogUsedSize, capacity: LogTotalSize, formatValues: formatStorageValuesToGb })),
|
55
84
|
});
|
56
85
|
}
|
57
|
-
if (valueIsDefined(
|
86
|
+
if (valueIsDefined(SystemSize)) {
|
87
|
+
spaceInfo.push({
|
88
|
+
label: pDiskInfoKeyset('system-size'),
|
89
|
+
value: formatBytes({ value: SystemSize }),
|
90
|
+
});
|
91
|
+
}
|
92
|
+
const additionalInfo = [];
|
93
|
+
const shouldDisplayLinks = (withPDiskPageLink || isUserAllowedToMakeChanges) &&
|
94
|
+
valueIsDefined(PDiskId) &&
|
95
|
+
valueIsDefined(nodeId);
|
96
|
+
if (shouldDisplayLinks) {
|
58
97
|
const pDiskPagePath = getPDiskPagePath(PDiskId, nodeId);
|
59
98
|
const pDiskInternalViewerPath = createPDiskDeveloperUILink({
|
60
99
|
nodeId,
|
61
100
|
pDiskId: PDiskId,
|
62
101
|
});
|
63
|
-
|
102
|
+
additionalInfo.push({
|
64
103
|
label: pDiskInfoKeyset('links'),
|
65
|
-
value: (_jsxs("span", { className: b('links'), children: [
|
104
|
+
value: (_jsxs("span", { className: b('links'), children: [withPDiskPageLink && (_jsx(LinkWithIcon, { title: pDiskInfoKeyset('pdisk-page'), url: pDiskPagePath, external: false })), isUserAllowedToMakeChanges && (_jsx(LinkWithIcon, { title: pDiskInfoKeyset('developer-ui'), url: pDiskInternalViewerPath }))] })),
|
66
105
|
});
|
67
106
|
}
|
68
|
-
return
|
107
|
+
return [generalInfo, statusInfo, spaceInfo, additionalInfo];
|
108
|
+
}
|
109
|
+
export function PDiskInfo({ pDisk, nodeId, withPDiskPageLink, className, }) {
|
110
|
+
const isUserAllowedToMakeChanges = useTypedSelector(selectIsUserAllowedToMakeChanges);
|
111
|
+
const diskPagesAvailable = useDiskPagesAvailable();
|
112
|
+
const [generalInfo, statusInfo, spaceInfo, additionalInfo] = getPDiskInfo({
|
113
|
+
pDisk,
|
114
|
+
nodeId,
|
115
|
+
withPDiskPageLink: withPDiskPageLink && diskPagesAvailable,
|
116
|
+
isUserAllowedToMakeChanges,
|
117
|
+
});
|
118
|
+
return (_jsxs("div", { className: b('wrapper', className), children: [_jsxs("div", { className: b('col'), children: [_jsx(InfoViewer, { info: generalInfo, renderEmptyState: () => null }), _jsx(InfoViewer, { info: spaceInfo, renderEmptyState: () => null })] }), _jsxs("div", { className: b('col'), children: [_jsx(InfoViewer, { info: statusInfo, renderEmptyState: () => null }), _jsx(InfoViewer, { info: additionalInfo, renderEmptyState: () => null })] })] }));
|
69
119
|
}
|
@@ -1,7 +1,21 @@
|
|
1
1
|
.ydb-pdisk-info {
|
2
|
+
&__wrapper {
|
3
|
+
display: flex;
|
4
|
+
flex-flow: row wrap;
|
5
|
+
gap: 7px;
|
6
|
+
}
|
7
|
+
|
8
|
+
&__col {
|
9
|
+
display: flex;
|
10
|
+
flex-direction: column;
|
11
|
+
gap: 7px;
|
12
|
+
|
13
|
+
width: 500px;
|
14
|
+
}
|
15
|
+
|
2
16
|
&__links {
|
3
17
|
display: flex;
|
4
18
|
flex-flow: row wrap;
|
5
|
-
gap:
|
19
|
+
gap: var(--g-spacing-2);
|
6
20
|
}
|
7
21
|
}
|
@@ -1,14 +1,20 @@
|
|
1
1
|
{
|
2
|
+
"decomission-status": "Decomission Status",
|
3
|
+
"type": "Type",
|
2
4
|
"path": "Path",
|
3
5
|
"guid": "GUID",
|
4
|
-
"
|
5
|
-
"
|
6
|
-
"
|
6
|
+
"serial-number": "Serial Number",
|
7
|
+
"shared-with-os": "SharedWithOs",
|
8
|
+
"drive-status": "Drive Status",
|
7
9
|
"state": "State",
|
8
10
|
"device": "Device",
|
9
11
|
"realtime": "Realtime",
|
10
|
-
"
|
12
|
+
"space": "Space",
|
13
|
+
"slots": "Slots",
|
14
|
+
"log-size": "Log Size",
|
15
|
+
"system-size": "System Size",
|
11
16
|
"links": "Links",
|
12
17
|
"developer-ui": "Developer UI",
|
13
|
-
"pdisk-page": "PDisk page"
|
18
|
+
"pdisk-page": "PDisk page",
|
19
|
+
"yes": "Yes"
|
14
20
|
}
|
@@ -1 +1 @@
|
|
1
|
-
export declare const pDiskInfoKeyset: (key: "
|
1
|
+
export declare const pDiskInfoKeyset: (key: "type" | "path" | "space" | "state" | "yes" | "links" | "decomission-status" | "guid" | "serial-number" | "shared-with-os" | "drive-status" | "device" | "realtime" | "slots" | "log-size" | "system-size" | "developer-ui" | "pdisk-page", params?: import("@gravity-ui/i18n").Params) => string;
|
@@ -2,9 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
3
3
|
import { Popup } from '@gravity-ui/uikit';
|
4
4
|
import { EFlag } from '../../types/api/enums';
|
5
|
+
import { valueIsDefined } from '../../utils';
|
5
6
|
import { cn } from '../../utils/cn';
|
6
7
|
import { EMPTY_DATA_PLACEHOLDER } from '../../utils/constants';
|
7
|
-
import { getPDiskId } from '../../utils/
|
8
|
+
import { getPDiskId } from '../../utils/disks/helpers';
|
8
9
|
import { bytesToGB } from '../../utils/utils';
|
9
10
|
import { InfoViewer } from '../InfoViewer';
|
10
11
|
import './PDiskPopup.scss';
|
@@ -13,7 +14,12 @@ const errorColors = [EFlag.Orange, EFlag.Red, EFlag.Yellow];
|
|
13
14
|
export const preparePDiskData = (data, nodes) => {
|
14
15
|
const { AvailableSize, TotalSize, State, PDiskId, NodeId, Path, Realtime, Type, Device } = data;
|
15
16
|
const pdiskData = [
|
16
|
-
{
|
17
|
+
{
|
18
|
+
label: 'PDisk',
|
19
|
+
value: valueIsDefined(NodeId) && valueIsDefined(PDiskId)
|
20
|
+
? getPDiskId(NodeId, PDiskId)
|
21
|
+
: EMPTY_DATA_PLACEHOLDER,
|
22
|
+
},
|
17
23
|
{ label: 'State', value: State || 'not available' },
|
18
24
|
{ label: 'Type', value: Type || 'unknown' },
|
19
25
|
];
|
@@ -32,6 +32,9 @@ export function ProgressViewer({ value, capacity, formatValues = defaultFormatVa
|
|
32
32
|
else if (fillWidth > dangerThreshold) {
|
33
33
|
status = inverseColorize ? 'good' : 'danger';
|
34
34
|
}
|
35
|
+
if (!isNumeric(capacity)) {
|
36
|
+
fillWidth = 100;
|
37
|
+
}
|
35
38
|
}
|
36
39
|
const lineStyle = {
|
37
40
|
width: fillWidth + '%',
|
@@ -1,10 +1,20 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { CircleCheck, CircleQuestionFill, CircleXmark } from '@gravity-ui/icons';
|
3
|
-
import { Icon } from '@gravity-ui/uikit';
|
2
|
+
import { CircleCheck, CircleInfo, CircleQuestionFill, CircleXmark } from '@gravity-ui/icons';
|
3
|
+
import { Icon, Tooltip } from '@gravity-ui/uikit';
|
4
4
|
import { isAxiosError } from 'axios';
|
5
|
+
import i18n from '../../containers/Tenant/Query/i18n';
|
5
6
|
import { cn } from '../../utils/cn';
|
7
|
+
import { useChangedQuerySettings } from '../../utils/hooks/useChangedQuerySettings';
|
8
|
+
import QuerySettingsDescription from '../QuerySettingsDescription/QuerySettingsDescription';
|
6
9
|
import './QueryExecutionStatus.scss';
|
7
10
|
const b = cn('kv-query-execution-status');
|
11
|
+
const QuerySettingsIndicator = () => {
|
12
|
+
const { isIndicatorShown, changedLastExecutionSettingsDescriptions } = useChangedQuerySettings();
|
13
|
+
if (!isIndicatorShown) {
|
14
|
+
return null;
|
15
|
+
}
|
16
|
+
return (_jsx(Tooltip, { openDelay: 0, content: _jsx(QuerySettingsDescription, { prefix: i18n('banner.query-settings.message'), querySettings: changedLastExecutionSettingsDescriptions }), children: _jsx(Icon, { data: CircleInfo, className: b('query-settings-icon') }) }));
|
17
|
+
};
|
8
18
|
export const QueryExecutionStatus = ({ className, error }) => {
|
9
19
|
let icon;
|
10
20
|
let label;
|
@@ -17,5 +27,5 @@ export const QueryExecutionStatus = ({ className, error }) => {
|
|
17
27
|
icon = (_jsx(Icon, { data: hasError ? CircleXmark : CircleCheck, className: b('result-status-icon', { error: hasError }) }));
|
18
28
|
label = hasError ? 'Failed' : 'Completed';
|
19
29
|
}
|
20
|
-
return (_jsxs("div", { className: b(null, className), children: [icon, label] }));
|
30
|
+
return (_jsxs("div", { className: b(null, className), children: [icon, label, _jsx(QuerySettingsIndicator, {})] }));
|
21
31
|
};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import './QuerySettingsDescription.scss';
|
2
|
+
interface QuerySettingsDescriptionProps {
|
3
|
+
prefix: string;
|
4
|
+
querySettings: Record<string, string>;
|
5
|
+
}
|
6
|
+
declare const QuerySettingsDescription: ({ querySettings, prefix }: QuerySettingsDescriptionProps) => import("react/jsx-runtime").JSX.Element;
|
7
|
+
export default QuerySettingsDescription;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { cn } from '../../utils/cn';
|
3
|
+
import './QuerySettingsDescription.scss';
|
4
|
+
const b = cn('ydb-query-settings-description');
|
5
|
+
const QuerySettingsDescription = ({ querySettings, prefix }) => {
|
6
|
+
return (_jsxs("div", { className: b('message'), children: [prefix, Object.entries(querySettings).map(([key, value], index, arr) => (_jsxs("span", { className: b('description-item'), children: [`${key}: ${value}`, index < arr.length - 1 ? ', ' : null] }, index)))] }));
|
7
|
+
};
|
8
|
+
export default QuerySettingsDescription;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './QuerySettingsDescription';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './QuerySettingsDescription';
|
@@ -2,12 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
3
3
|
import { STRUCTURE } from '../../containers/Node/NodePages';
|
4
4
|
import routes, { createHref, getVDiskPagePath } from '../../routes';
|
5
|
+
import { useDiskPagesAvailable } from '../../store/reducers/capabilities/hooks';
|
5
6
|
import { valueIsDefined } from '../../utils';
|
6
7
|
import { cn } from '../../utils/cn';
|
7
|
-
import { USE_SEPARATE_DISKS_PAGES_KEY } from '../../utils/constants';
|
8
8
|
import { stringifyVdiskId } from '../../utils/dataFormatters/dataFormatters';
|
9
9
|
import { isFullVDiskData } from '../../utils/disks/helpers';
|
10
|
-
import { useSetting } from '../../utils/hooks';
|
11
10
|
import { DiskStateProgressBar } from '../DiskStateProgressBar/DiskStateProgressBar';
|
12
11
|
import { InternalLink } from '../InternalLink';
|
13
12
|
import { VDiskPopup } from '../VDiskPopup/VDiskPopup';
|
@@ -15,7 +14,7 @@ import './VDisk.scss';
|
|
15
14
|
const b = cn('ydb-vdisk-component');
|
16
15
|
export const VDisk = ({ data = {}, nodes, compact }) => {
|
17
16
|
const isFullData = isFullVDiskData(data);
|
18
|
-
const
|
17
|
+
const diskPagesAvailable = useDiskPagesAvailable();
|
19
18
|
const [isPopupVisible, setIsPopupVisible] = React.useState(false);
|
20
19
|
const anchor = React.useRef(null);
|
21
20
|
const showPopup = () => {
|
@@ -25,7 +24,7 @@ export const VDisk = ({ data = {}, nodes, compact }) => {
|
|
25
24
|
setIsPopupVisible(false);
|
26
25
|
};
|
27
26
|
let vDiskPath;
|
28
|
-
if (
|
27
|
+
if (diskPagesAvailable &&
|
29
28
|
valueIsDefined(data.VDiskSlotId) &&
|
30
29
|
valueIsDefined(data.PDiskId) &&
|
31
30
|
valueIsDefined(data.NodeId)) {
|
@@ -2,8 +2,9 @@ import type { PreparedVDisk } from '../../utils/disks/types';
|
|
2
2
|
import type { InfoViewerProps } from '../InfoViewer/InfoViewer';
|
3
3
|
import './VDiskInfo.scss';
|
4
4
|
interface VDiskInfoProps<T extends PreparedVDisk> extends Omit<InfoViewerProps, 'info'> {
|
5
|
-
data
|
6
|
-
|
5
|
+
data?: T;
|
6
|
+
withVDiskPageLink?: boolean;
|
7
|
+
withTitle?: boolean;
|
7
8
|
}
|
8
|
-
export declare function VDiskInfo<T extends PreparedVDisk>({ data,
|
9
|
+
export declare function VDiskInfo<T extends PreparedVDisk>({ data, withVDiskPageLink, withTitle, ...infoViewerProps }: VDiskInfoProps<T>): import("react/jsx-runtime").JSX.Element;
|
9
10
|
export {};
|
@@ -1,9 +1,11 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import { getVDiskPagePath } from '../../routes';
|
3
|
+
import { useDiskPagesAvailable } from '../../store/reducers/capabilities/hooks';
|
3
4
|
import { valueIsDefined } from '../../utils';
|
4
5
|
import { cn } from '../../utils/cn';
|
5
|
-
import { formatStorageValuesToGb } from '../../utils/dataFormatters/dataFormatters';
|
6
|
+
import { formatStorageValuesToGb, stringifyVdiskId } from '../../utils/dataFormatters/dataFormatters';
|
6
7
|
import { createVDiskDeveloperUILink } from '../../utils/developerUI/developerUI';
|
8
|
+
import { getSeverityColor } from '../../utils/disks/helpers';
|
7
9
|
import { bytesToSpeed } from '../../utils/utils';
|
8
10
|
import { EntityStatus } from '../EntityStatus/EntityStatus';
|
9
11
|
import { InfoViewer } from '../InfoViewer';
|
@@ -13,9 +15,10 @@ import { vDiskInfoKeyset } from './i18n';
|
|
13
15
|
import './VDiskInfo.scss';
|
14
16
|
const b = cn('ydb-vdisk-info');
|
15
17
|
// eslint-disable-next-line complexity
|
16
|
-
export function VDiskInfo({ data,
|
18
|
+
export function VDiskInfo({ data, withVDiskPageLink, withTitle, ...infoViewerProps }) {
|
17
19
|
var _a, _b, _c, _d;
|
18
|
-
const
|
20
|
+
const diskPagesAvailable = useDiskPagesAvailable();
|
21
|
+
const { AllocatedSize, DiskSpace, FrontQueues, Guid, Replicated, VDiskState, VDiskSlotId, Kind, SatisfactionRank, AvailableSize, HasUnreadableBlobs, IncarnationGuid, InstanceGuid, StoragePoolName, ReadThroughput, WriteThroughput, PDiskId, NodeId, } = data || {};
|
19
22
|
const vdiskInfo = [];
|
20
23
|
if (valueIsDefined(VDiskSlotId)) {
|
21
24
|
vdiskInfo.push({ label: vDiskInfoKeyset('slot-id'), value: VDiskSlotId });
|
@@ -104,8 +107,12 @@ export function VDiskInfo({ data, isVDiskPage = false, ...infoViewerProps }) {
|
|
104
107
|
});
|
105
108
|
vdiskInfo.push({
|
106
109
|
label: vDiskInfoKeyset('links'),
|
107
|
-
value: (_jsxs("span", { className: b('links'), children: [
|
110
|
+
value: (_jsxs("span", { className: b('links'), children: [withVDiskPageLink && diskPagesAvailable && (_jsx(LinkWithIcon, { title: vDiskInfoKeyset('vdisk-page'), url: vDiskPagePath, external: false })), _jsx(LinkWithIcon, { title: vDiskInfoKeyset('developer-ui'), url: vDiskInternalViewerPath })] })),
|
108
111
|
});
|
109
112
|
}
|
110
|
-
|
113
|
+
const title = data && withTitle ? _jsx(VDiskTitle, { data: data }) : null;
|
114
|
+
return _jsx(InfoViewer, { info: vdiskInfo, title: title, ...infoViewerProps });
|
115
|
+
}
|
116
|
+
function VDiskTitle({ data }) {
|
117
|
+
return (_jsxs("div", { className: b('title'), children: [vDiskInfoKeyset('vdiks-title'), _jsx(EntityStatus, { status: getSeverityColor(data.Severity), name: stringifyVdiskId(data.VDiskId) })] }));
|
111
118
|
}
|
@@ -1 +1 @@
|
|
1
|
-
export declare const vDiskInfoKeyset: (key: "size" | "kind" | "yes" | "no" | "links" | "pool-name" | "guid" | "developer-ui" | "slot-id" | "incarnation-guid" | "instance-guid" | "replication-status" | "state-status" | "space-status" | "fresh-rank-satisfaction" | "level-rank-satisfaction" | "front-queues" | "has-unreadable-blobs" | "read-throughput" | "write-throughput" | "vdisk-page", params?: import("@gravity-ui/i18n").Params) => string;
|
1
|
+
export declare const vDiskInfoKeyset: (key: "size" | "kind" | "yes" | "no" | "links" | "pool-name" | "guid" | "developer-ui" | "slot-id" | "incarnation-guid" | "instance-guid" | "replication-status" | "state-status" | "space-status" | "fresh-rank-satisfaction" | "level-rank-satisfaction" | "front-queues" | "has-unreadable-blobs" | "read-throughput" | "write-throughput" | "vdisk-page" | "vdiks-title", params?: import("@gravity-ui/i18n").Params) => string;
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import
|
3
|
-
import { connect, shallowEqual } from 'react-redux';
|
2
|
+
import { connect } from 'react-redux';
|
4
3
|
import { Redirect, Route, Switch } from 'react-router-dom';
|
4
|
+
import { PageError } from '../../components/Errors/PageError/PageError';
|
5
|
+
import { LoaderWrapper } from '../../components/LoaderWrapper/LoaderWrapper';
|
5
6
|
import { useSlots } from '../../components/slots';
|
6
7
|
import routes from '../../routes';
|
7
|
-
import {
|
8
|
+
import { authenticationApi } from '../../store/reducers/authentication/authentication';
|
9
|
+
import { capabilitiesApi } from '../../store/reducers/capabilities/capabilities';
|
8
10
|
import { nodesListApi } from '../../store/reducers/nodesList';
|
9
11
|
import { cn } from '../../utils/cn';
|
10
|
-
import { useTypedDispatch, useTypedSelector } from '../../utils/hooks';
|
11
12
|
import { lazyComponent } from '../../utils/lazyComponent';
|
12
13
|
import Authentication from '../Authentication/Authentication';
|
13
14
|
import { getClusterPath } from '../Cluster/utils';
|
@@ -89,27 +90,22 @@ export function Content(props) {
|
|
89
90
|
exact: true,
|
90
91
|
component: Clusters,
|
91
92
|
slot: ClustersSlot,
|
92
|
-
}), additionalRoutes === null || additionalRoutes === void 0 ? void 0 : additionalRoutes.rendered,
|
93
|
-
|
94
|
-
|
93
|
+
}), additionalRoutes === null || additionalRoutes === void 0 ? void 0 : additionalRoutes.rendered, _jsx(Route, { children: _jsxs(GetUser, { children: [_jsx(GetNodesList, {}), _jsx(GetCapabilities, {}), _jsx(Header, { mainPage: mainPage }), _jsxs(Switch, { children: [routesSlots.map((route) => {
|
94
|
+
return renderRouteSlot(slots, route);
|
95
|
+
}), _jsx(Route, { path: redirectProps.from || redirectProps.path, exact: redirectProps.exact, strict: redirectProps.strict, render: () => (_jsx(Redirect, { to: redirectProps.to, push: redirectProps.push })) })] })] }) }, "single-cluster")] }));
|
95
96
|
}
|
96
|
-
function GetUser() {
|
97
|
-
const
|
98
|
-
|
99
|
-
isAuthenticated: state.authentication.isAuthenticated,
|
100
|
-
isInternalUser: Boolean(state.authentication.user),
|
101
|
-
}), shallowEqual);
|
102
|
-
React.useEffect(() => {
|
103
|
-
if (isAuthenticated && !isInternalUser) {
|
104
|
-
dispatch(getUser());
|
105
|
-
}
|
106
|
-
}, [dispatch, isAuthenticated, isInternalUser]);
|
107
|
-
return null;
|
97
|
+
function GetUser({ children }) {
|
98
|
+
const { isLoading, error } = authenticationApi.useWhoamiQuery(undefined);
|
99
|
+
return (_jsx(LoaderWrapper, { loading: isLoading, size: "l", children: _jsx(PageError, { error: error, children: children }) }));
|
108
100
|
}
|
109
101
|
function GetNodesList() {
|
110
102
|
nodesListApi.useGetNodesListQuery(undefined);
|
111
103
|
return null;
|
112
104
|
}
|
105
|
+
function GetCapabilities() {
|
106
|
+
capabilitiesApi.useGetClusterCapabilitiesQuery(undefined);
|
107
|
+
return null;
|
108
|
+
}
|
113
109
|
function ContentWrapper(props) {
|
114
110
|
const { singleClusterMode, isAuthenticated } = props;
|
115
111
|
return (_jsxs(Switch, { children: [_jsx(Route, { path: routes.auth, children: _jsx(Authentication, { closable: true }) }), _jsx(Route, { children: _jsx("div", { className: b({ embedded: singleClusterMode }), children: isAuthenticated ? props.children : _jsx(Authentication, {}) }) })] }));
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
3
3
|
import { CircleQuestion, Gear, Person } from '@gravity-ui/icons';
|
4
4
|
import { AsideHeader, FooterItem } from '@gravity-ui/navigation';
|
5
5
|
import { useHistory } from 'react-router-dom';
|
6
|
+
import { selectUser } from '../../store/reducers/authentication/authentication';
|
6
7
|
import { cn } from '../../utils/cn';
|
7
8
|
import { ASIDE_HEADER_COMPACT_KEY } from '../../utils/constants';
|
8
9
|
import { useSetting, useTypedSelector } from '../../utils/hooks';
|
@@ -29,7 +30,7 @@ var Panel;
|
|
29
30
|
export function AsideNavigation(props) {
|
30
31
|
const history = useHistory();
|
31
32
|
const [visiblePanel, setVisiblePanel] = React.useState();
|
32
|
-
const
|
33
|
+
const ydbUser = useTypedSelector(selectUser);
|
33
34
|
const [compact, setIsCompact] = useSetting(ASIDE_HEADER_COMPACT_KEY);
|
34
35
|
return (_jsx(React.Fragment, { children: _jsx(AsideHeader, { logo: {
|
35
36
|
text: 'YDB',
|
@@ -3,21 +3,21 @@ import { ArrowRightFromSquare, ArrowRightToSquare } from '@gravity-ui/icons';
|
|
3
3
|
import { Button, Icon } from '@gravity-ui/uikit';
|
4
4
|
import { useHistory } from 'react-router-dom';
|
5
5
|
import routes, { createHref } from '../../../routes';
|
6
|
-
import {
|
6
|
+
import { authenticationApi } from '../../../store/reducers/authentication/authentication';
|
7
7
|
import { cn } from '../../../utils/cn';
|
8
|
-
import {
|
8
|
+
import { useTypedSelector } from '../../../utils/hooks';
|
9
9
|
import i18n from '../i18n';
|
10
10
|
import './YdbInternalUser.scss';
|
11
11
|
const b = cn('kv-ydb-internal-user');
|
12
12
|
export function YdbInternalUser() {
|
13
13
|
const { user: ydbUser } = useTypedSelector((state) => state.authentication);
|
14
|
+
const [logout] = authenticationApi.useLogoutMutation();
|
14
15
|
const history = useHistory();
|
15
16
|
const handleLoginClick = () => {
|
16
17
|
history.push(createHref(routes.auth, undefined, { returnUrl: encodeURIComponent(location.href) }));
|
17
18
|
};
|
18
|
-
const dispatch = useTypedDispatch();
|
19
19
|
const handleLogout = () => {
|
20
|
-
|
20
|
+
logout(undefined);
|
21
21
|
};
|
22
22
|
return (_jsxs("div", { className: b(), children: [_jsxs("div", { className: b('user-info-wrapper'), children: [_jsx("div", { className: b('ydb-internal-user-title'), children: i18n('account.user') }), ydbUser && _jsx("div", { className: b('username'), children: ydbUser })] }), ydbUser ? (_jsx(Button, { view: "flat-secondary", title: i18n('account.logout'), onClick: handleLogout, children: _jsx(Icon, { data: ArrowRightFromSquare }) })) : (_jsx(Button, { view: "flat-secondary", title: i18n('account.login'), onClick: handleLoginClick, children: _jsx(Icon, { data: ArrowRightToSquare }) }))] }));
|
23
23
|
}
|
@@ -4,29 +4,27 @@ import { Eye, EyeSlash, Xmark } from '@gravity-ui/icons';
|
|
4
4
|
import { Button, Link as ExternalLink, Icon, TextInput } from '@gravity-ui/uikit';
|
5
5
|
import { useHistory, useLocation } from 'react-router-dom';
|
6
6
|
import { parseQuery } from '../../routes';
|
7
|
-
import {
|
7
|
+
import { authenticationApi } from '../../store/reducers/authentication/authentication';
|
8
8
|
import { cn } from '../../utils/cn';
|
9
|
-
import {
|
9
|
+
import { isPasswordError, isUserError } from './utils';
|
10
10
|
import ydbLogoIcon from '../../assets/icons/ydb.svg';
|
11
11
|
import './Authentication.scss';
|
12
12
|
const b = cn('authentication');
|
13
13
|
function Authentication({ closable = false }) {
|
14
|
-
const dispatch = useTypedDispatch();
|
15
14
|
const history = useHistory();
|
16
15
|
const location = useLocation();
|
16
|
+
const [authenticate, { error, isLoading }] = authenticationApi.useAuthenticateMutation(undefined);
|
17
17
|
const { returnUrl } = parseQuery(location);
|
18
|
-
const { error } = useTypedSelector((state) => state.authentication);
|
19
18
|
const [login, setLogin] = React.useState('');
|
20
|
-
const [
|
19
|
+
const [password, setPass] = React.useState('');
|
21
20
|
const [loginError, setLoginError] = React.useState('');
|
22
21
|
const [passwordError, setPasswordError] = React.useState('');
|
23
22
|
const [showPassword, setShowPassword] = React.useState(false);
|
24
23
|
React.useEffect(() => {
|
25
|
-
|
26
|
-
if ((_b = (_a = error === null || error === void 0 ? void 0 : error.data) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.includes('user')) {
|
24
|
+
if (isUserError(error)) {
|
27
25
|
setLoginError(error.data.error);
|
28
26
|
}
|
29
|
-
if ((
|
27
|
+
if (isPasswordError(error)) {
|
30
28
|
setPasswordError(error.data.error);
|
31
29
|
}
|
32
30
|
}, [error]);
|
@@ -39,7 +37,7 @@ function Authentication({ closable = false }) {
|
|
39
37
|
setPasswordError('');
|
40
38
|
};
|
41
39
|
const onLoginClick = () => {
|
42
|
-
|
40
|
+
authenticate({ user: login, password }).then(() => {
|
43
41
|
if (returnUrl) {
|
44
42
|
const decodedUrl = decodeURIComponent(returnUrl.toString());
|
45
43
|
// to prevent page reload we use router history
|
@@ -62,6 +60,6 @@ function Authentication({ closable = false }) {
|
|
62
60
|
const onTogglePasswordVisibility = () => {
|
63
61
|
setShowPassword((prev) => !prev);
|
64
62
|
};
|
65
|
-
return (_jsxs("section", { className: b(), children: [_jsxs("form", { className: b('form-wrapper'), children: [_jsxs("div", { className: b('header'), children: [_jsxs("div", { className: b('logo'), children: [_jsx(Icon, { data: ydbLogoIcon, size: 24 }), "YDB"] }), _jsx(ExternalLink, { href: "
|
63
|
+
return (_jsxs("section", { className: b(), children: [_jsxs("form", { className: b('form-wrapper'), children: [_jsxs("div", { className: b('header'), children: [_jsxs("div", { className: b('logo'), children: [_jsx(Icon, { data: ydbLogoIcon, size: 24 }), "YDB"] }), _jsx(ExternalLink, { href: "https://ydb.tech/docs", target: "_blank", children: "Documentation" })] }), _jsx("h2", { className: b('title'), children: "Sign in" }), _jsx("div", { className: b('field-wrapper'), children: _jsx(TextInput, { value: login, onUpdate: onLoginUpdate, placeholder: 'Username', error: loginError, onKeyDown: onEnterClick, size: "l", autoFocus: true }) }), _jsxs("div", { className: b('field-wrapper'), children: [_jsx(TextInput, { value: password, onUpdate: onPassUpdate, type: showPassword ? 'text' : 'password', placeholder: 'Password', error: passwordError, onKeyDown: onEnterClick, size: "l" }), _jsx(Button, { onClick: onTogglePasswordVisibility, size: "l", className: b('show-password-button'), children: _jsx(Icon, { data: showPassword ? EyeSlash : Eye, size: 16 }) })] }), _jsx(Button, { view: "action", onClick: onLoginClick, width: "max", size: "l", disabled: Boolean(!login || loginError || passwordError), loading: isLoading, className: b('button-sign-in'), children: "Sign in" })] }), closable && history.length > 1 && (_jsx(Button, { onClick: onClose, className: b('close'), children: _jsx(Icon, { data: Xmark, size: 24 }) }))] }));
|
66
64
|
}
|
67
65
|
export default Authentication;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
function isAuthError(error) {
|
2
|
+
return Boolean(error &&
|
3
|
+
typeof error === 'object' &&
|
4
|
+
'data' in error &&
|
5
|
+
error.data &&
|
6
|
+
typeof error.data === 'object' &&
|
7
|
+
'error' in error.data &&
|
8
|
+
typeof error.data.error === 'string');
|
9
|
+
}
|
10
|
+
export function isUserError(error) {
|
11
|
+
return isAuthError(error) && error.data.error.includes('user');
|
12
|
+
}
|
13
|
+
export function isPasswordError(error) {
|
14
|
+
return isAuthError(error) && error.data.error.includes('password');
|
15
|
+
}
|