ydb-embedded-ui 6.3.0 → 6.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +39 -17
- package/dist/assets/icons/disableFullscreen.svg +4 -0
- package/dist/assets/icons/emptyState.svg +13 -0
- package/dist/assets/icons/key.svg +6 -0
- package/dist/assets/icons/monitoring.svg +9 -0
- package/dist/assets/icons/network.svg +21 -0
- package/dist/components/AsyncReplicationState/AsyncReplicationState.d.ts +6 -0
- package/dist/components/AsyncReplicationState/AsyncReplicationState.js +20 -0
- package/dist/components/AsyncReplicationState/index.d.ts +1 -0
- package/dist/components/AsyncReplicationState/index.js +1 -0
- package/dist/components/BasicNodeViewer/BasicNodeViewer.js +11 -5
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.d.ts +6 -2
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js +12 -3
- package/dist/components/CriticalActionDialog/CriticalActionDialog.js +3 -4
- package/dist/components/CriticalActionDialog/CriticalActionDialog.scss +2 -0
- package/dist/components/EmptyState/EmptyState.js +3 -2
- package/dist/components/EnableFullscreenButton/EnableFullscreenButton.js +3 -3
- package/dist/components/Errors/ResponseError/ResponseError.js +3 -0
- package/dist/components/Fullscreen/Fullscreen.js +3 -3
- package/dist/components/MonitoringButton/MonitoringButton.js +3 -3
- package/dist/components/NodeHostWrapper/NodeHostWrapper.js +3 -3
- package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/QueryExecutionStatus/QueryExecutionStatus.d.ts +1 -2
- package/dist/components/QueryExecutionStatus/QueryExecutionStatus.js +6 -6
- package/dist/components/StatusIcon/StatusIcon.js +5 -7
- package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
- package/dist/containers/App/App.js +1 -2
- package/dist/containers/AsideNavigation/AsideNavigation.js +4 -9
- package/dist/containers/AsideNavigation/YdbInternalUser/YdbInternalUser.js +2 -3
- package/dist/containers/AsideNavigation/useNavigationMenuItems.js +5 -6
- package/dist/containers/Authentication/Authentication.js +2 -4
- package/dist/containers/Clusters/Clusters.js +7 -2
- package/dist/containers/Clusters/constants.d.ts +1 -3
- package/dist/containers/Clusters/constants.js +0 -18
- package/dist/containers/Node/NodeStructure/Pdisk.js +4 -4
- package/dist/containers/Nodes/Nodes.js +19 -15
- package/dist/containers/Nodes/VirtualNodes.js +23 -6
- package/dist/containers/PDiskPage/PDiskPage.js +3 -2
- package/dist/containers/PDiskPage/i18n/en.json +2 -1
- package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/Storage.js +50 -22
- package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js +2 -2
- package/dist/containers/Storage/VirtualStorage.js +32 -10
- package/dist/containers/Storage/utils/index.d.ts +4 -1
- package/dist/containers/Storage/utils/index.js +29 -0
- package/dist/containers/Tablet/Tablet.js +3 -3
- package/dist/containers/Tablet/TabletControls/TabletControls.js +3 -1
- package/dist/containers/Tablet/i18n/en.json +3 -0
- package/dist/containers/Tablet/i18n/index.d.ts +1 -1
- package/dist/containers/Tablet/i18n/index.js +1 -2
- package/dist/containers/Tablets/Tablets.d.ts +1 -2
- package/dist/containers/Tablets/Tablets.js +113 -53
- package/dist/containers/Tablets/i18n/en.json +10 -4
- package/dist/containers/Tablets/i18n/index.d.ts +1 -1
- package/dist/containers/Tablets/i18n/index.js +1 -2
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js +5 -5
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +2 -0
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +31 -19
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.scss +14 -4
- package/dist/containers/Tenant/Diagnostics/HotKeys/i18n/en.json +2 -1
- package/dist/containers/Tenant/Diagnostics/HotKeys/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Network/Network.js +3 -3
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/AsyncReplicationInfo.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/AsyncReplicationInfo.js +39 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/Credentials.d.ts +6 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/Credentials.js +14 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/i18n/en.json +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/i18n/index.js +4 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/index.d.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/index.js +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.js +34 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.scss +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/en.json +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/index.js +4 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/index.d.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/index.js +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +2 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.js +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +2 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js +2 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.js +2 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +3 -3
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +3 -3
- package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.js +2 -8
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +23 -9
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.d.ts +2 -2
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +5 -6
- package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +6 -14
- package/dist/containers/Tenant/Query/Issues/Issues.js +6 -9
- package/dist/containers/Tenant/Query/Preview/Preview.js +5 -5
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +2 -8
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +18 -19
- package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +4 -4
- package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js +3 -3
- package/dist/containers/Tenant/Schema/SchemaViewer/helpers.js +3 -2
- package/dist/containers/Tenant/Tenant.js +3 -2
- package/dist/containers/Tenant/utils/ToggleButton.scss +0 -2
- package/dist/containers/Tenant/utils/paneVisibilityToggleHelpers.js +4 -4
- package/dist/containers/Tenant/utils/schema.js +8 -0
- package/dist/containers/Tenant/utils/schemaActions.js +1 -0
- package/dist/containers/Tenant/utils/schemaControls.js +4 -3
- package/dist/containers/VDiskPage/VDiskPage.js +3 -2
- package/dist/containers/VDiskPage/i18n/en.json +2 -1
- package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/services/api.d.ts +3 -3
- package/dist/services/settings.d.ts +19 -1
- package/dist/services/settings.js +2 -1
- package/dist/store/configureStore.d.ts +0 -12
- package/dist/store/defaultStore.d.ts +0 -6
- package/dist/store/reducers/authentication/authentication.d.ts +187 -13
- package/dist/store/reducers/authentication/authentication.js +12 -3
- package/dist/store/reducers/authentication/types.d.ts +5 -1
- package/dist/store/reducers/cluster/cluster.js +4 -0
- package/dist/store/reducers/executeQuery.d.ts +4 -65
- package/dist/store/reducers/executeQuery.js +38 -34
- package/dist/store/reducers/executeTopQueries/executeTopQueries.js +4 -1
- package/dist/store/reducers/explainQuery/explainQuery.d.ts +9 -0
- package/dist/store/reducers/explainQuery/explainQuery.js +32 -0
- package/dist/store/reducers/explainQuery/types.d.ts +12 -0
- package/dist/store/reducers/explainQuery/utils.d.ts +6 -0
- package/dist/store/reducers/explainQuery/utils.js +40 -0
- package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +0 -60
- package/dist/store/reducers/host.d.ts +61 -4
- package/dist/store/reducers/index.d.ts +0 -9
- package/dist/store/reducers/index.js +0 -6
- package/dist/store/reducers/node/selectors.d.ts +0 -3
- package/dist/store/reducers/nodes/nodes.d.ts +1 -5
- package/dist/store/reducers/nodes/nodes.js +0 -27
- package/dist/store/reducers/nodes/types.d.ts +4 -13
- package/dist/store/reducers/nodesList.d.ts +0 -3
- package/dist/store/reducers/olapStats.js +4 -1
- package/dist/store/reducers/preview.js +4 -1
- package/dist/store/reducers/schema/schema.d.ts +61 -4
- package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +61 -4
- package/dist/store/reducers/shardsWorkload/shardsWorkload.js +4 -1
- package/dist/store/reducers/storage/selectors.d.ts +2 -17
- package/dist/store/reducers/storage/selectors.js +1 -36
- package/dist/store/reducers/storage/storage.d.ts +2 -6
- package/dist/store/reducers/storage/storage.js +0 -44
- package/dist/store/reducers/storage/types.d.ts +15 -22
- package/dist/store/reducers/storage/types.js +4 -1
- package/dist/store/reducers/tablets.d.ts +91 -1
- package/dist/store/reducers/tablets.js +16 -1
- package/dist/store/reducers/tabletsFilters.d.ts +61 -4
- package/dist/store/reducers/tenant/tenant.d.ts +2 -2
- package/dist/store/reducers/tenant/tenant.js +10 -1
- package/dist/store/reducers/tenant/types.d.ts +8 -3
- package/dist/store/reducers/tenant/types.js +3 -1
- package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.js +6 -3
- package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.js +6 -3
- package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js +6 -3
- package/dist/store/reducers/tenants/selectors.d.ts +0 -27
- package/dist/store/reducers/tenants/utils.d.ts +4 -4
- package/dist/store/reducers/tenants/utils.js +8 -8
- package/dist/store/reducers/topic.d.ts +0 -45
- package/dist/store/state-url-mapping.js +0 -22
- package/dist/store/utils.d.ts +2 -3
- package/dist/store/utils.js +1 -1
- package/dist/types/api/schema/replication.d.ts +74 -0
- package/dist/types/api/schema/replication.js +7 -0
- package/dist/types/api/schema/schema.d.ts +4 -1
- package/dist/types/api/schema/schema.js +1 -0
- package/dist/types/api/whoami.d.ts +6 -0
- package/dist/types/store/executeQuery.d.ts +2 -9
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/constants.js +1 -0
- package/dist/utils/monaco/yql/constants.d.ts +2 -0
- package/dist/utils/monaco/yql/constants.js +33 -0
- package/dist/utils/monaco/yql/generateSuggestions.d.ts +1 -0
- package/dist/utils/monaco/yql/generateSuggestions.js +28 -11
- package/dist/utils/monaco/yql/yqlSuggestions.js +6 -1
- package/dist/utils/nodes.d.ts +2 -0
- package/dist/utils/nodes.js +4 -0
- package/dist/utils/query.d.ts +5 -3
- package/dist/utils/query.js +27 -4
- package/dist/utils/response.d.ts +4 -0
- package/dist/utils/response.js +9 -0
- package/dist/utils/tablet.d.ts +2 -0
- package/dist/utils/tablet.js +14 -0
- package/package.json +4 -3
- package/dist/assets/icons/bug.svg +0 -1
- package/dist/assets/icons/circle-exclamation.svg +0 -1
- package/dist/assets/icons/circle-info.svg +0 -1
- package/dist/assets/icons/circle-xmark.svg +0 -1
- package/dist/assets/icons/close.svg +0 -1
- package/dist/assets/icons/control-menu-button.svg +0 -1
- package/dist/assets/icons/dots.svg +0 -1
- package/dist/assets/icons/hide.svg +0 -1
- package/dist/assets/icons/question.svg +0 -1
- package/dist/assets/icons/server.svg +0 -1
- package/dist/assets/icons/settings-with-dot.svg +0 -1
- package/dist/assets/icons/settings.svg +0 -1
- package/dist/assets/icons/shield.svg +0 -3
- package/dist/assets/icons/show.svg +0 -1
- package/dist/assets/icons/signIn.svg +0 -1
- package/dist/assets/icons/signOut.svg +0 -1
- package/dist/assets/icons/storage.svg +0 -1
- package/dist/assets/icons/support.svg +0 -1
- package/dist/assets/icons/triangle-exclamation.svg +0 -1
- package/dist/assets/icons/update-arrow.svg +0 -6
- package/dist/components/Icon/Icon.d.ts +0 -14
- package/dist/components/Icon/Icon.js +0 -16
- package/dist/components/Icon/index.d.ts +0 -1
- package/dist/components/Icon/index.js +0 -1
- package/dist/containers/AppIcons/AppIcons.d.ts +0 -2
- package/dist/containers/AppIcons/AppIcons.js +0 -9
- package/dist/containers/Tablet/i18n/ru.json +0 -10
- package/dist/containers/Tablets/Tablets.scss +0 -35
- package/dist/containers/Tablets/i18n/ru.json +0 -6
- package/dist/store/reducers/explainQuery.d.ts +0 -149
- package/dist/store/reducers/explainQuery.js +0 -94
- package/dist/types/store/explainQuery.d.ts +0 -27
- package/dist/utils/error.d.ts +0 -2
- package/dist/utils/error.js +0 -13
- /package/dist/{types/store/explainQuery.js → store/reducers/explainQuery/types.js} +0 -0
@@ -1,149 +0,0 @@
|
|
1
|
-
import type { Reducer } from '@reduxjs/toolkit';
|
2
|
-
import type { ExplainQueryAction, ExplainQueryState, PreparedExplainResponse } from '../../types/store/explainQuery';
|
3
|
-
import type { QueryMode, QueryRequestParams } from '../../types/store/query';
|
4
|
-
export declare const GET_EXPLAIN_QUERY: {
|
5
|
-
readonly REQUEST: "query/GET_EXPLAIN_QUERY_REQUEST";
|
6
|
-
readonly SUCCESS: "query/GET_EXPLAIN_QUERY_SUCCESS";
|
7
|
-
readonly FAILURE: "query/GET_EXPLAIN_QUERY_FAILURE";
|
8
|
-
};
|
9
|
-
export declare const GET_EXPLAIN_QUERY_AST: {
|
10
|
-
readonly REQUEST: "query/GET_EXPLAIN_QUERY_AST_REQUEST";
|
11
|
-
readonly SUCCESS: "query/GET_EXPLAIN_QUERY_AST_SUCCESS";
|
12
|
-
readonly FAILURE: "query/GET_EXPLAIN_QUERY_AST_FAILURE";
|
13
|
-
};
|
14
|
-
declare const explainQuery: Reducer<ExplainQueryState, ExplainQueryAction>;
|
15
|
-
export declare const getExplainQueryAst: ({ query, database }: QueryRequestParams) => (dispatch: import("redux").Dispatch<import("redux").UnknownAction>, getState: () => {
|
16
|
-
api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
|
17
|
-
singleClusterMode: boolean;
|
18
|
-
nodes: import("./nodes/types").NodesState;
|
19
|
-
cluster: import("./cluster/types").ClusterState;
|
20
|
-
tenant: import("./tenant/types").TenantState;
|
21
|
-
storage: import("./storage/types").StorageState;
|
22
|
-
tooltip: import("../../types/store/tooltip").ITooltipState;
|
23
|
-
tablets: import("../../types/store/tablets").TabletsState;
|
24
|
-
schema: import("./schema/types").SchemaState;
|
25
|
-
host: import("../../types/store/host").IHostState;
|
26
|
-
tenants: import("./tenants/types").TenantsState;
|
27
|
-
partitions: import("./partitions/types").PartitionsState;
|
28
|
-
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
29
|
-
explainQuery: ExplainQueryState;
|
30
|
-
tabletsFilters: {
|
31
|
-
loading: boolean;
|
32
|
-
requestTime: number;
|
33
|
-
data: undefined;
|
34
|
-
wasLoaded: boolean;
|
35
|
-
stateFilter: never[];
|
36
|
-
typeFilter: never[];
|
37
|
-
} | {
|
38
|
-
tabletsData: any;
|
39
|
-
nodes: any;
|
40
|
-
loading: boolean;
|
41
|
-
wasLoaded: boolean;
|
42
|
-
timeoutForRequest: number;
|
43
|
-
error: undefined;
|
44
|
-
data: undefined;
|
45
|
-
stateFilter: never[];
|
46
|
-
typeFilter: never[];
|
47
|
-
} | {
|
48
|
-
error: any;
|
49
|
-
loading: boolean;
|
50
|
-
data: undefined;
|
51
|
-
wasLoaded: boolean;
|
52
|
-
stateFilter: never[];
|
53
|
-
typeFilter: never[];
|
54
|
-
} | {
|
55
|
-
stateFilter: any;
|
56
|
-
data: undefined;
|
57
|
-
loading: boolean;
|
58
|
-
wasLoaded: boolean;
|
59
|
-
typeFilter: never[];
|
60
|
-
} | {
|
61
|
-
typeFilter: any;
|
62
|
-
data: undefined;
|
63
|
-
loading: boolean;
|
64
|
-
wasLoaded: boolean;
|
65
|
-
stateFilter: never[];
|
66
|
-
};
|
67
|
-
heatmap: import("../../types/store/heatmap").IHeatmapState;
|
68
|
-
settings: import("./settings/types").SettingsState;
|
69
|
-
schemaAcl: import("./schemaAcl/types").SchemaAclState;
|
70
|
-
executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
|
71
|
-
shardsWorkload: import("./shardsWorkload/types").ShardsWorkloadFilters;
|
72
|
-
hotKeys: import("./hotKeys/types").HotKeysState;
|
73
|
-
authentication: import("./authentication/types").AuthenticationState;
|
74
|
-
header: import("./header/types").HeaderState;
|
75
|
-
saveQuery: string | null;
|
76
|
-
fullscreen: boolean;
|
77
|
-
clusters: import("./clusters/types").ClustersFilters;
|
78
|
-
}) => Promise<import("../../types/store/query").IQueryResult | undefined>;
|
79
|
-
export declare const explainVersions: {
|
80
|
-
v2: string;
|
81
|
-
};
|
82
|
-
interface ExplainQueryParams extends QueryRequestParams {
|
83
|
-
mode?: QueryMode;
|
84
|
-
}
|
85
|
-
export declare const getExplainQuery: ({ query, database, mode }: ExplainQueryParams) => (dispatch: import("redux").Dispatch<import("redux").UnknownAction>, getState: () => {
|
86
|
-
api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
|
87
|
-
singleClusterMode: boolean;
|
88
|
-
nodes: import("./nodes/types").NodesState;
|
89
|
-
cluster: import("./cluster/types").ClusterState;
|
90
|
-
tenant: import("./tenant/types").TenantState;
|
91
|
-
storage: import("./storage/types").StorageState;
|
92
|
-
tooltip: import("../../types/store/tooltip").ITooltipState;
|
93
|
-
tablets: import("../../types/store/tablets").TabletsState;
|
94
|
-
schema: import("./schema/types").SchemaState;
|
95
|
-
host: import("../../types/store/host").IHostState;
|
96
|
-
tenants: import("./tenants/types").TenantsState;
|
97
|
-
partitions: import("./partitions/types").PartitionsState;
|
98
|
-
executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
|
99
|
-
explainQuery: ExplainQueryState;
|
100
|
-
tabletsFilters: {
|
101
|
-
loading: boolean;
|
102
|
-
requestTime: number;
|
103
|
-
data: undefined;
|
104
|
-
wasLoaded: boolean;
|
105
|
-
stateFilter: never[];
|
106
|
-
typeFilter: never[];
|
107
|
-
} | {
|
108
|
-
tabletsData: any;
|
109
|
-
nodes: any;
|
110
|
-
loading: boolean;
|
111
|
-
wasLoaded: boolean;
|
112
|
-
timeoutForRequest: number;
|
113
|
-
error: undefined;
|
114
|
-
data: undefined;
|
115
|
-
stateFilter: never[];
|
116
|
-
typeFilter: never[];
|
117
|
-
} | {
|
118
|
-
error: any;
|
119
|
-
loading: boolean;
|
120
|
-
data: undefined;
|
121
|
-
wasLoaded: boolean;
|
122
|
-
stateFilter: never[];
|
123
|
-
typeFilter: never[];
|
124
|
-
} | {
|
125
|
-
stateFilter: any;
|
126
|
-
data: undefined;
|
127
|
-
loading: boolean;
|
128
|
-
wasLoaded: boolean;
|
129
|
-
typeFilter: never[];
|
130
|
-
} | {
|
131
|
-
typeFilter: any;
|
132
|
-
data: undefined;
|
133
|
-
loading: boolean;
|
134
|
-
wasLoaded: boolean;
|
135
|
-
stateFilter: never[];
|
136
|
-
};
|
137
|
-
heatmap: import("../../types/store/heatmap").IHeatmapState;
|
138
|
-
settings: import("./settings/types").SettingsState;
|
139
|
-
schemaAcl: import("./schemaAcl/types").SchemaAclState;
|
140
|
-
executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
|
141
|
-
shardsWorkload: import("./shardsWorkload/types").ShardsWorkloadFilters;
|
142
|
-
hotKeys: import("./hotKeys/types").HotKeysState;
|
143
|
-
authentication: import("./authentication/types").AuthenticationState;
|
144
|
-
header: import("./header/types").HeaderState;
|
145
|
-
saveQuery: string | null;
|
146
|
-
fullscreen: boolean;
|
147
|
-
clusters: import("./clusters/types").ClustersFilters;
|
148
|
-
}) => Promise<PreparedExplainResponse | undefined>;
|
149
|
-
export default explainQuery;
|
@@ -1,94 +0,0 @@
|
|
1
|
-
import { parseQueryError } from '../../utils/error';
|
2
|
-
import { preparePlan } from '../../utils/prepareQueryExplain';
|
3
|
-
import { QUERY_SYNTAX, parseQueryAPIExplainResponse, parseQueryExplainPlan } from '../../utils/query';
|
4
|
-
import { createApiRequest, createRequestActionTypes } from '../utils';
|
5
|
-
export const GET_EXPLAIN_QUERY = createRequestActionTypes('query', 'GET_EXPLAIN_QUERY');
|
6
|
-
export const GET_EXPLAIN_QUERY_AST = createRequestActionTypes('query', 'GET_EXPLAIN_QUERY_AST');
|
7
|
-
const initialState = {
|
8
|
-
loading: false,
|
9
|
-
};
|
10
|
-
const explainQuery = (state = initialState, action) => {
|
11
|
-
switch (action.type) {
|
12
|
-
case GET_EXPLAIN_QUERY.REQUEST: {
|
13
|
-
return Object.assign(Object.assign({}, state), { loading: true, data: undefined, error: undefined, dataAst: undefined, errorAst: undefined });
|
14
|
-
}
|
15
|
-
case GET_EXPLAIN_QUERY.SUCCESS: {
|
16
|
-
return Object.assign(Object.assign({}, state), { data: action.data.plan, dataAst: action.data.ast, loading: false, error: undefined });
|
17
|
-
}
|
18
|
-
case GET_EXPLAIN_QUERY.FAILURE: {
|
19
|
-
return Object.assign(Object.assign({}, state), { error: parseQueryError(action.error), loading: false });
|
20
|
-
}
|
21
|
-
case GET_EXPLAIN_QUERY_AST.REQUEST: {
|
22
|
-
return Object.assign(Object.assign({}, state), { loadingAst: true, dataAst: undefined, errorAst: undefined });
|
23
|
-
}
|
24
|
-
case GET_EXPLAIN_QUERY_AST.SUCCESS: {
|
25
|
-
return Object.assign(Object.assign({}, state), { dataAst: action.data.ast, loadingAst: false, error: undefined });
|
26
|
-
}
|
27
|
-
case GET_EXPLAIN_QUERY_AST.FAILURE: {
|
28
|
-
return Object.assign(Object.assign({}, state), { errorAst: parseQueryError(action.error), loadingAst: false });
|
29
|
-
}
|
30
|
-
default:
|
31
|
-
return state;
|
32
|
-
}
|
33
|
-
};
|
34
|
-
export const getExplainQueryAst = ({ query, database }) => {
|
35
|
-
return createApiRequest({
|
36
|
-
request: window.api.getExplainQueryAst(query, database),
|
37
|
-
actions: GET_EXPLAIN_QUERY_AST,
|
38
|
-
dataHandler: parseQueryAPIExplainResponse,
|
39
|
-
});
|
40
|
-
};
|
41
|
-
export const explainVersions = {
|
42
|
-
v2: '0.2',
|
43
|
-
};
|
44
|
-
const supportedExplainQueryVersions = Object.values(explainVersions);
|
45
|
-
export const getExplainQuery = ({ query, database, mode }) => {
|
46
|
-
let action = 'explain';
|
47
|
-
let syntax = QUERY_SYNTAX.yql;
|
48
|
-
if (mode === 'pg') {
|
49
|
-
action = 'explain-query';
|
50
|
-
syntax = QUERY_SYNTAX.pg;
|
51
|
-
}
|
52
|
-
else if (mode) {
|
53
|
-
action = `explain-${mode}`;
|
54
|
-
}
|
55
|
-
return createApiRequest({
|
56
|
-
request: window.api.getExplainQuery(query, database, action, syntax),
|
57
|
-
actions: GET_EXPLAIN_QUERY,
|
58
|
-
dataHandler: (response) => {
|
59
|
-
const { plan: rawPlan, ast } = parseQueryAPIExplainResponse(response);
|
60
|
-
if (!rawPlan) {
|
61
|
-
return { ast };
|
62
|
-
}
|
63
|
-
const { tables, meta, Plan } = parseQueryExplainPlan(rawPlan);
|
64
|
-
if (supportedExplainQueryVersions.indexOf(meta.version) === -1) {
|
65
|
-
// Do not prepare plan for not supported versions
|
66
|
-
return {
|
67
|
-
plan: {
|
68
|
-
pristine: rawPlan,
|
69
|
-
version: meta.version,
|
70
|
-
},
|
71
|
-
ast,
|
72
|
-
};
|
73
|
-
}
|
74
|
-
let links = [];
|
75
|
-
let nodes = [];
|
76
|
-
if (Plan) {
|
77
|
-
const preparedPlan = preparePlan(Plan);
|
78
|
-
links = preparedPlan.links;
|
79
|
-
nodes = preparedPlan.nodes;
|
80
|
-
}
|
81
|
-
return {
|
82
|
-
plan: {
|
83
|
-
links,
|
84
|
-
nodes,
|
85
|
-
tables,
|
86
|
-
version: meta.version,
|
87
|
-
pristine: rawPlan,
|
88
|
-
},
|
89
|
-
ast,
|
90
|
-
};
|
91
|
-
},
|
92
|
-
});
|
93
|
-
};
|
94
|
-
export default explainQuery;
|
@@ -1,27 +0,0 @@
|
|
1
|
-
import type { ExplainPlanNodeData, GraphNode, Link } from '@gravity-ui/paranoid';
|
2
|
-
import type { GET_EXPLAIN_QUERY, GET_EXPLAIN_QUERY_AST } from '../../store/reducers/explainQuery';
|
3
|
-
import type { ApiRequestAction } from '../../store/utils';
|
4
|
-
import type { PlanTable, QueryPlan, ScriptPlan } from '../api/query';
|
5
|
-
import type { IQueryResult, QueryError, QueryErrorResponse } from './query';
|
6
|
-
export interface PreparedExplainResponse {
|
7
|
-
plan?: {
|
8
|
-
links?: Link[];
|
9
|
-
nodes?: GraphNode<ExplainPlanNodeData>[];
|
10
|
-
tables?: PlanTable[];
|
11
|
-
version?: string;
|
12
|
-
pristine?: QueryPlan | ScriptPlan;
|
13
|
-
};
|
14
|
-
ast?: string;
|
15
|
-
}
|
16
|
-
export interface ExplainQueryState {
|
17
|
-
loading: boolean;
|
18
|
-
loadingAst?: boolean;
|
19
|
-
data?: PreparedExplainResponse['plan'];
|
20
|
-
dataAst?: PreparedExplainResponse['ast'];
|
21
|
-
error?: string | QueryErrorResponse;
|
22
|
-
errorAst?: string | QueryErrorResponse;
|
23
|
-
}
|
24
|
-
type GetExplainQueryAstAction = ApiRequestAction<typeof GET_EXPLAIN_QUERY_AST, IQueryResult, QueryError>;
|
25
|
-
type GetExplainQueryAction = ApiRequestAction<typeof GET_EXPLAIN_QUERY, PreparedExplainResponse, QueryError>;
|
26
|
-
export type ExplainQueryAction = GetExplainQueryAstAction | GetExplainQueryAction;
|
27
|
-
export {};
|
package/dist/utils/error.d.ts
DELETED
package/dist/utils/error.js
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
const isNetworkError = (error) => {
|
2
|
-
return Boolean(error &&
|
3
|
-
typeof error === 'object' &&
|
4
|
-
'message' in error &&
|
5
|
-
error.message === 'Network Error');
|
6
|
-
};
|
7
|
-
export const parseQueryError = (error) => {
|
8
|
-
if (isNetworkError(error)) {
|
9
|
-
return error.message;
|
10
|
-
}
|
11
|
-
// 401 Unauthorized error is handled by GenericAPI
|
12
|
-
return error !== null && error !== void 0 ? error : 'Unauthorized';
|
13
|
-
};
|
File without changes
|