Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for displaying showcases #2433

Merged
merged 10 commits into from
Jul 19, 2023
11 changes: 11 additions & 0 deletions .changeset/eighty-lemons-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@finos/legend-application-studio-bootstrap': patch
'@finos/legend-server-showcase-deployment': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-application-studio': patch
'@finos/legend-server-showcase': patch
'@finos/legend-application': patch
'@finos/eslint-plugin-legend-studio': patch
'@finos/legend-lego': patch
'@finos/legend-art': patch
---
7 changes: 7 additions & 0 deletions .changeset/empty-phones-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@finos/legend-server-showcase-deployment': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-application-studio': patch
'@finos/legend-application': patch
'@finos/legend-art': patch
---
10 changes: 10 additions & 0 deletions .changeset/serious-mails-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@finos/legend-application-studio-bootstrap': patch
'@finos/legend-server-showcase-deployment': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-application-studio': patch
'@finos/legend-server-showcase': patch
'@finos/legend-application': patch
'@finos/eslint-plugin-legend-studio': patch
'@finos/legend-art': patch
---
5 changes: 5 additions & 0 deletions .changeset/silly-rings-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@finos/legend-application-studio': major
---

**BREAKING CHANGE:** Renamed `getExtraEditorExtensionStateCreators()` and `EditorExtensionStateCreator` to `getExtraEditorExtensionStateBuilders()` and `EditorExtensionStateBuilder` respectively. Renamed `getExtraTestRunnerTabConfigurations()` and `TestRunnerTabConfiguration` to `getExtraTestRunnerViewConfigurations()` and `TestRunnerViewConfiguration` respectively.
9 changes: 9 additions & 0 deletions .changeset/tender-parents-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@finos/legend-application-studio-bootstrap': patch
'@finos/legend-server-showcase-deployment': patch
'@finos/legend-extension-dsl-data-space': patch
'@finos/legend-application-studio': patch
'@finos/legend-server-showcase': patch
'@finos/legend-application': patch
'@finos/legend-art': patch
---
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

const OFF = 2;
const WARN = 1;
const ERROR = 2;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export const setup = (outputDir) => {
query: {
url: 'http://localhost:9001/query',
},
showcase: {
url: 'http://localhost:9003/api',
},
documentation: {
url: 'https://legend.finos.org',
registry: [
Expand Down
1 change: 1 addition & 0 deletions packages/legend-application-studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"@finos/legend-query-builder": "workspace:*",
"@finos/legend-server-depot": "workspace:*",
"@finos/legend-server-sdlc": "workspace:*",
"@finos/legend-server-showcase": "workspace:*",
"@finos/legend-shared": "workspace:*",
"@finos/legend-storage": "workspace:*",
"@testing-library/react": "14.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export enum LEGEND_STUDIO_APP_EVENT {
// TODO: consider to split this generic errors into more specific events
SDLC_MANAGER_FAILURE = 'sdlc.manager.failure',

// Showcase
// TODO: consider to split this generic errors into more specific events
SHOWCASE_MANAGER_FAILURE = 'showcase.manager.failure',

UPDATE_WORKSPACE__SUCCESS = 'sdlc.workspace-update.success',
PUSH_LOCAL_CHANGES__SUCCESS = 'sdlc.local-changes-push.success',

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export interface LegendStudioApplicationConfigurationData
queryUrl?: string;
};
query?: { url: string };
showcase?: { url: string };
}

export class LegendStudioApplicationConfig extends LegendApplicationConfig {
Expand All @@ -140,8 +141,9 @@ export class LegendStudioApplicationConfig extends LegendApplicationConfig {
readonly engineQueryServerUrl?: string | undefined;
readonly depotServerUrl: string;
readonly sdlcServerUrl: string;
readonly SDLCServerBaseHeaders?: RequestHeaders | undefined;
readonly queryApplicationUrl: string | undefined;
readonly sdlcServerBaseHeaders?: RequestHeaders | undefined;
readonly queryApplicationUrl?: string | undefined;
readonly showcaseServerUrl?: string | undefined;

constructor(
input: LegendApplicationConfigurationInput<LegendStudioApplicationConfigurationData>,
Expand Down Expand Up @@ -188,7 +190,7 @@ export class LegendStudioApplicationConfig extends LegendApplicationConfig {
`Can't configure application: 'sdlc.url' field is missing or empty`,
),
);
this.SDLCServerBaseHeaders = input.configData.sdlc.baseHeaders;
this.sdlcServerBaseHeaders = input.configData.sdlc.baseHeaders;

// query
if (input.configData.query?.url) {
Expand All @@ -197,6 +199,13 @@ export class LegendStudioApplicationConfig extends LegendApplicationConfig {
);
}

// showcase
if (input.configData.showcase?.url) {
this.showcaseServerUrl = LegendApplicationConfig.resolveAbsoluteUrl(
input.configData.showcase.url,
);
}

// options
this.options = LegendStudioApplicationCoreOptions.create(
input.configData.extensions?.core ?? {},
Expand Down
Loading