ydb-embedded-ui 21.0.0 → 22.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ComponentsProvider/ComponentsProvider.d.ts +0 -4
- package/dist/components/ComponentsProvider/componentsRegistry.d.ts +0 -2
- package/dist/components/ComponentsProvider/componentsRegistry.js +1 -3
- package/dist/components/ComponentsProvider/componentsRegistry.js.map +1 -1
- package/dist/components/ContentWithPopup/ContentWithPopup.d.ts +1 -1
- package/dist/components/ContentWithPopup/ContentWithPopup.js +4 -2
- package/dist/components/ContentWithPopup/ContentWithPopup.js.map +1 -1
- package/dist/components/CriticalActionDialog/CriticalActionDialog.js +10 -6
- package/dist/components/CriticalActionDialog/CriticalActionDialog.js.map +1 -1
- package/dist/components/CriticalActionDialog/i18n/en.json +1 -2
- package/dist/components/CriticalActionDialog/i18n/index.d.ts +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +2 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -1
- package/dist/components/FullNodeViewer/i18n/index.d.ts +1 -1
- package/dist/components/HoverPopup/HoverPopup.js +27 -4
- package/dist/components/HoverPopup/HoverPopup.js.map +1 -1
- package/dist/components/HoverPopup/getPopupScrollContainer.d.ts +1 -0
- package/dist/components/HoverPopup/getPopupScrollContainer.js +20 -0
- package/dist/components/HoverPopup/getPopupScrollContainer.js.map +1 -0
- package/dist/components/MetricChart/reducer.d.ts +2 -2
- package/dist/components/SegmentedProgress/SegmentedProgress.d.ts +22 -1
- package/dist/components/SegmentedProgress/SegmentedProgress.js +44 -3
- package/dist/components/SegmentedProgress/SegmentedProgress.js.map +1 -1
- package/dist/components/SegmentedProgress/SegmentedProgress.scss +5 -0
- package/dist/components/StorageGroupInfo/StorageGroupInfo.js +1 -13
- package/dist/components/StorageGroupInfo/StorageGroupInfo.js.map +1 -1
- package/dist/components/StorageGroupInfo/i18n/en.json +0 -1
- package/dist/components/StorageGroupInfo/i18n/index.d.ts +1 -1
- package/dist/components/nodesColumns/i18n/index.d.ts +1 -1
- package/dist/containers/App/App.js +3 -3
- package/dist/containers/App/App.js.map +1 -1
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +8 -5
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js.map +1 -1
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +8 -0
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.d.ts +4 -3
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.js +62 -25
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.js.map +1 -1
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.scss +18 -0
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/utils.d.ts +22 -0
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/utils.js +49 -0
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/utils.js.map +1 -0
- package/dist/containers/Cluster/i18n/en.json +13 -4
- package/dist/containers/Cluster/i18n/index.d.ts +1 -1
- package/dist/containers/Header/HeaderActionsMenu.js +19 -3
- package/dist/containers/Header/HeaderActionsMenu.js.map +1 -1
- package/dist/containers/Header/hooks/useSharedDatabasePath.d.ts +4 -1
- package/dist/containers/Header/hooks/useSharedDatabasePath.js +14 -10
- package/dist/containers/Header/hooks/useSharedDatabasePath.js.map +1 -1
- package/dist/containers/Header/i18n/en.json +1 -0
- package/dist/containers/Header/i18n/index.d.ts +1 -1
- package/dist/containers/Node/Node.js +20 -17
- package/dist/containers/Node/Node.js.map +1 -1
- package/dist/containers/Node/NodePages.d.ts +3 -9
- package/dist/containers/Node/NodePages.js +2 -10
- package/dist/containers/Node/NodePages.js.map +1 -1
- package/dist/containers/Node/i18n/en.json +0 -3
- package/dist/containers/Node/i18n/index.d.ts +1 -1
- package/dist/containers/Nodes/NodesTable.js +2 -2
- package/dist/containers/Nodes/NodesTable.js.map +1 -1
- package/dist/containers/Operations/columns.js +2 -2
- package/dist/containers/Operations/columns.js.map +1 -1
- package/dist/containers/Operations/i18n/en.json +2 -2
- package/dist/containers/PDiskPage/DecommissionButton/DecommissionButton.js +1 -1
- package/dist/containers/PDiskPage/DecommissionButton/DecommissionButton.js.map +1 -1
- package/dist/containers/PDiskPage/PDiskPage.js +1 -1
- package/dist/containers/PDiskPage/PDiskPage.js.map +1 -1
- package/dist/containers/PDiskPage/i18n/en.json +3 -3
- package/dist/containers/Storage/PDisks/PDisks.js +1 -1
- package/dist/containers/Storage/PDisks/PDisks.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.js +0 -1
- package/dist/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/PaginatedStorageGroupsTable.js +2 -3
- package/dist/containers/Storage/PaginatedStorageGroupsTable/PaginatedStorageGroupsTable.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/constants.d.ts +2 -2
- package/dist/containers/Storage/PaginatedStorageGroupsTable/getGroups.d.ts +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/getGroups.js +2 -3
- package/dist/containers/Storage/PaginatedStorageGroupsTable/getGroups.js.map +1 -1
- package/dist/containers/StorageGroupPage/StorageGroupPage.js +2 -3
- package/dist/containers/StorageGroupPage/StorageGroupPage.js.map +1 -1
- package/dist/containers/Tablet/components/TabletControls/TabletControls.js +1 -1
- package/dist/containers/Tablet/components/TabletControls/TabletControls.js.map +1 -1
- package/dist/containers/Tablet/i18n/en.json +3 -3
- package/dist/containers/Tablets/TabletsTable.js +1 -1
- package/dist/containers/Tablets/TabletsTable.js.map +1 -1
- package/dist/containers/Tablets/i18n/en.json +1 -1
- package/dist/containers/Tenant/Diagnostics/Partitions/utils/constants.d.ts +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.js +3 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +1 -3
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/useTenantStorageNewData.d.ts +5 -5
- package/dist/containers/Tenant/Diagnostics/useDiagnosticsPages.js +2 -4
- package/dist/containers/Tenant/Diagnostics/useDiagnosticsPages.js.map +1 -1
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckDrawer.js +10 -2
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckDrawer.js.map +1 -1
- package/dist/routes.d.ts +1 -0
- package/dist/routes.js.map +1 -1
- package/dist/services/api/viewer.d.ts +1 -2
- package/dist/services/api/viewer.js +0 -11
- package/dist/services/api/viewer.js.map +1 -1
- package/dist/store/configureStore.d.ts +12 -12
- package/dist/store/defaultStore.d.ts +6 -6
- package/dist/store/reducers/api.d.ts +1 -1
- package/dist/store/reducers/api.js +3 -0
- package/dist/store/reducers/api.js.map +1 -1
- package/dist/store/reducers/authentication/authentication.d.ts +4 -4
- package/dist/store/reducers/cancelQuery.d.ts +2 -2
- package/dist/store/reducers/capabilities/capabilities.d.ts +43 -43
- package/dist/store/reducers/capabilities/hooks.d.ts +5 -6
- package/dist/store/reducers/capabilities/hooks.js +0 -3
- package/dist/store/reducers/capabilities/hooks.js.map +1 -1
- package/dist/store/reducers/cluster/cluster.d.ts +5 -5
- package/dist/store/reducers/cluster/cluster.js +3 -2
- package/dist/store/reducers/cluster/cluster.js.map +1 -1
- package/dist/store/reducers/clusters/clusters.d.ts +2 -2
- package/dist/store/reducers/clusters/clusters.js +2 -1
- package/dist/store/reducers/clusters/clusters.js.map +1 -1
- package/dist/store/reducers/codeAssist/codeAssist.d.ts +6 -6
- package/dist/store/reducers/configs.d.ts +3 -3
- package/dist/store/reducers/entityDataTags.d.ts +21 -0
- package/dist/store/reducers/entityDataTags.js +24 -0
- package/dist/store/reducers/entityDataTags.js.map +1 -0
- package/dist/store/reducers/environments/environments.d.ts +2 -2
- package/dist/store/reducers/executeTopQueries/executeTopQueries.d.ts +4 -4
- package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +111 -111
- package/dist/store/reducers/heatmap.d.ts +2 -2
- package/dist/store/reducers/hotKeys/hotKeys.d.ts +2 -2
- package/dist/store/reducers/index.d.ts +8 -8
- package/dist/store/reducers/network/network.d.ts +2 -2
- package/dist/store/reducers/node/node.d.ts +2 -5
- package/dist/store/reducers/node/node.js +0 -12
- package/dist/store/reducers/node/node.js.map +1 -1
- package/dist/store/reducers/node/types.d.ts +0 -14
- package/dist/store/reducers/nodes/nodes.d.ts +2 -2
- package/dist/store/reducers/nodesList.d.ts +12 -12
- package/dist/store/reducers/operations.d.ts +5 -5
- package/dist/store/reducers/overview/overview.d.ts +2 -2
- package/dist/store/reducers/partitions/partitions.d.ts +3 -3
- package/dist/store/reducers/pdisk/pdisk.d.ts +2 -2
- package/dist/store/reducers/planToSvg.d.ts +2 -2
- package/dist/store/reducers/preview.d.ts +2 -2
- package/dist/store/reducers/query/api.d.ts +4 -4
- package/dist/store/reducers/replication.d.ts +2 -2
- package/dist/store/reducers/schema/schema.d.ts +16 -16
- package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +40 -40
- package/dist/store/reducers/settings/api.d.ts +4 -4
- package/dist/store/reducers/settings/settings.d.ts +1 -1
- package/dist/store/reducers/shardsWorkload/shardsWorkload.d.ts +2 -2
- package/dist/store/reducers/showCreateTable/showCreateTable.d.ts +2 -2
- package/dist/store/reducers/storage/requestStorageData.d.ts +2 -4
- package/dist/store/reducers/storage/requestStorageData.js +4 -10
- package/dist/store/reducers/storage/requestStorageData.js.map +1 -1
- package/dist/store/reducers/storage/storage.d.ts +4 -6
- package/dist/store/reducers/storage/storage.js.map +1 -1
- package/dist/store/reducers/storage/types.d.ts +0 -9
- package/dist/store/reducers/storage/utils.d.ts +1 -2
- package/dist/store/reducers/storage/utils.js +3 -114
- package/dist/store/reducers/storage/utils.js.map +1 -1
- package/dist/store/reducers/storageUsage/StorageUsage.d.ts +2 -2
- package/dist/store/reducers/streamingQuery/streamingQuery.d.ts +2 -2
- package/dist/store/reducers/table/table.d.ts +4 -4
- package/dist/store/reducers/tableData.d.ts +1 -1
- package/dist/store/reducers/tablePartitioning/tablePartitioning.d.ts +2 -2
- package/dist/store/reducers/tableSchemaData.d.ts +2 -2
- package/dist/store/reducers/tablet.d.ts +8 -8
- package/dist/store/reducers/tablets.d.ts +3 -3
- package/dist/store/reducers/tenant/tenant.d.ts +2 -2
- package/dist/store/reducers/tenant/tenant.js +14 -1
- package/dist/store/reducers/tenant/tenant.js.map +1 -1
- package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/storage/tenantOverviewStorage.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.d.ts +2 -2
- package/dist/store/reducers/tenants/tenants.d.ts +3 -3
- package/dist/store/reducers/tenants/tenants.js +2 -1
- package/dist/store/reducers/tenants/tenants.js.map +1 -1
- package/dist/store/reducers/topic/topic.d.ts +84 -84
- package/dist/store/reducers/vdisk/vdisk.d.ts +3 -3
- package/dist/store/reducers/viewSchema/viewSchema.d.ts +2 -2
- package/dist/store/state-url-mapping.js +5 -1
- package/dist/store/state-url-mapping.js.map +1 -1
- package/dist/types/api/storage.d.ts +2 -111
- package/dist/types/api/storage.js.map +1 -1
- package/dist/uiFactory/types.d.ts +8 -0
- package/dist/uiFactory/uiFactory.js +5 -2
- package/dist/uiFactory/uiFactory.js.map +1 -1
- package/dist/utils/hooks/useWhoami.d.ts +5 -5
- package/package.json +2 -2
- package/src/components/ComponentsProvider/componentsRegistry.ts +1 -4
- package/src/components/ContentWithPopup/ContentWithPopup.tsx +7 -0
- package/src/components/CriticalActionDialog/CriticalActionDialog.tsx +12 -25
- package/src/components/CriticalActionDialog/i18n/en.json +1 -2
- package/src/components/DropdownMenu/DropdownMenu.tsx +3 -2
- package/src/components/HoverPopup/HoverPopup.tsx +32 -3
- package/src/components/HoverPopup/getPopupScrollContainer.ts +20 -0
- package/src/components/SegmentedProgress/SegmentedProgress.scss +5 -0
- package/src/components/SegmentedProgress/SegmentedProgress.tsx +99 -10
- package/src/components/StorageGroupInfo/StorageGroupInfo.tsx +0 -13
- package/src/components/StorageGroupInfo/i18n/en.json +0 -1
- package/src/containers/App/App.tsx +3 -3
- package/src/containers/Cluster/ClusterInfo/ClusterInfo.scss +8 -0
- package/src/containers/Cluster/ClusterInfo/ClusterInfo.tsx +12 -11
- package/src/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.scss +18 -0
- package/src/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.tsx +143 -58
- package/src/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/utils.ts +89 -0
- package/src/containers/Cluster/i18n/en.json +13 -4
- package/src/containers/Header/HeaderActionsMenu.tsx +22 -2
- package/src/containers/Header/hooks/useSharedDatabasePath.ts +33 -26
- package/src/containers/Header/i18n/en.json +1 -0
- package/src/containers/Node/Node.tsx +32 -18
- package/src/containers/Node/NodePages.ts +5 -10
- package/src/containers/Node/i18n/en.json +0 -4
- package/src/containers/Nodes/NodesTable.tsx +7 -1
- package/src/containers/Operations/columns.tsx +4 -0
- package/src/containers/Operations/i18n/en.json +2 -2
- package/src/containers/PDiskPage/DecommissionButton/DecommissionButton.tsx +2 -0
- package/src/containers/PDiskPage/PDiskPage.tsx +3 -1
- package/src/containers/PDiskPage/i18n/en.json +3 -3
- package/src/containers/Storage/PDisks/PDisks.tsx +1 -1
- package/src/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.tsx +0 -1
- package/src/containers/Storage/PaginatedStorageGroupsTable/PaginatedStorageGroupsTable.tsx +2 -6
- package/src/containers/Storage/PaginatedStorageGroupsTable/columns/constants.ts +2 -2
- package/src/containers/Storage/PaginatedStorageGroupsTable/getGroups.ts +40 -47
- package/src/containers/StorageGroupPage/StorageGroupPage.tsx +2 -6
- package/src/containers/Tablet/components/TabletControls/TabletControls.tsx +7 -1
- package/src/containers/Tablet/i18n/en.json +3 -3
- package/src/containers/Tablets/TabletsTable.tsx +3 -1
- package/src/containers/Tablets/i18n/en.json +1 -1
- package/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.tsx +3 -1
- package/src/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.tsx +2 -2
- package/src/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.tsx +1 -6
- package/src/containers/Tenant/Diagnostics/useDiagnosticsPages.ts +1 -4
- package/src/containers/Tenant/Healthcheck/components/HealthcheckDrawer.tsx +16 -1
- package/src/routes.ts +1 -1
- package/src/services/api/viewer.ts +1 -25
- package/src/store/reducers/api.ts +4 -0
- package/src/store/reducers/capabilities/hooks.ts +0 -4
- package/src/store/reducers/cluster/cluster.ts +3 -2
- package/src/store/reducers/clusters/clusters.ts +2 -1
- package/src/store/reducers/entityDataTags.ts +34 -0
- package/src/store/reducers/node/node.ts +0 -11
- package/src/store/reducers/node/types.ts +0 -18
- package/src/store/reducers/storage/requestStorageData.ts +5 -17
- package/src/store/reducers/storage/storage.ts +2 -6
- package/src/store/reducers/storage/types.ts +0 -9
- package/src/store/reducers/storage/utils.ts +5 -178
- package/src/store/reducers/tenant/tenant.ts +17 -1
- package/src/store/reducers/tenants/tenants.ts +2 -1
- package/src/store/state-url-mapping.ts +5 -1
- package/src/types/api/storage.ts +7 -131
- package/src/uiFactory/types.ts +9 -0
- package/src/uiFactory/uiFactory.ts +12 -2
- package/dist/containers/Node/NodeStructure/NodeStructure.d.ts +0 -7
- package/dist/containers/Node/NodeStructure/NodeStructure.js +0 -76
- package/dist/containers/Node/NodeStructure/NodeStructure.js.map +0 -1
- package/dist/containers/Node/NodeStructure/NodeStructure.scss +0 -155
- package/dist/containers/Node/NodeStructure/PDiskTitleBadge.d.ts +0 -7
- package/dist/containers/Node/NodeStructure/PDiskTitleBadge.js +0 -7
- package/dist/containers/Node/NodeStructure/PDiskTitleBadge.js.map +0 -1
- package/dist/containers/Node/NodeStructure/Pdisk.d.ts +0 -10
- package/dist/containers/Node/NodeStructure/Pdisk.js +0 -125
- package/dist/containers/Node/NodeStructure/Pdisk.js.map +0 -1
- package/dist/store/reducers/node/selectors.d.ts +0 -47
- package/dist/store/reducers/node/selectors.js +0 -43
- package/dist/store/reducers/node/selectors.js.map +0 -1
- package/src/containers/Node/NodeStructure/NodeStructure.scss +0 -155
- package/src/containers/Node/NodeStructure/NodeStructure.tsx +0 -121
- package/src/containers/Node/NodeStructure/PDiskTitleBadge.tsx +0 -18
- package/src/containers/Node/NodeStructure/Pdisk.tsx +0 -274
- package/src/store/reducers/node/selectors.ts +0 -68
|
@@ -14,7 +14,7 @@ export type VDiskBlobIndexStatParams = VDiskBlobIndexStatBasicParams & {
|
|
|
14
14
|
database?: string;
|
|
15
15
|
};
|
|
16
16
|
export declare const vDiskApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, {
|
|
17
|
-
getVDiskData: import("@reduxjs/toolkit/query").QueryDefinition<VDiskDataRequestParams, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "
|
|
18
|
-
getVDiskBlobIndexStat: import("@reduxjs/toolkit/query").QueryDefinition<VDiskBlobIndexStatParams, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "
|
|
19
|
-
}, "api", "
|
|
17
|
+
getVDiskData: import("@reduxjs/toolkit/query").QueryDefinition<VDiskDataRequestParams, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "Conversations" | "Events" | "PDiskData" | "PreviewData" | "SchemaTree" | "StorageData" | "TableData" | "Partitions" | "Tablet" | "UserData" | "VDiskData" | "VDiskBlobIndexStat" | "AccessRights" | "Backups" | "BackupsSchedule" | "OperationList" | "DatabaseData" | "ClusterData", import("./types").VDiskData | undefined, "api", any>;
|
|
18
|
+
getVDiskBlobIndexStat: import("@reduxjs/toolkit/query").QueryDefinition<VDiskBlobIndexStatParams, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "Conversations" | "Events" | "PDiskData" | "PreviewData" | "SchemaTree" | "StorageData" | "TableData" | "Partitions" | "Tablet" | "UserData" | "VDiskData" | "VDiskBlobIndexStat" | "AccessRights" | "Backups" | "BackupsSchedule" | "OperationList" | "DatabaseData" | "ClusterData", import("../../../types/api/vdiskBlobIndex").VDiskBlobIndexResponse | undefined, "api", any>;
|
|
19
|
+
}, "api", "All" | "Conversations" | "Events" | "PDiskData" | "PreviewData" | "SchemaTree" | "StorageData" | "TableData" | "Partitions" | "Tablet" | "UserData" | "VDiskData" | "VDiskBlobIndexStat" | "AccessRights" | "Backups" | "BackupsSchedule" | "OperationList" | "DatabaseData" | "ClusterData", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
|
|
20
20
|
export {};
|
|
@@ -4,5 +4,5 @@ export declare const viewSchemaApi: import("@reduxjs/toolkit/query").Api<import(
|
|
|
4
4
|
path: string;
|
|
5
5
|
databaseFullPath: string;
|
|
6
6
|
timeout?: number;
|
|
7
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "
|
|
8
|
-
}, "api", "
|
|
7
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "Conversations" | "Events" | "PDiskData" | "PreviewData" | "SchemaTree" | "StorageData" | "TableData" | "Partitions" | "Tablet" | "UserData" | "VDiskData" | "VDiskBlobIndexStat" | "AccessRights" | "Backups" | "BackupsSchedule" | "OperationList" | "DatabaseData" | "ClusterData", import("../../../types/api/query").ColumnType[] | undefined, "api", any>;
|
|
8
|
+
}, "api", "All" | "Conversations" | "Events" | "PDiskData" | "PreviewData" | "SchemaTree" | "StorageData" | "TableData" | "Partitions" | "Tablet" | "UserData" | "VDiskData" | "VDiskBlobIndexStat" | "AccessRights" | "Backups" | "BackupsSchedule" | "OperationList" | "DatabaseData" | "ClusterData", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createNextState } from '@reduxjs/toolkit';
|
|
1
2
|
import each from 'lodash/each';
|
|
2
3
|
import keys from 'lodash/keys';
|
|
3
4
|
import merge from 'lodash/merge';
|
|
@@ -68,7 +69,10 @@ export const paramSetup = {
|
|
|
68
69
|
'/*/tenant': databasePageParams,
|
|
69
70
|
};
|
|
70
71
|
function mergeLocationToState(state, location) {
|
|
71
|
-
|
|
72
|
+
// Preserve cached API data when updating only URL-backed state.
|
|
73
|
+
return createNextState(state, (draft) => {
|
|
74
|
+
merge(draft, location.query);
|
|
75
|
+
});
|
|
72
76
|
}
|
|
73
77
|
function restoreUnknownParams(location, prevLocation) {
|
|
74
78
|
const { search, ...rest } = location;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-url-mapping.js","sourceRoot":"","sources":["../../src/store/state-url-mapping.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"state-url-mapping.js","sourceRoot":"","sources":["../../src/store/state-url-mapping.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eA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
|
@@ -2,100 +2,6 @@ import type { BackendSortParam, SchemaPathParam } from './common';
|
|
|
2
2
|
import type { ECapacityAlert, EFlag } from './enums';
|
|
3
3
|
import type { EDecommitStatus, EDriveStatus, EMaintenanceStatus, TPDiskStateInfo } from './pdisk';
|
|
4
4
|
import type { EVDiskStatus, TVDiskStateInfo } from './vdisk';
|
|
5
|
-
/**
|
|
6
|
-
* endpoint: /viewer/storage
|
|
7
|
-
*
|
|
8
|
-
* source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/viewer/protos/viewer.proto
|
|
9
|
-
*/
|
|
10
|
-
export interface TStorageInfo {
|
|
11
|
-
Overall?: EFlag;
|
|
12
|
-
StoragePools?: TStoragePoolInfo[];
|
|
13
|
-
StorageGroups?: TStorageGroupInfoV2[];
|
|
14
|
-
/** uint64 */
|
|
15
|
-
TotalGroups?: string;
|
|
16
|
-
/** uint64 */
|
|
17
|
-
FoundGroups?: string;
|
|
18
|
-
}
|
|
19
|
-
export interface TStoragePoolInfo {
|
|
20
|
-
Overall?: EFlag;
|
|
21
|
-
Name?: string;
|
|
22
|
-
Kind?: string;
|
|
23
|
-
Groups?: TStorageGroupInfo[];
|
|
24
|
-
/** uint64 */
|
|
25
|
-
AcquiredUnits?: string;
|
|
26
|
-
AcquiredIOPS?: number;
|
|
27
|
-
/** uint64 */
|
|
28
|
-
AcquiredThroughput?: string;
|
|
29
|
-
/** uint64 */
|
|
30
|
-
AcquiredSize?: string;
|
|
31
|
-
MaximumIOPS?: number;
|
|
32
|
-
/** uint64 */
|
|
33
|
-
MaximumThroughput?: string;
|
|
34
|
-
/** uint64 */
|
|
35
|
-
MaximumSize?: string;
|
|
36
|
-
MediaType?: string;
|
|
37
|
-
}
|
|
38
|
-
export interface TStorageGroupInfoV2 extends TStorageGroupInfo {
|
|
39
|
-
PoolName?: string;
|
|
40
|
-
Kind?: string;
|
|
41
|
-
MediaType?: string;
|
|
42
|
-
/** uint64 */
|
|
43
|
-
Degraded?: string;
|
|
44
|
-
/** uint64 */
|
|
45
|
-
Used: string;
|
|
46
|
-
/** uint64 */
|
|
47
|
-
Limit: string;
|
|
48
|
-
/** uint64 */
|
|
49
|
-
Read: string;
|
|
50
|
-
/** uint64 */
|
|
51
|
-
Write: string;
|
|
52
|
-
/** uint64 */
|
|
53
|
-
Usage?: string;
|
|
54
|
-
}
|
|
55
|
-
export type TStorageGroupInfo = TBSGroupStateInfo & THiveStorageGroupStats & {
|
|
56
|
-
DiskSpace?: EFlag;
|
|
57
|
-
};
|
|
58
|
-
interface TBSGroupStateInfo {
|
|
59
|
-
GroupID?: number;
|
|
60
|
-
ErasureSpecies?: Erasure;
|
|
61
|
-
VDisks?: TVDiskStateInfo[];
|
|
62
|
-
/** uint64 */
|
|
63
|
-
ChangeTime?: string;
|
|
64
|
-
NodeId?: number;
|
|
65
|
-
GroupGeneration?: number;
|
|
66
|
-
Overall?: EFlag;
|
|
67
|
-
Latency?: EFlag;
|
|
68
|
-
Count?: number;
|
|
69
|
-
StoragePoolName?: string;
|
|
70
|
-
/** uint64 */
|
|
71
|
-
AllocatedSize?: string;
|
|
72
|
-
/** uint64 */
|
|
73
|
-
AvailableSize?: string;
|
|
74
|
-
/** uint64 */
|
|
75
|
-
ReadThroughput?: string;
|
|
76
|
-
/** uint64 */
|
|
77
|
-
WriteThroughput?: string;
|
|
78
|
-
Encryption?: boolean;
|
|
79
|
-
}
|
|
80
|
-
interface THiveStorageGroupStats {
|
|
81
|
-
GroupID?: number;
|
|
82
|
-
/** uint64 */
|
|
83
|
-
AcquiredUnits?: string;
|
|
84
|
-
AcquiredIOPS?: number;
|
|
85
|
-
/** uint64 */
|
|
86
|
-
AcquiredThroughput?: string;
|
|
87
|
-
/** uint64 */
|
|
88
|
-
AcquiredSize?: string;
|
|
89
|
-
MaximumIOPS?: number;
|
|
90
|
-
/** uint64 */
|
|
91
|
-
MaximumThroughput?: string;
|
|
92
|
-
/** uint64 */
|
|
93
|
-
MaximumSize?: string;
|
|
94
|
-
/** uint64 */
|
|
95
|
-
AllocatedSize?: string;
|
|
96
|
-
/** uint64 */
|
|
97
|
-
AvailableSize?: string;
|
|
98
|
-
}
|
|
99
5
|
/**
|
|
100
6
|
* endpoint: /storage/groups
|
|
101
7
|
*
|
|
@@ -230,21 +136,15 @@ export interface TStoragePDisk {
|
|
|
230
136
|
* https://ydb.tech/docs/en/concepts/topology#cluster-config
|
|
231
137
|
*/
|
|
232
138
|
export type Erasure = 'none' | 'block-4-2' | 'mirror-3-dc' | 'mirror-3of4';
|
|
233
|
-
export type EVersion = 'v1' | 'v2';
|
|
234
|
-
/**
|
|
235
|
-
* Values to sort /viewer/storage v2 response
|
|
236
|
-
*/
|
|
237
|
-
export type StorageV2SortValue = 'PoolName' | 'Kind' | 'MediaType' | 'Erasure' | 'Degraded' | 'Usage' | 'GroupId' | 'Used' | 'Limit' | 'Read' | 'Write' | 'AllocationUnits' | 'Latency' | 'DiskSpaceUsage' | 'State' | 'MaxPDiskUsage' | 'MaxVDiskSlotUsage' | 'MaxVDiskRawUsage' | 'MaxNormalizedOccupancy' | 'CapacityAlert';
|
|
238
139
|
/**
|
|
239
140
|
* Values to sort /storage/groups response
|
|
240
141
|
*/
|
|
241
|
-
export type GroupsSortField =
|
|
242
|
-
export type StorageV2Sort = BackendSortParam<StorageV2SortValue>;
|
|
142
|
+
export type GroupsSortField = 'PoolName' | 'Kind' | 'MediaType' | 'Erasure' | 'Degraded' | 'Usage' | 'GroupId' | 'Used' | 'Limit' | 'Read' | 'Write' | 'AllocationUnits' | 'Latency' | 'DiskSpaceUsage' | 'State' | 'MaxPDiskUsage' | 'MaxVDiskSlotUsage' | 'MaxVDiskRawUsage' | 'MaxNormalizedOccupancy' | 'CapacityAlert' | 'MissingDisks' | 'Available' | 'Encryption';
|
|
243
143
|
export type GroupsSort = BackendSortParam<GroupsSortField>;
|
|
244
144
|
export type StorageWithFilter = 'space' | 'missing' | 'all';
|
|
245
145
|
export type GroupsGroupByField = 'GroupId' | 'Erasure' | 'Usage' | 'DiskSpaceUsage' | 'PoolName' | 'PileName' | 'Kind' | 'Encryption' | 'MediaType' | 'MissingDisks' | 'State' | 'Latency' | 'CapacityAlert';
|
|
246
146
|
export type GroupsRequiredField = 'GroupId' | 'PoolName' | 'PileName' | 'Kind' | 'MediaType' | 'Erasure' | 'MissingDisks' | 'Degraded' | 'State' | 'Used' | 'Limit' | 'Usage' | 'Available' | 'DiskSpaceUsage' | 'Encryption' | 'AllocationUnits' | 'GroupSizeInUnits' | 'Read' | 'Write' | 'PDisk' | 'VDisk' | 'Latency' | 'MaxPDiskUsage' | 'MaxVDiskSlotUsage' | 'MaxVDiskRawUsage' | 'MaxNormalizedOccupancy' | 'CapacityAlert';
|
|
247
|
-
interface
|
|
147
|
+
export interface GroupsRequestParams {
|
|
248
148
|
database?: string;
|
|
249
149
|
pool?: string;
|
|
250
150
|
with?: StorageWithFilter;
|
|
@@ -252,15 +152,6 @@ interface BaseStorageRequestParams {
|
|
|
252
152
|
filter?: string;
|
|
253
153
|
offset?: number;
|
|
254
154
|
limit?: number;
|
|
255
|
-
}
|
|
256
|
-
export interface StorageRequestParams extends BaseStorageRequestParams {
|
|
257
|
-
nodeId?: string | number;
|
|
258
|
-
pDiskId?: string | number;
|
|
259
|
-
groupId?: string | number;
|
|
260
|
-
sort?: StorageV2Sort;
|
|
261
|
-
version?: EVersion;
|
|
262
|
-
}
|
|
263
|
-
export interface GroupsRequestParams extends BaseStorageRequestParams {
|
|
264
155
|
nodeId?: string | number | (string | number)[];
|
|
265
156
|
pDiskId?: string | number | (string | number)[];
|
|
266
157
|
groupId?: string | number | (string | number)[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/types/api/storage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/types/api/storage.ts"],"names":[],"mappings":"AAySA,MAAM,CAAN,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC5B,0DAAkC,CAAA;AACtC,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,QAE/B"}
|
|
@@ -33,7 +33,9 @@ export interface UIFactory<H extends string = CommonIssueCategory, T extends str
|
|
|
33
33
|
renderEvents?: RenderEvents;
|
|
34
34
|
renderMonitoring?: RenderMonitoring;
|
|
35
35
|
renderNodeTooltipActions?: RenderNodeTooltipActions;
|
|
36
|
+
renderChatPanel?: RenderChatPanel;
|
|
36
37
|
clusterOrDatabaseAccessError?: Partial<EmptyStateProps>;
|
|
38
|
+
/** Defaults to true. Undefined preserves the current value when configuring the UI. */
|
|
37
39
|
enableMultiTabQueryEditor?: boolean;
|
|
38
40
|
/** Creates a fresh computation-graph layout worker for each layout run. */
|
|
39
41
|
createGraphLayoutWorker?: CreateGraphLayoutWorker;
|
|
@@ -43,6 +45,11 @@ export interface UIFactory<H extends string = CommonIssueCategory, T extends str
|
|
|
43
45
|
getHealthckechViewTitles: GetHealthcheckViewTitles<H>;
|
|
44
46
|
getHealthcheckViewsOrder: GetHealthcheckViewsOrder<H>;
|
|
45
47
|
renderAssistantAction?: RenderHealthcheckAssistantAction;
|
|
48
|
+
/**
|
|
49
|
+
* Renders after the drawer header and before Healthcheck content.
|
|
50
|
+
* Stays mounted while the drawer is open, independent of loading, error or issue state.
|
|
51
|
+
*/
|
|
52
|
+
renderDrawerExtension?: () => React.ReactNode;
|
|
46
53
|
};
|
|
47
54
|
hasAccess: HasAccess;
|
|
48
55
|
hideGrantAccess?: boolean;
|
|
@@ -155,6 +162,7 @@ export type RenderMonitoring = (props: {
|
|
|
155
162
|
export type RenderNodeTooltipActions = (props: {
|
|
156
163
|
data?: PreparedStorageNode;
|
|
157
164
|
}) => React.ReactNode;
|
|
165
|
+
export type RenderChatPanel = () => React.ReactNode;
|
|
158
166
|
export type RenderHealthcheckAssistantAction = (props: HealthcheckAssistantActionProps) => React.ReactNode;
|
|
159
167
|
export interface UiMetricaGoals {
|
|
160
168
|
runQuery?: string;
|
|
@@ -14,14 +14,17 @@ const uiFactoryBase = {
|
|
|
14
14
|
useDatabaseId: false,
|
|
15
15
|
settingsBackend: undefined,
|
|
16
16
|
docs: undefined,
|
|
17
|
-
enableMultiTabQueryEditor:
|
|
17
|
+
enableMultiTabQueryEditor: true,
|
|
18
18
|
hasDeveloperUi: true,
|
|
19
19
|
isDetailedStorageViewAvailable: () => true,
|
|
20
20
|
maxVDisksInStorageGroup: 9,
|
|
21
21
|
};
|
|
22
22
|
export function configureUIFactory(overrides) {
|
|
23
|
-
const { healthcheck, hasAccess, maxVDisksInStorageGroup, ...restOverrides } = overrides;
|
|
23
|
+
const { healthcheck, hasAccess, maxVDisksInStorageGroup, enableMultiTabQueryEditor, ...restOverrides } = overrides;
|
|
24
24
|
Object.assign(uiFactoryBase, restOverrides);
|
|
25
|
+
if (typeof enableMultiTabQueryEditor === 'boolean') {
|
|
26
|
+
uiFactoryBase.enableMultiTabQueryEditor = enableMultiTabQueryEditor;
|
|
27
|
+
}
|
|
25
28
|
// Only override hasAccess when an actual function is provided.
|
|
26
29
|
// Forwarding an optional config field could pass `undefined` here,
|
|
27
30
|
// which would overwrite the default and crash on the next hasAccess(...) call.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uiFactory.js","sourceRoot":"","sources":["../../src/uiFactory/uiFactory.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAErC,OAAO,EACH,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,eAAe,GAClB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACH,wBAAwB,IAAI,+BAA+B,EAC3D,iBAAiB,IAAI,wBAAwB,GAChD,MAAM,qBAAqB,CAAC;AAQ7B,MAAM,aAAa,GAAsB;IACrC,iBAAiB,EAAE,wBAAwB;IAC3C,wBAAwB,EAAE,+BAA+B;IACzD,WAAW,EAAE;QACT,eAAe;QACf,qBAAqB;QACrB,wBAAwB;QACxB,wBAAwB;KAC3B;IACD,SAAS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<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
34
34
|
database?: string;
|
|
35
35
|
useMeta?: boolean;
|
|
36
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, "
|
|
36
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, "All" | "Conversations" | "Events" | "PDiskData" | "PreviewData" | "SchemaTree" | "StorageData" | "TableData" | "Partitions" | "Tablet" | "UserData" | "VDiskData" | "VDiskBlobIndexStat" | "AccessRights" | "Backups" | "BackupsSchedule" | "OperationList" | "DatabaseData" | "ClusterData", TUserToken | undefined, "api", any>> & {
|
|
37
37
|
currentData?: TUserToken | undefined;
|
|
38
38
|
isUninitialized: false;
|
|
39
39
|
isLoading: false;
|
|
@@ -51,7 +51,7 @@ export declare function useWhoami(): (import("@reduxjs/toolkit/query").TSHelpers
|
|
|
51
51
|
} & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
52
52
|
database?: string;
|
|
53
53
|
useMeta?: boolean;
|
|
54
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, "
|
|
54
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, "All" | "Conversations" | "Events" | "PDiskData" | "PreviewData" | "SchemaTree" | "StorageData" | "TableData" | "Partitions" | "Tablet" | "UserData" | "VDiskData" | "VDiskBlobIndexStat" | "AccessRights" | "Backups" | "BackupsSchedule" | "OperationList" | "DatabaseData" | "ClusterData", TUserToken | undefined, "api", any>> & {
|
|
55
55
|
currentData?: TUserToken | undefined;
|
|
56
56
|
isUninitialized: false;
|
|
57
57
|
isLoading: false;
|
|
@@ -65,7 +65,7 @@ export declare function useWhoami(): (import("@reduxjs/toolkit/query").TSHelpers
|
|
|
65
65
|
} & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
66
66
|
database?: string;
|
|
67
67
|
useMeta?: boolean;
|
|
68
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, "
|
|
68
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, "All" | "Conversations" | "Events" | "PDiskData" | "PreviewData" | "SchemaTree" | "StorageData" | "TableData" | "Partitions" | "Tablet" | "UserData" | "VDiskData" | "VDiskBlobIndexStat" | "AccessRights" | "Backups" | "BackupsSchedule" | "OperationList" | "DatabaseData" | "ClusterData", TUserToken | undefined, "api", any>> & {
|
|
69
69
|
currentData?: TUserToken | undefined;
|
|
70
70
|
isUninitialized: false;
|
|
71
71
|
isLoading: false;
|
|
@@ -77,7 +77,7 @@ export declare function useWhoami(): (import("@reduxjs/toolkit/query").TSHelpers
|
|
|
77
77
|
} & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
78
78
|
database?: string;
|
|
79
79
|
useMeta?: boolean;
|
|
80
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, "
|
|
80
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, "All" | "Conversations" | "Events" | "PDiskData" | "PreviewData" | "SchemaTree" | "StorageData" | "TableData" | "Partitions" | "Tablet" | "UserData" | "VDiskData" | "VDiskBlobIndexStat" | "AccessRights" | "Backups" | "BackupsSchedule" | "OperationList" | "DatabaseData" | "ClusterData", TUserToken | undefined, "api", any>> & {
|
|
81
81
|
currentData?: TUserToken | undefined;
|
|
82
82
|
isUninitialized: false;
|
|
83
83
|
isLoading: false;
|
|
@@ -90,7 +90,7 @@ export declare function useWhoami(): (import("@reduxjs/toolkit/query").TSHelpers
|
|
|
90
90
|
refetch: () => import("@reduxjs/toolkit/query").QueryActionCreatorResult<import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
91
91
|
database?: string;
|
|
92
92
|
useMeta?: boolean;
|
|
93
|
-
}, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, "
|
|
93
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, "All" | "Conversations" | "Events" | "PDiskData" | "PreviewData" | "SchemaTree" | "StorageData" | "TableData" | "Partitions" | "Tablet" | "UserData" | "VDiskData" | "VDiskBlobIndexStat" | "AccessRights" | "Backups" | "BackupsSchedule" | "OperationList" | "DatabaseData" | "ClusterData", TUserToken | undefined, "api", any>>;
|
|
94
94
|
};
|
|
95
95
|
export declare function useUserPermissions(): UserPermissions | undefined;
|
|
96
96
|
export declare function useIsUserAllowedToMakeChanges(): boolean | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ydb-embedded-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.0.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"src"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@ydb-platform/monaco-ghost": "^0.6.1",
|
|
41
41
|
"axios": "^1.18.0",
|
|
42
42
|
"axios-retry": "^4.5.0",
|
|
43
|
-
"colord": "^2.
|
|
43
|
+
"colord": "^2.10.0",
|
|
44
44
|
"copy-to-clipboard": "^3.3.3",
|
|
45
45
|
"crc-32": "^1.2.2",
|
|
46
46
|
"history": "^4.10.1",
|
|
@@ -6,14 +6,11 @@ import {StaffCard} from '../User/StaffCard';
|
|
|
6
6
|
import type {ComponentsRegistryTemplate} from './registry';
|
|
7
7
|
import {Registry} from './registry';
|
|
8
8
|
|
|
9
|
-
const EmptyPlaceholder = () => null;
|
|
10
|
-
|
|
11
9
|
const componentsRegistryInner = new Registry()
|
|
12
10
|
.register('StaffCard', StaffCard)
|
|
13
11
|
.register('AsideNavigation', AsideNavigation)
|
|
14
12
|
.register('ErrorBoundary', ErrorBoundaryInner)
|
|
15
|
-
.register('ShardsTable', ShardsTable)
|
|
16
|
-
.register('ChatPanel', EmptyPlaceholder);
|
|
13
|
+
.register('ShardsTable', ShardsTable);
|
|
17
14
|
|
|
18
15
|
export type ComponentsRegistry = ComponentsRegistryTemplate<typeof componentsRegistryInner>;
|
|
19
16
|
|
|
@@ -3,6 +3,8 @@ import React from 'react';
|
|
|
3
3
|
import type {PopupProps} from '@gravity-ui/uikit';
|
|
4
4
|
import {Popup} from '@gravity-ui/uikit';
|
|
5
5
|
|
|
6
|
+
import {getPopupScrollContainer} from '../HoverPopup/getPopupScrollContainer';
|
|
7
|
+
|
|
6
8
|
interface ContentWithPopupProps extends PopupProps {
|
|
7
9
|
content: React.ReactNode;
|
|
8
10
|
className?: string;
|
|
@@ -17,11 +19,13 @@ export const ContentWithPopup = ({
|
|
|
17
19
|
pinOnClick,
|
|
18
20
|
hasArrow = true,
|
|
19
21
|
placement = ['top', 'bottom'],
|
|
22
|
+
floatingStyles,
|
|
20
23
|
...props
|
|
21
24
|
}: ContentWithPopupProps) => {
|
|
22
25
|
const [isPopupVisible, setIsPopupVisible] = React.useState(false);
|
|
23
26
|
const [isPinned, setIsPinned] = React.useState(false);
|
|
24
27
|
const anchor = React.useRef(null);
|
|
28
|
+
const container = getPopupScrollContainer(anchor.current);
|
|
25
29
|
|
|
26
30
|
const showPopup = () => {
|
|
27
31
|
setIsPopupVisible(true);
|
|
@@ -42,6 +46,9 @@ export const ContentWithPopup = ({
|
|
|
42
46
|
return (
|
|
43
47
|
<React.Fragment>
|
|
44
48
|
<Popup
|
|
49
|
+
container={container}
|
|
50
|
+
strategy="fixed"
|
|
51
|
+
floatingStyles={{fontFamily: 'var(--g-text-body-font-family)', ...floatingStyles}}
|
|
45
52
|
anchorElement={anchor.current}
|
|
46
53
|
open={isPinned || isPopupVisible}
|
|
47
54
|
placement={placement}
|
|
@@ -6,6 +6,7 @@ import type {ButtonView} from '@gravity-ui/uikit';
|
|
|
6
6
|
import {ResultIssues} from '../../containers/Tenant/Query/Issues/Issues';
|
|
7
7
|
import type {IResponseError} from '../../types/api/error';
|
|
8
8
|
import {cn} from '../../utils/cn';
|
|
9
|
+
import {BRAND_BUTTON_CLASS} from '../../utils/constants';
|
|
9
10
|
import {isResponseError, isResponseErrorWithIssues} from '../../utils/response';
|
|
10
11
|
|
|
11
12
|
import {criticalActionDialogKeyset} from './i18n';
|
|
@@ -103,29 +104,13 @@ export function CriticalActionDialog<T>({
|
|
|
103
104
|
};
|
|
104
105
|
|
|
105
106
|
const renderDialogContent = () => {
|
|
107
|
+
const isRetry = Boolean(error && withRetry);
|
|
108
|
+
let currentApplyButtonText: string | undefined = applyButtonText;
|
|
109
|
+
|
|
106
110
|
if (error) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
<Dialog.Body>
|
|
111
|
-
<Alert theme="danger" message={parseError(error)} view="outlined" />
|
|
112
|
-
</Dialog.Body>
|
|
113
|
-
|
|
114
|
-
<Dialog.Footer
|
|
115
|
-
loading={false}
|
|
116
|
-
preset="default"
|
|
117
|
-
textButtonApply={
|
|
118
|
-
withRetry
|
|
119
|
-
? retryButtonText || criticalActionDialogKeyset('button-retry')
|
|
120
|
-
: undefined
|
|
121
|
-
}
|
|
122
|
-
textButtonCancel={criticalActionDialogKeyset('button-close')}
|
|
123
|
-
propsButtonApply={{view: 'normal'}}
|
|
124
|
-
onClickButtonApply={() => onApply(true)}
|
|
125
|
-
onClickButtonCancel={onClose}
|
|
126
|
-
/>
|
|
127
|
-
</React.Fragment>
|
|
128
|
-
);
|
|
111
|
+
currentApplyButtonText = isRetry
|
|
112
|
+
? retryButtonText || criticalActionDialogKeyset('button-retry')
|
|
113
|
+
: undefined;
|
|
129
114
|
}
|
|
130
115
|
|
|
131
116
|
return (
|
|
@@ -136,6 +121,7 @@ export function CriticalActionDialog<T>({
|
|
|
136
121
|
<Flex direction="column" gap={4}>
|
|
137
122
|
{description && <Text as="div">{description}</Text>}
|
|
138
123
|
{warningText && <Alert theme="warning" message={warningText} />}
|
|
124
|
+
{error && <Alert theme="danger" message={parseError(error)} />}
|
|
139
125
|
{renderCheckBox()}
|
|
140
126
|
</Flex>
|
|
141
127
|
</Dialog.Body>
|
|
@@ -143,15 +129,16 @@ export function CriticalActionDialog<T>({
|
|
|
143
129
|
<Dialog.Footer
|
|
144
130
|
loading={isLoading}
|
|
145
131
|
preset="default"
|
|
146
|
-
textButtonApply={
|
|
132
|
+
textButtonApply={currentApplyButtonText}
|
|
147
133
|
textButtonCancel={criticalActionDialogKeyset('button-cancel')}
|
|
148
134
|
propsButtonApply={{
|
|
149
135
|
type: 'submit',
|
|
150
136
|
disabled: withCheckBox && !checkBoxChecked,
|
|
151
137
|
view: applyButtonView,
|
|
138
|
+
className: applyButtonView === 'action' ? BRAND_BUTTON_CLASS : undefined,
|
|
152
139
|
}}
|
|
153
140
|
onClickButtonCancel={onClose}
|
|
154
|
-
onClickButtonApply={() => onApply()}
|
|
141
|
+
onClickButtonApply={() => onApply(isRetry ? true : undefined)}
|
|
155
142
|
/>
|
|
156
143
|
</React.Fragment>
|
|
157
144
|
);
|
|
@@ -160,7 +147,7 @@ export function CriticalActionDialog<T>({
|
|
|
160
147
|
return (
|
|
161
148
|
<Dialog
|
|
162
149
|
open={visible}
|
|
163
|
-
hasCloseButton
|
|
150
|
+
hasCloseButton
|
|
164
151
|
className={b()}
|
|
165
152
|
size="s"
|
|
166
153
|
onClose={onClose}
|
|
@@ -14,7 +14,8 @@ import './DropdownMenu.scss';
|
|
|
14
14
|
const b = cn('ydb-dropdown-menu');
|
|
15
15
|
|
|
16
16
|
export interface DropdownMenuItemWithDescription<T = HTMLElement>
|
|
17
|
-
extends Omit<DropdownMenuItem<T>, 'text' | 'iconStart'> {
|
|
17
|
+
extends Omit<DropdownMenuItem<T>, 'text' | 'iconStart' | 'title'> {
|
|
18
|
+
title: React.ReactNode;
|
|
18
19
|
description?: React.ReactNode;
|
|
19
20
|
iconStart?: IconProps['data'];
|
|
20
21
|
}
|
|
@@ -30,7 +31,7 @@ function renderMenuItemText({
|
|
|
30
31
|
}: Pick<DropdownMenuItemWithDescription, 'title' | 'description'>) {
|
|
31
32
|
return (
|
|
32
33
|
<Flex direction="column" className={b('item-content')}>
|
|
33
|
-
<Text className={b('item-title')}>{title}</Text>
|
|
34
|
+
{typeof title === 'string' ? <Text className={b('item-title')}>{title}</Text> : title}
|
|
34
35
|
{description ? (
|
|
35
36
|
<Text color="secondary" className={b('item-description')}>
|
|
36
37
|
{description}
|
|
@@ -6,8 +6,29 @@ import debounce from 'lodash/debounce';
|
|
|
6
6
|
|
|
7
7
|
import {YDB_POPOVER_CLASS_NAME} from '../../utils/constants';
|
|
8
8
|
|
|
9
|
+
import {getPopupScrollContainer} from './getPopupScrollContainer';
|
|
10
|
+
|
|
9
11
|
const DEBOUNCE_TIMEOUT = 100;
|
|
10
12
|
|
|
13
|
+
function useVisibleAnchor(anchorElement: HTMLElement | null, open: boolean) {
|
|
14
|
+
const [visibleAnchor, setVisibleAnchor] = React.useState<HTMLElement | null>(null);
|
|
15
|
+
|
|
16
|
+
React.useLayoutEffect(() => {
|
|
17
|
+
setVisibleAnchor(null);
|
|
18
|
+
if (!open || !anchorElement) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const observer = new IntersectionObserver(([entry]) => {
|
|
23
|
+
setVisibleAnchor(entry.isIntersecting ? anchorElement : null);
|
|
24
|
+
});
|
|
25
|
+
observer.observe(anchorElement);
|
|
26
|
+
return () => observer.disconnect();
|
|
27
|
+
}, [anchorElement, open]);
|
|
28
|
+
|
|
29
|
+
return anchorElement !== null && visibleAnchor === anchorElement;
|
|
30
|
+
}
|
|
31
|
+
|
|
11
32
|
type HoverPopupProps = {
|
|
12
33
|
children: React.ReactNode;
|
|
13
34
|
renderPopupContent: (controls: {onClose: VoidFunction}) => React.ReactNode;
|
|
@@ -28,7 +49,7 @@ export const HoverPopup = ({
|
|
|
28
49
|
anchorRef,
|
|
29
50
|
onShowPopup,
|
|
30
51
|
onHidePopup,
|
|
31
|
-
placement = ['top', 'bottom'],
|
|
52
|
+
placement = ['top', 'bottom', 'left', 'right'],
|
|
32
53
|
contentClassName,
|
|
33
54
|
delayClose = DEBOUNCE_TIMEOUT,
|
|
34
55
|
delayOpen = DEBOUNCE_TIMEOUT,
|
|
@@ -124,9 +145,12 @@ export const HoverPopup = ({
|
|
|
124
145
|
}, [closePopup]);
|
|
125
146
|
|
|
126
147
|
const internalOpen = isPopupVisible || isPopupContentHovered || isFocused;
|
|
127
|
-
const open = internalOpen || showPopup;
|
|
148
|
+
const open = Boolean(internalOpen || showPopup);
|
|
128
149
|
|
|
129
150
|
const anchorElement = anchorRef?.current || anchor.current;
|
|
151
|
+
// Clipping a paired disk must not clear the shared hover state via onHidePopup.
|
|
152
|
+
const isAnchorVisible = useVisibleAnchor(anchorElement, open);
|
|
153
|
+
const container = getPopupScrollContainer(anchorElement);
|
|
130
154
|
|
|
131
155
|
return (
|
|
132
156
|
<React.Fragment>
|
|
@@ -135,6 +159,9 @@ export const HoverPopup = ({
|
|
|
135
159
|
</span>
|
|
136
160
|
{anchorElement ? (
|
|
137
161
|
<Popup
|
|
162
|
+
container={container}
|
|
163
|
+
// Keep portal typography when the page uses a different font.
|
|
164
|
+
floatingStyles={{fontFamily: 'var(--g-text-body-font-family)'}}
|
|
138
165
|
anchorElement={anchorElement}
|
|
139
166
|
onOpenChange={(_open, _event, reason) => {
|
|
140
167
|
if (reason === 'escape-key') {
|
|
@@ -142,9 +169,11 @@ export const HoverPopup = ({
|
|
|
142
169
|
}
|
|
143
170
|
}}
|
|
144
171
|
placement={placement}
|
|
172
|
+
// Exiting popups must not expand the page when their anchors scroll offscreen.
|
|
173
|
+
strategy="fixed"
|
|
145
174
|
returnFocus={false}
|
|
146
175
|
hasArrow
|
|
147
|
-
open={open}
|
|
176
|
+
open={open && isAnchorVisible}
|
|
148
177
|
// bigger offset for easier switching to neighbour nodes
|
|
149
178
|
// matches the default offset for popup with arrow out of a sense of beauty
|
|
150
179
|
offset={offset || {mainAxis: 12, crossAxis: 0}}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export function getPopupScrollContainer(anchor: HTMLElement | null) {
|
|
2
|
+
if (!anchor) {
|
|
3
|
+
return undefined;
|
|
4
|
+
}
|
|
5
|
+
const doc = anchor.ownerDocument;
|
|
6
|
+
let parent = anchor.parentElement;
|
|
7
|
+
while (parent) {
|
|
8
|
+
if (
|
|
9
|
+
parent === doc.fullscreenElement ||
|
|
10
|
+
parent.classList.contains('ydb-fullscreen_fullscreen') ||
|
|
11
|
+
(/auto|scroll/.test(doc.defaultView?.getComputedStyle(parent).overflowY ?? '') &&
|
|
12
|
+
parent.scrollHeight > parent.clientHeight)
|
|
13
|
+
) {
|
|
14
|
+
// Document scrolling already works through the default portal.
|
|
15
|
+
return parent === doc.scrollingElement ? undefined : parent;
|
|
16
|
+
}
|
|
17
|
+
parent = parent.parentElement;
|
|
18
|
+
}
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
@@ -35,6 +35,11 @@
|
|
|
35
35
|
|
|
36
36
|
border-radius: var(--g-border-radius-xs);
|
|
37
37
|
background-color: var(--ydb-segmented-progress-empty-color);
|
|
38
|
+
|
|
39
|
+
&:focus-visible {
|
|
40
|
+
outline: 2px solid var(--g-color-line-focus);
|
|
41
|
+
outline-offset: -2px;
|
|
42
|
+
}
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
&__section:not(&__section_used) {
|