@finos/legend-application-repl 1.0.35 → 1.0.37
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/LegendREPLDataCubeHeader.d.ts +2 -4
- package/lib/components/LegendREPLDataCubeHeader.d.ts.map +1 -1
- package/lib/components/LegendREPLDataCubeHeader.js +8 -8
- package/lib/components/LegendREPLDataCubeHeader.js.map +1 -1
- package/lib/components/LegendREPLWebApplication.d.ts.map +1 -1
- package/lib/components/LegendREPLWebApplication.js +19 -9
- package/lib/components/LegendREPLWebApplication.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +3 -3
- package/lib/stores/LegendREPLBaseStore.d.ts +8 -6
- package/lib/stores/LegendREPLBaseStore.d.ts.map +1 -1
- package/lib/stores/LegendREPLBaseStore.js +40 -30
- package/lib/stores/LegendREPLBaseStore.js.map +1 -1
- package/lib/stores/LegendREPLDataCubeEngine.d.ts +8 -17
- package/lib/stores/LegendREPLDataCubeEngine.d.ts.map +1 -1
- package/lib/stores/LegendREPLDataCubeEngine.js +63 -61
- package/lib/stores/LegendREPLDataCubeEngine.js.map +1 -1
- package/package.json +8 -8
- package/src/components/LegendREPLDataCubeHeader.tsx +12 -9
- package/src/components/LegendREPLWebApplication.tsx +35 -10
- package/src/stores/LegendREPLBaseStore.tsx +60 -36
- package/src/stores/LegendREPLDataCubeEngine.ts +82 -80
|
@@ -13,10 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { type
|
|
17
|
-
export declare const LegendREPLDataCubeHeader: ((props: {
|
|
18
|
-
dataCube: DataCubeState;
|
|
19
|
-
}) => import("react/jsx-runtime").JSX.Element | null) & {
|
|
16
|
+
import { type DataCubeInnerHeaderComponentParams } from '@finos/legend-data-cube';
|
|
17
|
+
export declare const LegendREPLDataCubeHeader: ((props: DataCubeInnerHeaderComponentParams) => import("react/jsx-runtime").JSX.Element | null) & {
|
|
20
18
|
displayName: string;
|
|
21
19
|
};
|
|
22
20
|
//# sourceMappingURL=LegendREPLDataCubeHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendREPLDataCubeHeader.d.ts","sourceRoot":"","sources":["../../src/components/LegendREPLDataCubeHeader.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"LegendREPLDataCubeHeader.d.ts","sourceRoot":"","sources":["../../src/components/LegendREPLDataCubeHeader.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,KAAK,kCAAkC,EACxC,MAAM,yBAAyB,CAAC;AAKjC,eAAO,MAAM,wBAAwB,WAC3B,kCAAkC;;CA8B3C,CAAC"}
|
|
@@ -14,24 +14,24 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { FormButton } from '@finos/legend-data-cube';
|
|
17
|
+
import { FormButton, } from '@finos/legend-data-cube';
|
|
18
18
|
import { observer } from 'mobx-react-lite';
|
|
19
19
|
import { LegendREPLDataCubeSource } from '../stores/LegendREPLDataCubeSource.js';
|
|
20
20
|
import { useLegendREPLBaseStore } from './LegendREPLFramworkProvider.js';
|
|
21
21
|
export const LegendREPLDataCubeHeader = observer((props) => {
|
|
22
|
-
const {
|
|
22
|
+
const { api } = props;
|
|
23
23
|
const store = useLegendREPLBaseStore();
|
|
24
|
-
if (!
|
|
24
|
+
if (!store.source || !store.queryServerBaseUrl) {
|
|
25
25
|
return null;
|
|
26
26
|
}
|
|
27
|
-
const isPublishAllowed =
|
|
28
|
-
|
|
27
|
+
const isPublishAllowed = store.source instanceof LegendREPLDataCubeSource &&
|
|
28
|
+
store.source.isPersistenceSupported &&
|
|
29
29
|
// eslint-disable-next-line no-process-env
|
|
30
|
-
(process.env.NODE_ENV === 'development' || !
|
|
30
|
+
(process.env.NODE_ENV === 'development' || !store.source.isLocal);
|
|
31
31
|
return (_jsx("div", { className: "flex h-full items-center", children: _jsx(FormButton, { compact: true, disabled: !isPublishAllowed || store.publishState.isInProgress, onClick: () => {
|
|
32
32
|
store
|
|
33
|
-
.publishDataCube(
|
|
34
|
-
.catch((error) =>
|
|
33
|
+
.publishDataCube(api)
|
|
34
|
+
.catch((error) => store.alertService.alertUnhandledError(error));
|
|
35
35
|
}, children: "Publish" }) }));
|
|
36
36
|
});
|
|
37
37
|
//# sourceMappingURL=LegendREPLDataCubeHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendREPLDataCubeHeader.js","sourceRoot":"","sources":["../../src/components/LegendREPLDataCubeHeader.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"LegendREPLDataCubeHeader.js","sourceRoot":"","sources":["../../src/components/LegendREPLDataCubeHeader.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,UAAU,GAEX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,MAAM,CAAC,MAAM,wBAAwB,GAAG,QAAQ,CAC9C,CAAC,KAAyC,EAAE,EAAE;IAC5C,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;IACtB,MAAM,KAAK,GAAG,sBAAsB,EAAE,CAAC;IAEvC,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE,CAAC;QAC/C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,gBAAgB,GACpB,KAAK,CAAC,MAAM,YAAY,wBAAwB;QAChD,KAAK,CAAC,MAAM,CAAC,sBAAsB;QACnC,0CAA0C;QAC1C,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAEpE,OAAO,CACL,cAAK,SAAS,EAAC,0BAA0B,YACvC,KAAC,UAAU,IACT,OAAO,EAAE,IAAI,EACb,QAAQ,EAAE,CAAC,gBAAgB,IAAI,KAAK,CAAC,YAAY,CAAC,YAAY,EAC9D,OAAO,EAAE,GAAG,EAAE;gBACZ,KAAK;qBACF,eAAe,CAAC,GAAG,CAAC;qBACpB,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC;YACrE,CAAC,wBAGU,GACT,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendREPLWebApplication.d.ts","sourceRoot":"","sources":["../../src/components/LegendREPLWebApplication.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"LegendREPLWebApplication.d.ts","sourceRoot":"","sources":["../../src/components/LegendREPLWebApplication.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA0FH,eAAO,MAAM,qCAAqC;;EAEhD,CAAC;AAEH,eAAO,MAAM,gBAAgB;;CAoC3B,CAAC;AAEH,eAAO,MAAM,wBAAwB,UAAW;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,4CAUlE,CAAC"}
|
|
@@ -18,7 +18,7 @@ import { BrowserEnvironmentProvider, Route, Routes, } from '@finos/legend-applic
|
|
|
18
18
|
import { observer } from 'mobx-react-lite';
|
|
19
19
|
import { useEffect } from 'react';
|
|
20
20
|
import { formatDate, LogEvent } from '@finos/legend-shared';
|
|
21
|
-
import { DataCube, } from '@finos/legend-data-cube';
|
|
21
|
+
import { DataCube, DataCubePlaceholder, DataCubePlaceholderErrorDisplay, DEFAULT_REPORT_NAME, } from '@finos/legend-data-cube';
|
|
22
22
|
import { APPLICATION_EVENT } from '@finos/legend-application';
|
|
23
23
|
import { LegendREPLDataCubeSource } from '../stores/LegendREPLDataCubeSource.js';
|
|
24
24
|
import { LegendREPLDataCubeHeader } from './LegendREPLDataCubeHeader.js';
|
|
@@ -40,19 +40,26 @@ const LegendREPLDataCube = observer((props) => {
|
|
|
40
40
|
};
|
|
41
41
|
}, [application]);
|
|
42
42
|
return (_jsx(DataCube, { query: query, engine: store.engine, options: {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
gridClientLicense: store.gridClientLicense,
|
|
44
|
+
layoutManager: store.layoutService.manager,
|
|
45
|
+
taskManager: store.taskService.manager,
|
|
46
|
+
onNameChanged(event) {
|
|
47
|
+
const timestamp = event.source instanceof LegendREPLDataCubeSource
|
|
48
|
+
? event.source.timestamp
|
|
46
49
|
: undefined;
|
|
47
50
|
application.layoutService.setWindowTitle(`\u229E ${name}${timestamp ? ` - ${formatDate(new Date(timestamp), 'HH:mm:ss EEE MMM dd yyyy')}` : ''}`);
|
|
48
51
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return application.settingService.getObjectValue(LegendREPLSettingStorageKey.DATA_CUBE);
|
|
52
|
+
onViewInitialized(event) {
|
|
53
|
+
store.setSource(event.source);
|
|
52
54
|
},
|
|
53
|
-
|
|
55
|
+
innerHeaderRenderer: (params) => (_jsx(LegendREPLDataCubeHeader, { api: params.api })),
|
|
56
|
+
settingsData: {
|
|
57
|
+
values: application.settingService.getObjectValue(LegendREPLSettingStorageKey.DATA_CUBE),
|
|
58
|
+
},
|
|
59
|
+
onSettingsChanged(values) {
|
|
54
60
|
application.settingService.persistValue(LegendREPLSettingStorageKey.DATA_CUBE, values);
|
|
55
61
|
},
|
|
62
|
+
documentationUrl: application.documentationService.url,
|
|
56
63
|
} }));
|
|
57
64
|
});
|
|
58
65
|
export const LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN = Object.freeze({
|
|
@@ -65,7 +72,10 @@ export const LegendREPLRouter = observer(() => {
|
|
|
65
72
|
.initialize()
|
|
66
73
|
.catch((error) => store.application.alertUnhandledError(error));
|
|
67
74
|
}, [store]);
|
|
68
|
-
|
|
75
|
+
if (!store.initializeState.hasSucceeded) {
|
|
76
|
+
return (_jsx(DataCubePlaceholder, { title: DEFAULT_REPORT_NAME, layoutManager: store.layoutService.manager, children: store.initializeState.hasFailed && (_jsx(DataCubePlaceholderErrorDisplay, { message: "Initialization Failure", prompt: "Resolve the issue and reload." })) }));
|
|
77
|
+
}
|
|
78
|
+
return (_jsx("div", { className: "h-full", children: store.query && (_jsx(Routes, { children: _jsx(Route, { path: LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN.DATA_CUBE, element: _jsx(LegendREPLDataCube, { query: store.query }) }) })) }));
|
|
69
79
|
});
|
|
70
80
|
export const LegendREPLWebApplication = (props) => {
|
|
71
81
|
const { baseUrl } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendREPLWebApplication.js","sourceRoot":"","sources":["../../src/components/LegendREPLWebApplication.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,0BAA0B,EAC1B,KAAK,EACL,MAAM,GACP,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"LegendREPLWebApplication.js","sourceRoot":"","sources":["../../src/components/LegendREPLWebApplication.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,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AAE,OAAO,YAC1C,KAAC,2BAA2B,cAC1B,KAAC,gBAAgB,KAAG,GACQ,GACH,CAC9B,CAAC;AACJ,CAAC,CAAC"}
|
package/lib/index.css
CHANGED
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-application-repl",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.37",
|
|
4
4
|
"description": "Legend REPL Grid client application core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@finos/legend-data-cube": "workspace:*",
|
|
49
49
|
"@finos/legend-graph": "workspace:*",
|
|
50
50
|
"@finos/legend-shared": "workspace:*",
|
|
51
|
-
"@types/react": "19.0.
|
|
51
|
+
"@types/react": "19.0.3",
|
|
52
52
|
"@types/react-dom": "19.0.2",
|
|
53
53
|
"mobx": "6.13.5",
|
|
54
54
|
"mobx-react-lite": "4.1.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"jest": "29.7.0",
|
|
65
65
|
"npm-run-all": "4.1.5",
|
|
66
66
|
"rimraf": "6.0.1",
|
|
67
|
-
"sass": "1.83.
|
|
67
|
+
"sass": "1.83.1",
|
|
68
68
|
"typescript": "5.7.2"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
@@ -15,24 +15,26 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { ActionState } from '@finos/legend-shared';
|
|
17
17
|
import type { LegendREPLApplicationStore } from '../application/LegendREPLApplicationStore.js';
|
|
18
|
-
import {
|
|
19
|
-
import { DataCubeQuery, type DataCubeState } from '@finos/legend-data-cube';
|
|
18
|
+
import { DataCubeQuery, type DataCubeSource, type DataCubeAPI, DataCubeLayoutService, DataCubeAlertService, DataCubeTaskService } from '@finos/legend-data-cube';
|
|
20
19
|
import { LegendREPLDataCubeEngine } from './LegendREPLDataCubeEngine.js';
|
|
21
20
|
export declare class LegendREPLBaseStore {
|
|
21
|
+
private readonly _client;
|
|
22
22
|
readonly application: LegendREPLApplicationStore;
|
|
23
|
-
readonly client: LegendREPLServerClient;
|
|
24
23
|
readonly engine: LegendREPLDataCubeEngine;
|
|
24
|
+
readonly taskService: DataCubeTaskService;
|
|
25
|
+
readonly layoutService: DataCubeLayoutService;
|
|
26
|
+
readonly alertService: DataCubeAlertService;
|
|
25
27
|
readonly initializeState: ActionState;
|
|
26
28
|
readonly publishState: ActionState;
|
|
27
|
-
|
|
28
|
-
currentUser?: string | undefined;
|
|
29
|
+
source?: DataCubeSource | undefined;
|
|
29
30
|
gridClientLicense?: string | undefined;
|
|
30
31
|
queryServerBaseUrl?: string | undefined;
|
|
31
32
|
hostedApplicationBaseUrl?: string | undefined;
|
|
32
33
|
query?: DataCubeQuery | undefined;
|
|
33
34
|
constructor(application: LegendREPLApplicationStore);
|
|
34
35
|
setQuery(query: DataCubeQuery | undefined): void;
|
|
36
|
+
setSource(source: DataCubeSource | undefined): void;
|
|
35
37
|
initialize(): Promise<void>;
|
|
36
|
-
publishDataCube(
|
|
38
|
+
publishDataCube(api: DataCubeAPI): Promise<void>;
|
|
37
39
|
}
|
|
38
40
|
//# sourceMappingURL=LegendREPLBaseStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendREPLBaseStore.d.ts","sourceRoot":"","sources":["../../src/stores/LegendREPLBaseStore.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,WAAW,EAMZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;
|
|
1
|
+
{"version":3,"file":"LegendREPLBaseStore.d.ts","sourceRoot":"","sources":["../../src/stores/LegendREPLBaseStore.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,WAAW,EAMZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAE/F,OAAO,EACL,aAAa,EACb,KAAK,cAAc,EAInB,KAAK,WAAW,EAEhB,qBAAqB,EACrB,oBAAoB,EAEpB,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AASjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IACjD,QAAQ,CAAC,WAAW,EAAE,0BAA0B,CAAC;IACjD,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,mBAAmB,CAAC;IAC1C,QAAQ,CAAC,aAAa,EAAE,qBAAqB,CAAC;IAC9C,QAAQ,CAAC,YAAY,EAAE,oBAAoB,CAAC;IAE5C,QAAQ,CAAC,eAAe,cAAwB;IAChD,QAAQ,CAAC,YAAY,cAAwB;IAE7C,MAAM,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACpC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,wBAAwB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9C,KAAK,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;gBAEtB,WAAW,EAAE,0BAA0B;IA6BnD,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS;IAIzC,SAAS,CAAC,MAAM,EAAE,cAAc,GAAG,SAAS;IAItC,UAAU;IAgCV,eAAe,CAAC,GAAG,EAAE,WAAW;CA+DvC"}
|
|
@@ -16,21 +16,23 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
16
16
|
*/
|
|
17
17
|
import { ActionState, LogEvent, NetworkClient, assertErrorThrown, guaranteeNonNullable, uuid, } from '@finos/legend-shared';
|
|
18
18
|
import { LegendREPLServerClient } from './LegendREPLServerClient.js';
|
|
19
|
-
import {
|
|
20
|
-
import { LegendREPLDataCubeSource } from './LegendREPLDataCubeSource.js';
|
|
19
|
+
import { DataCubeQuery, LayoutConfiguration, RawAdhocQueryDataCubeSource, WindowState, DEFAULT_REPORT_NAME, DataCubeLayoutService, DataCubeAlertService, DataCubeLogService, DataCubeTaskService, } from '@finos/legend-data-cube';
|
|
20
|
+
import { LegendREPLDataCubeSource, RawLegendREPLDataCubeSource, } from './LegendREPLDataCubeSource.js';
|
|
21
21
|
import { PersistentDataCubeQuery } from '@finos/legend-graph';
|
|
22
22
|
import { LegendREPLPublishDataCubeAlert } from '../components/LegendREPLPublishDataCubeAlert.js';
|
|
23
23
|
import { APPLICATION_EVENT } from '@finos/legend-application';
|
|
24
24
|
import { action, makeObservable, observable } from 'mobx';
|
|
25
25
|
import { LegendREPLDataCubeEngine } from './LegendREPLDataCubeEngine.js';
|
|
26
26
|
export class LegendREPLBaseStore {
|
|
27
|
+
_client;
|
|
27
28
|
application;
|
|
28
|
-
client;
|
|
29
29
|
engine;
|
|
30
|
+
taskService;
|
|
31
|
+
layoutService;
|
|
32
|
+
alertService;
|
|
30
33
|
initializeState = ActionState.create();
|
|
31
34
|
publishState = ActionState.create();
|
|
32
|
-
|
|
33
|
-
currentUser;
|
|
35
|
+
source;
|
|
34
36
|
gridClientLicense;
|
|
35
37
|
queryServerBaseUrl;
|
|
36
38
|
hostedApplicationBaseUrl;
|
|
@@ -39,24 +41,31 @@ export class LegendREPLBaseStore {
|
|
|
39
41
|
makeObservable(this, {
|
|
40
42
|
query: observable,
|
|
41
43
|
setQuery: action,
|
|
44
|
+
source: observable,
|
|
45
|
+
setSource: action,
|
|
42
46
|
});
|
|
43
47
|
this.application = application;
|
|
44
|
-
this.
|
|
48
|
+
this._client = new LegendREPLServerClient(new NetworkClient({
|
|
45
49
|
baseUrl: application.config.useDynamicREPLServer
|
|
46
50
|
? window.location.origin +
|
|
47
51
|
guaranteeNonNullable(application.config.baseAddress).replace('/repl/', '')
|
|
48
52
|
: application.config.replUrl,
|
|
49
53
|
}));
|
|
50
|
-
this.engine = new LegendREPLDataCubeEngine(this);
|
|
54
|
+
this.engine = new LegendREPLDataCubeEngine(this.application, this._client);
|
|
55
|
+
this.taskService = new DataCubeTaskService();
|
|
56
|
+
this.layoutService = new DataCubeLayoutService();
|
|
57
|
+
this.alertService = new DataCubeAlertService(new DataCubeLogService(this.engine), this.layoutService);
|
|
51
58
|
}
|
|
52
59
|
setQuery(query) {
|
|
53
60
|
this.query = query;
|
|
54
61
|
}
|
|
62
|
+
setSource(source) {
|
|
63
|
+
this.source = source;
|
|
64
|
+
}
|
|
55
65
|
async initialize() {
|
|
56
66
|
this.initializeState.inProgress();
|
|
57
67
|
try {
|
|
58
|
-
const info = await this.
|
|
59
|
-
this.currentUser = info.currentUser;
|
|
68
|
+
const info = await this._client.getInfrastructureInfo();
|
|
60
69
|
if (info.currentUser) {
|
|
61
70
|
this.application.identityService.setCurrentUser(info.currentUser);
|
|
62
71
|
}
|
|
@@ -64,42 +73,43 @@ export class LegendREPLBaseStore {
|
|
|
64
73
|
this.queryServerBaseUrl = info.queryServerBaseUrl;
|
|
65
74
|
this.hostedApplicationBaseUrl = info.hostedApplicationBaseUrl;
|
|
66
75
|
this.gridClientLicense = info.gridClientLicense;
|
|
67
|
-
this.setQuery(DataCubeQuery.serialization.fromJson(await this.
|
|
76
|
+
this.setQuery(DataCubeQuery.serialization.fromJson(await this._client.getBaseQuery()));
|
|
68
77
|
this.initializeState.pass();
|
|
69
78
|
}
|
|
70
79
|
catch (error) {
|
|
71
80
|
assertErrorThrown(error);
|
|
72
81
|
this.application.logService.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_LOAD__FAILURE), `Can't initialize REPL`, error);
|
|
82
|
+
this.alertService.alertError(error, {
|
|
83
|
+
message: `Initialization Failure: ${error.message}`,
|
|
84
|
+
text: `Resolve the issue and reload the engine.`,
|
|
85
|
+
});
|
|
73
86
|
this.initializeState.fail();
|
|
74
87
|
}
|
|
75
88
|
}
|
|
76
|
-
async publishDataCube(
|
|
77
|
-
if (!this.
|
|
78
|
-
!
|
|
79
|
-
!this.
|
|
80
|
-
!
|
|
81
|
-
!dataCube.view.source.isPersistenceSupported ||
|
|
82
|
-
!dataCube.view.source.model ||
|
|
89
|
+
async publishDataCube(api) {
|
|
90
|
+
if (!this.queryServerBaseUrl ||
|
|
91
|
+
!(this.source instanceof LegendREPLDataCubeSource) ||
|
|
92
|
+
!this.source.isPersistenceSupported ||
|
|
93
|
+
!this.source.model ||
|
|
83
94
|
// eslint-disable-next-line no-process-env
|
|
84
|
-
!(process.env.NODE_ENV === 'development' || !
|
|
95
|
+
!(process.env.NODE_ENV === 'development' || !this.source.isLocal)) {
|
|
85
96
|
return;
|
|
86
97
|
}
|
|
87
98
|
this.publishState.inProgress();
|
|
88
|
-
const task =
|
|
99
|
+
const task = this.taskService.newTask('Publish query');
|
|
89
100
|
try {
|
|
90
|
-
const query =
|
|
91
|
-
query.query = await dataCube.engine.getPartialQueryCode(dataCube.view.snapshotManager.currentSnapshot);
|
|
101
|
+
const query = await api.generateDataCubeQuery();
|
|
92
102
|
const source = new RawAdhocQueryDataCubeSource();
|
|
93
|
-
source.query =
|
|
94
|
-
source.runtime =
|
|
95
|
-
source.model =
|
|
103
|
+
source.query = RawLegendREPLDataCubeSource.serialization.fromJson(query.source).query;
|
|
104
|
+
source.runtime = this.source.runtime;
|
|
105
|
+
source.model = this.source.model;
|
|
96
106
|
query.source = RawAdhocQueryDataCubeSource.serialization.toJson(source);
|
|
97
107
|
const newQuery = new PersistentDataCubeQuery();
|
|
98
108
|
newQuery.id = uuid();
|
|
99
|
-
newQuery.name =
|
|
109
|
+
newQuery.name = query.configuration?.name ?? DEFAULT_REPORT_NAME;
|
|
100
110
|
newQuery.content = DataCubeQuery.serialization.toJson(query);
|
|
101
|
-
newQuery.owner = this.currentUser;
|
|
102
|
-
const publishedQuery = PersistentDataCubeQuery.serialization.fromJson(await this.
|
|
111
|
+
newQuery.owner = this.application.identityService.currentUser;
|
|
112
|
+
const publishedQuery = PersistentDataCubeQuery.serialization.fromJson(await this._client.publishQuery(PersistentDataCubeQuery.serialization.toJson(newQuery), this.queryServerBaseUrl));
|
|
103
113
|
const window = new WindowState(new LayoutConfiguration('Publish Query', () => (_jsx(LegendREPLPublishDataCubeAlert, { query: publishedQuery }))));
|
|
104
114
|
window.configuration.window = {
|
|
105
115
|
width: 420,
|
|
@@ -108,17 +118,17 @@ export class LegendREPLBaseStore {
|
|
|
108
118
|
minHeight: 100,
|
|
109
119
|
center: true,
|
|
110
120
|
};
|
|
111
|
-
|
|
121
|
+
this.layoutService.newWindow(window);
|
|
112
122
|
}
|
|
113
123
|
catch (error) {
|
|
114
124
|
assertErrorThrown(error);
|
|
115
|
-
|
|
125
|
+
this.alertService.alertError(error, {
|
|
116
126
|
message: `Persistence Failure: Can't publish query.`,
|
|
117
127
|
text: `Error: ${error.message}`,
|
|
118
128
|
});
|
|
119
129
|
}
|
|
120
130
|
finally {
|
|
121
|
-
|
|
131
|
+
this.taskService.endTask(task);
|
|
122
132
|
this.publishState.complete();
|
|
123
133
|
}
|
|
124
134
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendREPLBaseStore.js","sourceRoot":"","sources":["../../src/stores/LegendREPLBaseStore.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,WAAW,EACX,QAAQ,EACR,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,IAAI,GACL,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"LegendREPLBaseStore.js","sourceRoot":"","sources":["../../src/stores/LegendREPLBaseStore.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,WAAW,EACX,QAAQ,EACR,aAAa,EACb,iBAAi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MAAM,GAAG;gBAC5B,KAAK,EAAE,GAAG;gBACV,MAAM,EAAE,GAAG;gBACX,QAAQ,EAAE,GAAG;gBACb,SAAS,EAAE,GAAG;gBACd,MAAM,EAAE,IAAI;aACb,CAAC;YACF,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACvC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,EAAE;gBAClC,OAAO,EAAE,2CAA2C;gBACpD,IAAI,EAAE,UAAU,KAAK,CAAC,OAAO,EAAE;aAChC,CAAC,CAAC;QACL,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC/B,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;QAC/B,CAAC;IACH,CAAC;CACF"}
|
|
@@ -16,25 +16,17 @@
|
|
|
16
16
|
import { type LegendREPLServerClient } from './LegendREPLServerClient.js';
|
|
17
17
|
import { DataCubeEngine, type DataCubeSource, type DataCubeExecutionOptions } from '@finos/legend-data-cube';
|
|
18
18
|
import { TDSExecutionResult, type V1_AppliedFunction, type V1_Lambda, type V1_ValueSpecification } from '@finos/legend-graph';
|
|
19
|
-
import {
|
|
19
|
+
import { LogEvent, type PlainObject } from '@finos/legend-shared';
|
|
20
20
|
import { LegendREPLDataCubeSource } from './LegendREPLDataCubeSource.js';
|
|
21
21
|
import type { LegendREPLApplicationStore } from '../application/LegendREPLApplicationStore.js';
|
|
22
|
-
import type { LegendREPLBaseStore } from './LegendREPLBaseStore.js';
|
|
23
22
|
export declare class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
|
|
27
|
-
constructor(baseStore: LegendREPLBaseStore);
|
|
23
|
+
private readonly _application;
|
|
24
|
+
private readonly _client;
|
|
25
|
+
constructor(application: LegendREPLApplicationStore, client: LegendREPLServerClient);
|
|
28
26
|
processQuerySource(value: PlainObject): Promise<LegendREPLDataCubeSource>;
|
|
29
27
|
parseValueSpecification(code: string, returnSourceInformation?: boolean): Promise<V1_ValueSpecification>;
|
|
30
28
|
getValueSpecificationCode(value: V1_ValueSpecification, pretty?: boolean): Promise<string>;
|
|
31
29
|
getQueryTypeahead(code: string, baseQuery: V1_Lambda, source: DataCubeSource): Promise<import("@finos/legend-data-cube").CompletionItem[]>;
|
|
32
|
-
getQueryRelationType(query: V1_Lambda, source: DataCubeSource): Promise<{
|
|
33
|
-
columns: {
|
|
34
|
-
name: string;
|
|
35
|
-
type: string;
|
|
36
|
-
}[];
|
|
37
|
-
}>;
|
|
38
30
|
getQueryCodeRelationReturnType(code: string, baseQuery: V1_ValueSpecification, source: DataCubeSource): Promise<{
|
|
39
31
|
columns: {
|
|
40
32
|
name: string;
|
|
@@ -47,11 +39,7 @@ export declare class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
|
47
39
|
executedSQL: string;
|
|
48
40
|
}>;
|
|
49
41
|
buildExecutionContext(source: DataCubeSource): V1_AppliedFunction | undefined;
|
|
50
|
-
|
|
51
|
-
getDocumentationEntry(key: string): DocumentationEntry | undefined;
|
|
52
|
-
shouldDisplayDocumentationEntry(entry: DocumentationEntry): boolean;
|
|
53
|
-
openLink(url: string): void;
|
|
54
|
-
sendTelemetry(event: string, data: PlainObject): void;
|
|
42
|
+
private _getQueryRelationType;
|
|
55
43
|
logDebug(message: string, ...data: unknown[]): void;
|
|
56
44
|
debugProcess(processName: string, ...data: [string, unknown][]): void;
|
|
57
45
|
logInfo(event: LogEvent, ...data: unknown[]): void;
|
|
@@ -59,5 +47,8 @@ export declare class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
|
59
47
|
logError(event: LogEvent, ...data: unknown[]): void;
|
|
60
48
|
logUnhandledError(error: Error): void;
|
|
61
49
|
logIllegalStateError(message: string, error?: Error): void;
|
|
50
|
+
getDocumentationEntry(key: string): import("@finos/legend-shared").DocumentationEntry | undefined;
|
|
51
|
+
openLink(url: string): void;
|
|
52
|
+
sendTelemetry(event: string, data: PlainObject): void;
|
|
62
53
|
}
|
|
63
54
|
//# sourceMappingURL=LegendREPLDataCubeEngine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendREPLDataCubeEngine.d.ts","sourceRoot":"","sources":["../../src/stores/LegendREPLDataCubeEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAIL,cAAc,EAEd,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAG9B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAClB,KAAK,kBAAkB,EAGvB,KAAK,SAAS,EACd,KAAK,qBAAqB,EAK3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,
|
|
1
|
+
{"version":3,"file":"LegendREPLDataCubeEngine.d.ts","sourceRoot":"","sources":["../../src/stores/LegendREPLDataCubeEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAIL,cAAc,EAEd,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAG9B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAClB,KAAK,kBAAkB,EAGvB,KAAK,SAAS,EACd,KAAK,qBAAqB,EAK3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAKL,QAAQ,EAER,KAAK,WAAW,EAEjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,wBAAwB,EAGzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAI/F,qBAAa,wBAAyB,SAAQ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