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,2 +1,2 @@
|
|
1
|
-
declare const _default: (key: "
|
1
|
+
declare const _default: (key: "None" | "1 min" | "5 min" | "15 sec" | "2 min" | "Refresh", params?: import("@gravity-ui/i18n").Params) => string;
|
2
2
|
export default _default;
|
@@ -2,9 +2,10 @@ import React from 'react';
|
|
2
2
|
import type { ButtonProps, PopoverProps } from '@gravity-ui/uikit';
|
3
3
|
interface ButtonWithConfirmDialogProps<T, K> {
|
4
4
|
children: React.ReactNode;
|
5
|
-
onConfirmAction: () => Promise<T>;
|
5
|
+
onConfirmAction: (isRetry?: boolean) => Promise<T>;
|
6
6
|
onConfirmActionSuccess?: (() => Promise<K>) | VoidFunction;
|
7
7
|
dialogContent: string;
|
8
|
+
retryButtonText?: string;
|
8
9
|
buttonDisabled?: ButtonProps['disabled'];
|
9
10
|
buttonView?: ButtonProps['view'];
|
10
11
|
buttonClassName?: ButtonProps['className'];
|
@@ -13,5 +14,5 @@ interface ButtonWithConfirmDialogProps<T, K> {
|
|
13
14
|
popoverPlacement?: PopoverProps['placement'];
|
14
15
|
popoverDisabled?: PopoverProps['disabled'];
|
15
16
|
}
|
16
|
-
export declare function ButtonWithConfirmDialog<T, K>({ children, onConfirmAction, onConfirmActionSuccess, dialogContent, buttonDisabled, buttonView, buttonClassName, withPopover, popoverContent, popoverPlacement, popoverDisabled, }: ButtonWithConfirmDialogProps<T, K>): import("react/jsx-runtime").JSX.Element;
|
17
|
+
export declare function ButtonWithConfirmDialog<T, K>({ children, onConfirmAction, onConfirmActionSuccess, dialogContent, retryButtonText, buttonDisabled, buttonView, buttonClassName, withPopover, popoverContent, popoverPlacement, popoverDisabled, }: ButtonWithConfirmDialogProps<T, K>): import("react/jsx-runtime").JSX.Element;
|
17
18
|
export {};
|
@@ -2,15 +2,17 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
3
3
|
import { Button, Popover } from '@gravity-ui/uikit';
|
4
4
|
import { CriticalActionDialog } from '../CriticalActionDialog';
|
5
|
-
export function ButtonWithConfirmDialog({ children, onConfirmAction, onConfirmActionSuccess, dialogContent, buttonDisabled = false, buttonView = 'action', buttonClassName, withPopover = false, popoverContent, popoverPlacement = 'right', popoverDisabled = true, }) {
|
5
|
+
export function ButtonWithConfirmDialog({ children, onConfirmAction, onConfirmActionSuccess, dialogContent, retryButtonText, buttonDisabled = false, buttonView = 'action', buttonClassName, withPopover = false, popoverContent, popoverPlacement = 'right', popoverDisabled = true, }) {
|
6
6
|
const [isConfirmDialogVisible, setIsConfirmDialogVisible] = React.useState(false);
|
7
7
|
const [buttonLoading, setButtonLoading] = React.useState(false);
|
8
|
-
const
|
8
|
+
const [withRetry, setWithRetry] = React.useState(false);
|
9
|
+
const handleConfirmAction = async (isRetry) => {
|
9
10
|
setButtonLoading(true);
|
10
|
-
await onConfirmAction();
|
11
|
+
await onConfirmAction(isRetry);
|
11
12
|
setButtonLoading(false);
|
12
13
|
};
|
13
14
|
const handleConfirmActionSuccess = async () => {
|
15
|
+
setWithRetry(false);
|
14
16
|
if (onConfirmActionSuccess) {
|
15
17
|
setButtonLoading(true);
|
16
18
|
try {
|
@@ -23,7 +25,9 @@ export function ButtonWithConfirmDialog({ children, onConfirmAction, onConfirmAc
|
|
23
25
|
}
|
24
26
|
}
|
25
27
|
};
|
26
|
-
const handleConfirmActionError = () => {
|
28
|
+
const handleConfirmActionError = (error) => {
|
29
|
+
const isWithRetry = Boolean(error && typeof error === 'object' && 'retryPossible' in error && error.retryPossible);
|
30
|
+
setWithRetry(isWithRetry);
|
27
31
|
setButtonLoading(false);
|
28
32
|
};
|
29
33
|
const renderButton = () => {
|
@@ -35,7 +39,7 @@ export function ButtonWithConfirmDialog({ children, onConfirmAction, onConfirmAc
|
|
35
39
|
}
|
36
40
|
return renderButton();
|
37
41
|
};
|
38
|
-
return (_jsxs(React.Fragment, { children: [_jsx(CriticalActionDialog, { visible: isConfirmDialogVisible, text: dialogContent, onConfirm: handleConfirmAction, onConfirmActionSuccess: handleConfirmActionSuccess, onConfirmActionError: handleConfirmActionError, onClose: () => {
|
42
|
+
return (_jsxs(React.Fragment, { children: [_jsx(CriticalActionDialog, { visible: isConfirmDialogVisible, text: dialogContent, withRetry: withRetry, retryButtonText: retryButtonText, onConfirm: handleConfirmAction, onConfirmActionSuccess: handleConfirmActionSuccess, onConfirmActionError: handleConfirmActionError, onClose: () => {
|
39
43
|
setIsConfirmDialogVisible(false);
|
40
44
|
} }), renderContent()] }));
|
41
45
|
}
|
@@ -2,10 +2,12 @@ import './CriticalActionDialog.scss';
|
|
2
2
|
interface CriticalActionDialogProps<T> {
|
3
3
|
visible: boolean;
|
4
4
|
text: string;
|
5
|
+
withRetry?: boolean;
|
6
|
+
retryButtonText?: string;
|
5
7
|
onClose: VoidFunction;
|
6
|
-
onConfirm: () => Promise<T>;
|
8
|
+
onConfirm: (isRetry?: boolean) => Promise<T>;
|
7
9
|
onConfirmActionSuccess: VoidFunction;
|
8
|
-
onConfirmActionError:
|
10
|
+
onConfirmActionError: (error: unknown) => void;
|
9
11
|
}
|
10
|
-
export declare function CriticalActionDialog<T>({ visible, text, onClose, onConfirm, onConfirmActionSuccess, onConfirmActionError, }: CriticalActionDialogProps<T>): import("react/jsx-runtime").JSX.Element;
|
12
|
+
export declare function CriticalActionDialog<T>({ visible, text, withRetry, retryButtonText, onClose, onConfirm, onConfirmActionSuccess, onConfirmActionError, }: CriticalActionDialogProps<T>): import("react/jsx-runtime").JSX.Element;
|
11
13
|
export {};
|
@@ -15,19 +15,18 @@ const parseError = (error) => {
|
|
15
15
|
}
|
16
16
|
return criticalActionDialogKeyset('default-error');
|
17
17
|
};
|
18
|
-
export function CriticalActionDialog({ visible, text, onClose, onConfirm, onConfirmActionSuccess, onConfirmActionError, }) {
|
18
|
+
export function CriticalActionDialog({ visible, text, withRetry, retryButtonText, onClose, onConfirm, onConfirmActionSuccess, onConfirmActionError, }) {
|
19
19
|
const [isLoading, setIsLoading] = React.useState(false);
|
20
20
|
const [error, setError] = React.useState();
|
21
|
-
const
|
22
|
-
e.preventDefault();
|
21
|
+
const onApply = async (isRetry) => {
|
23
22
|
setIsLoading(true);
|
24
|
-
return onConfirm()
|
23
|
+
return onConfirm(isRetry)
|
25
24
|
.then(() => {
|
26
25
|
onConfirmActionSuccess();
|
27
26
|
onClose();
|
28
27
|
})
|
29
28
|
.catch((err) => {
|
30
|
-
onConfirmActionError();
|
29
|
+
onConfirmActionError(err);
|
31
30
|
setError(err);
|
32
31
|
})
|
33
32
|
.finally(() => {
|
@@ -36,9 +35,11 @@ export function CriticalActionDialog({ visible, text, onClose, onConfirm, onConf
|
|
36
35
|
};
|
37
36
|
const renderDialogContent = () => {
|
38
37
|
if (error) {
|
39
|
-
return (_jsxs(React.Fragment, { children: [_jsxs(Dialog.Body, { className: b('body'), children: [_jsx("span", { className: b('error-icon'), children: _jsx(CircleXmarkFill, { width: "24", height: "22" }) }), parseError(error)] }), _jsx(Dialog.Footer, { loading: false, preset: "default",
|
38
|
+
return (_jsxs(React.Fragment, { children: [_jsxs(Dialog.Body, { className: b('body'), children: [_jsx("span", { className: b('error-icon'), children: _jsx(CircleXmarkFill, { width: "24", height: "22" }) }), parseError(error)] }), _jsx(Dialog.Footer, { loading: false, preset: "default", textButtonApply: withRetry
|
39
|
+
? retryButtonText || criticalActionDialogKeyset('button-retry')
|
40
|
+
: undefined, textButtonCancel: criticalActionDialogKeyset('button-close'), onClickButtonApply: () => onApply(true), onClickButtonCancel: onClose })] }));
|
40
41
|
}
|
41
|
-
return (_jsxs(
|
42
|
+
return (_jsxs(React.Fragment, { children: [_jsxs(Dialog.Body, { className: b('body'), children: [_jsx("span", { className: b('warning-icon'), children: _jsx(Icon, { data: TriangleExclamationFill, size: 24 }) }), text] }), _jsx(Dialog.Footer, { loading: isLoading, preset: "default", textButtonApply: criticalActionDialogKeyset('button-confirm'), textButtonCancel: criticalActionDialogKeyset('button-cancel'), propsButtonApply: { type: 'submit' }, onClickButtonCancel: onClose, onClickButtonApply: () => onApply() })] }));
|
42
43
|
};
|
43
44
|
return (_jsx(Dialog, { open: visible, hasCloseButton: false, className: b(), size: "s", onClose: onClose, onTransitionExited: () => setError(undefined), children: renderDialogContent() }));
|
44
45
|
}
|
@@ -1 +1 @@
|
|
1
|
-
export declare const criticalActionDialogKeyset: (key: "default-error" | "no-rights-error" | "button-confirm" | "button-cancel" | "button-close", params?: import("@gravity-ui/i18n").Params) => string;
|
1
|
+
export declare const criticalActionDialogKeyset: (key: "default-error" | "no-rights-error" | "button-confirm" | "button-retry" | "button-cancel" | "button-close", params?: import("@gravity-ui/i18n").Params) => string;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import './DateRange.scss';
|
2
2
|
export interface DateRangeValues {
|
3
|
-
/** ms from epoch */
|
4
|
-
from?:
|
5
|
-
/** ms from epoch */
|
6
|
-
to?:
|
3
|
+
/** ms from epoch or special values like now, 1h, 1m, etc*/
|
4
|
+
from?: string;
|
5
|
+
/** ms from epoch or special values like now, 1h, 1m, etc*/
|
6
|
+
to?: string;
|
7
7
|
}
|
8
8
|
interface DateRangeProps extends DateRangeValues {
|
9
9
|
className?: string;
|
@@ -1,33 +1,30 @@
|
|
1
|
-
import { jsx as _jsx
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import React from 'react';
|
3
|
+
import { RelativeRangeDatePicker } from '@gravity-ui/date-components';
|
2
4
|
import { cn } from '../../utils/cn';
|
5
|
+
import i18n from './i18n';
|
6
|
+
import { fromDateRangeValues, getdatePickerSize, toDateRangeValues } from './utils';
|
3
7
|
import './DateRange.scss';
|
4
8
|
const b = cn('date-range');
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
const DEFAULT_VALUE = {
|
10
|
+
start: {
|
11
|
+
value: 'now-1h',
|
12
|
+
type: 'relative',
|
13
|
+
},
|
14
|
+
end: {
|
15
|
+
value: 'now',
|
16
|
+
type: 'relative',
|
17
|
+
},
|
12
18
|
};
|
13
19
|
export const DateRange = ({ from, to, className, onChange }) => {
|
14
|
-
const
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
newFrom = to;
|
20
|
+
const handleUpdate = React.useCallback((pickerValue) => onChange === null || onChange === void 0 ? void 0 : onChange(toDateRangeValues(pickerValue)), [onChange]);
|
21
|
+
const value = React.useMemo(() => {
|
22
|
+
if (!from && !to) {
|
23
|
+
return undefined;
|
19
24
|
}
|
20
|
-
|
21
|
-
};
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
if (from && newTo && from > newTo) {
|
26
|
-
newTo = from;
|
27
|
-
}
|
28
|
-
onChange === null || onChange === void 0 ? void 0 : onChange({ from, to: newTo });
|
29
|
-
};
|
30
|
-
const startISO = toTimezonelessISOString(from);
|
31
|
-
const endISO = toTimezonelessISOString(to);
|
32
|
-
return (_jsxs("div", { className: b(null, className), children: [_jsx("input", { type: "datetime-local", value: startISO || '', max: endISO, onChange: handleFromChange, className: b('input') }), "\u2014", _jsx("input", { type: "datetime-local", min: startISO, value: endISO || '', onChange: handleToChange, className: b('input') })] }));
|
25
|
+
return fromDateRangeValues({ from, to });
|
26
|
+
}, [from, to]);
|
27
|
+
// eslint-disable-next-line new-cap
|
28
|
+
const timeZoneString = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
29
|
+
return (_jsx("div", { className: b(null, className), children: _jsx(RelativeRangeDatePicker, { withPresets: true, className: b('range-input', { [getdatePickerSize(value)]: true }), timeZone: timeZoneString, value: value || DEFAULT_VALUE, allowNullableValues: true, size: "m", format: i18n('date-time-format'), onUpdate: handleUpdate, placeholder: `${i18n('date-time-format')} - ${i18n('date-time-format')}`, withApplyButton: true }) }));
|
33
30
|
};
|
@@ -1,18 +1,19 @@
|
|
1
1
|
.date-range {
|
2
|
-
&
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
&__range-input {
|
3
|
+
&_s {
|
4
|
+
width: 200px;
|
5
|
+
}
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
&_m {
|
8
|
+
width: 300px;
|
9
|
+
}
|
10
|
+
|
11
|
+
&_l {
|
12
|
+
width: 350px;
|
13
|
+
}
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
15
|
+
input {
|
16
|
+
cursor: pointer;
|
17
|
+
}
|
17
18
|
}
|
18
19
|
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
import { dateTimeParse } from '@gravity-ui/date-utils';
|
2
|
+
import { fromDateRangeValues } from '../utils';
|
3
|
+
describe('From daterange values to datepicker values', () => {
|
4
|
+
it('should return the correct datepicker values for to-absolute, from-absolute values', () => {
|
5
|
+
const from = new Date('2020-01-01 19:00:00').getTime();
|
6
|
+
const to = new Date('2022-01-01 19:00:00').getTime();
|
7
|
+
const dateRangeValues = {
|
8
|
+
from: String(from),
|
9
|
+
to: String(to),
|
10
|
+
};
|
11
|
+
const result = fromDateRangeValues(dateRangeValues);
|
12
|
+
expect(result).toEqual({
|
13
|
+
start: {
|
14
|
+
type: 'absolute',
|
15
|
+
value: dateTimeParse(Number(from)),
|
16
|
+
},
|
17
|
+
end: {
|
18
|
+
type: 'absolute',
|
19
|
+
value: dateTimeParse(Number(to)),
|
20
|
+
},
|
21
|
+
});
|
22
|
+
});
|
23
|
+
it('should return the correct datepicker values for to-relative, from-absolute values', () => {
|
24
|
+
const from = new Date('2020-01-01 19:00:00').getTime();
|
25
|
+
const to = 'now';
|
26
|
+
const dateRangeValues = {
|
27
|
+
from: String(from),
|
28
|
+
to: String(to),
|
29
|
+
};
|
30
|
+
const result = fromDateRangeValues(dateRangeValues);
|
31
|
+
expect(result).toEqual({
|
32
|
+
start: {
|
33
|
+
type: 'absolute',
|
34
|
+
value: dateTimeParse(Number(from)),
|
35
|
+
},
|
36
|
+
end: {
|
37
|
+
type: 'relative',
|
38
|
+
value: to,
|
39
|
+
},
|
40
|
+
});
|
41
|
+
});
|
42
|
+
it('should return the correct datepicker values for from-relative, to-absolute values', () => {
|
43
|
+
const from = 'now';
|
44
|
+
const to = new Date('2022-01-01 19:00:00').getTime();
|
45
|
+
const dateRangeValues = {
|
46
|
+
from: String(from),
|
47
|
+
to: String(to),
|
48
|
+
};
|
49
|
+
const result = fromDateRangeValues(dateRangeValues);
|
50
|
+
expect(result).toEqual({
|
51
|
+
start: {
|
52
|
+
type: 'relative',
|
53
|
+
value: from,
|
54
|
+
},
|
55
|
+
end: {
|
56
|
+
type: 'absolute',
|
57
|
+
value: dateTimeParse(Number(to)),
|
58
|
+
},
|
59
|
+
});
|
60
|
+
});
|
61
|
+
it('should return the correct datepicker values for from-relative, to-relative values', () => {
|
62
|
+
const from = 'now';
|
63
|
+
const to = 'now + 1h';
|
64
|
+
const dateRangeValues = {
|
65
|
+
from: String(from),
|
66
|
+
to: String(to),
|
67
|
+
};
|
68
|
+
const result = fromDateRangeValues(dateRangeValues);
|
69
|
+
expect(result).toEqual({
|
70
|
+
start: {
|
71
|
+
type: 'relative',
|
72
|
+
value: from,
|
73
|
+
},
|
74
|
+
end: {
|
75
|
+
type: 'relative',
|
76
|
+
value: to,
|
77
|
+
},
|
78
|
+
});
|
79
|
+
});
|
80
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import { dateTimeParse } from '@gravity-ui/date-utils';
|
2
|
+
import { getdatePickerSize } from '../utils';
|
3
|
+
describe('getdatePickerSize test', () => {
|
4
|
+
it('should return the correct datepicker size', () => {
|
5
|
+
const datePickerRangeValues = {
|
6
|
+
start: {
|
7
|
+
type: 'relative',
|
8
|
+
value: 'now',
|
9
|
+
},
|
10
|
+
end: {
|
11
|
+
type: 'relative',
|
12
|
+
value: 'now',
|
13
|
+
},
|
14
|
+
};
|
15
|
+
expect(getdatePickerSize(datePickerRangeValues)).toEqual('s');
|
16
|
+
});
|
17
|
+
it('should return the correct datepicker size', () => {
|
18
|
+
const datePickerRangeValues = {
|
19
|
+
start: {
|
20
|
+
type: 'absolute',
|
21
|
+
value: dateTimeParse(Number(new Date().getTime())),
|
22
|
+
},
|
23
|
+
end: {
|
24
|
+
type: 'relative',
|
25
|
+
value: 'now + 1',
|
26
|
+
},
|
27
|
+
};
|
28
|
+
expect(getdatePickerSize(datePickerRangeValues)).toEqual('m');
|
29
|
+
});
|
30
|
+
it('should return the correct datepicker size', () => {
|
31
|
+
const datePickerRangeValues = {
|
32
|
+
start: {
|
33
|
+
type: 'relative',
|
34
|
+
value: 'now + 1',
|
35
|
+
},
|
36
|
+
end: {
|
37
|
+
type: 'absolute',
|
38
|
+
value: dateTimeParse(Number(new Date().getTime())),
|
39
|
+
},
|
40
|
+
};
|
41
|
+
expect(getdatePickerSize(datePickerRangeValues)).toEqual('m');
|
42
|
+
});
|
43
|
+
it('should return the correct datepicker size', () => {
|
44
|
+
const datePickerRangeValues = {
|
45
|
+
start: {
|
46
|
+
type: 'absolute',
|
47
|
+
value: dateTimeParse(Number(new Date().getTime())),
|
48
|
+
},
|
49
|
+
end: {
|
50
|
+
type: 'absolute',
|
51
|
+
value: dateTimeParse(Number(new Date().getTime())),
|
52
|
+
},
|
53
|
+
};
|
54
|
+
expect(getdatePickerSize(datePickerRangeValues)).toEqual('l');
|
55
|
+
});
|
56
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,80 @@
|
|
1
|
+
import { dateTimeParse } from '@gravity-ui/date-utils';
|
2
|
+
import { toDateRangeValues } from '../utils';
|
3
|
+
describe('To daterange values from datepicker values', () => {
|
4
|
+
it('should return the correct datepicker values for to-absolute, from-absolute values', () => {
|
5
|
+
const from = new Date('2020-01-01 19:00:00').getTime();
|
6
|
+
const to = new Date('2022-01-01 19:00:00').getTime();
|
7
|
+
const datePickerRangeValues = {
|
8
|
+
start: {
|
9
|
+
type: 'absolute',
|
10
|
+
value: dateTimeParse(Number(from)),
|
11
|
+
},
|
12
|
+
end: {
|
13
|
+
type: 'absolute',
|
14
|
+
value: dateTimeParse(Number(to)),
|
15
|
+
},
|
16
|
+
};
|
17
|
+
const result = toDateRangeValues(datePickerRangeValues);
|
18
|
+
expect(result).toEqual({
|
19
|
+
from: String(from),
|
20
|
+
to: String(to),
|
21
|
+
});
|
22
|
+
});
|
23
|
+
});
|
24
|
+
it('should return the correct daterange values for to-relative, from-absolute values', () => {
|
25
|
+
const from = new Date('2020-01-01 19:00:00').getTime();
|
26
|
+
const to = 'now';
|
27
|
+
const datePickerRangeValues = {
|
28
|
+
start: {
|
29
|
+
type: 'absolute',
|
30
|
+
value: dateTimeParse(Number(from)),
|
31
|
+
},
|
32
|
+
end: {
|
33
|
+
type: 'relative',
|
34
|
+
value: to,
|
35
|
+
},
|
36
|
+
};
|
37
|
+
const result = toDateRangeValues(datePickerRangeValues);
|
38
|
+
expect(result).toEqual({
|
39
|
+
from: String(from),
|
40
|
+
to: to,
|
41
|
+
});
|
42
|
+
});
|
43
|
+
it('should return the correct daterange values for from-relative, to-absolute values', () => {
|
44
|
+
const from = 'now';
|
45
|
+
const to = new Date('2022-01-01 19:00:00').getTime();
|
46
|
+
const datePickerRangeValues = {
|
47
|
+
start: {
|
48
|
+
type: 'relative',
|
49
|
+
value: from,
|
50
|
+
},
|
51
|
+
end: {
|
52
|
+
type: 'absolute',
|
53
|
+
value: dateTimeParse(Number(to)),
|
54
|
+
},
|
55
|
+
};
|
56
|
+
const result = toDateRangeValues(datePickerRangeValues);
|
57
|
+
expect(result).toEqual({
|
58
|
+
from: from,
|
59
|
+
to: String(to),
|
60
|
+
});
|
61
|
+
});
|
62
|
+
it('should return the correct daterange values for from-relative, to-relative values', () => {
|
63
|
+
const from = 'now';
|
64
|
+
const to = 'now + 1';
|
65
|
+
const datePickerRangeValues = {
|
66
|
+
start: {
|
67
|
+
type: 'relative',
|
68
|
+
value: from,
|
69
|
+
},
|
70
|
+
end: {
|
71
|
+
type: 'relative',
|
72
|
+
value: to,
|
73
|
+
},
|
74
|
+
};
|
75
|
+
const result = toDateRangeValues(datePickerRangeValues);
|
76
|
+
expect(result).toEqual({
|
77
|
+
from: from,
|
78
|
+
to: to,
|
79
|
+
});
|
80
|
+
});
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { RelativeRangeDatePickerProps } from '@gravity-ui/date-components';
|
2
|
+
import type { DateRangeValues } from './DateRange';
|
3
|
+
export declare function fromDateRangeValues(value: DateRangeValues): RelativeRangeDatePickerProps['value'];
|
4
|
+
export declare function toDateRangeValues(value: RelativeRangeDatePickerProps['value']): DateRangeValues;
|
5
|
+
export declare function getdatePickerSize(value: RelativeRangeDatePickerProps['value']): "m" | "s" | "l";
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { dateTimeParse, isLikeRelative } from '@gravity-ui/date-utils';
|
2
|
+
export function fromDateRangeValues(value) {
|
3
|
+
var _a, _b;
|
4
|
+
const isFromRelative = isLikeRelative((_a = value.from) !== null && _a !== void 0 ? _a : '');
|
5
|
+
const isToRelative = isLikeRelative((_b = value.to) !== null && _b !== void 0 ? _b : '');
|
6
|
+
return {
|
7
|
+
start: value.from
|
8
|
+
? {
|
9
|
+
type: isFromRelative ? 'relative' : 'absolute',
|
10
|
+
value: isFromRelative ? value.from : dateTimeParse(Number(value.from)),
|
11
|
+
}
|
12
|
+
: null,
|
13
|
+
end: value.to
|
14
|
+
? {
|
15
|
+
type: isToRelative ? 'relative' : 'absolute',
|
16
|
+
value: isToRelative ? value.to : dateTimeParse(Number(value.to)),
|
17
|
+
}
|
18
|
+
: null,
|
19
|
+
};
|
20
|
+
}
|
21
|
+
export function toDateRangeValues(value) {
|
22
|
+
var _a, _b, _c, _d, _e, _f;
|
23
|
+
return {
|
24
|
+
from: ((_a = value === null || value === void 0 ? void 0 : value.start) === null || _a === void 0 ? void 0 : _a.type) === 'relative'
|
25
|
+
? value.start.value.toString()
|
26
|
+
: String((_c = dateTimeParse((_b = value === null || value === void 0 ? void 0 : value.start) === null || _b === void 0 ? void 0 : _b.value)) === null || _c === void 0 ? void 0 : _c.valueOf()),
|
27
|
+
to: ((_d = value === null || value === void 0 ? void 0 : value.end) === null || _d === void 0 ? void 0 : _d.type) === 'relative'
|
28
|
+
? value.end.value.toString()
|
29
|
+
: String((_f = dateTimeParse((_e = value === null || value === void 0 ? void 0 : value.end) === null || _e === void 0 ? void 0 : _e.value)) === null || _f === void 0 ? void 0 : _f.valueOf()),
|
30
|
+
};
|
31
|
+
}
|
32
|
+
export function getdatePickerSize(value) {
|
33
|
+
var _a, _b, _c, _d;
|
34
|
+
if (((_a = value === null || value === void 0 ? void 0 : value.start) === null || _a === void 0 ? void 0 : _a.type) === 'relative' && ((_b = value === null || value === void 0 ? void 0 : value.end) === null || _b === void 0 ? void 0 : _b.type) === 'relative') {
|
35
|
+
return 's';
|
36
|
+
}
|
37
|
+
else if (((_c = value === null || value === void 0 ? void 0 : value.start) === null || _c === void 0 ? void 0 : _c.type) === 'relative' || ((_d = value === null || value === void 0 ? void 0 : value.end) === null || _d === void 0 ? void 0 : _d.type) === 'relative') {
|
38
|
+
return 'm';
|
39
|
+
}
|
40
|
+
return 'l';
|
41
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import './DeveloperUILinkButton.scss';
|
2
|
+
interface DeveloperUiLinkProps {
|
3
|
+
className?: string;
|
4
|
+
visible?: boolean;
|
5
|
+
href: string;
|
6
|
+
}
|
7
|
+
export declare function DeveloperUILinkButton({ href, visible, className }: DeveloperUiLinkProps): import("react/jsx-runtime").JSX.Element;
|
8
|
+
export {};
|
@@ -2,8 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ArrowUpRightFromSquare } from '@gravity-ui/icons';
|
3
3
|
import { Button, Icon } from '@gravity-ui/uikit';
|
4
4
|
import { cn } from '../../utils/cn';
|
5
|
-
import './
|
6
|
-
const b = cn('developer-ui-link');
|
7
|
-
export function
|
5
|
+
import './DeveloperUILinkButton.scss';
|
6
|
+
const b = cn('developer-ui-link-button');
|
7
|
+
export function DeveloperUILinkButton({ href, visible = false, className }) {
|
8
8
|
return (_jsx(Button, { size: "s", href: href, className: b({ visible }, className), target: "_blank", children: _jsx(Icon, { data: ArrowUpRightFromSquare }) }));
|
9
9
|
}
|
@@ -1,8 +1,13 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import './DiskStateProgressBar.scss';
|
2
3
|
interface DiskStateProgressBarProps {
|
3
4
|
diskAllocatedPercent?: number;
|
4
5
|
severity?: number;
|
5
6
|
compact?: boolean;
|
7
|
+
faded?: boolean;
|
8
|
+
empty?: boolean;
|
9
|
+
content?: React.ReactNode;
|
10
|
+
className?: string;
|
6
11
|
}
|
7
|
-
export declare function DiskStateProgressBar({ diskAllocatedPercent, severity, compact, }: DiskStateProgressBarProps): import("react/jsx-runtime").JSX.Element;
|
12
|
+
export declare function DiskStateProgressBar({ diskAllocatedPercent, severity, compact, faded, empty, content, className, }: DiskStateProgressBarProps): import("react/jsx-runtime").JSX.Element;
|
8
13
|
export {};
|