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

DCJ-367: Link to data library instead of old catalog #2615

Merged
merged 1 commit into from
Jul 2, 2024
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
2 changes: 0 additions & 2 deletions src/Routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import ManageDac from './pages/manage_dac/ManageDac';
import ManageEditDac from './pages/manage_dac/ManageEditDac';
import AdminManageUsers from './pages/AdminManageUsers';
import DataAccessRequestApplication from './pages/dar_application/DataAccessRequestApplication';
import DatasetCatalog from './pages/DatasetCatalog';
import DACDatasets from './pages/DACDatasets';
import DatasetRegistration from './pages/DatasetRegistration';
import Home from './pages/Home';
Expand Down Expand Up @@ -98,7 +97,6 @@ const Routes = (props) => (
<AuthenticatedRoute path="/admin_manage_lc/" component={AdminManageLC} props={props} rolesAllowed={[USER_ROLES.admin]} />
<AuthenticatedRoute path="/admin_manage_dar_collections/" component={AdminManageDarCollections} props={props} rolesAllowed={[USER_ROLES.admin]} />
{checkEnv(envGroups.NON_STAGING) && <AuthenticatedRoute path="/dataset_catalog/:variant" component={CustomDatasetCatalog} props={props} rolesAllowed={[USER_ROLES.researcher]}/>}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a place that also needs to be updated?

Copy link
Contributor Author

@rushtong rushtong Jul 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the custom dataset catalog functionality in the PR description that I did not want to remove yet. Jonathan has shared out links to this so we need to figure out what to do with it.

<AuthenticatedRoute path="/dataset_catalog" component={DatasetCatalog} props={props} rolesAllowed={[USER_ROLES.admin, USER_ROLES.all]} />
<AuthenticatedRoute path="/datalibrary/:query" component={DatasetSearch} props={props} rolesAllowed={[USER_ROLES.admin, USER_ROLES.all]} />
<AuthenticatedRoute path="/datalibrary" component={DatasetSearch} props={props} rolesAllowed={[USER_ROLES.admin, USER_ROLES.all]} />
<AuthenticatedRoute path="/dataset/:datasetIdentifier" component={DatasetStatistics} props={props} rolesAllowed={[USER_ROLES.all]} />
Expand Down
4 changes: 2 additions & 2 deletions src/assets/DPA.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ to Broad’s mission and consistent with its tax-exempt status. Through its Data
registers and enables widespread access to various types of data and materials, including genomic and imaging data to
promote global scientific and genomic research. Per these terms and conditions (this “Agreement”), Broad allows the
Data Submitter, an institution, to register Data in DUOS and issue permissions to the Data Submitter’s Authorized
Submission Representatives (defined below) to register and submit datasets in the DUOS Dataset Catalog (***see***
**https://duos.broadinstitute.org/dataset_catalog**, the “Application”) at such Authorized Submission Representatives’
Submission Representatives (defined below) to register and submit datasets in the DUOS Dataset Library (***see***
**https://duos.broadinstitute.org/datalibrary**, the “Application”) at such Authorized Submission Representatives’
discretion and provided further, the Data Submitter is and remains responsible for its compliance with this Agreement
and for compliance herewith by its Authorized Submission Representatives.\
\
Expand Down
9 changes: 4 additions & 5 deletions src/components/DuosHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const headerTabsConfig = [
link: '/admin_manage_dar_collections',
children: [
{ label: 'DAR Requests', link: '/admin_manage_dar_collections' },
{ label: 'Dataset Catalog', link: '/dataset_catalog' },
{ label: 'Data Library', link: '/datalibrary', search: 'datalibrary' },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this search field represent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The search value is used in a couple places in this file. I don't remember exactly how it works, but I'm pretty sure it has to do with displaying the correct tab based on your role and where you have navigated to/from. For example, if you have multiple roles, each one with access to the same sub-tab (i.e. data library), then this feature helps restore the correct sub-tab when the user navigates between higher level role tabs.

{ label: 'DACs', link: '/manage_dac' },
{ label: 'Users', link: '/admin_manage_users' },
{ label: 'Institutions', link: '/admin_manage_institutions' },
Expand Down Expand Up @@ -119,16 +119,15 @@ export const headerTabsConfig = [
search: 'member_console',
children: [
{ label: 'DAR Requests', link: '/member_console' },
{ label: 'Datasets', link: '/dataset_catalog' },
{ label: 'Data Library', link: '/datalibrary', search: 'datalibrary' }
],
isRendered: (user) => user.isMember
},
{
label: 'Researcher Console',
link: '/dataset_catalog',
search: 'dataset_catalog',
link: '/datalibrary',
search: 'datalibrary',
children: [
{ label: 'Data Catalog', link: '/dataset_catalog' },
{ label: 'Data Library', link: '/datalibrary', search: 'datalibrary' },
{ label: 'DAR Requests', link: '/researcher_console' },
{ label: 'Data Submissions', link: '/dataset_submissions', isRenderedForUser: (user) => user?.isDataSubmitter }
Expand Down
2 changes: 1 addition & 1 deletion src/components/data_update/DatasetUpdate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const DatasetUpdate = (props) => {
multiPartFormData.append('consentGroups', consentGroups);

DataSet.updateDatasetV3(dataset.dataSetId, multiPartFormData).then(() => {
history.push('/dataset_catalog');
history.push('/datalibrary');
Notifications.showSuccess({ text: 'Update submitted successfully!' });
}, () => {
Notifications.showError({ text: 'Some errors occurred, the dataset was not updated.' });
Expand Down
2 changes: 1 addition & 1 deletion src/pages/StudyUpdateForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export const StudyUpdateForm = (props) => {
const multiPartFormData = createMultiPartFormData(update);

DataSet.updateStudy(studyId, multiPartFormData).then(() => {
history.push('/dataset_catalog');
history.push('/datalibrary');
Notifications.showSuccess({ text: 'Submitted succesfully!' });
}, (e) => {
Notifications.showError({ text: 'Could not submit: ' + e?.response?.data?.message || e.message });
Expand Down
2 changes: 1 addition & 1 deletion src/pages/data_submission/DataSubmissionForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export const DataSubmissionForm = (props) => {
const multiPartFormData = createMultiPartFormData(registration);

DataSet.registerDataset(multiPartFormData).then(() => {
history.push('/dataset_catalog');
history.push('/datalibrary');
Notifications.showSuccess({ text: 'Submitted succesfully!' });
}, (e) => {
Notifications.showError({ text: 'Could not submit: ' + e?.response?.data?.message || e.message });
Expand Down
Loading