@finos/legend-extension-dsl-data-space 10.2.4 → 10.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (183) hide show
  1. package/lib/{components → __lib__}/query/DSL_DataSpace_LegendQueryDocumentation.d.ts +1 -1
  2. package/lib/__lib__/query/DSL_DataSpace_LegendQueryDocumentation.d.ts.map +1 -0
  3. package/lib/{components → __lib__}/query/DSL_DataSpace_LegendQueryDocumentation.js +4 -4
  4. package/lib/__lib__/query/DSL_DataSpace_LegendQueryDocumentation.js.map +1 -0
  5. package/lib/__lib__/shared/DSL_DataSpace_LegendNavigation.d.ts +15 -0
  6. package/lib/__lib__/shared/DSL_DataSpace_LegendNavigation.d.ts.map +1 -0
  7. package/lib/__lib__/shared/DSL_DataSpace_LegendNavigation.js +32 -0
  8. package/lib/__lib__/shared/DSL_DataSpace_LegendNavigation.js.map +1 -0
  9. package/lib/__lib__/to-delete/DSL_DataSpace_LegendQueryNavigation_to_delete.d.ts +38 -0
  10. package/lib/__lib__/to-delete/DSL_DataSpace_LegendQueryNavigation_to_delete.d.ts.map +1 -0
  11. package/lib/__lib__/{query/DSL_DataSpace_LegendQueryNavigation.js → to-delete/DSL_DataSpace_LegendQueryNavigation_to_delete.js} +33 -13
  12. package/lib/__lib__/to-delete/DSL_DataSpace_LegendQueryNavigation_to_delete.js.map +1 -0
  13. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js +3 -3
  14. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js.map +1 -1
  15. package/lib/components/index.d.ts +6 -4
  16. package/lib/components/index.d.ts.map +1 -1
  17. package/lib/components/index.js +6 -4
  18. package/lib/components/index.js.map +1 -1
  19. package/lib/components/query-builder/DataSpaceAdvancedSearchModal.d.ts.map +1 -0
  20. package/lib/components/query-builder/DataSpaceAdvancedSearchModal.js.map +1 -0
  21. package/lib/components/{query → query-builder}/DataSpaceQueryBuilder.d.ts +2 -5
  22. package/lib/components/query-builder/DataSpaceQueryBuilder.d.ts.map +1 -0
  23. package/lib/components/{query → query-builder}/DataSpaceQueryBuilder.js +5 -24
  24. package/lib/components/query-builder/DataSpaceQueryBuilder.js.map +1 -0
  25. package/lib/components/{query → query-builder}/DataSpaceQueryBuilderTemplateQueryPanelContent.d.ts +1 -1
  26. package/lib/components/query-builder/DataSpaceQueryBuilderTemplateQueryPanelContent.d.ts.map +1 -0
  27. package/lib/components/{query → query-builder}/DataSpaceQueryBuilderTemplateQueryPanelContent.js +4 -4
  28. package/lib/components/query-builder/DataSpaceQueryBuilderTemplateQueryPanelContent.js.map +1 -0
  29. package/lib/components/query-builder/QueryDataSpaceUtil.d.ts.map +1 -0
  30. package/lib/components/query-builder/QueryDataSpaceUtil.js.map +1 -0
  31. package/lib/components/{query → query-builder}/index.d.ts +3 -1
  32. package/lib/components/query-builder/index.d.ts.map +1 -0
  33. package/lib/components/{query → query-builder}/index.js +3 -1
  34. package/lib/components/query-builder/index.js.map +1 -0
  35. package/lib/components/shared/DSL_DataSpace_Icon.d.ts.map +1 -0
  36. package/lib/components/shared/DSL_DataSpace_Icon.js.map +1 -0
  37. package/lib/graph-manager/index.d.ts +4 -0
  38. package/lib/graph-manager/index.d.ts.map +1 -1
  39. package/lib/graph-manager/index.js +5 -0
  40. package/lib/graph-manager/index.js.map +1 -1
  41. package/lib/index.css +2 -2
  42. package/lib/index.css.map +1 -1
  43. package/lib/package.json +3 -8
  44. package/lib/stores/query/DataSpaceAdvancedSearchState.d.ts +1 -1
  45. package/lib/stores/query/DataSpaceAdvancedSearchState.d.ts.map +1 -1
  46. package/lib/stores/query/DataSpaceAdvancedSearchState.js +2 -3
  47. package/lib/stores/query/DataSpaceAdvancedSearchState.js.map +1 -1
  48. package/lib/stores/{query → query-builder}/DataSpaceQueryBuilderState.d.ts +2 -2
  49. package/lib/stores/query-builder/DataSpaceQueryBuilderState.d.ts.map +1 -0
  50. package/lib/stores/{query → query-builder}/DataSpaceQueryBuilderState.js +3 -3
  51. package/lib/stores/query-builder/DataSpaceQueryBuilderState.js.map +1 -0
  52. package/lib/stores/shared/DataSpaceInfo.d.ts.map +1 -0
  53. package/lib/stores/shared/DataSpaceInfo.js.map +1 -0
  54. package/lib/{__lib__/studio/DSL_DataSpace_LegendStudioDocumentation.d.ts → stores/shared/DataSpaceUtils.d.ts} +4 -5
  55. package/lib/stores/shared/DataSpaceUtils.d.ts.map +1 -0
  56. package/lib/stores/shared/DataSpaceUtils.js +32 -0
  57. package/lib/stores/shared/DataSpaceUtils.js.map +1 -0
  58. package/package.json +4 -9
  59. package/src/{components → __lib__}/query/DSL_DataSpace_LegendQueryDocumentation.ts +1 -1
  60. package/src/__lib__/shared/DSL_DataSpace_LegendNavigation.ts +57 -0
  61. package/src/__lib__/{query/DSL_DataSpace_LegendQueryNavigation.ts → to-delete/DSL_DataSpace_LegendQueryNavigation_to_delete.ts} +41 -46
  62. package/src/components/DSL_DataSpace_LegendApplicationPlugin.tsx +6 -6
  63. package/src/components/index.ts +15 -4
  64. package/src/components/{query → query-builder}/DataSpaceAdvancedSearchModal.tsx +1 -1
  65. package/src/components/{query → query-builder}/DataSpaceQueryBuilder.tsx +7 -68
  66. package/src/components/{query → query-builder}/DataSpaceQueryBuilderTemplateQueryPanelContent.tsx +5 -5
  67. package/src/components/{studio → query-builder}/index.ts +7 -1
  68. package/src/graph-manager/index.ts +6 -0
  69. package/src/stores/query/DataSpaceAdvancedSearchState.ts +8 -3
  70. package/src/stores/{query → query-builder}/DataSpaceQueryBuilderState.ts +6 -3
  71. package/src/stores/shared/DataSpaceUtils.ts +42 -0
  72. package/tsconfig.json +12 -26
  73. package/lib/__lib__/query/DSL_DataSpace_LegendQueryNavigation.d.ts +0 -65
  74. package/lib/__lib__/query/DSL_DataSpace_LegendQueryNavigation.d.ts.map +0 -1
  75. package/lib/__lib__/query/DSL_DataSpace_LegendQueryNavigation.js.map +0 -1
  76. package/lib/__lib__/studio/DSL_DataSpace_LegendStudioCodeSnippet.d.ts +0 -17
  77. package/lib/__lib__/studio/DSL_DataSpace_LegendStudioCodeSnippet.d.ts.map +0 -1
  78. package/lib/__lib__/studio/DSL_DataSpace_LegendStudioCodeSnippet.js +0 -54
  79. package/lib/__lib__/studio/DSL_DataSpace_LegendStudioCodeSnippet.js.map +0 -1
  80. package/lib/__lib__/studio/DSL_DataSpace_LegendStudioDocumentation.d.ts.map +0 -1
  81. package/lib/__lib__/studio/DSL_DataSpace_LegendStudioDocumentation.js +0 -21
  82. package/lib/__lib__/studio/DSL_DataSpace_LegendStudioDocumentation.js.map +0 -1
  83. package/lib/components/DSL_DataSpace_Icon.d.ts.map +0 -1
  84. package/lib/components/DSL_DataSpace_Icon.js.map +0 -1
  85. package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.d.ts +0 -29
  86. package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.d.ts.map +0 -1
  87. package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.js +0 -242
  88. package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.js.map +0 -1
  89. package/lib/components/query/DSL_DataSpace_LegendQueryDocumentation.d.ts.map +0 -1
  90. package/lib/components/query/DSL_DataSpace_LegendQueryDocumentation.js.map +0 -1
  91. package/lib/components/query/DataSpaceAdvancedSearchModal.d.ts.map +0 -1
  92. package/lib/components/query/DataSpaceAdvancedSearchModal.js.map +0 -1
  93. package/lib/components/query/DataSpaceQueryBuilder.d.ts.map +0 -1
  94. package/lib/components/query/DataSpaceQueryBuilder.js.map +0 -1
  95. package/lib/components/query/DataSpaceQueryBuilderTemplateQueryPanelContent.d.ts.map +0 -1
  96. package/lib/components/query/DataSpaceQueryBuilderTemplateQueryPanelContent.js.map +0 -1
  97. package/lib/components/query/DataSpaceQueryCreator.d.ts +0 -19
  98. package/lib/components/query/DataSpaceQueryCreator.d.ts.map +0 -1
  99. package/lib/components/query/DataSpaceQueryCreator.js +0 -41
  100. package/lib/components/query/DataSpaceQueryCreator.js.map +0 -1
  101. package/lib/components/query/DataSpaceQuerySetup.d.ts +0 -21
  102. package/lib/components/query/DataSpaceQuerySetup.d.ts.map +0 -1
  103. package/lib/components/query/DataSpaceQuerySetup.js +0 -63
  104. package/lib/components/query/DataSpaceQuerySetup.js.map +0 -1
  105. package/lib/components/query/DataSpaceTemplateQueryCreator.d.ts +0 -19
  106. package/lib/components/query/DataSpaceTemplateQueryCreator.d.ts.map +0 -1
  107. package/lib/components/query/DataSpaceTemplateQueryCreator.js +0 -37
  108. package/lib/components/query/DataSpaceTemplateQueryCreator.js.map +0 -1
  109. package/lib/components/query/QueryDataSpaceUtil.d.ts.map +0 -1
  110. package/lib/components/query/QueryDataSpaceUtil.js.map +0 -1
  111. package/lib/components/query/index.d.ts.map +0 -1
  112. package/lib/components/query/index.js.map +0 -1
  113. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts +0 -39
  114. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts.map +0 -1
  115. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js +0 -207
  116. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js.map +0 -1
  117. package/lib/components/studio/DataSpacePreviewAction.d.ts +0 -25
  118. package/lib/components/studio/DataSpacePreviewAction.d.ts.map +0 -1
  119. package/lib/components/studio/DataSpacePreviewAction.js +0 -53
  120. package/lib/components/studio/DataSpacePreviewAction.js.map +0 -1
  121. package/lib/components/studio/DataSpaceQueryAction.d.ts +0 -22
  122. package/lib/components/studio/DataSpaceQueryAction.d.ts.map +0 -1
  123. package/lib/components/studio/DataSpaceQueryAction.js +0 -29
  124. package/lib/components/studio/DataSpaceQueryAction.js.map +0 -1
  125. package/lib/components/studio/DataSpaceTemplateQueryPromoteReview.d.ts +0 -19
  126. package/lib/components/studio/DataSpaceTemplateQueryPromoteReview.d.ts.map +0 -1
  127. package/lib/components/studio/DataSpaceTemplateQueryPromoteReview.js +0 -81
  128. package/lib/components/studio/DataSpaceTemplateQueryPromoteReview.js.map +0 -1
  129. package/lib/components/studio/index.d.ts +0 -17
  130. package/lib/components/studio/index.d.ts.map +0 -1
  131. package/lib/components/studio/index.js +0 -17
  132. package/lib/components/studio/index.js.map +0 -1
  133. package/lib/stores/query/DataSpaceInfo.d.ts.map +0 -1
  134. package/lib/stores/query/DataSpaceInfo.js.map +0 -1
  135. package/lib/stores/query/DataSpaceQueryBuilderState.d.ts.map +0 -1
  136. package/lib/stores/query/DataSpaceQueryBuilderState.js.map +0 -1
  137. package/lib/stores/query/DataSpaceQueryCreatorStore.d.ts +0 -38
  138. package/lib/stores/query/DataSpaceQueryCreatorStore.d.ts.map +0 -1
  139. package/lib/stores/query/DataSpaceQueryCreatorStore.js +0 -149
  140. package/lib/stores/query/DataSpaceQueryCreatorStore.js.map +0 -1
  141. package/lib/stores/query/DataSpaceQuerySetupStore.d.ts +0 -51
  142. package/lib/stores/query/DataSpaceQuerySetupStore.d.ts.map +0 -1
  143. package/lib/stores/query/DataSpaceQuerySetupStore.js +0 -107
  144. package/lib/stores/query/DataSpaceQuerySetupStore.js.map +0 -1
  145. package/lib/stores/query/DataSpaceTemplateQueryCreatorStore.d.ts +0 -35
  146. package/lib/stores/query/DataSpaceTemplateQueryCreatorStore.d.ts.map +0 -1
  147. package/lib/stores/query/DataSpaceTemplateQueryCreatorStore.js +0 -108
  148. package/lib/stores/query/DataSpaceTemplateQueryCreatorStore.js.map +0 -1
  149. package/lib/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.d.ts +0 -61
  150. package/lib/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.d.ts.map +0 -1
  151. package/lib/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.js +0 -407
  152. package/lib/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.js.map +0 -1
  153. package/lib/stores/studio/DataSpacePreviewState.d.ts +0 -33
  154. package/lib/stores/studio/DataSpacePreviewState.d.ts.map +0 -1
  155. package/lib/stores/studio/DataSpacePreviewState.js +0 -117
  156. package/lib/stores/studio/DataSpacePreviewState.js.map +0 -1
  157. package/src/__lib__/studio/DSL_DataSpace_LegendStudioCodeSnippet.ts +0 -54
  158. package/src/__lib__/studio/DSL_DataSpace_LegendStudioDocumentation.ts +0 -20
  159. package/src/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.tsx +0 -445
  160. package/src/components/query/DataSpaceQueryCreator.tsx +0 -99
  161. package/src/components/query/DataSpaceQuerySetup.tsx +0 -165
  162. package/src/components/query/DataSpaceTemplateQueryCreator.tsx +0 -82
  163. package/src/components/query/index.ts +0 -17
  164. package/src/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.tsx +0 -297
  165. package/src/components/studio/DataSpacePreviewAction.tsx +0 -136
  166. package/src/components/studio/DataSpaceQueryAction.tsx +0 -34
  167. package/src/components/studio/DataSpaceTemplateQueryPromoteReview.tsx +0 -292
  168. package/src/stores/query/DataSpaceQueryCreatorStore.ts +0 -308
  169. package/src/stores/query/DataSpaceQuerySetupStore.ts +0 -205
  170. package/src/stores/query/DataSpaceTemplateQueryCreatorStore.ts +0 -207
  171. package/src/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.ts +0 -636
  172. package/src/stores/studio/DataSpacePreviewState.ts +0 -195
  173. /package/lib/components/{query → query-builder}/DataSpaceAdvancedSearchModal.d.ts +0 -0
  174. /package/lib/components/{query → query-builder}/DataSpaceAdvancedSearchModal.js +0 -0
  175. /package/lib/components/{query → query-builder}/QueryDataSpaceUtil.d.ts +0 -0
  176. /package/lib/components/{query → query-builder}/QueryDataSpaceUtil.js +0 -0
  177. /package/lib/components/{DSL_DataSpace_Icon.d.ts → shared/DSL_DataSpace_Icon.d.ts} +0 -0
  178. /package/lib/components/{DSL_DataSpace_Icon.js → shared/DSL_DataSpace_Icon.js} +0 -0
  179. /package/lib/stores/{query → shared}/DataSpaceInfo.d.ts +0 -0
  180. /package/lib/stores/{query → shared}/DataSpaceInfo.js +0 -0
  181. /package/src/components/{query → query-builder}/QueryDataSpaceUtil.ts +0 -0
  182. /package/src/components/{DSL_DataSpace_Icon.tsx → shared/DSL_DataSpace_Icon.tsx} +0 -0
  183. /package/src/stores/{query → shared}/DataSpaceInfo.ts +0 -0
@@ -1,108 +0,0 @@
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 { extractElementNameFromPath, } from '@finos/legend-graph';
17
- import { QueryEditorStore, createViewProjectHandler, createViewSDLCProjectHandler, } from '@finos/legend-application-query';
18
- import { StoreProjectData, } from '@finos/legend-server-depot';
19
- import { filterByType, guaranteeNonNullable, uuid } from '@finos/legend-shared';
20
- import { getDataSpace } from '../../graph-manager/DSL_DataSpace_GraphManagerHelper.js';
21
- import { DataSpaceQueryBuilderState, DataSpaceProjectInfo, } from './DataSpaceQueryBuilderState.js';
22
- import { generateDataSpaceTemplateQueryCreatorRoute } from '../../__lib__/query/DSL_DataSpace_LegendQueryNavigation.js';
23
- import { DataSpaceExecutableTemplate, } from '../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
24
- import { DSL_DataSpace_getGraphManagerExtension } from '../../graph-manager/protocol/pure/DSL_DataSpace_PureGraphManagerExtension.js';
25
- import { retrieveAnalyticsResultCache } from '../../graph-manager/action/analytics/DataSpaceAnalysisHelper.js';
26
- import { createQueryDataSpaceTaggedValue, createQueryClassTaggedValue, } from './DataSpaceQueryCreatorStore.js';
27
- export class DataSpaceTemplateQueryCreatorStore extends QueryEditorStore {
28
- groupId;
29
- artifactId;
30
- versionId;
31
- dataSpacePath;
32
- templateQueryId;
33
- templateQueryTitle;
34
- constructor(applicationStore, depotServerClient, groupId, artifactId, versionId, dataSpacePath, templateQueryId) {
35
- super(applicationStore, depotServerClient);
36
- this.groupId = groupId;
37
- this.artifactId = artifactId;
38
- this.versionId = versionId;
39
- this.dataSpacePath = dataSpacePath;
40
- this.templateQueryId = templateQueryId;
41
- }
42
- getProjectInfo() {
43
- return {
44
- groupId: this.groupId,
45
- artifactId: this.artifactId,
46
- versionId: this.versionId,
47
- };
48
- }
49
- async initializeQueryBuilderState() {
50
- const dataSpace = getDataSpace(this.dataSpacePath, this.graphManagerState.graph);
51
- const dataSpaceExecutableTemplate = guaranteeNonNullable(dataSpace.executables
52
- ?.filter(filterByType(DataSpaceExecutableTemplate))
53
- .find((executable) => executable.id === this.templateQueryId), `Can't find template query with id '${this.templateQueryId}'`);
54
- const executionContext = guaranteeNonNullable(dataSpaceExecutableTemplate.executionContextKey
55
- ? dataSpace.executionContexts.filter((ec) => ec.name === dataSpaceExecutableTemplate.executionContextKey)[0]
56
- : dataSpace.defaultExecutionContext, `Can't find execution context '${dataSpaceExecutableTemplate.executionContextKey}'`);
57
- this.templateQueryTitle = dataSpaceExecutableTemplate.title;
58
- let dataSpaceAnalysisResult;
59
- try {
60
- const project = StoreProjectData.serialization.fromJson(await this.depotServerClient.getProject(this.groupId, this.artifactId));
61
- dataSpaceAnalysisResult = await DSL_DataSpace_getGraphManagerExtension(this.graphManagerState.graphManager).retrieveDataSpaceAnalysisFromCache(() => retrieveAnalyticsResultCache(project, this.versionId, dataSpace.path, this.depotServerClient));
62
- }
63
- catch {
64
- // do nothing
65
- }
66
- const projectInfo = new DataSpaceProjectInfo(this.groupId, this.artifactId, this.versionId, createViewProjectHandler(this.applicationStore), createViewSDLCProjectHandler(this.applicationStore, this.depotServerClient));
67
- const sourceInfo = {
68
- groupId: projectInfo.groupId,
69
- artifactId: projectInfo.artifactId,
70
- versionId: projectInfo.versionId,
71
- dataSpace: dataSpace.path,
72
- };
73
- const queryBuilderState = new DataSpaceQueryBuilderState(this.applicationStore, this.graphManagerState, this.depotServerClient, dataSpace, executionContext, (dataSpaceInfo) => {
74
- this.applicationStore.notificationService.notifyWarning(`Can't switch data space to visit current template query`);
75
- }, true, dataSpaceAnalysisResult, (ec) => {
76
- this.applicationStore.navigationService.navigator.updateCurrentLocation(generateDataSpaceTemplateQueryCreatorRoute(this.groupId, this.artifactId, this.versionId, dataSpace.path, this.templateQueryId));
77
- }, undefined, undefined, projectInfo, this.applicationStore.config.options.queryBuilderConfig, sourceInfo);
78
- queryBuilderState.setExecutionContext(executionContext);
79
- queryBuilderState.propagateExecutionContextChange(executionContext);
80
- queryBuilderState.initializeWithQuery(dataSpaceExecutableTemplate.query);
81
- return queryBuilderState;
82
- }
83
- getPersistConfiguration(lambda, options) {
84
- return {
85
- defaultName: options?.update
86
- ? `${extractElementNameFromPath(this.dataSpacePath)}`
87
- : `New Query for ${extractElementNameFromPath(this.dataSpacePath)}[${this.templateQueryId}]`,
88
- decorator: (query) => {
89
- query.id = uuid();
90
- query.groupId = this.groupId;
91
- query.artifactId = this.artifactId;
92
- query.versionId = this.versionId;
93
- if (this.queryBuilderState?.class) {
94
- query.taggedValues = [
95
- createQueryDataSpaceTaggedValue(this.dataSpacePath),
96
- createQueryClassTaggedValue(this.queryBuilderState.class.path),
97
- ];
98
- }
99
- else {
100
- query.taggedValues = [
101
- createQueryDataSpaceTaggedValue(this.dataSpacePath),
102
- ];
103
- }
104
- },
105
- };
106
- }
107
- }
108
- //# sourceMappingURL=DataSpaceTemplateQueryCreatorStore.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataSpaceTemplateQueryCreatorStore.js","sourceRoot":"","sources":["../../../src/stores/query/DataSpaceTemplateQueryCreatorStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,0BAA0B,GAG3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAGhB,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,iCAAiC,CAAC;AACzC,OAAO,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B,CAAC,KAAK,CAAC,CAAC;QACzE,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED,uBAAuB,CACrB,MAAiB,EACjB,OAA0C;QAE1C,OAAO;YACL,WAAW,EAAE,OAAO,EAAE,MAAM;gBAC1B,CAAC,CAAC,GAAG,0BAA0B,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE;gBACrD,CAAC,CAAC,iBAAiB,0BAA0B,CAAC,IAAI,CAAC,aAAa,CAAC,IAC7D,IAAI,CAAC,eACP,GAAG;YACP,SAAS,EAAE,CAAC,KAAY,EAAQ,EAAE;gBAChC,KAAK,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC;gBAClB,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;gBAC7B,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;gBACnC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;gBACjC,IAAI,IAAI,CAAC,iBAAiB,EAAE,KAAK,EAAE;oBACjC,KAAK,CAAC,YAAY,GAAG;wBACnB,+BAA+B,CAAC,IAAI,CAAC,aAAa,CAAC;wBACnD,2BAA2B,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC;qBAC/D,CAAC;iBACH;qBAAM;oBACL,KAAK,CAAC,YAAY,GAAG;wBACnB,+BAA+B,CAAC,IAAI,CAAC,aAAa,CAAC;qBACpD,CAAC;iBACH;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF"}
@@ -1,61 +0,0 @@
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 LightQuery, type QueryInfo, GraphManagerState } from '@finos/legend-graph';
17
- import { type DepotServerClient, StoreProjectData } from '@finos/legend-server-depot';
18
- import { ActionState, type GeneratorFn } from '@finos/legend-shared';
19
- import { type Entity } from '@finos/legend-storage';
20
- import { type ProjectConfigurationStatus, type LegendStudioApplicationStore, EditorStore } from '@finos/legend-application-studio';
21
- import { type SDLCServerClient, Project, Workspace, ProjectConfiguration } from '@finos/legend-server-sdlc';
22
- import { type DSL_DataSpace_PureGraphManagerExtension } from '../../graph-manager/protocol/pure/DSL_DataSpace_PureGraphManagerExtension.js';
23
- export declare class DataSpaceTemplateQueryPromotionReviewerStore {
24
- readonly applicationStore: LegendStudioApplicationStore;
25
- readonly sdlcServerClient: SDLCServerClient;
26
- readonly depotServerClient: DepotServerClient;
27
- readonly graphManagerState: GraphManagerState;
28
- readonly initState: ActionState;
29
- readonly promoteState: ActionState;
30
- readonly loadQueryState: ActionState;
31
- readonly loadWorkspacesState: ActionState;
32
- editorStore: EditorStore;
33
- graphManagerExtension: DSL_DataSpace_PureGraphManagerExtension;
34
- currentQuery?: LightQuery | undefined;
35
- currentQueryInfo?: QueryInfo | undefined;
36
- currentQueryProject?: StoreProjectData | undefined;
37
- currentProject?: Project | undefined;
38
- currentProjectConfiguration?: ProjectConfiguration;
39
- currentProjectConfigurationStatus?: ProjectConfigurationStatus | undefined;
40
- currentProjectEntities: Entity[];
41
- dependencyEntities: Entity[];
42
- groupWorkspaces: Workspace[];
43
- workspaceName: string;
44
- dataSpacePath: string;
45
- dataSpaceEntity: Entity | undefined;
46
- templateQueryId: string;
47
- templateQueryTitle: string;
48
- templateQueryDescription: string;
49
- constructor(applicationStore: LegendStudioApplicationStore, sdlcServerClient: SDLCServerClient, depotServerClient: DepotServerClient);
50
- setWorkspaceName(val: string): void;
51
- setTemplateQueryId(val: string): void;
52
- setTemplateQueryTitle(val: string): void;
53
- setTemplateQueryDescription(val: string): void;
54
- get isWorkspaceNameValid(): boolean;
55
- get isTemplateQueryIdValid(): boolean;
56
- initialize(queryId: string | undefined, dataSpacePath: string): GeneratorFn<void>;
57
- loadQuery(query: LightQuery): GeneratorFn<void>;
58
- loadProject(project: Project): GeneratorFn<void>;
59
- promoteAsTemplateQuery(): GeneratorFn<void>;
60
- }
61
- //# sourceMappingURL=DataSpaceTemplateQueryPromotionReviewerStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataSpaceTemplateQueryPromotionReviewerStore.d.ts","sourceRoot":"","sources":["../../../src/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,UAAU,EACf,KAAK,SAAS,EAEd,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,iBAAiB,EACtB,gBAAgB,EAGjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,WAAW,EAIX,KAAK,WAAW,EAEjB,MAAM,sBAAsB,CAAC;AAK9B,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EACL,KAAK,0BAA0B,EAI/B,KAAK,4BAA4B,EACjC,WAAW,EAEZ,MAAM,kCAAkC,CAAC;AAc1C,OAAO,EACL,KAAK,gBAAgB,EAErB,OAAO,EAEP,SAAS,EACT,oBAAoB,EAErB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,uCAAuC,EAE7C,MAAM,8EAA8E,CAAC;AActF,qBAAa,4CAA4C;IACvD,QAAQ,CAAC,gBAAgB,EAAE,4BAA4B,CAAC;IACxD,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAC9C,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAC9C,QAAQ,CAAC,SAAS,cAA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KAAK,EAAE,UAAU,GAAG,WAAW,CAAC,IAAI,CAAC;IAwC/C,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC;IA+BhD,sBAAsB,IAAI,WAAW,CAAC,IAAI,CAAC;CAqQ7C"}
@@ -1,407 +0,0 @@
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
@@ -1 +0,0 @@
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,iBAAiB,CAAC,OAAO,CAAC,EAC/C,oBAAoB,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAClD,iBAAiB,CAAC,SAAS,CAC5B,CAAC;AAEJ,MAAM,6BAA6B,GAAG,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