@finos/legend-application-studio 20.0.7 → 20.0.8
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/StatusBar.js +3 -3
- package/lib/components/editor/StatusBar.js.map +1 -1
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js +12 -5
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor-state/ProjectConfigurationEditorState.d.ts +4 -4
- package/lib/stores/editor-state/ProjectConfigurationEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/ProjectConfigurationEditorState.js +16 -13
- package/lib/stores/editor-state/ProjectConfigurationEditorState.js.map +1 -1
- package/package.json +4 -4
- package/src/components/editor/StatusBar.tsx +3 -3
- package/src/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.tsx +16 -3
- package/src/stores/editor-state/ProjectConfigurationEditorState.ts +16 -12
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
assertErrorThrown,
|
|
32
32
|
guaranteeNonNullable,
|
|
33
33
|
hashArray,
|
|
34
|
+
ActionState,
|
|
34
35
|
} from '@finos/legend-shared';
|
|
35
36
|
import type { EditorSDLCState } from '../EditorSDLCState.js';
|
|
36
37
|
import {
|
|
@@ -123,28 +124,28 @@ export class ProjectConfigurationEditorState extends EditorState {
|
|
|
123
124
|
latestProjectStructureVersion: ProjectStructureVersion | undefined;
|
|
124
125
|
dependencyInfo: ProjectDependencyInfo | undefined;
|
|
125
126
|
dependencyInfoModalType: DEPENDENCY_INFO_TYPE | undefined;
|
|
126
|
-
|
|
127
|
-
|
|
127
|
+
fetchingDependencyInfoState = ActionState.create();
|
|
128
|
+
updatingConfigurationState = ActionState.create();
|
|
129
|
+
fetchingProjectVersionsState = ActionState.create();
|
|
128
130
|
associatedProjectsAndVersionsFetched = false;
|
|
129
|
-
isFetchingAssociatedProjectsAndVersions = false;
|
|
130
131
|
|
|
131
132
|
constructor(editorStore: EditorStore, sdlcState: EditorSDLCState) {
|
|
132
133
|
super(editorStore);
|
|
133
134
|
|
|
134
135
|
makeObservable(this, {
|
|
135
136
|
originalProjectConfiguration: observable,
|
|
136
|
-
|
|
137
|
+
updatingConfigurationState: observable,
|
|
137
138
|
projectConfiguration: observable,
|
|
138
139
|
selectedTab: observable,
|
|
139
140
|
isReadOnly: observable,
|
|
140
141
|
projects: observable,
|
|
141
142
|
queryHistory: observable,
|
|
142
|
-
isQueryingProjects: observable,
|
|
143
143
|
associatedProjectsAndVersionsFetched: observable,
|
|
144
|
-
|
|
144
|
+
fetchingProjectVersionsState: observable,
|
|
145
145
|
latestProjectStructureVersion: observable,
|
|
146
146
|
dependencyInfo: observable,
|
|
147
147
|
dependencyInfoModalType: observable,
|
|
148
|
+
fetchingDependencyInfoState: observable,
|
|
148
149
|
originalConfig: computed,
|
|
149
150
|
setOriginalProjectConfiguration: action,
|
|
150
151
|
setProjectConfiguration: action,
|
|
@@ -208,7 +209,7 @@ export class ProjectConfigurationEditorState extends EditorState {
|
|
|
208
209
|
}
|
|
209
210
|
|
|
210
211
|
*fectchAssociatedProjectsAndVersions(): GeneratorFn<void> {
|
|
211
|
-
this.
|
|
212
|
+
this.fetchingProjectVersionsState.inProgress();
|
|
212
213
|
try {
|
|
213
214
|
(
|
|
214
215
|
(yield this.editorStore.depotServerClient.getProjects()) as PlainObject<ProjectData>[]
|
|
@@ -244,12 +245,13 @@ export class ProjectConfigurationEditorState extends EditorState {
|
|
|
244
245
|
`Can't get project dependencies data. Error:\n${error.message}`,
|
|
245
246
|
);
|
|
246
247
|
} finally {
|
|
247
|
-
this.
|
|
248
|
+
this.fetchingProjectVersionsState.complete();
|
|
248
249
|
}
|
|
249
250
|
}
|
|
250
251
|
|
|
251
252
|
*fetchDependencyInfo(): GeneratorFn<void> {
|
|
252
253
|
try {
|
|
254
|
+
this.fetchingDependencyInfoState.inProgress();
|
|
253
255
|
this.dependencyInfo = undefined;
|
|
254
256
|
if (this.projectConfiguration?.projectDependencies) {
|
|
255
257
|
const dependencyCoordinates = (yield flowResult(
|
|
@@ -268,8 +270,10 @@ export class ProjectConfigurationEditorState extends EditorState {
|
|
|
268
270
|
} else {
|
|
269
271
|
this.dependencyInfo = new ProjectDependencyInfo();
|
|
270
272
|
}
|
|
273
|
+
this.fetchingDependencyInfoState.complete();
|
|
271
274
|
} catch (error) {
|
|
272
275
|
assertErrorThrown(error);
|
|
276
|
+
this.fetchingDependencyInfoState.fail();
|
|
273
277
|
this.dependencyInfo = undefined;
|
|
274
278
|
this.editorStore.applicationStore.log.error(
|
|
275
279
|
LogEvent.create(LEGEND_STUDIO_APP_EVENT.DEPOT_MANAGER_FAILURE),
|
|
@@ -282,7 +286,7 @@ export class ProjectConfigurationEditorState extends EditorState {
|
|
|
282
286
|
updateConfigurationCommand: UpdateProjectConfigurationCommand,
|
|
283
287
|
): GeneratorFn<void> {
|
|
284
288
|
try {
|
|
285
|
-
this.
|
|
289
|
+
this.updatingConfigurationState.inProgress();
|
|
286
290
|
yield this.editorStore.sdlcServerClient.updateConfiguration(
|
|
287
291
|
this.editorStore.sdlcState.activeProject.projectId,
|
|
288
292
|
this.editorStore.sdlcState.activeWorkspace,
|
|
@@ -317,7 +321,7 @@ export class ProjectConfigurationEditorState extends EditorState {
|
|
|
317
321
|
);
|
|
318
322
|
this.editorStore.applicationStore.notifyError(error);
|
|
319
323
|
} finally {
|
|
320
|
-
this.
|
|
324
|
+
this.updatingConfigurationState.complete();
|
|
321
325
|
}
|
|
322
326
|
}
|
|
323
327
|
|
|
@@ -345,7 +349,7 @@ export class ProjectConfigurationEditorState extends EditorState {
|
|
|
345
349
|
// TODO: we will probably need to remove this in the future when we have a better strategy for change detection and persistence of project config
|
|
346
350
|
// See https://github.com/finos/legend-studio/issues/952
|
|
347
351
|
*updateConfigs(): GeneratorFn<void> {
|
|
348
|
-
this.
|
|
352
|
+
this.updatingConfigurationState.inProgress();
|
|
349
353
|
this.editorStore.applicationStore.setBlockingAlert({
|
|
350
354
|
message: `Updating project configuration...`,
|
|
351
355
|
prompt: `Please do not reload the application`,
|
|
@@ -395,7 +399,7 @@ export class ProjectConfigurationEditorState extends EditorState {
|
|
|
395
399
|
);
|
|
396
400
|
this.editorStore.applicationStore.notifyError(error);
|
|
397
401
|
} finally {
|
|
398
|
-
this.
|
|
402
|
+
this.updatingConfigurationState.complete();
|
|
399
403
|
this.editorStore.applicationStore.setBlockingAlert(undefined);
|
|
400
404
|
}
|
|
401
405
|
}
|