diff --git a/pages/export/cavatica.tsx b/pages/export/cavatica.tsx new file mode 100644 index 000000000..580ab3c2c --- /dev/null +++ b/pages/export/cavatica.tsx @@ -0,0 +1,28 @@ +import { JSX } from "react"; +import { ExportMethodView } from "@databiosphere/findable-ui/lib/views/ExportMethodView/exportMethodView"; +import { GetStaticProps } from "next"; +import { useFeatureFlag } from "@databiosphere/findable-ui/lib/hooks/useFeatureFlag/useFeatureFlag"; +import { FEATURES } from "../../app/shared/entities"; +import Error from "next/error"; + +export const getStaticProps: GetStaticProps = async () => { + return { + props: { + pageTitle: "Export to CAVATICA", + }, + }; +}; + +/** + * Export method page for CAVATICA. + * @returns export method view component. + */ +const ExportMethodPage = (): JSX.Element => { + const isEnabled = useFeatureFlag(FEATURES.NCPI_EXPORT); + + if (!isEnabled) return ; + + return ; +}; + +export default ExportMethodPage; diff --git a/site-config/anvil-cmg/dev/export/constants.ts b/site-config/anvil-cmg/dev/export/constants.ts index c6cec8685..1cd1f1855 100644 --- a/site-config/anvil-cmg/dev/export/constants.ts +++ b/site-config/anvil-cmg/dev/export/constants.ts @@ -17,6 +17,13 @@ export const EXPORTS: Record< successTitle: "Your BioData Catalyst Workspace Link is Ready", title: "Analyze in BioData Catalyst", }, + CAVATICA: { + buttonLabel: "Open CAVATICA", + description: + "CAVATICA is a cloud workspace for analysis, storage, and computation using workflows, Jupyter Notebooks, and RStudio.", + successTitle: "Your CAVATICA Workspace Link is Ready", + title: "Analyze in CAVATICA", + }, }; export const EXPORT_METHODS: Record< @@ -32,4 +39,10 @@ export const EXPORT_METHODS: Record< route: ROUTES.BIO_DATA_CATALYST, title: "Export to BioData Catalyst Powered by Seven Bridges (BDC-SB)", }, + CAVATICA: { + buttonLabel: "Analyze in CAVATICA", + description: EXPORTS.CAVATICA.description, + route: ROUTES.CAVATICA, + title: "Export to CAVATICA", + }, }; diff --git a/site-config/anvil-cmg/dev/export/export.ts b/site-config/anvil-cmg/dev/export/export.ts index 7a666313b..d05f6180a 100644 --- a/site-config/anvil-cmg/dev/export/export.ts +++ b/site-config/anvil-cmg/dev/export/export.ts @@ -64,6 +64,31 @@ export const exportConfig: ExportConfig = { } as ComponentConfig, ], }, + { + mainColumn: [ + /* mainColumn - top section - warning - some datasets are not available */ + ...exportMainColumn, + /* mainColumn */ + { + children: [ + { + component: C.ExportToPlatform, + viewBuilder: V.buildExportToPlatform(EXPORTS.CAVATICA), + } as ComponentConfig, + ], + component: C.BackPageContentMainColumn, + } as ComponentConfig, + /* sideColumn */ + ...exportSideColumn, + ], + route: ROUTES.CAVATICA, + top: [ + { + component: C.BackPageHero, + viewBuilder: V.buildExportToPlatformHero("Export to CAVATICA"), + } as ComponentConfig, + ], + }, { mainColumn: [ /* mainColumn - top section - warning - some datasets are not available */ @@ -110,6 +135,12 @@ export const exportConfig: ExportConfig = { EXPORT_METHODS.BIO_DATA_CATALYST ), } as ComponentConfig, + { + component: ExportMethod, + viewBuilder: V.buildExportToPlatformMethod( + EXPORT_METHODS.CAVATICA + ), + } as ComponentConfig, { component: C.ExportMethod, viewBuilder: V.buildExportMethodManifestDownload, diff --git a/site-config/anvil-cmg/dev/export/routes.ts b/site-config/anvil-cmg/dev/export/routes.ts index b7c69a5d1..ec3daf379 100644 --- a/site-config/anvil-cmg/dev/export/routes.ts +++ b/site-config/anvil-cmg/dev/export/routes.ts @@ -1,5 +1,6 @@ export const ROUTES = { BIO_DATA_CATALYST: "/export/biodata-catalyst", + CAVATICA: "/export/cavatica", MANIFEST_DOWNLOAD: "/export/download-manifest", TERRA: "/export/export-to-terra", } as const;