diff --git a/frontend/src/modules/Catalog/components/GlossarySearchResultItem.js b/frontend/src/modules/Catalog/components/GlossarySearchResultItem.js index 88f53efb6..b93e8fddb 100644 --- a/frontend/src/modules/Catalog/components/GlossarySearchResultItem.js +++ b/frontend/src/modules/Catalog/components/GlossarySearchResultItem.js @@ -88,7 +88,7 @@ export const GlossarySearchResultItem = ({ hit }) => { underline="hover" color="textPrimary" component={RouterLink} - to={`/console/datasets/${hit._id}/`} /*eslint-disable-line*/ + to={`/console/s3-datasets/${hit._id}/`} /*eslint-disable-line*/ variant="h6" > {hit.label} @@ -99,7 +99,7 @@ export const GlossarySearchResultItem = ({ hit }) => { underline="hover" color="textPrimary" component={RouterLink} - to={`/console/datasets/table/${hit._id}/`} /*eslint-disable-line*/ + to={`/console/s3-datasets/table/${hit._id}/`} /*eslint-disable-line*/ variant="h6" > {hit.label} @@ -110,7 +110,7 @@ export const GlossarySearchResultItem = ({ hit }) => { underline="hover" color="textPrimary" component={RouterLink} - to={`/console/datasets/folder/${hit._id}/`} /*eslint-disable-line*/ + to={`/console/s3-datasets/folder/${hit._id}/`} /*eslint-disable-line*/ variant="h6" > {hit.label} diff --git a/frontend/src/modules/Catalog/index.js b/frontend/src/modules/Catalog/index.js index 558834286..8dacf1824 100644 --- a/frontend/src/modules/Catalog/index.js +++ b/frontend/src/modules/Catalog/index.js @@ -7,7 +7,8 @@ export const CatalogsModule = { resolve_dependency: () => { return ( getModuleActiveStatus(ModuleNames.S3_DATASETS) || - getModuleActiveStatus(ModuleNames.DASHBOARDS) + getModuleActiveStatus(ModuleNames.DASHBOARDS) || + getModuleActiveStatus(ModuleNames.DATASETS_BASE) ); } }; diff --git a/frontend/src/modules/Catalog/views/Catalog.js b/frontend/src/modules/Catalog/views/Catalog.js index 69d147bd1..0ca4ade88 100644 --- a/frontend/src/modules/Catalog/views/Catalog.js +++ b/frontend/src/modules/Catalog/views/Catalog.js @@ -33,6 +33,7 @@ import { } from 'design'; import { GlossarySearchWrapper, GlossarySearchResultItem } from '../components'; import config from '../../../generated/config.json'; +import { DatasetCreateWindow } from 'modules/DatasetsBase/components'; const useStyles = makeStyles((theme) => ({ mainSearch: { @@ -174,6 +175,14 @@ const Catalog = () => { const [openMenu, setOpenMenu] = useState(false); const dataFieldList = ['label', 'name', 'description', 'region', 'tags']; + const [isCreateModalOpen, setIsCreateModalOpen] = useState(false); + const handleCreateModalOpen = () => { + setIsCreateModalOpen(true); + }; + const handleCreateModalClose = () => { + setIsCreateModalOpen(false); + }; + if (config.modules.s3_datasets.features.topics_dropdown === true) dataFieldList.push('topics'); if (config.modules.s3_datasets.features.confidentiality_dropdown === true) @@ -302,14 +311,16 @@ const Catalog = () => { + {isCreateModalOpen && ( + + )} diff --git a/frontend/src/modules/DatasetsBase/components/DatasetCreateWindow.js b/frontend/src/modules/DatasetsBase/components/DatasetCreateWindow.js new file mode 100644 index 000000000..90f6c86f4 --- /dev/null +++ b/frontend/src/modules/DatasetsBase/components/DatasetCreateWindow.js @@ -0,0 +1,107 @@ +import { CloudDownloadOutlined } from '@mui/icons-material'; +import { + Box, + Button, + Card, + CardContent, + CardHeader, + Dialog, + Grid, + Typography +} from '@mui/material'; +import PropTypes from 'prop-types'; +import React from 'react'; +import { Link as RouterLink } from 'react-router-dom'; +import { PlusIcon } from '../../../design'; +import { isModuleEnabled, ModuleNames } from 'utils'; + +export const DatasetCreateWindow = (props) => { + const { onClose, open, ...other } = props; + const number_grid_items = isModuleEnabled(ModuleNames.S3_DATASETS) ? 2 : 0; + const width_grid_item = number_grid_items > 0 ? 12 / number_grid_items : 1; + + return ( + + + + {isModuleEnabled(ModuleNames.S3_DATASETS) && ( + + + + + + Data.all will create an S3 Bucket encrypted with KMS key and + a Glue database. + + + + + + )} + {isModuleEnabled(ModuleNames.S3_DATASETS) && ( + + + + + + Data.all will use the S3 Bucket as it is encrypted and will + create a Glue database if you do not provide one. + + + + + + )} + + + + ); +}; + +DatasetCreateWindow.propTypes = { + onClose: PropTypes.func, + open: PropTypes.bool.isRequired +}; diff --git a/frontend/src/modules/S3_Datasets/components/DatasetListItem.js b/frontend/src/modules/DatasetsBase/components/DatasetListItem.js similarity index 93% rename from frontend/src/modules/S3_Datasets/components/DatasetListItem.js rename to frontend/src/modules/DatasetsBase/components/DatasetListItem.js index 2d24f7af2..432883398 100644 --- a/frontend/src/modules/S3_Datasets/components/DatasetListItem.js +++ b/frontend/src/modules/DatasetsBase/components/DatasetListItem.js @@ -40,7 +40,11 @@ export const DatasetListItem = (props) => { color="textPrimary" variant="h6" onClick={() => { - navigate(`/console/datasets/${dataset.datasetUri}`); + navigate( + dataset.datasetType === 'DatasetType.S3' + ? `/console/s3-datasets/${dataset.datasetUri}` + : '-' + ); }} sx={{ width: '99%', @@ -203,7 +207,11 @@ export const DatasetListItem = (props) => { diff --git a/frontend/src/modules/DatasetsBase/components/index.js b/frontend/src/modules/DatasetsBase/components/index.js new file mode 100644 index 000000000..8d69e525d --- /dev/null +++ b/frontend/src/modules/DatasetsBase/components/index.js @@ -0,0 +1,2 @@ +export * from './DatasetCreateWindow'; +export * from './DatasetListItem'; diff --git a/frontend/src/modules/DatasetsBase/index.js b/frontend/src/modules/DatasetsBase/index.js new file mode 100644 index 000000000..cbf3f4b7f --- /dev/null +++ b/frontend/src/modules/DatasetsBase/index.js @@ -0,0 +1,10 @@ +import { ModuleNames, getModuleActiveStatus } from 'utils'; + +export const DatasetsBaseModule = { + moduleDefinition: true, + name: 'datasets_base', + isEnvironmentModule: false, + resolve_dependency: () => { + return getModuleActiveStatus(ModuleNames.S3_DATASETS); // Add other dataset types when needed + } +}; diff --git a/frontend/src/modules/DatasetsBase/services/index.js b/frontend/src/modules/DatasetsBase/services/index.js new file mode 100644 index 000000000..e8d396a19 --- /dev/null +++ b/frontend/src/modules/DatasetsBase/services/index.js @@ -0,0 +1 @@ +export * from './listDatasets'; diff --git a/frontend/src/modules/S3_Datasets/services/listDatasets.js b/frontend/src/modules/DatasetsBase/services/listDatasets.js similarity index 100% rename from frontend/src/modules/S3_Datasets/services/listDatasets.js rename to frontend/src/modules/DatasetsBase/services/listDatasets.js diff --git a/frontend/src/modules/S3_Datasets/views/DatasetList.js b/frontend/src/modules/DatasetsBase/views/DatasetList.js similarity index 89% rename from frontend/src/modules/S3_Datasets/views/DatasetList.js rename to frontend/src/modules/DatasetsBase/views/DatasetList.js index 7b9f8f922..b6835a547 100644 --- a/frontend/src/modules/S3_Datasets/views/DatasetList.js +++ b/frontend/src/modules/DatasetsBase/views/DatasetList.js @@ -1,4 +1,3 @@ -import { CloudDownloadOutlined } from '@mui/icons-material'; import { Box, Breadcrumbs, @@ -23,9 +22,16 @@ import { import { SET_ERROR, useDispatch } from 'globalErrors'; import { useClient } from 'services'; import { listDatasets } from '../services'; -import { DatasetListItem } from '../components'; +import { DatasetCreateWindow, DatasetListItem } from '../components'; function DatasetsPageHeader() { + const [isCreateModalOpen, setIsCreateModalOpen] = useState(false); + const handleCreateModalOpen = () => { + setIsCreateModalOpen(true); + }; + const handleCreateModalClose = () => { + setIsCreateModalOpen(false); + }; return ( - + {isCreateModalOpen && ( + + )} diff --git a/frontend/src/modules/Environments/components/EnvironmentOwnedDatasets.js b/frontend/src/modules/Environments/components/EnvironmentOwnedDatasets.js index 2d4d799f5..1ed875a3f 100644 --- a/frontend/src/modules/Environments/components/EnvironmentOwnedDatasets.js +++ b/frontend/src/modules/Environments/components/EnvironmentOwnedDatasets.js @@ -149,7 +149,11 @@ export const EnvironmentOwnedDatasets = ({ environment }) => { { - navigate(`/console/datasets/${dataset.datasetUri}`); + navigate( + dataset.datasetType === 'DatasetType.S3' + ? `/console/s3-datasets/${dataset.datasetUri}` + : '-' + ); }} > diff --git a/frontend/src/modules/Environments/components/EnvironmentSharedDatasets.js b/frontend/src/modules/Environments/components/EnvironmentSharedDatasets.js index 4472f846c..0ac36b332 100644 --- a/frontend/src/modules/Environments/components/EnvironmentSharedDatasets.js +++ b/frontend/src/modules/Environments/components/EnvironmentSharedDatasets.js @@ -134,9 +134,7 @@ export const EnvironmentSharedDatasets = ({ environment }) => { {items.nodes.length > 0 ? ( items.nodes.map((item) => ( - - {item.GlueTableName ? 'Table' : 'Folder'} - + {item.itemType} {item.GlueTableName || item.S3AccessPointName} @@ -146,7 +144,7 @@ export const EnvironmentSharedDatasets = ({ environment }) => { { - navigate(`/console/datasets/${item.datasetUri}`); + navigate(`/console/s3-datasets/${item.datasetUri}`); }} > diff --git a/frontend/src/modules/Environments/services/listDatasetsCreatedInEnvironment.js b/frontend/src/modules/Environments/services/listDatasetsCreatedInEnvironment.js index 51f001a11..38782f389 100644 --- a/frontend/src/modules/Environments/services/listDatasetsCreatedInEnvironment.js +++ b/frontend/src/modules/Environments/services/listDatasetsCreatedInEnvironment.js @@ -24,6 +24,7 @@ export const listDatasetsCreatedInEnvironment = ({ hasPrevious nodes { datasetUri + datasetType label AwsAccountId region diff --git a/frontend/src/modules/Folders/views/FolderCreateForm.js b/frontend/src/modules/Folders/views/FolderCreateForm.js index 5d59e254e..46897a600 100644 --- a/frontend/src/modules/Folders/views/FolderCreateForm.js +++ b/frontend/src/modules/Folders/views/FolderCreateForm.js @@ -59,7 +59,7 @@ function FolderCreateHeader(props) { underline="hover" color="textPrimary" component={RouterLink} - to={`/console/datasets/${dataset.datasetUri}`} + to={`/console/s3-datasets/${dataset.datasetUri}`} variant="subtitle2" > {dataset.name} @@ -73,7 +73,7 @@ function FolderCreateHeader(props) { component={RouterLink} startIcon={} sx={{ mt: 1 }} - to={`/console/datasets/${dataset.datasetUri}`} + to={`/console/s3-datasets/${dataset.datasetUri}`} variant="outlined" > Cancel @@ -139,7 +139,7 @@ const FolderCreateForm = () => { variant: 'success' }); navigate( - `/console/datasets/folder/${response.data.createDatasetStorageLocation.locationUri}` + `/console/s3-datasets/folder/${response.data.createDatasetStorageLocation.locationUri}` ); } else { dispatch({ type: SET_ERROR, error: response.errors[0].message }); diff --git a/frontend/src/modules/Folders/views/FolderEditForm.js b/frontend/src/modules/Folders/views/FolderEditForm.js index 1ad99cd71..4c895d3fc 100644 --- a/frontend/src/modules/Folders/views/FolderEditForm.js +++ b/frontend/src/modules/Folders/views/FolderEditForm.js @@ -66,7 +66,7 @@ function FolderEditHeader(props) { underline="hover" color="textPrimary" component={RouterLink} - to={`/console/datasets/${folder.dataset.datasetUri}`} + to={`/console/s3-datasets/${folder.dataset.datasetUri}`} variant="subtitle2" > {folder.dataset.label} @@ -76,7 +76,7 @@ function FolderEditHeader(props) { underline="hover" color="textPrimary" component={RouterLink} - to={`/console/datasets/folder/${folder.locationUri}`} + to={`/console/s3-datasets/folder/${folder.locationUri}`} variant="subtitle2" > {folder.label} @@ -94,7 +94,7 @@ function FolderEditHeader(props) { component={RouterLink} startIcon={} sx={{ mt: 1 }} - to={`/console/datasets/folder/${folder.locationUri}`} + to={`/console/s3-datasets/folder/${folder.locationUri}`} variant="outlined" > Cancel @@ -190,7 +190,7 @@ const FolderEditForm = () => { }, variant: 'success' }); - navigate(`/console/datasets/folder/${folder.locationUri}`); + navigate(`/console/s3-datasets/folder/${folder.locationUri}`); } catch (err) { setStatus({ success: false }); setErrors({ submit: err.message }); diff --git a/frontend/src/modules/Folders/views/FolderView.js b/frontend/src/modules/Folders/views/FolderView.js index befbcde4c..184b258bf 100644 --- a/frontend/src/modules/Folders/views/FolderView.js +++ b/frontend/src/modules/Folders/views/FolderView.js @@ -106,7 +106,7 @@ function FolderPageHeader(props) { underline="hover" color="textPrimary" component={RouterLink} - to={`/console/datasets/${folder?.dataset?.datasetUri}`} + to={`/console/s3-datasets/${folder?.dataset?.datasetUri}`} variant="subtitle2" > {folder?.dataset?.name} @@ -115,7 +115,7 @@ function FolderPageHeader(props) { underline="hover" color="textPrimary" component={RouterLink} - to={`/console/datasets/folder/${folder.locationUri}`} + to={`/console/s3-datasets/folder/${folder.locationUri}`} variant="subtitle2" > {folder.label} @@ -154,7 +154,7 @@ function FolderPageHeader(props) { component={RouterLink} startIcon={} sx={{ m: 1 }} - to={`/console/datasets/folder/${folder.locationUri}/edit`} + to={`/console/s3-datasets/folder/${folder.locationUri}/edit`} variant="outlined" > Edit @@ -224,7 +224,7 @@ const FolderView = () => { }, variant: 'success' }); - navigate(`/console/datasets/${folder.dataset.datasetUri}`); + navigate(`/console/s3-datasets/${folder.dataset.datasetUri}`); } else { dispatch({ type: SET_ERROR, error: response.errors[0].message }); } diff --git a/frontend/src/modules/Glossaries/components/GlossaryAssociations.js b/frontend/src/modules/Glossaries/components/GlossaryAssociations.js index 583d7f036..8db3303e6 100644 --- a/frontend/src/modules/Glossaries/components/GlossaryAssociations.js +++ b/frontend/src/modules/Glossaries/components/GlossaryAssociations.js @@ -157,7 +157,7 @@ export const GlossaryAssociations = ({ glossary }) => { underline="hover" color="textPrimary" component={RouterLink} - to={`/console/datasets/${item.targetUri}`} + to={`/console/s3-datasets/${item.targetUri}`} variant="subtitle2" > {item.target.label} @@ -169,7 +169,7 @@ export const GlossaryAssociations = ({ glossary }) => { underline="hover" color="textPrimary" component={RouterLink} - to={`/console/datasets/table/${item.targetUri}`} + to={`/console/s3-datasets/table/${item.targetUri}`} variant="subtitle2" > {item.target.label} @@ -181,7 +181,7 @@ export const GlossaryAssociations = ({ glossary }) => { underline="hover" color="textPrimary" component={RouterLink} - to={`/console/datasets/folder/${item.targetUri}`} + to={`/console/s3-datasets/folder/${item.targetUri}`} variant="subtitle2" > {item.target.label} diff --git a/frontend/src/modules/S3_Datasets/components/DatasetFolders.js b/frontend/src/modules/S3_Datasets/components/DatasetFolders.js index 230d08d42..7cefeefee 100644 --- a/frontend/src/modules/S3_Datasets/components/DatasetFolders.js +++ b/frontend/src/modules/S3_Datasets/components/DatasetFolders.js @@ -217,7 +217,7 @@ export const DatasetFolders = (props) => { underline="hover" color="textPrimary" component={RouterLink} - to={`/console/datasets/folder/${folder.locationUri}`} + to={`/console/s3-datasets/folder/${folder.locationUri}`} variant="subtitle2" > {folder.name} @@ -241,7 +241,7 @@ export const DatasetFolders = (props) => { { navigate( - `/console/datasets/folder/${folder.locationUri}` + `/console/s3-datasets/folder/${folder.locationUri}` ); }} > diff --git a/frontend/src/modules/S3_Datasets/components/DatasetTables.js b/frontend/src/modules/S3_Datasets/components/DatasetTables.js index 0d427610b..46b3603e3 100644 --- a/frontend/src/modules/S3_Datasets/components/DatasetTables.js +++ b/frontend/src/modules/S3_Datasets/components/DatasetTables.js @@ -254,7 +254,7 @@ export const DatasetTables = (props) => { underline="hover" color="textPrimary" component={RouterLink} - to={`/console/datasets/table/${table.tableUri}`} + to={`/console/s3-datasets/table/${table.tableUri}`} variant="subtitle2" > {table.GlueTableName} @@ -276,7 +276,7 @@ export const DatasetTables = (props) => { { navigate( - `/console/datasets/table/${table.tableUri}` + `/console/s3-datasets/table/${table.tableUri}` ); }} > diff --git a/frontend/src/modules/S3_Datasets/components/index.js b/frontend/src/modules/S3_Datasets/components/index.js index 36e8c98e8..31b7ca3bc 100644 --- a/frontend/src/modules/S3_Datasets/components/index.js +++ b/frontend/src/modules/S3_Datasets/components/index.js @@ -3,7 +3,6 @@ export * from './DatasetConsoleAccess'; export * from './DatasetData'; export * from './DatasetFolders'; export * from './DatasetGovernance'; -export * from './DatasetListItem'; export * from './DatasetOverview'; export * from './DatasetStartCrawlerModal'; export * from './DatasetTables'; diff --git a/frontend/src/modules/S3_Datasets/services/index.js b/frontend/src/modules/S3_Datasets/services/index.js index c8dfd1090..53a75912e 100644 --- a/frontend/src/modules/S3_Datasets/services/index.js +++ b/frontend/src/modules/S3_Datasets/services/index.js @@ -3,7 +3,6 @@ export * from './deleteDataset'; export * from './generateDatasetAccessToken'; export * from './getDatasetPresignedUrl'; export * from './importDataset'; -export * from './listDatasets'; export * from './listDatasetStorageLocations'; export * from './startGlueCrawler'; export * from './syncTables'; diff --git a/frontend/src/modules/S3_Datasets/views/DatasetCreateForm.js b/frontend/src/modules/S3_Datasets/views/DatasetCreateForm.js index a4d2f0437..0cc31d85d 100644 --- a/frontend/src/modules/S3_Datasets/views/DatasetCreateForm.js +++ b/frontend/src/modules/S3_Datasets/views/DatasetCreateForm.js @@ -138,7 +138,9 @@ const DatasetCreateForm = (props) => { }, variant: 'success' }); - navigate(`/console/datasets/${response.data.createDataset.datasetUri}`); + navigate( + `/console/s3-datasets/${response.data.createDataset.datasetUri}` + ); } else { dispatch({ type: SET_ERROR, error: response.errors[0].message }); } diff --git a/frontend/src/modules/S3_Datasets/views/DatasetEditForm.js b/frontend/src/modules/S3_Datasets/views/DatasetEditForm.js index f0e9355ec..932cc1ef9 100644 --- a/frontend/src/modules/S3_Datasets/views/DatasetEditForm.js +++ b/frontend/src/modules/S3_Datasets/views/DatasetEditForm.js @@ -175,7 +175,9 @@ const DatasetEditForm = (props) => { }, variant: 'success' }); - navigate(`/console/datasets/${response.data.updateDataset.datasetUri}`); + navigate( + `/console/s3-datasets/${response.data.updateDataset.datasetUri}` + ); } else { dispatch({ type: SET_ERROR, error: response.errors[0].message }); } @@ -231,7 +233,7 @@ const DatasetEditForm = (props) => { underline="hover" color="textPrimary" component={RouterLink} - to={`/console/datasets/${dataset.datasetUri}`} + to={`/console/s3-datasets/${dataset.datasetUri}`} variant="subtitle2" > {dataset.label} @@ -248,7 +250,7 @@ const DatasetEditForm = (props) => { component={RouterLink} startIcon={} sx={{ mt: 1 }} - to={`/console/datasets/${dataset.datasetUri}`} + to={`/console/s3-datasets/${dataset.datasetUri}`} variant="outlined" > Cancel diff --git a/frontend/src/modules/S3_Datasets/views/DatasetImportForm.js b/frontend/src/modules/S3_Datasets/views/DatasetImportForm.js index 8af3a29cd..2400523b6 100644 --- a/frontend/src/modules/S3_Datasets/views/DatasetImportForm.js +++ b/frontend/src/modules/S3_Datasets/views/DatasetImportForm.js @@ -141,7 +141,9 @@ const DatasetImportForm = (props) => { }, variant: 'success' }); - navigate(`/console/datasets/${response.data.importDataset.datasetUri}`); + navigate( + `/console/s3-datasets/${response.data.importDataset.datasetUri}` + ); } else { dispatch({ type: SET_ERROR, error: response.errors[0].message }); } diff --git a/frontend/src/modules/S3_Datasets/views/DatasetView.js b/frontend/src/modules/S3_Datasets/views/DatasetView.js index d4b049a14..ac7c50535 100644 --- a/frontend/src/modules/S3_Datasets/views/DatasetView.js +++ b/frontend/src/modules/S3_Datasets/views/DatasetView.js @@ -50,7 +50,7 @@ import { DatasetUpload } from '../components'; import { isFeatureEnabled } from 'utils'; -import { RequestAccessModal } from '../../Catalog/components'; +import { RequestAccessModal } from 'modules/Catalog/components'; const DatasetView = () => { const dispatch = useDispatch(); @@ -267,7 +267,7 @@ const DatasetView = () => { underline="hover" color="textPrimary" component={RouterLink} - to={`/console/datasets/${dataset.datasetUri}`} + to={`/console/s3-datasets/${dataset.datasetUri}`} variant="subtitle2" > {dataset.label} @@ -302,7 +302,7 @@ const DatasetView = () => { component={RouterLink} startIcon={} sx={{ mt: 1, mr: 1 }} - to={`/console/datasets/${dataset.datasetUri}/edit`} + to={`/console/s3-datasets/${dataset.datasetUri}/edit`} variant="outlined" > Edit diff --git a/frontend/src/modules/Shares/views/ShareView.js b/frontend/src/modules/Shares/views/ShareView.js index 151d72362..4e89820de 100644 --- a/frontend/src/modules/Shares/views/ShareView.js +++ b/frontend/src/modules/Shares/views/ShareView.js @@ -225,7 +225,7 @@ function ShareViewHeader(props) { color="textSecondary" variant="subtitle2" component={RouterLink} - to={`/console/datasets/${share.dataset?.datasetUri}`} + to={`/console/s3-datasets/${share.dataset?.datasetUri}`} > {share.dataset?.datasetName} diff --git a/frontend/src/modules/Tables/views/TableEditForm.js b/frontend/src/modules/Tables/views/TableEditForm.js index 2fc566a2b..c3cc1f28d 100644 --- a/frontend/src/modules/Tables/views/TableEditForm.js +++ b/frontend/src/modules/Tables/views/TableEditForm.js @@ -62,7 +62,7 @@ function TableEditHeader(props) { underline="hover" color="textPrimary" component={RouterLink} - to={`/console/datasets/${table.datasetUri}`} + to={`/console/s3-datasets/${table.datasetUri}`} variant="subtitle2" > {table.dataset.name} @@ -72,7 +72,7 @@ function TableEditHeader(props) { underline="hover" color="textPrimary" component={RouterLink} - to={`/console/datasets/table/${table.tableUri}`} + to={`/console/s3-datasets/table/${table.tableUri}`} variant="subtitle2" > {table.GlueTableName} @@ -90,7 +90,7 @@ function TableEditHeader(props) { component={RouterLink} startIcon={} sx={{ mt: 1 }} - to={`/console/datasets/table/${table.tableUri}`} + to={`/console/s3-datasets/table/${table.tableUri}`} variant="outlined" > Cancel @@ -138,7 +138,7 @@ const TableEditForm = () => { }, variant: 'success' }); - navigate(`/console/datasets/table/${table.tableUri}`); + navigate(`/console/s3-datasets/table/${table.tableUri}`); } catch (err) { console.error(err); setStatus({ success: false }); diff --git a/frontend/src/modules/Tables/views/TableView.js b/frontend/src/modules/Tables/views/TableView.js index 68c5ebbab..624bf4167 100644 --- a/frontend/src/modules/Tables/views/TableView.js +++ b/frontend/src/modules/Tables/views/TableView.js @@ -86,7 +86,7 @@ function TablePageHeader(props) { underline="hover" color="textPrimary" component={RouterLink} - to={`/console/datasets/${table?.dataset?.datasetUri}`} + to={`/console/s3-datasets/${table?.dataset?.datasetUri}`} variant="subtitle2" > {table?.dataset?.name} @@ -95,7 +95,7 @@ function TablePageHeader(props) { underline="hover" color="textPrimary" component={RouterLink} - to={`/console/datasets/table/${table.tableUri}`} + to={`/console/s3-datasets/table/${table.tableUri}`} variant="subtitle2" > {table.GlueTableName} @@ -120,7 +120,7 @@ function TablePageHeader(props) { component={RouterLink} startIcon={} sx={{ m: 1 }} - to={`/console/datasets/table/${table.tableUri}/edit`} + to={`/console/s3-datasets/table/${table.tableUri}/edit`} variant="outlined" > Edit @@ -180,7 +180,7 @@ const TableView = () => { deleteDatasetTable({ tableUri: table.tableUri }) ); if (!response.errors) { - navigate(`/console/datasets/${table.datasetUri}`); + navigate(`/console/s3-datasets/${table.datasetUri}`); } else { dispatch({ type: SET_ERROR, error: response.errors[0].message }); } diff --git a/frontend/src/modules/index.js b/frontend/src/modules/index.js index 2ff1df28c..e91124e64 100644 --- a/frontend/src/modules/index.js +++ b/frontend/src/modules/index.js @@ -1,10 +1,11 @@ export * from './Catalog'; export * from './Dashboards'; -export * from './S3_Datasets'; +export * from './DatasetsBase'; export * from './Glossaries'; export * from './MLStudio'; export * from './Notebooks'; export * from './Notifications'; export * from './Pipelines'; +export * from './S3_Datasets'; export * from './Shares'; export * from './Worksheets'; diff --git a/frontend/src/routes.js b/frontend/src/routes.js index 52c8ac7de..e66553de0 100644 --- a/frontend/src/routes.js +++ b/frontend/src/routes.js @@ -46,7 +46,7 @@ const EnvironmentList = Loadable( const Catalog = Loadable(lazy(() => import('./modules/Catalog/views/Catalog'))); const DatasetList = Loadable( - lazy(() => import('./modules/S3_Datasets/views/DatasetList')) + lazy(() => import('./modules/DatasetsBase/views/DatasetList')) ); const DatasetView = Loadable( lazy(() => import('./modules/S3_Datasets/views/DatasetView')) @@ -227,50 +227,54 @@ const routes = [ path: 'catalog', element: }, - isModuleEnabled(ModuleNames.S3_DATASETS) && { + isModuleEnabled(ModuleNames.DATASETS_BASE) && { children: [ { path: 'datasets', element: - }, + } + ] + }, + isModuleEnabled(ModuleNames.S3_DATASETS) && { + children: [ { - path: 'datasets/:uri', + path: 's3-datasets/:uri', element: }, { - path: 'datasets/new', + path: 's3-datasets/new', element: }, { - path: 'datasets/import', + path: 's3-datasets/import', element: }, { - path: 'datasets/:uri/edit', + path: 's3-datasets/:uri/edit', element: }, { - path: 'datasets/:uri/edit', + path: 's3-datasets/:uri/edit', element: }, { - path: 'datasets/table/:uri', + path: 's3-datasets/table/:uri', element: }, { - path: 'datasets/table/:uri/edit', + path: 's3-datasets/table/:uri/edit', element: }, { - path: 'datasets/:uri/newfolder', + path: 's3-datasets/:uri/newfolder', element: }, { - path: 'datasets/folder/:uri', + path: 's3-datasets/folder/:uri', element: }, { - path: 'datasets/folder/:uri/edit', + path: 's3-datasets/folder/:uri/edit', element: } ]