@finos/legend-application-studio 28.10.0 → 28.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/editor/editor-group/EditorGroup.js +4 -4
- package/lib/components/editor/editor-group/EditorGroup.js.map +1 -1
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.d.ts.map +1 -1
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.js +2 -1
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.js.map +1 -1
- package/lib/components/editor/editor-group/end-to-end-flow-editor/{QueryConnectionWorkflowEditor.d.ts → ConnectionToQueryWorkflowEditor.d.ts} +7 -14
- package/lib/components/editor/editor-group/end-to-end-flow-editor/ConnectionToQueryWorkflowEditor.d.ts.map +1 -0
- package/lib/components/editor/editor-group/end-to-end-flow-editor/{QueryConnectionWorkflowEditor.js → ConnectionToQueryWorkflowEditor.js} +30 -25
- package/lib/components/editor/editor-group/end-to-end-flow-editor/ConnectionToQueryWorkflowEditor.js.map +1 -0
- package/lib/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.js +1 -1
- package/lib/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
- package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -1
- package/lib/components/editor/side-bar/Explorer.js +6 -6
- package/lib/components/editor/side-bar/Explorer.js.map +1 -1
- package/lib/components/editor/side-bar/end-to-end-workflow/EndToEndWorkflows.d.ts.map +1 -1
- package/lib/components/editor/side-bar/end-to-end-workflow/EndToEndWorkflows.js +6 -4
- package/lib/components/editor/side-bar/end-to-end-workflow/EndToEndWorkflows.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor/EditorStore.d.ts +1 -0
- package/lib/stores/editor/EditorStore.d.ts.map +1 -1
- package/lib/stores/editor/EditorStore.js +4 -0
- package/lib/stores/editor/EditorStore.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.js +2 -1
- package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/end-to-end-workflow-state/EndToEndWorkflowEditorState.d.ts +3 -3
- package/lib/stores/editor/editor-state/end-to-end-workflow-state/EndToEndWorkflowEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/end-to-end-workflow-state/EndToEndWorkflowEditorState.js +4 -6
- package/lib/stores/editor/editor-state/end-to-end-workflow-state/EndToEndWorkflowEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/end-to-end-workflow-state/QueryConnectionEndToEndWorkflowEditorState.d.ts +111 -0
- package/lib/stores/editor/editor-state/end-to-end-workflow-state/QueryConnectionEndToEndWorkflowEditorState.d.ts.map +1 -0
- package/lib/stores/editor/editor-state/end-to-end-workflow-state/QueryConnectionEndToEndWorkflowEditorState.js +453 -0
- package/lib/stores/editor/editor-state/end-to-end-workflow-state/QueryConnectionEndToEndWorkflowEditorState.js.map +1 -0
- package/lib/stores/editor/sidebar-state/end-to-end-workflow/GlobalEndToEndFlowState.d.ts +2 -91
- package/lib/stores/editor/sidebar-state/end-to-end-workflow/GlobalEndToEndFlowState.d.ts.map +1 -1
- package/lib/stores/editor/sidebar-state/end-to-end-workflow/GlobalEndToEndFlowState.js +8 -465
- package/lib/stores/editor/sidebar-state/end-to-end-workflow/GlobalEndToEndFlowState.js.map +1 -1
- package/package.json +5 -5
- package/src/components/editor/editor-group/EditorGroup.tsx +4 -4
- package/src/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.tsx +2 -1
- package/src/components/editor/editor-group/end-to-end-flow-editor/{QueryConnectionWorkflowEditor.tsx → ConnectionToQueryWorkflowEditor.tsx} +83 -43
- package/src/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.tsx +1 -1
- package/src/components/editor/side-bar/Explorer.tsx +7 -6
- package/src/components/editor/side-bar/end-to-end-workflow/EndToEndWorkflows.tsx +8 -7
- package/src/stores/editor/EditorStore.ts +5 -0
- package/src/stores/editor/editor-state/element-editor-state/ElementEditorState.ts +2 -1
- package/src/stores/editor/editor-state/end-to-end-workflow-state/EndToEndWorkflowEditorState.ts +4 -6
- package/src/stores/editor/{sidebar-state/end-to-end-workflow/GlobalEndToEndFlowState.tsx → editor-state/end-to-end-workflow-state/QueryConnectionEndToEndWorkflowEditorState.ts} +168 -277
- package/src/stores/editor/sidebar-state/end-to-end-workflow/GlobalEndToEndFlowState.ts +43 -0
- package/tsconfig.json +4 -3
- package/lib/components/editor/editor-group/end-to-end-flow-editor/QueryConnectionWorkflowEditor.d.ts.map +0 -1
- package/lib/components/editor/editor-group/end-to-end-flow-editor/QueryConnectionWorkflowEditor.js.map +0 -1
@@ -14,10 +14,19 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
-
import { action, flow, flowResult,
|
18
|
-
import
|
19
|
-
|
20
|
-
|
17
|
+
import { action, flow, flowResult, observable, makeObservable } from 'mobx';
|
18
|
+
import {
|
19
|
+
guaranteeNonNullable,
|
20
|
+
type GeneratorFn,
|
21
|
+
LogEvent,
|
22
|
+
assertErrorThrown,
|
23
|
+
ActionState,
|
24
|
+
getNonNullableEntry,
|
25
|
+
} from '@finos/legend-shared';
|
26
|
+
import {
|
27
|
+
END_TO_END_WORKFLOWS,
|
28
|
+
EndToEndWorkflowEditorState,
|
29
|
+
} from './EndToEndWorkflowEditorState.js';
|
21
30
|
import {
|
22
31
|
RelationalDatabaseConnection,
|
23
32
|
LocalH2DatasourceSpecification,
|
@@ -41,42 +50,32 @@ import {
|
|
41
50
|
CompilationError,
|
42
51
|
observe_RelationalDatabaseConnection,
|
43
52
|
} from '@finos/legend-graph';
|
44
|
-
import {
|
45
|
-
import {
|
46
|
-
guaranteeNonNullable,
|
47
|
-
type GeneratorFn,
|
48
|
-
LogEvent,
|
49
|
-
assertErrorThrown,
|
50
|
-
ActionState,
|
51
|
-
getNonNullableEntry,
|
52
|
-
} from '@finos/legend-shared';
|
53
|
-
import { DatabaseBuilderWizardState } from '../../editor-state/element-editor-state/connection/DatabaseBuilderWizardState.js';
|
53
|
+
import type { EditorStore } from '../../EditorStore.js';
|
54
|
+
import { BaseStepperState } from '@finos/legend-art';
|
54
55
|
import { LEGEND_STUDIO_APP_EVENT } from '../../../../__lib__/LegendStudioEvent.js';
|
55
|
-
import { DatabaseModelBuilderState } from '../../editor-state/element-editor-state/connection/DatabaseModelBuilderState.js';
|
56
56
|
import { EntityChangeType, type EntityChange } from '@finos/legend-server-sdlc';
|
57
57
|
import type { Entity } from '@finos/legend-storage';
|
58
|
+
import {
|
59
|
+
ClassQueryBuilderState,
|
60
|
+
QueryBuilderConfig,
|
61
|
+
} from '@finos/legend-query-builder';
|
58
62
|
import {
|
59
63
|
packageableConnection_setConnectionValue,
|
60
64
|
runtime_addIdentifiedConnection,
|
61
65
|
runtime_addMapping,
|
62
66
|
runtime_setMappings,
|
63
67
|
} from '../../../graph-modifier/DSL_Mapping_GraphModifierHelper.js';
|
64
|
-
import {
|
65
|
-
|
66
|
-
|
67
|
-
} from '
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
QueryConnectionRelationalConnectionEditor,
|
76
|
-
} from '../../../../components/editor/editor-group/end-to-end-flow-editor/QueryConnectionWorkflowEditor.js';
|
77
|
-
|
78
|
-
export enum SupportedEndToEndWorkflow {
|
79
|
-
CREATE_QUERY_FROM_CONNECTION = 'Create Query From Connection',
|
68
|
+
import { DatabaseModelBuilderState } from '../element-editor-state/connection/DatabaseModelBuilderState.js';
|
69
|
+
import { DatabaseBuilderWizardState } from '../element-editor-state/connection/DatabaseBuilderWizardState.js';
|
70
|
+
import { RelationalDatabaseConnectionValueState } from '../element-editor-state/connection/ConnectionEditorState.js';
|
71
|
+
import { DEFAULT_H2_SQL } from '../../NewElementState.js';
|
72
|
+
|
73
|
+
export enum QUERY_CONNECTION_WORKFLOW_STEPS {
|
74
|
+
CREATE_CONNECTION = 'Create Connection',
|
75
|
+
CREATE_DATABASE = 'Create Database',
|
76
|
+
EDIT_DATABASE = 'Edit Database',
|
77
|
+
CREATE_CLASS_MAPPING_RUNTIME = 'Create Class/Mapping/Runtime',
|
78
|
+
CONFIRMATION = 'Confirmation',
|
80
79
|
}
|
81
80
|
|
82
81
|
const DEFAULT_CONNECTION_PATH = 'store::MyConnection';
|
@@ -87,29 +86,32 @@ const JOIN_CODE_SYNTAX =
|
|
87
86
|
'// Join join_name(Table1.column1 = Table2.column2);' +
|
88
87
|
'\n';
|
89
88
|
|
89
|
+
export abstract class ConnectionToQueryStepperState extends BaseStepperState {
|
90
|
+
abstract override label: QUERY_CONNECTION_WORKFLOW_STEPS;
|
91
|
+
}
|
90
92
|
// step5 - confirm/update final grammar and query
|
91
|
-
export class QueryConnectionConfirmationAndGrammarEditorStepperState extends
|
92
|
-
|
93
|
+
export class QueryConnectionConfirmationAndGrammarEditorStepperState extends ConnectionToQueryStepperState {
|
94
|
+
workflowEditorState: QueryConnectionEndToEndWorkflowEditorState;
|
93
95
|
isCompilingCode = ActionState.create();
|
94
96
|
editorStore: EditorStore;
|
95
97
|
|
96
98
|
constructor(
|
97
|
-
queryConnectionEndToEndWorkflowState:
|
98
|
-
stepLabel: string,
|
99
|
+
queryConnectionEndToEndWorkflowState: QueryConnectionEndToEndWorkflowEditorState,
|
99
100
|
) {
|
100
|
-
super(
|
101
|
+
super();
|
101
102
|
makeObservable(this, {
|
102
|
-
|
103
|
-
stepLabel: observable,
|
103
|
+
workflowEditorState: false,
|
104
104
|
isCompilingCode: observable,
|
105
105
|
handleNext: flow,
|
106
106
|
query: flow,
|
107
107
|
compile: flow,
|
108
108
|
});
|
109
|
-
this.
|
110
|
-
|
111
|
-
|
112
|
-
|
109
|
+
this.workflowEditorState = queryConnectionEndToEndWorkflowState;
|
110
|
+
this.editorStore = this.workflowEditorState.editorStore;
|
111
|
+
}
|
112
|
+
|
113
|
+
get label(): QUERY_CONNECTION_WORKFLOW_STEPS {
|
114
|
+
return QUERY_CONNECTION_WORKFLOW_STEPS.CONFIRMATION;
|
113
115
|
}
|
114
116
|
|
115
117
|
*compile(): GeneratorFn<void> {
|
@@ -117,8 +119,8 @@ export class QueryConnectionConfirmationAndGrammarEditorStepperState extends Bas
|
|
117
119
|
this.isCompilingCode.inProgress();
|
118
120
|
const compilationResult = (yield flowResult(
|
119
121
|
yield this.editorStore.graphManagerState.graphManager.compileText(
|
120
|
-
this.
|
121
|
-
this.
|
122
|
+
this.workflowEditorState.finalGrammarCode,
|
123
|
+
this.workflowEditorState.workflowGraph,
|
122
124
|
),
|
123
125
|
)) as TextCompilationResult;
|
124
126
|
this.editorStore.applicationStore.notificationService.notifySuccess(
|
@@ -133,11 +135,11 @@ export class QueryConnectionConfirmationAndGrammarEditorStepperState extends Bas
|
|
133
135
|
ActionState.create(),
|
134
136
|
),
|
135
137
|
);
|
136
|
-
this.
|
137
|
-
this.
|
138
|
+
this.workflowEditorState.workflowGraph = newGraph;
|
139
|
+
this.workflowEditorState.setCompileError(undefined);
|
138
140
|
} catch (error) {
|
139
141
|
if (error instanceof ParserError || error instanceof CompilationError) {
|
140
|
-
this.
|
142
|
+
this.workflowEditorState.setCompileError(error);
|
141
143
|
}
|
142
144
|
assertErrorThrown(error);
|
143
145
|
this.editorStore.applicationStore.logService.error(
|
@@ -154,7 +156,7 @@ export class QueryConnectionConfirmationAndGrammarEditorStepperState extends Bas
|
|
154
156
|
*query(): GeneratorFn<void> {
|
155
157
|
const entities =
|
156
158
|
(yield this.editorStore.graphManagerState.graphManager.pureCodeToEntities(
|
157
|
-
this.
|
159
|
+
this.workflowEditorState.finalGrammarCode,
|
158
160
|
)) as Entity[];
|
159
161
|
const newEntities: EntityChange[] = [];
|
160
162
|
for (const entity of entities) {
|
@@ -171,19 +173,16 @@ export class QueryConnectionConfirmationAndGrammarEditorStepperState extends Bas
|
|
171
173
|
),
|
172
174
|
);
|
173
175
|
this.editorStore.tabManagerState.openTab(
|
174
|
-
this.
|
175
|
-
.
|
176
|
+
this.editorStore.globalEndToEndWorkflowState
|
177
|
+
.queryToConnectionWorkflowEditorState,
|
176
178
|
);
|
177
179
|
this.editorStore.tabManagerState.closeTab(
|
178
|
-
this.
|
179
|
-
.
|
180
|
+
this.editorStore.globalEndToEndWorkflowState
|
181
|
+
.queryToConnectionWorkflowEditorState,
|
180
182
|
);
|
181
183
|
const theClass = getMappingCompatibleClasses(
|
182
|
-
getNonNullableEntry(
|
183
|
-
|
184
|
-
0,
|
185
|
-
),
|
186
|
-
this.queryConnectionEndToEndWorkflowState.graph.classes,
|
184
|
+
getNonNullableEntry(this.workflowEditorState.workflowGraph.mappings, 0),
|
185
|
+
this.workflowEditorState.workflowGraph.classes,
|
187
186
|
)[0];
|
188
187
|
if (theClass) {
|
189
188
|
const config = new QueryBuilderConfig();
|
@@ -194,13 +193,13 @@ export class QueryConnectionConfirmationAndGrammarEditorStepperState extends Bas
|
|
194
193
|
);
|
195
194
|
queryBuilderState.class = theClass;
|
196
195
|
queryBuilderState.executionContextState.mapping = getNonNullableEntry(
|
197
|
-
this.
|
196
|
+
this.workflowEditorState.workflowGraph.mappings,
|
198
197
|
0,
|
199
198
|
);
|
200
199
|
queryBuilderState.executionContextState.runtimeValue = new RuntimePointer(
|
201
200
|
PackageableElementExplicitReference.create(
|
202
201
|
getNonNullableEntry(
|
203
|
-
this.
|
202
|
+
this.workflowEditorState.workflowGraph.runtimes,
|
204
203
|
0,
|
205
204
|
),
|
206
205
|
),
|
@@ -218,59 +217,45 @@ export class QueryConnectionConfirmationAndGrammarEditorStepperState extends Bas
|
|
218
217
|
|
219
218
|
override *handleNext(): GeneratorFn<void> {
|
220
219
|
yield flowResult(this.query()).then(() => {
|
221
|
-
this.
|
220
|
+
this.workflowEditorState.reset();
|
222
221
|
});
|
223
222
|
}
|
224
|
-
|
225
|
-
override renderStepContent(): React.ReactNode {
|
226
|
-
return (
|
227
|
-
<QueryConnectionConfirmationAndGrammarEditor
|
228
|
-
queryConnectionEndToEndWorkflowState={
|
229
|
-
this.queryConnectionEndToEndWorkflowState
|
230
|
-
}
|
231
|
-
queryConnectionConfirmationAndGrammarEditorStepperState={this}
|
232
|
-
/>
|
233
|
-
);
|
234
|
-
}
|
235
223
|
}
|
236
224
|
|
237
225
|
// step 4 - build class/mapping/runtime from database
|
238
|
-
export class DatabaseModelBuilderStepperState extends
|
239
|
-
|
226
|
+
export class DatabaseModelBuilderStepperState extends ConnectionToQueryStepperState {
|
227
|
+
workflowEditorState: QueryConnectionEndToEndWorkflowEditorState;
|
240
228
|
databaseModelBuilderState: DatabaseModelBuilderState;
|
241
229
|
editorStore: EditorStore;
|
242
230
|
|
243
231
|
constructor(
|
244
|
-
queryConnectionEndToEndWorkflowState:
|
245
|
-
stepLabel: string,
|
232
|
+
queryConnectionEndToEndWorkflowState: QueryConnectionEndToEndWorkflowEditorState,
|
246
233
|
databaseModelBuilderState: DatabaseModelBuilderState,
|
247
234
|
) {
|
248
|
-
super(
|
235
|
+
super();
|
249
236
|
makeObservable(this, {
|
250
|
-
|
251
|
-
stepLabel: observable,
|
237
|
+
workflowEditorState: false,
|
252
238
|
updateGraphWithModels: flow,
|
253
239
|
handleNext: flow,
|
254
240
|
});
|
255
|
-
this.
|
256
|
-
queryConnectionEndToEndWorkflowState;
|
241
|
+
this.workflowEditorState = queryConnectionEndToEndWorkflowState;
|
257
242
|
this.databaseModelBuilderState = databaseModelBuilderState;
|
258
|
-
this.editorStore =
|
259
|
-
|
243
|
+
this.editorStore = this.workflowEditorState.editorStore;
|
244
|
+
}
|
245
|
+
|
246
|
+
get label(): QUERY_CONNECTION_WORKFLOW_STEPS {
|
247
|
+
return QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_CLASS_MAPPING_RUNTIME;
|
260
248
|
}
|
261
249
|
|
262
250
|
*updateGraphWithModels(entities: Entity[]): GeneratorFn<void> {
|
263
251
|
try {
|
264
252
|
const newGraph = this.editorStore.graphManagerState.createNewGraph();
|
265
253
|
newGraph.addElement(
|
266
|
-
guaranteeNonNullable(
|
267
|
-
|
268
|
-
),
|
269
|
-
this.queryConnectionEndToEndWorkflowState.packageableConnection?.package
|
270
|
-
?.path,
|
254
|
+
guaranteeNonNullable(this.workflowEditorState.packageableConnection),
|
255
|
+
this.workflowEditorState.packageableConnection?.package?.path,
|
271
256
|
);
|
272
257
|
const databaseBuilderStepperState =
|
273
|
-
this.
|
258
|
+
this.workflowEditorState.activeStepToBaseStepperState.get(
|
274
259
|
QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_DATABASE,
|
275
260
|
) as DatabaseBuilderStepperState;
|
276
261
|
|
@@ -288,10 +273,9 @@ export class DatabaseModelBuilderStepperState extends BaseStepperState {
|
|
288
273
|
),
|
289
274
|
);
|
290
275
|
// create a runtime
|
291
|
-
if (this.
|
276
|
+
if (this.workflowEditorState.packageableRuntime) {
|
292
277
|
runtime_setMappings(
|
293
|
-
this.
|
294
|
-
.runtimeValue,
|
278
|
+
this.workflowEditorState.packageableRuntime.runtimeValue,
|
295
279
|
[
|
296
280
|
PackageableElementExplicitReference.create(
|
297
281
|
getNonNullableEntry(newGraph.mappings, 0),
|
@@ -301,7 +285,7 @@ export class DatabaseModelBuilderStepperState extends BaseStepperState {
|
|
301
285
|
} else {
|
302
286
|
const runtime = new PackageableRuntime(
|
303
287
|
extractElementNameFromPath(
|
304
|
-
this.
|
288
|
+
this.workflowEditorState.targetRuntimePath,
|
305
289
|
),
|
306
290
|
);
|
307
291
|
runtime.runtimeValue = new EngineRuntime();
|
@@ -316,26 +300,24 @@ export class DatabaseModelBuilderStepperState extends BaseStepperState {
|
|
316
300
|
new IdentifiedConnection(
|
317
301
|
generateIdentifiedConnectionId(runtime.runtimeValue),
|
318
302
|
guaranteeNonNullable(
|
319
|
-
this.
|
303
|
+
this.workflowEditorState.packageableConnection,
|
320
304
|
).connectionValue,
|
321
305
|
),
|
322
|
-
this.
|
323
|
-
.
|
306
|
+
this.workflowEditorState.editorStore.changeDetectionState
|
307
|
+
.observerContext,
|
324
308
|
);
|
325
|
-
this.
|
309
|
+
this.workflowEditorState.packageableRuntime = runtime;
|
326
310
|
}
|
327
311
|
newGraph.addElement(
|
328
|
-
this.
|
329
|
-
extractPackagePathFromPath(
|
330
|
-
this.queryConnectionEndToEndWorkflowState.targetRuntimePath,
|
331
|
-
),
|
312
|
+
this.workflowEditorState.packageableRuntime,
|
313
|
+
extractPackagePathFromPath(this.workflowEditorState.targetRuntimePath),
|
332
314
|
);
|
333
|
-
this.
|
334
|
-
this.
|
315
|
+
this.workflowEditorState.workflowGraph = newGraph;
|
316
|
+
this.workflowEditorState.setRuntimeGrammarCode(
|
335
317
|
(yield this.editorStore.graphManagerState.graphManager.entitiesToPureCode(
|
336
318
|
[
|
337
319
|
this.editorStore.graphManagerState.graphManager.elementToEntity(
|
338
|
-
this.
|
320
|
+
this.workflowEditorState.packageableRuntime,
|
339
321
|
),
|
340
322
|
],
|
341
323
|
{ pretty: true },
|
@@ -346,14 +328,13 @@ export class DatabaseModelBuilderStepperState extends BaseStepperState {
|
|
346
328
|
[
|
347
329
|
this.editorStore.graphManagerState.graphManager.elementToEntity(
|
348
330
|
guaranteeNonNullable(
|
349
|
-
this.
|
331
|
+
this.workflowEditorState.packageableConnection,
|
350
332
|
),
|
351
333
|
),
|
352
334
|
],
|
353
335
|
{ pretty: true },
|
354
336
|
)) as string;
|
355
|
-
this.
|
356
|
-
connectionGrammarCode;
|
337
|
+
this.workflowEditorState.connectionGrammarCode = connectionGrammarCode;
|
357
338
|
} catch (error) {
|
358
339
|
assertErrorThrown(error);
|
359
340
|
this.editorStore.applicationStore.logService.error(
|
@@ -365,75 +346,61 @@ export class DatabaseModelBuilderStepperState extends BaseStepperState {
|
|
365
346
|
}
|
366
347
|
|
367
348
|
override *handleNext(): GeneratorFn<void> {
|
368
|
-
this.
|
349
|
+
this.workflowEditorState.setFinalGrammarCode(
|
369
350
|
this.databaseModelBuilderState.generatedGrammarCode
|
370
|
-
.concat(this.
|
371
|
-
.concat(this.
|
372
|
-
.concat(
|
373
|
-
this.queryConnectionEndToEndWorkflowState.connectionGrammarCode,
|
374
|
-
),
|
351
|
+
.concat(this.workflowEditorState.runtimeGrammarCode)
|
352
|
+
.concat(this.workflowEditorState.databaseGrammarCode)
|
353
|
+
.concat(this.workflowEditorState.connectionGrammarCode),
|
375
354
|
);
|
376
|
-
this.
|
355
|
+
this.workflowEditorState.activeStepToBaseStepperState.set(
|
377
356
|
QUERY_CONNECTION_WORKFLOW_STEPS.CONFIRMATION,
|
378
357
|
new QueryConnectionConfirmationAndGrammarEditorStepperState(
|
379
|
-
this.
|
380
|
-
QUERY_CONNECTION_WORKFLOW_STEPS.CONFIRMATION,
|
358
|
+
this.workflowEditorState,
|
381
359
|
),
|
382
360
|
);
|
383
361
|
}
|
384
|
-
|
385
|
-
override renderStepContent(): React.ReactNode {
|
386
|
-
return (
|
387
|
-
<QueryConnectionModelsEditor
|
388
|
-
databaseModelBuilderStepperState={this}
|
389
|
-
queryConnectionEndToEndWorkflowState={
|
390
|
-
this.queryConnectionEndToEndWorkflowState
|
391
|
-
}
|
392
|
-
/>
|
393
|
-
);
|
394
|
-
}
|
395
362
|
}
|
396
363
|
|
397
364
|
// step 3 - database grammar editor
|
398
|
-
export class DatabaseGrammarEditorStepperState extends
|
399
|
-
|
365
|
+
export class DatabaseGrammarEditorStepperState extends ConnectionToQueryStepperState {
|
366
|
+
workflowEditorState: QueryConnectionEndToEndWorkflowEditorState;
|
400
367
|
isCompilingGrammarCode = ActionState.create();
|
401
368
|
editorStore: EditorStore;
|
402
369
|
|
403
370
|
constructor(
|
404
|
-
queryConnectionEndToEndWorkflowState:
|
405
|
-
stepLabel: string,
|
371
|
+
queryConnectionEndToEndWorkflowState: QueryConnectionEndToEndWorkflowEditorState,
|
406
372
|
) {
|
407
|
-
super(
|
373
|
+
super();
|
408
374
|
makeObservable(this, {
|
409
|
-
|
410
|
-
stepLabel: observable,
|
375
|
+
workflowEditorState: false,
|
411
376
|
isCompilingGrammarCode: observable,
|
412
377
|
buildDatabaseModelBuilderState: action,
|
413
378
|
compileDatabaseGrammarCode: flow,
|
414
379
|
handleNext: flow,
|
415
380
|
});
|
416
|
-
this.
|
417
|
-
|
418
|
-
|
419
|
-
|
381
|
+
this.workflowEditorState = queryConnectionEndToEndWorkflowState;
|
382
|
+
this.editorStore = this.workflowEditorState.editorStore;
|
383
|
+
}
|
384
|
+
|
385
|
+
get label(): QUERY_CONNECTION_WORKFLOW_STEPS {
|
386
|
+
return QUERY_CONNECTION_WORKFLOW_STEPS.EDIT_DATABASE;
|
420
387
|
}
|
421
388
|
|
422
389
|
*compileDatabaseGrammarCode(): GeneratorFn<void> {
|
423
390
|
try {
|
424
391
|
this.isCompilingGrammarCode.inProgress();
|
425
392
|
const databaseBuilderStepperState =
|
426
|
-
this.
|
393
|
+
this.workflowEditorState.activeStepToBaseStepperState.get(
|
427
394
|
QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_DATABASE,
|
428
395
|
) as DatabaseBuilderStepperState;
|
429
396
|
const connectionValueStepperState =
|
430
|
-
this.
|
397
|
+
this.workflowEditorState.activeStepToBaseStepperState.get(
|
431
398
|
QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_CONNECTION,
|
432
399
|
) as ConnectionValueStepperState;
|
433
400
|
const compilationResult = (yield flowResult(
|
434
401
|
yield this.editorStore.graphManagerState.graphManager.compileText(
|
435
|
-
this.
|
436
|
-
this.
|
402
|
+
this.workflowEditorState.databaseGrammarCode,
|
403
|
+
this.workflowEditorState.workflowGraph,
|
437
404
|
),
|
438
405
|
)) as TextCompilationResult;
|
439
406
|
this.editorStore.applicationStore.notificationService.notifySuccess(
|
@@ -449,17 +416,17 @@ export class DatabaseGrammarEditorStepperState extends BaseStepperState {
|
|
449
416
|
),
|
450
417
|
);
|
451
418
|
if (newGraph.databases.length > 1) {
|
452
|
-
this.
|
419
|
+
this.workflowEditorState.isValid = false;
|
453
420
|
this.editorStore.applicationStore.notificationService.notifyError(
|
454
421
|
'Please make sure there is only one databse',
|
455
422
|
);
|
456
423
|
} else {
|
457
|
-
this.
|
424
|
+
this.workflowEditorState.isValid = true;
|
458
425
|
}
|
459
426
|
// databaseBuilderWizardState.schemaExplorerState.database needs to be updated
|
460
427
|
databaseBuilderStepperState.databaseBuilderWizardState.schemaExplorerState.database =
|
461
428
|
getNonNullableEntry(newGraph.databases, 0);
|
462
|
-
this.
|
429
|
+
this.workflowEditorState.workflowGraph = newGraph;
|
463
430
|
// start building packageableConnection based on database and adding it to current graph
|
464
431
|
const packageableConnection = new PackageableConnection(
|
465
432
|
extractElementNameFromPath(
|
@@ -472,7 +439,7 @@ export class DatabaseGrammarEditorStepperState extends BaseStepperState {
|
|
472
439
|
.schemaExplorerState.database,
|
473
440
|
);
|
474
441
|
packageableConnection.package = getOrCreatePackage(
|
475
|
-
this.
|
442
|
+
this.workflowEditorState.workflowGraph.root,
|
476
443
|
connectionValueStepperState.targetConnectionPath,
|
477
444
|
true,
|
478
445
|
new Map(),
|
@@ -480,24 +447,23 @@ export class DatabaseGrammarEditorStepperState extends BaseStepperState {
|
|
480
447
|
packageableConnection_setConnectionValue(
|
481
448
|
packageableConnection,
|
482
449
|
connectionValueStepperState.connectionValueState.connection,
|
483
|
-
this.
|
484
|
-
.
|
450
|
+
this.workflowEditorState.editorStore.changeDetectionState
|
451
|
+
.observerContext,
|
485
452
|
);
|
486
|
-
this.
|
487
|
-
|
488
|
-
this.queryConnectionEndToEndWorkflowState.graph.addElement(
|
453
|
+
this.workflowEditorState.packageableConnection = packageableConnection;
|
454
|
+
this.workflowEditorState.workflowGraph.addElement(
|
489
455
|
packageableConnection,
|
490
456
|
extractPackagePathFromPath(
|
491
457
|
connectionValueStepperState.targetConnectionPath,
|
492
458
|
),
|
493
459
|
);
|
494
|
-
this.
|
460
|
+
this.workflowEditorState.setCompileError(undefined);
|
495
461
|
this.isCompilingGrammarCode.pass();
|
496
462
|
} catch (error) {
|
497
463
|
if (error instanceof ParserError || error instanceof CompilationError) {
|
498
|
-
this.
|
464
|
+
this.workflowEditorState.setCompileError(error);
|
499
465
|
}
|
500
|
-
this.
|
466
|
+
this.workflowEditorState.isValid = false;
|
501
467
|
assertErrorThrown(error);
|
502
468
|
this.editorStore.applicationStore.logService.error(
|
503
469
|
LogEvent.create(LEGEND_STUDIO_APP_EVENT.DATABASE_MODEL_BUILDER_FAILURE),
|
@@ -512,20 +478,19 @@ export class DatabaseGrammarEditorStepperState extends BaseStepperState {
|
|
512
478
|
|
513
479
|
buildDatabaseModelBuilderState(): void {
|
514
480
|
const databaseBuilderStepperState =
|
515
|
-
this.
|
481
|
+
this.workflowEditorState.activeStepToBaseStepperState.get(
|
516
482
|
QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_DATABASE,
|
517
483
|
) as DatabaseBuilderStepperState;
|
518
484
|
const databaseModelBuilderState = new DatabaseModelBuilderState(
|
519
485
|
this.editorStore,
|
520
486
|
databaseBuilderStepperState.databaseBuilderWizardState.schemaExplorerState.database,
|
521
487
|
false,
|
522
|
-
this.
|
488
|
+
this.workflowEditorState.workflowGraph,
|
523
489
|
);
|
524
|
-
this.
|
490
|
+
this.workflowEditorState.activeStepToBaseStepperState.set(
|
525
491
|
QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_CLASS_MAPPING_RUNTIME,
|
526
492
|
new DatabaseModelBuilderStepperState(
|
527
|
-
this.
|
528
|
-
QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_CLASS_MAPPING_RUNTIME,
|
493
|
+
this.workflowEditorState,
|
529
494
|
databaseModelBuilderState,
|
530
495
|
),
|
531
496
|
);
|
@@ -536,46 +501,35 @@ export class DatabaseGrammarEditorStepperState extends BaseStepperState {
|
|
536
501
|
this.buildDatabaseModelBuilderState();
|
537
502
|
});
|
538
503
|
}
|
539
|
-
|
540
|
-
override renderStepContent(): React.ReactNode {
|
541
|
-
return (
|
542
|
-
<QueryConnectionDatabaseGrammarEditor
|
543
|
-
queryConnectionEndToEndWorkflowState={
|
544
|
-
this.queryConnectionEndToEndWorkflowState
|
545
|
-
}
|
546
|
-
databaseGrammarEditorStepperState={this}
|
547
|
-
/>
|
548
|
-
);
|
549
|
-
}
|
550
504
|
}
|
551
505
|
|
552
506
|
// step 2 - build database
|
553
|
-
export class DatabaseBuilderStepperState extends
|
554
|
-
|
507
|
+
export class DatabaseBuilderStepperState extends ConnectionToQueryStepperState {
|
508
|
+
workflowEditorState: QueryConnectionEndToEndWorkflowEditorState;
|
555
509
|
databaseBuilderWizardState: DatabaseBuilderWizardState;
|
556
510
|
isGeneratingDatabaseGrammarCode = ActionState.create();
|
557
511
|
editorStore: EditorStore;
|
558
512
|
|
559
513
|
constructor(
|
560
|
-
queryConnectionEndToEndWorkflowState:
|
561
|
-
stepLabel: string,
|
514
|
+
queryConnectionEndToEndWorkflowState: QueryConnectionEndToEndWorkflowEditorState,
|
562
515
|
databaseBuilderWizardState: DatabaseBuilderWizardState,
|
563
516
|
) {
|
564
|
-
super(
|
517
|
+
super();
|
565
518
|
makeObservable(this, {
|
566
|
-
|
567
|
-
stepLabel: observable,
|
519
|
+
workflowEditorState: false,
|
568
520
|
databaseBuilderWizardState: observable,
|
569
521
|
isGeneratingDatabaseGrammarCode: observable,
|
570
522
|
handleNext: flow,
|
571
523
|
generateDatabaseGrammarCode: flow,
|
572
524
|
buildDatabase: flow,
|
573
525
|
});
|
574
|
-
this.
|
575
|
-
queryConnectionEndToEndWorkflowState;
|
526
|
+
this.workflowEditorState = queryConnectionEndToEndWorkflowState;
|
576
527
|
this.databaseBuilderWizardState = databaseBuilderWizardState;
|
577
|
-
this.editorStore =
|
578
|
-
|
528
|
+
this.editorStore = this.workflowEditorState.editorStore;
|
529
|
+
}
|
530
|
+
|
531
|
+
get label(): QUERY_CONNECTION_WORKFLOW_STEPS {
|
532
|
+
return QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_DATABASE;
|
579
533
|
}
|
580
534
|
|
581
535
|
*buildDatabase(): GeneratorFn<void> {
|
@@ -601,7 +555,7 @@ export class DatabaseBuilderStepperState extends BaseStepperState {
|
|
601
555
|
try {
|
602
556
|
this.isGeneratingDatabaseGrammarCode.inProgress();
|
603
557
|
// can't use this.databaseBuilderState.databaseGrammarCode as databaseGrammarCode might not be up to date
|
604
|
-
this.
|
558
|
+
this.workflowEditorState.setDatabaseGrammarCode(
|
605
559
|
JOIN_CODE_SYNTAX +
|
606
560
|
((yield this.editorStore.graphManagerState.graphManager.entitiesToPureCode(
|
607
561
|
[
|
@@ -627,51 +581,35 @@ export class DatabaseBuilderStepperState extends BaseStepperState {
|
|
627
581
|
override *handleNext(): GeneratorFn<void> {
|
628
582
|
yield flowResult(this.buildDatabase());
|
629
583
|
yield flowResult(this.generateDatabaseGrammarCode());
|
630
|
-
this.
|
584
|
+
this.workflowEditorState.activeStepToBaseStepperState.set(
|
631
585
|
QUERY_CONNECTION_WORKFLOW_STEPS.EDIT_DATABASE,
|
632
|
-
new DatabaseGrammarEditorStepperState(
|
633
|
-
this.queryConnectionEndToEndWorkflowState,
|
634
|
-
QUERY_CONNECTION_WORKFLOW_STEPS.EDIT_DATABASE,
|
635
|
-
),
|
636
|
-
);
|
637
|
-
}
|
638
|
-
|
639
|
-
override renderStepContent(): React.ReactNode {
|
640
|
-
return (
|
641
|
-
<QueryConnectionDatabaseBuilderEditor
|
642
|
-
databaseBuilderState={this.databaseBuilderWizardState}
|
643
|
-
/>
|
586
|
+
new DatabaseGrammarEditorStepperState(this.workflowEditorState),
|
644
587
|
);
|
645
588
|
}
|
646
589
|
}
|
647
590
|
|
648
591
|
// step 1 - build connection
|
649
|
-
export class ConnectionValueStepperState extends
|
650
|
-
|
592
|
+
export class ConnectionValueStepperState extends ConnectionToQueryStepperState {
|
593
|
+
workflowEditorState: QueryConnectionEndToEndWorkflowEditorState;
|
651
594
|
targetConnectionPath = DEFAULT_CONNECTION_PATH;
|
652
595
|
connectionValueState: RelationalDatabaseConnectionValueState;
|
653
596
|
|
654
|
-
constructor(
|
655
|
-
|
656
|
-
stepLabel: string,
|
657
|
-
) {
|
658
|
-
super(stepLabel);
|
597
|
+
constructor(workflowEditorState: QueryConnectionEndToEndWorkflowEditorState) {
|
598
|
+
super();
|
659
599
|
makeObservable(this, {
|
660
|
-
|
661
|
-
stepLabel: observable,
|
600
|
+
workflowEditorState: false,
|
662
601
|
targetConnectionPath: observable,
|
663
602
|
connectionValueState: observable,
|
664
603
|
setTargetConnectionPath: action,
|
665
604
|
handleNext: flow,
|
666
605
|
});
|
667
|
-
this.
|
668
|
-
queryConnectionEndToEndWorkflowState;
|
606
|
+
this.workflowEditorState = workflowEditorState;
|
669
607
|
this.connectionValueState = new RelationalDatabaseConnectionValueState(
|
670
|
-
this.
|
608
|
+
this.workflowEditorState.editorStore,
|
671
609
|
observe_RelationalDatabaseConnection(
|
672
610
|
this.createConnection,
|
673
|
-
this.
|
674
|
-
.
|
611
|
+
this.workflowEditorState.editorStore.changeDetectionState
|
612
|
+
.observerContext,
|
675
613
|
),
|
676
614
|
);
|
677
615
|
}
|
@@ -689,47 +627,37 @@ export class ConnectionValueStepperState extends BaseStepperState {
|
|
689
627
|
return connection;
|
690
628
|
}
|
691
629
|
|
630
|
+
get label(): QUERY_CONNECTION_WORKFLOW_STEPS {
|
631
|
+
return QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_CONNECTION;
|
632
|
+
}
|
633
|
+
|
692
634
|
setTargetConnectionPath(val: string): void {
|
693
635
|
this.targetConnectionPath = val;
|
694
636
|
}
|
695
637
|
|
696
638
|
override *handleNext(): GeneratorFn<void> {
|
697
639
|
const databaseBuilderWizardState = new DatabaseBuilderWizardState(
|
698
|
-
this.
|
640
|
+
this.workflowEditorState.editorStore,
|
699
641
|
this.connectionValueState.connection,
|
700
642
|
false,
|
701
643
|
);
|
702
644
|
databaseBuilderWizardState.schemaExplorerState.setMakeTargetDatabasePathEditable(
|
703
645
|
true,
|
704
646
|
);
|
705
|
-
this.
|
647
|
+
this.workflowEditorState.activeStepToBaseStepperState.set(
|
706
648
|
QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_DATABASE,
|
707
649
|
new DatabaseBuilderStepperState(
|
708
|
-
this.
|
709
|
-
QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_DATABASE,
|
650
|
+
this.workflowEditorState,
|
710
651
|
databaseBuilderWizardState,
|
711
652
|
),
|
712
653
|
);
|
713
654
|
}
|
714
|
-
|
715
|
-
override renderStepContent(): React.ReactNode {
|
716
|
-
return (
|
717
|
-
<QueryConnectionRelationalConnectionEditor
|
718
|
-
queryConnectionEndToEndWorkflowState={
|
719
|
-
this.queryConnectionEndToEndWorkflowState
|
720
|
-
}
|
721
|
-
connectionValueStepperState={this}
|
722
|
-
/>
|
723
|
-
);
|
724
|
-
}
|
725
655
|
}
|
726
656
|
|
727
|
-
export class
|
657
|
+
export class QueryConnectionEndToEndWorkflowEditorState extends EndToEndWorkflowEditorState {
|
728
658
|
activeStep: number;
|
729
659
|
activeStepToBaseStepperState = new Map<string, BaseStepperState>();
|
730
660
|
activeStepToStepLabel = new Map<number, string>();
|
731
|
-
globalEndToEndWorkflowState: GlobalEndToEndWorkflowState;
|
732
|
-
queryConnectionEndToEndWorkflowEditorState: QueryConnectionEndToEndWorkflowEditorState;
|
733
661
|
targetRuntimePath = DEFAULT_RUNTIME_PATH;
|
734
662
|
packageableConnection: PackageableConnection | undefined;
|
735
663
|
packageableRuntime: PackageableRuntime | undefined;
|
@@ -737,13 +665,13 @@ export class QueryConnectionEndToEndWorkflowState {
|
|
737
665
|
runtimeGrammarCode = '';
|
738
666
|
connectionGrammarCode = '';
|
739
667
|
finalGrammarCode = '';
|
740
|
-
|
668
|
+
workflowGraph: PureModel;
|
741
669
|
isValid: boolean;
|
742
670
|
compileError: ParserError | CompilationError | undefined;
|
743
671
|
|
744
|
-
constructor(
|
672
|
+
constructor(editorStore: EditorStore) {
|
673
|
+
super(editorStore);
|
745
674
|
makeObservable(this, {
|
746
|
-
globalEndToEndWorkflowState: false,
|
747
675
|
activeStep: observable,
|
748
676
|
activeStepToBaseStepperState: observable,
|
749
677
|
compileError: observable,
|
@@ -753,7 +681,6 @@ export class QueryConnectionEndToEndWorkflowState {
|
|
753
681
|
finalGrammarCode: observable,
|
754
682
|
targetRuntimePath: observable,
|
755
683
|
isValid: observable,
|
756
|
-
queryConnectionEndToEndWorkflowEditorState: observable,
|
757
684
|
packageableConnection: observable,
|
758
685
|
setActiveStep: action,
|
759
686
|
setDatabaseGrammarCode: action,
|
@@ -766,23 +693,18 @@ export class QueryConnectionEndToEndWorkflowState {
|
|
766
693
|
});
|
767
694
|
this.activeStep = 0;
|
768
695
|
this.isValid = true;
|
769
|
-
this.globalEndToEndWorkflowState = globalEndToEndWorkflowState;
|
770
696
|
this.activeStepToBaseStepperState.set(
|
771
697
|
QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_CONNECTION,
|
772
|
-
new ConnectionValueStepperState(
|
773
|
-
this,
|
774
|
-
QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_CONNECTION,
|
775
|
-
),
|
698
|
+
new ConnectionValueStepperState(this),
|
776
699
|
);
|
777
|
-
this.
|
778
|
-
new QueryConnectionEndToEndWorkflowEditorState(
|
779
|
-
this.globalEndToEndWorkflowState.editorStore,
|
780
|
-
);
|
781
|
-
this.graph =
|
782
|
-
this.globalEndToEndWorkflowState.editorStore.graphManagerState.createNewGraph();
|
700
|
+
this.workflowGraph = this.editorStore.graphManagerState.createNewGraph();
|
783
701
|
this.initactiveStepToStepLabel();
|
784
702
|
}
|
785
703
|
|
704
|
+
override get label(): string {
|
705
|
+
return END_TO_END_WORKFLOWS.CREATE_QUERY_FROM_CONNECTION;
|
706
|
+
}
|
707
|
+
|
786
708
|
initactiveStepToStepLabel(): void {
|
787
709
|
Object.values(QUERY_CONNECTION_WORKFLOW_STEPS).forEach((val, index) =>
|
788
710
|
this.activeStepToStepLabel.set(index, val),
|
@@ -816,7 +738,7 @@ export class QueryConnectionEndToEndWorkflowState {
|
|
816
738
|
*updateRuntime(newPath: string): GeneratorFn<void> {
|
817
739
|
if (this.packageableRuntime) {
|
818
740
|
this.packageableRuntime.package = getOrCreatePackage(
|
819
|
-
this.
|
741
|
+
this.workflowGraph.root,
|
820
742
|
extractPackagePathFromPath(newPath) ?? newPath,
|
821
743
|
true,
|
822
744
|
new Map(),
|
@@ -828,9 +750,9 @@ export class QueryConnectionEndToEndWorkflowState {
|
|
828
750
|
}
|
829
751
|
this.packageableRuntime.name = extractElementNameFromPath(newPath);
|
830
752
|
this.setRuntimeGrammarCode(
|
831
|
-
(yield this.
|
753
|
+
(yield this.editorStore.graphManagerState.graphManager.entitiesToPureCode(
|
832
754
|
[
|
833
|
-
this.
|
755
|
+
this.editorStore.graphManagerState.graphManager.elementToEntity(
|
834
756
|
this.packageableRuntime,
|
835
757
|
),
|
836
758
|
],
|
@@ -842,43 +764,12 @@ export class QueryConnectionEndToEndWorkflowState {
|
|
842
764
|
|
843
765
|
reset(): void {
|
844
766
|
this.activeStep = -1;
|
845
|
-
this.
|
846
|
-
this.globalEndToEndWorkflowState.editorStore.graphManagerState.createNewGraph();
|
767
|
+
this.workflowGraph = this.editorStore.graphManagerState.createNewGraph();
|
847
768
|
this.packageableConnection = undefined;
|
848
769
|
this.packageableRuntime = undefined;
|
849
770
|
this.activeStepToBaseStepperState.set(
|
850
771
|
QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_CONNECTION,
|
851
|
-
new ConnectionValueStepperState(
|
852
|
-
this,
|
853
|
-
QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_CONNECTION,
|
854
|
-
),
|
772
|
+
new ConnectionValueStepperState(this),
|
855
773
|
);
|
856
774
|
}
|
857
775
|
}
|
858
|
-
|
859
|
-
export class GlobalEndToEndWorkflowState {
|
860
|
-
editorStore: EditorStore;
|
861
|
-
queryConnectionEndToEndWorkflowState: QueryConnectionEndToEndWorkflowState;
|
862
|
-
queryConnectionEndToEndWorkflowEditorState: QueryConnectionEndToEndWorkflowEditorState;
|
863
|
-
|
864
|
-
constructor(editorStore: EditorStore) {
|
865
|
-
makeObservable(this, {
|
866
|
-
editorStore: false,
|
867
|
-
queryConnectionEndToEndWorkflowState: observable,
|
868
|
-
queryConnectionEndToEndWorkflowEditorState: observable,
|
869
|
-
});
|
870
|
-
this.editorStore = editorStore;
|
871
|
-
this.queryConnectionEndToEndWorkflowState =
|
872
|
-
new QueryConnectionEndToEndWorkflowState(this);
|
873
|
-
this.queryConnectionEndToEndWorkflowEditorState =
|
874
|
-
new QueryConnectionEndToEndWorkflowEditorState(this.editorStore);
|
875
|
-
}
|
876
|
-
|
877
|
-
visitWorkflow(workflow: string): void {
|
878
|
-
if (workflow === SupportedEndToEndWorkflow.CREATE_QUERY_FROM_CONNECTION) {
|
879
|
-
this.editorStore.tabManagerState.openTab(
|
880
|
-
this.queryConnectionEndToEndWorkflowEditorState,
|
881
|
-
);
|
882
|
-
}
|
883
|
-
}
|
884
|
-
}
|