@finos/legend-application-studio 28.18.146 → 28.18.148

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.
Files changed (78) hide show
  1. package/lib/components/editor/editor-group/EditorGroup.d.ts.map +1 -1
  2. package/lib/components/editor/editor-group/EditorGroup.js +10 -2
  3. package/lib/components/editor/editor-group/EditorGroup.js.map +1 -1
  4. package/lib/components/editor/editor-group/RuntimeEditor.d.ts.map +1 -1
  5. package/lib/components/editor/editor-group/RuntimeEditor.js +3 -1
  6. package/lib/components/editor/editor-group/RuntimeEditor.js.map +1 -1
  7. package/lib/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.d.ts.map +1 -1
  8. package/lib/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.js +3 -3
  9. package/lib/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
  10. package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.d.ts.map +1 -1
  11. package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.js +31 -7
  12. package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.js.map +1 -1
  13. package/lib/components/editor/editor-group/function-activator/FunctionEditor.d.ts.map +1 -1
  14. package/lib/components/editor/editor-group/function-activator/FunctionEditor.js +4 -1
  15. package/lib/components/editor/editor-group/function-activator/FunctionEditor.js.map +1 -1
  16. package/lib/components/editor/editor-group/ingest-editor/IngestDefinitionEditor.d.ts.map +1 -1
  17. package/lib/components/editor/editor-group/ingest-editor/IngestDefinitionEditor.js +21 -16
  18. package/lib/components/editor/editor-group/ingest-editor/IngestDefinitionEditor.js.map +1 -1
  19. package/lib/components/editor/ingest-definition-editor.css +1 -0
  20. package/lib/components/editor/ingest-definition-editor.css.map +1 -0
  21. package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
  22. package/lib/components/editor/side-bar/CreateNewElementModal.js +7 -7
  23. package/lib/components/editor/side-bar/CreateNewElementModal.js.map +1 -1
  24. package/lib/index.css +2 -2
  25. package/lib/index.css.map +1 -1
  26. package/lib/package.json +1 -1
  27. package/lib/stores/editor/GraphEditFormModeState.d.ts.map +1 -1
  28. package/lib/stores/editor/GraphEditFormModeState.js +1 -0
  29. package/lib/stores/editor/GraphEditFormModeState.js.map +1 -1
  30. package/lib/stores/editor/NewElementState.d.ts +2 -0
  31. package/lib/stores/editor/NewElementState.d.ts.map +1 -1
  32. package/lib/stores/editor/NewElementState.js +10 -2
  33. package/lib/stores/editor/NewElementState.js.map +1 -1
  34. package/lib/stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.d.ts.map +1 -1
  35. package/lib/stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.js +3 -2
  36. package/lib/stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.js.map +1 -1
  37. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts.map +1 -1
  38. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js +4 -1
  39. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js.map +1 -1
  40. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.d.ts.map +1 -1
  41. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.js +7 -33
  42. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.js.map +1 -1
  43. package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.js +1 -1
  44. package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.js.map +1 -1
  45. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts +1 -0
  46. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts.map +1 -1
  47. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js +3 -0
  48. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js.map +1 -1
  49. package/lib/stores/ingestion/IngestDeploymentServerClient.d.ts +2 -0
  50. package/lib/stores/ingestion/IngestDeploymentServerClient.d.ts.map +1 -1
  51. package/lib/stores/ingestion/IngestDeploymentServerClient.js +7 -3
  52. package/lib/stores/ingestion/IngestDeploymentServerClient.js.map +1 -1
  53. package/lib/stores/ingestion/IngestionDeploymentResponse.d.ts +1 -0
  54. package/lib/stores/ingestion/IngestionDeploymentResponse.d.ts.map +1 -1
  55. package/lib/stores/ingestion/IngestionDeploymentResponse.js +1 -0
  56. package/lib/stores/ingestion/IngestionDeploymentResponse.js.map +1 -1
  57. package/lib/stores/ingestion/IngestionManager.d.ts +1 -0
  58. package/lib/stores/ingestion/IngestionManager.d.ts.map +1 -1
  59. package/lib/stores/ingestion/IngestionManager.js +11 -1
  60. package/lib/stores/ingestion/IngestionManager.js.map +1 -1
  61. package/package.json +6 -6
  62. package/src/components/editor/editor-group/EditorGroup.tsx +19 -8
  63. package/src/components/editor/editor-group/RuntimeEditor.tsx +3 -1
  64. package/src/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.tsx +3 -2
  65. package/src/components/editor/editor-group/dataProduct/DataPoductEditor.tsx +111 -29
  66. package/src/components/editor/editor-group/function-activator/FunctionEditor.tsx +9 -2
  67. package/src/components/editor/editor-group/ingest-editor/IngestDefinitionEditor.tsx +82 -53
  68. package/src/components/editor/side-bar/CreateNewElementModal.tsx +38 -6
  69. package/src/stores/editor/GraphEditFormModeState.ts +1 -0
  70. package/src/stores/editor/NewElementState.ts +13 -2
  71. package/src/stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.ts +3 -2
  72. package/src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.ts +4 -1
  73. package/src/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.ts +9 -41
  74. package/src/stores/editor/panel-group/SQLPlaygroundPanelState.ts +1 -1
  75. package/src/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.ts +6 -0
  76. package/src/stores/ingestion/IngestDeploymentServerClient.ts +14 -3
  77. package/src/stores/ingestion/IngestionDeploymentResponse.ts +1 -0
  78. package/src/stores/ingestion/IngestionManager.ts +18 -1
@@ -47,10 +47,6 @@ import {
47
47
  } from '../ElementEditorInitialConfiguration.js';
48
48
  import type { AuthContextProps } from 'react-oidc-context';
49
49
  import { EXTERNAL_APPLICATION_NAVIGATION__generateUrlWithEditorConfig } from '../../../../../__lib__/LegendStudioNavigation.js';
50
- import {
51
- ActionAlertActionType,
52
- ActionAlertType,
53
- } from '@finos/legend-application';
54
50
  import { LEGEND_STUDIO_APP_EVENT } from '../../../../../__lib__/LegendStudioEvent.js';
55
51
 
56
52
  const createEditorInitialConfiguration = (): EditorInitialConfiguration => {
@@ -98,9 +94,12 @@ export class IngestDefinitionEditorState extends ElementEditorState {
98
94
  init_with_deploy: flow,
99
95
  deploy: flow,
100
96
  });
101
- const elementConfig = config?.elementEditorConfiguration;
102
- if (elementConfig instanceof IngestElementEditorInitialConfiguration) {
103
- this.deployOnOpen = elementConfig.deployOnOpen ?? false;
97
+ if (
98
+ config?.elementEditorConfiguration instanceof
99
+ IngestElementEditorInitialConfiguration
100
+ ) {
101
+ this.deployOnOpen =
102
+ config.elementEditorConfiguration.deployOnOpen ?? false;
104
103
  }
105
104
  }
106
105
 
@@ -170,44 +169,13 @@ export class IngestDefinitionEditorState extends ElementEditorState {
170
169
  this.editorStore.applicationStore.alertService.setBlockingAlert(
171
170
  undefined,
172
171
  );
173
- const deploymentResponse = response.deploymentResponse;
174
- if (deploymentResponse) {
172
+ if (response.deploymentResponse) {
175
173
  this.editorStore.applicationStore.logService.info(
176
174
  LogEvent.create(LEGEND_STUDIO_APP_EVENT.INGESTION_DEPLOY_SUCCESS_URN),
177
- deploymentResponse.ingestDefinitionUrn,
175
+ response.deploymentResponse.ingestDefinitionUrn,
178
176
  );
179
- this.editorStore.applicationStore.alertService.setActionAlertInfo({
180
- title: `Ingest Definition Deployment`,
181
- message: `Ingest definition deployed successfully. You may use URN for ingestion of Data`,
182
- prompt: `${deploymentResponse.ingestDefinitionUrn}`,
183
- type: ActionAlertType.STANDARD,
184
- actions: [
185
- {
186
- label: 'Copy URN',
187
- type: ActionAlertActionType.PROCEED,
188
- handler: (): void => {
189
- this.editorStore.applicationStore.clipboardService
190
- .copyTextToClipboard(deploymentResponse.ingestDefinitionUrn)
191
- .then(() =>
192
- this.editorStore.applicationStore.notificationService.notifySuccess(
193
- 'Ingest URN copied to clipboard',
194
- undefined,
195
- 2500,
196
- ),
197
- )
198
- .catch(this.editorStore.applicationStore.alertUnhandledError);
199
- },
200
- default: true,
201
- },
202
- {
203
- label: 'Close',
204
- type: ActionAlertActionType.PROCEED_WITH_CAUTION,
205
- },
206
- ],
207
- });
208
- } else {
209
- this.setValidateAndDeployResponse(response);
210
177
  }
178
+ this.setValidateAndDeployResponse(response);
211
179
  } catch (error) {
212
180
  this.editorStore.applicationStore.alertService.setBlockingAlert(
213
181
  undefined,
@@ -95,7 +95,7 @@ export class SQLPlaygroundPanelState implements CommandRegistrar {
95
95
  this.connection = val;
96
96
  if (val) {
97
97
  const connection = guaranteeRelationalDatabaseConnection(val);
98
- this.database = connection.store.value;
98
+ this.database = connection.store?.value;
99
99
  this.schemaExplorerState = new DatabaseSchemaExplorerState(
100
100
  this.editorStore,
101
101
  connection,
@@ -37,6 +37,12 @@ export const dataProduct_addAccessPoint = action(
37
37
  },
38
38
  );
39
39
 
40
+ export const accessPointGroup_setDescription = action(
41
+ (product: AccessPointGroup, description: string) => {
42
+ product.description = description;
43
+ },
44
+ );
45
+
40
46
  export const dataProduct_addAccessPointGroup = action(
41
47
  (product: DataProduct, accessPointGroup: AccessPointGroup) => {
42
48
  addUniqueEntry(
@@ -55,9 +55,11 @@ export class IngestDeploymentServerClient extends AbstractServerClient {
55
55
  private _dataProduct = (): string =>
56
56
  `${this.baseUrl}/${this.DATA_PRODUCT_URL}/api/entitlements/sdlc/deploy/definitions`;
57
57
 
58
- private _ingest = (): string =>
58
+ private _ingestDefinitions = (): string =>
59
59
  `${this.baseUrl}/api/ingest/sdlc/deploy/definitions`;
60
60
 
61
+ private _ingest = (): string => `${this.baseUrl}/api/ingest`;
62
+
61
63
  changeServer(serverConfig: IngestDeploymentServerConfig): void {
62
64
  this.baseUrl = serverConfig.ingestServerUrl;
63
65
  this.environmentClassification = serverConfig.environmentClassification;
@@ -68,7 +70,7 @@ export class IngestDeploymentServerClient extends AbstractServerClient {
68
70
  token: string | undefined,
69
71
  ): Promise<PlainObject<IngestDefinitionValidationResponse>> {
70
72
  return this.post(
71
- `${this._ingest()}/validate`,
73
+ `${this._ingestDefinitions()}/validate`,
72
74
  validateGrammar,
73
75
  undefined,
74
76
  this._tokenWithTextPlain(token),
@@ -80,13 +82,22 @@ export class IngestDeploymentServerClient extends AbstractServerClient {
80
82
  token: string | undefined,
81
83
  ): Promise<IngestDefinitionDeploymentResponse> {
82
84
  return this.post(
83
- `${this._ingest()}`,
85
+ `${this._ingestDefinitions()}`,
84
86
  deployGrammar,
85
87
  undefined,
86
88
  this._tokenWithTextPlain(token),
87
89
  );
88
90
  }
89
91
 
92
+ write_location(urn: string, token: string | undefined): Promise<PlainObject> {
93
+ return this.post(
94
+ `${this._ingest()}/${encodeURIComponent(urn)}/write-location`,
95
+ undefined,
96
+ undefined,
97
+ this._token(token),
98
+ );
99
+ }
100
+
90
101
  deployDataProduct(
91
102
  fullGrammar: string,
92
103
  token: string | undefined,
@@ -51,6 +51,7 @@ export const createIngestDefinitionValidationResponse = (
51
51
 
52
52
  export class IngestDefinitionDeploymentResponse {
53
53
  ingestDefinitionUrn!: string;
54
+ write_location: PlainObject | undefined;
54
55
 
55
56
  static readonly serialization = new SerializationFactory(
56
57
  createModelSchema(IngestDefinitionDeploymentResponse, {
@@ -115,7 +115,13 @@ export class IngestionManager {
115
115
  undefined,
116
116
  token,
117
117
  );
118
- fullResponse.deploymentResponse = deployResponse;
118
+ try {
119
+ messageCallBack(`Deployment Success. Fetching write location...`);
120
+ await this._fetchDeployLocations(deployResponse, token);
121
+ } catch (error) {
122
+ assertErrorThrown(error);
123
+ }
124
+
119
125
  return fullResponse;
120
126
  }
121
127
 
@@ -181,6 +187,17 @@ export class IngestionManager {
181
187
  return IngestDefinitionDeploymentResponse.serialization.fromJson(response);
182
188
  }
183
189
 
190
+ private async _fetchDeployLocations(
191
+ depploymentResponse: IngestDefinitionDeploymentResponse,
192
+ token: string | undefined,
193
+ ): Promise<void> {
194
+ const response = (await this.ingestDeploymentServerClient.write_location(
195
+ depploymentResponse.ingestDefinitionUrn,
196
+ token,
197
+ )) as unknown as PlainObject;
198
+ depploymentResponse.write_location = response;
199
+ }
200
+
184
201
  private async identifyIngestDeploymentServer(
185
202
  appDirNode: AppDirNode,
186
203
  token: string | undefined,