Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions pages/export/cavatica.tsx
Original file line number Diff line number Diff line change
@@ -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 <Error statusCode={404} />;

return <ExportMethodView />;
};

export default ExportMethodPage;
13 changes: 13 additions & 0 deletions site-config/anvil-cmg/dev/export/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<
Expand All @@ -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",
},
};
31 changes: 31 additions & 0 deletions site-config/anvil-cmg/dev/export/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,31 @@ export const exportConfig: ExportConfig = {
} as ComponentConfig<typeof C.BackPageHero>,
],
},
{
mainColumn: [
/* mainColumn - top section - warning - some datasets are not available */
...exportMainColumn,
/* mainColumn */
{
children: [
{
component: C.ExportToPlatform,
viewBuilder: V.buildExportToPlatform(EXPORTS.CAVATICA),
} as ComponentConfig<typeof C.ExportToPlatform>,
],
component: C.BackPageContentMainColumn,
} as ComponentConfig<typeof C.BackPageContentMainColumn>,
/* sideColumn */
...exportSideColumn,
],
route: ROUTES.CAVATICA,
top: [
{
component: C.BackPageHero,
viewBuilder: V.buildExportToPlatformHero("Export to CAVATICA"),
} as ComponentConfig<typeof C.BackPageHero>,
],
},
{
mainColumn: [
/* mainColumn - top section - warning - some datasets are not available */
Expand Down Expand Up @@ -110,6 +135,12 @@ export const exportConfig: ExportConfig = {
EXPORT_METHODS.BIO_DATA_CATALYST
),
} as ComponentConfig<typeof ExportMethod>,
{
component: ExportMethod,
viewBuilder: V.buildExportToPlatformMethod(
EXPORT_METHODS.CAVATICA
),
} as ComponentConfig<typeof ExportMethod>,
{
component: C.ExportMethod,
viewBuilder: V.buildExportMethodManifestDownload,
Expand Down
1 change: 1 addition & 0 deletions site-config/anvil-cmg/dev/export/routes.ts
Original file line number Diff line number Diff line change
@@ -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;
Loading