ydb-embedded-ui 20.5.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/PDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
- 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/TransferInfo/Credentials.d.ts +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/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 +2 -2
- 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/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/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":["../../../src/components/Graph/utils.ts"],"names":[],"mappings":"AAOA,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAC5B,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,aAAa,GAAG,CAAC,CAAC;AAExB,MAAM,YAAY,GAAG,CAAC,KAA0B,EAAE,EAAE;;IAChD,MAAM,eAAe,GAAG,iBAAiB,GAAG,CAAC,GAAG,iBAAiB,GAAG,aAAa,CAAC;IAClF,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,MAAA,MAAA,KAAK,CAAC,SAAS,0CAAE,MAAM,mCAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IAClE,MAAM,YAAY,GAAG,MAAA,MAAA,KAAK,CAAC,MAAM,0CAAE,MAAM,mCAAI,CAAC,CAAC;IAE/C,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACjB,KAAK,OAAO;YACR,OAAO;gBACH,KAAK,EAAE,EAAE;gBACT,MAAM,EAAE,EAAE;aACb,CAAC;QACN,KAAK,QAAQ;YACT,OAAO;gBACH,KAAK,EAAE,GAAG;gBACV,MAAM,EAAE,eAAe;aAC1B,CAAC;QACN,KAAK,OAAO;YACR,OAAO;gBACH,KAAK,EAAE,GAAG;gBACV,MAAM,EACF,aAAa;oBACb,iBAAiB,GAAG,CAAC;oBACrB,CAAC,eAAe,GAAG,YAAY,CAAC,GAA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AC,EAAE,CAAC;YACjE,MAAM,KAAK,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC;YAEvC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACtB,MAAM,CAAC,SAAS,CAAC,GAAG,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,CAAC,MAAM,CAAC;oBACzC,CAAC,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;oBAC7E,CAAC,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 +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;
|
|
@@ -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;
|
|
@@ -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 {};
|
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;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,EAA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,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,EAAE,EAAE,KAAK;CACZ,CAAC;AAEF,MAAM,6BAA6B,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;AAErE,MAAM,UAAU,eAAe,CAC3B,OAAgC,EAChC,KAAsB;;IAItB,2BAA2B;IAC3B,IAAI,OAAO,EAAE,CAAC;QACV,MAAM,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAC,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAE5E,IAAI,6BAA6B,CAAC,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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;
|
|
@@ -13,6 +13,7 @@ import type { TUserToken } from '../types/api/whoami';
|
|
|
13
13
|
import type { GetLogsLink } from '../utils/logs';
|
|
14
14
|
import type { GetMonitoringClusterLink, GetMonitoringLink } from '../utils/monitoring';
|
|
15
15
|
export type IllustrationComponent = React.ComponentType<React.SVGProps<SVGSVGElement>>;
|
|
16
|
+
export type CreateGraphLayoutWorker = () => Worker;
|
|
16
17
|
export type IllustrationName = 'InternalError' | 'AccessDenied' | 'Unauthenticated' | 'NoSearchResults' | 'SuccessOperation';
|
|
17
18
|
export interface UIFactory<H extends string = CommonIssueCategory, T extends string = string> {
|
|
18
19
|
onCreateDB?: HandleCreateDB;
|
|
@@ -34,6 +35,8 @@ export interface UIFactory<H extends string = CommonIssueCategory, T extends str
|
|
|
34
35
|
renderNodeTooltipActions?: RenderNodeTooltipActions;
|
|
35
36
|
clusterOrDatabaseAccessError?: Partial<EmptyStateProps>;
|
|
36
37
|
enableMultiTabQueryEditor?: boolean;
|
|
38
|
+
/** Creates a fresh computation-graph layout worker for each layout run. */
|
|
39
|
+
createGraphLayoutWorker?: CreateGraphLayoutWorker;
|
|
37
40
|
healthcheck: {
|
|
38
41
|
issueCategories: ReadonlyArray<H>;
|
|
39
42
|
isIssueTypeOfCategory: (type: string, category: H) => boolean;
|
|
@@ -4,7 +4,7 @@ import { EFlag } from '../../types/api/enums';
|
|
|
4
4
|
import type { TVDiskStateInfo, TVSlotId } from '../../types/api/vdisk';
|
|
5
5
|
import type { DiskColor, PreparedVDisk } from './types';
|
|
6
6
|
export declare function isFullVDiskData(disk: PreparedVDisk | TVDiskStateInfo | TVSlotId): disk is PreparedVDisk | TVDiskStateInfo;
|
|
7
|
-
export declare const getSpaceSeverity: (allocatedPercent?: number) =>
|
|
7
|
+
export declare const getSpaceSeverity: (allocatedPercent?: number) => 9 | 13 | 14 | 15 | 8 | 16 | 12 | 20 | 22 | 6 | 7 | 10 | 11 | 17 | 18 | 19 | 21 | import("./types").DataSeverity;
|
|
8
8
|
/**
|
|
9
9
|
* Convert data severity (0-5) to EFlag color.
|
|
10
10
|
* Used for PreparedVDisk.Severity and PreparedPDisk.Severity in Default mode.
|
|
@@ -21,7 +21,7 @@ export declare function getDataSeverityColor(severity: number | undefined): EFla
|
|
|
21
21
|
* @returns Disk color for visualization
|
|
22
22
|
*/
|
|
23
23
|
export declare function getDisplaySeverityColor(severity: number | undefined): DiskColor;
|
|
24
|
-
export declare function getColorSeverity(color?: EFlag): 0 | 1 |
|
|
24
|
+
export declare function getColorSeverity(color?: EFlag): 0 | 1 | 3 | 4 | 9 | 13 | 14 | 15 | 8 | 16 | 2 | 12 | 20 | 22 | 5 | 6 | 7 | 10 | 11 | 17 | 18 | 19 | 21;
|
|
25
25
|
export declare function getPDiskId({ nodeId, pDiskId, }: {
|
|
26
26
|
nodeId?: string | number | null;
|
|
27
27
|
pDiskId?: string | number | null;
|
|
@@ -2,8 +2,8 @@ export declare const useChangedQuerySettings: () => {
|
|
|
2
2
|
isBannerShown: boolean;
|
|
3
3
|
closeBanner: () => void;
|
|
4
4
|
resetBanner: () => void;
|
|
5
|
-
changedCurrentSettings: ("
|
|
5
|
+
changedCurrentSettings: ("queryMode" | "transactionMode" | "statisticsMode" | "tracingLevel" | "timeout" | "limitRows" | "outputChunkMaxSize" | "pragmas" | "resourcePool")[];
|
|
6
6
|
changedCurrentSettingsDescriptions: Record<string, string>;
|
|
7
|
-
changedLastExecutionSettings: ("
|
|
7
|
+
changedLastExecutionSettings: ("queryMode" | "transactionMode" | "statisticsMode" | "tracingLevel" | "timeout" | "limitRows" | "outputChunkMaxSize" | "pragmas" | "resourcePool")[];
|
|
8
8
|
changedLastExecutionSettingsDescriptions: Record<string, string>;
|
|
9
9
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const useLastQueryExecutionSettings: () => readonly [{
|
|
2
|
-
queryMode: "
|
|
2
|
+
queryMode: "scan" | "script" | "data" | "query";
|
|
3
3
|
transactionMode: "serializable-read-write" | "stale-read-only" | "online-read-only" | "snapshot-read-only" | "snapshot-read-write" | "implicit";
|
|
4
4
|
statisticsMode: "none" | "basic" | "full" | "profile";
|
|
5
5
|
tracingLevel: "basic" | "off" | "toplevel" | "detailed" | "diagnostic" | "trace";
|
|
@@ -9,7 +9,7 @@ export declare const useLastQueryExecutionSettings: () => readonly [{
|
|
|
9
9
|
limitRows?: number | undefined;
|
|
10
10
|
outputChunkMaxSize?: number | undefined;
|
|
11
11
|
} | undefined, (value: {
|
|
12
|
-
queryMode: "
|
|
12
|
+
queryMode: "scan" | "script" | "data" | "query";
|
|
13
13
|
transactionMode: "serializable-read-write" | "stale-read-only" | "online-read-only" | "snapshot-read-only" | "snapshot-read-write" | "implicit";
|
|
14
14
|
statisticsMode: "none" | "basic" | "full" | "profile";
|
|
15
15
|
tracingLevel: "basic" | "off" | "toplevel" | "detailed" | "diagnostic" | "trace";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const useQueryExecutionSettings: () => readonly [{
|
|
2
|
-
queryMode: "
|
|
2
|
+
queryMode: "scan" | "script" | "data" | "query";
|
|
3
3
|
transactionMode: "serializable-read-write" | "stale-read-only" | "online-read-only" | "snapshot-read-only" | "snapshot-read-write" | "implicit";
|
|
4
4
|
statisticsMode: "none" | "basic" | "full" | "profile";
|
|
5
5
|
tracingLevel: "basic" | "off" | "toplevel" | "detailed" | "diagnostic" | "trace";
|
|
@@ -9,7 +9,7 @@ export declare const useQueryExecutionSettings: () => readonly [{
|
|
|
9
9
|
limitRows?: number | undefined;
|
|
10
10
|
outputChunkMaxSize?: number | undefined;
|
|
11
11
|
}, (value: {
|
|
12
|
-
queryMode: "
|
|
12
|
+
queryMode: "scan" | "script" | "data" | "query";
|
|
13
13
|
transactionMode: "serializable-read-write" | "stale-read-only" | "online-read-only" | "snapshot-read-only" | "snapshot-read-write" | "implicit";
|
|
14
14
|
statisticsMode: "none" | "basic" | "full" | "profile";
|
|
15
15
|
tracingLevel: "basic" | "off" | "toplevel" | "detailed" | "diagnostic" | "trace";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { ExplainPlanNodeData, GraphNode, Link } from '
|
|
2
|
-
import type { SimplifiedPlanItem } from '../store/reducers/query/types';
|
|
1
|
+
import type { ExplainPlanNodeData, GraphNode, Link, SimplifiedPlanItem } from '../store/reducers/query/types';
|
|
3
2
|
import type { PlanNode, SimplifiedNode } from '../types/api/query';
|
|
4
3
|
export declare function preparePlan(plan: PlanNode): {
|
|
5
4
|
nodes: GraphNode<ExplainPlanNodeData>[];
|
|
@@ -67,11 +67,18 @@ function getNodeType(plan) {
|
|
|
67
67
|
export function preparePlan(plan) {
|
|
68
68
|
const nodes = [];
|
|
69
69
|
const links = [];
|
|
70
|
+
let generatedNodeId = 0;
|
|
71
|
+
const getGraphNodeId = (node) => {
|
|
72
|
+
return node.PlanNodeId === undefined
|
|
73
|
+
? `generated-plan-node:${generatedNodeId++}`
|
|
74
|
+
: String(node.PlanNodeId);
|
|
75
|
+
};
|
|
70
76
|
function parsePlans(plans = [], from) {
|
|
71
77
|
plans.forEach((p) => {
|
|
72
78
|
var _a;
|
|
79
|
+
const nodeId = getGraphNodeId(p);
|
|
73
80
|
const node = {
|
|
74
|
-
name:
|
|
81
|
+
name: nodeId,
|
|
75
82
|
data: {
|
|
76
83
|
id: p.PlanNodeId,
|
|
77
84
|
type: getNodeType(p),
|
|
@@ -87,8 +94,9 @@ export function preparePlan(plan) {
|
|
|
87
94
|
});
|
|
88
95
|
}
|
|
89
96
|
const rootPlan = plan;
|
|
97
|
+
const rootNodeId = getGraphNodeId(rootPlan);
|
|
90
98
|
const rootNode = {
|
|
91
|
-
name:
|
|
99
|
+
name: rootNodeId,
|
|
92
100
|
data: {
|
|
93
101
|
id: rootPlan.PlanNodeId,
|
|
94
102
|
type: getNodeType(rootPlan),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepareQueryExplain.js","sourceRoot":"","sources":["../../src/utils/prepareQueryExplain.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prepareQueryExplain.js","sourceRoot":"","sources":["../../src/utils/prepareQueryExplain.ts"],"names":[],"mappings":"AAWA,MAAM,2BAA2B,GAAG,IAAI,GAAG,CAAC,CAAC,YAAY,EAAE,cAAc,EAAE,WA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AI;gBACJ,eAAe,EAAE,IAAI;gBACrB,IAAI;gBACJ,KAAK;gBACL,KAAK;gBACL,KAAK;gBACL,KAAK;gBACL,QAAQ,EAAE,EAAE;aACf,CAAC;YAEF,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAEvB,IAAI,KAAK,EAAE,CAAC;gBACR,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;oBACzC,KAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAC,CAAC,CAAC;gBAC7D,CAAC;YACL,CAAC;QACL,CAAC;aAAM,IAAI,KAAK,EAAE,CAAC;YACf,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBACzC,KAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAC,CAAC,CAAC;YACrD,CAAC;QACL,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
package/dist/utils/query.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export declare const QUERY_MODES_TITLES: Record<QueryMode, string>;
|
|
|
43
43
|
export declare const QUERY_SYNTAX: {
|
|
44
44
|
readonly yql: "yql_v1";
|
|
45
45
|
};
|
|
46
|
-
export declare const getColumnType: (type: string) => "
|
|
46
|
+
export declare const getColumnType: (type: string) => "string" | "number" | "boolean" | "date" | "binary-string" | undefined;
|
|
47
47
|
/** parse response result from ArrayRow to KeyValueRow and format values */
|
|
48
48
|
export declare const parseResult: (rows: ArrayRow[], columns: ColumnType[]) => KeyValueRow[];
|
|
49
49
|
type UnsupportedQueryResponseFormat = Array<unknown> | string | null | undefined | {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ydb-embedded-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "21.0.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"src"
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"@gravity-ui/components": "^4.18.0",
|
|
23
23
|
"@gravity-ui/date-components": "^3.2.3",
|
|
24
24
|
"@gravity-ui/date-utils": "^2.5.6",
|
|
25
|
+
"@gravity-ui/graph": "^1.11.3",
|
|
25
26
|
"@gravity-ui/i18n": "^1.7.0",
|
|
26
27
|
"@gravity-ui/icons": "^2.21.0",
|
|
27
28
|
"@gravity-ui/illustrations": "^2.1.0",
|
|
28
29
|
"@gravity-ui/navigation": "^4.0.18",
|
|
29
|
-
"@gravity-ui/paranoid": "^3.0.0",
|
|
30
30
|
"@gravity-ui/react-data-table": "^2.2.1",
|
|
31
31
|
"@gravity-ui/react-unipika": "^0.5.2",
|
|
32
32
|
"@gravity-ui/table": "^1.10.1",
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ArrowsExpandHorizontal,
|
|
3
|
+
DatabaseFill,
|
|
4
|
+
GripHorizontal,
|
|
5
|
+
MapPin,
|
|
6
|
+
Shuffle,
|
|
7
|
+
} from '@gravity-ui/icons';
|
|
8
|
+
import {Icon} from '@gravity-ui/uikit';
|
|
9
|
+
import type {IconData} from '@gravity-ui/uikit';
|
|
10
|
+
|
|
11
|
+
import {TooltipComponent} from '../TooltipComponent';
|
|
12
|
+
import type {ExtendedTBlock} from '../types';
|
|
13
|
+
|
|
14
|
+
type Props = {
|
|
15
|
+
block: ExtendedTBlock;
|
|
16
|
+
className: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const getIcon = (name: string): IconData | undefined => {
|
|
20
|
+
switch (name) {
|
|
21
|
+
case 'Merge':
|
|
22
|
+
return DatabaseFill;
|
|
23
|
+
case 'UnionAll':
|
|
24
|
+
return GripHorizontal;
|
|
25
|
+
case 'HashShuffle':
|
|
26
|
+
return Shuffle;
|
|
27
|
+
case 'Map':
|
|
28
|
+
return MapPin;
|
|
29
|
+
case 'Broadcast':
|
|
30
|
+
return ArrowsExpandHorizontal;
|
|
31
|
+
default:
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const ConnectionBlockComponent = ({className, block}: Props) => {
|
|
37
|
+
const icon = getIcon(block.name);
|
|
38
|
+
const content = (
|
|
39
|
+
<div className={className}>
|
|
40
|
+
{icon && <Icon data={icon} />} {block.name}
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
if (!block.stats?.length) {
|
|
45
|
+
return content;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return <TooltipComponent block={block}>{content}</TooltipComponent>;
|
|
49
|
+
};
|