ydb-embedded-ui 20.4.0 → 21.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/README.md +41 -0
- package/dist/components/AutoRefreshControl/i18n/index.d.ts +1 -1
- package/dist/components/FullNodeViewer/i18n/index.d.ts +1 -1
- package/dist/components/Graph/BlockComponents/ConnectionBlockComponent.d.ts +7 -0
- package/dist/components/Graph/BlockComponents/ConnectionBlockComponent.js +30 -0
- package/dist/components/Graph/BlockComponents/ConnectionBlockComponent.js.map +1 -0
- package/dist/components/Graph/BlockComponents/QueryBlockComponent.d.ts +5 -0
- package/dist/components/Graph/BlockComponents/QueryBlockComponent.js +5 -0
- package/dist/components/Graph/BlockComponents/QueryBlockComponent.js.map +1 -0
- package/dist/components/Graph/BlockComponents/ResultBlockComponent.d.ts +7 -0
- package/dist/components/Graph/BlockComponents/ResultBlockComponent.js +5 -0
- package/dist/components/Graph/BlockComponents/ResultBlockComponent.js.map +1 -0
- package/dist/components/Graph/BlockComponents/StageBlockComponent.d.ts +7 -0
- package/dist/components/Graph/BlockComponents/StageBlockComponent.js +17 -0
- package/dist/components/Graph/BlockComponents/StageBlockComponent.js.map +1 -0
- package/dist/components/Graph/FullViewportBackground.d.ts +2 -0
- package/dist/components/Graph/FullViewportBackground.js +67 -0
- package/dist/components/Graph/FullViewportBackground.js.map +1 -0
- package/dist/components/Graph/GraphControls.d.ts +6 -0
- package/dist/components/Graph/GraphControls.js +24 -0
- package/dist/components/Graph/GraphControls.js.map +1 -0
- package/dist/components/Graph/GravityGraph.d.ts +9 -0
- package/dist/components/Graph/GravityGraph.js +122 -0
- package/dist/components/Graph/GravityGraph.js.map +1 -0
- package/dist/components/Graph/GravityGraph.scss +131 -0
- package/dist/components/Graph/NonSelectableConnection.d.ts +9 -0
- package/dist/components/Graph/NonSelectableConnection.js +16 -0
- package/dist/components/Graph/NonSelectableConnection.js.map +1 -0
- package/dist/components/Graph/TooltipComponent.d.ts +8 -0
- package/dist/components/Graph/TooltipComponent.js +63 -0
- package/dist/components/Graph/TooltipComponent.js.map +1 -0
- package/dist/components/Graph/colorsConfig.d.ts +19 -0
- package/dist/components/Graph/colorsConfig.js +20 -0
- package/dist/components/Graph/colorsConfig.js.map +1 -0
- package/dist/components/Graph/i18n/en.json +5 -0
- package/dist/components/Graph/i18n/index.d.ts +2 -0
- package/dist/components/Graph/i18n/index.js +5 -0
- package/dist/components/Graph/i18n/index.js.map +1 -0
- package/dist/components/Graph/runTreeLayout.d.ts +12 -0
- package/dist/components/Graph/runTreeLayout.js +75 -0
- package/dist/components/Graph/runTreeLayout.js.map +1 -0
- package/dist/components/Graph/treeLayout.d.ts +2 -0
- package/dist/components/Graph/treeLayout.js +284 -0
- package/dist/components/Graph/treeLayout.js.map +1 -0
- package/dist/components/Graph/types.d.ts +52 -0
- package/dist/components/Graph/types.js +2 -0
- package/dist/components/Graph/types.js.map +1 -0
- package/dist/components/Graph/utils.d.ts +6 -0
- package/dist/components/Graph/utils.js +88 -0
- package/dist/components/Graph/utils.js.map +1 -0
- package/dist/components/InfoViewer/formatters/pqGroup.d.ts +5 -1
- package/dist/components/InfoViewer/formatters/pqGroup.js +24 -2
- package/dist/components/InfoViewer/formatters/pqGroup.js.map +1 -1
- package/dist/components/InfoViewer/i18n/en.json +8 -1
- package/dist/components/InfoViewer/i18n/index.d.ts +1 -1
- package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
- package/dist/containers/App/Content.js +9 -2
- package/dist/containers/App/Content.js.map +1 -1
- package/dist/containers/App/clusterRouteGuard.d.ts +5 -0
- package/dist/containers/App/clusterRouteGuard.js +13 -0
- package/dist/containers/App/clusterRouteGuard.js.map +1 -0
- package/dist/containers/Clusters/constants.d.ts +1 -1
- package/dist/containers/Nodes/i18n/index.d.ts +1 -1
- package/dist/containers/Operations/constants.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TransferInfo/Credentials.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/utils/prepareTopicSchemaInfo.js +17 -3
- package/dist/containers/Tenant/Diagnostics/Overview/utils/prepareTopicSchemaInfo.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/useTenantStorageNewData.d.ts +2 -2
- package/dist/containers/Tenant/Query/QueryResult/components/Graph/Graph.js +9 -4
- package/dist/containers/Tenant/Query/QueryResult/components/Graph/Graph.js.map +1 -1
- package/dist/containers/Tenant/Query/QueryResult/components/Graph/Graph.scss +2 -0
- package/dist/containers/Tenant/TenantNavigation/useTenantNavigation.d.ts +1 -1
- package/dist/graphLayout.worker.d.ts +1 -0
- package/dist/graphLayout.worker.js +17 -0
- package/dist/graphLayout.worker.js.map +1 -0
- package/dist/lib.d.ts +1 -1
- package/dist/lib.js.map +1 -1
- package/dist/store/reducers/query/parsers/preparePlanData.js.map +1 -1
- package/dist/store/reducers/query/types.d.ts +38 -1
- package/dist/store/reducers/settings/utils.d.ts +2 -2
- package/dist/types/api/schema/persQueueGroup.d.ts +16 -0
- package/dist/types/api/schema/persQueueGroup.js +7 -0
- package/dist/types/api/schema/persQueueGroup.js.map +1 -1
- package/dist/uiFactory/types.d.ts +3 -0
- package/dist/utils/disks/helpers.d.ts +2 -2
- package/dist/utils/hooks/useChangedQuerySettings.d.ts +2 -2
- package/dist/utils/hooks/useLastQueryExecutionSettings.d.ts +2 -2
- package/dist/utils/hooks/useQueryExecutionSettings.d.ts +2 -2
- package/dist/utils/prepareQueryExplain.d.ts +1 -2
- package/dist/utils/prepareQueryExplain.js +10 -2
- package/dist/utils/prepareQueryExplain.js.map +1 -1
- package/dist/utils/query.d.ts +1 -1
- package/package.json +3 -3
- package/src/components/Graph/BlockComponents/ConnectionBlockComponent.tsx +49 -0
- package/src/components/Graph/BlockComponents/QueryBlockComponent.tsx +7 -0
- package/src/components/Graph/BlockComponents/ResultBlockComponent.tsx +10 -0
- package/src/components/Graph/BlockComponents/StageBlockComponent.tsx +35 -0
- package/src/components/Graph/FullViewportBackground.ts +122 -0
- package/src/components/Graph/GraphControls.tsx +49 -0
- package/src/components/Graph/GravityGraph.scss +131 -0
- package/src/components/Graph/GravityGraph.tsx +174 -0
- package/src/components/Graph/NonSelectableConnection.tsx +14 -0
- package/src/components/Graph/TooltipComponent.tsx +114 -0
- package/src/components/Graph/colorsConfig.ts +21 -0
- package/src/components/Graph/i18n/en.json +5 -0
- package/src/components/Graph/i18n/index.ts +7 -0
- package/src/components/Graph/runTreeLayout.ts +105 -0
- package/src/components/Graph/treeLayout.ts +378 -0
- package/src/components/Graph/types.ts +56 -0
- package/src/components/Graph/utils.ts +112 -0
- package/src/components/InfoViewer/formatters/pqGroup.ts +30 -2
- package/src/components/InfoViewer/i18n/en.json +8 -1
- package/src/containers/App/Content.tsx +9 -1
- package/src/containers/App/clusterRouteGuard.ts +24 -0
- package/src/containers/Tenant/Diagnostics/Overview/utils/prepareTopicSchemaInfo.ts +23 -2
- package/src/containers/Tenant/Query/QueryResult/components/Graph/Graph.scss +2 -0
- package/src/containers/Tenant/Query/QueryResult/components/Graph/Graph.tsx +13 -7
- package/src/graphLayout.worker.ts +21 -0
- package/src/lib.ts +1 -0
- package/src/store/reducers/query/parsers/preparePlanData.ts +1 -3
- package/src/store/reducers/query/types.ts +42 -2
- package/src/types/api/schema/persQueueGroup.ts +19 -0
- package/src/uiFactory/types.ts +4 -0
- package/src/utils/prepareQueryExplain.ts +13 -5
- package/dist/components/Graph/Graph.d.ts +0 -12
- package/dist/components/Graph/Graph.js +0 -44
- package/dist/components/Graph/Graph.js.map +0 -1
- package/dist/components/Graph/colors.d.ts +0 -10
- package/dist/components/Graph/colors.js +0 -53
- package/dist/components/Graph/colors.js.map +0 -1
- package/src/components/Graph/Graph.tsx +0 -70
- package/src/components/Graph/colors.ts +0 -75
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
const BLOCK_TOP_PADDING = 8;
|
|
2
|
+
const BLOCK_LINE_HEIGHT = 16;
|
|
3
|
+
const BORDER_HEIGHT = 2;
|
|
4
|
+
const getBlockSize = (block) => {
|
|
5
|
+
var _a, _b, _c, _d;
|
|
6
|
+
const ONE_LINE_HEIGHT = BLOCK_TOP_PADDING * 2 + BLOCK_LINE_HEIGHT + BORDER_HEIGHT;
|
|
7
|
+
const operatorsLength = Math.max((_b = (_a = block.operators) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0, 1);
|
|
8
|
+
const tablesLength = (_d = (_c = block.tables) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0;
|
|
9
|
+
switch (block.type) {
|
|
10
|
+
case 'query':
|
|
11
|
+
return {
|
|
12
|
+
width: 40,
|
|
13
|
+
height: 40,
|
|
14
|
+
};
|
|
15
|
+
case 'result':
|
|
16
|
+
return {
|
|
17
|
+
width: 112,
|
|
18
|
+
height: ONE_LINE_HEIGHT,
|
|
19
|
+
};
|
|
20
|
+
case 'stage':
|
|
21
|
+
return {
|
|
22
|
+
width: 248,
|
|
23
|
+
height: BORDER_HEIGHT +
|
|
24
|
+
BLOCK_TOP_PADDING * 2 +
|
|
25
|
+
(operatorsLength + tablesLength) * BLOCK_LINE_HEIGHT,
|
|
26
|
+
};
|
|
27
|
+
case 'connection':
|
|
28
|
+
return {
|
|
29
|
+
width: 122,
|
|
30
|
+
height: ONE_LINE_HEIGHT,
|
|
31
|
+
};
|
|
32
|
+
case 'materialize':
|
|
33
|
+
return {
|
|
34
|
+
width: 190,
|
|
35
|
+
height: ONE_LINE_HEIGHT,
|
|
36
|
+
};
|
|
37
|
+
default:
|
|
38
|
+
return {
|
|
39
|
+
width: 100,
|
|
40
|
+
height: ONE_LINE_HEIGHT,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
export const prepareBlocks = (nodes) => {
|
|
45
|
+
return nodes.map(({ name: id, data: { id: planNodeId, name, type, ...rest }, data }) => ({
|
|
46
|
+
id,
|
|
47
|
+
is: type,
|
|
48
|
+
name,
|
|
49
|
+
planNodeId,
|
|
50
|
+
...getBlockSize(data),
|
|
51
|
+
...rest,
|
|
52
|
+
}));
|
|
53
|
+
};
|
|
54
|
+
export const prepareConnections = (links) => {
|
|
55
|
+
return links.map(({ from, to }) => ({
|
|
56
|
+
id: `${from}:${to}`,
|
|
57
|
+
sourceBlockId: from,
|
|
58
|
+
targetBlockId: to,
|
|
59
|
+
}));
|
|
60
|
+
};
|
|
61
|
+
function calculateCurrentCustomPropertyValue(colorSettings, computedStyle) {
|
|
62
|
+
const result = {};
|
|
63
|
+
for (const nestedKey in colorSettings) {
|
|
64
|
+
if (Object.prototype.hasOwnProperty.call(colorSettings, nestedKey)) {
|
|
65
|
+
const value = colorSettings[nestedKey];
|
|
66
|
+
if (value !== undefined) {
|
|
67
|
+
result[nestedKey] = (value === null || value === void 0 ? void 0 : value.startsWith('var('))
|
|
68
|
+
? computedStyle.getPropertyValue(value.substring(4, value.length - 1)).trim()
|
|
69
|
+
: value;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
export function parseCustomPropertyValue(colors, block = globalThis.document.body) {
|
|
76
|
+
const parsed = {};
|
|
77
|
+
const computedStyle = window.getComputedStyle(block);
|
|
78
|
+
for (const topKey in colors) {
|
|
79
|
+
if (Object.prototype.hasOwnProperty.call(colors, topKey)) {
|
|
80
|
+
const nestedObj = colors[topKey];
|
|
81
|
+
if (nestedObj) {
|
|
82
|
+
parsed[topKey] = calculateCurrentCustomPropertyValue(nestedObj, computedStyle);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return parsed;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources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C,CAAC,KAAK,CAAC;YAChB,CAAC;QACL,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,wBAAwB,CACpC,MAAS,EACT,QAAqB,UAAU,CAAC,QAAQ,CAAC,IAAI;IAE7C,MAAM,MAAM,GAA8B,EAAE,CAAC;IAC7C,MAAM,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAErD,KAAK,MAAM,MAAM,IAAI,MAAM,EAAE,CAAC;QAC1B,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;YACvD,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;YAEjC,IAAI,SAAS,EAAE,CAAC;gBACZ,MAAM,CAAC,MAAM,CAAC,GAAG,mCAAmC,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;YACnF,CAAC;QACL,CAAC;IACL,CAAC;IAED,OAAO,MAAW,CAAC;AACvB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TPQPartitionConfig, TPQTabletConfig, TPersQueueGroupDescription } from '../../../types/api/schema';
|
|
1
|
+
import type { TPQPartitionConfig, TPQPartitionStrategy, TPQTabletConfig, TPersQueueGroupDescription } from '../../../types/api/schema';
|
|
2
2
|
export declare const formatPQGroupItem: <Key extends keyof TPersQueueGroupDescription>(label: Key, value: TPersQueueGroupDescription[Key]) => {
|
|
3
3
|
label: string;
|
|
4
4
|
value: string | number | boolean | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | TPersQueueGroupDescription[Key] | null | undefined;
|
|
@@ -11,3 +11,7 @@ export declare const formatPQPartitionConfig: <Key extends keyof TPQPartitionCon
|
|
|
11
11
|
label: string;
|
|
12
12
|
value: string | number | boolean | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | TPQPartitionConfig[Key] | null | undefined;
|
|
13
13
|
};
|
|
14
|
+
export declare const formatPQPartitionStrategy: <Key extends keyof TPQPartitionStrategy>(label: Key, value: TPQPartitionStrategy[Key]) => {
|
|
15
|
+
label: string;
|
|
16
|
+
value: string | number | boolean | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | TPQPartitionStrategy[Key] | null | undefined;
|
|
17
|
+
};
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import { EMeteringMode } from '../../../types/api/schema';
|
|
2
|
-
import { HOUR_IN_SECONDS } from '../../../utils/constants';
|
|
1
|
+
import { EMeteringMode, EPQPartitionStrategyType } from '../../../types/api/schema';
|
|
2
|
+
import { EMPTY_DATA_PLACEHOLDER, HOUR_IN_SECONDS } from '../../../utils/constants';
|
|
3
3
|
import { formatBps, formatBytes, formatNumber } from '../../../utils/dataFormatters/dataFormatters';
|
|
4
|
+
import i18n from '../i18n';
|
|
4
5
|
import { createInfoFormatter } from '../utils';
|
|
5
6
|
const EMeteringModeToNames = {
|
|
6
7
|
[EMeteringMode.METERING_MODE_REQUEST_UNITS]: 'request-units',
|
|
7
8
|
[EMeteringMode.METERING_MODE_RESERVED_CAPACITY]: 'reserved-capacity',
|
|
8
9
|
};
|
|
10
|
+
const EPQPartitionStrategyTypeToNames = {
|
|
11
|
+
[EPQPartitionStrategyType.DISABLED]: i18n('value_autopartitioning-disabled'),
|
|
12
|
+
[EPQPartitionStrategyType.CAN_SPLIT]: i18n('value_autopartitioning-up'),
|
|
13
|
+
[EPQPartitionStrategyType.CAN_SPLIT_AND_MERGE]: i18n('value_autopartitioning-up-and-down'),
|
|
14
|
+
[EPQPartitionStrategyType.PAUSED]: i18n('value_autopartitioning-paused'),
|
|
15
|
+
};
|
|
9
16
|
export const formatPQGroupItem = createInfoFormatter({
|
|
10
17
|
values: {
|
|
11
18
|
Partitions: (value) => formatNumber((value === null || value === void 0 ? void 0 : value.length) || 0),
|
|
@@ -38,4 +45,19 @@ export const formatPQPartitionConfig = createInfoFormatter({
|
|
|
38
45
|
WriteSpeedInBytesPerSecond: 'Partitions write speed',
|
|
39
46
|
},
|
|
40
47
|
});
|
|
48
|
+
const formatPartitionCount = (value) => value === undefined ? EMPTY_DATA_PLACEHOLDER : formatNumber(value);
|
|
49
|
+
export const formatPQPartitionStrategy = createInfoFormatter({
|
|
50
|
+
values: {
|
|
51
|
+
// Fall back to the raw enum value so a strategy introduced by a newer YDB
|
|
52
|
+
// version still renders the Autopartitioning row instead of being dropped.
|
|
53
|
+
PartitionStrategyType: (value) => { var _a; return value && ((_a = EPQPartitionStrategyTypeToNames[value]) !== null && _a !== void 0 ? _a : value); },
|
|
54
|
+
MinPartitionCount: formatPartitionCount,
|
|
55
|
+
MaxPartitionCount: formatPartitionCount,
|
|
56
|
+
},
|
|
57
|
+
labels: {
|
|
58
|
+
PartitionStrategyType: i18n('field_autopartitioning'),
|
|
59
|
+
MinPartitionCount: i18n('field_min-partitions-count'),
|
|
60
|
+
MaxPartitionCount: i18n('field_max-partitions-count'),
|
|
61
|
+
},
|
|
62
|
+
});
|
|
41
63
|
//# sourceMappingURL=pqGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pqGroup.js","sourceRoot":"","sources":["../../../../src/components/InfoViewer/formatters/pqGroup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pqGroup.js","sourceRoot":"","sources":["../../../../src/components/InfoViewer/formatters/pqGroup.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,aAAa,EAAE,wBAAwB,EAAC,MAAM,2BAA2B,CAAC;AAClF,OAAO,EAAC,sBAAsB,EAAE,eAAe,EAAC,MAAM,0BAA0B,CAAC;AACjF,OAAO,EAAC,SAAS,EAAE,WAAW,EAAE,YAAY,EAAC,MAAM,8CAA8C,CAAC;AAClG,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CA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|
6
|
+
"field_min-partitions-count": "Min partitions count",
|
|
7
|
+
"field_max-partitions-count": "Max partitions count",
|
|
8
|
+
"value_autopartitioning-disabled": "Disabled",
|
|
9
|
+
"value_autopartitioning-up": "Up",
|
|
10
|
+
"value_autopartitioning-up-and-down": "Up and down",
|
|
11
|
+
"value_autopartitioning-paused": "Paused"
|
|
5
12
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: (key: "no-data" | "common.created" | "common.type", params?: import("@gravity-ui/i18n").Params) => string;
|
|
1
|
+
declare const _default: (key: "no-data" | "common.created" | "common.type" | "field_autopartitioning" | "field_min-partitions-count" | "field_max-partitions-count" | "value_autopartitioning-disabled" | "value_autopartitioning-up" | "value_autopartitioning-up-and-down" | "value_autopartitioning-paused", params?: import("@gravity-ui/i18n").Params) => string;
|
|
2
2
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pDiskInfoKeyset: (key: "type" | "
|
|
1
|
+
export declare const pDiskInfoKeyset: (key: "type" | "links" | "space" | "path" | "state" | "yes" | "device" | "slots" | "realtime" | "usage" | "value_no-data" | "developer-ui" | "guid" | "serial-number" | "shared-with-os" | "drive-status" | "log-size" | "system-size", params?: import("@gravity-ui/i18n").Params) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const vDiskInfoKeyset: (key: "
|
|
1
|
+
export declare const vDiskInfoKeyset: (key: "links" | "label_pdisk-id" | "size" | "kind" | "yes" | "no" | "label_recipient" | "pool-name" | "usage" | "developer-ui" | "guid" | "slot-id" | "incarnation-guid" | "instance-guid" | "replication-status" | "replication-progress" | "replication-time-remaining" | "donors" | "state-status" | "space-status" | "fresh-rank-satisfaction" | "level-rank-satisfaction" | "front-queues" | "has-unreadable-blobs" | "read-throughput" | "write-throughput" | "vdisk-page" | "vdiks-title", params?: import("@gravity-ui/i18n").Params) => string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { connect } from 'react-redux';
|
|
4
|
-
import { Redirect, Route, Switch } from 'react-router-dom';
|
|
4
|
+
import { Redirect, Route, Switch, useLocation } from 'react-router-dom';
|
|
5
5
|
import { Unauthenticated } from '../../components/Errors/401';
|
|
6
6
|
import { AccessDenied } from '../../components/Errors/403';
|
|
7
7
|
import { LoaderWrapper } from '../../components/LoaderWrapper/LoaderWrapper';
|
|
@@ -18,6 +18,7 @@ import Authentication from '../Authentication/Authentication';
|
|
|
18
18
|
import { GetUser } from '../GetUserWrapper/GetUserWrapper';
|
|
19
19
|
import { Header } from '../Header/Header';
|
|
20
20
|
import { ClusterSlot, HomePageSlot, NodeSlot, PDiskPageSlot, RedirectSlot, RoutesSlot, StorageGroupSlot, TabletSlot, TenantSlot, VDiskPageSlot, } from './appSlots';
|
|
21
|
+
import { shouldRedirectClusterRouteToRoot } from './clusterRouteGuard';
|
|
21
22
|
import { getLegacyClusterTenantsRedirect, getLegacyTenantRedirect } from './legacyRedirects';
|
|
22
23
|
import './App.scss';
|
|
23
24
|
const b = cn('app');
|
|
@@ -97,10 +98,16 @@ export function Content(props) {
|
|
|
97
98
|
var _a;
|
|
98
99
|
const { singleClusterMode } = props;
|
|
99
100
|
const slots = useSlots(props);
|
|
101
|
+
const currentLocation = useLocation();
|
|
102
|
+
const shouldRedirectToRoot = shouldRedirectClusterRouteToRoot({
|
|
103
|
+
singleClusterMode,
|
|
104
|
+
pathname: currentLocation.pathname,
|
|
105
|
+
search: currentLocation.search,
|
|
106
|
+
});
|
|
100
107
|
const additionalRoutes = slots.get(RoutesSlot);
|
|
101
108
|
const redirect = slots.get(RedirectSlot);
|
|
102
109
|
const redirectProps = (_a = redirect === null || redirect === void 0 ? void 0 : redirect.props) !== null && _a !== void 0 ? _a : (singleClusterMode ? { to: getClusterPath() } : { to: routes.homePage });
|
|
103
|
-
return (_jsxs(Switch, { children: [additionalRoutes === null || additionalRoutes === void 0 ? void 0 : additionalRoutes.rendered, _jsxs(Route, { children: [_jsx(Header, {}), _jsxs(Switch, { children: [_jsx(Route, { path: `/:environment?/${CLUSTER}/tenants`, exact: true, render: ({ location }) => (_jsx(Redirect, { to: getLegacyClusterTenantsRedirect(location) })) }), _jsx(Route, { path: routes.legacyTenant, render: ({ location }) => _jsx(Redirect, { to: getLegacyTenantRedirect(location) }) }), singleClusterMode
|
|
110
|
+
return (_jsxs(Switch, { children: [additionalRoutes === null || additionalRoutes === void 0 ? void 0 : additionalRoutes.rendered, shouldRedirectToRoot ? _jsx(Redirect, { to: "/" }) : null, _jsxs(Route, { children: [_jsx(Header, {}), _jsxs(Switch, { children: [_jsx(Route, { path: `/:environment?/${CLUSTER}/tenants`, exact: true, render: ({ location }) => (_jsx(Redirect, { to: getLegacyClusterTenantsRedirect(location) })) }), _jsx(Route, { path: routes.legacyTenant, render: ({ location }) => _jsx(Redirect, { to: getLegacyTenantRedirect(location) }) }), singleClusterMode
|
|
104
111
|
? null
|
|
105
112
|
: multiClusterRoutes.map((route) => {
|
|
106
113
|
return renderRouteSlot(slots, route);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../src/containers/App/Content.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../src/containers/App/Content.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAEtE,OAAO,EAAC,eAAe,EAAC,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BAAmB,EAAE,CAAC;YACzC,OAAO,KAAC,YAAY,KAAG,CAAC;QAC5B,CAAC;QACD,OAAO,CACH,KAAC,mBAAmB,cAChB,KAAC,cAAc,KAAG,GACA,CACzB,CAAC;IACN,CAAC,CAAC;IAEF,OAAO,CACH,MAAC,MAAM,eACF,CAAC,eAAe,IAAI,CAAC,mBAAmB,IAAI,CACzC,KAAC,KAAK,IAAC,IAAI,EAAE,MAAM,CAAC,IAAI,YACpB,KAAC,mBAAmB,cAChB,KAAC,cAAc,IAAC,QAAQ,SAAG,GACT,GAClB,CACX,EACD,KAAC,KAAK,cACF,cAAK,SAAS,EAAE,CAAC,CAAC,EAAC,QAAQ,EAAE,iBAAiB,EAAC,CAAC,YAC3C,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,sBAAsB,EAAE,GAC1D,GACF,IACH,CACZ,CAAC;AACN,CAAC;AAED,SAAS,eAAe,CAAC,KAAgB;IACrC,OAAO;QACH,eAAe,EAAE,KAAK,CAAC,cAAc,CAAC,eAAe;QACrD,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;KAC7C,CAAC;AACN,CAAC;AAED,eAAe,OAAO,CAAC,eAAe,CAAC,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { matchPath } from 'react-router-dom';
|
|
2
|
+
import routes from '../../routes';
|
|
3
|
+
export function shouldRedirectClusterRouteToRoot({ singleClusterMode, pathname, search, }) {
|
|
4
|
+
const clusterRouteMatch = matchPath(pathname, {
|
|
5
|
+
path: routes.cluster,
|
|
6
|
+
exact: false,
|
|
7
|
+
});
|
|
8
|
+
if (singleClusterMode || !clusterRouteMatch) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
return !new URLSearchParams(search).get('clusterName');
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=clusterRouteGuard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clusterRouteGuard.js","sourceRoot":"","sources":["../../../src/containers/App/clusterRouteGuard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAE3C,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,UAAU,gCAAgC,CAAC,EAC7C,iBAAiB,EACjB,QAAQ,EACR,MAAM,GAKT;IACG,MAAM,iBAAiB,GAAG,SAAS,CAAC,QAAQ,EAAE;QAC1C,IAAI,EAAE,MAAM,CAAC,OAAO;QACpB,KAAK,EAAE,KAAK;KACf,CAAC,CAAC;IAEH,IAAI,iBAAiB,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,OAAO,CAAC,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -16,7 +16,7 @@ export declare const COLUMNS_NAMES: {
|
|
|
16
16
|
readonly TENANTS: "tenants";
|
|
17
17
|
readonly DESCRIPTION: "description";
|
|
18
18
|
};
|
|
19
|
-
export declare const DEFAULT_COLUMNS: ("status" | "storage" | "hosts" | "versions" | "title" | "service" | "
|
|
19
|
+
export declare const DEFAULT_COLUMNS: ("status" | "nodes" | "storage" | "hosts" | "versions" | "title" | "service" | "tenants" | "load")[];
|
|
20
20
|
export declare const COLUMNS_TITLES: {
|
|
21
21
|
readonly title: string;
|
|
22
22
|
readonly versions: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: (key: "
|
|
1
|
+
declare const _default: (key: "any" | "nodes" | "static" | "database" | "other" | "empty.default" | "no-nodes-groups" | "controls_search-placeholder" | "controls_group-by-placeholder" | "controls_peer-role-label", params?: import("@gravity-ui/i18n").Params) => string;
|
|
2
2
|
export default _default;
|
|
@@ -18,7 +18,7 @@ export declare const COLUMNS_TITLES: {
|
|
|
18
18
|
readonly duration: string;
|
|
19
19
|
readonly state: string;
|
|
20
20
|
};
|
|
21
|
-
export declare const BASE_COLUMNS: ("
|
|
21
|
+
export declare const BASE_COLUMNS: ("status" | "id" | "created_by" | "create_time" | "end_time" | "duration")[];
|
|
22
22
|
export declare const OPERATION_KINDS: {
|
|
23
23
|
value: OperationKind;
|
|
24
24
|
content: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: (key: "action_compaction" | "action_cancel" | "title_table-stats" | "title_tablet-metrics" | "title_partition-config" | "action_stop" | "action_manage-partitioning" | "action_manage-partition-config" | "action_run-compaction" | "action_stop-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" | "
|
|
1
|
+
declare const _default: (key: "action_compaction" | "action_cancel" | "field_min-partitions-count" | "field_max-partitions-count" | "title_table-stats" | "title_tablet-metrics" | "title_partition-config" | "action_stop" | "action_manage-partitioning" | "action_manage-partition-config" | "action_run-compaction" | "action_stop-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_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" | "help_cascade" | "help_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" | "toast_compaction-started", params?: import("@gravity-ui/i18n").Params) => string;
|
|
2
2
|
export default _default;
|
|
@@ -2,5 +2,5 @@ import type { TConnectionParams } from '../../../../../types/api/schema/replicat
|
|
|
2
2
|
interface CredentialsProps {
|
|
3
3
|
connection?: TConnectionParams;
|
|
4
4
|
}
|
|
5
|
-
export declare function Credentials({ connection }: CredentialsProps): "
|
|
5
|
+
export declare function Credentials({ connection }: CredentialsProps): "" | "unknown" | import("react/jsx-runtime").JSX.Element | "OAuth" | null;
|
|
6
6
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { formatObject } from '../../../../../components/InfoViewer';
|
|
2
|
-
import { formatPQGroupItem, formatPQPartitionConfig, formatPQTabletConfig, } from '../../../../../components/InfoViewer/formatters';
|
|
2
|
+
import { formatPQGroupItem, formatPQPartitionConfig, formatPQPartitionStrategy, formatPQTabletConfig, } from '../../../../../components/InfoViewer/formatters';
|
|
3
|
+
import { EPQPartitionStrategyType } from '../../../../../types/api/schema';
|
|
3
4
|
export const prepareTopicSchemaInfo = (data) => {
|
|
4
5
|
var _a;
|
|
5
6
|
const pqGroupData = (_a = data === null || data === void 0 ? void 0 : data.PathDescription) === null || _a === void 0 ? void 0 : _a.PersQueueGroup;
|
|
@@ -7,7 +8,7 @@ export const prepareTopicSchemaInfo = (data) => {
|
|
|
7
8
|
return [];
|
|
8
9
|
}
|
|
9
10
|
const { Partitions = [], PQTabletConfig = { PartitionConfig: { LifetimeSeconds: 0 } } } = pqGroupData;
|
|
10
|
-
const { Codecs, MeteringMode } = PQTabletConfig;
|
|
11
|
+
const { Codecs, MeteringMode, PartitionStrategy } = PQTabletConfig;
|
|
11
12
|
const { WriteSpeedInBytesPerSecond, StorageLimitBytes } = PQTabletConfig.PartitionConfig;
|
|
12
13
|
//@ts-expect-error
|
|
13
14
|
const pqGeneralInfo = formatObject(formatPQGroupItem, {
|
|
@@ -24,6 +25,19 @@ export const prepareTopicSchemaInfo = (data) => {
|
|
|
24
25
|
Codecs,
|
|
25
26
|
MeteringMode,
|
|
26
27
|
});
|
|
27
|
-
|
|
28
|
+
let pqAutopartitioningInfo = [];
|
|
29
|
+
const strategyType = PartitionStrategy === null || PartitionStrategy === void 0 ? void 0 : PartitionStrategy.PartitionStrategyType;
|
|
30
|
+
if (PartitionStrategy && strategyType) {
|
|
31
|
+
// For a disabled strategy only the state itself is meaningful; otherwise show the bounds.
|
|
32
|
+
const strategyFields = strategyType === EPQPartitionStrategyType.DISABLED
|
|
33
|
+
? { PartitionStrategyType: strategyType }
|
|
34
|
+
: {
|
|
35
|
+
PartitionStrategyType: strategyType,
|
|
36
|
+
MinPartitionCount: PartitionStrategy.MinPartitionCount,
|
|
37
|
+
MaxPartitionCount: PartitionStrategy.MaxPartitionCount,
|
|
38
|
+
};
|
|
39
|
+
pqAutopartitioningInfo = formatObject(formatPQPartitionStrategy, strategyFields);
|
|
40
|
+
}
|
|
41
|
+
return [...pqGeneralInfo, ...pqPartitionInfo, ...pqTabletInfo, ...pqAutopartitioningInfo];
|
|
28
42
|
};
|
|
29
43
|
//# sourceMappingURL=prepareTopicSchemaInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepareTopicSchemaInfo.js","sourceRoot":"","sources":["../../../../../../src/containers/Tenant/Diagnostics/Overview/utils/prepareTopicSchemaInfo.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,sCAAsC,CAAC;AAClE,OAAO,EACH,iBAAiB,EACjB,uBAAuB,EACvB,oBAAoB,GACvB,MAAM,iDAAiD,CAAC;AAQzD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,IAA8B,EAAyB,EAAE;;IAC5F,MAAM,WAAW,GAAG,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,eAAe,0CAAE,cAAc,CAAC;IAE1D,IAAI,CAAC,WAAW,EAAE,CAAC;QACf,OAAO,EAAE,CAAC;IACd,CAAC;IAED,MAAM,EAAC,UAAU,GAAG,EAAE,EAAE,cAAc,GAAG,EAAC,eAAe,EAAE,EAAC,eAAe,EAAE,CAAC,EAAC,EAAC,EAAC,GAAG,WAAW,CAAC;IAEhG,MAAM,EAAC,MAAM,EAAE,YAAY,EAAC,GAAG,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"prepareTopicSchemaInfo.js","sourceRoot":"","sources":["../../../../../../src/containers/Tenant/Diagnostics/Overview/utils/prepareTopicSchemaInfo.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,sCAAsC,CAAC;AAClE,OAAO,EACH,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,EACzB,oBAAoB,GACvB,MAAM,iDAAiD,CAAC;AAQzD,OAAO,EAAC,wBAAwB,EAAC,MAAM,iCAAiC,CAAC;AAEzE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,IAA8B,EAAyB,EAAE;;IAC5F,MAAM,WAAW,GAAG,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,eAAe,0CAAE,cAAc,CAAC;IAE1D,IAAI,CAAC,WAAW,EAAE,CAAC;QACf,OAAO,EAAE,CAAC;IACd,CAAC;IAED,MAAM,EAAC,UAAU,GAAG,EAAE,EAAE,cAAc,GAAG,EAAC,eAAe,EAAE,EAAC,eAAe,EAAE,CAAC,EAAC,EAAC,EAAC,GAAG,WAAW,CAAC;IAEhG,MAAM,EAAC,MAAM,EAAE,YAAY,EAAE,iBAAiB,EAAC,GAAG,cAAc,CAAC;IACjE,MAAM,EAAC,0BAA0B,EAAE,iBAAiB,EAAC,GAAG,cAAc,CAAC,eAAe,CAAC;IAEvF,kBAAkB;IAClB,MAAM,aAAa,GAAG,YAAY,CAA6B,iBAAiB,EAAE;QAC9E,UAAU;QACV,cAAc;KACjB,CAAC,CAAC;IACH,kBAAkB;IAClB,MAAM,eAAe,GAAG,YAAY,CAAqB,uBAAuB,EAAE;QAC9E,iBAAiB;QACjB,0BAA0B;KAC7B,CAAC,CAAC;IACH,kBAAkB;IAClB,MAAM,YAAY,GAAG,YAAY,CAAkB,oBAAoB,EAAE;QACrE,MAAM;QACN,YAAY;KACf,CAAC,CAAC;IAEH,IAAI,sBAAsB,GAAqB,EAAE,CAAC;IAClD,MAAM,YAAY,GAAG,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,qBAAqB,CAAC;IAC9D,IAAI,iBAAiB,IAAI,YAAY,EAAE,CAAC;QACpC,0FAA0F;QAC1F,MAAM,cAAc,GAChB,YAAY,KAAK,wBAAwB,CAAC,QAAQ;YAC9C,CAAC,CAAC,EAAC,qBAAqB,EAAE,YAAY,EAAC;YACvC,CAAC,CAAC;gBACI,qBAAqB,EAAE,YAAY;gBACnC,iBAAiB,EAAE,iBAAiB,CAAC,iBAAiB;gBACtD,iBAAiB,EAAE,iBAAiB,CAAC,iBAAiB;aACzD,CAAC;QACZ,sBAAsB,GAAG,YAAY,CACjC,yBAAyB,EACzB,cAAc,CACjB,CAAC;IACN,CAAC;IAED,OAAO,CAAC,GAAG,aAAa,EAAE,GAAG,eAAe,EAAE,GAAG,YAAY,EAAE,GAAG,sBAAsB,CAAC,CAAC;AAC9F,CAAC,CAAC"}
|
package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/useTenantStorageNewData.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ interface UseTenantStorageNewDataParams {
|
|
|
7
7
|
}
|
|
8
8
|
export declare function useTenantStorageNewData({ database, databaseFullPath, metrics, }: UseTenantStorageNewDataParams): {
|
|
9
9
|
data: TenantStorageData;
|
|
10
|
-
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
11
10
|
error?: undefined | undefined;
|
|
11
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
12
12
|
isLoading: false;
|
|
13
13
|
fulfilledTimeStamp?: undefined | undefined;
|
|
14
14
|
originalArgs?: undefined | undefined;
|
|
@@ -23,8 +23,8 @@ export declare function useTenantStorageNewData({ database, databaseFullPath, me
|
|
|
23
23
|
refetch: () => import("@reduxjs/toolkit/query").QueryActionCreatorResult<import("@reduxjs/toolkit/query").QueryDefinition<import("../../../../../store/reducers/tenantOverview/storage/tenantOverviewStorage").GetTenantStorageRawParams, 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" | "OperationList", import("../../../../../store/reducers/tenantOverview/storage/tenantOverviewStorage").TenantStorageRawData, "api", typeof import("../../../../../store/reducers/api")._NEVER>>;
|
|
24
24
|
} | {
|
|
25
25
|
data: TenantStorageData;
|
|
26
|
-
status: import("@reduxjs/toolkit/query").QueryStatus;
|
|
27
26
|
error?: unknown;
|
|
27
|
+
status: import("@reduxjs/toolkit/query").QueryStatus;
|
|
28
28
|
fulfilledTimeStamp?: number | undefined;
|
|
29
29
|
originalArgs?: import("../../../../../store/reducers/tenantOverview/storage/tenantOverviewStorage").GetTenantStorageRawParams | undefined;
|
|
30
30
|
requestId?: string | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { GravityGraph } from '../../../../../../components/Graph/GravityGraph';
|
|
4
4
|
import { cn } from '../../../../../../utils/cn';
|
|
5
5
|
import i18n from '../../i18n';
|
|
6
6
|
import { StubMessage } from '../Stub/Stub';
|
|
@@ -11,10 +11,15 @@ function isValidGraphData(data) {
|
|
|
11
11
|
}
|
|
12
12
|
export function Graph({ explain = {}, theme }) {
|
|
13
13
|
const { links, nodes } = explain;
|
|
14
|
-
const data = React.useMemo(() => ({ links, nodes }), [links, nodes]);
|
|
15
|
-
|
|
14
|
+
const data = React.useMemo(() => ({ links: links || [], nodes: nodes || [] }), [links, nodes]);
|
|
15
|
+
const [failedData, setFailedData] = React.useState();
|
|
16
|
+
const handleLayoutError = React.useCallback((error) => {
|
|
17
|
+
console.error(error);
|
|
18
|
+
setFailedData(data);
|
|
19
|
+
}, [data]);
|
|
20
|
+
if (!isValidGraphData(data) || failedData === data) {
|
|
16
21
|
return _jsx(StubMessage, { message: i18n('description.graph-is-not-supported') });
|
|
17
22
|
}
|
|
18
|
-
return (_jsx("div", { className: b('canvas-container'), children: _jsx(
|
|
23
|
+
return (_jsx("div", { className: b('canvas-container'), children: _jsx(GravityGraph, { data: data, onError: handleLayoutError, theme: theme }) }));
|
|
19
24
|
}
|
|
20
25
|
//# sourceMappingURL=Graph.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Graph.js","sourceRoot":"","sources":["../../../../../../../src/containers/Tenant/Query/QueryResult/components/Graph/Graph.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Graph.js","sourceRoot":"","sources":["../../../../../../../src/containers/Tenant/Query/QueryResult/components/Graph/Graph.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,YAAY,EAAC,MAAM,iDAAiD,CAAC;AAE7E,OAAO,EAAC,EAAE,EAAC,MAAM,4BAA4B,CAAC;AAC9C,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;AAEzC,OAAO,cAAc,CAAC;AAEtB,MAAM,CAAC,GAAG,EAAE,CAAC,yBAAyB,CAAC,CAAC;AAOxC,SAAS,gBAAgB,CAAC,IAA2B;IACjD,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,EAAC,OAAO,GAAG,EAAE,EAAE,KAAK,EAAa;IACnD,MAAM,EAAC,KAAK,EAAE,KAAK,EAAC,GAAG,OAAO,CAAC;IAE/B,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAC,KAAK,EAAE,KAAK,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,EAAC,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IAC7F,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAe,CAAC;IAClE,MAAM,iBAAiB,GAAG,KAAK,CAAC,WAAW,CACvC,CAAC,KAAY,EAAE,EAAE;QACb,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,aAAa,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,EACD,CAAC,IAAI,CAAC,CACT,CAAC;IAEF,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;QACjD,OAAO,KAAC,WAAW,IAAC,OAAO,EAAE,IAAI,CAAC,oCAAoC,CAAC,GAAI,CAAC;IAChF,CAAC;IAED,OAAO,CACH,cAAK,SAAS,EAAE,CAAC,CAAC,kBAAkB,CAAC,YACjC,KAAC,YAAY,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,GAAI,GACpE,CACT,CAAC;AACN,CAAC"}
|
|
@@ -10,7 +10,7 @@ interface TenantNavigationItem {
|
|
|
10
10
|
}
|
|
11
11
|
export declare function useTenantNavigation(): TenantNavigationItem[];
|
|
12
12
|
export declare function useTenantPage(): {
|
|
13
|
-
readonly tenantPage: "
|
|
13
|
+
readonly tenantPage: "query" | "database" | "diagnostics";
|
|
14
14
|
readonly handleTenantPageChange: (value?: TenantPage) => void;
|
|
15
15
|
};
|
|
16
16
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { prepareTreeLayout } from './components/Graph/treeLayout';
|
|
2
|
+
const workerScope = globalThis;
|
|
3
|
+
workerScope.onmessage = ({ data }) => {
|
|
4
|
+
try {
|
|
5
|
+
workerScope.postMessage({
|
|
6
|
+
type: 'success',
|
|
7
|
+
result: prepareTreeLayout(data),
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
catch (error) {
|
|
11
|
+
workerScope.postMessage({
|
|
12
|
+
type: 'error',
|
|
13
|
+
error: error instanceof Error ? error.message : String(error),
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=graphLayout.worker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphLayout.worker.js","sourceRoot":"","sources":["../src/graphLayout.worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,+BAA+B,CAAC;AAGhE,MAAM,WAAW,GAAG,UAGnB,CAAC;AAEF,WAAW,CAAC,SAAS,GAAG,CAAC,EAAC,IAAI,EAAC,EAAE,EAAE;IAC/B,IAAI,CAAC;QACD,WAAW,CAAC,WAAW,CAAC;YACpB,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,iBAAiB,CAAC,IAAI,CAAC;SAClC,CAAC,CAAC;IACP,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,WAAW,CAAC,WAAW,CAAC;YACpB,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;SAChE,CAAC,CAAC;IACP,CAAC;AACL,CAAC,CAAC"}
|
package/dist/lib.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export type { AsideNavigationProps } from './containers/AsideNavigation/AsideNav
|
|
|
27
27
|
export type { ExternalQueryToOpen } from './containers/Tenant/Query/hooks/useOpenExternalQueryInEditor';
|
|
28
28
|
export type { DrawerContextType } from './components/Drawer';
|
|
29
29
|
export type { GetMonitoringLink, GetMonitoringClusterLink } from './utils/monitoring';
|
|
30
|
-
export type { GetAdditionalDatabaseInfoItems, GetReportProblemUrl, IllustrationComponent, IllustrationName, RenderHealthcheckAssistantAction, } from './uiFactory/types';
|
|
30
|
+
export type { CreateGraphLayoutWorker, GetAdditionalDatabaseInfoItems, GetReportProblemUrl, IllustrationComponent, IllustrationName, RenderHealthcheckAssistantAction, } from './uiFactory/types';
|
|
31
31
|
export type { HealthcheckAssistantActionProps, HealthcheckAssistantSnapshot, HealthcheckAssistantTarget, } from './containers/Tenant/Healthcheck/types';
|
|
32
32
|
export { configureUIFactory } from './uiFactory/uiFactory';
|
|
33
33
|
export { configureZod } from './utils/zod/configureZod';
|
package/dist/lib.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,IAAI,gBAAgB,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAC,eAAe,IAAI,eAAe,EAAC,MAAM,8CAA8C,CAAC;AAChG,OAAO,EACH,kBAAkB,IAAI,aAAa,EACnC,qBAAqB,GACxB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAC,eAAe,EAAC,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAC,4BAA4B,EAAC,MAAM,8DAA8D,CAAC;AAC1G,OAAO,EAAC,oBAAoB,EAAC,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAC,cAAc,EAAE,WAAW,EAAC,MAAM,SAAS,CAAC;AACpD,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,UAAU,CAAC;AAE9C,OAAO,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AACp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AAM,UAAU,CAAC;AAE9C,OAAO,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAC,eAAe,EAAC,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAC,eAAe,EAAE,eAAe,EAAC,MAAM,oCAAoC,CAAC;AAEpF,OAAO,EAAC,kBAAkB,EAAC,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,iBAAiB,EAAE,wBAAwB,EAAE,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AACpG,OAAO,EAAC,oBAAoB,EAAC,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAC,IAAI,EAAE,IAAI,EAAE,eAAe,EAAC,MAAM,cAAc,CAAC;AACzD,OAAO,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAC,EAAE,EAAC,MAAM,YAAY,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAElC,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,mBAAmB,CAAC;AA2B7D,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preparePlanData.js","sourceRoot":"","sources":["../../../../../src/store/reducers/query/parsers/preparePlanData.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"preparePlanData.js","sourceRoot":"","sources":["../../../../../src/store/reducers/query/parsers/preparePlanData.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,WAAW,EAAE,qBAAqB,EAAC,MAAM,uCAAuC,CAAC;AACzF,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAG9D,MAAM,eAAe,GAAG;IACpB,EAA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AAK,CAAE,UAAU,0CAAG,CAAC,CAAC,0CAAE,gBAAgB,0CAAG,CAAC,CAAC,CAAC;IACpE,IAAI,aAAa,EAAE,CAAC;QAChB,IAAI,CAAC;YACD,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;YAChD,OAAO;gBACH,GAAG,WAAW,CAAC,aAAa,CAAC;gBAC7B,QAAQ,EAAE,aAAa;gBACvB,cAAc,EAAE;oBACZ,IAAI,EAAE,qBAAqB,CAAC,CAAC,aAAa,CAAC,CAAC;oBAC5C,QAAQ,EAAE,aAAa;iBAC1B;aACJ,CAAC;QACN,CAAC;QAAC,WAAM,CAAC;YACL,OAAO,EAAE,CAAC;QACd,CAAC;IACL,CAAC;IAED,OAAO,EAAE,CAAC;AACd,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ExplainPlanNodeData, GraphNode, Link } from '@gravity-ui/paranoid';
|
|
2
1
|
import type { PlanTable, QueryPlan, ScriptPlan, SimlifiedPlanOperatorOtherParams, SimplifiedNode } from '../../../types/api/query';
|
|
3
2
|
import type { IQueryResult, QueryAction, StatisticsMode } from '../../../types/store/query';
|
|
4
3
|
export type QueryExecutionStatusType = 'loading' | 'completed' | 'failed' | 'stopped' | 'aborted';
|
|
@@ -16,6 +15,44 @@ export interface RawQueryInHistory {
|
|
|
16
15
|
export interface QueryInHistory extends RawQueryInHistory {
|
|
17
16
|
status?: QueryExecutionStatusType;
|
|
18
17
|
}
|
|
18
|
+
export interface Link {
|
|
19
|
+
from: string;
|
|
20
|
+
to: string;
|
|
21
|
+
}
|
|
22
|
+
export interface Metric {
|
|
23
|
+
name: string;
|
|
24
|
+
value: string;
|
|
25
|
+
theme?: 'warning' | 'danger';
|
|
26
|
+
}
|
|
27
|
+
export interface GraphNode<TData = any> {
|
|
28
|
+
name: string;
|
|
29
|
+
status?: string;
|
|
30
|
+
meta?: string;
|
|
31
|
+
group?: string;
|
|
32
|
+
data?: TData;
|
|
33
|
+
metrics?: Metric[];
|
|
34
|
+
}
|
|
35
|
+
export interface ExplainPlanNodeData {
|
|
36
|
+
id?: number;
|
|
37
|
+
type: 'query' | 'result' | 'stage' | 'connection' | 'materialize';
|
|
38
|
+
name?: string;
|
|
39
|
+
operators?: string[];
|
|
40
|
+
tables?: string[];
|
|
41
|
+
cte?: string;
|
|
42
|
+
stats?: TopologyNodeDataStats[];
|
|
43
|
+
}
|
|
44
|
+
export interface TopologyNodeDataStatsItem {
|
|
45
|
+
name: string;
|
|
46
|
+
value: string | number;
|
|
47
|
+
}
|
|
48
|
+
export interface TopologyNodeDataStatsSection {
|
|
49
|
+
name: string;
|
|
50
|
+
items: TopologyNodeDataStatsItem[];
|
|
51
|
+
}
|
|
52
|
+
export interface TopologyNodeDataStats {
|
|
53
|
+
group: string;
|
|
54
|
+
stats: TopologyNodeDataStatsSection[] | TopologyNodeDataStatsItem[];
|
|
55
|
+
}
|
|
19
56
|
export interface PreparedPlan {
|
|
20
57
|
links?: Link[];
|
|
21
58
|
nodes?: GraphNode<ExplainPlanNodeData>[];
|
|
@@ -3,7 +3,7 @@ export declare function stringifySettingValue(value?: unknown): string;
|
|
|
3
3
|
export declare function parseSettingValue<T>(value?: SettingValue): T | undefined;
|
|
4
4
|
export declare function readSettingValueFromLS<T = unknown>(name: string | undefined): T | undefined;
|
|
5
5
|
export declare function setSettingValueToLS(name: string | undefined, value: unknown): void;
|
|
6
|
-
export declare function getSettingDefault(name: string): boolean | 0 |
|
|
6
|
+
export declare function getSettingDefault(name: string): boolean | 0 | "query" | "execute" | {
|
|
7
7
|
queryMode: "query";
|
|
8
8
|
transactionMode: "implicit";
|
|
9
9
|
timeout: null;
|
|
@@ -13,5 +13,5 @@ export declare function getSettingDefault(name: string): boolean | 0 | import(".
|
|
|
13
13
|
tracingLevel: "off";
|
|
14
14
|
pragmas: string;
|
|
15
15
|
resourcePool: string;
|
|
16
|
-
} | "groups" | "system" | readonly [] | import("../../../lib").AclSyntax.YdbShort | undefined;
|
|
16
|
+
} | import("../../../lib").Lang.En | "State" | "clusters" | "groups" | "system" | readonly [] | import("../../../lib").AclSyntax.YdbShort | undefined;
|
|
17
17
|
export declare function shouldSyncSettingToLS(name: string): boolean;
|