@finos/legend-application-studio 27.1.0 → 27.1.2
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/__lib__/LegendStudioEvent.d.ts +1 -0
- package/lib/__lib__/LegendStudioEvent.d.ts.map +1 -1
- package/lib/__lib__/LegendStudioEvent.js +1 -0
- package/lib/__lib__/LegendStudioEvent.js.map +1 -1
- package/lib/components/editor/editor-group/FunctionEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/FunctionEditor.js +28 -24
- package/lib/components/editor/editor-group/FunctionEditor.js.map +1 -1
- package/lib/components/editor/editor-group/connection-editor/{DatabaseBuilder.d.ts → DatabaseBuilderWizard.d.ts} +4 -11
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.d.ts.map +1 -0
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.js +48 -0
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.js.map +1 -0
- package/lib/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.d.ts +32 -0
- package/lib/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.d.ts.map +1 -0
- package/lib/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.js +99 -0
- package/lib/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.js.map +1 -0
- package/lib/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.js +1 -1
- package/lib/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
- package/lib/components/editor/editor-group/data-editor/EmbeddedDataEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/data-editor/EmbeddedDataEditor.js +5 -4
- package/lib/components/editor/editor-group/data-editor/EmbeddedDataEditor.js.map +1 -1
- package/lib/components/editor/editor-group/data-editor/RelationalCSVDataEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/data-editor/RelationalCSVDataEditor.js +62 -12
- package/lib/components/editor/editor-group/data-editor/RelationalCSVDataEditor.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.d.ts +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.js +101 -137
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.js.map +1 -1
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.d.ts +11 -0
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.d.ts.map +1 -1
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.js +27 -2
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.js.map +1 -1
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.d.ts +0 -7
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.d.ts.map +1 -1
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.js +20 -77
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.js.map +1 -1
- package/lib/components/editor/side-bar/Explorer.js +3 -3
- package/lib/components/editor/side-bar/Explorer.js.map +1 -1
- package/lib/components/editor/side-bar/WorkflowManager.d.ts.map +1 -1
- package/lib/components/editor/side-bar/WorkflowManager.js +6 -1
- package/lib/components/editor/side-bar/WorkflowManager.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +3 -3
- package/lib/stores/editor/ExplorerTreeState.d.ts +4 -4
- package/lib/stores/editor/ExplorerTreeState.d.ts.map +1 -1
- package/lib/stores/editor/ExplorerTreeState.js +4 -4
- package/lib/stores/editor/ExplorerTreeState.js.map +1 -1
- package/lib/stores/editor/NewElementState.d.ts.map +1 -1
- package/lib/stores/editor/NewElementState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.d.ts +12 -12
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.js +45 -46
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts +20 -29
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js +60 -141
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderWizardState.d.ts +33 -0
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderWizardState.d.ts.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderWizardState.js +71 -0
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderWizardState.js.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/data/DataEditorState.d.ts +2 -2
- package/lib/stores/editor/editor-state/element-editor-state/data/DataEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/data/DataEditorState.js +2 -2
- package/lib/stores/editor/editor-state/element-editor-state/data/DataEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.d.ts +14 -19
- package/lib/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.js +30 -65
- package/lib/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts +56 -78
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js +285 -384
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.d.ts +23 -0
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.d.ts.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.js +129 -0
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.js.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceEditorState.js +2 -2
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.js +12 -2
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.js +15 -8
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.d.ts +7 -4
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.js +53 -10
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.d.ts +2 -1
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.js +20 -16
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.js.map +1 -1
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.d.ts +3 -48
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.d.ts.map +1 -1
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.js +12 -350
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.js.map +1 -1
- package/lib/stores/editor/sidebar-state/WorkflowManagerState.d.ts +5 -0
- package/lib/stores/editor/sidebar-state/WorkflowManagerState.d.ts.map +1 -1
- package/lib/stores/editor/sidebar-state/WorkflowManagerState.js +26 -0
- package/lib/stores/editor/sidebar-state/WorkflowManagerState.js.map +1 -1
- package/lib/stores/editor/sidebar-state/testable/GlobalTestRunnerState.d.ts +1 -1
- package/lib/stores/editor/sidebar-state/testable/GlobalTestRunnerState.d.ts.map +1 -1
- package/lib/stores/editor/sidebar-state/testable/GlobalTestRunnerState.js +3 -0
- package/lib/stores/editor/sidebar-state/testable/GlobalTestRunnerState.js.map +1 -1
- package/lib/stores/editor/utils/MockDataUtils.d.ts.map +1 -1
- package/lib/stores/editor/utils/MockDataUtils.js +3 -0
- package/lib/stores/editor/utils/MockDataUtils.js.map +1 -1
- package/lib/stores/editor/utils/TestableUtils.d.ts +11 -1
- package/lib/stores/editor/utils/TestableUtils.d.ts.map +1 -1
- package/lib/stores/editor/utils/TestableUtils.js +50 -1
- package/lib/stores/editor/utils/TestableUtils.js.map +1 -1
- package/lib/stores/graph-modifier/DSL_Mapping_GraphModifierHelper.d.ts +5 -4
- package/lib/stores/graph-modifier/DSL_Mapping_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/graph-modifier/DSL_Mapping_GraphModifierHelper.js +4 -1
- package/lib/stores/graph-modifier/DSL_Mapping_GraphModifierHelper.js.map +1 -1
- package/package.json +9 -9
- package/src/__lib__/LegendStudioEvent.ts +1 -1
- package/src/components/editor/editor-group/FunctionEditor.tsx +133 -118
- package/src/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.tsx +191 -0
- package/src/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.tsx +227 -0
- package/src/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.tsx +1 -1
- package/src/components/editor/editor-group/data-editor/EmbeddedDataEditor.tsx +34 -37
- package/src/components/editor/editor-group/data-editor/RelationalCSVDataEditor.tsx +134 -31
- package/src/components/editor/editor-group/mapping-editor/MappingTestableEditor.tsx +296 -414
- package/src/components/editor/editor-group/testable/TestableSharedComponents.tsx +88 -3
- package/src/components/editor/panel-group/SQLPlaygroundPanel.tsx +47 -211
- package/src/components/editor/side-bar/Explorer.tsx +3 -3
- package/src/components/editor/side-bar/WorkflowManager.tsx +10 -0
- package/src/stores/editor/ExplorerTreeState.ts +6 -9
- package/src/stores/editor/NewElementState.ts +0 -1
- package/src/stores/editor/editor-state/element-editor-state/FunctionEditorState.ts +44 -50
- package/src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.ts +88 -212
- package/src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderWizardState.ts +102 -0
- package/src/stores/editor/editor-state/element-editor-state/data/DataEditorState.ts +7 -1
- package/src/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.ts +48 -77
- package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.ts +407 -617
- package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.ts +243 -0
- package/src/stores/editor/editor-state/element-editor-state/service/ServiceEditorState.ts +6 -2
- package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +18 -1
- package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.ts +20 -12
- package/src/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.ts +76 -18
- package/src/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.ts +29 -24
- package/src/stores/editor/panel-group/SQLPlaygroundPanelState.ts +13 -533
- package/src/stores/editor/sidebar-state/WorkflowManagerState.ts +47 -0
- package/src/stores/editor/sidebar-state/testable/GlobalTestRunnerState.ts +4 -1
- package/src/stores/editor/utils/MockDataUtils.ts +2 -0
- package/src/stores/editor/utils/TestableUtils.ts +73 -0
- package/src/stores/graph-modifier/DSL_Mapping_GraphModifierHelper.ts +15 -12
- package/tsconfig.json +4 -1
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilder.d.ts.map +0 -1
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilder.js +0 -133
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilder.js.map +0 -1
- package/src/components/editor/editor-group/connection-editor/DatabaseBuilder.tsx +0 -397
@@ -13,66 +13,14 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { assertErrorThrown, LogEvent,
|
16
|
+
import { assertErrorThrown, LogEvent, getNullableLastEntry, } from '@finos/legend-shared';
|
17
17
|
import { observable, makeObservable, flow, flowResult, action } from 'mobx';
|
18
18
|
import { editor as monacoEditorAPI } from 'monaco-editor';
|
19
|
-
import {
|
20
|
-
import { LEGEND_STUDIO_APP_EVENT } from '../../../__lib__/LegendStudioEvent.js';
|
19
|
+
import { guaranteeRelationalDatabaseConnection, GRAPH_MANAGER_EVENT, } from '@finos/legend-graph';
|
21
20
|
import { CODE_EDITOR_LANGUAGE, moveCursorToPosition, } from '@finos/legend-lego/code-editor';
|
22
21
|
import { STO_RELATIONAL_LEGEND_STUDIO_COMMAND_KEY } from '../../../__lib__/STO_Relational_LegendStudioCommand.js';
|
23
22
|
import { PANEL_MODE } from '../EditorConfig.js';
|
24
|
-
import {
|
25
|
-
export class DatabaseSchemaExplorerTreeNodeData {
|
26
|
-
isOpen;
|
27
|
-
id;
|
28
|
-
label;
|
29
|
-
parentId;
|
30
|
-
childrenIds;
|
31
|
-
isChecked = false;
|
32
|
-
constructor(id, label, parentId) {
|
33
|
-
makeObservable(this, {
|
34
|
-
isChecked: observable,
|
35
|
-
setChecked: action,
|
36
|
-
});
|
37
|
-
this.id = id;
|
38
|
-
this.label = label;
|
39
|
-
this.parentId = parentId;
|
40
|
-
}
|
41
|
-
setChecked(val) {
|
42
|
-
this.isChecked = val;
|
43
|
-
}
|
44
|
-
}
|
45
|
-
export class DatabaseSchemaExplorerTreeSchemaNodeData extends DatabaseSchemaExplorerTreeNodeData {
|
46
|
-
schema;
|
47
|
-
constructor(id, schema) {
|
48
|
-
super(id, schema.name, undefined);
|
49
|
-
this.schema = schema;
|
50
|
-
}
|
51
|
-
}
|
52
|
-
export class DatabaseSchemaExplorerTreeTableNodeData extends DatabaseSchemaExplorerTreeNodeData {
|
53
|
-
parentId;
|
54
|
-
owner;
|
55
|
-
table;
|
56
|
-
constructor(id, parentId, owner, table) {
|
57
|
-
super(id, table.name, parentId);
|
58
|
-
this.parentId = parentId;
|
59
|
-
this.owner = owner;
|
60
|
-
this.table = table;
|
61
|
-
}
|
62
|
-
}
|
63
|
-
export class DatabaseSchemaExplorerTreeColumnNodeData extends DatabaseSchemaExplorerTreeNodeData {
|
64
|
-
parentId;
|
65
|
-
owner;
|
66
|
-
column;
|
67
|
-
constructor(id, parentId, owner, column) {
|
68
|
-
super(id, column.name, parentId);
|
69
|
-
this.parentId = parentId;
|
70
|
-
this.owner = owner;
|
71
|
-
this.column = column;
|
72
|
-
}
|
73
|
-
}
|
74
|
-
const DUMMY_DATABASE_PACKAGE = 'dummy';
|
75
|
-
const DUMMY_DATABASE_NAME = 'DummyDB';
|
23
|
+
import { DatabaseSchemaExplorerState } from '../editor-state/element-editor-state/connection/DatabaseBuilderState.js';
|
76
24
|
const DEFAULT_SQL_TEXT = `--Start building your SQL. Note that you can also drag-and-drop nodes from schema explorer\n`;
|
77
25
|
export class SQLPlaygroundPanelState {
|
78
26
|
editorStore;
|
@@ -80,7 +28,7 @@ export class SQLPlaygroundPanelState {
|
|
80
28
|
isExecutingRawSQL = false;
|
81
29
|
connection;
|
82
30
|
database;
|
83
|
-
|
31
|
+
schemaExplorerState;
|
84
32
|
sqlEditorTextModel;
|
85
33
|
sqlEditor;
|
86
34
|
sqlEditorViewState;
|
@@ -94,37 +42,31 @@ export class SQLPlaygroundPanelState {
|
|
94
42
|
isExecutingRawSQL: observable,
|
95
43
|
connection: observable,
|
96
44
|
database: observable,
|
97
|
-
|
45
|
+
schemaExplorerState: observable,
|
98
46
|
sqlText: observable,
|
99
47
|
resetSQL: action,
|
100
48
|
sqlExecutionResult: observable,
|
101
49
|
sqlEditor: observable.ref,
|
102
50
|
sqlEditorViewState: observable.ref,
|
103
|
-
isBuildingDatabase: observable,
|
104
|
-
isUpdatingDatabase: observable,
|
105
|
-
setTreeData: action,
|
106
51
|
setConnection: action,
|
107
52
|
setSQLEditor: action,
|
108
53
|
setSQLEditorViewState: action,
|
109
54
|
setSQLText: action,
|
110
|
-
onNodeSelect: flow,
|
111
|
-
fetchDatabaseMetadata: flow,
|
112
|
-
fetchSchemaMetadata: flow,
|
113
|
-
fetchTableMetadata: flow,
|
114
55
|
executeRawSQL: flow,
|
115
|
-
generateDatabase: flow,
|
116
|
-
updateDatabase: flow,
|
117
56
|
});
|
118
57
|
this.editorStore = editorStore;
|
119
58
|
this.sqlEditorTextModel = monacoEditorAPI.createModel(this.sqlText, CODE_EDITOR_LANGUAGE.SQL);
|
120
59
|
}
|
121
|
-
setTreeData(val) {
|
122
|
-
this.treeData = val;
|
123
|
-
}
|
124
60
|
setConnection(val) {
|
125
61
|
this.connection = val;
|
126
62
|
if (val) {
|
127
|
-
|
63
|
+
const connection = guaranteeRelationalDatabaseConnection(val);
|
64
|
+
this.database = connection.store.value;
|
65
|
+
this.schemaExplorerState = new DatabaseSchemaExplorerState(this.editorStore, connection);
|
66
|
+
}
|
67
|
+
else {
|
68
|
+
this.database = undefined;
|
69
|
+
this.schemaExplorerState = undefined;
|
128
70
|
}
|
129
71
|
this.sqlEditorTextModel.setValue(DEFAULT_SQL_TEXT);
|
130
72
|
}
|
@@ -164,189 +106,6 @@ export class SQLPlaygroundPanelState {
|
|
164
106
|
deregisterCommands() {
|
165
107
|
[STO_RELATIONAL_LEGEND_STUDIO_COMMAND_KEY.SQL_PLAYGROUND_EXECUTE].forEach((key) => this.editorStore.applicationStore.commandService.deregisterCommand(key));
|
166
108
|
}
|
167
|
-
*onNodeSelect(node, treeData) {
|
168
|
-
if (node instanceof DatabaseSchemaExplorerTreeSchemaNodeData &&
|
169
|
-
!node.childrenIds) {
|
170
|
-
yield flowResult(this.fetchSchemaMetadata(node, treeData));
|
171
|
-
}
|
172
|
-
else if (node instanceof DatabaseSchemaExplorerTreeTableNodeData &&
|
173
|
-
!node.childrenIds) {
|
174
|
-
yield flowResult(this.fetchTableMetadata(node, treeData));
|
175
|
-
}
|
176
|
-
node.isOpen = !node.isOpen;
|
177
|
-
this.setTreeData({ ...treeData });
|
178
|
-
}
|
179
|
-
getChildNodes(node, treeData) {
|
180
|
-
return node.childrenIds
|
181
|
-
?.map((childNode) => treeData.nodes.get(childNode))
|
182
|
-
.filter(isNonNullable);
|
183
|
-
}
|
184
|
-
toggleCheckedNode(node, treeData) {
|
185
|
-
node.setChecked(!node.isChecked);
|
186
|
-
if (node instanceof DatabaseSchemaExplorerTreeSchemaNodeData) {
|
187
|
-
this.getChildNodes(node, treeData)?.forEach((childNode) => {
|
188
|
-
childNode.setChecked(node.isChecked);
|
189
|
-
});
|
190
|
-
}
|
191
|
-
else if (node instanceof DatabaseSchemaExplorerTreeTableNodeData) {
|
192
|
-
if (node.parentId) {
|
193
|
-
const parent = treeData.nodes.get(node.parentId);
|
194
|
-
if (parent &&
|
195
|
-
this.getChildNodes(parent, treeData)?.every((e) => e.isChecked === node.isChecked)) {
|
196
|
-
parent.setChecked(node.isChecked);
|
197
|
-
}
|
198
|
-
}
|
199
|
-
}
|
200
|
-
// TODO: support toggling check for columns
|
201
|
-
this.setTreeData({ ...treeData });
|
202
|
-
}
|
203
|
-
*fetchDatabaseMetadata() {
|
204
|
-
if (!this.connection) {
|
205
|
-
return;
|
206
|
-
}
|
207
|
-
try {
|
208
|
-
this.isFetchingSchema = true;
|
209
|
-
const databaseBuilderInput = new DatabaseBuilderInput(guaranteeRelationalDatabaseConnection(this.connection));
|
210
|
-
databaseBuilderInput.targetDatabase = new TargetDatabase(DUMMY_DATABASE_PACKAGE, DUMMY_DATABASE_NAME);
|
211
|
-
databaseBuilderInput.config.maxTables = undefined;
|
212
|
-
databaseBuilderInput.config.enrichTables = false;
|
213
|
-
databaseBuilderInput.config.patterns = [
|
214
|
-
new DatabasePattern(undefined, undefined),
|
215
|
-
];
|
216
|
-
const database = (yield this.buildIntermediateDatabase(databaseBuilderInput));
|
217
|
-
const rootIds = [];
|
218
|
-
const nodes = new Map();
|
219
|
-
database.schemas
|
220
|
-
.slice()
|
221
|
-
.sort((schemaA, schemaB) => schemaA.name.localeCompare(schemaB.name))
|
222
|
-
.forEach((dbSchema) => {
|
223
|
-
const schemaId = dbSchema.name;
|
224
|
-
rootIds.push(schemaId);
|
225
|
-
const schemaNode = new DatabaseSchemaExplorerTreeSchemaNodeData(schemaId, dbSchema);
|
226
|
-
nodes.set(schemaId, schemaNode);
|
227
|
-
schemaNode.setChecked(Boolean(this.database?.schemas.find((schema) => schema.name === dbSchema.name)));
|
228
|
-
});
|
229
|
-
const treeData = { rootIds, nodes, database };
|
230
|
-
this.setTreeData(treeData);
|
231
|
-
}
|
232
|
-
catch (error) {
|
233
|
-
assertErrorThrown(error);
|
234
|
-
this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.DATABASE_BUILDER_FAILURE), error);
|
235
|
-
this.editorStore.applicationStore.notificationService.notifyError(error);
|
236
|
-
}
|
237
|
-
finally {
|
238
|
-
this.isFetchingSchema = false;
|
239
|
-
}
|
240
|
-
}
|
241
|
-
*fetchSchemaMetadata(schemaNode, treeData) {
|
242
|
-
if (!this.connection) {
|
243
|
-
return;
|
244
|
-
}
|
245
|
-
try {
|
246
|
-
this.isFetchingSchema = true;
|
247
|
-
const schema = schemaNode.schema;
|
248
|
-
const databaseBuilderInput = new DatabaseBuilderInput(guaranteeRelationalDatabaseConnection(this.connection));
|
249
|
-
databaseBuilderInput.targetDatabase = new TargetDatabase(DUMMY_DATABASE_PACKAGE, DUMMY_DATABASE_NAME);
|
250
|
-
databaseBuilderInput.config.maxTables = undefined;
|
251
|
-
databaseBuilderInput.config.enrichTables = true;
|
252
|
-
databaseBuilderInput.config.patterns = [
|
253
|
-
new DatabasePattern(schema.name, undefined),
|
254
|
-
];
|
255
|
-
const database = (yield this.buildIntermediateDatabase(databaseBuilderInput));
|
256
|
-
const tables = getSchema(database, schema.name).tables;
|
257
|
-
const childrenIds = schemaNode.childrenIds ?? [];
|
258
|
-
schema.tables = tables;
|
259
|
-
tables
|
260
|
-
.slice()
|
261
|
-
.sort((tableA, tableB) => tableA.name.localeCompare(tableB.name))
|
262
|
-
.forEach((table) => {
|
263
|
-
table.schema = schema;
|
264
|
-
const tableId = `${schema.name}.${table.name}`;
|
265
|
-
const tableNode = new DatabaseSchemaExplorerTreeTableNodeData(tableId, schemaNode.id, schema, table);
|
266
|
-
treeData.nodes.set(tableId, tableNode);
|
267
|
-
addUniqueEntry(childrenIds, tableId);
|
268
|
-
if (this.database) {
|
269
|
-
const matchingSchema = getNullableSchema(this.database, schema.name);
|
270
|
-
tableNode.setChecked(Boolean(matchingSchema
|
271
|
-
? getNullableTable(matchingSchema, table.name)
|
272
|
-
: undefined));
|
273
|
-
}
|
274
|
-
else {
|
275
|
-
tableNode.setChecked(false);
|
276
|
-
}
|
277
|
-
});
|
278
|
-
schemaNode.childrenIds = childrenIds;
|
279
|
-
this.setTreeData({ ...treeData });
|
280
|
-
}
|
281
|
-
catch (error) {
|
282
|
-
assertErrorThrown(error);
|
283
|
-
this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.DATABASE_BUILDER_FAILURE), error);
|
284
|
-
this.editorStore.applicationStore.notificationService.notifyError(error);
|
285
|
-
}
|
286
|
-
finally {
|
287
|
-
this.isFetchingSchema = false;
|
288
|
-
}
|
289
|
-
}
|
290
|
-
*fetchTableMetadata(tableNode, treeData) {
|
291
|
-
if (!this.connection) {
|
292
|
-
return;
|
293
|
-
}
|
294
|
-
try {
|
295
|
-
this.isFetchingSchema = true;
|
296
|
-
const table = tableNode.table;
|
297
|
-
const databaseBuilderInput = new DatabaseBuilderInput(guaranteeRelationalDatabaseConnection(this.connection));
|
298
|
-
databaseBuilderInput.targetDatabase = new TargetDatabase(DUMMY_DATABASE_PACKAGE, DUMMY_DATABASE_NAME);
|
299
|
-
const config = databaseBuilderInput.config;
|
300
|
-
config.maxTables = undefined;
|
301
|
-
config.enrichTables = true;
|
302
|
-
config.enrichColumns = true;
|
303
|
-
config.enrichPrimaryKeys = true;
|
304
|
-
config.patterns = [new DatabasePattern(table.schema.name, table.name)];
|
305
|
-
const database = (yield this.buildIntermediateDatabase(databaseBuilderInput));
|
306
|
-
const enrichedTable = database.schemas
|
307
|
-
.find((schema) => table.schema.name === schema.name)
|
308
|
-
?.tables.find((t) => t.name === table.name);
|
309
|
-
if (enrichedTable) {
|
310
|
-
table.primaryKey = enrichedTable.primaryKey;
|
311
|
-
const columns = enrichedTable.columns.filter(filterByType(Column));
|
312
|
-
tableNode.table.columns = columns;
|
313
|
-
tableNode.childrenIds?.forEach((c) => treeData.nodes.delete(c));
|
314
|
-
tableNode.childrenIds = undefined;
|
315
|
-
const childrenIds = [];
|
316
|
-
const tableId = tableNode.id;
|
317
|
-
columns
|
318
|
-
.slice()
|
319
|
-
.sort((colA, colB) => colA.name.localeCompare(colB.name))
|
320
|
-
.forEach((col) => {
|
321
|
-
const columnId = `${tableId}.${col.name}`;
|
322
|
-
const columnNode = new DatabaseSchemaExplorerTreeColumnNodeData(columnId, tableId, table, col);
|
323
|
-
col.owner = tableNode.table;
|
324
|
-
treeData.nodes.set(columnId, columnNode);
|
325
|
-
addUniqueEntry(childrenIds, columnId);
|
326
|
-
});
|
327
|
-
tableNode.childrenIds = childrenIds;
|
328
|
-
}
|
329
|
-
}
|
330
|
-
catch (error) {
|
331
|
-
assertErrorThrown(error);
|
332
|
-
this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.DATABASE_BUILDER_FAILURE), error);
|
333
|
-
this.editorStore.applicationStore.notificationService.notifyError(error);
|
334
|
-
}
|
335
|
-
finally {
|
336
|
-
this.isFetchingSchema = false;
|
337
|
-
}
|
338
|
-
}
|
339
|
-
/**
|
340
|
-
* This will build the intermediate database from the specified
|
341
|
-
* schema exploration input; this information can be further used
|
342
|
-
* to enrich the explorer tree
|
343
|
-
*/
|
344
|
-
async buildIntermediateDatabase(input) {
|
345
|
-
const entities = await this.editorStore.graphManagerState.graphManager.buildDatabase(input);
|
346
|
-
const graph = this.editorStore.graphManagerState.createNewGraph();
|
347
|
-
await this.editorStore.graphManagerState.graphManager.buildGraph(graph, entities, ActionState.create());
|
348
|
-
return getNonNullableEntry(graph.ownDatabases, 0, 'Expected one database to be generated from input');
|
349
|
-
}
|
350
109
|
*executeRawSQL() {
|
351
110
|
if (!this.connection || this.isExecutingRawSQL) {
|
352
111
|
return;
|
@@ -373,102 +132,5 @@ export class SQLPlaygroundPanelState {
|
|
373
132
|
this.isExecutingRawSQL = false;
|
374
133
|
}
|
375
134
|
}
|
376
|
-
*generateDatabase() {
|
377
|
-
if (!this.database || !this.connection || !this.treeData) {
|
378
|
-
throw new IllegalStateError(`Can't build database: builder is not properly set up`);
|
379
|
-
}
|
380
|
-
try {
|
381
|
-
this.isBuildingDatabase = true;
|
382
|
-
const treeData = this.treeData;
|
383
|
-
const databaseBuilderInput = new DatabaseBuilderInput(guaranteeRelationalDatabaseConnection(this.connection));
|
384
|
-
const packagePath = guaranteeNonNullable(this.database.package).path;
|
385
|
-
const databaseName = this.database.name;
|
386
|
-
databaseBuilderInput.targetDatabase = new TargetDatabase(packagePath, databaseName);
|
387
|
-
const config = databaseBuilderInput.config;
|
388
|
-
config.maxTables = undefined;
|
389
|
-
config.enrichTables = true;
|
390
|
-
config.enrichColumns = true;
|
391
|
-
config.enrichPrimaryKeys = true;
|
392
|
-
treeData.rootIds
|
393
|
-
.map((e) => treeData.nodes.get(e))
|
394
|
-
.filter(isNonNullable)
|
395
|
-
.forEach((schemaNode) => {
|
396
|
-
if (schemaNode instanceof DatabaseSchemaExplorerTreeSchemaNodeData) {
|
397
|
-
const tableNodes = this.getChildNodes(schemaNode, treeData);
|
398
|
-
const allChecked = tableNodes?.every((t) => t.isChecked === true);
|
399
|
-
if (allChecked ||
|
400
|
-
(schemaNode.isChecked && !schemaNode.childrenIds)) {
|
401
|
-
config.patterns.push(new DatabasePattern(schemaNode.schema.name, undefined));
|
402
|
-
}
|
403
|
-
else {
|
404
|
-
tableNodes?.forEach((t) => {
|
405
|
-
if (t instanceof DatabaseSchemaExplorerTreeTableNodeData &&
|
406
|
-
t.isChecked) {
|
407
|
-
config.patterns.push(new DatabasePattern(schemaNode.schema.name, t.table.name));
|
408
|
-
}
|
409
|
-
});
|
410
|
-
}
|
411
|
-
}
|
412
|
-
});
|
413
|
-
const entities = (yield this.editorStore.graphManagerState.graphManager.buildDatabase(databaseBuilderInput));
|
414
|
-
return getNonNullableEntry(entities, 0, 'Expected a database to be generated');
|
415
|
-
}
|
416
|
-
finally {
|
417
|
-
this.isBuildingDatabase = false;
|
418
|
-
}
|
419
|
-
}
|
420
|
-
*updateDatabase() {
|
421
|
-
if (!this.treeData || !this.database || !this.connection) {
|
422
|
-
return;
|
423
|
-
}
|
424
|
-
try {
|
425
|
-
this.isUpdatingDatabase = true;
|
426
|
-
const graph = this.editorStore.graphManagerState.createNewGraph();
|
427
|
-
(yield this.editorStore.graphManagerState.graphManager.buildGraph(graph, [(yield flowResult(this.generateDatabase()))], ActionState.create()));
|
428
|
-
const generatedDatabase = getNonNullableEntry(graph.ownDatabases, 0, 'Expected one database to be generated from input');
|
429
|
-
const currentDatabase = this.database;
|
430
|
-
// remove undefined schemas
|
431
|
-
const schemas = Array.from(this.treeData.nodes.values())
|
432
|
-
.map((schemaNode) => {
|
433
|
-
if (schemaNode instanceof DatabaseSchemaExplorerTreeSchemaNodeData) {
|
434
|
-
return schemaNode.schema;
|
435
|
-
}
|
436
|
-
return undefined;
|
437
|
-
})
|
438
|
-
.filter(isNonNullable);
|
439
|
-
currentDatabase.schemas = currentDatabase.schemas.filter((schema) => {
|
440
|
-
if (schemas.find((item) => item.name === schema.name) &&
|
441
|
-
!generatedDatabase.schemas.find((s) => s.name === schema.name)) {
|
442
|
-
return false;
|
443
|
-
}
|
444
|
-
return true;
|
445
|
-
});
|
446
|
-
// update existing schemas
|
447
|
-
generatedDatabase.schemas.forEach((schema) => {
|
448
|
-
schema._OWNER = currentDatabase;
|
449
|
-
const currentSchemaIndex = currentDatabase.schemas.findIndex((item) => item.name === schema.name);
|
450
|
-
if (currentSchemaIndex !== -1) {
|
451
|
-
currentDatabase.schemas[currentSchemaIndex] = schema;
|
452
|
-
}
|
453
|
-
else {
|
454
|
-
currentDatabase.schemas.push(schema);
|
455
|
-
}
|
456
|
-
});
|
457
|
-
this.editorStore.applicationStore.notificationService.notifySuccess(`Database successfully updated`);
|
458
|
-
yield flowResult(this.editorStore
|
459
|
-
.getGraphEditorMode(GraphEditFormModeState)
|
460
|
-
.globalCompile({
|
461
|
-
message: `Can't compile graph after editing database. Redirecting you to text mode`,
|
462
|
-
}));
|
463
|
-
}
|
464
|
-
catch (error) {
|
465
|
-
assertErrorThrown(error);
|
466
|
-
this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.DATABASE_BUILDER_FAILURE), error);
|
467
|
-
this.editorStore.applicationStore.notificationService.notifyError(error);
|
468
|
-
}
|
469
|
-
finally {
|
470
|
-
this.isUpdatingDatabase = false;
|
471
|
-
}
|
472
|
-
}
|
473
135
|
}
|
474
136
|
//# sourceMappingURL=SQLPlaygroundPanelState.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SQLPlaygroundPanelState.js","sourceRoot":"","sources":["../../../../src/stores/editor/panel-group/SQLPlaygroundPanelState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAEL,i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,CAAC,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SAC1E;gBAAS;YACR,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;SACjC;IACH,CAAC;CACF"}
|
1
|
+
{"version":3,"file":"SQLPlaygroundPanelState.js","sourceRoot":"","sources":["../../../../src/stores/editor/panel-group/SQLPlaygroundPanelState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,iBAAiB,EACjB,QAAQ,EACR,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC5E,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAGL,qCAAqC,EACrC,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,wCAAwC,EAAE,MAAM,wDAAwD,CAAC;AAClH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,2BAA2B,EAAE,MAAM,yEAAyE,CAAC;AAEtH,MAAM,gBAAgB,GAAG,8FAA8F,CAAC;AAExH,MAAM,OAAO,uBAAuB;IACzB,WAAW,CAAc;IAElC,gBAAgB,GAAG,KAAK,CAAC;IACzB,iBAAiB,GAAG,KAAK,CAAC;IAE1B,UAAU,CAAqC;IAC/C,QAAQ,CAAwB;IAChC,mBAAmB,CAA2C;IAErD,kBAAkB,CAA6B;IACxD,SAAS,CAAqD;IAC9D,kBAAkB,CAAoD;IACtE,OAAO,GAAG,gBAAgB,CAAC;IAC3B,kBAAkB,CAAsB;IAExC,kBAAkB,GAAG,KAAK,CAAC;IAC3B,kBAAkB,GAAG,KAAK,CAAC;I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<WorkflowExplorerTreeNodeData>): GeneratorFn<void>;
|
62
62
|
refreshWorkflow(workflowId: string, treeData: TreeData<WorkflowExplorerTreeNodeData>): GeneratorFn<void>;
|
63
63
|
retryJob(workflowJob: WorkflowJob, treeData: TreeData<WorkflowExplorerTreeNodeData>): GeneratorFn<void>;
|
64
|
+
runManualJob(workflowJob: WorkflowJob, treeData: TreeData<WorkflowExplorerTreeNodeData>): GeneratorFn<void>;
|
64
65
|
}
|
65
66
|
export declare abstract class WorkflowManagerState {
|
66
67
|
readonly editorStore: EditorStore;
|
@@ -74,6 +75,7 @@ export declare abstract class WorkflowManagerState {
|
|
74
75
|
abstract getJobs(workflowId: string): GeneratorFn<WorkflowJob[]>;
|
75
76
|
abstract getJob(job: WorkflowJob): GeneratorFn<WorkflowJob[]>;
|
76
77
|
abstract retryJob(workflowJob: WorkflowJob): GeneratorFn<void>;
|
78
|
+
abstract runManualJob(workflowJob: WorkflowJob): GeneratorFn<void>;
|
77
79
|
abstract cancelJob(workflowJob: WorkflowJob): GeneratorFn<void>;
|
78
80
|
abstract getJobLogs(workflowJob: WorkflowJob): GeneratorFn<string>;
|
79
81
|
fetchAllWorkflows(): GeneratorFn<void>;
|
@@ -84,6 +86,7 @@ export declare class WorkspaceWorkflowManagerState extends WorkflowManagerState
|
|
84
86
|
getWorkflows(): GeneratorFn<Workflow[]>;
|
85
87
|
getWorkflow(workflowId: string): GeneratorFn<Workflow>;
|
86
88
|
retryJob(workflowJob: WorkflowJob): GeneratorFn<void>;
|
89
|
+
runManualJob(workflowJob: WorkflowJob): GeneratorFn<void>;
|
87
90
|
cancelJob(workflowJob: WorkflowJob): GeneratorFn<void>;
|
88
91
|
getJobLogs(workflowJob: WorkflowJob): GeneratorFn<string>;
|
89
92
|
}
|
@@ -95,6 +98,7 @@ export declare class ProjectVersionWorkflowManagerState extends WorkflowManagerS
|
|
95
98
|
getWorkflows(): GeneratorFn<Workflow[]>;
|
96
99
|
getWorkflow(workflowId: string): GeneratorFn<Workflow>;
|
97
100
|
retryJob(workflowJob: WorkflowJob): GeneratorFn<void>;
|
101
|
+
runManualJob(workflowJob: WorkflowJob): GeneratorFn<void>;
|
98
102
|
cancelJob(workflowJob: WorkflowJob): GeneratorFn<void>;
|
99
103
|
getJobLogs(workflowJob: WorkflowJob): GeneratorFn<string>;
|
100
104
|
}
|
@@ -104,6 +108,7 @@ export declare class ProjectWorkflowManagerState extends WorkflowManagerState {
|
|
104
108
|
getWorkflows(): GeneratorFn<Workflow[]>;
|
105
109
|
getWorkflow(workflowId: string): GeneratorFn<Workflow>;
|
106
110
|
retryJob(workflowJob: WorkflowJob): GeneratorFn<void>;
|
111
|
+
runManualJob(workflowJob: WorkflowJob): GeneratorFn<void>;
|
107
112
|
cancelJob(workflowJob: WorkflowJob): GeneratorFn<void>;
|
108
113
|
getJobLogs(workflowJob: WorkflowJob): GeneratorFn<string>;
|
109
114
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WorkflowManagerState.d.ts","sourceRoot":"","sources":["../../../../src/stores/editor/sidebar-state/WorkflowManagerState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EACL,KAAK,WAAW,EAKhB,WAAW,EAEZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEhF,8BAAsB,4BAA6B,YAAW,YAAY;IACxE,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE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AY,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC;IAQzD,SAAS,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC;IAQtD,UAAU,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC;CAOpE;AAED,qBAAa,2BAA4B,SAAQ,oBAAoB;IACzD,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC;IAavD,MAAM,CAAC,GAAG,EAAE,WAAW,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC;IAUpD,YAAY,IAAI,WAAW,CAAC,QAAQ,EAAE,CAAC;IAYvC,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,CAAC,QAAQ,CAAC;IAUtD,QAAQ,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC;IAQrD,YAAY,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC;IAQzD,SAAS,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC;IAQtD,UAAU,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC;CAOpE"}
|
@@ -142,6 +142,7 @@ export class WorkflowState {
|
|
142
142
|
cancelJob: flow,
|
143
143
|
refreshWorkflow: flow,
|
144
144
|
retryJob: flow,
|
145
|
+
runManualJob: flow,
|
145
146
|
});
|
146
147
|
this.editorStore = editorStore;
|
147
148
|
this.workflowManagerState = workflowManagerState;
|
@@ -226,6 +227,21 @@ export class WorkflowState {
|
|
226
227
|
this.isExecutingWorkflowRequest = false;
|
227
228
|
}
|
228
229
|
}
|
230
|
+
*runManualJob(workflowJob, treeData) {
|
231
|
+
try {
|
232
|
+
this.isExecutingWorkflowRequest = true;
|
233
|
+
yield flowResult(this.workflowManagerState.runManualJob(workflowJob));
|
234
|
+
yield flowResult(this.refreshWorkflow(workflowJob.workflowId, treeData));
|
235
|
+
}
|
236
|
+
catch (error) {
|
237
|
+
assertErrorThrown(error);
|
238
|
+
this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.SDLC_MANAGER_FAILURE), error);
|
239
|
+
this.editorStore.applicationStore.notificationService.notifyError(error);
|
240
|
+
}
|
241
|
+
finally {
|
242
|
+
this.isExecutingWorkflowRequest = false;
|
243
|
+
}
|
244
|
+
}
|
229
245
|
}
|
230
246
|
export class WorkflowManagerState {
|
231
247
|
editorStore;
|
@@ -244,6 +260,7 @@ export class WorkflowManagerState {
|
|
244
260
|
getJob: flow,
|
245
261
|
retryJob: flow,
|
246
262
|
cancelJob: flow,
|
263
|
+
runManualJob: flow,
|
247
264
|
getJobLogs: flow,
|
248
265
|
});
|
249
266
|
this.editorStore = editorStore;
|
@@ -295,6 +312,9 @@ export class WorkspaceWorkflowManagerState extends WorkflowManagerState {
|
|
295
312
|
*retryJob(workflowJob) {
|
296
313
|
(yield this.editorStore.sdlcServerClient.retryWorkflowJob(this.sdlcState.activeProject.projectId, this.sdlcState.activeWorkspace, workflowJob));
|
297
314
|
}
|
315
|
+
*runManualJob(workflowJob) {
|
316
|
+
(yield this.editorStore.sdlcServerClient.runManualWorkflowJob(this.sdlcState.activeProject.projectId, this.sdlcState.activeWorkspace, workflowJob));
|
317
|
+
}
|
298
318
|
*cancelJob(workflowJob) {
|
299
319
|
(yield this.editorStore.sdlcServerClient.cancelWorkflowJob(this.sdlcState.activeProject.projectId, this.sdlcState.activeWorkspace, workflowJob));
|
300
320
|
}
|
@@ -323,6 +343,9 @@ export class ProjectVersionWorkflowManagerState extends WorkflowManagerState {
|
|
323
343
|
*retryJob(workflowJob) {
|
324
344
|
(yield this.editorStore.sdlcServerClient.retryWorkflowJobByVersion(this.sdlcState.activeProject.projectId, this.version.id.id, workflowJob));
|
325
345
|
}
|
346
|
+
*runManualJob(workflowJob) {
|
347
|
+
(yield this.editorStore.sdlcServerClient.runManualWorkflowJobByVersion(this.sdlcState.activeProject.projectId, this.version.id.id, workflowJob));
|
348
|
+
}
|
326
349
|
*cancelJob(workflowJob) {
|
327
350
|
(yield this.editorStore.sdlcServerClient.cancelWorkflowJobByVersion(this.sdlcState.activeProject.projectId, this.version.id.id, workflowJob));
|
328
351
|
}
|
@@ -346,6 +369,9 @@ export class ProjectWorkflowManagerState extends WorkflowManagerState {
|
|
346
369
|
*retryJob(workflowJob) {
|
347
370
|
(yield this.editorStore.sdlcServerClient.retryWorkflowJob(this.sdlcState.activeProject.projectId, undefined, workflowJob));
|
348
371
|
}
|
372
|
+
*runManualJob(workflowJob) {
|
373
|
+
(yield this.editorStore.sdlcServerClient.runManualWorkflowJob(this.sdlcState.activeProject.projectId, undefined, workflowJob));
|
374
|
+
}
|
349
375
|
*cancelJob(workflowJob) {
|
350
376
|
(yield this.editorStore.sdlcServerClient.cancelWorkflowJob(this.sdlcState.activeProject.projectId, undefined, workflowJob));
|
351
377
|
}
|