ydb-embedded-ui 21.1.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/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/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/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/Tenant/Diagnostics/Partitions/utils/constants.d.ts +2 -2
- 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/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 +0 -111
- 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 +2 -0
- package/dist/utils/hooks/useWhoami.d.ts +5 -5
- package/package.json +1 -1
- package/src/components/ComponentsProvider/componentsRegistry.ts +1 -4
- package/src/components/ContentWithPopup/ContentWithPopup.tsx +7 -0
- 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/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/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/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.tsx +1 -6
- package/src/containers/Tenant/Diagnostics/useDiagnosticsPages.ts +1 -4
- 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 +2 -175
- 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 +3 -0
- 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,eAAe,EAAC,MAAM,kBAAkB,CAAC;AAEjD,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,cAAc,CAAC;AACjC,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,OAAO,EAAC,0BAA0B,EAAC,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAC,YAAY,EAAE,aAAa,EAAC,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAC,uBAAuB,EAAC,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAC,UAAU,EAAC,MAAM,qCAAqC,CAAC;AAC/D,OAAO,EAAC,aAAa,EAAC,MAAM,wCAAwC,CAAC;AAErE,OAAO,EAAC,YAAY,IAAI,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAC,YAAY,IAAI,kBAAkB,EAAC,MAAM,0BAA0B,CAAC;AAE5E,MAAM,kBAAkB,GAAG;IACvB,IAAI,EAAE;QACF,QAAQ,EAAE,cAAc;QACxB,YAAY,EAAE,mBAAmB,CAAC,IAAI;QACtC,IAAI,EAAE,MAAM;KACf;IACD,OAAO,EAAE;QACL,QAAQ,EAAE,iBAAiB;QAC3B,YAAY,EAAE,mBAAmB,CAAC,OAAO;QACzC,IAAI,EAAE,MAAM;KACf;IACD,aAAa,EAAE;QACX,QAAQ,EAAE,uBAAuB;QACjC,YAAY,EAAE,mBAAmB,CAAC,aAAa;KAClD;IACD,QAAQ,EAAE;QACN,QAAQ,EAAE,iBAAiB;KAC9B;IACD,cAAc,EAAE;QACZ,QAAQ,EAAE,uBAAuB;KACpC;IACD,UAAU,EAAE;QACR,QAAQ,EAAE,mBAAmB;KAChC;IACD,UAAU,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C;IACF,MAAM,oBAAoB,GAAG,wBAAwB,CACjD,UAAU,EACV,oBAAoB,EACpB,WAAW,CACd,CAAC;IACF,OAAO,EAAC,kBAAkB,EAAE,oBAAoB,EAAC,CAAC;AACtD,CAAC"}
|
|
@@ -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,6 +33,7 @@ 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>;
|
|
37
38
|
/** Defaults to true. Undefined preserves the current value when configuring the UI. */
|
|
38
39
|
enableMultiTabQueryEditor?: boolean;
|
|
@@ -161,6 +162,7 @@ export type RenderMonitoring = (props: {
|
|
|
161
162
|
export type RenderNodeTooltipActions = (props: {
|
|
162
163
|
data?: PreparedStorageNode;
|
|
163
164
|
}) => React.ReactNode;
|
|
165
|
+
export type RenderChatPanel = () => React.ReactNode;
|
|
164
166
|
export type RenderHealthcheckAssistantAction = (props: HealthcheckAssistantActionProps) => React.ReactNode;
|
|
165
167
|
export interface UiMetricaGoals {
|
|
166
168
|
runQuery?: string;
|
|
@@ -33,7 +33,7 @@ export declare function useWhoami(): (import("@reduxjs/toolkit/query").TSHelpers
|
|
|
33
33
|
}) | import("@reduxjs/toolkit/query").TSHelpersOverride<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
|
@@ -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,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) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {Flex, Text} from '@gravity-ui/uikit';
|
|
3
|
+
import {Flex, Text, Tooltip} from '@gravity-ui/uikit';
|
|
4
4
|
|
|
5
5
|
import {cn} from '../../utils/cn';
|
|
6
6
|
|
|
@@ -28,6 +28,7 @@ interface SegmentedProgressByValueProps extends SegmentedProgressBaseProps {
|
|
|
28
28
|
total: number;
|
|
29
29
|
fillPercent?: never;
|
|
30
30
|
displayNoLimit?: DisplayNoLimit;
|
|
31
|
+
segments?: never;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
interface SegmentedProgressByFillPercentProps extends SegmentedProgressBaseProps {
|
|
@@ -35,11 +36,33 @@ interface SegmentedProgressByFillPercentProps extends SegmentedProgressBaseProps
|
|
|
35
36
|
value?: never;
|
|
36
37
|
total?: never;
|
|
37
38
|
displayNoLimit?: never;
|
|
39
|
+
segments?: never;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface SegmentedProgressSegment {
|
|
43
|
+
id: string;
|
|
44
|
+
value: number;
|
|
45
|
+
/** Minimum width in pixels. A positive value keeps zero-value segments visible. */
|
|
46
|
+
minWidth?: number;
|
|
47
|
+
color?: string;
|
|
48
|
+
className?: string;
|
|
49
|
+
dataQa?: string;
|
|
50
|
+
tooltip?: string;
|
|
51
|
+
ariaLabelledBy?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface SegmentedProgressBySegmentsProps extends SegmentedProgressBaseProps {
|
|
55
|
+
segments: SegmentedProgressSegment[];
|
|
56
|
+
total: number;
|
|
57
|
+
value?: never;
|
|
58
|
+
fillPercent?: never;
|
|
59
|
+
displayNoLimit?: never;
|
|
38
60
|
}
|
|
39
61
|
|
|
40
62
|
export type SegmentedProgressProps =
|
|
41
63
|
| SegmentedProgressByValueProps
|
|
42
|
-
| SegmentedProgressByFillPercentProps
|
|
64
|
+
| SegmentedProgressByFillPercentProps
|
|
65
|
+
| SegmentedProgressBySegmentsProps;
|
|
43
66
|
|
|
44
67
|
function clampPercent(percent: number) {
|
|
45
68
|
if (!Number.isFinite(percent) || percent <= 0) {
|
|
@@ -51,7 +74,7 @@ function clampPercent(percent: number) {
|
|
|
51
74
|
return percent;
|
|
52
75
|
}
|
|
53
76
|
|
|
54
|
-
function defaultNormalizePercent(percent: number) {
|
|
77
|
+
export function defaultNormalizePercent(percent: number) {
|
|
55
78
|
if (percent < 1) {
|
|
56
79
|
return Math.round(percent * 10) / 10;
|
|
57
80
|
}
|
|
@@ -64,11 +87,25 @@ function isFillPercentMode(
|
|
|
64
87
|
return typeof props.fillPercent === 'number';
|
|
65
88
|
}
|
|
66
89
|
|
|
90
|
+
function isSegmentsMode(props: SegmentedProgressProps): props is SegmentedProgressBySegmentsProps {
|
|
91
|
+
return Array.isArray(props.segments);
|
|
92
|
+
}
|
|
93
|
+
|
|
67
94
|
function getPercentUsed(props: SegmentedProgressProps) {
|
|
68
95
|
if (isFillPercentMode(props)) {
|
|
69
96
|
return props.fillPercent;
|
|
70
97
|
}
|
|
71
98
|
|
|
99
|
+
if (isSegmentsMode(props)) {
|
|
100
|
+
if (props.total > 0) {
|
|
101
|
+
const value = props.segments.reduce((sum, segment) => sum + segment.value, 0);
|
|
102
|
+
|
|
103
|
+
return (value / props.total) * 100;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
72
109
|
if (props.total > 0) {
|
|
73
110
|
return (props.value / props.total) * 100;
|
|
74
111
|
}
|
|
@@ -110,9 +147,57 @@ export function SegmentedProgress(props: SegmentedProgressProps) {
|
|
|
110
147
|
[normalizePercent, percentUsed],
|
|
111
148
|
);
|
|
112
149
|
const fillWidth = getFillWidth(props, normalizedUsed);
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
150
|
+
const segmentSections = isSegmentsMode(props)
|
|
151
|
+
? props.segments.map((segment) => ({
|
|
152
|
+
...segment,
|
|
153
|
+
width: props.total > 0 ? clampPercent((segment.value / props.total) * 100) : 0,
|
|
154
|
+
}))
|
|
155
|
+
: undefined;
|
|
156
|
+
const hasEmptySection = (segmentSections ? percentUsed : fillWidth) < 100;
|
|
157
|
+
|
|
158
|
+
const renderSections = () => {
|
|
159
|
+
if (segmentSections) {
|
|
160
|
+
return segmentSections
|
|
161
|
+
.filter((segment) => segment.width > 0 || (segment.minWidth ?? 0) > 0)
|
|
162
|
+
.map((segment) => {
|
|
163
|
+
const section = (
|
|
164
|
+
<div
|
|
165
|
+
key={segment.id}
|
|
166
|
+
aria-label={segment.tooltip}
|
|
167
|
+
aria-labelledby={segment.ariaLabelledBy}
|
|
168
|
+
className={b('section', {used: true}, segment.className)}
|
|
169
|
+
data-qa={segment.dataQa}
|
|
170
|
+
role={segment.tooltip ? 'img' : undefined}
|
|
171
|
+
style={{
|
|
172
|
+
width: `${segment.width}%`,
|
|
173
|
+
minWidth: segment.minWidth,
|
|
174
|
+
backgroundColor: segment.color,
|
|
175
|
+
}}
|
|
176
|
+
tabIndex={segment.tooltip ? 0 : undefined}
|
|
177
|
+
/>
|
|
178
|
+
);
|
|
179
|
+
|
|
180
|
+
if (!segment.tooltip) {
|
|
181
|
+
return section;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return (
|
|
185
|
+
<Tooltip key={segment.id} content={segment.tooltip}>
|
|
186
|
+
{section}
|
|
187
|
+
</Tooltip>
|
|
188
|
+
);
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if (fillWidth > 0) {
|
|
193
|
+
return <div className={b('section', {used: true})} style={{width: `${fillWidth}%`}} />;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return null;
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
const renderProgress = () => {
|
|
200
|
+
return (
|
|
116
201
|
<div
|
|
117
202
|
className={b({theme}, className)}
|
|
118
203
|
data-qa={dataQa}
|
|
@@ -122,11 +207,15 @@ export function SegmentedProgress(props: SegmentedProgressProps) {
|
|
|
122
207
|
aria-valuemax={100}
|
|
123
208
|
aria-valuenow={normalizedUsed}
|
|
124
209
|
>
|
|
125
|
-
{
|
|
126
|
-
|
|
127
|
-
)}
|
|
128
|
-
{100 - fillWidth > 0 && <div className={b('section')} style={{flexGrow: 1}} />}
|
|
210
|
+
{renderSections()}
|
|
211
|
+
{hasEmptySection && <div className={b('section')} style={{flexGrow: 1}} />}
|
|
129
212
|
</div>
|
|
213
|
+
);
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
return (
|
|
217
|
+
<Flex direction="column" gap={1}>
|
|
218
|
+
{renderProgress()}
|
|
130
219
|
{!hideLabels && (
|
|
131
220
|
<Flex width="100%">
|
|
132
221
|
{labelStart && <Text color="secondary">{labelStart}</Text>}
|