@finos/legend-extension-dsl-data-space 10.3.81 → 10.3.82
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/query-builder/DataSpaceQueryBuilderTemplateQueryPanelContent.d.ts.map +1 -1
- package/lib/components/query-builder/DataSpaceQueryBuilderTemplateQueryPanelContent.js +32 -23
- package/lib/components/query-builder/DataSpaceQueryBuilderTemplateQueryPanelContent.js.map +1 -1
- package/lib/graph-manager/action/analytics/DataSpaceAnalysis.d.ts +3 -1
- package/lib/graph-manager/action/analytics/DataSpaceAnalysis.d.ts.map +1 -1
- package/lib/graph-manager/action/analytics/DataSpaceAnalysis.js +2 -0
- package/lib/graph-manager/action/analytics/DataSpaceAnalysis.js.map +1 -1
- package/lib/graph-manager/action/analytics/DataSpaceAnalysisHelper.d.ts +5 -2
- package/lib/graph-manager/action/analytics/DataSpaceAnalysisHelper.d.ts.map +1 -1
- package/lib/graph-manager/action/analytics/DataSpaceAnalysisHelper.js +39 -1
- package/lib/graph-manager/action/analytics/DataSpaceAnalysisHelper.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/query-builder/DataSpaceQueryBuilderState.d.ts +9 -6
- package/lib/stores/query-builder/DataSpaceQueryBuilderState.d.ts.map +1 -1
- package/lib/stores/query-builder/DataSpaceQueryBuilderState.js +41 -9
- package/lib/stores/query-builder/DataSpaceQueryBuilderState.js.map +1 -1
- package/package.json +7 -7
- package/src/components/query-builder/DataSpaceQueryBuilderTemplateQueryPanelContent.tsx +49 -40
- package/src/graph-manager/action/analytics/DataSpaceAnalysis.ts +4 -0
- package/src/graph-manager/action/analytics/DataSpaceAnalysisHelper.ts +70 -3
- package/src/stores/query-builder/DataSpaceQueryBuilderState.ts +71 -31
package/lib/components/query-builder/DataSpaceQueryBuilderTemplateQueryPanelContent.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DataSpaceQueryBuilderTemplateQueryPanelContent.d.ts","sourceRoot":"","sources":["../../../src/components/query-builder/DataSpaceQueryBuilderTemplateQueryPanelContent.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
1
|
+
{"version":3,"file":"DataSpaceQueryBuilderTemplateQueryPanelContent.d.ts","sourceRoot":"","sources":["../../../src/components/query-builder/DataSpaceQueryBuilderTemplateQueryPanelContent.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiBH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0DAA0D,CAAC;AA2N3G,eAAO,MAAM,oDAAoD,sBAC5C,0BAA0B,KAC5C,KAAK,CAAC,SAIR,CAAC"}
|
@@ -16,41 +16,42 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
16
16
|
*/
|
17
17
|
import { PanelHeader, BasePopover, ClickAwayListener, ShareIcon, TagIcon, } from '@finos/legend-art';
|
18
18
|
import { observer } from 'mobx-react-lite';
|
19
|
-
import { useRef } from 'react';
|
19
|
+
import { useEffect, useRef } from 'react';
|
20
20
|
import { ActionAlertActionType, ActionAlertType, useApplicationStore, } from '@finos/legend-application';
|
21
21
|
import { DocumentationLink } from '@finos/legend-lego/application';
|
22
22
|
import { DSL_DATA_SPACE_LEGEND_QUERY_DOCUMENTATION_KEY } from '../../__lib__/query/DSL_DataSpace_LegendQueryDocumentation.js';
|
23
|
-
import {
|
23
|
+
import { flowResult } from 'mobx';
|
24
24
|
const DataSpaceTemplateQueryDialog = observer((props) => {
|
25
25
|
const { triggerElement, queryBuilderState, templateQueries } = props;
|
26
26
|
const applicationStore = useApplicationStore();
|
27
27
|
const handleClose = () => {
|
28
28
|
queryBuilderState.setTemplateQueryDialogOpen(false);
|
29
29
|
};
|
30
|
-
const loadTemplateQuery = (template) => {
|
31
|
-
|
32
|
-
if (
|
33
|
-
|
30
|
+
const loadTemplateQuery = async (template) => {
|
31
|
+
let query;
|
32
|
+
if (template.info) {
|
33
|
+
query =
|
34
|
+
await queryBuilderState.graphManagerState.graphManager.pureCodeToLambda(template.info.query);
|
34
35
|
}
|
35
|
-
const query = getQueryFromDataspaceExecutable(template, queryBuilderState.graphManagerState);
|
36
36
|
if (!query) {
|
37
37
|
applicationStore.notificationService.notifyError('Unable get a query from this template query');
|
38
38
|
}
|
39
|
-
|
40
|
-
executionContext
|
41
|
-
executionContext
|
42
|
-
queryBuilderState.executionContext.
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
39
|
+
else {
|
40
|
+
const executionContext = queryBuilderState.dataSpace.executionContexts.filter((ex) => ex.name === template.info?.executionContextKey)[0];
|
41
|
+
if (executionContext &&
|
42
|
+
executionContext.name !== queryBuilderState.executionContext.name) {
|
43
|
+
queryBuilderState.setExecutionContext(executionContext);
|
44
|
+
queryBuilderState.propagateExecutionContextChange(executionContext);
|
45
|
+
queryBuilderState.initializeWithQuery(query);
|
46
|
+
queryBuilderState.onExecutionContextChange?.(executionContext);
|
47
|
+
}
|
48
|
+
else {
|
49
|
+
queryBuilderState.initializeWithQuery(query);
|
50
|
+
}
|
50
51
|
}
|
51
52
|
handleClose();
|
52
53
|
};
|
53
|
-
const loadQuery = (template) => {
|
54
|
+
const loadQuery = async (template) => {
|
54
55
|
if (queryBuilderState.changeDetectionState.hasChanged) {
|
55
56
|
applicationStore.alertService.setActionAlertInfo({
|
56
57
|
message: 'Unsaved changes will be lost if you continue. Do you still want to proceed?',
|
@@ -59,7 +60,9 @@ const DataSpaceTemplateQueryDialog = observer((props) => {
|
|
59
60
|
{
|
60
61
|
label: 'Proceed',
|
61
62
|
type: ActionAlertActionType.PROCEED_WITH_CAUTION,
|
62
|
-
handler: () =>
|
63
|
+
handler: () => {
|
64
|
+
flowResult(loadTemplateQuery(template));
|
65
|
+
},
|
63
66
|
},
|
64
67
|
{
|
65
68
|
label: 'Abort',
|
@@ -70,7 +73,7 @@ const DataSpaceTemplateQueryDialog = observer((props) => {
|
|
70
73
|
});
|
71
74
|
}
|
72
75
|
else {
|
73
|
-
loadTemplateQuery(template);
|
76
|
+
flowResult(loadTemplateQuery(template));
|
74
77
|
}
|
75
78
|
};
|
76
79
|
const visitTemplateQuery = (template) => {
|
@@ -88,15 +91,21 @@ const DataSpaceTemplateQueryDialog = observer((props) => {
|
|
88
91
|
}, transformOrigin: {
|
89
92
|
vertical: 'top',
|
90
93
|
horizontal: 'center',
|
91
|
-
}, children: _jsxs("div", { className: "query-builder__data-space__template-query-panel", children: [_jsxs("div", { className: "query-builder__data-space__template-query-panel__header", children: ["Curated Template Queries", _jsx(DocumentationLink, { documentationKey: DSL_DATA_SPACE_LEGEND_QUERY_DOCUMENTATION_KEY.CURATED_TEMPLATE_QUERY })] }), templateQueries.map((query) => (_jsxs("div", { className: "query-builder__data-space__template-query-panel__query", children: [_jsx(TagIcon, { className: "query-builder__data-space__template-query-panel__query__icon" }), _jsx("button", { className: "query-builder__data-space__template-query-panel__query__entry", title: "click to load template query", onClick: () =>
|
94
|
+
}, children: _jsxs("div", { className: "query-builder__data-space__template-query-panel", children: [_jsxs("div", { className: "query-builder__data-space__template-query-panel__header", children: ["Curated Template Queries", _jsx(DocumentationLink, { documentationKey: DSL_DATA_SPACE_LEGEND_QUERY_DOCUMENTATION_KEY.CURATED_TEMPLATE_QUERY })] }), templateQueries.map((query) => (_jsxs("div", { className: "query-builder__data-space__template-query-panel__query", children: [_jsx(TagIcon, { className: "query-builder__data-space__template-query-panel__query__icon" }), _jsx("button", { className: "query-builder__data-space__template-query-panel__query__entry", title: "click to load template query", onClick: () => {
|
95
|
+
flowResult(loadQuery(query));
|
96
|
+
}, children: _jsxs("div", { className: "query-builder__data-space__template-query-panel__query__entry__content", children: [_jsx("div", { className: "query-builder__data-space__template-query-panel__query__entry__content__title", children: query.title }), query.description && (_jsx("div", { className: "query-builder__data-space__template-query-panel__query__entry__content__description", children: query.description }))] }) }), _jsxs("button", { className: "query-builder__data-space__template-query-panel__query__share", title: "Visit...", disabled: !queryBuilderState.dataSpaceRepo.canVisitTemplateQuery, onClick: () => visitTemplateQuery(query), children: [_jsx(ShareIcon, {}), _jsx("div", { className: "query-builder__data-space__template-query-panel__query__share__label", children: "Visit" })] })] }, query.title)))] }) }) }) }));
|
92
97
|
});
|
93
98
|
const DataSpaceQueryBuilderTemplateQueryPanel = observer((props) => {
|
94
99
|
const { queryBuilderState } = props;
|
100
|
+
const applicationStore = useApplicationStore();
|
95
101
|
const templateQueryButtonRef = useRef(null);
|
96
|
-
const templateQueries = queryBuilderState.dataSpace.executables;
|
97
102
|
const showTemplateQueries = () => {
|
98
103
|
queryBuilderState.setTemplateQueryDialogOpen(true);
|
99
104
|
};
|
105
|
+
const templateQueries = queryBuilderState.displayedTemplateQueries;
|
106
|
+
useEffect(() => {
|
107
|
+
flowResult(queryBuilderState.intialize()).catch(applicationStore.alertUnhandledError);
|
108
|
+
}, [queryBuilderState, applicationStore.alertUnhandledError]);
|
100
109
|
return (_jsx(_Fragment, { children: !templateQueries || templateQueries.length === 0 ? (_jsx(PanelHeader, { className: "query-builder__data-space__template-query", children: _jsx("button", { className: "query-builder__data-space__template-query__btn", ref: templateQueryButtonRef, onClick: showTemplateQueries, disabled: true, children: "Templates ( 0 )" }) })) : (_jsxs(PanelHeader, { className: "query-builder__data-space__template-query", children: [_jsxs("button", { className: "query-builder__data-space__template-query__btn", ref: templateQueryButtonRef, onClick: showTemplateQueries, children: ["Templates ( ", templateQueries.length, " )"] }), queryBuilderState.isTemplateQueryDialogOpen && (_jsx(DataSpaceTemplateQueryDialog, { triggerElement: templateQueryButtonRef.current, queryBuilderState: queryBuilderState, templateQueries: templateQueries }))] })) }));
|
101
110
|
});
|
102
111
|
export const renderDataSpaceQueryBuilderTemplateQueryPanelContent = (queryBuilderState) => (_jsx(DataSpaceQueryBuilderTemplateQueryPanel, { queryBuilderState: queryBuilderState }));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DataSpaceQueryBuilderTemplateQueryPanelContent.js","sourceRoot":"","sources":["../../../src/components/query-builder/DataSpaceQueryBuilderTemplateQueryPanelContent.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,OAAO,GACR,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"DataSpaceQueryBuilderTemplateQueryPanelContent.js","sourceRoot":"","sources":["../../../src/components/query-builder/DataSpaceQueryBuilderTemplateQueryPanelContent.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,OAAO,GACR,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAE,6CAA6C,EAAE,MAAM,+DAA+D,CAAC;AAC9H,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAGlC,MAAM,4BAA4B,GAAG,QAAQ,CAC3C,CAAC,KAIA,EAAE,EAAE;IACH,MAAM,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IACrE,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,WAAW,GAAG,GAAS,EAAE;QAC7B,iBAAiB,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC;IACtD,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,KAAK,EAC7B,QAA2C,EAC5B,EA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,SAAS,CAAC,GAAG,EAAE;QACb,UAAU,CAAC,iBAAiB,CAAC,SAAS,EAAE,CAAC,CAAC,KAAK,CAC7C,gBAAgB,CAAC,mBAAmB,CACrC,CAAC;IACJ,CAAC,EAAE,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAE9D,OAAO,CACL,4BACG,CAAC,eAAe,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAClD,KAAC,WAAW,IAAC,SAAS,EAAC,2CAA2C,YAChE,iBACE,SAAS,EAAC,gDAAgD,EAC1D,GAAG,EAAE,sBAAsB,EAC3B,OAAO,EAAE,mBAAmB,EAC5B,QAAQ,EAAE,IAAI,gCAGP,GACG,CACf,CAAC,CAAC,CAAC,CACF,MAAC,WAAW,IAAC,SAAS,EAAC,2CAA2C,aAChE,kBACE,SAAS,EAAC,gDAAgD,EAC1D,GAAG,EAAE,sBAAsB,EAC3B,OAAO,EAAE,mBAAmB,6BAEf,eAAe,CAAC,MAAM,UAC5B,EACR,iBAAiB,CAAC,yBAAyB,IAAI,CAC9C,KAAC,4BAA4B,IAC3B,cAAc,EAAE,sBAAsB,CAAC,OAAO,EAC9C,iBAAiB,EAAE,iBAAiB,EACpC,eAAe,EAAE,eAAe,GAChC,CACH,IACW,CACf,GACA,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,oDAAoD,GAAG,CAClE,iBAA6C,EAC5B,EAAE,CAAC,CACpB,KAAC,uCAAuC,IACtC,iBAAiB,EAAE,iBAAiB,GACpC,CACH,CAAC"}
|
@@ -13,7 +13,7 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import type { Multiplicity, Mapping, PackageableRuntime, PureModel, DatasetSpecification, MappingModelCoverageAnalysisResult } from '@finos/legend-graph';
|
16
|
+
import type { Multiplicity, Mapping, PackageableRuntime, PureModel, DatasetSpecification, MappingModelCoverageAnalysisResult, FunctionAnalysisInfo } from '@finos/legend-graph';
|
17
17
|
import type { DataSpaceSupportInfo } from '../../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
|
18
18
|
import type { Diagram } from '@finos/legend-extension-dsl-diagram/graph';
|
19
19
|
export declare class DataSpaceExecutionContextAnalysisResult {
|
@@ -153,6 +153,8 @@ export declare class DataSpaceAnalysisResult {
|
|
153
153
|
executables: DataSpaceExecutableAnalysisResult[];
|
154
154
|
supportInfo?: DataSpaceSupportInfo | undefined;
|
155
155
|
mappingToMappingCoverageResult?: Map<string, MappingModelCoverageAnalysisResult>;
|
156
|
+
functionInfos?: Map<string, FunctionAnalysisInfo>;
|
157
|
+
dependencyFunctionInfos?: Map<string, FunctionAnalysisInfo>;
|
156
158
|
get displayName(): string;
|
157
159
|
}
|
158
160
|
//# sourceMappingURL=DataSpaceAnalysis.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DataSpaceAnalysis.d.ts","sourceRoot":"","sources":["../../../../src/graph-manager/action/analytics/DataSpaceAnalysis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,OAAO,EACP,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EACpB,kCAAkC,
|
1
|
+
{"version":3,"file":"DataSpaceAnalysis.d.ts","sourceRoot":"","sources":["../../../../src/graph-manager/action/analytics/DataSpaceAnalysis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,OAAO,EACP,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EACpB,kCAAkC,EAClC,oBAAoB,EACrB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8FAA8F,CAAC;AACzI,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AA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,EAAG,SAAS,CAAC;IAElB,sBAAsB,EAAG,GAAG,CAAC,MAAM,EAAE,uCAAuC,CAAC,CAAC;IAC9E,uBAAuB,EAAG,uCAAuC,CAAC;IAElE,WAAW,EAAE,qCAAqC,EAAE,CAAM;IAE1D,QAAQ,EAAE,8BAA8B,EAAE,CAAM;IAEhD,WAAW,EAAE,iCAAiC,EAAE,CAAM;IAEtD,WAAW,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAE/C,8BAA8B,CAAC,EAAE,GAAG,CAClC,MAAM,EACN,kCAAkC,CACnC,CAAC;IAEF,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAClD,uBAAuB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAE5D,IAAI,WAAW,IAAI,MAAM,CAExB;CACF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DataSpaceAnalysis.js","sourceRoot":"","sources":["../../../../src/graph-manager/action/analytics/DataSpaceAnalysis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
1
|
+
{"version":3,"file":"DataSpaceAnalysis.js","sourceRoot":"","sources":["../../../../src/graph-manager/action/analytics/DataSpaceAnalysis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAWH,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAI7D,MAAM,OAAO,uCAAuC;IAClD,IAAI,CAAU;IACd,KAAK,CAAsB;IAC3B,WAAW,CAAsB;IACjC,OAAO,CAAW;IAClB,cAAc,CAAsB;IACpC,kBAAkB,CAAwB;IAC1C,QAAQ,GAA2B,EAAE,CAAC;IACtC,eAAe,CAA4C;CAC5D;AAED,MAAM,OAAO,wCAAwC;IACnD,SAAS,CAAU;IACnB,cAAc,CAAU;IACxB,cAAc,CAAU;CACzB;AAED,MAAM,OAAO,wBAAwB;IAC1B,KAAK,GAA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,OAAO,CAAU;IACjB,IAAI,CAAU;IAEd,YAAY,GAA+B,EAAE,CAAC;IAC9C,WAAW,GAA8B,EAAE,CAAC;IAE5C,KAAK,CAAsB;IAC3B,WAAW,CAAsB;IAEjC,KAAK,CAAa;IAElB,sBAAsB,CAAwD;IAC9E,uBAAuB,CAA2C;IAElE,WAAW,GAA4C,EAAE,CAAC;IAE1D,QAAQ,GAAqC,EAAE,CAAC;IAEhD,WAAW,GAAwC,EAAE,CAAC;IAEtD,WAAW,CAAoC;IAE/C,8BAA8B,CAG5B;IAEF,aAAa,CAAqC;IAClD,uBAAuB,CAAqC;IAE5D,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,KAAK,IAAI,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;CACF"}
|
@@ -13,8 +13,11 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
+
import { type GraphManagerState } from '@finos/legend-graph';
|
16
17
|
import type { DepotServerClient, StoreProjectData } from '@finos/legend-server-depot';
|
17
|
-
import type
|
18
|
-
import type
|
18
|
+
import { type PlainObject } from '@finos/legend-shared';
|
19
|
+
import { type DataSpaceAnalysisResult, DataSpaceExecutableAnalysisResult } from './DataSpaceAnalysis.js';
|
20
|
+
import { type DataSpaceExecutable, type DataSpace } from '../../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
|
19
21
|
export declare const retrieveAnalyticsResultCache: (project: StoreProjectData, versionId: string, dataSpacePath: string, depotServerClient: DepotServerClient) => Promise<PlainObject<DataSpaceAnalysisResult>>;
|
22
|
+
export declare const buildDataSpaceExecutableAnalysisResultFromExecutable: (dataspace: DataSpace, executables: DataSpaceExecutable[], graphManagerState: GraphManagerState) => Promise<DataSpaceExecutableAnalysisResult[]>;
|
20
23
|
//# sourceMappingURL=DataSpaceAnalysisHelper.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DataSpaceAnalysisHelper.d.ts","sourceRoot":"","sources":["../../../../src/graph-manager/action/analytics/DataSpaceAnalysisHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
1
|
+
{"version":3,"file":"DataSpaceAnalysisHelper.d.ts","sourceRoot":"","sources":["../../../../src/graph-manager/action/analytics/DataSpaceAnalysisHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,iBAAiB,EAIvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EACL,KAAK,uBAAuB,EAC5B,iCAAiC,EAIlC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,SAAS,EAGf,MAAM,8FAA8F,CAAC;AAMtG,eAAO,MAAM,4BAA4B,YAC9B,gBAAgB,aACd,MAAM,iBACF,MAAM,qBACF,iBAAiB,KACnC,OAAO,CAAC,WAAW,CAAC,uBAAuB,CAAC,CAW5C,CAAC;AAEJ,eAAO,MAAM,oDAAoD,cACpD,SAAS,eACP,mBAAmB,EAAE,qBACf,iBAAiB,KACnC,OAAO,CAAC,iCAAiC,EAAE,CA2CrB,CAAC"}
|
@@ -13,8 +13,46 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { getExpectedArtifactGenerationExtensionOutputPath } from '@finos/legend-graph';
|
16
|
+
import { ConcreteFunctionDefinition, getExpectedArtifactGenerationExtensionOutputPath, Service, } from '@finos/legend-graph';
|
17
|
+
import { isNonNullable } from '@finos/legend-shared';
|
18
|
+
import { DataSpaceExecutableAnalysisResult, DataSpaceFunctionPointerExecutableInfo, DataSpaceServiceExecutableInfo, DataSpaceTemplateExecutableInfo, } from './DataSpaceAnalysis.js';
|
19
|
+
import { DataSpaceExecutableTemplate, DataSpacePackageableElementExecutable, } from '../../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
|
20
|
+
import { getQueryFromDataspaceExecutable } from '../../DSL_DataSpace_GraphManagerHelper.js';
|
17
21
|
const DATASPACE_ANALYTICS_FILE_NAME = 'AnalyticsResult.json';
|
18
22
|
const V1_DATASPACE_ANALYTICS_ARTIFACT_EXTENSION_KEY = 'dataSpace-analytics';
|
19
23
|
export const retrieveAnalyticsResultCache = async (project, versionId, dataSpacePath, depotServerClient) => JSON.parse(await depotServerClient.getGenerationContentByPath(project, versionId, getExpectedArtifactGenerationExtensionOutputPath(dataSpacePath, V1_DATASPACE_ANALYTICS_ARTIFACT_EXTENSION_KEY, DATASPACE_ANALYTICS_FILE_NAME)));
|
24
|
+
export const buildDataSpaceExecutableAnalysisResultFromExecutable = async (dataspace, executables, graphManagerState) => (await Promise.all(executables.map(async (executable) => {
|
25
|
+
const result = new DataSpaceExecutableAnalysisResult();
|
26
|
+
result.title = executable.title;
|
27
|
+
result.description = executable.description;
|
28
|
+
let info;
|
29
|
+
const query = getQueryFromDataspaceExecutable(executable, graphManagerState);
|
30
|
+
if (executable instanceof DataSpaceExecutableTemplate) {
|
31
|
+
info = new DataSpaceTemplateExecutableInfo();
|
32
|
+
if (executable.id) {
|
33
|
+
info.id = executable.id;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
else if (executable instanceof DataSpacePackageableElementExecutable) {
|
37
|
+
if (executable.executable.value instanceof Service) {
|
38
|
+
info = new DataSpaceServiceExecutableInfo();
|
39
|
+
info.id = executable.id ?? executable.executable.value.path;
|
40
|
+
}
|
41
|
+
else if (executable.executable.value instanceof ConcreteFunctionDefinition) {
|
42
|
+
info = new DataSpaceFunctionPointerExecutableInfo();
|
43
|
+
info.id = executable.id ?? executable.executable.value.path;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
if (info) {
|
47
|
+
info.executionContextKey =
|
48
|
+
executable.executionContextKey ??
|
49
|
+
dataspace.defaultExecutionContext.name;
|
50
|
+
if (query) {
|
51
|
+
info.query =
|
52
|
+
await graphManagerState.graphManager.lambdaToPureCode(query);
|
53
|
+
}
|
54
|
+
}
|
55
|
+
result.info = info;
|
56
|
+
return result;
|
57
|
+
}))).filter(isNonNullable);
|
20
58
|
//# sourceMappingURL=DataSpaceAnalysisHelper.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DataSpaceAnalysisHelper.js","sourceRoot":"","sources":["../../../../src/graph-manager/action/analytics/DataSpaceAnalysisHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
1
|
+
{"version":3,"file":"DataSpaceAnalysisHelper.js","sourceRoot":"","sources":["../../../../src/graph-manager/action/analytics/DataSpaceAnalysisHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,0BAA0B,EAC1B,gDAAgD,EAChD,OAAO,GACR,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EAAE,aAAa,EAAoB,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAEL,iCAAiC,EACjC,sCAAsC,EACtC,8BAA8B,EAC9B,+BAA+B,GAChC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAGL,2BAA2B,EAC3B,qCAAqC,GACtC,MAAM,8FAA8F,CAAC;AACtG,OAAO,EAAE,+BAA+B,EAAE,MAAM,2CAA2C,CAAC;AAE5F,MAAM,6BAA6B,GAAG,sBAAsB,CAAC;AAC7D,MAAM,6CAA6C,GAAG,qBAAqB,CAAC;AAE5E,MAAM,CAAC,MAAM,4BAA4B,GAAG,KAAK,EAC/C,OAAyB,EACzB,SAAiB,EACjB,aAAqB,EACrB,iBAAoC,EACW,EAAE,CACjD,IAAI,CAAC,KAAK,CACR,MAAM,iBAAiB,CAAC,0BAA0B,CAChD,OAAO,EACP,SAAS,EACT,gDAAgD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,IAAI,IAAI,EAAE,CAAC;QACT,IAAI,CAAC,mBAAmB;YACtB,UAAU,CAAC,mBAAmB;gBAC9B,SAAS,CAAC,uBAAuB,CAAC,IAAI,CAAC;QACzC,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,KAAK;gBACR,MAAM,iBAAiB,CAAC,YAAY,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IACD,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC,CACH,CACF,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC"}
|
package/lib/index.css
CHANGED
package/lib/package.json
CHANGED
@@ -14,13 +14,13 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
import { type GenericLegendApplicationStore } from '@finos/legend-application';
|
17
|
-
import { type QueryBuilderConfig, type QuerySDLC, type QueryBuilderWorkflowState, type QueryBuilderActionConfig, QueryBuilderState } from '@finos/legend-query-builder';
|
17
|
+
import { type QueryBuilderConfig, type QuerySDLC, type QueryBuilderWorkflowState, type QueryBuilderActionConfig, QueryBuilderState, type QueryBuilderExtraFunctionAnalysisInfo } from '@finos/legend-query-builder';
|
18
18
|
import { type Class, type GraphManagerState, type QueryExecutionContext, type Runtime, type Mapping } from '@finos/legend-graph';
|
19
19
|
import { type DepotServerClient } from '@finos/legend-server-depot';
|
20
20
|
import { type GeneratorFn, ActionState } from '@finos/legend-shared';
|
21
|
-
import { type DataSpaceExecutionContext,
|
21
|
+
import { type DataSpaceExecutionContext, DataSpace } from '../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
|
22
22
|
import { DataSpaceAdvancedSearchState } from '../query/DataSpaceAdvancedSearchState.js';
|
23
|
-
import type
|
23
|
+
import { type DataSpaceAnalysisResult, type DataSpaceExecutableAnalysisResult } from '../../graph-manager/action/analytics/DataSpaceAnalysis.js';
|
24
24
|
import { type DataSpaceInfo } from '../shared/DataSpaceInfo.js';
|
25
25
|
import type { ProjectGAVCoordinates } from '@finos/legend-storage';
|
26
26
|
export declare const resolveUsableDataSpaceClasses: (dataSpace: DataSpace, mapping: Mapping, graphManagerState: GraphManagerState) => Class[];
|
@@ -40,13 +40,13 @@ export declare abstract class DataSpacesBuilderRepoistory {
|
|
40
40
|
get isAdvancedDataSpaceSearchEnabled(): boolean;
|
41
41
|
get canVisitTemplateQuery(): boolean;
|
42
42
|
abstract loadDataSpaces(): GeneratorFn<void>;
|
43
|
-
abstract visitTemplateQuery(dataSpace: DataSpace, template:
|
43
|
+
abstract visitTemplateQuery(dataSpace: DataSpace, template: DataSpaceExecutableAnalysisResult): void;
|
44
44
|
configureDataSpaceOptions(val: DataSpaceInfo[]): void;
|
45
45
|
}
|
46
46
|
export declare class DataSpacesGraphRepoistory extends DataSpacesBuilderRepoistory {
|
47
47
|
constructor(applicatonstore: GenericLegendApplicationStore, graphManagerState: GraphManagerState, prioritizeDataSpaceFunc?: ((val: DataSpaceInfo) => boolean) | undefined);
|
48
48
|
loadDataSpaces(): GeneratorFn<void>;
|
49
|
-
visitTemplateQuery(dataSpace: DataSpace, template:
|
49
|
+
visitTemplateQuery(dataSpace: DataSpace, template: DataSpaceExecutableAnalysisResult): void;
|
50
50
|
}
|
51
51
|
export declare class DataSpacesDepotRepository extends DataSpacesBuilderRepoistory {
|
52
52
|
readonly depotServerClient: DepotServerClient;
|
@@ -57,7 +57,7 @@ export declare class DataSpacesDepotRepository extends DataSpacesBuilderRepoisto
|
|
57
57
|
constructor(depotServerClient: DepotServerClient, applicatonstore: GenericLegendApplicationStore, graphManagerState: GraphManagerState, project: ProjectGAVCoordinates, viewProject: (groupId: string, artifactId: string, versionId: string, entityPath: string | undefined) => void, viewSDLCProject: (groupId: string, artifactId: string, entityPath: string | undefined) => Promise<void>, prioritizeDataSpaceFunc?: ((val: DataSpaceInfo) => boolean) | undefined);
|
58
58
|
get isAdvancedDataSpaceSearchEnabled(): boolean;
|
59
59
|
get canVisitTemplateQuery(): boolean;
|
60
|
-
visitTemplateQuery(dataSpace: DataSpace, template:
|
60
|
+
visitTemplateQuery(dataSpace: DataSpace, template: DataSpaceExecutableAnalysisResult): void;
|
61
61
|
showAdvancedSearchPanel(dataSpace: DataSpace): void;
|
62
62
|
hideAdvancedSearchPanel(): void;
|
63
63
|
loadDataSpaces(): GeneratorFn<void>;
|
@@ -74,6 +74,7 @@ export declare class DataSpaceQueryBuilderState extends QueryBuilderState {
|
|
74
74
|
executionContext: DataSpaceExecutionContext;
|
75
75
|
showRuntimeSelector: boolean;
|
76
76
|
isTemplateQueryDialogOpen: boolean;
|
77
|
+
displayedTemplateQueries: DataSpaceExecutableAnalysisResult[] | undefined;
|
77
78
|
constructor(applicationStore: GenericLegendApplicationStore, graphManagerState: GraphManagerState, workflow: QueryBuilderWorkflowState, actionConfig: QueryBuilderActionConfig, dataSpace: DataSpace, executionContext: DataSpaceExecutionContext, dataSpaceRepo: DataSpacesBuilderRepoistory | undefined, onDataSpaceChange: (val: DataSpaceInfo) => void, dataSpaceAnalysisResult?: DataSpaceAnalysisResult | undefined, onExecutionContextChange?: ((val: DataSpaceExecutionContext) => void) | undefined, onRuntimeChange?: ((val: Runtime) => void) | undefined, onClassChange?: ((val: Class) => void) | undefined, config?: QueryBuilderConfig | undefined, sourceInfo?: QuerySDLC | undefined);
|
78
79
|
get sideBarClassName(): string | undefined;
|
79
80
|
getQueryExecutionContext(): QueryExecutionContext;
|
@@ -88,5 +89,7 @@ export declare class DataSpaceQueryBuilderState extends QueryBuilderState {
|
|
88
89
|
* - If the chosen class is compatible with the new selected execution context mapping, do nothing, otherwise, try to choose a compatible class
|
89
90
|
*/
|
90
91
|
propagateExecutionContextChange(executionContext: DataSpaceExecutionContext): void;
|
92
|
+
buildFunctionAnalysisInfo(): QueryBuilderExtraFunctionAnalysisInfo | undefined;
|
93
|
+
intialize(): GeneratorFn<void>;
|
91
94
|
}
|
92
95
|
//# sourceMappingURL=DataSpaceQueryBuilderState.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DataSpaceQueryBuilderState.d.ts","sourceRoot":"","sources":["../../../src/stores/query-builder/DataSpaceQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACd,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,iBAAiB,
|
1
|
+
{"version":3,"file":"DataSpaceQueryBuilderState.d.ts","sourceRoot":"","sources":["../../../src/stores/query-builder/DataSpaceQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACd,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,iBAAiB,EACjB,KAAK,qCAAqC,EAC3C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,KAAK,KAAK,EACV,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,OAAO,EACZ,KAAK,OAAO,EAOb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,iBAAiB,EAIvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,KAAK,WAAW,EAChB,WAAW,EAIZ,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAEL,KAAK,yBAAyB,EAC9B,SAAS,EACV,MAAM,2FAA2F,CAAC;AAEnG,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,iCAAiC,EAEvC,MAAM,2DAA2D,CAAC;AACnE,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,4BAA4B,CAAC;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CAAC,EACrB,CAAC,CAAC,GAAG,EAAE,yBAAyB,KAAK,IAAI,CAAC,GAC1C,SAAS,EACb,eAAe,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,EACtD,aAAa,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC,GAAG,SAAS,EAClD,MAAM,CAAC,EAAE,kBAAkB,GAAG,SAAS,EACvC,UAAU,CAAC,EAAE,SAAS,GAAG,SAAS;IA+BpC,IAAa,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAIlD;IAEQ,wBAAwB,IAAI,qBAAqB;IAO1D,0BAA0B,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAI9C,mBAAmB,CAAC,GAAG,EAAE,yBAAyB,GAAG,IAAI;IAIzD,sBAAsB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAI1C;;;;;;OAMG;IACH,+BAA+B,CAC7B,gBAAgB,EAAE,yBAAyB,GAC1C,IAAI;IA4BE,yBAAyB,IAC9B,qCAAqC,GACrC,SAAS;IAwBZ,SAAS,IAAI,WAAW,CAAC,IAAI,CAAC;CAYhC"}
|
@@ -15,16 +15,18 @@
|
|
15
15
|
*/
|
16
16
|
import {} from '@finos/legend-application';
|
17
17
|
import { QueryBuilderState, } from '@finos/legend-query-builder';
|
18
|
-
import { getMappingCompatibleClasses,
|
18
|
+
import { getMappingCompatibleClasses, Package, QueryDataSpaceExecutionContext, elementBelongsToPackage, RuntimePointer, } from '@finos/legend-graph';
|
19
19
|
import { DepotScope, SNAPSHOT_VERSION_ALIAS, } from '@finos/legend-server-depot';
|
20
|
-
import { ActionState, assertErrorThrown,
|
20
|
+
import { ActionState, assertErrorThrown, filterByType, getNullableFirstEntry, } from '@finos/legend-shared';
|
21
21
|
import { action, flow, makeObservable, observable } from 'mobx';
|
22
22
|
import { renderDataSpaceQueryBuilderSetupPanelContent } from '../../components/query-builder/DataSpaceQueryBuilder.js';
|
23
|
-
import { DataSpace,
|
23
|
+
import { DataSpace, } from '../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
|
24
24
|
import { DATA_SPACE_ELEMENT_CLASSIFIER_PATH } from '../../graph-manager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js';
|
25
25
|
import { DataSpaceAdvancedSearchState } from '../query/DataSpaceAdvancedSearchState.js';
|
26
|
+
import { DataSpaceServiceExecutableInfo, } from '../../graph-manager/action/analytics/DataSpaceAnalysis.js';
|
26
27
|
import { extractDataSpaceInfo, } from '../shared/DataSpaceInfo.js';
|
27
28
|
import { generateDataSpaceTemplateQueryCreatorRoute } from '../../__lib__/to-delete/DSL_DataSpace_LegendQueryNavigation_to_delete.js';
|
29
|
+
import { buildDataSpaceExecutableAnalysisResultFromExecutable } from '../../graph-manager/action/analytics/DataSpaceAnalysisHelper.js';
|
28
30
|
const matchesDataElement = (_class, element) => {
|
29
31
|
if (_class === element) {
|
30
32
|
return true;
|
@@ -128,15 +130,20 @@ export class DataSpacesDepotRepository extends DataSpacesBuilderRepoistory {
|
|
128
130
|
return true;
|
129
131
|
}
|
130
132
|
visitTemplateQuery(dataSpace, template) {
|
131
|
-
|
132
|
-
|
133
|
+
let templateId;
|
134
|
+
if (template.info) {
|
135
|
+
if (template.info.id) {
|
136
|
+
templateId = template.info.id;
|
137
|
+
}
|
138
|
+
else if (template.info instanceof DataSpaceServiceExecutableInfo) {
|
139
|
+
templateId = template.executable ?? template.info.pattern;
|
140
|
+
}
|
133
141
|
}
|
134
|
-
|
135
|
-
|
136
|
-
this.applicationStore.navigationService.navigator.visitAddress(this.applicationStore.navigationService.navigator.generateAddress(generateDataSpaceTemplateQueryCreatorRoute(this.project.groupId, this.project.artifactId, this.project.versionId, dataSpace.path, template.executable.value.path)));
|
142
|
+
if (!templateId) {
|
143
|
+
this.applicationStore.notificationService.notifyWarning(`Can't visit tempalte query without a Id`);
|
137
144
|
}
|
138
145
|
else {
|
139
|
-
this.applicationStore.
|
146
|
+
this.applicationStore.navigationService.navigator.visitAddress(this.applicationStore.navigationService.navigator.generateAddress(generateDataSpaceTemplateQueryCreatorRoute(this.project.groupId, this.project.artifactId, this.project.versionId, dataSpace.path, templateId)));
|
140
147
|
}
|
141
148
|
}
|
142
149
|
showAdvancedSearchPanel(dataSpace) {
|
@@ -186,15 +193,18 @@ export class DataSpaceQueryBuilderState extends QueryBuilderState {
|
|
186
193
|
executionContext;
|
187
194
|
showRuntimeSelector = false;
|
188
195
|
isTemplateQueryDialogOpen = false;
|
196
|
+
displayedTemplateQueries;
|
189
197
|
constructor(applicationStore, graphManagerState, workflow, actionConfig, dataSpace, executionContext, dataSpaceRepo, onDataSpaceChange, dataSpaceAnalysisResult, onExecutionContextChange, onRuntimeChange, onClassChange, config, sourceInfo) {
|
190
198
|
super(applicationStore, graphManagerState, workflow, config, sourceInfo);
|
191
199
|
makeObservable(this, {
|
192
200
|
executionContext: observable,
|
193
201
|
showRuntimeSelector: observable,
|
194
202
|
isTemplateQueryDialogOpen: observable,
|
203
|
+
displayedTemplateQueries: observable,
|
195
204
|
setExecutionContext: action,
|
196
205
|
setShowRuntimeSelector: action,
|
197
206
|
setTemplateQueryDialogOpen: action,
|
207
|
+
intialize: flow,
|
198
208
|
});
|
199
209
|
this.dataSpace = dataSpace;
|
200
210
|
this.executionContext = executionContext;
|
@@ -254,5 +264,27 @@ export class DataSpaceQueryBuilderState extends QueryBuilderState {
|
|
254
264
|
}
|
255
265
|
}
|
256
266
|
}
|
267
|
+
buildFunctionAnalysisInfo() {
|
268
|
+
let functionInfoMap = new Map();
|
269
|
+
let dependencyFunctionInfoMap = new Map();
|
270
|
+
const functionInfos = this.dataSpaceAnalysisResult?.functionInfos;
|
271
|
+
if (functionInfos) {
|
272
|
+
functionInfoMap = functionInfos;
|
273
|
+
}
|
274
|
+
const dependencyFunctionInfos = this.dataSpaceAnalysisResult?.dependencyFunctionInfos;
|
275
|
+
if (dependencyFunctionInfos) {
|
276
|
+
dependencyFunctionInfoMap = dependencyFunctionInfos;
|
277
|
+
}
|
278
|
+
return {
|
279
|
+
functionInfoMap,
|
280
|
+
dependencyFunctionInfoMap,
|
281
|
+
};
|
282
|
+
}
|
283
|
+
*intialize() {
|
284
|
+
this.displayedTemplateQueries =
|
285
|
+
this.dataSpace.executables && this.dataSpace.executables.length > 0
|
286
|
+
? (yield buildDataSpaceExecutableAnalysisResultFromExecutable(this.dataSpace, this.dataSpace.executables, this.graphManagerState))
|
287
|
+
: this.dataSpaceAnalysisResult?.executables.filter((ex) => ex.info !== undefined);
|
288
|
+
}
|
257
289
|
}
|
258
290
|
//# sourceMappingURL=DataSpaceQueryBuilderState.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DataSpaceQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/query-builder/DataSpaceQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAsC,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAKL,iBAAiB,
|
1
|
+
{"version":3,"file":"DataSpaceQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/query-builder/DataSpaceQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAsC,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAKL,iBAAiB,GAElB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAOL,2BAA2B,EAC3B,OAAO,EACP,8BAA8B,EAC9B,uBAAuB,EACvB,cAAc,GACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGL,UAAU,EACV,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,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,CAAC,CAAE,CAAC,MAAM,oDAAoD,CAC1D,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,SAAS,CAAC,WAAW,EAC1B,IAAI,CAAC,iBAAiB,CACvB,CAAyC;gBAC5C,CAAC,CAAC,IAAI,CAAC,uBAAuB,EAAE,WAAW,CAAC,MAAM,CAC9C,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,KAAK,SAAS,CAC9B,CAAC;IACV,CAAC;CACF"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@finos/legend-extension-dsl-data-space",
|
3
|
-
"version": "10.3.
|
3
|
+
"version": "10.3.82",
|
4
4
|
"description": "Legend extension for Data Space DSL",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -45,12 +45,12 @@
|
|
45
45
|
"dependencies": {
|
46
46
|
"@finos/legend-application": "16.0.3",
|
47
47
|
"@finos/legend-art": "7.1.62",
|
48
|
-
"@finos/legend-code-editor": "2.0.
|
49
|
-
"@finos/legend-extension-dsl-diagram": "8.1.
|
50
|
-
"@finos/legend-graph": "31.10.
|
51
|
-
"@finos/legend-lego": "2.0.
|
52
|
-
"@finos/legend-query-builder": "4.15.
|
53
|
-
"@finos/legend-server-depot": "6.0.
|
48
|
+
"@finos/legend-code-editor": "2.0.5",
|
49
|
+
"@finos/legend-extension-dsl-diagram": "8.1.20",
|
50
|
+
"@finos/legend-graph": "31.10.39",
|
51
|
+
"@finos/legend-lego": "2.0.7",
|
52
|
+
"@finos/legend-query-builder": "4.15.4",
|
53
|
+
"@finos/legend-server-depot": "6.0.63",
|
54
54
|
"@finos/legend-server-sdlc": "5.3.33",
|
55
55
|
"@finos/legend-shared": "10.0.57",
|
56
56
|
"@finos/legend-storage": "3.0.107",
|
@@ -22,26 +22,23 @@ import {
|
|
22
22
|
TagIcon,
|
23
23
|
} from '@finos/legend-art';
|
24
24
|
import { observer } from 'mobx-react-lite';
|
25
|
-
import { useRef } from 'react';
|
25
|
+
import { useEffect, useRef } from 'react';
|
26
26
|
import {
|
27
27
|
ActionAlertActionType,
|
28
28
|
ActionAlertType,
|
29
29
|
useApplicationStore,
|
30
30
|
} from '@finos/legend-application';
|
31
31
|
import { DocumentationLink } from '@finos/legend-lego/application';
|
32
|
-
import type { DataSpaceExecutable } from '../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
|
33
32
|
import type { DataSpaceQueryBuilderState } from '../../stores/query-builder/DataSpaceQueryBuilderState.js';
|
34
33
|
import { DSL_DATA_SPACE_LEGEND_QUERY_DOCUMENTATION_KEY } from '../../__lib__/query/DSL_DataSpace_LegendQueryDocumentation.js';
|
35
|
-
import {
|
36
|
-
|
37
|
-
getQueryFromDataspaceExecutable,
|
38
|
-
} from '../../graph-manager/DSL_DataSpace_GraphManagerHelper.js';
|
34
|
+
import { flowResult } from 'mobx';
|
35
|
+
import type { DataSpaceExecutableAnalysisResult } from '../../graph-manager/action/analytics/DataSpaceAnalysis.js';
|
39
36
|
|
40
37
|
const DataSpaceTemplateQueryDialog = observer(
|
41
38
|
(props: {
|
42
39
|
triggerElement: HTMLElement | null;
|
43
40
|
queryBuilderState: DataSpaceQueryBuilderState;
|
44
|
-
templateQueries:
|
41
|
+
templateQueries: DataSpaceExecutableAnalysisResult[];
|
45
42
|
}) => {
|
46
43
|
const { triggerElement, queryBuilderState, templateQueries } = props;
|
47
44
|
const applicationStore = useApplicationStore();
|
@@ -49,42 +46,43 @@ const DataSpaceTemplateQueryDialog = observer(
|
|
49
46
|
queryBuilderState.setTemplateQueryDialogOpen(false);
|
50
47
|
};
|
51
48
|
|
52
|
-
const loadTemplateQuery = (
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
)
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
49
|
+
const loadTemplateQuery = async (
|
50
|
+
template: DataSpaceExecutableAnalysisResult,
|
51
|
+
): Promise<void> => {
|
52
|
+
let query;
|
53
|
+
if (template.info) {
|
54
|
+
query =
|
55
|
+
await queryBuilderState.graphManagerState.graphManager.pureCodeToLambda(
|
56
|
+
template.info.query,
|
57
|
+
);
|
61
58
|
}
|
62
|
-
const query = getQueryFromDataspaceExecutable(
|
63
|
-
template,
|
64
|
-
queryBuilderState.graphManagerState,
|
65
|
-
);
|
66
59
|
if (!query) {
|
67
60
|
applicationStore.notificationService.notifyError(
|
68
61
|
'Unable get a query from this template query',
|
69
62
|
);
|
70
|
-
}
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
63
|
+
} else {
|
64
|
+
const executionContext =
|
65
|
+
queryBuilderState.dataSpace.executionContexts.filter(
|
66
|
+
(ex) => ex.name === template.info?.executionContextKey,
|
67
|
+
)[0];
|
68
|
+
if (
|
69
|
+
executionContext &&
|
70
|
+
executionContext.name !== queryBuilderState.executionContext.name
|
71
|
+
) {
|
72
|
+
queryBuilderState.setExecutionContext(executionContext);
|
73
|
+
queryBuilderState.propagateExecutionContextChange(executionContext);
|
74
|
+
queryBuilderState.initializeWithQuery(query);
|
75
|
+
queryBuilderState.onExecutionContextChange?.(executionContext);
|
76
|
+
} else {
|
77
|
+
queryBuilderState.initializeWithQuery(query);
|
78
|
+
}
|
83
79
|
}
|
84
80
|
handleClose();
|
85
81
|
};
|
86
82
|
|
87
|
-
const loadQuery = (
|
83
|
+
const loadQuery = async (
|
84
|
+
template: DataSpaceExecutableAnalysisResult,
|
85
|
+
): Promise<void> => {
|
88
86
|
if (queryBuilderState.changeDetectionState.hasChanged) {
|
89
87
|
applicationStore.alertService.setActionAlertInfo({
|
90
88
|
message:
|
@@ -94,7 +92,9 @@ const DataSpaceTemplateQueryDialog = observer(
|
|
94
92
|
{
|
95
93
|
label: 'Proceed',
|
96
94
|
type: ActionAlertActionType.PROCEED_WITH_CAUTION,
|
97
|
-
handler: (): void =>
|
95
|
+
handler: (): void => {
|
96
|
+
flowResult(loadTemplateQuery(template));
|
97
|
+
},
|
98
98
|
},
|
99
99
|
{
|
100
100
|
label: 'Abort',
|
@@ -104,11 +104,13 @@ const DataSpaceTemplateQueryDialog = observer(
|
|
104
104
|
],
|
105
105
|
});
|
106
106
|
} else {
|
107
|
-
loadTemplateQuery(template);
|
107
|
+
flowResult(loadTemplateQuery(template));
|
108
108
|
}
|
109
109
|
};
|
110
110
|
|
111
|
-
const visitTemplateQuery = (
|
111
|
+
const visitTemplateQuery = (
|
112
|
+
template: DataSpaceExecutableAnalysisResult,
|
113
|
+
): void => {
|
112
114
|
if (queryBuilderState.dataSpaceRepo.canVisitTemplateQuery) {
|
113
115
|
queryBuilderState.dataSpaceRepo.visitTemplateQuery(
|
114
116
|
queryBuilderState.dataSpace,
|
@@ -157,7 +159,9 @@ const DataSpaceTemplateQueryDialog = observer(
|
|
157
159
|
<button
|
158
160
|
className="query-builder__data-space__template-query-panel__query__entry"
|
159
161
|
title="click to load template query"
|
160
|
-
onClick={() =>
|
162
|
+
onClick={() => {
|
163
|
+
flowResult(loadQuery(query));
|
164
|
+
}}
|
161
165
|
>
|
162
166
|
<div className="query-builder__data-space__template-query-panel__query__entry__content">
|
163
167
|
<div className="query-builder__data-space__template-query-panel__query__entry__content__title">
|
@@ -196,12 +200,17 @@ const DataSpaceTemplateQueryDialog = observer(
|
|
196
200
|
const DataSpaceQueryBuilderTemplateQueryPanel = observer(
|
197
201
|
(props: { queryBuilderState: DataSpaceQueryBuilderState }) => {
|
198
202
|
const { queryBuilderState } = props;
|
203
|
+
const applicationStore = useApplicationStore();
|
199
204
|
const templateQueryButtonRef = useRef<HTMLButtonElement>(null);
|
200
|
-
const templateQueries = queryBuilderState.dataSpace.executables;
|
201
|
-
|
202
205
|
const showTemplateQueries = (): void => {
|
203
206
|
queryBuilderState.setTemplateQueryDialogOpen(true);
|
204
207
|
};
|
208
|
+
const templateQueries = queryBuilderState.displayedTemplateQueries;
|
209
|
+
useEffect(() => {
|
210
|
+
flowResult(queryBuilderState.intialize()).catch(
|
211
|
+
applicationStore.alertUnhandledError,
|
212
|
+
);
|
213
|
+
}, [queryBuilderState, applicationStore.alertUnhandledError]);
|
205
214
|
|
206
215
|
return (
|
207
216
|
<>
|
@@ -21,6 +21,7 @@ import type {
|
|
21
21
|
PureModel,
|
22
22
|
DatasetSpecification,
|
23
23
|
MappingModelCoverageAnalysisResult,
|
24
|
+
FunctionAnalysisInfo,
|
24
25
|
} from '@finos/legend-graph';
|
25
26
|
import { prettyCONSTName, uuid } from '@finos/legend-shared';
|
26
27
|
import type { DataSpaceSupportInfo } from '../../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
|
@@ -221,6 +222,9 @@ export class DataSpaceAnalysisResult {
|
|
221
222
|
MappingModelCoverageAnalysisResult
|
222
223
|
>;
|
223
224
|
|
225
|
+
functionInfos?: Map<string, FunctionAnalysisInfo>;
|
226
|
+
dependencyFunctionInfos?: Map<string, FunctionAnalysisInfo>;
|
227
|
+
|
224
228
|
get displayName(): string {
|
225
229
|
return this.title ?? prettyCONSTName(this.name);
|
226
230
|
}
|
@@ -14,13 +14,31 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
-
import {
|
17
|
+
import {
|
18
|
+
type GraphManagerState,
|
19
|
+
ConcreteFunctionDefinition,
|
20
|
+
getExpectedArtifactGenerationExtensionOutputPath,
|
21
|
+
Service,
|
22
|
+
} from '@finos/legend-graph';
|
18
23
|
import type {
|
19
24
|
DepotServerClient,
|
20
25
|
StoreProjectData,
|
21
26
|
} from '@finos/legend-server-depot';
|
22
|
-
import type
|
23
|
-
import
|
27
|
+
import { isNonNullable, type PlainObject } from '@finos/legend-shared';
|
28
|
+
import {
|
29
|
+
type DataSpaceAnalysisResult,
|
30
|
+
DataSpaceExecutableAnalysisResult,
|
31
|
+
DataSpaceFunctionPointerExecutableInfo,
|
32
|
+
DataSpaceServiceExecutableInfo,
|
33
|
+
DataSpaceTemplateExecutableInfo,
|
34
|
+
} from './DataSpaceAnalysis.js';
|
35
|
+
import {
|
36
|
+
type DataSpaceExecutable,
|
37
|
+
type DataSpace,
|
38
|
+
DataSpaceExecutableTemplate,
|
39
|
+
DataSpacePackageableElementExecutable,
|
40
|
+
} from '../../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
|
41
|
+
import { getQueryFromDataspaceExecutable } from '../../DSL_DataSpace_GraphManagerHelper.js';
|
24
42
|
|
25
43
|
const DATASPACE_ANALYTICS_FILE_NAME = 'AnalyticsResult.json';
|
26
44
|
const V1_DATASPACE_ANALYTICS_ARTIFACT_EXTENSION_KEY = 'dataSpace-analytics';
|
@@ -42,3 +60,52 @@ export const retrieveAnalyticsResultCache = async (
|
|
42
60
|
),
|
43
61
|
),
|
44
62
|
);
|
63
|
+
|
64
|
+
export const buildDataSpaceExecutableAnalysisResultFromExecutable = async (
|
65
|
+
dataspace: DataSpace,
|
66
|
+
executables: DataSpaceExecutable[],
|
67
|
+
graphManagerState: GraphManagerState,
|
68
|
+
): Promise<DataSpaceExecutableAnalysisResult[]> =>
|
69
|
+
(
|
70
|
+
await Promise.all(
|
71
|
+
executables.map(async (executable) => {
|
72
|
+
const result = new DataSpaceExecutableAnalysisResult();
|
73
|
+
result.title = executable.title;
|
74
|
+
result.description = executable.description;
|
75
|
+
let info;
|
76
|
+
const query = getQueryFromDataspaceExecutable(
|
77
|
+
executable,
|
78
|
+
graphManagerState,
|
79
|
+
);
|
80
|
+
if (executable instanceof DataSpaceExecutableTemplate) {
|
81
|
+
info = new DataSpaceTemplateExecutableInfo();
|
82
|
+
if (executable.id) {
|
83
|
+
info.id = executable.id;
|
84
|
+
}
|
85
|
+
} else if (
|
86
|
+
executable instanceof DataSpacePackageableElementExecutable
|
87
|
+
) {
|
88
|
+
if (executable.executable.value instanceof Service) {
|
89
|
+
info = new DataSpaceServiceExecutableInfo();
|
90
|
+
info.id = executable.id ?? executable.executable.value.path;
|
91
|
+
} else if (
|
92
|
+
executable.executable.value instanceof ConcreteFunctionDefinition
|
93
|
+
) {
|
94
|
+
info = new DataSpaceFunctionPointerExecutableInfo();
|
95
|
+
info.id = executable.id ?? executable.executable.value.path;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
if (info) {
|
99
|
+
info.executionContextKey =
|
100
|
+
executable.executionContextKey ??
|
101
|
+
dataspace.defaultExecutionContext.name;
|
102
|
+
if (query) {
|
103
|
+
info.query =
|
104
|
+
await graphManagerState.graphManager.lambdaToPureCode(query);
|
105
|
+
}
|
106
|
+
}
|
107
|
+
result.info = info;
|
108
|
+
return result;
|
109
|
+
}),
|
110
|
+
)
|
111
|
+
).filter(isNonNullable);
|
@@ -21,19 +21,20 @@ import {
|
|
21
21
|
type QueryBuilderWorkflowState,
|
22
22
|
type QueryBuilderActionConfig,
|
23
23
|
QueryBuilderState,
|
24
|
+
type QueryBuilderExtraFunctionAnalysisInfo,
|
24
25
|
} from '@finos/legend-query-builder';
|
25
26
|
import {
|
26
27
|
type Class,
|
27
28
|
type GraphManagerState,
|
28
|
-
getMappingCompatibleClasses,
|
29
|
-
RuntimePointer,
|
30
29
|
type QueryExecutionContext,
|
31
30
|
type Runtime,
|
32
31
|
type Mapping,
|
32
|
+
type FunctionAnalysisInfo,
|
33
|
+
getMappingCompatibleClasses,
|
33
34
|
Package,
|
34
35
|
QueryDataSpaceExecutionContext,
|
35
|
-
Service,
|
36
36
|
elementBelongsToPackage,
|
37
|
+
RuntimePointer,
|
37
38
|
} from '@finos/legend-graph';
|
38
39
|
import {
|
39
40
|
type DepotServerClient,
|
@@ -45,27 +46,30 @@ import {
|
|
45
46
|
type GeneratorFn,
|
46
47
|
ActionState,
|
47
48
|
assertErrorThrown,
|
48
|
-
getNullableFirstEntry,
|
49
49
|
filterByType,
|
50
|
+
getNullableFirstEntry,
|
50
51
|
} from '@finos/legend-shared';
|
51
52
|
import { action, flow, makeObservable, observable } from 'mobx';
|
52
53
|
import { renderDataSpaceQueryBuilderSetupPanelContent } from '../../components/query-builder/DataSpaceQueryBuilder.js';
|
53
54
|
import {
|
55
|
+
type DataSpaceElement,
|
54
56
|
type DataSpaceExecutionContext,
|
55
|
-
type DataSpaceExecutable,
|
56
57
|
DataSpace,
|
57
|
-
DataSpacePackageableElementExecutable,
|
58
|
-
type DataSpaceElement,
|
59
58
|
} from '../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
|
60
59
|
import { DATA_SPACE_ELEMENT_CLASSIFIER_PATH } from '../../graph-manager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js';
|
61
60
|
import { DataSpaceAdvancedSearchState } from '../query/DataSpaceAdvancedSearchState.js';
|
62
|
-
import
|
61
|
+
import {
|
62
|
+
type DataSpaceAnalysisResult,
|
63
|
+
type DataSpaceExecutableAnalysisResult,
|
64
|
+
DataSpaceServiceExecutableInfo,
|
65
|
+
} from '../../graph-manager/action/analytics/DataSpaceAnalysis.js';
|
63
66
|
import {
|
64
67
|
type DataSpaceInfo,
|
65
68
|
extractDataSpaceInfo,
|
66
69
|
} from '../shared/DataSpaceInfo.js';
|
67
70
|
import type { ProjectGAVCoordinates } from '@finos/legend-storage';
|
68
71
|
import { generateDataSpaceTemplateQueryCreatorRoute } from '../../__lib__/to-delete/DSL_DataSpace_LegendQueryNavigation_to_delete.js';
|
72
|
+
import { buildDataSpaceExecutableAnalysisResultFromExecutable } from '../../graph-manager/action/analytics/DataSpaceAnalysisHelper.js';
|
69
73
|
|
70
74
|
const matchesDataElement = (
|
71
75
|
_class: Class,
|
@@ -106,6 +110,7 @@ export const resolveUsableDataSpaceClasses = (
|
|
106
110
|
}
|
107
111
|
return compatibleClasses;
|
108
112
|
};
|
113
|
+
|
109
114
|
export interface DataSpaceQuerySDLC extends QuerySDLC {
|
110
115
|
groupId: string;
|
111
116
|
artifactId: string;
|
@@ -142,7 +147,7 @@ export abstract class DataSpacesBuilderRepoistory {
|
|
142
147
|
abstract loadDataSpaces(): GeneratorFn<void>;
|
143
148
|
abstract visitTemplateQuery(
|
144
149
|
dataSpace: DataSpace,
|
145
|
-
template:
|
150
|
+
template: DataSpaceExecutableAnalysisResult,
|
146
151
|
): void;
|
147
152
|
|
148
153
|
configureDataSpaceOptions(val: DataSpaceInfo[]): void {
|
@@ -183,7 +188,7 @@ export class DataSpacesGraphRepoistory extends DataSpacesBuilderRepoistory {
|
|
183
188
|
|
184
189
|
override visitTemplateQuery(
|
185
190
|
dataSpace: DataSpace,
|
186
|
-
template:
|
191
|
+
template: DataSpaceExecutableAnalysisResult,
|
187
192
|
): void {
|
188
193
|
throw new Error('Method not implemented.');
|
189
194
|
}
|
@@ -249,24 +254,21 @@ export class DataSpacesDepotRepository extends DataSpacesBuilderRepoistory {
|
|
249
254
|
|
250
255
|
override visitTemplateQuery(
|
251
256
|
dataSpace: DataSpace,
|
252
|
-
template:
|
257
|
+
template: DataSpaceExecutableAnalysisResult,
|
253
258
|
): void {
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
259
|
+
let templateId;
|
260
|
+
if (template.info) {
|
261
|
+
if (template.info.id) {
|
262
|
+
templateId = template.info.id;
|
263
|
+
} else if (template.info instanceof DataSpaceServiceExecutableInfo) {
|
264
|
+
templateId = template.executable ?? template.info.pattern;
|
265
|
+
}
|
266
|
+
}
|
267
|
+
if (!templateId) {
|
268
|
+
this.applicationStore.notificationService.notifyWarning(
|
269
|
+
`Can't visit tempalte query without a Id`,
|
265
270
|
);
|
266
|
-
} else
|
267
|
-
template instanceof DataSpacePackageableElementExecutable &&
|
268
|
-
template.executable.value instanceof Service
|
269
|
-
) {
|
271
|
+
} else {
|
270
272
|
this.applicationStore.navigationService.navigator.visitAddress(
|
271
273
|
this.applicationStore.navigationService.navigator.generateAddress(
|
272
274
|
generateDataSpaceTemplateQueryCreatorRoute(
|
@@ -274,14 +276,10 @@ export class DataSpacesDepotRepository extends DataSpacesBuilderRepoistory {
|
|
274
276
|
this.project.artifactId,
|
275
277
|
this.project.versionId,
|
276
278
|
dataSpace.path,
|
277
|
-
|
279
|
+
templateId,
|
278
280
|
),
|
279
281
|
),
|
280
282
|
);
|
281
|
-
} else {
|
282
|
-
this.applicationStore.notificationService.notifyWarning(
|
283
|
-
`Can't visit tempalte query without a Id`,
|
284
|
-
);
|
285
283
|
}
|
286
284
|
}
|
287
285
|
|
@@ -353,6 +351,7 @@ export class DataSpaceQueryBuilderState extends QueryBuilderState {
|
|
353
351
|
executionContext!: DataSpaceExecutionContext;
|
354
352
|
showRuntimeSelector = false;
|
355
353
|
isTemplateQueryDialogOpen = false;
|
354
|
+
displayedTemplateQueries: DataSpaceExecutableAnalysisResult[] | undefined;
|
356
355
|
|
357
356
|
constructor(
|
358
357
|
applicationStore: GenericLegendApplicationStore,
|
@@ -378,9 +377,11 @@ export class DataSpaceQueryBuilderState extends QueryBuilderState {
|
|
378
377
|
executionContext: observable,
|
379
378
|
showRuntimeSelector: observable,
|
380
379
|
isTemplateQueryDialogOpen: observable,
|
380
|
+
displayedTemplateQueries: observable,
|
381
381
|
setExecutionContext: action,
|
382
382
|
setShowRuntimeSelector: action,
|
383
383
|
setTemplateQueryDialogOpen: action,
|
384
|
+
intialize: flow,
|
384
385
|
});
|
385
386
|
|
386
387
|
this.dataSpace = dataSpace;
|
@@ -460,4 +461,43 @@ export class DataSpaceQueryBuilderState extends QueryBuilderState {
|
|
460
461
|
}
|
461
462
|
}
|
462
463
|
}
|
464
|
+
|
465
|
+
override buildFunctionAnalysisInfo():
|
466
|
+
| QueryBuilderExtraFunctionAnalysisInfo
|
467
|
+
| undefined {
|
468
|
+
let functionInfoMap: Map<string, FunctionAnalysisInfo> = new Map<
|
469
|
+
string,
|
470
|
+
FunctionAnalysisInfo
|
471
|
+
>();
|
472
|
+
let dependencyFunctionInfoMap: Map<string, FunctionAnalysisInfo> = new Map<
|
473
|
+
string,
|
474
|
+
FunctionAnalysisInfo
|
475
|
+
>();
|
476
|
+
const functionInfos = this.dataSpaceAnalysisResult?.functionInfos;
|
477
|
+
if (functionInfos) {
|
478
|
+
functionInfoMap = functionInfos;
|
479
|
+
}
|
480
|
+
const dependencyFunctionInfos =
|
481
|
+
this.dataSpaceAnalysisResult?.dependencyFunctionInfos;
|
482
|
+
if (dependencyFunctionInfos) {
|
483
|
+
dependencyFunctionInfoMap = dependencyFunctionInfos;
|
484
|
+
}
|
485
|
+
return {
|
486
|
+
functionInfoMap,
|
487
|
+
dependencyFunctionInfoMap,
|
488
|
+
};
|
489
|
+
}
|
490
|
+
|
491
|
+
*intialize(): GeneratorFn<void> {
|
492
|
+
this.displayedTemplateQueries =
|
493
|
+
this.dataSpace.executables && this.dataSpace.executables.length > 0
|
494
|
+
? ((yield buildDataSpaceExecutableAnalysisResultFromExecutable(
|
495
|
+
this.dataSpace,
|
496
|
+
this.dataSpace.executables,
|
497
|
+
this.graphManagerState,
|
498
|
+
)) as DataSpaceExecutableAnalysisResult[])
|
499
|
+
: this.dataSpaceAnalysisResult?.executables.filter(
|
500
|
+
(ex) => ex.info !== undefined,
|
501
|
+
);
|
502
|
+
}
|
463
503
|
}
|