ydb-embedded-ui 15.7.0 → 15.8.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/MetricChart/reducer.d.ts +2 -2
- package/dist/components/YDBDefinitionList/YDBDefinitionList.d.ts +2 -1
- package/dist/components/YDBDefinitionList/YDBDefinitionList.js.map +1 -1
- package/dist/containers/Operations/useOperationsInfiniteQuery.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +37 -3
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/CompactTableAction/CompactTableAction.d.ts +16 -0
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/CompactTableAction/CompactTableAction.js +131 -0
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/CompactTableAction/CompactTableAction.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/CompactTableAction/CompactTableAction.scss +79 -0
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/ManagePartitioningDialog/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/TableInfo.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/TableInfo.js +22 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/TableInfo.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/en.json +20 -0
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo.d.ts +11 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo.js +7 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TenantMemory.js +3 -8
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TenantMemory.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantNetwork/TenantNetwork.js +6 -11
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantNetwork/TenantNetwork.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TenantStorage.js +4 -12
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TenantStorage.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TenantStorageSegments.js +33 -9
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TenantStorageSegments.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TenantStorageSegments.scss +6 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/displayFormatters.js +4 -4
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/displayFormatters.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/useTenantStorageNewData.d.ts +5 -5
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +3 -1
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js.map +1 -1
- package/dist/containers/Tenant/constants.d.ts +6 -0
- package/dist/containers/Tenant/constants.js +8 -0
- package/dist/containers/Tenant/constants.js.map +1 -1
- package/dist/containers/Tenant/i18n/en.json +1 -0
- package/dist/containers/Tenant/i18n/index.d.ts +1 -1
- package/dist/store/configureStore.d.ts +4 -4
- package/dist/store/defaultStore.d.ts +2 -2
- package/dist/store/reducers/api.d.ts +1 -1
- package/dist/store/reducers/api.js +1 -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 +39 -39
- package/dist/store/reducers/capabilities/hooks.d.ts +5 -5
- package/dist/store/reducers/cluster/cluster.d.ts +5 -5
- package/dist/store/reducers/clusters/clusters.d.ts +2 -2
- package/dist/store/reducers/codeAssist/codeAssist.d.ts +6 -6
- package/dist/store/reducers/configs.d.ts +3 -3
- 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 +3 -3
- package/dist/store/reducers/network/network.d.ts +2 -2
- package/dist/store/reducers/node/node.d.ts +3 -3
- package/dist/store/reducers/node/selectors.d.ts +1 -1
- 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 +10 -5
- package/dist/store/reducers/operations.js +50 -1
- package/dist/store/reducers/operations.js.map +1 -1
- 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 +39 -39
- 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/storage.d.ts +3 -3
- package/dist/store/reducers/storageUsage/StorageUsage.d.ts +2 -2
- package/dist/store/reducers/streamingQuery/streamingQuery.d.ts +2 -2
- 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 +7 -7
- package/dist/store/reducers/tablets.d.ts +3 -3
- package/dist/store/reducers/tenant/tenant.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/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 +2 -2
- package/dist/store/reducers/topic.d.ts +45 -45
- package/dist/store/reducers/vdisk/vdisk.d.ts +3 -3
- package/dist/store/reducers/viewSchema/viewSchema.d.ts +2 -2
- package/dist/uiFactory/types.d.ts +2 -0
- package/dist/utils/featureFlags.d.ts +2 -0
- package/dist/utils/featureFlags.js +6 -0
- package/dist/utils/featureFlags.js.map +1 -0
- package/dist/utils/storageMetrics.d.ts +2 -2
- package/dist/utils/storageMetrics.js +10 -1
- package/dist/utils/storageMetrics.js.map +1 -1
- package/dist/utils/tableCompaction.d.ts +22 -0
- package/dist/utils/tableCompaction.js +50 -0
- package/dist/utils/tableCompaction.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { GetChartDataParams } from './getChartData';
|
|
2
2
|
export declare const chartApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, {
|
|
3
|
-
getChartData: import("@reduxjs/toolkit/query").QueryDefinition<GetChartDataParams, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, "Events" | "All" | "Conversations" | "PDiskData" | "PreviewData" | "SchemaTree" | "StorageData" | "TableData" | "Partitions" | "Tablet" | "UserData" | "VDiskData" | "VDiskBlobIndexStat" | "AccessRights" | "Backups" | "BackupsSchedule", import("./types").PreparedMetricsData | undefined, "api", any>;
|
|
4
|
-
}, "api", "Events" | "All" | "Conversations" | "PDiskData" | "PreviewData" | "SchemaTree" | "StorageData" | "TableData" | "Partitions" | "Tablet" | "UserData" | "VDiskData" | "VDiskBlobIndexStat" | "AccessRights" | "Backups" | "BackupsSchedule", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
|
|
3
|
+
getChartData: import("@reduxjs/toolkit/query").QueryDefinition<GetChartDataParams, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, "Events" | "All" | "Conversations" | "PDiskData" | "PreviewData" | "SchemaTree" | "StorageData" | "TableData" | "Partitions" | "Tablet" | "UserData" | "VDiskData" | "VDiskBlobIndexStat" | "AccessRights" | "Backups" | "BackupsSchedule" | "CompactionList", import("./types").PreparedMetricsData | undefined, "api", any>;
|
|
4
|
+
}, "api", "Events" | "All" | "Conversations" | "PDiskData" | "PreviewData" | "SchemaTree" | "StorageData" | "TableData" | "Partitions" | "Tablet" | "UserData" | "VDiskData" | "VDiskBlobIndexStat" | "AccessRights" | "Backups" | "BackupsSchedule" | "CompactionList", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { DefinitionListProps, IconData, LabelProps } from '@gravity-ui/uikit';
|
|
2
|
+
import type { DefinitionListItemProps, DefinitionListProps, IconData, LabelProps } from '@gravity-ui/uikit';
|
|
3
3
|
import './YDBDefinitionList.scss';
|
|
4
4
|
export type YDBDefinitionListItem = {
|
|
5
5
|
name: string;
|
|
6
6
|
content: React.ReactNode;
|
|
7
7
|
copyText?: string | number;
|
|
8
|
+
note?: DefinitionListItemProps['note'];
|
|
8
9
|
};
|
|
9
10
|
export interface YDBDefinitionListHeaderLabel {
|
|
10
11
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YDBDefinitionList.js","sourceRoot":"","sources":["../../../src/components/YDBDefinitionList/YDBDefinitionList.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"YDBDefinitionList.js","sourceRoot":"","sources":["../../../src/components/YDBDefinitionList/YDBDefinitionList.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAC,eAAe,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAE3F,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAElC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,OAAO,0BAA0B,CAAC;AAElC,MAAM,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,CAAC;AA8BpC,uDAAuD;AACvD,MAAM,UAAU,iBAAiB,CAAC,EAC9B,KAAK,EACL,WAAW,EACX,cAAc,GAAG,GAAG,EACpB,YAAY,EACZ,QAAQ,GAAG,EAAE,EACb,SAAS,GAAG,IAAI,EAChB,MAAM,EACN,KAAK,EACL,OAAO,EACP,YAAY,GAAG,GAAG,EAClB,SAAS,EACT,gBAAgB,EAChB,GAAG,SAAS,EACS;IACrB,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,IAAI,WAAW,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IAEzF,MAAM,YAAY,GAAG,GAAG,EAAE;QACtB,IAAI,CAAC,SAAS,EAAE,CAAC;YACb,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,OAAO,CACH,MAAC,IAAI,IACD,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,EACtB,cAAc,EAAC,eAAe,EAC9B,GAAG,EAAE,CAAC,EACN,UAAU,EAAC,QAAQ,aAElB,KAAK,IAAI,CAC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,CAAC"}
|
|
@@ -16,6 +16,6 @@ export declare function useOperationsInfiniteQuery({ database, kind, pageSize, s
|
|
|
16
16
|
database: string;
|
|
17
17
|
kind: OperationKind;
|
|
18
18
|
page_size?: number;
|
|
19
|
-
}, string | undefined, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, "Events" | "All" | "Conversations" | "PDiskData" | "PreviewData" | "SchemaTree" | "StorageData" | "TableData" | "Partitions" | "Tablet" | "UserData" | "VDiskData" | "VDiskBlobIndexStat" | "AccessRights" | "Backups" | "BackupsSchedule", import("../../types/api/operations").TOperationList, "api", typeof import("../../store/reducers/api")._NEVER>>;
|
|
19
|
+
}, string | undefined, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, "Events" | "All" | "Conversations" | "PDiskData" | "PreviewData" | "SchemaTree" | "StorageData" | "TableData" | "Partitions" | "Tablet" | "UserData" | "VDiskData" | "VDiskBlobIndexStat" | "AccessRights" | "Backups" | "BackupsSchedule" | "CompactionList", import("../../types/api/operations").TOperationList, "api", typeof import("../../store/reducers/api")._NEVER>>;
|
|
20
20
|
};
|
|
21
21
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useLocation } from 'react-router-dom';
|
|
3
3
|
import { getTenantPath, parseQuery } from '../../../routes';
|
|
4
|
-
import { TENANT_DIAGNOSTICS_TABS_IDS } from '../../../store/reducers/tenant/constants';
|
|
4
|
+
import { TENANT_DIAGNOSTICS_TABS_IDS, TENANT_PAGE, TENANT_PAGES_IDS, } from '../../../store/reducers/tenant/constants';
|
|
5
5
|
import { EPathSubType, EPathType } from '../../../types/api/schema';
|
|
6
6
|
import { TenantTabsGroups } from '../TenantPages';
|
|
7
|
+
import { useNavigationV2Enabled } from '../utils/useNavigationV2Enabled';
|
|
7
8
|
import i18n from './i18n';
|
|
8
9
|
const database = {
|
|
9
10
|
id: TENANT_DIAGNOSTICS_TABS_IDS.database,
|
|
@@ -236,16 +237,49 @@ export const getPagesByType = (type, subType, options) => {
|
|
|
236
237
|
: base;
|
|
237
238
|
return applyFilters(seeded, options);
|
|
238
239
|
};
|
|
240
|
+
// In tenant navigation v2 the database-overview tabs are split across two
|
|
241
|
+
// top-level pages: the "stats"/management tabs (topQueries, storage, network,
|
|
242
|
+
// monitoring, configs, operations, backups) live on `databasePage=database`,
|
|
243
|
+
// while the rest (overview, topShards, nodes, tablets, describe, access) live
|
|
244
|
+
// on `databasePage=diagnostics`. We have to route every "See all" link to the
|
|
245
|
+
// correct top-level page, otherwise the target tab is missing from the active
|
|
246
|
+
// page and Diagnostics silently falls back to its first tab. In v1 everything
|
|
247
|
+
// lives under `databasePage=diagnostics`.
|
|
248
|
+
//
|
|
249
|
+
// Derive the set from the same DB_PAGES list used to render navigation, so the
|
|
250
|
+
// two stay in sync automatically if pages are moved between sections later.
|
|
251
|
+
// Serverless drops a few tabs from DB_PAGES (storage, network, nodes), but the
|
|
252
|
+
// set is only used to *decide which top-level page hosts a tab*; missing tabs
|
|
253
|
+
// just won't be rendered on either page, so we can safely use the regular-DB
|
|
254
|
+
// arrays without branching on databaseType.
|
|
255
|
+
const V2_DATABASE_PAGE_TABS = new Set(DB_PAGES.map((page) => page.id));
|
|
256
|
+
function getTenantPageForTab(tab, isV2Enabled) {
|
|
257
|
+
if (!isV2Enabled) {
|
|
258
|
+
return TENANT_PAGES_IDS.diagnostics;
|
|
259
|
+
}
|
|
260
|
+
return V2_DATABASE_PAGE_TABS.has(tab)
|
|
261
|
+
? TENANT_PAGES_IDS.database
|
|
262
|
+
: TENANT_PAGES_IDS.diagnostics;
|
|
263
|
+
}
|
|
239
264
|
export const useDiagnosticsPageLinkGetter = () => {
|
|
240
265
|
const location = useLocation();
|
|
241
266
|
const queryParams = parseQuery(location);
|
|
267
|
+
const isV2Enabled = useNavigationV2Enabled();
|
|
242
268
|
const getLink = React.useCallback((tab, params) => {
|
|
243
269
|
return getTenantPath({
|
|
244
270
|
...queryParams,
|
|
245
|
-
[TenantTabsGroups.diagnosticsTab]: tab,
|
|
246
271
|
...params,
|
|
272
|
+
// Make sure the link points to the page that actually owns this tab
|
|
273
|
+
// (database vs diagnostics in v2; always diagnostics in v1). Without
|
|
274
|
+
// this, switching only `diagnosticsTab` either does nothing (v2,
|
|
275
|
+
// staying on the database overview) or lands on a page where the
|
|
276
|
+
// tab does not exist (and gets silently replaced by the first tab).
|
|
277
|
+
// Spread after `params` so callers cannot accidentally override the
|
|
278
|
+
// page/tab the helper is responsible for.
|
|
279
|
+
[TENANT_PAGE]: getTenantPageForTab(tab, isV2Enabled),
|
|
280
|
+
[TenantTabsGroups.diagnosticsTab]: tab,
|
|
247
281
|
});
|
|
248
|
-
}, [queryParams]);
|
|
282
|
+
}, [queryParams, isV2Enabled]);
|
|
249
283
|
return getLink;
|
|
250
284
|
};
|
|
251
285
|
//# sourceMappingURL=DiagnosticsPages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiagnosticsPages.js","sourceRoot":"","sources":["../../../../src/containers/Tenant/Diagnostics/DiagnosticsPages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAC,aAAa,EAAE,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAC1D,OAAO,
|
|
1
|
+
{"version":3,"file":"DiagnosticsPages.js","sourceRoot":"","sources":["../../../../src/containers/Tenant/Diagnostics/DiagnosticsPages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAC,aAAa,EAAE,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EACH,2BAA2B,EAC3B,WAAW,EACX,gBAAgB,GACnB,MAAM,0CA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from '../../../../../../types/api/operations';
|
|
2
|
+
import './CompactTableAction.scss';
|
|
3
|
+
interface CompactTableActionProps {
|
|
4
|
+
runningCompaction?: TOperation;
|
|
5
|
+
isFetching: boolean;
|
|
6
|
+
isStarting: boolean;
|
|
7
|
+
onApply: (value: {
|
|
8
|
+
cascade: boolean;
|
|
9
|
+
parallel?: number;
|
|
10
|
+
}) => Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export declare function CompactTableStatusBanner({ operation }: {
|
|
13
|
+
operation: TOperation;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function CompactTableAction({ runningCompaction, isFetching, isStarting, onApply, }: CompactTableActionProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { GearPlay } from '@gravity-ui/icons';
|
|
4
|
+
import { ActionTooltip, Button, Dialog, Flex, Icon, Popover, Switch, Text, TextInput, } from '@gravity-ui/uikit';
|
|
5
|
+
import { CompactState } from '../../../../../../types/api/operations';
|
|
6
|
+
import { cn } from '../../../../../../utils/cn';
|
|
7
|
+
import { prepareErrorMessage } from '../../../../../../utils/prepareErrorMessage';
|
|
8
|
+
import { getCompactionProgress, getCompactionShardProgress, isCompactMetadata, } from '../../../../../../utils/tableCompaction';
|
|
9
|
+
import { reachMetricaGoal } from '../../../../../../utils/yaMetrica';
|
|
10
|
+
import i18n from '../i18n';
|
|
11
|
+
import './CompactTableAction.scss';
|
|
12
|
+
const b = cn('ydb-diagnostics-table-info');
|
|
13
|
+
const DEFAULT_PARALLEL_SHARDS = '1';
|
|
14
|
+
function parseParallel(value) {
|
|
15
|
+
if (!value.trim()) {
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
const parsedValue = Number(value);
|
|
19
|
+
return Number.isInteger(parsedValue) && parsedValue > 0 ? parsedValue : null;
|
|
20
|
+
}
|
|
21
|
+
function getProgress(operation) {
|
|
22
|
+
var _a;
|
|
23
|
+
return (_a = getCompactionProgress(operation)) !== null && _a !== void 0 ? _a : 0;
|
|
24
|
+
}
|
|
25
|
+
function getCompactionProgressDescription(operation) {
|
|
26
|
+
const { metadata } = operation;
|
|
27
|
+
if (!isCompactMetadata(metadata)) {
|
|
28
|
+
return i18n('value_compaction-starting');
|
|
29
|
+
}
|
|
30
|
+
if (metadata.state === CompactState.STATE_IN_PROGRESS) {
|
|
31
|
+
return i18n('value_compaction-running');
|
|
32
|
+
}
|
|
33
|
+
if (metadata.state === CompactState.STATE_DONE) {
|
|
34
|
+
return i18n('value_compaction-done');
|
|
35
|
+
}
|
|
36
|
+
if (metadata.state === CompactState.STATE_CANCELLED) {
|
|
37
|
+
return i18n('value_compaction-cancelled');
|
|
38
|
+
}
|
|
39
|
+
return i18n('value_compaction-starting');
|
|
40
|
+
}
|
|
41
|
+
function CompactTableStatusDetails({ operation }) {
|
|
42
|
+
const { metadata } = operation;
|
|
43
|
+
const progress = getCompactionProgress(operation);
|
|
44
|
+
const shardProgress = getCompactionShardProgress(operation);
|
|
45
|
+
if (!isCompactMetadata(metadata)) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
return (_jsxs(Flex, { className: b('compaction-popover'), direction: "column", gap: "1", children: [_jsx(Text, { variant: "subheader-1", children: i18n('title_compaction') }), metadata.state && (_jsx(Text, { children: i18n('field_compaction-state', { state: metadata.state }) })), typeof progress === 'number' && (_jsx(Text, { children: i18n('field_compaction-progress', { progress }) })), shardProgress && (_jsx(Text, { children: i18n('field_compaction-shards', {
|
|
49
|
+
done: shardProgress.shardsDone,
|
|
50
|
+
total: shardProgress.shardsTotal,
|
|
51
|
+
}) }))] }));
|
|
52
|
+
}
|
|
53
|
+
export function CompactTableStatusBanner({ operation }) {
|
|
54
|
+
const progress = getProgress(operation);
|
|
55
|
+
const progressWidth = `${progress}%`;
|
|
56
|
+
return (_jsxs(Flex, { className: b('compaction-banner'), gap: "3", alignItems: "flex-start", children: [_jsx(Icon, { className: b('compaction-banner-icon'), data: GearPlay, size: 20 }), _jsxs(Flex, { direction: "column", gap: "2", className: b('compaction-banner-content'), children: [_jsx(Text, { variant: "subheader-2", children: i18n('title_compaction-in-progress') }), _jsx(Text, { variant: "body-1", children: i18n('context_compaction-in-progress') }), _jsx("div", { className: b('compaction-progress'), role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": progress, children: _jsx("div", { className: b('compaction-progress-fill'), style: { width: progressWidth } }) }), _jsx(Text, { variant: "body-1", color: "secondary", children: i18n('context_compaction-progress', {
|
|
57
|
+
progress,
|
|
58
|
+
status: getCompactionProgressDescription(operation),
|
|
59
|
+
}) })] })] }));
|
|
60
|
+
}
|
|
61
|
+
export function CompactTableAction({ runningCompaction, isFetching, isStarting, onApply, }) {
|
|
62
|
+
const [dialogOpen, setDialogOpen] = React.useState(false);
|
|
63
|
+
const handleCloseDialog = React.useCallback(() => {
|
|
64
|
+
setDialogOpen(false);
|
|
65
|
+
}, []);
|
|
66
|
+
const handleOpenDialog = React.useCallback(() => {
|
|
67
|
+
reachMetricaGoal('openCompactionDialog');
|
|
68
|
+
setDialogOpen(true);
|
|
69
|
+
}, []);
|
|
70
|
+
const button = (_jsxs(Button, { view: "normal", size: "s", onClick: handleOpenDialog, disabled: Boolean(runningCompaction) || isStarting, loading: isStarting || (isFetching && !runningCompaction), "aria-label": i18n('action_compaction'), children: [_jsx(Icon, { data: GearPlay, size: 16 }), i18n('action_compaction')] }));
|
|
71
|
+
return (_jsxs(React.Fragment, { children: [runningCompaction ? (_jsx(Popover, { content: _jsx(CompactTableStatusDetails, { operation: runningCompaction }), placement: "bottom-end", children: _jsx("span", { className: b('compaction-disabled-button-wrapper'), children: button }) })) : (_jsx(ActionTooltip, { title: i18n('action_run-compaction'), children: button })), _jsx(CompactTableDialog, { open: dialogOpen, onClose: handleCloseDialog, onApply: onApply, loading: isStarting, hasRunningCompaction: Boolean(runningCompaction) })] }));
|
|
72
|
+
}
|
|
73
|
+
function CompactTableDialog({ open, onClose, onApply, loading, hasRunningCompaction, }) {
|
|
74
|
+
const [cascade, setCascade] = React.useState(true);
|
|
75
|
+
const [parallel, setParallel] = React.useState(DEFAULT_PARALLEL_SHARDS);
|
|
76
|
+
const [parallelError, setParallelError] = React.useState('');
|
|
77
|
+
const [requestErrorMessage, setRequestErrorMessage] = React.useState('');
|
|
78
|
+
const submitInProgressRef = React.useRef(false);
|
|
79
|
+
const submitDisabled = loading || hasRunningCompaction;
|
|
80
|
+
const resetFormState = React.useCallback(() => {
|
|
81
|
+
setCascade(true);
|
|
82
|
+
setParallel(DEFAULT_PARALLEL_SHARDS);
|
|
83
|
+
setParallelError('');
|
|
84
|
+
setRequestErrorMessage('');
|
|
85
|
+
}, []);
|
|
86
|
+
const handleClose = React.useCallback(() => {
|
|
87
|
+
resetFormState();
|
|
88
|
+
onClose();
|
|
89
|
+
}, [onClose, resetFormState]);
|
|
90
|
+
const handleCascadeUpdate = React.useCallback((value) => {
|
|
91
|
+
setCascade(value);
|
|
92
|
+
setRequestErrorMessage('');
|
|
93
|
+
}, []);
|
|
94
|
+
const handleParallelUpdate = React.useCallback((value) => {
|
|
95
|
+
setParallel(value);
|
|
96
|
+
setParallelError('');
|
|
97
|
+
setRequestErrorMessage('');
|
|
98
|
+
}, []);
|
|
99
|
+
const handleSubmit = React.useCallback(async (event) => {
|
|
100
|
+
event === null || event === void 0 ? void 0 : event.preventDefault();
|
|
101
|
+
if (submitDisabled || submitInProgressRef.current) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const parsedParallel = parseParallel(parallel);
|
|
105
|
+
if (parsedParallel === null) {
|
|
106
|
+
setParallelError(i18n('alert_positive-integer'));
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
setRequestErrorMessage('');
|
|
110
|
+
submitInProgressRef.current = true;
|
|
111
|
+
try {
|
|
112
|
+
reachMetricaGoal('startCompaction');
|
|
113
|
+
await onApply({
|
|
114
|
+
cascade,
|
|
115
|
+
parallel: parsedParallel,
|
|
116
|
+
});
|
|
117
|
+
handleClose();
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
setRequestErrorMessage(prepareErrorMessage(error));
|
|
121
|
+
}
|
|
122
|
+
finally {
|
|
123
|
+
submitInProgressRef.current = false;
|
|
124
|
+
}
|
|
125
|
+
}, [cascade, handleClose, onApply, parallel, submitDisabled]);
|
|
126
|
+
return (_jsxs(Dialog, { open: open, size: "s", onClose: handleClose, children: [_jsx(Dialog.Header, { caption: _jsx(Text, { variant: "subheader-3", children: i18n('title_run-table-compaction') }) }), _jsxs("form", { onSubmit: handleSubmit, children: [_jsx(Dialog.Body, { className: b('compaction-dialog-body'), children: _jsxs(Flex, { direction: "column", gap: "4", alignItems: "flex-start", children: [_jsxs(Flex, { className: b('compaction-dialog-row'), gap: "3", alignItems: "center", children: [_jsx("label", { htmlFor: "tableCompactionCascade", className: b('compaction-label'), children: i18n('field_cascade') }), _jsx(Switch, { id: "tableCompactionCascade", checked: cascade, onUpdate: handleCascadeUpdate })] }), _jsxs(Flex, { className: b('compaction-dialog-row'), gap: "3", alignItems: "center", children: [_jsx("label", { htmlFor: "tableCompactionParallel", className: b('compaction-label'), children: i18n('field_parallel-shards') }), _jsx(TextInput, { id: "tableCompactionParallel", type: "number", value: parallel, onUpdate: handleParallelUpdate, className: b('compaction-input'), errorMessage: parallelError, validationState: parallelError ? 'invalid' : undefined, hasClear: true })] }), requestErrorMessage && (_jsx(Text, { color: "danger", className: b('compaction-error'), title: requestErrorMessage, children: requestErrorMessage }))] }) }), _jsx(Dialog.Footer, { textButtonCancel: i18n('action_cancel'), textButtonApply: i18n('action_start-compaction'), onClickButtonCancel: handleClose, loading: loading, propsButtonApply: {
|
|
127
|
+
type: 'submit',
|
|
128
|
+
disabled: submitDisabled,
|
|
129
|
+
} })] })] }));
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=CompactTableAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompactTableAction.js","sourceRoot":"","sources":["../../../../../../../src/containers/Tenant/Diagnostics/Overview/TableInfo/CompactTableAction/CompactTableAction.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EACH,aAAa,EACb,MAAM,EACN,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,MAAM,EACN,IAAI,EACJ,SAAS,GACZ,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAC,YAAY,EAAC,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAC,EAAE,EAAC,MAAM,4BAA4B,CAAC;AAC9C,OAAO,EAAC,mBAAmB,EAAC,MAAM,6CAA6C,CAAC;AAChF,OAAO,EACH,qBAAqB,EACrB,0BAA0B,EAC1B,iBAAiB,GACpB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAC;AACnE,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,2BAA2B,CAAC;AAEnC,MAAM,CAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC,CAAC;AAC3C,MAAM,uBAAuB,GAAG,GAAG,CAAC;AASpC,SAAS,aAAa,CAAC,KAAa;IAChC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;QAChB,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAElC,OAAO,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC;AACjF,CAAC;AAED,SAAS,WAAW,CAAC,SAAsB;;IACvC,OAAO,MA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AC,EAAE,GAAG,EAAC,GAAG,EAAC,UAAU,EAAC,QAAQ,aACpE,gBACI,OAAO,EAAC,yBAAyB,EACjC,SAAS,EAAE,CAAC,CAAC,kBAAkB,CAAC,YAE/B,IAAI,CAAC,uBAAuB,CAAC,GAC1B,EACR,KAAC,SAAS,IACN,EAAE,EAAC,yBAAyB,EAC5B,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,oBAAoB,EAC9B,SAAS,EAAE,CAAC,CAAC,kBAAkB,CAAC,EAChC,YAAY,EAAE,aAAa,EAC3B,eAAe,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EACtD,QAAQ,SACV,IACC,EACN,mBAAmB,IAAI,CACpB,KAAC,IAAI,IACD,KAAK,EAAC,QAAQ,EACd,SAAS,EAAE,CAAC,CAAC,kBAAkB,CAAC,EAChC,KAAK,EAAE,mBAAmB,YAEzB,mBAAmB,GACjB,CACV,IACE,GACG,EACd,KAAC,MAAM,CAAC,MAAM,IACV,gBAAgB,EAAE,IAAI,CAAC,eAAe,CAAC,EACvC,eAAe,EAAE,IAAI,CAAC,yBAAyB,CAAC,EAChD,mBAAmB,EAAE,WAAW,EAChC,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE;4BACd,IAAI,EAAE,QAAQ;4BACd,QAAQ,EAAE,cAAc;yBAC3B,GACH,IACC,IACF,CACZ,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
@use '../../../../../../styles/mixins.scss';
|
|
2
|
+
|
|
3
|
+
.ydb-diagnostics-table-info {
|
|
4
|
+
&__compaction-disabled-button-wrapper {
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&__compaction-popover {
|
|
9
|
+
max-width: 260px;
|
|
10
|
+
padding: var(--g-spacing-2) var(--g-spacing-3);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&__compaction-banner {
|
|
14
|
+
width: 100%;
|
|
15
|
+
max-width: 656px;
|
|
16
|
+
margin-bottom: var(--g-spacing-4);
|
|
17
|
+
padding: var(--g-spacing-4) var(--g-spacing-5);
|
|
18
|
+
|
|
19
|
+
border-radius: var(--g-border-radius-m);
|
|
20
|
+
background-color: var(--g-color-base-info-light);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&__compaction-banner-icon {
|
|
24
|
+
flex-shrink: 0;
|
|
25
|
+
|
|
26
|
+
color: var(--g-color-text-info);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&__compaction-banner-content {
|
|
30
|
+
flex: 1 1 auto;
|
|
31
|
+
|
|
32
|
+
min-width: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&__compaction-progress {
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
|
|
38
|
+
width: 100%;
|
|
39
|
+
height: 6px;
|
|
40
|
+
|
|
41
|
+
border-radius: var(--g-border-radius-xs);
|
|
42
|
+
background-color: var(--g-color-base-info-medium);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&__compaction-progress-fill {
|
|
46
|
+
height: 100%;
|
|
47
|
+
|
|
48
|
+
border-radius: inherit;
|
|
49
|
+
background-color: var(--g-color-base-info-heavy);
|
|
50
|
+
|
|
51
|
+
transition: width 0.4s ease;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&__compaction-dialog-body {
|
|
55
|
+
padding-top: var(--g-spacing-3);
|
|
56
|
+
padding-bottom: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&__compaction-dialog-row {
|
|
60
|
+
width: 100%;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&__compaction-label {
|
|
64
|
+
width: 100%;
|
|
65
|
+
max-width: 150px;
|
|
66
|
+
|
|
67
|
+
color: var(--g-color-text-secondary);
|
|
68
|
+
|
|
69
|
+
@include mixins.body-1-typography();
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&__compaction-input {
|
|
73
|
+
max-width: 140px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&__compaction-error {
|
|
77
|
+
overflow-wrap: anywhere;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: (key: "field_load" | "action_cancel" | "action_apply" | "
|
|
1
|
+
declare const _default: (key: "field_load" | "action_cancel" | "action_apply" | "title_partitioning" | "title_manage-partitioning" | "title_limits" | "field_split-size" | "context_split-size-maximum" | "field_minimum" | "field_maximum" | "error_invalid-unit" | "error_required" | "error_value-greater-maximum" | "error_minimum-greater-maximum" | "error_maximum-less-minimum" | "error_value-too-small", params?: import("@gravity-ui/i18n").Params) => string;
|
|
2
2
|
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { EPathType } from '../../../../../types/api/schema';
|
|
2
|
+
import type { TEvDescribeSchemeResult } from '../../../../../types/api/schema';
|
|
2
3
|
import './TableInfo.scss';
|
|
3
4
|
export declare const b: import("@bem-react/classname").ClassNameFormatter;
|
|
4
5
|
interface TableInfoProps {
|
|
@@ -3,12 +3,19 @@ import React from 'react';
|
|
|
3
3
|
import { ChevronDown, ChevronUp, Gear } from '@gravity-ui/icons';
|
|
4
4
|
import { ActionTooltip, Button, Disclosure, Flex, Icon } from '@gravity-ui/uikit';
|
|
5
5
|
import { YDBDefinitionList } from '../../../../../components/YDBDefinitionList/YDBDefinitionList';
|
|
6
|
+
import { useFeatureFlagsAvailable } from '../../../../../store/reducers/capabilities/hooks';
|
|
7
|
+
import { configsApi } from '../../../../../store/reducers/configs';
|
|
8
|
+
import { operationsApi } from '../../../../../store/reducers/operations';
|
|
6
9
|
import { tablePartitioningApi } from '../../../../../store/reducers/tablePartitioning/tablePartitioning';
|
|
10
|
+
import { EPathType } from '../../../../../types/api/schema';
|
|
7
11
|
import { cn } from '../../../../../utils/cn';
|
|
8
12
|
import createToast from '../../../../../utils/createToast';
|
|
13
|
+
import { useAutoRefreshInterval } from '../../../../../utils/hooks';
|
|
14
|
+
import { findRunningTableCompactionOperation, isForcedCompactionEnabled, } from '../../../../../utils/tableCompaction';
|
|
9
15
|
import { reachMetricaGoal } from '../../../../../utils/yaMetrica';
|
|
10
16
|
import { EntityTitle } from '../../../EntityTitle/EntityTitle';
|
|
11
17
|
import { isRowTableType } from '../../../utils/schema';
|
|
18
|
+
import { CompactTableAction, CompactTableStatusBanner, } from './CompactTableAction/CompactTableAction';
|
|
12
19
|
import { openManagePartitioningDialog } from './ManagePartitioningDialog/ManagePartitioningDialog';
|
|
13
20
|
import { PartitionsProgress } from './PartitionsProgress/PartitionsProgress';
|
|
14
21
|
import i18n from './i18n';
|
|
@@ -24,6 +31,9 @@ const TableInfoHeader = ({ data }) => {
|
|
|
24
31
|
return _jsx("div", { className: b('title'), children: title });
|
|
25
32
|
};
|
|
26
33
|
export const TableInfo = ({ data, type, database, path }) => {
|
|
34
|
+
const [autoRefreshInterval] = useAutoRefreshInterval();
|
|
35
|
+
const isRowTable = type === EPathType.EPathTypeTable;
|
|
36
|
+
const featureFlagsAvailable = useFeatureFlagsAvailable();
|
|
27
37
|
const { generalInfoLeft = [], generalInfoRight = [], generalStats = [], tableStatsInfo = [], generalMetrics = [], tabletMetricsInfo = [], partitionConfigInfo = [], partitionProgressConfig, managePartitioningDialogConfig, } = React.useMemo(() => prepareTableInfo(data, type), [data, type]);
|
|
28
38
|
const [expanded, setExpanded] = React.useState(false);
|
|
29
39
|
const handleExpandedChange = React.useCallback((value) => setExpanded(value), []);
|
|
@@ -31,6 +41,14 @@ export const TableInfo = ({ data, type, database, path }) => {
|
|
|
31
41
|
const hasMoreRight = tabletMetricsInfo.length > 0 || partitionConfigInfo.length > 0;
|
|
32
42
|
const hasMore = hasMoreLeft || hasMoreRight;
|
|
33
43
|
const [updatePartitioning] = tablePartitioningApi.useUpdateTablePartitioningMutation();
|
|
44
|
+
const { currentData: featureFlags } = configsApi.useGetFeatureFlagsQuery({ database }, { skip: !isRowTable || !featureFlagsAvailable });
|
|
45
|
+
const compactionEnabled = isRowTable && isForcedCompactionEnabled(featureFlags);
|
|
46
|
+
const { currentData: compactionOperations, isFetching: isCompactionFetching } = operationsApi.useGetCompactionListQuery({ database }, {
|
|
47
|
+
pollingInterval: autoRefreshInterval,
|
|
48
|
+
skip: !compactionEnabled,
|
|
49
|
+
});
|
|
50
|
+
const runningCompaction = React.useMemo(() => findRunningTableCompactionOperation(compactionOperations, path), [compactionOperations, path]);
|
|
51
|
+
const [startTableCompaction, { isLoading: isCompactionStarting }] = operationsApi.useStartTableCompactionMutation();
|
|
34
52
|
const handleOpenManagePartitioning = React.useCallback(() => {
|
|
35
53
|
reachMetricaGoal('openManagePartitioning');
|
|
36
54
|
openManagePartitioningDialog({
|
|
@@ -47,7 +65,10 @@ export const TableInfo = ({ data, type, database, path }) => {
|
|
|
47
65
|
},
|
|
48
66
|
});
|
|
49
67
|
}, [managePartitioningDialogConfig, database, path, updatePartitioning]);
|
|
50
|
-
|
|
68
|
+
const handleStartCompaction = React.useCallback(async ({ cascade, parallel }) => {
|
|
69
|
+
await startTableCompaction({ database, path, cascade, parallel }).unwrap();
|
|
70
|
+
}, [database, path, startTableCompaction]);
|
|
71
|
+
return (_jsxs("div", { className: b(), children: [compactionEnabled && runningCompaction && (_jsx(CompactTableStatusBanner, { operation: runningCompaction })), _jsxs(Flex, { className: b('header'), justifyContent: "space-between", alignItems: "center", gap: "2", children: [_jsx(TableInfoHeader, { data: data }), _jsxs(Flex, { gap: "2", alignItems: "center", children: [managePartitioningDialogConfig && (_jsx(ActionTooltip, { title: i18n('action_manage-partition-config'), children: _jsxs(Button, { view: "normal", size: "s", onClick: handleOpenManagePartitioning, "aria-label": i18n('action_manage-partition-config'), children: [_jsx(Icon, { data: Gear, size: 16 }), i18n('action_manage')] }) })), compactionEnabled && (_jsx(CompactTableAction, { runningCompaction: runningCompaction, isFetching: isCompactionFetching, isStarting: isCompactionStarting, onApply: handleStartCompaction }, `${database}/${path}`))] })] }), partitionProgressConfig && (_jsx("div", { className: b('progress-bar'), children: _jsx(PartitionsProgress, { minPartitions: partitionProgressConfig.minPartitions, partitionsCount: partitionProgressConfig.partitionsCount, maxPartitions: partitionProgressConfig.maxPartitions }) })), _jsxs("div", { className: b('row', { 'general-info': true }), children: [_jsx("div", { className: b('col'), children: generalInfoLeft.length > 0 ? (_jsx(YDBDefinitionList, { nameMaxWidth: "auto", responsive: true, className: b('info-block'), items: generalInfoLeft })) : null }), _jsx("div", { className: b('col'), children: generalInfoRight.length > 0 ? (_jsx(YDBDefinitionList, { nameMaxWidth: "auto", responsive: true, className: b('info-block'), items: generalInfoRight })) : null })] }), _jsxs("div", { className: b('row'), children: [_jsx("div", { className: b('col'), children: generalStats.length > 0 ? (_jsx(YDBDefinitionList, { items: generalStats, title: i18n('title_table-stats'), className: b('info-block'), nameMaxWidth: "auto", responsive: true })) : null }), _jsx("div", { className: b('col'), children: generalMetrics.length > 0 ? (_jsx(YDBDefinitionList, { items: generalMetrics, title: i18n('title_tablet-metrics'), className: b('info-block'), nameMaxWidth: "auto", responsive: true })) : null })] }), hasMore ? (_jsxs(Disclosure, { className: b('show-more-disclosure'), expanded: expanded, onUpdate: handleExpandedChange, children: [_jsx(Disclosure.Summary, { children: (props) => (_jsxs(Button, { onClick: props.onClick, view: "normal", size: "s", children: [expanded ? i18n('button_show-less') : i18n('button_show-more'), _jsx(Icon, { data: expanded ? ChevronUp : ChevronDown, size: 16 })] })) }), _jsx(Disclosure.Details, { children: _jsxs("div", { className: b('row'), children: [_jsx("div", { className: b('col'), children: tableStatsInfo
|
|
51
72
|
.filter((items) => items.length > 0)
|
|
52
73
|
.map((items, index) => (_jsx(YDBDefinitionList, { items: items, className: b('info-block'), nameMaxWidth: "auto", responsive: true }, index))) }), _jsxs("div", { className: b('col'), children: [tabletMetricsInfo.length > 0 ? (_jsx(YDBDefinitionList, { items: tabletMetricsInfo, className: b('info-block'), nameMaxWidth: "auto", responsive: true })) : null, partitionConfigInfo.length > 0 ? (_jsx(YDBDefinitionList, { items: partitionConfigInfo, title: i18n('title_partition-config'), className: b('info-block'), nameMaxWidth: "auto", responsive: true })) : null] })] }) })] })) : null] }));
|
|
53
74
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableInfo.js","sourceRoot":"","sources":["../../../../../../src/containers/Tenant/Diagnostics/Overview/TableInfo/TableInfo.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,WAAW,EAAE,SAAS,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAEhF,OAAO,EAAC,iBAAiB,EAAC,MAAM,+DAA+D,CAAC;AAChG,OAAO,EAAC,oBAAoB,EAAC,MAAM,mEAAmE,CAAC;
|
|
1
|
+
{"version":3,"file":"TableInfo.js","sourceRoot":"","sources":["../../../../../../src/containers/Tenant/Diagnostics/Overview/TableInfo/TableInfo.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,WAAW,EAAE,SAAS,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAEhF,OAAO,EAAC,iBAAiB,EAAC,MAAM,+DAA+D,CAAC;AAChG,OAAO,EAAC,wBAAwB,EAAC,MAAM,kDAAkD,CAAC;AAC1F,OAAO,EAAC,UAAU,EAAC,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAC,aAAa,EAAC,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAC,oBAAoB,EAAC,MAAM,mEAAmE,CAAC;AACvG,OAAO,EAAC,SAAS,EAAC,MA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AAG,CAAC,CAAC;yCACnC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CACnB,KAAC,iBAAiB,IAEd,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,EAC1B,YAAY,EAAC,MAAM,EACnB,UAAU,UAJL,KAAK,CAKZ,CACL,CAAC,GACJ,EAEN,eAAK,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,aACnB,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAC5B,KAAC,iBAAiB,IACd,KAAK,EAAE,iBAAiB,EACxB,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,EAC1B,YAAY,EAAC,MAAM,EACnB,UAAU,SACZ,CACL,CAAC,CAAC,CAAC,IAAI,EACP,mBAAmB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAC9B,KAAC,iBAAiB,IACd,KAAK,EAAE,mBAAmB,EAC1B,KAAK,EAAE,IAAI,CAAC,wBAAwB,CAAC,EACrC,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,EAC1B,YAAY,EAAC,MAAM,EACnB,UAAU,SACZ,CACL,CAAC,CAAC,CAAC,IAAI,IACN,IACJ,GACW,IACZ,CAChB,CAAC,CAAC,CAAC,IAAI,IACN,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
"title_table-stats": "Stats",
|
|
4
4
|
"title_tablet-metrics": "Metrics",
|
|
5
5
|
"title_partition-config": "Partition config",
|
|
6
|
+
"action_cancel": "Cancel",
|
|
7
|
+
"action_manage": "Manage",
|
|
6
8
|
"action_manage-partition-config": "Manage partition config",
|
|
9
|
+
"action_compaction": "Compaction",
|
|
10
|
+
"action_run-compaction": "Run table compaction",
|
|
7
11
|
"button_show-more": "Show more",
|
|
8
12
|
"button_show-less": "Show less",
|
|
9
13
|
"field_current-partitions": "Current partitions",
|
|
@@ -26,5 +30,21 @@
|
|
|
26
30
|
"value_default": "default",
|
|
27
31
|
"hint_current-partitions-below-limits": "The current partition size is below the limits. To prevent automatic splits and maintain performance, adjust the partition limits",
|
|
28
32
|
"hint_current-partitions-exceeds-limits": "The current partition size exceeds the limits. To prevent automatic splits and maintain performance, adjust the partition limits",
|
|
33
|
+
"action_start-compaction": "Start",
|
|
34
|
+
"title_run-table-compaction": "Run table compaction",
|
|
35
|
+
"field_cascade": "Cascade",
|
|
36
|
+
"field_parallel-shards": "Parallel shards",
|
|
37
|
+
"alert_positive-integer": "Value must be a positive integer",
|
|
38
|
+
"title_compaction-in-progress": "Compaction in progress",
|
|
39
|
+
"context_compaction-in-progress": "Manual compaction is running to merge old row versions and reduce overhead",
|
|
40
|
+
"context_compaction-progress": "Progress: {{progress}}% — {{status}}",
|
|
41
|
+
"value_compaction-starting": "Starting compaction...",
|
|
42
|
+
"value_compaction-running": "Compacting table...",
|
|
43
|
+
"value_compaction-done": "Done",
|
|
44
|
+
"value_compaction-cancelled": "Cancelled",
|
|
45
|
+
"title_compaction": "Compaction",
|
|
46
|
+
"field_compaction-state": "State: {{state}}",
|
|
47
|
+
"field_compaction-progress": "Progress: {{progress}}%",
|
|
48
|
+
"field_compaction-shards": "Shards: {{done}} / {{total}}",
|
|
29
49
|
"toast_partitioning-updated": "Partitioning settings applied"
|
|
30
50
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: (key: "title_partitioning" | "title_table-stats" | "title_tablet-metrics" | "title_partition-config" | "action_manage-partition-config" | "button_show-more" | "button_show-less" | "field_current-partitions" | "field_ttl-for-rows" | "field_standalone" | "field_partitioning" | "field_partitioning-by-size" | "field_partitioning-by-load" | "field_min-partitions-count" | "field_max-partitions-count" | "field_read-replicas" | "field_bloom-filter" | "field_compression-groups" | "value_ttl-config" | "value_partitioning-by-size-enabled" | "value_enabled" | "value_disabled" | "value_no" | "value_some-groups" | "value_default" | "hint_current-partitions-below-limits" | "hint_current-partitions-exceeds-limits" | "toast_partitioning-updated", params?: import("@gravity-ui/i18n").Params) => string;
|
|
1
|
+
declare const _default: (key: "action_manage" | "action_cancel" | "title_partitioning" | "title_table-stats" | "title_tablet-metrics" | "title_partition-config" | "action_manage-partition-config" | "action_compaction" | "action_run-compaction" | "button_show-more" | "button_show-less" | "field_current-partitions" | "field_ttl-for-rows" | "field_standalone" | "field_partitioning" | "field_partitioning-by-size" | "field_partitioning-by-load" | "field_min-partitions-count" | "field_max-partitions-count" | "field_read-replicas" | "field_bloom-filter" | "field_compression-groups" | "value_ttl-config" | "value_partitioning-by-size-enabled" | "value_enabled" | "value_disabled" | "value_no" | "value_some-groups" | "value_default" | "hint_current-partitions-below-limits" | "hint_current-partitions-exceeds-limits" | "action_start-compaction" | "title_run-table-compaction" | "field_cascade" | "field_parallel-shards" | "alert_positive-integer" | "title_compaction-in-progress" | "context_compaction-in-progress" | "context_compaction-progress" | "value_compaction-starting" | "value_compaction-running" | "value_compaction-done" | "value_compaction-cancelled" | "title_compaction" | "field_compaction-state" | "field_compaction-progress" | "field_compaction-shards" | "toast_partitioning-updated", params?: import("@gravity-ui/i18n").Params) => string;
|
|
2
2
|
export default _default;
|
|
@@ -21,7 +21,17 @@ export declare const prepareTableInfo: (data?: TEvDescribeSchemeResult, type?: E
|
|
|
21
21
|
} | {
|
|
22
22
|
generalInfoRight: YDBDefinitionListItem[];
|
|
23
23
|
generalInfoLeft: YDBDefinitionListItem[];
|
|
24
|
-
generalStats: YDBDefinitionListItem
|
|
24
|
+
generalStats: (YDBDefinitionListItem | {
|
|
25
|
+
note: {
|
|
26
|
+
children: import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
popoverProps: {
|
|
28
|
+
placement: "right";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
name: string;
|
|
32
|
+
content: React.ReactNode;
|
|
33
|
+
copyText?: string | number;
|
|
34
|
+
})[];
|
|
25
35
|
tableStatsInfo: YDBDefinitionListItem[][];
|
|
26
36
|
generalMetrics: YDBDefinitionListItem[];
|
|
27
37
|
tabletMetricsInfo: YDBDefinitionListItem[];
|
|
@@ -11,6 +11,7 @@ import { formatBytes, getBytesSizeUnit } from '../../../../../utils/bytesParsers
|
|
|
11
11
|
import { formatNumber } from '../../../../../utils/dataFormatters/dataFormatters';
|
|
12
12
|
import { formatDurationToShortTimeFormat } from '../../../../../utils/timeParsers';
|
|
13
13
|
import { isNumeric } from '../../../../../utils/utils';
|
|
14
|
+
import { ROW_COUNT_NOTE } from '../../../constants';
|
|
14
15
|
import { DEFAULT_MANAGE_PARTITIONING_VALUE } from './ManagePartitioningDialog/constants';
|
|
15
16
|
import { b } from './TableInfo';
|
|
16
17
|
import { DEFAULT_PARTITION_SIZE_TO_SPLIT_BYTES, READ_REPLICAS_MODE } from './constants';
|
|
@@ -185,7 +186,12 @@ export const prepareTableInfo = (data, type) => {
|
|
|
185
186
|
RowCount,
|
|
186
187
|
DataSize,
|
|
187
188
|
IndexSize,
|
|
188
|
-
})
|
|
189
|
+
}).map((item) => item.name === 'RowCount'
|
|
190
|
+
? {
|
|
191
|
+
...item,
|
|
192
|
+
note: ROW_COUNT_NOTE,
|
|
193
|
+
}
|
|
194
|
+
: item);
|
|
189
195
|
const bloomFilterItems = [];
|
|
190
196
|
if (isNumeric(ByKeyFilterSize) &&
|
|
191
197
|
(PartitionConfig.EnableFilterByKey || Number(ByKeyFilterSize) > 0)) {
|