Skip to content

Commit

Permalink
[DUOS-2751] AnVIL data library (#2382)
Browse files Browse the repository at this point in the history
  • Loading branch information
fboulnois authored Nov 9, 2023
1 parent aaca791 commit 8cfc3d5
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/DuosHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const headerTabsConfig = [
search: 'dataset_catalog',
children: [
{ label: 'Data Catalog', link: '/dataset_catalog' },
{ label: 'Data Library', link: '/datalibrary' },
{ 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
27 changes: 27 additions & 0 deletions src/images/anvil-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion src/pages/DatasetSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ import duosIcon from '../images/duos-network-logo.svg';
import mgbIcon from '../images/mass-general-brigham-logo.svg';
import elwaziIcon from '../images/elwazi-logo-color.svg';
import nhgriIcon from '../images/nhgri-logo-color.svg';
import anvilIcon from '../images/anvil-logo.svg';
import homeIcon from '../images/icon_dataset_.png';
import { Storage } from '../libs/storage';
import { Box, CircularProgress } from '@mui/material';
import { toLower } from 'lodash';

const signingOfficialQuery = (user) => {
return {
Expand Down Expand Up @@ -115,6 +117,15 @@ export const DatasetSearch = (props) => {
icon: nhgriIcon,
title: 'NHGRI Data Library',
},
'anvil': {
query: {
'match_phrase': {
'study.description': 'anvil'
}
},
icon: anvilIcon,
title: 'AnVIL Data Library',
},
'/custom': {
query: {
'bool': {
Expand All @@ -137,7 +148,7 @@ export const DatasetSearch = (props) => {
}
}

const key = query === undefined ? '/datalibrary' : query;
const key = query === undefined ? '/datalibrary' : toLower(query);
const version = versions[key] === undefined ? versions['/custom'] : versions[key];

useEffect(() => {
Expand Down

0 comments on commit 8cfc3d5

Please sign in to comment.