@finos/legend-application-query 8.1.2 → 9.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/lib/application/LegendQuery.d.ts.map +1 -1
- package/lib/application/LegendQuery.js +7 -9
- package/lib/application/LegendQuery.js.map +1 -1
- package/lib/application/LegendQueryApplicationConfig.d.ts +4 -0
- package/lib/application/LegendQueryApplicationConfig.d.ts.map +1 -1
- package/lib/application/LegendQueryApplicationConfig.js +4 -0
- package/lib/application/LegendQueryApplicationConfig.js.map +1 -1
- package/lib/components/{QuerySetupStoreProvider.d.ts → CloneQueryServiceSetup.d.ts} +2 -7
- package/lib/components/CloneQueryServiceSetup.d.ts.map +1 -0
- package/lib/components/CloneQueryServiceSetup.js +137 -0
- package/lib/components/CloneQueryServiceSetup.js.map +1 -0
- package/lib/components/Core_LegendQueryApplicationPlugin.d.ts +24 -0
- package/lib/components/Core_LegendQueryApplicationPlugin.d.ts.map +1 -0
- package/lib/components/Core_LegendQueryApplicationPlugin.js +144 -0
- package/lib/components/Core_LegendQueryApplicationPlugin.js.map +1 -0
- package/lib/components/CreateMappingQuerySetup.d.ts +18 -0
- package/lib/components/CreateMappingQuerySetup.d.ts.map +1 -0
- package/lib/components/CreateMappingQuerySetup.js +160 -0
- package/lib/components/CreateMappingQuerySetup.js.map +1 -0
- package/lib/components/EditExistingQuerySetup.d.ts +18 -0
- package/lib/components/EditExistingQuerySetup.d.ts.map +1 -0
- package/lib/components/EditExistingQuerySetup.js +107 -0
- package/lib/components/EditExistingQuerySetup.js.map +1 -0
- package/lib/components/LegendQueryApplication.d.ts.map +1 -1
- package/lib/components/LegendQueryApplication.js +4 -2
- package/lib/components/LegendQueryApplication.js.map +1 -1
- package/lib/components/LoadProjectServiceQuerySetup.d.ts +18 -0
- package/lib/components/LoadProjectServiceQuerySetup.d.ts.map +1 -0
- package/lib/components/LoadProjectServiceQuerySetup.js +63 -0
- package/lib/components/LoadProjectServiceQuerySetup.js.map +1 -0
- package/lib/components/QueryEditor.d.ts.map +1 -1
- package/lib/components/QueryEditor.js +31 -33
- package/lib/components/QueryEditor.js.map +1 -1
- package/lib/components/QueryProductionizerSetup.d.ts +18 -0
- package/lib/components/QueryProductionizerSetup.d.ts.map +1 -0
- package/lib/components/QueryProductionizerSetup.js +85 -0
- package/lib/components/QueryProductionizerSetup.js.map +1 -0
- package/lib/components/QuerySetup.d.ts +20 -5
- package/lib/components/QuerySetup.d.ts.map +1 -1
- package/lib/components/QuerySetup.js +69 -473
- package/lib/components/QuerySetup.js.map +1 -1
- package/lib/components/UpdateExistingServiceQuerySetup.d.ts +18 -0
- package/lib/components/UpdateExistingServiceQuerySetup.d.ts.map +1 -0
- package/lib/components/UpdateExistingServiceQuerySetup.js +69 -0
- package/lib/components/UpdateExistingServiceQuerySetup.js.map +1 -0
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +2 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -3
- package/lib/index.js.map +1 -1
- package/lib/package.json +5 -8
- package/lib/stores/CloneServiceQuerySetupStore.d.ts +41 -0
- package/lib/stores/CloneServiceQuerySetupStore.d.ts.map +1 -0
- package/lib/stores/CloneServiceQuerySetupStore.js +98 -0
- package/lib/stores/CloneServiceQuerySetupStore.js.map +1 -0
- package/lib/stores/CreateMappingQuerySetupStore.d.ts +40 -0
- package/lib/stores/CreateMappingQuerySetupStore.d.ts.map +1 -0
- package/lib/stores/CreateMappingQuerySetupStore.js +97 -0
- package/lib/stores/CreateMappingQuerySetupStore.js.map +1 -0
- package/lib/stores/EditExistingQuerySetupStore.d.ts +33 -0
- package/lib/stores/EditExistingQuerySetupStore.d.ts.map +1 -0
- package/lib/stores/EditExistingQuerySetupStore.js +85 -0
- package/lib/stores/EditExistingQuerySetupStore.js.map +1 -0
- package/lib/stores/LegendQueryApplicationPlugin.d.ts +21 -16
- package/lib/stores/LegendQueryApplicationPlugin.d.ts.map +1 -1
- package/lib/stores/LegendQueryApplicationPlugin.js +4 -0
- package/lib/stores/LegendQueryApplicationPlugin.js.map +1 -1
- package/lib/stores/LegendQueryRouter.d.ts +28 -1
- package/lib/stores/LegendQueryRouter.d.ts.map +1 -1
- package/lib/stores/LegendQueryRouter.js +33 -3
- package/lib/stores/LegendQueryRouter.js.map +1 -1
- package/lib/stores/LoadProjectServiceQuerySetupStore.d.ts +27 -0
- package/lib/stores/LoadProjectServiceQuerySetupStore.d.ts.map +1 -0
- package/lib/stores/LoadProjectServiceQuerySetupStore.js +61 -0
- package/lib/stores/LoadProjectServiceQuerySetupStore.js.map +1 -0
- package/lib/stores/QueryEditorStore.d.ts +6 -2
- package/lib/stores/QueryEditorStore.d.ts.map +1 -1
- package/lib/stores/QueryEditorStore.js +35 -17
- package/lib/stores/QueryEditorStore.js.map +1 -1
- package/lib/stores/QueryEditorStoreTestUtils.d.ts.map +1 -1
- package/lib/stores/QueryEditorStoreTestUtils.js +3 -0
- package/lib/stores/QueryEditorStoreTestUtils.js.map +1 -1
- package/lib/stores/QueryProductionizerSetupStore.d.ts +32 -0
- package/lib/stores/QueryProductionizerSetupStore.d.ts.map +1 -0
- package/lib/stores/QueryProductionizerSetupStore.js +101 -0
- package/lib/stores/QueryProductionizerSetupStore.js.map +1 -0
- package/lib/stores/QuerySetupStore.d.ts +22 -85
- package/lib/stores/QuerySetupStore.d.ts.map +1 -1
- package/lib/stores/QuerySetupStore.js +78 -408
- package/lib/stores/QuerySetupStore.js.map +1 -1
- package/lib/stores/UpdateExistingServiceQuerySetupStore.d.ts +28 -0
- package/lib/stores/UpdateExistingServiceQuerySetupStore.d.ts.map +1 -0
- package/lib/stores/UpdateExistingServiceQuerySetupStore.js +73 -0
- package/lib/stores/UpdateExistingServiceQuerySetupStore.js.map +1 -0
- package/package.json +13 -16
- package/src/application/LegendQuery.tsx +7 -8
- package/src/application/LegendQueryApplicationConfig.ts +14 -0
- package/src/components/CloneQueryServiceSetup.tsx +312 -0
- package/src/components/Core_LegendQueryApplicationPlugin.tsx +184 -0
- package/src/components/CreateMappingQuerySetup.tsx +352 -0
- package/src/components/EditExistingQuerySetup.tsx +280 -0
- package/src/components/LegendQueryApplication.tsx +14 -2
- package/src/components/LoadProjectServiceQuerySetup.tsx +131 -0
- package/src/components/QueryEditor.tsx +127 -81
- package/src/components/QueryProductionizerSetup.tsx +206 -0
- package/src/components/QuerySetup.tsx +285 -1183
- package/src/components/UpdateExistingServiceQuerySetup.tsx +153 -0
- package/src/index.ts +3 -2
- package/src/stores/CloneServiceQuerySetupStore.ts +151 -0
- package/src/stores/CreateMappingQuerySetupStore.ts +155 -0
- package/src/stores/EditExistingQuerySetupStore.ts +111 -0
- package/src/stores/LegendQueryApplicationPlugin.ts +27 -27
- package/src/stores/LegendQueryRouter.ts +95 -12
- package/src/stores/LoadProjectServiceQuerySetupStore.ts +87 -0
- package/src/stores/QueryEditorStore.ts +90 -24
- package/src/stores/QueryEditorStoreTestUtils.ts +3 -0
- package/src/stores/QueryProductionizerSetupStore.ts +143 -0
- package/src/stores/QuerySetupStore.ts +111 -604
- package/src/stores/UpdateExistingServiceQuerySetupStore.ts +118 -0
- package/tsconfig.json +13 -1
- package/lib/components/QuerySetupStoreProvider.d.ts.map +0 -1
- package/lib/components/QuerySetupStoreProvider.js +0 -34
- package/lib/components/QuerySetupStoreProvider.js.map +0 -1
- package/src/components/QuerySetupStoreProvider.tsx +0 -56
@@ -13,413 +13,20 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { action, computed, flow,
|
17
|
-
import { ActionState, assertErrorThrown, LogEvent, } from '@finos/legend-shared';
|
18
|
-
import {
|
19
|
-
import { ProjectData, DepotScope, } from '@finos/legend-server-depot';
|
20
|
-
import { parseProjectIdentifier } from '@finos/legend-storage';
|
16
|
+
import { action, computed, flow, makeObservable, observable } from 'mobx';
|
17
|
+
import { ActionState, assertErrorThrown, LogEvent, uniq, isNonNullable, } from '@finos/legend-shared';
|
18
|
+
import { BasicGraphManagerState } from '@finos/legend-graph';
|
21
19
|
import { LEGEND_QUERY_APP_EVENT } from '../LegendQueryAppEvent.js';
|
22
|
-
import {
|
23
|
-
import {
|
24
|
-
|
25
|
-
export class QuerySetupState {
|
26
|
-
setupStore;
|
27
|
-
constructor(setupStore) {
|
28
|
-
this.setupStore = setupStore;
|
29
|
-
}
|
30
|
-
}
|
31
|
-
export class EditExistingQuerySetupState extends QuerySetupState {
|
32
|
-
queries = [];
|
33
|
-
loadQueriesState = ActionState.create();
|
34
|
-
loadQueryState = ActionState.create();
|
35
|
-
currentQuery;
|
36
|
-
currentQueryInfo;
|
37
|
-
showCurrentUserQueriesOnly = false;
|
38
|
-
constructor(setupStore) {
|
39
|
-
super(setupStore);
|
40
|
-
makeObservable(this, {
|
41
|
-
queries: observable,
|
42
|
-
currentQuery: observable,
|
43
|
-
currentQueryInfo: observable,
|
44
|
-
showCurrentUserQueriesOnly: observable,
|
45
|
-
setShowCurrentUserQueriesOnly: action,
|
46
|
-
setCurrentQuery: flow,
|
47
|
-
loadQueries: flow,
|
48
|
-
});
|
49
|
-
}
|
50
|
-
setShowCurrentUserQueriesOnly(val) {
|
51
|
-
this.showCurrentUserQueriesOnly = val;
|
52
|
-
}
|
53
|
-
*setCurrentQuery(queryId) {
|
54
|
-
if (queryId) {
|
55
|
-
try {
|
56
|
-
this.loadQueryState.inProgress();
|
57
|
-
this.currentQuery =
|
58
|
-
(yield this.setupStore.graphManagerState.graphManager.getLightQuery(queryId));
|
59
|
-
this.currentQueryInfo =
|
60
|
-
(yield this.setupStore.graphManagerState.graphManager.getQueryInfo(queryId));
|
61
|
-
}
|
62
|
-
catch (error) {
|
63
|
-
assertErrorThrown(error);
|
64
|
-
this.setupStore.applicationStore.notifyError(error);
|
65
|
-
}
|
66
|
-
finally {
|
67
|
-
this.loadQueryState.reset();
|
68
|
-
}
|
69
|
-
}
|
70
|
-
else {
|
71
|
-
this.currentQuery = undefined;
|
72
|
-
}
|
73
|
-
}
|
74
|
-
*loadQueries(searchText) {
|
75
|
-
const isValidSearchString = searchText.length >= DEFAULT_TYPEAHEAD_SEARCH_MINIMUM_SEARCH_LENGTH;
|
76
|
-
this.loadQueriesState.inProgress();
|
77
|
-
try {
|
78
|
-
const searchSpecification = new QuerySearchSpecification();
|
79
|
-
searchSpecification.searchTerm = isValidSearchString
|
80
|
-
? searchText
|
81
|
-
: undefined;
|
82
|
-
searchSpecification.limit = DEFAULT_TYPEAHEAD_SEARCH_LIMIT;
|
83
|
-
searchSpecification.showCurrentUserQueriesOnly =
|
84
|
-
this.showCurrentUserQueriesOnly;
|
85
|
-
this.queries =
|
86
|
-
(yield this.setupStore.graphManagerState.graphManager.searchQueries(searchSpecification));
|
87
|
-
this.loadQueriesState.pass();
|
88
|
-
}
|
89
|
-
catch (error) {
|
90
|
-
assertErrorThrown(error);
|
91
|
-
this.setupStore.applicationStore.notifyError(error);
|
92
|
-
this.loadQueriesState.fail();
|
93
|
-
}
|
94
|
-
}
|
95
|
-
}
|
96
|
-
export class QueryProductionizationSetupState extends QuerySetupState {
|
97
|
-
queries = [];
|
98
|
-
loadQueriesState = ActionState.create();
|
99
|
-
loadQueryState = ActionState.create();
|
100
|
-
currentQuery;
|
101
|
-
currentQueryInfo;
|
102
|
-
constructor(setupStore) {
|
103
|
-
super(setupStore);
|
104
|
-
makeObservable(this, {
|
105
|
-
queries: observable,
|
106
|
-
currentQuery: observable,
|
107
|
-
currentQueryInfo: observable,
|
108
|
-
setCurrentQuery: flow,
|
109
|
-
loadQueries: flow,
|
110
|
-
});
|
111
|
-
}
|
112
|
-
async loadQueryProductionizer() {
|
113
|
-
if (!this.currentQuery) {
|
114
|
-
return;
|
115
|
-
}
|
116
|
-
// fetch project data
|
117
|
-
const project = ProjectData.serialization.fromJson(await this.setupStore.depotServerClient.getProject(this.currentQuery.groupId, this.currentQuery.artifactId));
|
118
|
-
// find the matching SDLC instance
|
119
|
-
const projectIDPrefix = parseProjectIdentifier(project.projectId).prefix;
|
120
|
-
const matchingSDLCEntry = this.setupStore.applicationStore.config.studioInstances.find((entry) => entry.sdlcProjectIDPrefix === projectIDPrefix);
|
121
|
-
if (matchingSDLCEntry) {
|
122
|
-
this.setupStore.applicationStore.setBlockingAlert({
|
123
|
-
message: `Loading query...`,
|
124
|
-
prompt: 'Please do not close the application',
|
125
|
-
showLoading: true,
|
126
|
-
});
|
127
|
-
this.setupStore.applicationStore.navigator.visitAddress(EXTERNAL_APPLICATION_NAVIGATION__generateStudioProductionizeQueryUrl(matchingSDLCEntry.url, this.currentQuery.id), { useSameWindow: true });
|
128
|
-
}
|
129
|
-
else {
|
130
|
-
this.setupStore.applicationStore.notifyWarning(`Can't find the corresponding SDLC instance to productionize the query`);
|
131
|
-
}
|
132
|
-
}
|
133
|
-
*setCurrentQuery(queryId) {
|
134
|
-
if (queryId) {
|
135
|
-
try {
|
136
|
-
this.loadQueryState.inProgress();
|
137
|
-
this.currentQuery =
|
138
|
-
(yield this.setupStore.graphManagerState.graphManager.getLightQuery(queryId));
|
139
|
-
this.currentQueryInfo =
|
140
|
-
(yield this.setupStore.graphManagerState.graphManager.getQueryInfo(queryId));
|
141
|
-
}
|
142
|
-
catch (error) {
|
143
|
-
assertErrorThrown(error);
|
144
|
-
this.setupStore.applicationStore.notifyError(error);
|
145
|
-
}
|
146
|
-
finally {
|
147
|
-
this.loadQueryState.reset();
|
148
|
-
}
|
149
|
-
}
|
150
|
-
else {
|
151
|
-
this.currentQuery = undefined;
|
152
|
-
}
|
153
|
-
}
|
154
|
-
*loadQueries(searchText) {
|
155
|
-
const isValidSearchString = searchText.length >= DEFAULT_TYPEAHEAD_SEARCH_MINIMUM_SEARCH_LENGTH;
|
156
|
-
this.loadQueriesState.inProgress();
|
157
|
-
try {
|
158
|
-
const searchSpecification = new QuerySearchSpecification();
|
159
|
-
searchSpecification.searchTerm = isValidSearchString
|
160
|
-
? searchText
|
161
|
-
: undefined;
|
162
|
-
searchSpecification.limit = DEFAULT_TYPEAHEAD_SEARCH_LIMIT;
|
163
|
-
this.queries =
|
164
|
-
(yield this.setupStore.graphManagerState.graphManager.searchQueries(searchSpecification));
|
165
|
-
this.loadQueriesState.pass();
|
166
|
-
}
|
167
|
-
catch (error) {
|
168
|
-
assertErrorThrown(error);
|
169
|
-
this.setupStore.applicationStore.notifyError(error);
|
170
|
-
this.loadQueriesState.fail();
|
171
|
-
}
|
172
|
-
}
|
173
|
-
}
|
174
|
-
export class UpdateExistingServiceQuerySetupState extends QuerySetupState {
|
175
|
-
services = [];
|
176
|
-
loadServicesState = ActionState.create();
|
177
|
-
constructor(setupStore) {
|
178
|
-
super(setupStore);
|
179
|
-
makeObservable(this, {
|
180
|
-
services: observable,
|
181
|
-
loadServices: flow,
|
182
|
-
});
|
183
|
-
}
|
184
|
-
async loadServiceUpdater(serviceInfo) {
|
185
|
-
// fetch project data
|
186
|
-
const project = ProjectData.serialization.fromJson(await this.setupStore.depotServerClient.getProject(serviceInfo.groupId, serviceInfo.artifactId));
|
187
|
-
// find the matching SDLC instance
|
188
|
-
const projectIDPrefix = parseProjectIdentifier(project.projectId).prefix;
|
189
|
-
const matchingSDLCEntry = this.setupStore.applicationStore.config.studioInstances.find((entry) => entry.sdlcProjectIDPrefix === projectIDPrefix);
|
190
|
-
if (matchingSDLCEntry) {
|
191
|
-
this.setupStore.applicationStore.setBlockingAlert({
|
192
|
-
message: `Loading service...`,
|
193
|
-
prompt: 'Please do not close the application',
|
194
|
-
showLoading: true,
|
195
|
-
});
|
196
|
-
this.setupStore.applicationStore.navigator.visitAddress(EXTERNAL_APPLICATION_NAVIGATION__generateStudioUpdateExistingServiceQueryUrl(matchingSDLCEntry.url, serviceInfo.groupId, serviceInfo.artifactId, serviceInfo.path), { useSameWindow: true });
|
197
|
-
}
|
198
|
-
else {
|
199
|
-
this.setupStore.applicationStore.notifyWarning(`Can't find the corresponding SDLC instance to update the service`);
|
200
|
-
}
|
201
|
-
}
|
202
|
-
*loadServices(searchText) {
|
203
|
-
const isValidSearchString = searchText.length >= DEFAULT_TYPEAHEAD_SEARCH_MINIMUM_SEARCH_LENGTH;
|
204
|
-
this.loadServicesState.inProgress();
|
205
|
-
try {
|
206
|
-
this.services = (yield this.setupStore.depotServerClient.getEntitiesByClassifierPath(CORE_PURE_PATH.SERVICE, {
|
207
|
-
search: isValidSearchString ? searchText : undefined,
|
208
|
-
// NOTE: since this mode is meant for contribution, we want to load services
|
209
|
-
// on the snapshot version (i.e. merged to the default branch on the projects)
|
210
|
-
scope: DepotScope.SNAPSHOT,
|
211
|
-
limit: DEFAULT_TYPEAHEAD_SEARCH_LIMIT,
|
212
|
-
})).map((storedEntity) => extractServiceInfo(storedEntity));
|
213
|
-
this.loadServicesState.pass();
|
214
|
-
}
|
215
|
-
catch (error) {
|
216
|
-
assertErrorThrown(error);
|
217
|
-
this.setupStore.applicationStore.notifyError(error);
|
218
|
-
this.loadServicesState.fail();
|
219
|
-
}
|
220
|
-
}
|
221
|
-
}
|
222
|
-
export class CreateMappingQuerySetupState extends QuerySetupState {
|
223
|
-
projects = [];
|
224
|
-
loadProjectsState = ActionState.create();
|
225
|
-
surveyMappingRuntimeCompatibilityState = ActionState.create();
|
226
|
-
currentProject;
|
227
|
-
currentVersionId;
|
228
|
-
currentMapping;
|
229
|
-
currentRuntime;
|
230
|
-
mappingRuntimeCompatibilitySurveyResult = [];
|
231
|
-
constructor(setupStore) {
|
232
|
-
super(setupStore);
|
233
|
-
makeObservable(this, {
|
234
|
-
projects: observable,
|
235
|
-
currentProject: observable,
|
236
|
-
currentVersionId: observable,
|
237
|
-
currentMapping: observable,
|
238
|
-
currentRuntime: observable,
|
239
|
-
mappingRuntimeCompatibilitySurveyResult: observable,
|
240
|
-
compatibleRuntimes: computed,
|
241
|
-
setCurrentProject: action,
|
242
|
-
setCurrentVersionId: action,
|
243
|
-
setCurrentMapping: action,
|
244
|
-
setCurrentRuntime: action,
|
245
|
-
loadProjects: flow,
|
246
|
-
surveyMappingRuntimeCompatibility: flow,
|
247
|
-
});
|
248
|
-
}
|
249
|
-
setCurrentProject(val) {
|
250
|
-
this.currentProject = val;
|
251
|
-
}
|
252
|
-
setCurrentVersionId(val) {
|
253
|
-
this.currentVersionId = val;
|
254
|
-
}
|
255
|
-
setCurrentMapping(val) {
|
256
|
-
this.currentMapping = val;
|
257
|
-
}
|
258
|
-
setCurrentRuntime(val) {
|
259
|
-
this.currentRuntime = val;
|
260
|
-
}
|
261
|
-
get compatibleRuntimes() {
|
262
|
-
const currentMapping = this.currentMapping;
|
263
|
-
if (!currentMapping) {
|
264
|
-
return [];
|
265
|
-
}
|
266
|
-
return (this.mappingRuntimeCompatibilitySurveyResult.find((result) => result.mapping === currentMapping)?.runtimes ?? []);
|
267
|
-
}
|
268
|
-
*loadProjects() {
|
269
|
-
this.loadProjectsState.inProgress();
|
270
|
-
try {
|
271
|
-
this.projects = (yield this.setupStore.depotServerClient.getProjects()).map((v) => ProjectData.serialization.fromJson(v));
|
272
|
-
this.loadProjectsState.pass();
|
273
|
-
}
|
274
|
-
catch (error) {
|
275
|
-
assertErrorThrown(error);
|
276
|
-
this.setupStore.applicationStore.notifyError(error);
|
277
|
-
this.loadProjectsState.fail();
|
278
|
-
}
|
279
|
-
}
|
280
|
-
*surveyMappingRuntimeCompatibility(project, versionId) {
|
281
|
-
this.surveyMappingRuntimeCompatibilityState.inProgress();
|
282
|
-
try {
|
283
|
-
// fetch entities and dependencies
|
284
|
-
const entities = (yield this.setupStore.depotServerClient.getEntities(project, versionId));
|
285
|
-
const dependencyEntitiesIndex = (yield flowResult(this.setupStore.depotServerClient.getIndexedDependencyEntities(project, versionId)));
|
286
|
-
this.mappingRuntimeCompatibilitySurveyResult = (yield flowResult(getQueryBuilderGraphManagerExtension(this.setupStore.graphManagerState.graphManager).surveyMappingRuntimeCompatibility(entities, dependencyEntitiesIndex)));
|
287
|
-
this.surveyMappingRuntimeCompatibilityState.pass();
|
288
|
-
}
|
289
|
-
catch (error) {
|
290
|
-
assertErrorThrown(error);
|
291
|
-
this.setupStore.applicationStore.log.error(LogEvent.create(LEGEND_QUERY_APP_EVENT.GENERIC_FAILURE), error);
|
292
|
-
this.setupStore.applicationStore.notifyError(error);
|
293
|
-
this.surveyMappingRuntimeCompatibilityState.fail();
|
294
|
-
}
|
295
|
-
}
|
296
|
-
}
|
297
|
-
export class LoadProjectServiceQuerySetupState extends QuerySetupState {
|
298
|
-
projects = [];
|
299
|
-
loadProjectsState = ActionState.create();
|
300
|
-
constructor(setupStore) {
|
301
|
-
super(setupStore);
|
302
|
-
makeObservable(this, {
|
303
|
-
projects: observable,
|
304
|
-
loadProjects: flow,
|
305
|
-
});
|
306
|
-
}
|
307
|
-
*loadProjects() {
|
308
|
-
this.loadProjectsState.inProgress();
|
309
|
-
try {
|
310
|
-
this.projects = (yield this.setupStore.depotServerClient.getProjects()).map((v) => ProjectData.serialization.fromJson(v));
|
311
|
-
this.loadProjectsState.pass();
|
312
|
-
}
|
313
|
-
catch (error) {
|
314
|
-
assertErrorThrown(error);
|
315
|
-
this.setupStore.applicationStore.notifyError(error);
|
316
|
-
this.loadProjectsState.fail();
|
317
|
-
}
|
318
|
-
}
|
319
|
-
async loadProjectServiceUpdater(project) {
|
320
|
-
// find the matching SDLC instance
|
321
|
-
const projectIDPrefix = parseProjectIdentifier(project.projectId).prefix;
|
322
|
-
const matchingSDLCEntry = this.setupStore.applicationStore.config.studioInstances.find((entry) => entry.sdlcProjectIDPrefix === projectIDPrefix);
|
323
|
-
if (matchingSDLCEntry) {
|
324
|
-
this.setupStore.applicationStore.setBlockingAlert({
|
325
|
-
message: `Loading service project...`,
|
326
|
-
prompt: 'Please do not close the application',
|
327
|
-
showLoading: true,
|
328
|
-
});
|
329
|
-
this.setupStore.applicationStore.navigator.visitAddress(EXTERNAL_APPLICATION_NAVIGATION__generateStudioUpdateProjectServiceQueryUrl(matchingSDLCEntry.url, project.projectId), { useSameWindow: true });
|
330
|
-
}
|
331
|
-
else {
|
332
|
-
this.setupStore.applicationStore.notifyWarning(`Can't find the corresponding SDLC instance to load project '${project.projectId}'`);
|
333
|
-
}
|
334
|
-
}
|
335
|
-
}
|
336
|
-
export class CloneServiceQuerySetupState extends QuerySetupState {
|
337
|
-
projects = [];
|
338
|
-
loadProjectsState = ActionState.create();
|
339
|
-
loadServiceExecutionsState = ActionState.create();
|
340
|
-
currentProject;
|
341
|
-
currentVersionId;
|
342
|
-
currentServiceExecutionOption;
|
343
|
-
serviceExecutionOptions = [];
|
344
|
-
constructor(setupStore) {
|
345
|
-
super(setupStore);
|
346
|
-
makeObservable(this, {
|
347
|
-
serviceExecutionOptions: observable,
|
348
|
-
projects: observable,
|
349
|
-
currentProject: observable,
|
350
|
-
currentVersionId: observable,
|
351
|
-
currentServiceExecutionOption: observable,
|
352
|
-
setCurrentProject: action,
|
353
|
-
setCurrentVersionId: action,
|
354
|
-
setCurrentServiceExecutionOption: action,
|
355
|
-
setServiceExecutionOptions: action,
|
356
|
-
loadProjects: flow,
|
357
|
-
loadServiceExecutionOptions: flow,
|
358
|
-
});
|
359
|
-
}
|
360
|
-
setCurrentProject(val) {
|
361
|
-
this.currentProject = val;
|
362
|
-
}
|
363
|
-
setCurrentVersionId(val) {
|
364
|
-
this.currentVersionId = val;
|
365
|
-
}
|
366
|
-
setCurrentServiceExecutionOption(val) {
|
367
|
-
this.currentServiceExecutionOption = val;
|
368
|
-
}
|
369
|
-
setServiceExecutionOptions(val) {
|
370
|
-
this.serviceExecutionOptions = val;
|
371
|
-
}
|
372
|
-
*loadProjects() {
|
373
|
-
this.loadProjectsState.inProgress();
|
374
|
-
try {
|
375
|
-
this.projects = (yield this.setupStore.depotServerClient.getProjects()).map((v) => ProjectData.serialization.fromJson(v));
|
376
|
-
this.loadProjectsState.pass();
|
377
|
-
}
|
378
|
-
catch (error) {
|
379
|
-
assertErrorThrown(error);
|
380
|
-
this.setupStore.applicationStore.notifyError(error);
|
381
|
-
this.loadProjectsState.fail();
|
382
|
-
}
|
383
|
-
}
|
384
|
-
*loadServiceExecutionOptions(project, versionId) {
|
385
|
-
this.loadServiceExecutionsState.inProgress();
|
386
|
-
try {
|
387
|
-
// fetch entities and dependencies
|
388
|
-
const entities = (yield this.setupStore.depotServerClient.getEntities(project, versionId));
|
389
|
-
const dependencyEntitiesIndex = (yield flowResult(this.setupStore.depotServerClient.getIndexedDependencyEntities(project, versionId)));
|
390
|
-
const serviceExecutionAnalysisResults = (yield flowResult(getQueryBuilderGraphManagerExtension(this.setupStore.graphManagerState.graphManager).surveyServiceExecution(entities, dependencyEntitiesIndex)));
|
391
|
-
this.setServiceExecutionOptions(serviceExecutionAnalysisResults.flatMap((result) => {
|
392
|
-
if (result.executionKeys?.length) {
|
393
|
-
return result.executionKeys.map((key) => ({
|
394
|
-
service: result.service,
|
395
|
-
key,
|
396
|
-
}));
|
397
|
-
}
|
398
|
-
return {
|
399
|
-
service: result.service,
|
400
|
-
};
|
401
|
-
}));
|
402
|
-
this.loadServiceExecutionsState.pass();
|
403
|
-
}
|
404
|
-
catch (error) {
|
405
|
-
assertErrorThrown(error);
|
406
|
-
this.setupStore.applicationStore.log.error(LogEvent.create(LEGEND_QUERY_APP_EVENT.GENERIC_FAILURE), error);
|
407
|
-
this.setupStore.applicationStore.notifyError(error);
|
408
|
-
this.loadServiceExecutionsState.fail();
|
409
|
-
}
|
410
|
-
}
|
411
|
-
}
|
412
|
-
export class QuerySetupStore {
|
20
|
+
import { TAB_SIZE } from '@finos/legend-application';
|
21
|
+
import { generateQuerySetupRoute } from './LegendQueryRouter.js';
|
22
|
+
export class BaseQuerySetupStore {
|
413
23
|
applicationStore;
|
414
24
|
graphManagerState;
|
415
25
|
depotServerClient;
|
416
26
|
pluginManager;
|
417
27
|
initState = ActionState.create();
|
418
|
-
querySetupState;
|
419
28
|
constructor(applicationStore, depotServerClient) {
|
420
29
|
makeObservable(this, {
|
421
|
-
querySetupState: observable,
|
422
|
-
setSetupState: action,
|
423
30
|
initialize: flow,
|
424
31
|
});
|
425
32
|
this.applicationStore = applicationStore;
|
@@ -427,17 +34,8 @@ export class QuerySetupStore {
|
|
427
34
|
this.depotServerClient = depotServerClient;
|
428
35
|
this.pluginManager = applicationStore.pluginManager;
|
429
36
|
}
|
430
|
-
setSetupState(val) {
|
431
|
-
this.querySetupState = val;
|
432
|
-
}
|
433
37
|
*initialize() {
|
434
38
|
if (!this.initState.isInInitialState) {
|
435
|
-
// eslint-disable-next-line no-process-env
|
436
|
-
if (process.env.NODE_ENV === 'development') {
|
437
|
-
this.applicationStore.log.info(LogEvent.create(APPLICATION_EVENT.DEVELOPMENT_ISSUE), `Fast-refreshing the app - preventing initialize() recall...`);
|
438
|
-
return;
|
439
|
-
}
|
440
|
-
this.applicationStore.notifyIllegalState(`Query setup store is already initialized`);
|
441
39
|
return;
|
442
40
|
}
|
443
41
|
try {
|
@@ -465,4 +63,76 @@ export class QuerySetupStore {
|
|
465
63
|
}
|
466
64
|
}
|
467
65
|
}
|
66
|
+
export class QuerySetupLandingPageStore {
|
67
|
+
applicationStore;
|
68
|
+
pluginManager;
|
69
|
+
initState = ActionState.create();
|
70
|
+
actions = [];
|
71
|
+
tags = [];
|
72
|
+
showAllGroups = false;
|
73
|
+
showAdvancedActions = false;
|
74
|
+
tagToFocus;
|
75
|
+
constructor(applicationStore) {
|
76
|
+
makeObservable(this, {
|
77
|
+
showAllGroups: observable,
|
78
|
+
showAdvancedActions: observable,
|
79
|
+
tagToFocus: observable,
|
80
|
+
isCustomized: computed,
|
81
|
+
setShowAllGroups: action,
|
82
|
+
setShowAdvancedActions: action,
|
83
|
+
setTagToFocus: action,
|
84
|
+
initialize: action,
|
85
|
+
});
|
86
|
+
this.applicationStore = applicationStore;
|
87
|
+
this.pluginManager = applicationStore.pluginManager;
|
88
|
+
this.actions = this.pluginManager
|
89
|
+
.getApplicationPlugins()
|
90
|
+
.flatMap((plugin) => plugin.getExtraQuerySetupActionConfigurations?.() ?? [])
|
91
|
+
.sort((a, b) => (a.isAdvanced ? 1 : 0) - (b.isAdvanced ? 1 : 0));
|
92
|
+
this.tags = uniq(this.actions.map((config) => config.tag).filter(isNonNullable)).sort();
|
93
|
+
}
|
94
|
+
get isCustomized() {
|
95
|
+
return (this.showAllGroups || this.showAdvancedActions || Boolean(this.tagToFocus));
|
96
|
+
}
|
97
|
+
setShowAllGroups(val) {
|
98
|
+
this.showAllGroups = val;
|
99
|
+
this.updateCurentLocation();
|
100
|
+
}
|
101
|
+
setShowAdvancedActions(val) {
|
102
|
+
this.showAdvancedActions = val;
|
103
|
+
this.updateCurentLocation();
|
104
|
+
}
|
105
|
+
setTagToFocus(val) {
|
106
|
+
if (val && !this.tags.includes(val)) {
|
107
|
+
return;
|
108
|
+
}
|
109
|
+
this.tagToFocus = val;
|
110
|
+
this.updateCurentLocation();
|
111
|
+
}
|
112
|
+
resetConfig() {
|
113
|
+
this.setShowAdvancedActions(false);
|
114
|
+
this.setShowAllGroups(false);
|
115
|
+
this.setTagToFocus(undefined);
|
116
|
+
this.updateCurentLocation();
|
117
|
+
}
|
118
|
+
updateCurentLocation() {
|
119
|
+
this.applicationStore.navigator.updateCurrentLocation(generateQuerySetupRoute(this.showAllGroups, this.showAdvancedActions, this.tagToFocus));
|
120
|
+
}
|
121
|
+
initialize(showAdvancedActions, showAllGroups, tagToFocus) {
|
122
|
+
if (!this.initState.isInInitialState) {
|
123
|
+
return;
|
124
|
+
}
|
125
|
+
if (showAdvancedActions) {
|
126
|
+
this.showAdvancedActions = showAdvancedActions !== 'false';
|
127
|
+
}
|
128
|
+
if (showAllGroups) {
|
129
|
+
this.showAllGroups = showAllGroups !== 'false';
|
130
|
+
}
|
131
|
+
if (tagToFocus) {
|
132
|
+
this.tagToFocus = this.tags.includes(tagToFocus) ? tagToFocus : undefined;
|
133
|
+
}
|
134
|
+
this.updateCurentLocation();
|
135
|
+
this.initState.pass();
|
136
|
+
}
|
137
|
+
}
|
468
138
|
//# sourceMappingURL=QuerySetupStore.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QuerySet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,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;SAC3E;QACD,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAE5B,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;IACxB,CAAC;CACF"}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
import { type ServiceInfo } from '@finos/legend-query-builder';
|
17
|
+
import { type DepotServerClient } from '@finos/legend-server-depot';
|
18
|
+
import { ActionState, type GeneratorFn } from '@finos/legend-shared';
|
19
|
+
import type { LegendQueryApplicationStore } from './LegendQueryBaseStore.js';
|
20
|
+
import { BaseQuerySetupStore } from './QuerySetupStore.js';
|
21
|
+
export declare class UpdateExistingServiceQuerySetupStore extends BaseQuerySetupStore {
|
22
|
+
readonly loadServicesState: ActionState;
|
23
|
+
services: ServiceInfo[];
|
24
|
+
constructor(applicationStore: LegendQueryApplicationStore, depotServerClient: DepotServerClient);
|
25
|
+
loadServiceUpdater(serviceInfo: ServiceInfo): Promise<void>;
|
26
|
+
loadServices(searchText: string): GeneratorFn<void>;
|
27
|
+
}
|
28
|
+
//# sourceMappingURL=UpdateExistingServiceQuerySetupStore.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"UpdateExistingServiceQuerySetupStore.d.ts","sourceRoot":"","sources":["../../src/stores/UpdateExistingServiceQuerySetupStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAOH,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAGL,KAAK,iBAAiB,EAEvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,WAAW,EAEX,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAE7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,qBAAa,oCAAqC,SAAQ,mBAAmB;IAC3E,QAAQ,CAAC,iBAAiB,cAAwB;IAClD,QAAQ,EAAE,WAAW,EAAE,CAAM;gBAG3B,gBAAgB,EAAE,2BAA2B,EAC7C,iBAAiB,EAAE,iBAAiB;IAUhC,kBAAkB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAmChE,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC;CAwBrD"}
|
@@ -0,0 +1,73 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
import { DEFAULT_TYPEAHEAD_SEARCH_LIMIT, DEFAULT_TYPEAHEAD_SEARCH_MINIMUM_SEARCH_LENGTH, } from '@finos/legend-application';
|
17
|
+
import { CORE_PURE_PATH } from '@finos/legend-graph';
|
18
|
+
import { extractServiceInfo, } from '@finos/legend-query-builder';
|
19
|
+
import { DepotScope, ProjectData, } from '@finos/legend-server-depot';
|
20
|
+
import { ActionState, assertErrorThrown, } from '@finos/legend-shared';
|
21
|
+
import { parseProjectIdentifier } from '@finos/legend-storage';
|
22
|
+
import { flow, makeObservable, observable } from 'mobx';
|
23
|
+
import { EXTERNAL_APPLICATION_NAVIGATION__generateStudioUpdateExistingServiceQueryUrl } from './LegendQueryRouter.js';
|
24
|
+
import { BaseQuerySetupStore } from './QuerySetupStore.js';
|
25
|
+
export class UpdateExistingServiceQuerySetupStore extends BaseQuerySetupStore {
|
26
|
+
loadServicesState = ActionState.create();
|
27
|
+
services = [];
|
28
|
+
constructor(applicationStore, depotServerClient) {
|
29
|
+
super(applicationStore, depotServerClient);
|
30
|
+
makeObservable(this, {
|
31
|
+
services: observable,
|
32
|
+
loadServices: flow,
|
33
|
+
});
|
34
|
+
}
|
35
|
+
async loadServiceUpdater(serviceInfo) {
|
36
|
+
// fetch project data
|
37
|
+
const project = ProjectData.serialization.fromJson(await this.depotServerClient.getProject(serviceInfo.groupId, serviceInfo.artifactId));
|
38
|
+
// find the matching SDLC instance
|
39
|
+
const projectIDPrefix = parseProjectIdentifier(project.projectId).prefix;
|
40
|
+
const matchingSDLCEntry = this.applicationStore.config.studioInstances.find((entry) => entry.sdlcProjectIDPrefix === projectIDPrefix);
|
41
|
+
if (matchingSDLCEntry) {
|
42
|
+
this.applicationStore.setBlockingAlert({
|
43
|
+
message: `Loading service...`,
|
44
|
+
prompt: 'Please do not close the application',
|
45
|
+
showLoading: true,
|
46
|
+
});
|
47
|
+
this.applicationStore.navigator.goToAddress(EXTERNAL_APPLICATION_NAVIGATION__generateStudioUpdateExistingServiceQueryUrl(matchingSDLCEntry.url, serviceInfo.groupId, serviceInfo.artifactId, serviceInfo.path));
|
48
|
+
}
|
49
|
+
else {
|
50
|
+
this.applicationStore.notifyWarning(`Can't find the corresponding SDLC instance to update the service`);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
*loadServices(searchText) {
|
54
|
+
const isValidSearchString = searchText.length >= DEFAULT_TYPEAHEAD_SEARCH_MINIMUM_SEARCH_LENGTH;
|
55
|
+
this.loadServicesState.inProgress();
|
56
|
+
try {
|
57
|
+
this.services = (yield this.depotServerClient.getEntitiesByClassifierPath(CORE_PURE_PATH.SERVICE, {
|
58
|
+
search: isValidSearchString ? searchText : undefined,
|
59
|
+
// NOTE: since this mode is meant for contribution, we want to load services
|
60
|
+
// on the snapshot version (i.e. merged to the default branch on the projects)
|
61
|
+
scope: DepotScope.SNAPSHOT,
|
62
|
+
limit: DEFAULT_TYPEAHEAD_SEARCH_LIMIT,
|
63
|
+
})).map((storedEntity) => extractServiceInfo(storedEntity));
|
64
|
+
this.loadServicesState.pass();
|
65
|
+
}
|
66
|
+
catch (error) {
|
67
|
+
assertErrorThrown(error);
|
68
|
+
this.applicationStore.notifyError(error);
|
69
|
+
this.loadServicesState.fail();
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
//# sourceMappingURL=UpdateExistingServiceQuerySetupStore.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"UpdateExistingServiceQuerySetupStore.js","sourceRoot":"","sources":["../../src/stores/UpdateExistingServiceQuerySetupStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,8BAA8B,EAC9B,8CAA8C,GAC/C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EACL,kBAAkB,GAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,UAAU,EACV,WAAW,GAGZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,WAAW,EACX,iBAAiB,GAElB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,sBA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