@finos/legend-application-query 9.1.0 → 10.0.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/Core_LegendQueryApplicationPlugin.js +2 -2
- package/lib/components/Core_LegendQueryApplicationPlugin.js.map +1 -1
- package/lib/components/QueryEditor.d.ts.map +1 -1
- package/lib/components/QueryEditor.js +2 -2
- package/lib/components/QueryEditor.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +2 -2
- package/lib/stores/CloneServiceQuerySetupStore.js.map +1 -1
- package/lib/stores/CreateMappingQuerySetupStore.js.map +1 -1
- package/lib/stores/LegendQueryAppEvent.d.ts +3 -3
- package/lib/stores/LegendQueryAppEvent.d.ts.map +1 -1
- package/lib/stores/LegendQueryAppEvent.js +3 -3
- package/lib/stores/LegendQueryAppEvent.js.map +1 -1
- package/lib/stores/LegendQueryApplicationNavigationContext.d.ts +19 -0
- package/lib/stores/LegendQueryApplicationNavigationContext.d.ts.map +1 -0
- package/lib/stores/LegendQueryApplicationNavigationContext.js +21 -0
- package/lib/stores/LegendQueryApplicationNavigationContext.js.map +1 -0
- package/lib/stores/LegendQueryBaseStore.js +2 -2
- package/lib/stores/LegendQueryBaseStore.js.map +1 -1
- package/lib/stores/LegendQueryEventService.d.ts.map +1 -1
- package/lib/stores/LegendQueryEventService.js +1 -1
- package/lib/stores/LegendQueryEventService.js.map +1 -1
- package/lib/stores/LegendQueryTelemetry.d.ts +3 -3
- package/lib/stores/LegendQueryTelemetry.d.ts.map +1 -1
- package/lib/stores/LegendQueryTelemetry.js +6 -6
- package/lib/stores/LegendQueryTelemetry.js.map +1 -1
- package/lib/stores/QueryEditorStore.d.ts.map +1 -1
- package/lib/stores/QueryEditorStore.js +24 -19
- package/lib/stores/QueryEditorStore.js.map +1 -1
- package/package.json +10 -10
- package/src/components/Core_LegendQueryApplicationPlugin.tsx +2 -2
- package/src/components/QueryEditor.tsx +61 -44
- package/src/stores/CloneServiceQuerySetupStore.ts +2 -2
- package/src/stores/CreateMappingQuerySetupStore.ts +2 -2
- package/src/stores/LegendQueryAppEvent.ts +3 -3
- package/src/stores/LegendQueryApplicationNavigationContext.ts +20 -0
- package/src/stores/LegendQueryBaseStore.ts +2 -2
- package/src/stores/LegendQueryEventService.ts +4 -1
- package/src/stores/LegendQueryTelemetry.ts +12 -6
- package/src/stores/QueryEditorStore.ts +52 -38
- package/tsconfig.json +1 -0
@@ -44,13 +44,13 @@ import {
|
|
44
44
|
PackageableElementExplicitReference,
|
45
45
|
RuntimePointer,
|
46
46
|
GRAPH_MANAGER_EVENT,
|
47
|
-
type GraphBuilderReport,
|
48
47
|
GraphManagerTelemetry,
|
49
48
|
extractElementNameFromPath,
|
50
49
|
QuerySearchSpecification,
|
51
50
|
Mapping,
|
52
51
|
type Runtime,
|
53
52
|
type Service,
|
53
|
+
createGraphBuilderReport,
|
54
54
|
} from '@finos/legend-graph';
|
55
55
|
import {
|
56
56
|
EXTERNAL_APPLICATION_NAVIGATION__generateStudioProjectViewUrl,
|
@@ -63,6 +63,7 @@ import { LEGEND_QUERY_APP_EVENT } from './LegendQueryAppEvent.js';
|
|
63
63
|
import {
|
64
64
|
type Entity,
|
65
65
|
type ProjectGAVCoordinates,
|
66
|
+
type EntitiesWithOrigin,
|
66
67
|
parseProjectIdentifier,
|
67
68
|
LegendSDLC,
|
68
69
|
} from '@finos/legend-storage';
|
@@ -87,6 +88,7 @@ import {
|
|
87
88
|
ServiceQueryBuilderState,
|
88
89
|
} from '@finos/legend-query-builder';
|
89
90
|
import { LegendQueryTelemetry } from './LegendQueryTelemetry.js';
|
91
|
+
import { LEGEND_QUERY_APPLICATION_NAVIGATION_CONTEXT_KEY } from './LegendQueryApplicationNavigationContext.js';
|
90
92
|
|
91
93
|
export const createViewProjectHandler =
|
92
94
|
(applicationStore: LegendQueryApplicationStore) =>
|
@@ -238,7 +240,7 @@ export class QueryExportState {
|
|
238
240
|
this.editorStore.applicationStore.eventService,
|
239
241
|
).notify_QueryCreated({ queryId: newQuery.id });
|
240
242
|
|
241
|
-
LegendQueryTelemetry.
|
243
|
+
LegendQueryTelemetry.logEvent_CreateQuerySucceeded(
|
242
244
|
this.editorStore.applicationStore.telemetryService,
|
243
245
|
{
|
244
246
|
query: {
|
@@ -264,7 +266,7 @@ export class QueryExportState {
|
|
264
266
|
`Successfully updated query!`,
|
265
267
|
);
|
266
268
|
|
267
|
-
LegendQueryTelemetry.
|
269
|
+
LegendQueryTelemetry.logEvent_UpdateQuerySucceeded(
|
268
270
|
this.editorStore.applicationStore.telemetryService,
|
269
271
|
{
|
270
272
|
query: {
|
@@ -473,7 +475,7 @@ export abstract class QueryEditorStore {
|
|
473
475
|
// initialize system
|
474
476
|
stopWatch.record();
|
475
477
|
yield this.graphManagerState.initializeSystem();
|
476
|
-
stopWatch.record(GRAPH_MANAGER_EVENT.
|
478
|
+
stopWatch.record(GRAPH_MANAGER_EVENT.INITIALIZE_GRAPH_SYSTEM__SUCCESS);
|
477
479
|
|
478
480
|
// fetch entities
|
479
481
|
stopWatch.record();
|
@@ -483,7 +485,7 @@ export abstract class QueryEditorStore {
|
|
483
485
|
versionId,
|
484
486
|
)) as Entity[];
|
485
487
|
this.initState.setMessage(undefined);
|
486
|
-
stopWatch.record(GRAPH_MANAGER_EVENT.
|
488
|
+
stopWatch.record(GRAPH_MANAGER_EVENT.FETCH_GRAPH_ENTITIES__SUCCESS);
|
487
489
|
|
488
490
|
// fetch and build dependencies
|
489
491
|
stopWatch.record();
|
@@ -495,53 +497,62 @@ export abstract class QueryEditorStore {
|
|
495
497
|
);
|
496
498
|
const dependencyEntitiesIndex = (yield flowResult(
|
497
499
|
this.depotServerClient.getIndexedDependencyEntities(project, versionId),
|
498
|
-
)) as Map<string,
|
499
|
-
stopWatch.record(GRAPH_MANAGER_EVENT.
|
500
|
-
|
501
|
-
const dependency_buildReport =
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
500
|
+
)) as Map<string, EntitiesWithOrigin>;
|
501
|
+
stopWatch.record(GRAPH_MANAGER_EVENT.FETCH_GRAPH_DEPENDENCIES__SUCCESS);
|
502
|
+
|
503
|
+
const dependency_buildReport = createGraphBuilderReport();
|
504
|
+
yield this.graphManagerState.graphManager.buildDependencies(
|
505
|
+
this.graphManagerState.coreModel,
|
506
|
+
this.graphManagerState.systemModel,
|
507
|
+
dependencyManager,
|
508
|
+
dependencyEntitiesIndex,
|
509
|
+
this.graphManagerState.dependenciesBuildState,
|
510
|
+
{},
|
511
|
+
dependency_buildReport,
|
512
|
+
);
|
509
513
|
dependency_buildReport.timings[
|
510
|
-
GRAPH_MANAGER_EVENT.
|
511
|
-
] = stopWatch.getRecord(
|
514
|
+
GRAPH_MANAGER_EVENT.FETCH_GRAPH_DEPENDENCIES__SUCCESS
|
515
|
+
] = stopWatch.getRecord(
|
516
|
+
GRAPH_MANAGER_EVENT.FETCH_GRAPH_DEPENDENCIES__SUCCESS,
|
517
|
+
);
|
512
518
|
|
513
519
|
// build graph
|
514
|
-
const graph_buildReport =
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
520
|
+
const graph_buildReport = createGraphBuilderReport();
|
521
|
+
yield this.graphManagerState.graphManager.buildGraph(
|
522
|
+
this.graphManagerState.graph,
|
523
|
+
entities,
|
524
|
+
this.graphManagerState.graphBuildState,
|
525
|
+
{
|
526
|
+
origin: new LegendSDLC(groupId, artifactId, resolveVersion(versionId)),
|
527
|
+
},
|
528
|
+
graph_buildReport,
|
529
|
+
);
|
530
|
+
graph_buildReport.timings[
|
531
|
+
GRAPH_MANAGER_EVENT.FETCH_GRAPH_ENTITIES__SUCCESS
|
532
|
+
] = stopWatch.getRecord(GRAPH_MANAGER_EVENT.FETCH_GRAPH_ENTITIES__SUCCESS);
|
525
533
|
|
526
534
|
// report
|
527
|
-
stopWatch.record(GRAPH_MANAGER_EVENT.
|
535
|
+
stopWatch.record(GRAPH_MANAGER_EVENT.INITIALIZE_GRAPH__SUCCESS);
|
528
536
|
const graphBuilderReportData = {
|
529
537
|
timings: {
|
530
|
-
[GRAPH_MANAGER_EVENT.
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
538
|
+
[GRAPH_MANAGER_EVENT.INITIALIZE_GRAPH_SYSTEM__SUCCESS]:
|
539
|
+
stopWatch.getRecord(
|
540
|
+
GRAPH_MANAGER_EVENT.INITIALIZE_GRAPH_SYSTEM__SUCCESS,
|
541
|
+
),
|
542
|
+
[GRAPH_MANAGER_EVENT.INITIALIZE_GRAPH__SUCCESS]: stopWatch.getRecord(
|
543
|
+
GRAPH_MANAGER_EVENT.INITIALIZE_GRAPH__SUCCESS,
|
535
544
|
),
|
536
545
|
},
|
537
546
|
dependencies: dependency_buildReport,
|
547
|
+
dependenciesCount:
|
548
|
+
this.graphManagerState.graph.dependencyManager.numberOfDependencies,
|
538
549
|
graph: graph_buildReport,
|
539
550
|
};
|
540
551
|
this.applicationStore.log.info(
|
541
|
-
LogEvent.create(GRAPH_MANAGER_EVENT.
|
552
|
+
LogEvent.create(GRAPH_MANAGER_EVENT.INITIALIZE_GRAPH__SUCCESS),
|
542
553
|
graphBuilderReportData,
|
543
554
|
);
|
544
|
-
GraphManagerTelemetry.
|
555
|
+
GraphManagerTelemetry.logEvent_GraphInitializationSucceeded(
|
545
556
|
this.applicationStore.telemetryService,
|
546
557
|
graphBuilderReportData,
|
547
558
|
);
|
@@ -791,6 +802,9 @@ export class ExistingQueryEditorStore extends QueryEditorStore {
|
|
791
802
|
queryBuilderState ??
|
792
803
|
new ClassQueryBuilderState(this.applicationStore, this.graphManagerState);
|
793
804
|
|
805
|
+
queryBuilderState.applicationContext =
|
806
|
+
LEGEND_QUERY_APPLICATION_NAVIGATION_CONTEXT_KEY.EDITOR;
|
807
|
+
|
794
808
|
queryBuilderState.setMapping(query.mapping.value);
|
795
809
|
queryBuilderState.setRuntimeValue(
|
796
810
|
new RuntimePointer(
|
@@ -804,7 +818,7 @@ export class ExistingQueryEditorStore extends QueryEditorStore {
|
|
804
818
|
);
|
805
819
|
|
806
820
|
// send analytics
|
807
|
-
LegendQueryTelemetry.
|
821
|
+
LegendQueryTelemetry.logEvent_ViewQuerySucceeded(
|
808
822
|
this.applicationStore.telemetryService,
|
809
823
|
{
|
810
824
|
query: {
|
package/tsconfig.json
CHANGED
@@ -40,6 +40,7 @@
|
|
40
40
|
"./src/stores/CreateMappingQuerySetupStore.ts",
|
41
41
|
"./src/stores/EditExistingQuerySetupStore.ts",
|
42
42
|
"./src/stores/LegendQueryAppEvent.ts",
|
43
|
+
"./src/stores/LegendQueryApplicationNavigationContext.ts",
|
43
44
|
"./src/stores/LegendQueryApplicationPlugin.ts",
|
44
45
|
"./src/stores/LegendQueryBaseStore.ts",
|
45
46
|
"./src/stores/LegendQueryEventService.ts",
|