@finos/legend-extension-dsl-data-space 10.1.96 → 10.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. package/lib/__lib__/query/DSL_DataSpace_LegendQueryNavigation.d.ts +18 -6
  2. package/lib/__lib__/query/DSL_DataSpace_LegendQueryNavigation.d.ts.map +1 -1
  3. package/lib/__lib__/query/DSL_DataSpace_LegendQueryNavigation.js +18 -6
  4. package/lib/__lib__/query/DSL_DataSpace_LegendQueryNavigation.js.map +1 -1
  5. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.d.ts.map +1 -1
  6. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js +1 -0
  7. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js.map +1 -1
  8. package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.d.ts +4 -1
  9. package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.d.ts.map +1 -1
  10. package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.js +55 -5
  11. package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.js.map +1 -1
  12. package/lib/components/query/DataSpaceAdvancedSearchModal.d.ts.map +1 -1
  13. package/lib/components/query/DataSpaceAdvancedSearchModal.js +5 -17
  14. package/lib/components/query/DataSpaceAdvancedSearchModal.js.map +1 -1
  15. package/lib/components/query/DataSpaceQueryBuilder.d.ts.map +1 -1
  16. package/lib/components/query/DataSpaceQueryBuilder.js +4 -16
  17. package/lib/components/query/DataSpaceQueryBuilder.js.map +1 -1
  18. package/lib/components/query/DataSpaceQueryBuilderTemplateQueryPanelContent.js +1 -1
  19. package/lib/components/query/DataSpaceQueryBuilderTemplateQueryPanelContent.js.map +1 -1
  20. package/lib/components/query/DataSpaceQuerySetup.d.ts.map +1 -1
  21. package/lib/components/query/DataSpaceQuerySetup.js +3 -16
  22. package/lib/components/query/DataSpaceQuerySetup.js.map +1 -1
  23. package/lib/components/query/DataSpaceTemplateQueryCreator.js +4 -4
  24. package/lib/components/query/DataSpaceTemplateQueryCreator.js.map +1 -1
  25. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts +2 -0
  26. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts.map +1 -1
  27. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js +13 -0
  28. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js.map +1 -1
  29. package/lib/components/studio/DataSpaceTemplateQueryPromoteReview.d.ts +19 -0
  30. package/lib/components/studio/DataSpaceTemplateQueryPromoteReview.d.ts.map +1 -0
  31. package/lib/components/studio/DataSpaceTemplateQueryPromoteReview.js +79 -0
  32. package/lib/components/studio/DataSpaceTemplateQueryPromoteReview.js.map +1 -0
  33. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.d.ts +1 -0
  34. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.d.ts.map +1 -1
  35. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js +2 -0
  36. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js.map +1 -1
  37. package/lib/graph-manager/action/analytics/DataSpaceAnalysis.d.ts +1 -0
  38. package/lib/graph-manager/action/analytics/DataSpaceAnalysis.d.ts.map +1 -1
  39. package/lib/graph-manager/action/analytics/DataSpaceAnalysis.js +1 -0
  40. package/lib/graph-manager/action/analytics/DataSpaceAnalysis.js.map +1 -1
  41. package/lib/graph-manager/protocol/pure/DSL_DataSpace_PureGraphManagerExtension.d.ts +10 -1
  42. package/lib/graph-manager/protocol/pure/DSL_DataSpace_PureGraphManagerExtension.d.ts.map +1 -1
  43. package/lib/graph-manager/protocol/pure/DSL_DataSpace_PureGraphManagerExtension.js.map +1 -1
  44. package/lib/graph-manager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.d.ts.map +1 -1
  45. package/lib/graph-manager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js +2 -0
  46. package/lib/graph-manager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js.map +1 -1
  47. package/lib/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.d.ts +12 -1
  48. package/lib/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.d.ts.map +1 -1
  49. package/lib/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js +28 -3
  50. package/lib/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js.map +1 -1
  51. package/lib/graph-manager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts +1 -0
  52. package/lib/graph-manager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts.map +1 -1
  53. package/lib/graph-manager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js +2 -0
  54. package/lib/graph-manager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js.map +1 -1
  55. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.d.ts +1 -0
  56. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.d.ts.map +1 -1
  57. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js +2 -0
  58. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js.map +1 -1
  59. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.d.ts.map +1 -1
  60. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.js +1 -0
  61. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.js.map +1 -1
  62. package/lib/index.css +2 -2
  63. package/lib/index.css.map +1 -1
  64. package/lib/package.json +2 -1
  65. package/lib/stores/query/DataSpaceAdvancedSearchState.d.ts +1 -1
  66. package/lib/stores/query/DataSpaceAdvancedSearchState.d.ts.map +1 -1
  67. package/lib/stores/query/DataSpaceAdvancedSearchState.js +3 -6
  68. package/lib/stores/query/DataSpaceAdvancedSearchState.js.map +1 -1
  69. package/lib/stores/query/DataSpaceQueryBuilderState.d.ts +1 -1
  70. package/lib/stores/query/DataSpaceQueryBuilderState.d.ts.map +1 -1
  71. package/lib/stores/query/DataSpaceQueryBuilderState.js +3 -6
  72. package/lib/stores/query/DataSpaceQueryBuilderState.js.map +1 -1
  73. package/lib/stores/query/DataSpaceQuerySetupStore.d.ts +1 -1
  74. package/lib/stores/query/DataSpaceQuerySetupStore.d.ts.map +1 -1
  75. package/lib/stores/query/DataSpaceQuerySetupStore.js +3 -6
  76. package/lib/stores/query/DataSpaceQuerySetupStore.js.map +1 -1
  77. package/lib/stores/query/DataSpaceTemplateQueryCreatorStore.d.ts +3 -2
  78. package/lib/stores/query/DataSpaceTemplateQueryCreatorStore.d.ts.map +1 -1
  79. package/lib/stores/query/DataSpaceTemplateQueryCreatorStore.js +9 -13
  80. package/lib/stores/query/DataSpaceTemplateQueryCreatorStore.js.map +1 -1
  81. package/lib/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.d.ts +61 -0
  82. package/lib/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.d.ts.map +1 -0
  83. package/lib/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.js +407 -0
  84. package/lib/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.js.map +1 -0
  85. package/package.json +11 -10
  86. package/src/__lib__/query/DSL_DataSpace_LegendQueryNavigation.ts +43 -9
  87. package/src/components/DSL_DataSpace_LegendApplicationPlugin.tsx +1 -0
  88. package/src/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.tsx +117 -3
  89. package/src/components/query/DataSpaceAdvancedSearchModal.tsx +4 -25
  90. package/src/components/query/DataSpaceQueryBuilder.tsx +3 -23
  91. package/src/components/query/DataSpaceQueryBuilderTemplateQueryPanelContent.tsx +1 -1
  92. package/src/components/query/DataSpaceQuerySetup.tsx +2 -24
  93. package/src/components/query/DataSpaceTemplateQueryCreator.tsx +6 -6
  94. package/src/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.tsx +18 -1
  95. package/src/components/studio/DataSpaceTemplateQueryPromoteReview.tsx +285 -0
  96. package/src/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.ts +2 -0
  97. package/src/graph-manager/action/analytics/DataSpaceAnalysis.ts +1 -0
  98. package/src/graph-manager/protocol/pure/DSL_DataSpace_PureGraphManagerExtension.ts +15 -0
  99. package/src/graph-manager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.ts +2 -0
  100. package/src/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.ts +66 -2
  101. package/src/graph-manager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.ts +2 -0
  102. package/src/graph-manager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.ts +2 -0
  103. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.ts +1 -0
  104. package/src/stores/query/DataSpaceAdvancedSearchState.ts +3 -11
  105. package/src/stores/query/DataSpaceQueryBuilderState.ts +3 -11
  106. package/src/stores/query/DataSpaceQuerySetupStore.ts +3 -11
  107. package/src/stores/query/DataSpaceTemplateQueryCreatorStore.ts +12 -24
  108. package/src/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.ts +636 -0
  109. package/tsconfig.json +2 -0
@@ -0,0 +1,407 @@
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 { GraphManagerState, } from '@finos/legend-graph';
17
+ import { StoreProjectData, ProjectDependencyCoordinates, ProjectVersionEntities, } from '@finos/legend-server-depot';
18
+ import { ActionState, assertErrorThrown, guaranteeNonNullable, LogEvent, } from '@finos/legend-shared';
19
+ import { generateDataSpaceQuerySetupRoute, generateDataSpaceTemplateQueryPromotionRoute, } from '../../__lib__/query/DSL_DataSpace_LegendQueryNavigation.js';
20
+ import {} from '@finos/legend-storage';
21
+ import { fetchProjectConfigurationStatus, generateEditorRoute, LEGEND_STUDIO_APP_EVENT, EditorStore, generateReviewRoute, } from '@finos/legend-application-studio';
22
+ import { DEFAULT_TAB_SIZE, ActionAlertType, ActionAlertActionType, } from '@finos/legend-application';
23
+ import { makeObservable, observable, computed, action, flow, flowResult, } from 'mobx';
24
+ import { Project, WorkspaceType, Workspace, ProjectConfiguration, EntityChangeType, } from '@finos/legend-server-sdlc';
25
+ import { DSL_DataSpace_getGraphManagerExtension, } from '../../graph-manager/protocol/pure/DSL_DataSpace_PureGraphManagerExtension.js';
26
+ import { DATA_SPACE_ELEMENT_CLASSIFIER_PATH } from '../../graph-manager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js';
27
+ const projectDependencyToProjectCoordinates = (projectDependency) => new ProjectDependencyCoordinates(guaranteeNonNullable(projectDependency.groupId), guaranteeNonNullable(projectDependency.artifactId), projectDependency.versionId);
28
+ const DEFAULT_WORKSPACE_NAME_PREFIX = 'promote-as-template-query';
29
+ export class DataSpaceTemplateQueryPromotionReviewerStore {
30
+ applicationStore;
31
+ sdlcServerClient;
32
+ depotServerClient;
33
+ graphManagerState;
34
+ initState = ActionState.create();
35
+ promoteState = ActionState.create();
36
+ loadQueryState = ActionState.create();
37
+ loadWorkspacesState = ActionState.create();
38
+ editorStore;
39
+ graphManagerExtension;
40
+ currentQuery;
41
+ currentQueryInfo;
42
+ currentQueryProject;
43
+ currentProject;
44
+ currentProjectConfiguration;
45
+ currentProjectConfigurationStatus;
46
+ currentProjectEntities = [];
47
+ dependencyEntities = [];
48
+ groupWorkspaces = [];
49
+ workspaceName = '';
50
+ dataSpacePath;
51
+ dataSpaceEntity;
52
+ templateQueryId = 'template_id';
53
+ templateQueryTitle = 'template_title';
54
+ templateQueryDescription = '';
55
+ constructor(applicationStore, sdlcServerClient, depotServerClient) {
56
+ makeObservable(this, {
57
+ editorStore: observable,
58
+ graphManagerExtension: observable,
59
+ currentQuery: observable,
60
+ currentQueryInfo: observable,
61
+ currentQueryProject: observable,
62
+ currentProject: observable,
63
+ currentProjectConfiguration: observable,
64
+ currentProjectConfigurationStatus: observable,
65
+ currentProjectEntities: observable,
66
+ dataSpaceEntity: observable,
67
+ groupWorkspaces: observable,
68
+ workspaceName: observable,
69
+ templateQueryId: observable,
70
+ templateQueryTitle: observable,
71
+ templateQueryDescription: observable,
72
+ isWorkspaceNameValid: computed,
73
+ isTemplateQueryIdValid: computed,
74
+ setWorkspaceName: action,
75
+ setTemplateQueryId: action,
76
+ setTemplateQueryTitle: action,
77
+ setTemplateQueryDescription: action,
78
+ initialize: flow,
79
+ loadQuery: flow,
80
+ loadProject: flow,
81
+ promoteAsTemplateQuery: flow,
82
+ });
83
+ this.applicationStore = applicationStore;
84
+ this.sdlcServerClient = sdlcServerClient;
85
+ this.depotServerClient = depotServerClient;
86
+ this.graphManagerState = new GraphManagerState(applicationStore.pluginManager, applicationStore.logService);
87
+ this.editorStore = new EditorStore(applicationStore, sdlcServerClient, depotServerClient);
88
+ this.graphManagerExtension = DSL_DataSpace_getGraphManagerExtension(this.editorStore.graphManagerState.graphManager);
89
+ }
90
+ setWorkspaceName(val) {
91
+ this.workspaceName = val;
92
+ }
93
+ setTemplateQueryId(val) {
94
+ this.templateQueryId = val;
95
+ }
96
+ setTemplateQueryTitle(val) {
97
+ this.templateQueryTitle = val;
98
+ }
99
+ setTemplateQueryDescription(val) {
100
+ this.templateQueryDescription = val;
101
+ }
102
+ get isWorkspaceNameValid() {
103
+ return !this.groupWorkspaces.some((ws) => ws.workspaceId === this.workspaceName);
104
+ }
105
+ get isTemplateQueryIdValid() {
106
+ if (this.dataSpaceEntity) {
107
+ return this.graphManagerExtension.IsTemplateQueryIdValid(this.dataSpaceEntity, this.templateQueryId);
108
+ }
109
+ return false;
110
+ }
111
+ *initialize(queryId, dataSpacePath) {
112
+ if (!this.initState.isInInitialState) {
113
+ return;
114
+ }
115
+ try {
116
+ this.initState.inProgress();
117
+ yield this.graphManagerState.graphManager.initialize({
118
+ env: this.applicationStore.config.env,
119
+ tabSize: DEFAULT_TAB_SIZE,
120
+ clientConfig: {
121
+ baseUrl: this.applicationStore.config.engineServerUrl,
122
+ queryBaseUrl: this.applicationStore.config.engineQueryServerUrl,
123
+ enableCompression: true,
124
+ },
125
+ }, {
126
+ tracerService: this.applicationStore.tracerService,
127
+ });
128
+ this.dataSpacePath = dataSpacePath;
129
+ if (queryId) {
130
+ let query;
131
+ try {
132
+ query = (yield this.graphManagerState.graphManager.getLightQuery(queryId));
133
+ }
134
+ catch {
135
+ query = undefined;
136
+ }
137
+ if (query) {
138
+ yield flowResult(this.loadQuery(query));
139
+ }
140
+ else {
141
+ this.applicationStore.navigationService.navigator.updateCurrentLocation(generateDataSpaceQuerySetupRoute());
142
+ }
143
+ }
144
+ if (this.currentQuery) {
145
+ this.currentQueryProject = StoreProjectData.serialization.fromJson((yield this.depotServerClient.getProject(this.currentQuery.groupId, this.currentQuery.artifactId)));
146
+ const projectData = (yield Promise.all([
147
+ this.depotServerClient.getVersionEntities(this.currentQuery.groupId, this.currentQuery.artifactId, this.currentQuery.versionId),
148
+ this.sdlcServerClient.getConfiguration(this.currentQueryProject.projectId, undefined),
149
+ ]));
150
+ const [currentProjectEntities, currentProjectConfiguration] = [
151
+ projectData[0],
152
+ ProjectConfiguration.serialization.fromJson(projectData[1]),
153
+ ];
154
+ this.currentProjectConfiguration = currentProjectConfiguration;
155
+ const dependencyEntities = (yield this.depotServerClient.collectDependencyEntities([
156
+ ...currentProjectConfiguration.projectDependencies,
157
+ ]
158
+ .map(projectDependencyToProjectCoordinates)
159
+ .map((p) => ProjectDependencyCoordinates.serialization.toJson(p)), true, true))
160
+ .map((p) => ProjectVersionEntities.serialization.fromJson(p))
161
+ .flatMap((info) => info.entities);
162
+ this.dependencyEntities = dependencyEntities;
163
+ this.currentProjectEntities = currentProjectEntities;
164
+ this.dataSpaceEntity = guaranteeNonNullable(currentProjectEntities.filter((entity) => entity.path === dataSpacePath &&
165
+ entity.classifierPath === DATA_SPACE_ELEMENT_CLASSIFIER_PATH)[0], `Can't find dataSpace entity with path ${this.dataSpaceEntity}`);
166
+ this.initState.pass();
167
+ }
168
+ }
169
+ catch (error) {
170
+ assertErrorThrown(error);
171
+ this.applicationStore.logService.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.GENERIC_FAILURE), error);
172
+ this.applicationStore.alertService.setBlockingAlert({
173
+ message: `Can't initialize template query promotion reviewer store`,
174
+ });
175
+ this.initState.fail();
176
+ }
177
+ }
178
+ *loadQuery(query) {
179
+ this.currentQuery = query;
180
+ this.templateQueryTitle = query.name;
181
+ try {
182
+ this.loadQueryState.inProgress();
183
+ this.currentQueryInfo =
184
+ (yield this.graphManagerState.graphManager.getQueryInfo(query.id));
185
+ this.currentQueryProject = StoreProjectData.serialization.fromJson((yield this.depotServerClient.getProject(this.currentQuery.groupId, this.currentQuery.artifactId)));
186
+ this.setWorkspaceName(`${DEFAULT_WORKSPACE_NAME_PREFIX}-${query.name}`);
187
+ this.applicationStore.navigationService.navigator.updateCurrentLocation(generateDataSpaceTemplateQueryPromotionRoute(this.currentQuery.groupId, this.currentQuery.artifactId, this.currentQuery.versionId, this.dataSpacePath, query.id));
188
+ const currentProject = Project.serialization.fromJson((yield this.sdlcServerClient.getProject(this.currentQueryProject.projectId)));
189
+ yield flowResult(this.loadProject(currentProject));
190
+ }
191
+ catch (error) {
192
+ assertErrorThrown(error);
193
+ this.applicationStore.notificationService.notifyError(error);
194
+ }
195
+ finally {
196
+ this.loadQueryState.complete();
197
+ }
198
+ }
199
+ *loadProject(project) {
200
+ this.currentProject = project;
201
+ this.currentProjectConfigurationStatus = undefined;
202
+ this.loadWorkspacesState.inProgress();
203
+ try {
204
+ this.currentProjectConfigurationStatus =
205
+ (yield fetchProjectConfigurationStatus(project.projectId, undefined, this.applicationStore, this.sdlcServerClient));
206
+ this.groupWorkspaces = (yield this.sdlcServerClient.getGroupWorkspaces(project.projectId))
207
+ .map((v) => Workspace.serialization.fromJson(v))
208
+ .filter((workspace) => workspace.workspaceType === WorkspaceType.GROUP);
209
+ this.loadWorkspacesState.pass();
210
+ }
211
+ catch (error) {
212
+ assertErrorThrown(error);
213
+ this.applicationStore.logService.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.SDLC_MANAGER_FAILURE), error);
214
+ this.applicationStore.notificationService.notifyError(error);
215
+ this.loadWorkspacesState.fail();
216
+ }
217
+ }
218
+ *promoteAsTemplateQuery() {
219
+ const query = this.currentQuery;
220
+ const project = this.currentProject;
221
+ if (this.promoteState.isInProgress ||
222
+ !query ||
223
+ !this.currentQueryInfo ||
224
+ !this.currentProjectConfiguration ||
225
+ !project ||
226
+ !this.workspaceName ||
227
+ !this.templateQueryTitle ||
228
+ !this.dataSpaceEntity ||
229
+ !this.isWorkspaceNameValid ||
230
+ !this.isTemplateQueryIdValid) {
231
+ return;
232
+ }
233
+ try {
234
+ this.promoteState.inProgress();
235
+ // 1. prepare project entities
236
+ this.applicationStore.alertService.setBlockingAlert({
237
+ message: `Fetching and updating project...`,
238
+ prompt: 'Please do not close the application',
239
+ showLoading: true,
240
+ });
241
+ // update datasapce entity
242
+ const updatedDataSpaceEntity = (yield this.graphManagerExtension.addNewExecutableToDataSpaceEntity(this.dataSpaceEntity, {
243
+ id: this.templateQueryId,
244
+ title: this.templateQueryTitle,
245
+ mapping: guaranteeNonNullable(this.currentQueryInfo).mapping,
246
+ runtime: guaranteeNonNullable(this.currentQueryInfo).runtime,
247
+ query: (yield this.graphManagerState.graphManager.pureCodeToLambda(this.currentQueryInfo.content)),
248
+ description: this.templateQueryDescription,
249
+ }));
250
+ guaranteeNonNullable(this.currentProjectEntities.filter((entity) => entity.path === this.dataSpacePath &&
251
+ entity.classifierPath === DATA_SPACE_ELEMENT_CLASSIFIER_PATH)[0]).content = updatedDataSpaceEntity.content;
252
+ // 2. check if the graph compiles properly
253
+ this.applicationStore.alertService.setBlockingAlert({
254
+ message: `Checking workspace compilation status...`,
255
+ prompt: 'Please do not close the application',
256
+ showLoading: true,
257
+ });
258
+ let compilationFailed = false;
259
+ try {
260
+ yield this.graphManagerState.graphManager.compileEntities([
261
+ ...this.dependencyEntities,
262
+ ...this.currentProjectEntities,
263
+ ]);
264
+ }
265
+ catch {
266
+ compilationFailed = true;
267
+ }
268
+ // 3. proceed to setup the workspace
269
+ const setupWorkspace = async () => {
270
+ let workspace;
271
+ try {
272
+ this.applicationStore.alertService.setBlockingAlert({
273
+ message: `Creating workspace...`,
274
+ prompt: 'Please do not close the application',
275
+ showLoading: true,
276
+ });
277
+ // i. create workspace
278
+ workspace = Workspace.serialization.fromJson(await this.sdlcServerClient.createWorkspace(project.projectId, undefined, this.workspaceName, WorkspaceType.GROUP));
279
+ // ii. update dataspace
280
+ this.applicationStore.alertService.setBlockingAlert({
281
+ message: `Generating code commit...`,
282
+ prompt: 'Please do not close the application',
283
+ showLoading: true,
284
+ });
285
+ await this.sdlcServerClient.performEntityChanges(project.projectId, workspace, {
286
+ message: 'promote-as-template-query: promote query as a template query to dataspace',
287
+ entityChanges: [
288
+ {
289
+ classifierPath: updatedDataSpaceEntity.classifierPath,
290
+ entityPath: updatedDataSpaceEntity.path,
291
+ content: updatedDataSpaceEntity.content,
292
+ type: EntityChangeType.MODIFY,
293
+ },
294
+ ],
295
+ });
296
+ // iii create review
297
+ this.applicationStore.alertService.setBlockingAlert({
298
+ message: `Generating code review...`,
299
+ prompt: 'Please do not close the application',
300
+ showLoading: true,
301
+ });
302
+ await flowResult(this.editorStore.initialize(project.projectId, undefined, workspace.workspaceId, workspace.workspaceType));
303
+ const workspaceReviewState = this.editorStore.workspaceReviewState;
304
+ const workspaceContainsSnapshotDependencies = this.editorStore.projectConfigurationEditorState
305
+ .containsSnapshotDependencies;
306
+ const isCreateReviewDisabled = Boolean(workspaceReviewState.workspaceReview) ||
307
+ workspaceContainsSnapshotDependencies ||
308
+ !workspaceReviewState.canCreateReview ||
309
+ workspaceReviewState.sdlcState.isActiveProjectSandbox;
310
+ workspaceReviewState.reviewTitle =
311
+ 'code review - promote query as a template query to dataspace';
312
+ if (!isCreateReviewDisabled) {
313
+ await flowResult(workspaceReviewState.createWorkspaceReview(workspaceReviewState.reviewTitle));
314
+ }
315
+ else {
316
+ this.applicationStore.notificationService.notifyError(`Can't create code review`);
317
+ }
318
+ // iv. complete, redirect user to the service query editor screen
319
+ this.applicationStore.alertService.setBlockingAlert(undefined);
320
+ this.promoteState.pass();
321
+ this.applicationStore.alertService.setActionAlertInfo({
322
+ message: `Successfully promoted query into dataspace '${this.dataSpacePath}'. Now your template query can be found in workspace '${this.workspaceName}' of project '${project.name}' (${project.projectId})`,
323
+ prompt: compilationFailed
324
+ ? `The workspace might not compile at the moment, please make sure to fix the issue and submit a review to make the dataspace part of the project to complete template query promotion`
325
+ : `Please make sure to get the generated code-review reviewed and approved`,
326
+ type: ActionAlertType.STANDARD,
327
+ actions: compilationFailed
328
+ ? [
329
+ {
330
+ label: 'Open Workspace',
331
+ type: ActionAlertActionType.PROCEED,
332
+ handler: () => {
333
+ this.applicationStore.navigationService.navigator.goToLocation(generateEditorRoute(project.projectId, undefined, this.workspaceName, WorkspaceType.GROUP));
334
+ },
335
+ default: true,
336
+ },
337
+ ]
338
+ : [
339
+ {
340
+ label: 'Open Code Review',
341
+ type: ActionAlertActionType.PROCEED,
342
+ handler: () => {
343
+ if (workspaceReviewState.workspaceReview) {
344
+ this.applicationStore.navigationService.navigator.visitAddress(this.applicationStore.navigationService.navigator.generateAddress(generateReviewRoute(workspaceReviewState.workspaceReview.projectId, workspaceReviewState.workspaceReview.id)));
345
+ }
346
+ },
347
+ default: true,
348
+ },
349
+ {
350
+ label: 'Open Workspace',
351
+ type: ActionAlertActionType.PROCEED,
352
+ handler: () => {
353
+ this.applicationStore.navigationService.navigator.goToLocation(generateEditorRoute(project.projectId, undefined, this.workspaceName, WorkspaceType.GROUP));
354
+ },
355
+ },
356
+ ],
357
+ });
358
+ }
359
+ catch (error) {
360
+ assertErrorThrown(error);
361
+ this.applicationStore.alertService.setBlockingAlert(undefined);
362
+ this.applicationStore.notificationService.notifyError(`Can't set up workspace: ${error.message}`);
363
+ if (workspace) {
364
+ await this.sdlcServerClient.deleteWorkspace(project.projectId, workspace);
365
+ }
366
+ this.promoteState.fail();
367
+ }
368
+ };
369
+ this.applicationStore.alertService.setBlockingAlert(undefined);
370
+ if (compilationFailed) {
371
+ this.applicationStore.alertService.setActionAlertInfo({
372
+ message: `We have found compilation issues with the workspace. Your query can still be promoted, but you would need to fix compilation issues afterwards`,
373
+ prompt: `Do you still want to proceed to promote the query as a template query?`,
374
+ type: ActionAlertType.STANDARD,
375
+ actions: [
376
+ {
377
+ label: `Proceed`,
378
+ type: ActionAlertActionType.PROCEED_WITH_CAUTION,
379
+ handler: () => {
380
+ setupWorkspace().catch(this.applicationStore.alertUnhandledError);
381
+ },
382
+ },
383
+ {
384
+ label: 'Abort',
385
+ type: ActionAlertActionType.PROCEED,
386
+ handler: () => {
387
+ this.promoteState.fail();
388
+ },
389
+ default: true,
390
+ },
391
+ ],
392
+ });
393
+ }
394
+ else {
395
+ yield setupWorkspace();
396
+ }
397
+ this.promoteState.pass();
398
+ }
399
+ catch (error) {
400
+ assertErrorThrown(error);
401
+ this.applicationStore.alertService.setBlockingAlert(undefined);
402
+ this.applicationStore.notificationService.notifyError(error);
403
+ this.promoteState.fail();
404
+ }
405
+ }
406
+ }
407
+ //# sourceMappingURL=DataSpaceTemplateQueryPromotionReviewerStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataSpaceTemplateQueryPromotionReviewerStore.js","sourceRoot":"","sources":["../../../src/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAIL,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,gBAAgB,EAChB,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,QAAQ,GAGT,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,gCAAgC,EAChC,4CAA4C,GAC7C,MAAM,4DAA4D,CAAC;AACpE,OAAO,EAAe,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAEL,+BAA+B,EAC/B,mBAAmB,EACnB,uBAAuB,EAEvB,WAAW,EACX,mBAAmB,GACpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,cAAc,EACd,UAAU,EACV,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,UAAU,GACX,MAAM,MAAM,CAAC;AACd,OAAO,EAGL,OAAO,EACP,aAAa,EACb,SAAS,EACT,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,sCAAsC,GACvC,MAAM,8EAA8E,CAAC;AACtF,OAAO,EAAE,kCAAkC,EAAE,MAAM,gFAAgF,CAAC;AAEpI,MAAM,qCAAqC,GAAG,CAC5C,iBAAoC,EACN,EAAE,CAChC,IAAI,4BAA4B,CAC9B,oBAAoB,CAAC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OAAO;4BACnC,OAAO,EAAE,GAAS,EAAE;gCAClB,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;4BAC3B,CAAC;4BACD,OAAO,EAAE,IAAI;yBACd;qBACF;iBACF,CAAC,CAAC;aACJ;iBAAM;gBACL,MAAM,cAAc,EAAE,CAAC;aACxB;YAED,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;SAC1B;QAAC,OAAO,KAAK,EAAE;YACd,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;YAC/D,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YAC7D,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;SAC1B;IACH,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-extension-dsl-data-space",
3
- "version": "10.1.96",
3
+ "version": "10.2.1",
4
4
  "description": "Legend extension for Data Space DSL",
5
5
  "keywords": [
6
6
  "legend",
@@ -44,15 +44,16 @@
44
44
  "test:watch": "jest --watch"
45
45
  },
46
46
  "dependencies": {
47
- "@finos/legend-application": "15.0.73",
48
- "@finos/legend-application-query": "13.3.0",
49
- "@finos/legend-application-studio": "28.16.8",
50
- "@finos/legend-art": "7.1.25",
51
- "@finos/legend-extension-dsl-diagram": "8.0.152",
52
- "@finos/legend-graph": "31.9.7",
53
- "@finos/legend-lego": "1.2.20",
54
- "@finos/legend-query-builder": "4.14.21",
55
- "@finos/legend-server-depot": "6.0.38",
47
+ "@finos/legend-application": "15.0.74",
48
+ "@finos/legend-application-query": "13.3.2",
49
+ "@finos/legend-application-studio": "28.16.10",
50
+ "@finos/legend-art": "7.1.26",
51
+ "@finos/legend-extension-dsl-diagram": "8.0.154",
52
+ "@finos/legend-graph": "31.9.9",
53
+ "@finos/legend-lego": "1.2.22",
54
+ "@finos/legend-query-builder": "4.14.23",
55
+ "@finos/legend-server-depot": "6.0.39",
56
+ "@finos/legend-server-sdlc": "5.3.10",
56
57
  "@finos/legend-shared": "10.0.34",
57
58
  "@finos/legend-storage": "3.0.84",
58
59
  "@types/react": "18.2.31",
@@ -29,7 +29,6 @@ export enum DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN {
29
29
  DATA_SPACE_PATH = 'dataSpacePath',
30
30
  EXECUTION_CONTEXT = 'executionContext',
31
31
  RUNTIME_PATH = 'runtimePath',
32
- TEMPLATE = 'template',
33
32
  }
34
33
 
35
34
  export enum DATA_SPACE_QUERY_CREATOR_QUERY_PARAM_TOKEN {
@@ -39,7 +38,14 @@ export enum DATA_SPACE_QUERY_CREATOR_QUERY_PARAM_TOKEN {
39
38
  export enum DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN {
40
39
  GAV = 'gav',
41
40
  DATA_SPACE_PATH = 'dataSpacePath',
42
- TEMPLATE_QUERY_TITLE = 'templateQueryTitle',
41
+ TEMPLATE = 'template',
42
+ TEMPLATE_QUERY_ID = 'templateQueryId',
43
+ }
44
+
45
+ export enum DATA_SPACE_TEMPLATE_QUERY_PROMOTION_ROUTE_PATTERN_TOKEN {
46
+ GAV = 'gav',
47
+ DATA_SPACE_PATH = 'dataSpacePath',
48
+ QUERY_ID = 'queryId',
43
49
  }
44
50
 
45
51
  export type DataSpaceQueryCreatorPathParams = {
@@ -52,7 +58,13 @@ export type DataSpaceQueryCreatorPathParams = {
52
58
  export type DataSpaceTemplateQueryCreatorPathParams = {
53
59
  [DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.GAV]: string;
54
60
  [DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH]: string;
55
- [DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.TEMPLATE_QUERY_TITLE]: string;
61
+ [DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.TEMPLATE_QUERY_ID]: string;
62
+ };
63
+
64
+ export type DataSpaceTemplateQueryPromotionReviewerPathParams = {
65
+ [DATA_SPACE_TEMPLATE_QUERY_PROMOTION_ROUTE_PATTERN_TOKEN.GAV]: string;
66
+ [DATA_SPACE_TEMPLATE_QUERY_PROMOTION_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH]: string;
67
+ [DATA_SPACE_TEMPLATE_QUERY_PROMOTION_ROUTE_PATTERN_TOKEN.QUERY_ID]: string;
56
68
  };
57
69
 
58
70
  export type DataSpaceQueryEditorQueryParams = {
@@ -62,7 +74,8 @@ export type DataSpaceQueryEditorQueryParams = {
62
74
  export const DATA_SPACE_QUERY_ROUTE_PATTERN = Object.freeze({
63
75
  SETUP: `/dataspace`,
64
76
  CREATE: `/dataspace/:${DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.GAV}/:${DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH}/:${DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.EXECUTION_CONTEXT}/:${DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.RUNTIME_PATH}?`,
65
- TEMPLATE_QUERY: `/dataspace/:${DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.GAV}/:${DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH}/:${DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.TEMPLATE}/:${DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.TEMPLATE_QUERY_TITLE}`,
77
+ TEMPLATE_QUERY: `/dataspace/:${DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.GAV}/:${DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH}/:${DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.TEMPLATE}/:${DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.TEMPLATE_QUERY_ID}`,
78
+ PROMOTE_TEMPLATE_QUERY: `/promote-template-query/:${DATA_SPACE_TEMPLATE_QUERY_PROMOTION_ROUTE_PATTERN_TOKEN.GAV}/:${DATA_SPACE_TEMPLATE_QUERY_PROMOTION_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH}/:${DATA_SPACE_TEMPLATE_QUERY_PROMOTION_ROUTE_PATTERN_TOKEN.QUERY_ID}?`,
66
79
  });
67
80
 
68
81
  export const generateDataSpaceQuerySetupRoute = (): string =>
@@ -106,7 +119,7 @@ export const generateDataSpaceTemplateQueryCreatorRoute = (
106
119
  artifactId: string,
107
120
  versionId: string,
108
121
  dataSpacePath: string,
109
- templateQueryTitle: string,
122
+ templateQueryId: string,
110
123
  ): string =>
111
124
  generatePath(
112
125
  generateExtensionUrlPattern(DATA_SPACE_QUERY_ROUTE_PATTERN.TEMPLATE_QUERY),
@@ -115,9 +128,30 @@ export const generateDataSpaceTemplateQueryCreatorRoute = (
115
128
  generateGAVCoordinates(groupId, artifactId, versionId),
116
129
  [DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH]:
117
130
  dataSpacePath,
118
- [DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.TEMPLATE]:
119
- DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.TEMPLATE,
120
- [DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.TEMPLATE_QUERY_TITLE]:
121
- templateQueryTitle,
131
+ [DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.TEMPLATE]:
132
+ DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.TEMPLATE,
133
+ [DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.TEMPLATE_QUERY_ID]:
134
+ templateQueryId,
135
+ },
136
+ );
137
+
138
+ export const generateDataSpaceTemplateQueryPromotionRoute = (
139
+ groupId: string,
140
+ artifactId: string,
141
+ versionId: string,
142
+ dataSpacePath: string,
143
+ queryId: string | undefined,
144
+ ): string =>
145
+ generatePath(
146
+ generateExtensionUrlPattern(
147
+ DATA_SPACE_QUERY_ROUTE_PATTERN.PROMOTE_TEMPLATE_QUERY,
148
+ ),
149
+ {
150
+ [DATA_SPACE_TEMPLATE_QUERY_PROMOTION_ROUTE_PATTERN_TOKEN.GAV]:
151
+ generateGAVCoordinates(groupId, artifactId, versionId),
152
+ [DATA_SPACE_TEMPLATE_QUERY_PROMOTION_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH]:
153
+ dataSpacePath,
154
+ [DATA_SPACE_TEMPLATE_QUERY_PROMOTION_ROUTE_PATTERN_TOKEN.QUERY_ID]:
155
+ queryId,
122
156
  },
123
157
  );
@@ -161,6 +161,7 @@ export class DSL_DataSpace_LegendApplicationPlugin
161
161
  ? executableTemplates.map(
162
162
  (e) =>
163
163
  ({
164
+ id: e.id,
164
165
  title: e.title,
165
166
  description: e.description,
166
167
  query: e.query,