Skip to content

Commit

Permalink
Update style and version to better match data-portal's version of BRH (
Browse files Browse the repository at this point in the history
…#6)

* update brh config

* update colors

* adjust base path

* fix Docker start

* set port in start.sh

* refine Docker start

* add start.sh

* refine Docker start (again)

* fix image paths

* add AISearch Page

* update GEN3_API

* update navigation

* update AISearch path

* update navigation

* update ai search API

* update ai search API

* update navigation

* update package-lock

* update icon paths in footer

* update gen3ff version

* update navi links and labels

* update AISearch to include Discovery Page

---------

Co-authored-by: craigrbarnes <[email protected]>
  • Loading branch information
craigrbarnes and craigrbarnes authored Apr 23, 2024
1 parent d3312dd commit af135e3
Show file tree
Hide file tree
Showing 24 changed files with 210 additions and 117 deletions.
8 changes: 3 additions & 5 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
BASE_PATH=/ff
GEN3_COMMONS_NAME=brh
NEXT_PUBLIC_GEN3_API=https://localhost
NEXT_PUBLIC_GEN3_DOMAIN=https://localhost
NEXT_PUBLIC_GEN3_MDS_API=https://localhost
#NEXT_PUBLIC_GEN3_AI_SEARCH_API=http://localhost:8089
#NEXT_PUBLIC_GEN3_GUPPY_API=https://localhost:3010/guppy
NEXT_PUBLIC_GEN3_API='https://brhstaging.data-commons.org'
NEXT_PUBLIC_GEN3_AI_SEARCH_API='https://brhstaging.data-commons.org/ai'
5 changes: 3 additions & 2 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
BASE_PATH=/ff
GEN3_COMMONS_NAME=brh
NEXT_PUBLIC_GEN3_API=https://localhost/
NEXT_PUBLIC_GEN3_DOMAIN=https://localhost/
NEXT_PUBLIC_GEN3_API='https://brhstaging.data-commons.org'
NEXT_PUBLIC_GEN3_AI_SEARCH_API='https://brhstaging.data-commons.org/ai'
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ COPY ./.env.development ./
COPY ./.env.production ./
COPY ./tailwind.config.js ./
COPY ./postcss.config.js ./
COPY ./start.sh ./
RUN npm ci
RUN npm install \
"@swc/core" \
"@napi-rs/magic-string"
RUN npm run build
ENV PORT=80
CMD ["npm", "run", "start"]
ENV PORT=3000
CMD bash ./start.sh
2 changes: 1 addition & 1 deletion config/brh/discovery.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"expandableRows": true
},
"features": {
"dataFetchFunction": "MDSAllLocal",
"dataFetchFunction": "AggMDSAllLocal",
"aiSearch" : true,
"advSearchFilters": {
"enabled": false,
Expand Down
7 changes: 5 additions & 2 deletions config/brh/footer.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"classNames": {
"root": "bg-base-darkest"
},
"footerRightLogos": [
[
{
"logo": "gen3.png",
"logo": "/ff/icons/gen3.png",
"width": 132,
"height": 60,
"description": "Gen3 Logo"
},
{
"logo": "createdby.png",
"logo": "/ff/icons/createdby.png",
"width": 170,
"height": 60,
"description": "Created by CTDS"
Expand Down
2 changes: 1 addition & 1 deletion config/brh/landingPage.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{
"link": {
"href": "/Discovery",
"text": "Discovery Data"
"text": "Discover Data"
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion config/brh/login.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
],
"image": "images/brh/gene_bgy.png",
"email": "[email protected]",
"showCredentialsLogin" : true
"showCredentialsLogin" : false
}
11 changes: 0 additions & 11 deletions config/brh/modals.json

This file was deleted.

72 changes: 53 additions & 19 deletions config/brh/navigation.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,79 @@
{
"navigation": {
"logo": {
"src": "/images/brh/logo.png",
"height":256,
"href": "/Discovery"
},
"items": [{
"icon": "gen3:query",
"href": "/Discovery",
"name": "Discovery",
"tooltip": "Discover Data"
"src": "/ff/images/brh/logo.png",
"height": 256,
"href": "https://brhstaging.data-commons.org/"
},
"items": [
{
"icon": "gen3:query",
"href": "https://brhstaging.data-commons.org/discovery",
"name": "Discovery",
"classNames" : {
"root": "border-opacity-50 border-blue",
"button": "hover:border-white"
},
"tooltip": "Use free-text search and tags to rapidly find relevant studies, discover new datasets across multiple resources, and easily export selected data files to the analysis workspace."
},
{
"icon": "gen3:aisearch",
"href": "/AISearch",
"name": "AI Search - Beta",
"tooltip": "Use AI Based search to find relevant studies using a chat-like interface."
},
{
"name": "Workspace",
"href": "https://brhstaging.data-commons.org/workspace",
"icon": "gen3:workspace",
"tooltip": "Gen3 workspaces are secure data analysis environments in the cloud that can access data from one or more data resources."
},
{
"name": "Example Analysis",
"href": "https://brhstaging.data-commons.org/resource-browser",
"icon": "gen3:bar-chart",
"tooltip": "Learn how to use Jupyter Notebooks to explore and visualize data discovered in the Biomedical Research Hub by running a static tutorial notebook, or use one of these examples as a launching point for your own custom analysis."
},
{
"icon": "gen3:profile",
"href": "/Profile",
"href": "https://brhstaging.data-commons.org/identity",
"name": "Profile",
"tooltip": "Create API keys for programmatic data access, and review your authorization privileges to datasets and services.",
"classNames": {
"root": "flex flex-col flex-nowrap px-1 py-2 pt-4 items-center hover:text-accent opacity-80 hover:opacity-100 pr-10"
}
"tooltip": "Create API keys for programmatic data access, and review your authorization privileges to datasets and services."
}
]
},
"topBar": {
"items": [
{
"link": "https://uc-cdis.github.io/BRH-documentation/",
"name": "Documentation"
"name": "Documentation",
"classNames": {
"root": "border-blue border-opacity-50",
"label": "text-white font-bold text-sm",
"button": "hover:border-white mx-4"
}
},
{
"link": "[email protected]",
"name": "Email Support"
"name": "Email Support",
"classNames": {
"root": "border-base-lighter ",
"label": "text-white font-bold text-sm",
"button": "hover:border-white mx-4"
}
},
{
"link": "https://uc-cdis.github.io/platform-citation/brh-cite/",
"name": "Cite BRH"
"name": "Cite BRH",
"classNames": {
"label": "text-white font-bold text-sm",
"button": "hover:border-white mx-4 mr-[64px]"
}
}
],
"showLogin": true,
"showLogin": false,
"classNames": {
"root": "flex justify-end items-center align-middle w-100 h-10 bg-secondary"
"root": "bg-primary"
}
}
}
3 changes: 3 additions & 0 deletions config/icons/aiSearch.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion config/icons/gen3.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"prefix": "gen3",
"lastModified": 1708125912,
"lastModified": 1712686390,
"icons": {
"aisearch": {
"body": "<defs><clipPath id=\"svgID0\"><path d=\"M0 512h512V0H0z\"/></clipPath></defs><g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-miterlimit=\"10\" stroke-width=\"20\" clip-path=\"url(#svgID0)\" transform=\"matrix(1.3333 0 0 -1.3333 0 682.67)\"><path d=\"M367.48 415.54c74.959-74.447 74.959-195.15 0-269.6-74.96-74.447-196.49-74.447-271.45 0s-74.96 195.15 0 269.6 196.49 74.447 271.45 0\"/><path d=\"M331.05 182.12c-54.75-54.376-143.84-54.376-198.59 0s-54.751 142.85 0 197.23c54.75 54.376 143.84 54.376 198.59 0s54.75-142.85 0-197.23m53.71-19.02 92.938-69.012c20.22-15.016 22.341-44.346 4.488-62.077s-47.385-15.624-62.504 4.458l-69.487 92.301M125.44 17.048c9.485 9.419 9.459 24.717-.059 34.169-9.516 9.452-24.92 9.478-34.404.059s-9.458-24.718.059-34.17 24.92-9.478 34.404-.058m.4 34.626 47.064 46.742M94.036 184.42c-9.484-9.419-9.458-24.718.059-34.169 9.516-9.452 24.92-9.478 34.404-.059s9.459 24.718-.059 34.17c-9.516 9.452-24.92 9.477-34.404.058m-.401-34.62-48.772-48.439-27.192 7.223M371.01 494.95c-9.484-9.419-9.458-24.717.059-34.169s24.92-9.478 34.405-.059 9.458 24.718-.059 34.17-24.921 9.478-34.405.058m-.4-34.62-24.874-24.703\"/><path d=\"M402.41 327.58c9.484 9.419 9.458 24.718-.059 34.169-9.517 9.452-24.92 9.478-34.405.059s-9.458-24.718.059-34.17 24.921-9.477 34.405-.058m.4 34.62 48.772 48.439 27.191-7.223M182.85 238.68l26.699 69.622c.545 1.325 2.434 1.327 2.982.003l26.456-69.625m-47.807 17.34h39.619m36.261 53.28v-70.617m171.3-163.638 14.811-14.81\"/></g>",
"width": 682.67,
"height": 682.67
},
"analysis": {
"body": "<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M2.33 7.12q-.97 0-1.51-.86T.28 3.79t.54-2.45T2.33.5q.96 0 1.5.84t.54 2.45-.54 2.47-1.5.86m0-.66a.87.87 0 00.505-.155q.225-.154.39-.48a3 3 0 00.255-.83q.09-.505.09-1.205t-.09-1.2a2.9 2.9 0 00-.255-.815q-.165-.315-.39-.465a.9.9 0 00-.505-.15.9.9 0 00-.51.15q-.23.15-.395.465t-.255.815-.09 1.2q0 1.4.345 2.035t.905.635M6.6 7v-.68h1.46v-4.7H6.9v-.53q.44-.08.765-.195Q7.991.78 8.25.62h.63v5.7h1.32V7zm7.67.12q-.97 0-1.51-.86t-.54-2.47.54-2.45T14.27.5q.96 0 1.5.84t.54 2.45-.54 2.47-1.5.86m0-.66a.87.87 0 00.505-.155q.225-.154.39-.48a3 3 0 00.255-.83q.09-.505.09-1.205t-.09-1.2a2.9 2.9 0 00-.255-.815q-.165-.315-.39-.465a.9.9 0 00-.505-.15.9.9 0 00-.51.15q-.23.15-.395.465t-.255.815-.09 1.2q0 1.4.345 2.035t.905.635m4.27.54v-.68H20v-4.7h-1.16v-.53q.44-.08.765-.195T20.19.62h.63v5.7h1.32V7zm7.67.12q-.97 0-1.51-.86t-.54-2.47.54-2.45T26.21.5q.96 0 1.5.84t.54 2.45-.54 2.47-1.5.86m0-.66a.87.87 0 00.505-.155q.225-.154.39-.48a3 3 0 00.255-.83q.09-.505.09-1.205t-.09-1.2a2.9 2.9 0 00-.255-.815q-.165-.315-.39-.465a.9.9 0 00-.505-.15.9.9 0 00-.51.15q-.23.15-.395.465t-.255.815-.09 1.2q0 1.4.345 2.035t.905.635m4.27.54v-.68h1.46v-4.7h-1.16v-.53q.44-.08.765-.195.326-.115.585-.275h.63v5.7h1.32V7zM2.33 25.12q-.97 0-1.51-.86t-.54-2.47.54-2.45 1.51-.84q.96 0 1.5.84t.54 2.45-.54 2.47-1.5.86m0-.66a.87.87 0 00.505-.155q.225-.155.39-.48a3 3 0 00.255-.83q.09-.505.09-1.205t-.09-1.2a2.9 2.9 0 00-.255-.815q-.165-.315-.39-.465a.9.9 0 00-.505-.15.9.9 0 00-.51.15q-.23.15-.395.465t-.255.815-.09 1.2q0 1.4.345 2.035t.905.635M6.6 25v-.68h1.46v-4.7H6.9v-.53q.44-.08.765-.195.326-.115.585-.275h.63v5.7h1.32V25zm7.67.12q-.97 0-1.51-.86t-.54-2.47.54-2.45 1.51-.84q.96 0 1.5.84t.54 2.45-.54 2.47-1.5.86m0-.66a.87.87 0 00.505-.155q.225-.155.39-.48a3 3 0 00.255-.83q.09-.505.09-1.205t-.09-1.2a2.9 2.9 0 00-.255-.815q-.165-.315-.39-.465a.9.9 0 00-.505-.15.9.9 0 00-.51.15q-.23.15-.395.465t-.255.815-.09 1.2q0 1.4.345 2.035t.905.635m4.27.54v-.68H20v-4.7h-1.16v-.53q.44-.08.765-.195t.585-.275h.63v5.7h1.32V25zm7.67.12q-.97 0-1.51-.86t-.54-2.47.54-2.45 1.51-.84q.96 0 1.5.84t.54 2.45-.54 2.47-1.5.86m0-.66a.87.87 0 00.505-.155q.225-.155.39-.48a3 3 0 00.255-.83q.09-.505.09-1.205t-.09-1.2a2.9 2.9 0 00-.255-.815q-.165-.315-.39-.465a.9.9 0 00-.505-.15.9.9 0 00-.51.15q-.23.15-.395.465t-.255.815-.09 1.2q0 1.4.345 2.035t.905.635m4.27.54v-.68h1.46v-4.7h-1.16v-.53q.44-.08.765-.195.326-.115.585-.275h.63v5.7h1.32V25zM.63 16v-.68h1.46v-4.7H.93v-.53q.44-.08.765-.195.326-.115.585-.275h.63v5.7h1.32V16zm7.67.12q-.97 0-1.51-.86t-.54-2.47.54-2.45T8.3 9.5q.96 0 1.5.84t.54 2.45-.54 2.47-1.5.86m0-.66a.87.87 0 00.505-.155q.225-.155.39-.48a3 3 0 00.255-.83q.09-.505.09-1.205t-.09-1.2a2.9 2.9 0 00-.255-.815q-.165-.315-.39-.465a.9.9 0 00-.505-.15.9.9 0 00-.51.15q-.23.15-.395.465t-.255.815-.09 1.2q0 1.4.345 2.035t.905.635m4.27.54v-.68h1.46v-4.7h-1.16v-.53q.44-.08.765-.195.326-.115.585-.275h.63v5.7h1.32V16zm7.67.12q-.97 0-1.51-.86t-.54-2.47.54-2.45 1.51-.84q.96 0 1.5.84t.54 2.45-.54 2.47-1.5.86m0-.66a.87.87 0 00.505-.155q.225-.155.39-.48a3 3 0 00.255-.83q.09-.505.09-1.205t-.09-1.2a2.9 2.9 0 00-.255-.815q-.165-.315-.39-.465a.9.9 0 00-.505-.15.9.9 0 00-.51.15q-.23.15-.395.465t-.255.815-.09 1.2q0 1.4.345 2.035t.905.635m4.27.54v-.68h1.46v-4.7h-1.16v-.53q.44-.08.765-.195t.585-.275h.63v5.7h1.32V16zm7.67.12q-.97 0-1.51-.86t-.54-2.47.54-2.45 1.51-.84q.96 0 1.5.84t.54 2.45-.54 2.47-1.5.86m0-.66a.87.87 0 00.505-.155q.225-.155.39-.48a3 3 0 00.255-.83q.09-.505.09-1.205t-.09-1.2a2.9 2.9 0 00-.255-.815q-.165-.315-.39-.465a.9.9 0 00-.505-.15.9.9 0 00-.51.15q-.23.15-.395.465t-.255.815-.09 1.2q0 1.4.345 2.035t.905.635\"/>",
"width": 35,
Expand Down
22 changes: 22 additions & 0 deletions config/modals.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"systemUseModal": {
"enabled": false,
"title": "Data Use Agreement for Academic and Institutional Users",
"content": {
"text": [
"Please see the below two Data Use Agreements: the first one is for Academic and Institutional users for non-commercial use; the second agreement is for commercial use.",
"",
"",
"Data Use Agreement - Non-Commercial Research Use Only",
"This Data Use Agreement for Academic and Institutional Users (this “Agreement”) is by and between you and the University and governs your access to and use of the deidentified imaging and associated demographic and clinical data provided to you by the University. By accessing, using, or downloading any data, you are agreeing to be bound by the terms and conditions of this Agreement.",
"1. The University is the legal entity that hosts data.",
"",
"DATA USE AGREEMENT – COMMERCIAL USE PERMITTED",
"This Data Use Agreement (this “Agreement”) is by and between you or the entity you represent (“you”) and the University of Chicago (the “University”) and governs your access to and use of the deidentified imaging and associated demographic and clinical data provided to you by the University. By accessing, using, or downloading any data, you are agreeing to be bound by the terms and conditions of this Agreement. If you are entering into this Agreement for an entity, such as the company you work for, you represent and warrant that you have legal authority to bind that entity",
"1. The University may terminate this Agreement at any time upon notice to you. The University shall have no liability in the event of any such termination. Upon such termination, the University may direct that you immediately return or destroy all copies of any data and, upon the University’s request, you will certify the foregoing to the University in writing."
]
},
"expireDays": 365,
"showOnlyOnLogin": true
}
}
2 changes: 1 addition & 1 deletion config/themeColors.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"DEFAULT": "#c0c0c0",
"vivid": "#c6baba",
"min": "#131313",
"darkest": "#3e3e3e",
"darkest": "#4A4A4A",
"darker": "#6a6a6a",
"dark": "#959595",
"light": "#cecece",
Expand Down
6 changes: 3 additions & 3 deletions config/themeFonts.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"heading": ["Montserrat", "sans-serif"],
"content": ["Noto Sans", "sans-serif"],
"fontFamily": "Montserrat"
"heading": ["Source Sans Pro", "sans-serif"],
"content": ["Source Sans Pro", "sans-serif"],
"fontFamily": "Source Sans Pro"
}
Loading

0 comments on commit af135e3

Please sign in to comment.