ydb-embedded-ui 6.33.0 → 6.35.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/ConfirmationDialog/ConfirmationDialog.d.ts +21 -0
- package/dist/components/ConfirmationDialog/ConfirmationDialog.js +31 -0
- package/dist/components/ConfirmationDialog/ConfirmationDialog.js.map +1 -0
- package/dist/components/ConfirmationDialog/ConfirmationDialog.scss +6 -0
- package/dist/components/ConfirmationDialog/i18n/en.json +3 -0
- package/dist/components/ConfirmationDialog/i18n/index.d.ts +1 -0
- package/dist/components/ConfirmationDialog/i18n/index.js +5 -0
- package/dist/components/ConfirmationDialog/i18n/index.js.map +1 -0
- package/dist/components/EntityStatus/EntityStatus.js +1 -1
- package/dist/components/EntityStatus/EntityStatus.js.map +1 -1
- package/dist/components/MemoryViewer/MemoryViewer.d.ts +14 -0
- package/dist/components/MemoryViewer/MemoryViewer.js +84 -0
- package/dist/components/MemoryViewer/MemoryViewer.js.map +1 -0
- package/dist/components/MemoryViewer/MemoryViewer.scss +104 -0
- package/dist/components/MemoryViewer/i18n/en.json +11 -0
- package/dist/components/MemoryViewer/i18n/index.d.ts +2 -0
- package/dist/components/MemoryViewer/i18n/index.js +5 -0
- package/dist/components/MemoryViewer/i18n/index.js.map +1 -0
- package/dist/components/MemoryViewer/utils.d.ts +10 -0
- package/dist/components/MemoryViewer/utils.js +71 -0
- package/dist/components/MemoryViewer/utils.js.map +1 -0
- package/dist/components/NodeHostWrapper/NodeHostWrapper.d.ts +5 -3
- package/dist/components/NodeHostWrapper/NodeHostWrapper.js +3 -2
- package/dist/components/NodeHostWrapper/NodeHostWrapper.js.map +1 -1
- package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/ProgressViewer/ProgressViewer.d.ts +1 -1
- package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/nodesColumns/__test__/utils.test.d.ts +1 -0
- package/dist/components/nodesColumns/__test__/utils.test.js +28 -0
- package/dist/components/nodesColumns/__test__/utils.test.js.map +1 -0
- package/dist/components/nodesColumns/columns.d.ts +32 -9
- package/dist/components/nodesColumns/columns.js +91 -21
- package/dist/components/nodesColumns/columns.js.map +1 -1
- package/dist/components/nodesColumns/constants.d.ts +16 -5
- package/dist/components/nodesColumns/constants.js +114 -11
- package/dist/components/nodesColumns/constants.js.map +1 -1
- package/dist/components/nodesColumns/i18n/en.json +18 -5
- package/dist/components/nodesColumns/i18n/index.d.ts +1 -1
- package/dist/components/nodesColumns/utils.d.ts +2 -0
- package/dist/components/nodesColumns/utils.js +11 -0
- package/dist/components/nodesColumns/utils.js.map +1 -0
- package/dist/containers/App/App.d.ts +1 -1
- package/dist/containers/App/Providers.js +2 -1
- package/dist/containers/App/Providers.js.map +1 -1
- package/dist/containers/AsideNavigation/AsideNavigation.d.ts +2 -0
- package/dist/containers/AsideNavigation/AsideNavigation.js +2 -1
- package/dist/containers/AsideNavigation/AsideNavigation.js.map +1 -1
- package/dist/containers/Clusters/constants.d.ts +1 -1
- package/dist/containers/Nodes/Nodes.js +2 -2
- package/dist/containers/Nodes/Nodes.js.map +1 -1
- package/dist/containers/Nodes/NodesControls/NodesControls.d.ts +3 -1
- package/dist/containers/Nodes/NodesControls/NodesControls.js +3 -3
- package/dist/containers/Nodes/NodesControls/NodesControls.js.map +1 -1
- package/dist/containers/Nodes/PaginatedNodes.d.ts +11 -3
- package/dist/containers/Nodes/PaginatedNodes.js +16 -19
- package/dist/containers/Nodes/PaginatedNodes.js.map +1 -1
- package/dist/containers/Nodes/columns/columns.js +2 -2
- package/dist/containers/Nodes/columns/columns.js.map +1 -1
- package/dist/containers/Nodes/columns/constants.d.ts +3 -2
- package/dist/containers/Nodes/columns/constants.js +10 -10
- package/dist/containers/Nodes/columns/constants.js.map +1 -1
- package/dist/containers/Nodes/getNodes.js +4 -5
- package/dist/containers/Nodes/getNodes.js.map +1 -1
- package/dist/containers/Nodes/useNodesPageQueryParams.d.ts +3 -2
- package/dist/containers/Nodes/useNodesPageQueryParams.js +2 -2
- package/dist/containers/Nodes/useNodesPageQueryParams.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/columns/columns.js +3 -3
- package/dist/containers/Storage/StorageGroups/columns/columns.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/columns/constants.d.ts +3 -7
- package/dist/containers/Storage/StorageGroups/columns/constants.js +54 -10
- package/dist/containers/Storage/StorageGroups/columns/constants.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/getGroups.js +3 -5
- package/dist/containers/Storage/StorageGroups/getGroups.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/columns/columns.js +2 -3
- package/dist/containers/Storage/StorageNodes/columns/columns.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/columns/constants.js +2 -2
- package/dist/containers/Storage/StorageNodes/columns/constants.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/getNodes.js +4 -5
- package/dist/containers/Storage/StorageNodes/getNodes.js.map +1 -1
- package/dist/containers/Storage/utils/index.d.ts +1 -1
- package/dist/containers/Tablets/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js +2 -2
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/columns.d.ts +4 -0
- package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/columns.js +23 -0
- package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/columns.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/constants.d.ts +5 -0
- package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/constants.js +23 -0
- package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/constants.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/Network/NetworkWrapper.d.ts +6 -0
- package/dist/containers/Tenant/Diagnostics/Network/NetworkWrapper.js +26 -0
- package/dist/containers/Tenant/Diagnostics/Network/NetworkWrapper.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +1 -1
- package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.d.ts +2 -2
- package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.js +3 -2
- package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +3 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js +2 -7
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +3 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js.map +1 -1
- package/dist/containers/Tenant/ObjectSummary/SchemaTree/SchemaTree.js +5 -1
- package/dist/containers/Tenant/ObjectSummary/SchemaTree/SchemaTree.js.map +1 -1
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +5 -2
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js.map +1 -1
- package/dist/containers/Tenant/Query/ExecuteResult/PlanToSvgButton.d.ts +7 -0
- package/dist/containers/Tenant/Query/ExecuteResult/PlanToSvgButton.js +40 -0
- package/dist/containers/Tenant/Query/ExecuteResult/PlanToSvgButton.js.map +1 -0
- package/dist/containers/Tenant/Query/ExecuteResult/TraceButton.js +1 -1
- package/dist/containers/Tenant/Query/ExecuteResult/TraceButton.js.map +1 -1
- package/dist/containers/Tenant/Query/ExecuteResult/i18n/en.json +4 -1
- package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Query/NewSQL/NewSQL.js +8 -7
- package/dist/containers/Tenant/Query/NewSQL/NewSQL.js.map +1 -1
- package/dist/containers/Tenant/Query/NewSQL/i18n/en.json +1 -2
- package/dist/containers/Tenant/Query/NewSQL/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js +3 -1
- package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js.map +1 -1
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +2 -27
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +47 -52
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js.map +1 -1
- package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +1 -1
- package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js.map +1 -1
- package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.d.ts +18 -3
- package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.js +41 -15
- package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.js.map +1 -1
- package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js +8 -3
- package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js.map +1 -1
- package/dist/containers/Tenant/utils/newSQLQueryActions.d.ts +1 -2
- package/dist/containers/Tenant/utils/newSQLQueryActions.js +2 -4
- package/dist/containers/Tenant/utils/newSQLQueryActions.js.map +1 -1
- package/dist/containers/Tenant/utils/schemaActions.d.ts +1 -0
- package/dist/containers/Tenant/utils/schemaActions.js +61 -41
- package/dist/containers/Tenant/utils/schemaActions.js.map +1 -1
- package/dist/containers/Tenant/utils/schemaQueryTemplates.js +87 -54
- package/dist/containers/Tenant/utils/schemaQueryTemplates.js.map +1 -1
- package/dist/containers/UserSettings/i18n/en.json +3 -0
- package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
- package/dist/containers/UserSettings/settings.d.ts +2 -0
- package/dist/containers/UserSettings/settings.js +11 -2
- package/dist/containers/UserSettings/settings.js.map +1 -1
- package/dist/services/api.d.ts +4 -0
- package/dist/services/api.js +11 -0
- package/dist/services/api.js.map +1 -1
- package/dist/services/settings.d.ts +2 -0
- package/dist/services/settings.js +3 -1
- package/dist/services/settings.js.map +1 -1
- package/dist/store/configureStore.d.ts +37 -15
- package/dist/store/defaultStore.d.ts +18 -7
- package/dist/store/reducers/capabilities/capabilities.d.ts +72 -16
- package/dist/store/reducers/capabilities/hooks.d.ts +1 -0
- package/dist/store/reducers/capabilities/hooks.js +3 -0
- package/dist/store/reducers/capabilities/hooks.js.map +1 -1
- package/dist/store/reducers/cluster/cluster.d.ts +54 -12
- package/dist/store/reducers/executeQuery.d.ts +41 -51
- package/dist/store/reducers/executeQuery.js +64 -160
- package/dist/store/reducers/executeQuery.js.map +1 -1
- package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +180 -40
- package/dist/store/reducers/index.d.ts +28 -13
- package/dist/store/reducers/node/selectors.d.ts +9 -2
- package/dist/store/reducers/nodes/types.d.ts +13 -0
- package/dist/store/reducers/nodes/utils.d.ts +1 -1
- package/dist/store/reducers/nodes/utils.js +3 -3
- package/dist/store/reducers/nodes/utils.js.map +1 -1
- package/dist/store/reducers/nodesList.d.ts +9 -2
- package/dist/store/reducers/partitions/partitions.d.ts +4 -3
- package/dist/store/reducers/partitions/partitions.js +1 -3
- package/dist/store/reducers/partitions/partitions.js.map +1 -1
- package/dist/store/reducers/partitions/types.d.ts +0 -3
- package/dist/store/reducers/planToSvg.d.ts +8 -0
- package/dist/store/reducers/planToSvg.js +21 -0
- package/dist/store/reducers/planToSvg.js.map +1 -0
- package/dist/store/reducers/queryActions/queryActions.d.ts +0 -27
- package/dist/store/reducers/queryActions/queryActions.js +1 -1
- package/dist/store/reducers/queryActions/queryActions.js.map +1 -1
- package/dist/store/reducers/queryActions/types.d.ts +1 -1
- package/dist/store/reducers/schema/schema.d.ts +22 -7
- package/dist/store/reducers/schema/schema.js +16 -20
- package/dist/store/reducers/schema/schema.js.map +1 -1
- package/dist/store/reducers/tablets.d.ts +45 -10
- package/dist/store/reducers/tenantOverview/topShards/utils.d.ts +1 -1
- package/dist/store/reducers/tenants/selectors.d.ts +81 -18
- package/dist/store/reducers/tooltip.d.ts +1 -1
- package/dist/store/reducers/topic.d.ts +135 -30
- package/dist/store/reducers/trace.d.ts +1 -1
- package/dist/store/reducers/trace.js +1 -1
- package/dist/store/reducers/trace.js.map +1 -1
- package/dist/types/api/nodes.d.ts +74 -4
- package/dist/types/api/nodes.js.map +1 -1
- package/dist/types/store/executeQuery.d.ts +3 -6
- package/dist/types/store/executeQuery.js.map +1 -1
- package/dist/utils/constants.d.ts +2 -0
- package/dist/utils/constants.js +2 -0
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/dataFormatters/dataFormatters.d.ts +1 -1
- package/dist/utils/dataFormatters/dataFormatters.js +12 -6
- package/dist/utils/dataFormatters/dataFormatters.js.map +1 -1
- package/dist/utils/hooks/withConfirmation/i18n/en.json +4 -0
- package/dist/utils/hooks/withConfirmation/i18n/index.d.ts +2 -0
- package/dist/utils/hooks/withConfirmation/i18n/index.js +5 -0
- package/dist/utils/hooks/withConfirmation/i18n/index.js.map +1 -0
- package/dist/utils/hooks/withConfirmation/useChangeInputWithConfirmation.d.ts +3 -0
- package/dist/utils/hooks/withConfirmation/useChangeInputWithConfirmation.js +57 -0
- package/dist/utils/hooks/withConfirmation/useChangeInputWithConfirmation.js.map +1 -0
- package/dist/utils/monaco/insertSnippet.d.ts +1 -0
- package/dist/utils/monaco/insertSnippet.js +8 -0
- package/dist/utils/monaco/insertSnippet.js.map +1 -0
- package/dist/utils/nodes.d.ts +1 -4
- package/dist/utils/nodes.js +0 -36
- package/dist/utils/nodes.js.map +1 -1
- package/dist/utils/query.d.ts +1 -1
- package/dist/utils/storage.d.ts +1 -3
- package/dist/utils/storage.js +0 -17
- package/dist/utils/storage.js.map +1 -1
- package/dist/utils/timeParsers/parsers.d.ts +1 -1
- package/dist/utils/timeParsers/parsers.js +3 -2
- package/dist/utils/timeParsers/parsers.js.map +1 -1
- package/package.json +2 -1
@@ -1,3 +1,4 @@
|
|
1
|
+
import { createSlice } from '@reduxjs/toolkit';
|
1
2
|
import { settingsManager } from '../../services/settings';
|
2
3
|
import { TracingLevelNumber } from '../../types/api/query';
|
3
4
|
import { ResultType } from '../../types/store/executeQuery';
|
@@ -6,19 +7,9 @@ import { QUERY_SYNTAX, isQueryErrorResponse, parseQueryAPIExecuteResponse } from
|
|
6
7
|
import { isNumeric } from '../../utils/utils';
|
7
8
|
import { api } from './api';
|
8
9
|
const MAXIMUM_QUERIES_IN_HISTORY = 20;
|
9
|
-
const CHANGE_USER_INPUT = 'query/CHANGE_USER_INPUT';
|
10
|
-
const SET_QUERY_RESULT = 'query/SET_QUERY_RESULT';
|
11
|
-
const SET_QUERY_TRACE_READY = 'query/SET_QUERY_TRACE_READY';
|
12
|
-
const SAVE_QUERY_TO_HISTORY = 'query/SAVE_QUERY_TO_HISTORY';
|
13
|
-
const UPDATE_QUERY_IN_HISTORY = 'query/UPDATE_QUERY_IN_HISTORY';
|
14
|
-
const SET_QUERY_HISTORY_FILTER = 'query/SET_QUERY_HISTORY_FILTER';
|
15
|
-
const GO_TO_PREVIOUS_QUERY = 'query/GO_TO_PREVIOUS_QUERY';
|
16
|
-
const GO_TO_NEXT_QUERY = 'query/GO_TO_NEXT_QUERY';
|
17
|
-
const SET_TENANT_PATH = 'query/SET_TENANT_PATH';
|
18
10
|
const queriesHistoryInitial = settingsManager.readUserSettingsValue(QUERIES_HISTORY_KEY, []);
|
19
11
|
const sliceLimit = queriesHistoryInitial.length - MAXIMUM_QUERIES_IN_HISTORY;
|
20
12
|
const initialState = {
|
21
|
-
loading: false,
|
22
13
|
input: '',
|
23
14
|
history: {
|
24
15
|
queries: queriesHistoryInitial
|
@@ -30,53 +21,39 @@ const initialState = {
|
|
30
21
|
filter: '',
|
31
22
|
},
|
32
23
|
};
|
33
|
-
const
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
case SET_QUERY_TRACE_READY: {
|
24
|
+
const slice = createSlice({
|
25
|
+
name: 'executeQuery',
|
26
|
+
initialState,
|
27
|
+
reducers: {
|
28
|
+
changeUserInput: (state, action) => {
|
29
|
+
state.input = action.payload.input;
|
30
|
+
},
|
31
|
+
setQueryTraceReady: (state) => {
|
42
32
|
if (state.result) {
|
43
|
-
|
44
|
-
...state,
|
45
|
-
result: {
|
46
|
-
...state.result,
|
47
|
-
isTraceReady: true,
|
48
|
-
},
|
49
|
-
};
|
33
|
+
state.result.isTraceReady = true;
|
50
34
|
}
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
};
|
58
|
-
}
|
59
|
-
case SAVE_QUERY_TO_HISTORY: {
|
60
|
-
const { queryText, queryId } = action.data;
|
35
|
+
},
|
36
|
+
setQueryResult: (state, action) => {
|
37
|
+
state.result = action.payload;
|
38
|
+
},
|
39
|
+
saveQueryToHistory: (state, action) => {
|
40
|
+
const { queryText, queryId } = action.payload;
|
61
41
|
const newQueries = [...state.history.queries, { queryText, queryId }].slice(state.history.queries.length >= MAXIMUM_QUERIES_IN_HISTORY ? 1 : 0);
|
62
42
|
settingsManager.setUserSettingsValue(QUERIES_HISTORY_KEY, newQueries);
|
63
43
|
const currentIndex = newQueries.length - 1;
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
queries: newQueries,
|
68
|
-
currentIndex,
|
69
|
-
},
|
44
|
+
state.history = {
|
45
|
+
queries: newQueries,
|
46
|
+
currentIndex,
|
70
47
|
};
|
71
|
-
}
|
72
|
-
|
73
|
-
const { queryId, stats } = action.
|
48
|
+
},
|
49
|
+
updateQueryInHistory: (state, action) => {
|
50
|
+
const { queryId, stats } = action.payload;
|
74
51
|
if (!stats) {
|
75
|
-
return
|
52
|
+
return;
|
76
53
|
}
|
77
54
|
const index = state.history.queries.findIndex((item) => item.queryId === queryId);
|
78
55
|
if (index === -1) {
|
79
|
-
return
|
56
|
+
return;
|
80
57
|
}
|
81
58
|
const newQueries = [...state.history.queries];
|
82
59
|
const { durationUs, endTime } = stats;
|
@@ -86,66 +63,54 @@ const executeQuery = (state = initialState, action) => {
|
|
86
63
|
endTime,
|
87
64
|
});
|
88
65
|
settingsManager.setUserSettingsValue(QUERIES_HISTORY_KEY, newQueries);
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
...state.history,
|
93
|
-
queries: newQueries,
|
94
|
-
},
|
95
|
-
};
|
96
|
-
}
|
97
|
-
case GO_TO_PREVIOUS_QUERY: {
|
66
|
+
state.history.queries = newQueries;
|
67
|
+
},
|
68
|
+
goToPreviousQuery: (state) => {
|
98
69
|
const currentIndex = state.history.currentIndex;
|
99
70
|
if (currentIndex <= 0) {
|
100
|
-
return
|
71
|
+
return;
|
101
72
|
}
|
102
73
|
const newCurrentIndex = currentIndex - 1;
|
103
74
|
const query = state.history.queries[newCurrentIndex];
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
currentIndex: newCurrentIndex,
|
109
|
-
},
|
110
|
-
input: query.queryText,
|
111
|
-
};
|
112
|
-
}
|
113
|
-
case GO_TO_NEXT_QUERY: {
|
114
|
-
const lastIndexInHistory = state.history.queries.length - 1;
|
75
|
+
state.input = query.queryText;
|
76
|
+
state.history.currentIndex = newCurrentIndex;
|
77
|
+
},
|
78
|
+
goToNextQuery: (state) => {
|
115
79
|
const currentIndex = state.history.currentIndex;
|
116
|
-
if (currentIndex >=
|
117
|
-
return
|
80
|
+
if (currentIndex >= state.history.queries.length - 1) {
|
81
|
+
return;
|
118
82
|
}
|
119
83
|
const newCurrentIndex = currentIndex + 1;
|
120
84
|
const query = state.history.queries[newCurrentIndex];
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
}
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
}
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
};
|
85
|
+
state.input = query.queryText;
|
86
|
+
state.history.currentIndex = newCurrentIndex;
|
87
|
+
},
|
88
|
+
setTenantPath: (state, action) => {
|
89
|
+
state.tenantPath = action.payload;
|
90
|
+
},
|
91
|
+
setQueryHistoryFilter: (state, action) => {
|
92
|
+
state.history.filter = action.payload;
|
93
|
+
},
|
94
|
+
},
|
95
|
+
selectors: {
|
96
|
+
selectQueriesHistoryFilter: (state) => state.history.filter || '',
|
97
|
+
selectTenantPath: (state) => state.tenantPath,
|
98
|
+
selectResult: (state) => state.result,
|
99
|
+
selectQueriesHistory: (state) => {
|
100
|
+
var _a;
|
101
|
+
const items = state.history.queries;
|
102
|
+
const filter = (_a = state.history.filter) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
103
|
+
return filter
|
104
|
+
? items.filter((item) => item.queryText.toLowerCase().includes(filter))
|
105
|
+
: items;
|
106
|
+
},
|
107
|
+
selectUserInput: (state) => state.input,
|
108
|
+
selectQueriesHistoryCurrentIndex: (state) => { var _a; return (_a = state.history) === null || _a === void 0 ? void 0 : _a.currentIndex; },
|
109
|
+
},
|
110
|
+
});
|
111
|
+
export default slice.reducer;
|
112
|
+
export const { changeUserInput, setQueryTraceReady, setQueryResult, saveQueryToHistory, updateQueryInHistory, goToPreviousQuery, goToNextQuery, setTenantPath, setQueryHistoryFilter, } = slice.actions;
|
113
|
+
export const { selectQueriesHistoryFilter, selectQueriesHistoryCurrentIndex, selectQueriesHistory, selectTenantPath, selectResult, selectUserInput, } = slice.selectors;
|
149
114
|
export const executeQueryApi = api.injectEndpoints({
|
150
115
|
endpoints: (build) => ({
|
151
116
|
executeQuery: build.mutation({
|
@@ -205,7 +170,7 @@ export const executeQueryApi = api.injectEndpoints({
|
|
205
170
|
queryStats.durationUs = (now - timeStart) * 1000;
|
206
171
|
queryStats.endTime = now;
|
207
172
|
}
|
208
|
-
dispatch(updateQueryInHistory(queryStats, queryId));
|
173
|
+
dispatch(updateQueryInHistory({ stats: queryStats, queryId }));
|
209
174
|
dispatch(setQueryResult({
|
210
175
|
type: ResultType.EXECUTE,
|
211
176
|
data,
|
@@ -228,60 +193,6 @@ export const executeQueryApi = api.injectEndpoints({
|
|
228
193
|
}),
|
229
194
|
overrideExisting: 'throw',
|
230
195
|
});
|
231
|
-
export const saveQueryToHistory = (queryText, queryId) => {
|
232
|
-
return {
|
233
|
-
type: SAVE_QUERY_TO_HISTORY,
|
234
|
-
data: { queryText, queryId },
|
235
|
-
};
|
236
|
-
};
|
237
|
-
export function updateQueryInHistory(stats, queryId) {
|
238
|
-
return {
|
239
|
-
type: UPDATE_QUERY_IN_HISTORY,
|
240
|
-
data: { queryId, stats },
|
241
|
-
};
|
242
|
-
}
|
243
|
-
export function setQueryResult(data) {
|
244
|
-
return {
|
245
|
-
type: SET_QUERY_RESULT,
|
246
|
-
data,
|
247
|
-
};
|
248
|
-
}
|
249
|
-
export function setQueryTraceReady() {
|
250
|
-
return {
|
251
|
-
type: SET_QUERY_TRACE_READY,
|
252
|
-
};
|
253
|
-
}
|
254
|
-
export const goToPreviousQuery = () => {
|
255
|
-
return {
|
256
|
-
type: GO_TO_PREVIOUS_QUERY,
|
257
|
-
};
|
258
|
-
};
|
259
|
-
export const goToNextQuery = () => {
|
260
|
-
return {
|
261
|
-
type: GO_TO_NEXT_QUERY,
|
262
|
-
};
|
263
|
-
};
|
264
|
-
export const changeUserInput = ({ input }) => {
|
265
|
-
return {
|
266
|
-
type: CHANGE_USER_INPUT,
|
267
|
-
data: { input },
|
268
|
-
};
|
269
|
-
};
|
270
|
-
export const setTenantPath = (value) => {
|
271
|
-
return {
|
272
|
-
type: SET_TENANT_PATH,
|
273
|
-
data: value,
|
274
|
-
};
|
275
|
-
};
|
276
|
-
export const selectQueriesHistoryFilter = (state) => {
|
277
|
-
return state.executeQuery.history.filter || '';
|
278
|
-
};
|
279
|
-
export const selectQueriesHistory = (state) => {
|
280
|
-
var _a;
|
281
|
-
const items = state.executeQuery.history.queries;
|
282
|
-
const filter = (_a = state.executeQuery.history.filter) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
283
|
-
return filter ? items.filter((item) => item.queryText.toLowerCase().includes(filter)) : items;
|
284
|
-
};
|
285
196
|
function getQueryInHistory(rawQuery) {
|
286
197
|
if (typeof rawQuery === 'string') {
|
287
198
|
return {
|
@@ -290,11 +201,4 @@ function getQueryInHistory(rawQuery) {
|
|
290
201
|
}
|
291
202
|
return rawQuery;
|
292
203
|
}
|
293
|
-
export const setQueryHistoryFilter = (filter) => {
|
294
|
-
return {
|
295
|
-
type: SET_QUERY_HISTORY_FILTER,
|
296
|
-
data: { filter },
|
297
|
-
};
|
298
|
-
};
|
299
|
-
export default executeQuery;
|
300
204
|
//# sourceMappingURL=executeQuery.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"executeQuery.js","sourceRoot":"","sources":["../../../src/store/reducers/executeQuery.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"executeQuery.js","sourceRoot":"","sources":["../../../src/store/reducers/executeQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAG7C,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAC,UAAU,EAAC,MAAM,gCAAgC,CAAC;AAG1D,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAC,YAAY,EAAE,oBAAoB,EAAE,4BAA4B,EAAC,MAAM,mBAAmB,CAAC;AACnG,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAE1B,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAEtC,MAAM,qB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