Skip to content

Commit

Permalink
Refactor Snowflake App function activator flow
Browse files Browse the repository at this point in the history
  • Loading branch information
YannanGao-gs committed Nov 16, 2023
1 parent 3661eca commit 6b1edf0
Show file tree
Hide file tree
Showing 84 changed files with 2,890 additions and 1,991 deletions.
5 changes: 5 additions & 0 deletions .changeset/cool-news-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@finos/legend-extension-dsl-snowflake-app': minor
---

Refactor Snowflake App function activator flow
9 changes: 9 additions & 0 deletions .changeset/itchy-bobcats-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@finos/legend-application-studio-bootstrap': patch
'@finos/legend-extension-assortment': patch
'@finos/legend-application-studio': patch
'@finos/legend-application': patch
'@finos/legend-graph': patch
'@finos/legend-lego': patch
'@finos/legend-art': patch
---
1 change: 1 addition & 0 deletions packages/legend-application-studio-bootstrap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@finos/legend-extension-dsl-mastery": "workspace:*",
"@finos/legend-extension-dsl-persistence": "workspace:*",
"@finos/legend-extension-dsl-service": "workspace:*",
"@finos/legend-extension-dsl-snowflake-app": "workspace:*",
"@finos/legend-extension-dsl-text": "workspace:*",
"@finos/legend-extension-store-service-store": "workspace:*",
"@finos/legend-graph": "workspace:*",
Expand Down
5 changes: 4 additions & 1 deletion packages/legend-application-studio-bootstrap/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ import { DSL_Persistence_LegendStudioApplicationPlugin } from '@finos/legend-ext
import { DSL_Mastery_LegendStudioApplicationPlugin } from '@finos/legend-extension-dsl-mastery/application-studio';
import { STO_ServiceStore_LegendStudioApplicationPlugin } from '@finos/legend-extension-store-service-store/application-studio';
import { Assortment_LegendStudioApplicationPreset } from '@finos/legend-extension-assortment/application-studio';
import { DSL_SnowflakeApp_GraphManagerPreset } from '@finos/legend-extension-dsl-snowflake-app/graph';
import { DSL_SnowflakeApp_LegendStudioApplicationPlugin } from '@finos/legend-extension-dsl-snowflake-app/application-studio';

export class LegendStudioWebApplication {
static getPresetCollection(): AbstractPreset[] {
Expand All @@ -46,8 +48,8 @@ export class LegendStudioWebApplication {
new DSL_DataSpace_GraphManagerPreset(),
new DSL_Persistence_GraphManagerPreset(),
new DSL_Mastery_GraphManagerPreset(),
new DSL_SnowflakeApp_GraphManagerPreset(),
new STO_ServiceStore_GraphManagerPreset(),

new Assortment_LegendStudioApplicationPreset(),
];
}
Expand All @@ -61,6 +63,7 @@ export class LegendStudioWebApplication {
new DSL_Service_LegendStudioApplicationPlugin(),
new DSL_Persistence_LegendStudioApplicationPlugin(),
new DSL_Mastery_LegendStudioApplicationPlugin(),
new DSL_SnowflakeApp_LegendStudioApplicationPlugin(),
new STO_ServiceStore_LegendStudioApplicationPlugin(),

// loggers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@
@import url('@finos/legend-extension-dsl-persistence/lib/index.css');
@import url('@finos/legend-extension-dsl-mastery/lib/index.css');
@import url('@finos/legend-extension-dsl-text/lib/index.css');
@import url('@finos/legend-extension-dsl-snowflake-app/lib/index.css');
@import url('@finos/legend-extension-store-service-store/lib/index.css');
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
{ "path": "../legend-extension-dsl-service/tsconfig.build.json" },
{ "path": "../legend-extension-dsl-data-space/tsconfig.build.json" },
{ "path": "../legend-extension-dsl-diagram/tsconfig.build.json" },
{ "path": "../legend-extension-dsl-snowflake-app/tsconfig.build.json" },
{ "path": "../legend-extension-dsl-persistence/tsconfig.build.json" },
{ "path": "../legend-extension-dsl-mastery/tsconfig.build.json" },
{ "path": "../legend-extension-dsl-text/tsconfig.build.json" },
Expand Down
1 change: 1 addition & 0 deletions packages/legend-application-studio-bootstrap/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
{ "path": "../legend-extension-dsl-persistence" },
{ "path": "../legend-extension-dsl-mastery" },
{ "path": "../legend-extension-dsl-text" },
{ "path": "../legend-extension-dsl-snowflake-app" },
{ "path": "../legend-extension-store-service-store" }
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import {
PURE_UnitIcon,
PURE_PackageIcon,
PURE_DataIcon,
PURE_SnowflakeAppIcon,
LaunchIcon,
LinkIcon,
} from '@finos/legend-art';
Expand Down Expand Up @@ -100,8 +99,6 @@ export const getElementTypeIcon = (
return <PURE_DataIcon />;
case PACKAGEABLE_ELEMENT_TYPE.GENERATION_SPECIFICATION:
return <PURE_GenerationSpecificationIcon />;
case PACKAGEABLE_ELEMENT_TYPE.SNOWFLAKE_APP:
return <PURE_SnowflakeAppIcon />;
default: {
if (type) {
const extraElementIconGetters = editorStore.pluginManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ import { getElementIcon } from '../../ElementIconUtils.js';
import { ArtifactGenerationViewerState } from '../../../stores/editor/editor-state/ArtifactGenerationViewerState.js';
import { QueryConnectionWorflowEditor } from './end-to-end-flow-editor/ConnectionToQueryWorkflowEditor.js';
import { QueryConnectionEndToEndWorkflowEditorState } from '../../../stores/editor/editor-state/end-to-end-workflow-state/QueryConnectionEndToEndWorkflowEditorState.js';
import { SnowflakeAppFunctionActivatorEdtiorState } from '../../../stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.js';
import { SnowflakeAppFunctionActivatorEditor } from './function-activator/SnowflakeAppFunctionActivatorEditor.js';

export const ViewerEditorGroupSplashScreen: React.FC = () => {
const commandListWidth = 300;
Expand Down Expand Up @@ -267,12 +265,6 @@ export const EditorGroup = observer(() => {
currentTabState instanceof GenerationSpecificationEditorState
) {
return <GenerationSpecificationEditor key={currentTabState.uuid} />;
} else if (
currentTabState instanceof SnowflakeAppFunctionActivatorEdtiorState
) {
return (
<SnowflakeAppFunctionActivatorEditor key={currentTabState.uuid} />
);
} else if (currentTabState instanceof UnsupportedElementEditorState) {
return <UnsupportedElementEditor key={currentTabState.uuid} />;
} else if (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,9 @@ const FunctionPromoteEditor = observer(
let validationMessage = '';
const closeModal = (): void => {
activatorPromoteState.closeFunctionPromoteModal();
activatorPromoteState.setPromoteType(undefined);
activatorPromoteState.setPromoteType(
FUNCTION_PROMOTE_TYPE.SNOWFLAKE_NATIVE_APP,
);
};
const promoteFunction = (): void => {
flowResult(activatorPromoteState.promote(functionElement))
Expand Down
Loading

0 comments on commit 6b1edf0

Please sign in to comment.