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

v1.0.2-hotfix2 404 error on filter reset and systems match bug fix #163

Merged
merged 230 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
230 commits
Select commit Hold shift + click to select a range
eee11fe
OLS search for filtered ontologies
yelenacox Oct 10, 2024
903d94e
added fetch function for ols search
yelenacox Oct 10, 2024
156100e
OLS ontology filters for mapping search
yelenacox Oct 15, 2024
27ff5fe
first pass at editing ontology filters
yelenacox Oct 15, 2024
970dee2
Delete preferred ontologies
yelenacox Oct 15, 2024
b0519ec
committing to switch branches
yelenacox Oct 15, 2024
3697025
Newly added ontologies checking by default on load
yelenacox Oct 16, 2024
a3bdbe2
ontology filter for mappings search
yelenacox Oct 16, 2024
642e2b1
Removed unnecesary console logs
yelenacox Oct 16, 2024
fd8452f
OLS search for filtered ontologies
yelenacox Oct 10, 2024
ada5d61
added fetch function for ols search
yelenacox Oct 10, 2024
ede8b8c
OLS ontology filters for mapping search
yelenacox Oct 15, 2024
02fa958
first pass at editing ontology filters
yelenacox Oct 15, 2024
77dbfe3
Delete preferred ontologies
yelenacox Oct 15, 2024
9b128e5
committing to switch branches
yelenacox Oct 15, 2024
79255a5
Newly added ontologies checking by default on load
yelenacox Oct 16, 2024
bd0e506
ontology filter for mappings search
yelenacox Oct 16, 2024
48cefbb
Removed unnecesary console logs
yelenacox Oct 16, 2024
895a02c
Rebased branch
yelenacox Oct 16, 2024
c4288c8
Merge branch 'main' into ontology-filter-search
yelenacox Oct 16, 2024
b171c4b
Merge branch 'main' of https://github.com/NIH-NCPI/map-dragon into on…
mhigbyflowers Oct 17, 2024
3f3c811
Merge branch 'ontology-filter-search' of https://github.com/NIH-NCPI/…
yelenacox Oct 17, 2024
a902065
Updated .gitignore
yelenacox Oct 17, 2024
3e80ca6
cleaned up .env
yelenacox Oct 17, 2024
91bf1c5
Committing to switch branch
yelenacox Oct 17, 2024
b71723e
Ran git rm -r --cached .
yelenacox Oct 17, 2024
bceb2ae
Merge pull request #116 from NIH-NCPI/ontology-filter-search
yelenacox Oct 17, 2024
f14accb
Committing changes to complete merge
yelenacox Oct 17, 2024
3771f7d
Ontologies with number of results on search page
yelenacox Oct 17, 2024
ba803a8
changed formatting for ontology counts for checkbox display
yelenacox Oct 17, 2024
0c470b2
[FD-1727]showing description in GetMappingsModal MappingRest and Mapp…
mhigbyflowers Oct 18, 2024
d1d0730
Working on updating ontologies for search by checkbox check
yelenacox Oct 18, 2024
afc0d9e
added pagesize select + remembering pagesize to TerminologyList
mhigbyflowers Oct 21, 2024
2c9a1ef
unchecked checkboxes remove ontology from api call
yelenacox Oct 21, 2024
e798b24
null check
mhigbyflowers Oct 21, 2024
a2e5e5f
fixes
mhigbyflowers Oct 21, 2024
43ebdff
Merge pull request #117 from NIH-NCPI/FD-1727/term_desc
mhigbyflowers Oct 21, 2024
1911029
code searching by terminology's filter ontologies
yelenacox Oct 21, 2024
2e5f106
Merge branch 'main' of https://github.com/NIH-NCPI/map-dragon into FD…
mhigbyflowers Oct 21, 2024
8824917
OntologyTable √
mhigbyflowers Oct 21, 2024
3beb65b
tableDetails √
mhigbyflowers Oct 21, 2024
945a800
Terminology √
mhigbyflowers Oct 21, 2024
234fe1e
default ontologies checking by default
yelenacox Oct 22, 2024
fe5ff4c
c2c
mhigbyflowers Oct 22, 2024
11bb27a
user and access the setmapping window from table
mhigbyflowers Oct 22, 2024
d4096f5
user and access the setmapping window from table
mhigbyflowers Oct 22, 2024
eec9f38
all ontologies listed with checkboxes
yelenacox Oct 22, 2024
644225b
Merge pull request #118 from NIH-NCPI/FD-1720/pagination-pagesize
mhigbyflowers Oct 22, 2024
6743206
checkboxes checking and updating apiPreferencesCode
yelenacox Oct 22, 2024
f0f3d9e
adding delete mapping from table
mhigbyflowers Oct 23, 2024
16832f2
adding ant icons
mhigbyflowers Oct 23, 2024
d0be76d
adding styling
mhigbyflowers Oct 23, 2024
7e22997
Get MappingS
mhigbyflowers Oct 23, 2024
7fb589c
updating comment
mhigbyflowers Oct 23, 2024
7624d02
Ontology filter payload for code
yelenacox Oct 23, 2024
1d567fe
sticky nav
mhigbyflowers Oct 23, 2024
04e6b32
Saving preferred ontologies for code
yelenacox Oct 23, 2024
b3c61bc
using pathname for labels
mhigbyflowers Oct 23, 2024
8286622
working breadcrumbs and redirect
mhigbyflowers Oct 24, 2024
953563b
redirects + styles
mhigbyflowers Oct 24, 2024
946e36e
style tweak
mhigbyflowers Oct 24, 2024
4b66f4d
revert style tweak
mhigbyflowers Oct 24, 2024
64ce09a
container style tweaks
mhigbyflowers Oct 24, 2024
78b1077
breadcrumb style tweaks
mhigbyflowers Oct 24, 2024
87aa209
Filter ontologies for terminology codes
yelenacox Oct 24, 2024
ccf1eac
crumb color
mhigbyflowers Oct 24, 2024
810ae2e
adding to terminology
mhigbyflowers Oct 24, 2024
954e277
margins
mhigbyflowers Oct 24, 2024
d431cd0
rm fixed ontology table
mhigbyflowers Oct 24, 2024
a046638
about_container margin
mhigbyflowers Oct 24, 2024
120e237
moved 'no results found' to still display any selected mappings
yelenacox Oct 24, 2024
db26d7b
Styling fix for FilterAPIs to stop results from appearing mid-page
yelenacox Oct 24, 2024
3070bb0
changed labels in nav bar for accuracy
yelenacox Oct 24, 2024
d7ee7c2
modified endpoint in .env
yelenacox Oct 24, 2024
fd63aee
Merge pull request #119 from NIH-NCPI/FD-1729/Update_mapping_GUI
mhigbyflowers Oct 24, 2024
292bc5d
adding /Study/:studyId/DataDictionary/:DDId/Table/:tableId/Terminolo…
mhigbyflowers Oct 24, 2024
5d2bdd4
Merge pull request #120 from NIH-NCPI/FD-1730/breadcrumbs
mhigbyflowers Oct 24, 2024
f81dc80
Merged main with new main
yelenacox Oct 24, 2024
f4822ff
CSS styling for footer and main content
yelenacox Oct 24, 2024
fed7c53
Merge branch 'main' into onto-filter-code/fd-1638
yelenacox Oct 24, 2024
cd0ae9b
Update Terminology.jsx
yelenacox Oct 24, 2024
b667d18
fixed it
mhigbyflowers Oct 24, 2024
2dc6803
Merge pull request #121 from NIH-NCPI/onto-filter-code/fd-1638
yelenacox Oct 24, 2024
88ff118
Search bar for ontologies in OntologyCheckboxes
yelenacox Oct 24, 2024
b40ab4a
Changed 'url' to 'system'
yelenacox Oct 25, 2024
815e680
Merge branch 'onto-search/fd-1739' into url-system/fd-1678
yelenacox Oct 25, 2024
9f2b201
fetching inherited ontology filters from table into terminology
yelenacox Oct 28, 2024
b680490
Showing number of preferred ontologies in api filters button
yelenacox Oct 28, 2024
656b137
Merge pull request #123 from NIH-NCPI/onto-search/fd-1739
yelenacox Oct 29, 2024
7590367
Merge pull request #124 from NIH-NCPI/url-system/fd-1678
yelenacox Oct 29, 2024
d18e9b5
Existing terminology ontology filters checking by default
yelenacox Oct 29, 2024
227302d
Merge branch 'main' into onto-filters-terminology/fd-1768
yelenacox Oct 29, 2024
dc427dc
Ability to select ontology filters for a terminology
yelenacox Oct 29, 2024
43b2ae7
Added 'self' after table for ontology filters POST/PUT
yelenacox Oct 29, 2024
70239d2
committing to change branches
yelenacox Oct 30, 2024
bbfe5a0
Bean work on using terminology ontology filters for mapping search
yelenacox Oct 30, 2024
d658564
[FD-1779] Add deploy_alpha workflow
brendagutman Oct 30, 2024
bb93780
Rolling back backend bug workaround
yelenacox Oct 30, 2024
2c9edc3
Merge pull request #126 from NIH-NCPI/bg/fd_1779
brendagutman Oct 31, 2024
3f57744
Merge pull request #125 from NIH-NCPI/onto-filters-terminology/fd-1768
yelenacox Oct 31, 2024
c3ee2cb
committing to change branches
yelenacox Oct 31, 2024
8d6cc35
Merge branch 'main' into ont-filter-code/fd-1754
yelenacox Oct 31, 2024
413db9e
[FD-1779] Specify branch to deploy prod and alpha
brendagutman Oct 31, 2024
7a78f7a
Ontology filters for terminology codes
yelenacox Oct 31, 2024
d389437
Update deploy_alpha.yml --build-arg ENV=qa
mhigbyflowers Oct 31, 2024
5e50c94
Update package.json "build-alpha": "vite build --mode alpha",
mhigbyflowers Oct 31, 2024
2a9d58e
removed pack-lock
mhigbyflowers Oct 31, 2024
5371d3d
Update package.json QUACK test
mhigbyflowers Oct 31, 2024
99af65d
Update package.json revert qauack
mhigbyflowers Oct 31, 2024
a59ddc7
Update deploy_alpha.yml removed ref release
mhigbyflowers Oct 31, 2024
800992b
Merge pull request #127 from NIH-NCPI/bg/fd_1779
brendagutman Oct 31, 2024
f84a35f
Saving ontologies in MappingSearch
yelenacox Nov 1, 2024
09679f5
Changed entries per page for faster loading time
yelenacox Nov 1, 2024
44ce18e
removed console logs
yelenacox Nov 1, 2024
67e91d7
Merge pull request #128 from NIH-NCPI/ont-filter-code/fd-1754
yelenacox Nov 1, 2024
c8e7ae7
Search bar for selecting ontology filters for a Table/Terminology
yelenacox Nov 1, 2024
da00ecb
Merge pull request #129 from NIH-NCPI/fd-1710/filter-ontology-search
yelenacox Nov 1, 2024
83d4f10
Hover to display code for mapped terms
yelenacox Nov 4, 2024
9f5d552
Loading spinner stays on screen while results set in modal
yelenacox Nov 4, 2024
ce4061c
Changed 'name' to 'short code' for studies
yelenacox Nov 4, 2024
7096753
Merge pull request #130 from NIH-NCPI/fd-1785/hover-code
yelenacox Nov 5, 2024
d9ec0e8
Merge pull request #131 from NIH-NCPI/fd-1753/loading-bug
yelenacox Nov 5, 2024
e92c517
committing to switch branches
yelenacox Nov 5, 2024
8d63787
Merge branch 'main' into fd-1787/ontology-query
yelenacox Nov 5, 2024
402d8c0
Corrected error with original query being search on ontology change
yelenacox Nov 5, 2024
d4f1252
Fixed issue with header not sticking in MappingReset
yelenacox Nov 5, 2024
27b33a8
Merge pull request #132 from NIH-NCPI/fd-1787/ontology-query
yelenacox Nov 5, 2024
9159ac0
Sorting preferred ontologies to the top of ontology display box
yelenacox Nov 5, 2024
1edf669
added dividers to mappings modals
yelenacox Nov 6, 2024
08a34d5
Merge pull request #133 from NIH-NCPI/fd-1758/onto-sorting
yelenacox Nov 6, 2024
e4b59a0
Created about page and added version number to it
yelenacox Nov 6, 2024
f84a293
[FD-1791] Edit workflow dispatch
brendagutman Nov 7, 2024
7849410
[FD-1791] Edit service
brendagutman Nov 7, 2024
0cf9314
[FD-1791] Edit service
brendagutman Nov 7, 2024
4933af5
Added version to about page. Bug fixes for GetMappings button on table
yelenacox Nov 7, 2024
075a8fa
Merge pull request #135 from NIH-NCPI/fd-1737/version
yelenacox Nov 7, 2024
a9bcc32
Started working on pref. terminology functionality in get mappings bu…
yelenacox Nov 7, 2024
370b007
[FD-1791] Update name
brendagutman Nov 7, 2024
fc8066c
Merge pull request #134 from NIH-NCPI/bg/fd_1791
brendagutman Nov 7, 2024
7588d69
committing to change branches
yelenacox Nov 7, 2024
60f3827
Terminology codes inheriting terminology ontology filters
yelenacox Nov 7, 2024
7394f54
Merge pull request #136 from NIH-NCPI/filter-inheritance
yelenacox Nov 7, 2024
643e12a
Added preferred terminology mapping capability to mapping button in t…
yelenacox Nov 8, 2024
b7b1e99
Merge branch 'main' into FD-1792/assign-mappings-button
yelenacox Nov 8, 2024
36f4ffd
Merge pull request #137 from NIH-NCPI/FD-1792/assign-mappings-button
yelenacox Nov 8, 2024
24d2cd2
[FD-1791] Update dispatch workflow
brendagutman Nov 8, 2024
2723b61
[FD-1791] Update checkout in dispatch
brendagutman Nov 8, 2024
2eeb212
[FD-1791] Update dev workflow trigger and version
brendagutman Nov 8, 2024
d113f7d
[FD-1791] Edit url names
brendagutman Nov 8, 2024
cdf472e
Page location in browser tab
yelenacox Nov 8, 2024
54405a3
[FD-1791] Edit version and triggers for uat and prod workflows
brendagutman Nov 8, 2024
953766b
fd-1796 default ontologies used for search when none are specified
yelenacox Nov 8, 2024
7560c3e
Search on tab for mapping search modals
yelenacox Nov 8, 2024
863c8b0
[FD-1791] Exchange qa for uat
brendagutman Nov 8, 2024
25efc06
Merge pull request #139 from NIH-NCPI/fd-1767/browser-tab
yelenacox Nov 11, 2024
b8418d5
FD-1680 -- Preferred Terminology Filtering by Name and System
yelenacox Nov 11, 2024
90de212
login gateing studies teminologies and ontologies
mhigbyflowers Nov 11, 2024
f4163cc
fixing spacing bug
mhigbyflowers Nov 11, 2024
85997e9
Bug not recognizing spaces in enumerated dropdown on var edit
yelenacox Nov 11, 2024
a629854
Merge pull request #140 from NIH-NCPI/fd-1680/pref-terminology-filtering
yelenacox Nov 12, 2024
cb6e028
committing to change branches
yelenacox Nov 12, 2024
8936b0a
Merge branch 'main' into FD-1634/mapping-vote
yelenacox Nov 12, 2024
ef6d90d
committing to go back to main
yelenacox Nov 12, 2024
fed2769
Began work on voting on a mapping
yelenacox Nov 13, 2024
2155c5d
Began work on adding mapping comments
yelenacox Nov 13, 2024
8b7df8e
main routes are protected
mhigbyflowers Nov 14, 2024
bf0bdf1
fixed background issue
mhigbyflowers Nov 14, 2024
d9ff52f
Pagination on history
mhigbyflowers Nov 14, 2024
ef35028
sorting date
mhigbyflowers Nov 14, 2024
5260ee8
Merge pull request #138 from NIH-NCPI/bg/fd_1791
brendagutman Nov 14, 2024
d96237f
Added mapping display to mapping comments
yelenacox Nov 14, 2024
f39e6d1
bread crumbs names corrected
mhigbyflowers Nov 18, 2024
cfc58b8
both pref terminologies and ols search mappings showing up when selected
yelenacox Nov 18, 2024
aac54a9
committing to switch branches
yelenacox Nov 18, 2024
65ca8b9
removed the catigories in breadcrumbs
mhigbyflowers Nov 18, 2024
a9b5f3a
pref term mappings and ols mappings saving
yelenacox Nov 18, 2024
0fbd305
one more splice
mhigbyflowers Nov 18, 2024
6b9ba4a
Merge pull request #144 from NIH-NCPI/mhf/FD-1770
mhigbyflowers Nov 18, 2024
a35771c
Merge branch 'main' into fd-1681/pref-term-edit
yelenacox Nov 19, 2024
9040959
fixed systems match to use ontologyApis
yelenacox Nov 19, 2024
4c041a6
Removed duplicate OLS search from MappingSearch
yelenacox Nov 19, 2024
f84c7e5
fixed backgound
mhigbyflowers Nov 19, 2024
4ea054c
committing to switch branches
yelenacox Nov 19, 2024
849b9d1
Using system from ontologyAPI endpoint
yelenacox Nov 19, 2024
7fa421d
app routes protected
mhigbyflowers Nov 19, 2024
27304a0
Merge pull request #142 from NIH-NCPI/mhf/FD-1759
yelenacox Nov 19, 2024
159899d
Merge pull request #141 from NIH-NCPI/mhf/FD-1709
yelenacox Nov 19, 2024
12c3272
Merge branch 'main' into systems-bug
yelenacox Nov 19, 2024
5a3d42c
Merge pull request #145 from NIH-NCPI/systems-bug
yelenacox Nov 19, 2024
84944cd
adding scrolling
mhigbyflowers Nov 19, 2024
39c13d1
Merge pull request #143 from NIH-NCPI/mhf/FD-1794
mhigbyflowers Nov 19, 2024
149bea9
Preferred terminology or ols search with ontology filters for edit an…
yelenacox Nov 19, 2024
64257f0
Merge pull request #146 from NIH-NCPI/fd-1681/pref-term-edit
yelenacox Nov 19, 2024
001c641
First pass at mapping relationship in GetMappingsModal
yelenacox Nov 25, 2024
9729b0a
Mapping relationships for AssignMappings and AssignMappingsViaButton
yelenacox Nov 26, 2024
349dcc0
First pass at editing mapping quality when viewing exisitng mappings
yelenacox Nov 26, 2024
8208045
Mapping relationship change to dropdown menu on click
yelenacox Nov 27, 2024
7e9081a
Mapping relationship added to MappingSearch & MappingReset
yelenacox Nov 27, 2024
4a05f33
[FD-1830] Edit dispatch deploy for prod
brendagutman Nov 27, 2024
85256f7
Added conditional to display code if there is no mapping display
yelenacox Nov 27, 2024
5719dc7
[FD-1830] Edits for prod
brendagutman Nov 27, 2024
acf0637
added mapping relationship when updating Table mappings
yelenacox Nov 27, 2024
d62ddb0
[FD-1830] Edits for prod
brendagutman Nov 27, 2024
23f6611
[FD-1830] Edits for prod
brendagutman Nov 27, 2024
e822ab7
[FD-1830] Edits for prod
brendagutman Nov 27, 2024
57fdee4
[FD-1830] Edits for prod
brendagutman Nov 27, 2024
3fe0222
[FD-1830] Edits for prod
brendagutman Nov 27, 2024
e873fd2
[FD-1830] Edits for prod
brendagutman Nov 27, 2024
af4decb
Merge pull request #148 from NIH-NCPI/yc/fd-1581
yelenacox Nov 28, 2024
1e835d9
merged main
yelenacox Dec 2, 2024
a497fd9
Merge pull request #149 from NIH-NCPI/bg/fd_1830
brendagutman Dec 3, 2024
b40855c
Posting mapping votes and comments
yelenacox Dec 4, 2024
fd90c01
Combined MappingReset and MappingSearch, changed CSS for mapping votes
yelenacox Dec 5, 2024
48f907e
Quick starting point for Map Dragon Help Site
torstees Dec 5, 2024
e982b2c
Modified .env file
yelenacox Dec 5, 2024
3fbcab2
Merge pull request #150 from NIH-NCPI/docs
torstees Dec 5, 2024
2c4095c
Corrected error with enumeration dropdown display returning path name
yelenacox Dec 5, 2024
f403cf5
Merge branch 'main' of https://github.com/NIH-NCPI/map-dragon into yc…
yelenacox Dec 5, 2024
2db5fb0
removed console log
yelenacox Dec 5, 2024
a0b06b0
Merge pull request #151 from NIH-NCPI/yc/fd-1800-enum-edit-error
yelenacox Dec 6, 2024
298c095
Merge branch 'main' into FD-1634/mapping-vote
yelenacox Dec 6, 2024
8d5a9e4
committing to switch branches
yelenacox Dec 9, 2024
dc4ffe6
Mapping comments updating count after making new comment
yelenacox Dec 9, 2024
6f9bf7d
Merge pull request #152 from NIH-NCPI/FD-1634/mapping-vote
yelenacox Dec 9, 2024
c3c47ac
edit -uat GHA service
brendagutman Dec 10, 2024
ed11ed7
edit
brendagutman Dec 10, 2024
bbeccf3
Add null check to systemsMatch function
yelenacox Dec 17, 2024
c3be0ab
Removing extra "}" causing 404 error
yelenacox Dec 19, 2024
99bfa8f
Merge pull request #160 from NIH-NCPI/systemsMatch-bug-fix
yelenacox Jan 6, 2025
6622ff6
Merge pull request #161 from NIH-NCPI/404-filter-reset
yelenacox Jan 6, 2025
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
26 changes: 16 additions & 10 deletions .github/workflows/deploy_dev.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# This workflow build and push a Docker container to Google Artifact Registry
# and deploy it on Cloud Run when a PR has been approved by a reviewer.
# and deploy it on Cloud Run when a PR to 'main' has been approved by a reviewer.

name: 'Build and Deploy to Cloud Run'
on:
pull_request_review:
branches:
- main
types: [submitted]
types: [submitted, edited] # submitted, reviewer edits the PR (ex comments)

env:

PROJECT_ID: ${{ secrets.PROJECT_ID }}
REGION: ${{ secrets.REGION_LOC_1 }}
SERVICE: 'map-dragon'
SERVICE: 'mapdragon'
IMAGE_NAME: 'map-dragon_img'
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}

Expand All @@ -22,7 +20,8 @@ jobs:
deploy:
runs-on: 'ubuntu-latest'

if: github.event.review.state == 'approved'
# If PR is approved and the PR is for the 'main' branch
if: github.event.review.state == 'approved' && github.event.pull_request.base.ref == 'main'

environment:
name: dev
Expand All @@ -41,11 +40,18 @@ jobs:
with:
credentials_json: '${{ env.GCP_CREDENTIALS }}'

- name: Extract Version from PR Number
id: extract_version
run: |
VERSION=${{ github.event.pull_request.number }}
echo "Extracted Version: ${VERSION}"

- name: Generate .env.dev file
run: |
echo "VITE_CLIENT_ID = ${{ secrets.VITE_CLIENT_ID }}" > .env.dev
echo "VITE_SEARCH_ENDPOINT = ${{ secrets.VITE_SEARCH_ENDPOINT }}" >> .env.dev
echo "VITE_VOCAB_ENDPOINT= ${{ secrets.VITE_VOCAB_ENDPOINT }}" >> .env.dev
echo "VITE_MAPDRAGON_VERSION=${VERSION}" >> .env.dev

- name: 'Docker Auth'
run: |-
Expand All @@ -54,17 +60,17 @@ jobs:
- name: 'Build Docker Image' # New step to build the image

run: |-
DOCKER_TAG="${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/${{ env.IMAGE_NAME }}:${{ github.sha }}"
DOCKER_TAG="${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}-dev/${{ env.IMAGE_NAME }}:${{ github.sha }}"
docker build -t "${DOCKER_TAG}" --build-arg ENV=dev .

- name: 'Push Docker Image'
run: |-
DOCKER_TAG="${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/${{ env.IMAGE_NAME }}:${{ github.sha }}"
DOCKER_TAG="${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}-dev/${{ env.IMAGE_NAME }}:${{ github.sha }}"
docker push "${DOCKER_TAG}"

- name: 'Deploy to Cloud Run'
uses: 'google-github-actions/deploy-cloudrun@v2'
with:
service: '${{ env.SERVICE }}'
service: '${{ env.SERVICE }}-dev'
region: '${{ env.REGION }}'
image: "${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/${{ env.IMAGE_NAME }}:${{ github.sha }}"
image: "${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}-dev/${{ env.IMAGE_NAME }}:${{ github.sha }}"
24 changes: 17 additions & 7 deletions .github/workflows/deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@
name: 'Build and Deploy PROD to Cloud Run'

on:
pull_request:
branches:
- release
types:
- closed
pull_request:
branches:
- release
types: [closed, edited] # PR opened, edited(PR title, etc)

env:

PROJECT_ID: ${{ secrets.PROJECT_ID }}
REGION: ${{ secrets.REGION_LOC_1 }}
SERVICE: 'map-dragon'
SERVICE: 'mapdragon'
IMAGE_NAME: 'map-dragon_img'
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}

Expand All @@ -24,7 +23,8 @@ jobs:
deploy:
runs-on: 'ubuntu-latest'


if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'release'

environment:
name: prod

Expand All @@ -35,17 +35,27 @@ jobs:
steps:
- name: 'Checkout'
uses: 'actions/checkout@v4'
with:
ref: release # release is deployed, not the default or working branch.

- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ env.GCP_CREDENTIALS }}'

- name: Extract Version from PR Title # Assumes PR title contains the tag. ex v0.0.0 or v0.0.0-abc
run: |
VERSION=$(echo "${{ github.event.pull_request.title }}" | grep -o 'v[0-9]\+\.[0-9]\+\.[0-9]\+\(-[a-zA-Z]*\)\?')
echo "Extracted Version: ${VERSION}"

- name: Generate .env.prod file
run: |
echo "VITE_CLIENT_ID = ${{ secrets.VITE_CLIENT_ID }}" > .env.prod
echo "VITE_SEARCH_ENDPOINT = ${{ secrets.VITE_SEARCH_ENDPOINT }}" >> .env.prod
echo "VITE_VOCAB_ENDPOINT= ${{ secrets.VITE_VOCAB_ENDPOINT }}" >> .env.prod
echo "VITE_MAPDRAGON_VERSION=${VERSION}" >> .env.prod

- name: 'Docker Auth'
run: |-
gcloud auth configure-docker '${{ env.REGION }}-docker.pkg.dev'
Expand Down
34 changes: 20 additions & 14 deletions .github/workflows/deploy_qa.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# This workflow build and push a Docker container to Google Artifact Registry
# and deploy it on Cloud Run when a PR to the `release` branch is made.

name: 'Build and Deploy QA to Cloud Run'
name: 'Build and Deploy UAT to Cloud Run'

on:
pull_request:
branches:
- release
types:
- closed
types: [opened, edited, synchronize] # PR opened, edited(PR title, etc), new commits are pushed.


env:

PROJECT_ID: ${{ secrets.PROJECT_ID }}
REGION: ${{ secrets.REGION_LOC_1 }}
SERVICE: 'map-dragon'
SERVICE: 'mapdragon'
IMAGE_NAME: 'map-dragon_img'
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}

Expand All @@ -26,7 +25,7 @@ jobs:
runs-on: 'ubuntu-latest'

environment:
name: qa
name: uat

permissions:
contents: 'read'
Expand All @@ -43,29 +42,36 @@ jobs:
with:
credentials_json: '${{ env.GCP_CREDENTIALS }}'

- name: Generate .env.qa file
- name: Extract Version from PR Title # Assumes PR title contains the tag. ex v0.0.0 or v0.0.0-abc
run: |
echo "VITE_CLIENT_ID = ${{ secrets.VITE_CLIENT_ID }}" > .env.qa
echo "VITE_SEARCH_ENDPOINT = ${{ secrets.VITE_SEARCH_ENDPOINT }}" >> .env.qa
echo "VITE_VOCAB_ENDPOINT= ${{ secrets.VITE_VOCAB_ENDPOINT }}" >> .env.qa
VERSION=$(echo "${{ github.event.pull_request.title }}" | grep -o 'v[0-9]\+\.[0-9]\+\.[0-9]\+\(-[a-zA-Z]*\)\?')
echo "Extracted Version: ${VERSION}"

- name: Generate .env.uat file
run: |
echo "VITE_CLIENT_ID = ${{ secrets.VITE_CLIENT_ID }}" > .env.uat
echo "VITE_SEARCH_ENDPOINT = ${{ secrets.VITE_SEARCH_ENDPOINT }}" >> .env.uat
echo "VITE_VOCAB_ENDPOINT= ${{ secrets.VITE_VOCAB_ENDPOINT }}" >> .env.uat
echo "VITE_MAPDRAGON_VERSION=${VERSION}" >> .env.uat


- name: 'Docker Auth'
run: |-
gcloud auth configure-docker '${{ env.REGION }}-docker.pkg.dev'

- name: 'Build Docker Image' # New step to build the image
run: |-
DOCKER_TAG="${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/${{ env.IMAGE_NAME }}:${{ github.sha }}"
docker build -t "${DOCKER_TAG}" --build-arg ENV=qa .
DOCKER_TAG="${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}-uat/${{ env.IMAGE_NAME }}:${{ github.sha }}"
docker build -t "${DOCKER_TAG}" --build-arg ENV=uat .

- name: 'Push Docker Image'
run: |-
DOCKER_TAG="${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/${{ env.IMAGE_NAME }}:${{ github.sha }}"
DOCKER_TAG="${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}-uat/${{ env.IMAGE_NAME }}:${{ github.sha }}"
docker push "${DOCKER_TAG}"

- name: 'Deploy to Cloud Run'
uses: 'google-github-actions/deploy-cloudrun@v2'
with:
service: '${{ env.SERVICE }}'
service: '${{ env.SERVICE }}-uat'
region: '${{ env.REGION }}'
image: "${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/${{ env.IMAGE_NAME }}:${{ github.sha }}"
image: "${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}-uat/${{ env.IMAGE_NAME }}:${{ github.sha }}"
91 changes: 91 additions & 0 deletions .github/workflows/dispatch_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# This workflow build and push a Docker container to Google Artifact Registry
# and deploy it on Cloud Run when manually triggered.

name: 'Dispatch Deploy'

on:
workflow_dispatch:
inputs:
environment:
description: 'Deployment environment (e.g., dev, uat, prod, alpha)'
required: true
type: string
default: 'dev'
version:
description: 'Optional version for the deployment'
required: true
type: string
default: 'v0.0.0-env'
deploy_branch:
description: 'Branch to deploy to the environment'
required: true
type: string
default: 'main'

env:

PROJECT_ID: ${{ secrets.PROJECT_ID }}
REGION: ${{ secrets.REGION_LOC_1 }}
SERVICE: 'mapdragon'
IMAGE_NAME: 'map-dragon_img'
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}


jobs:

deploy:
runs-on: 'ubuntu-latest'

environment:
name: ${{ github.event.inputs.environment }}

permissions:
contents: 'read'
id-token: 'write'

steps:
- name: 'Checkout'
uses: 'actions/checkout@v4'
with:
ref: ${{ github.event.inputs.deploy_branch }} # This branch is deployed

- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ env.GCP_CREDENTIALS }}'

- name: Generate .env.${{ github.event.inputs.environment }} file
run: |
echo "VITE_CLIENT_ID = ${{ secrets.VITE_CLIENT_ID }}" > .env.${{ github.event.inputs.environment }}
echo "VITE_SEARCH_ENDPOINT = ${{ secrets.VITE_SEARCH_ENDPOINT }}" >> .env.${{ github.event.inputs.environment }}
echo "VITE_VOCAB_ENDPOINT= ${{ secrets.VITE_VOCAB_ENDPOINT }}" >> .env.${{ github.event.inputs.environment }}
echo "VITE_MAPDRAGON_VERSION= ${{ github.event.inputs.version }}" >> .env.${{ github.event.inputs.environment }}
- name: 'Docker Auth'
run: |-
gcloud auth configure-docker '${{ env.REGION }}-docker.pkg.dev'

- name: 'Build Docker Image'
run: |-
if [[ "${{ github.event.inputs.environment }}" == "prod" ]]; then
SERVICE="${{ env.SERVICE }}"
else
SERVICE="${{ env.SERVICE }}-${{ github.event.inputs.environment }}"
fi
DOCKER_TAG="${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${SERVICE}/${{ env.IMAGE_NAME }}:${{ github.sha }}"

echo "DOCKER_TAG=${DOCKER_TAG}" >> $GITHUB_ENV
echo "SERVICE=${SERVICE}" >> $GITHUB_ENV

docker build -t "${DOCKER_TAG}" --build-arg ENV=${{ github.event.inputs.environment }} .

- name: 'Push Docker Image'
run: |-
docker push "${DOCKER_TAG}"

- name: 'Deploy to Cloud Run'
uses: 'google-github-actions/deploy-cloudrun@v2'
with:
service: ${{ env.SERVICE }}
region: '${{ env.REGION }}'
image: ${{ env.DOCKER_TAG }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ dist-ssr

# Environment variables
.env.local
.env.qa
.env.uat
.env.dev
.env
Empty file added docs/.nojekyll
Empty file.
45 changes: 45 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Map Dragon
This application will support several user groups in submitting and validating their data, managing and tracking data definitions, and aligning data to standardized terms.

## Getting Started
### Vite React App

This is a React application bootstrapped with Vite.

### Prerequisites

Make sure you have Node.js and npm installed on your machine.

### Installation

1. Clone the repository:

```sh
git clone git@github.com:NIH-NCPI/map-dragon.git

2. Navigate into the project directory:

```sh
cd map-dragon
3. Install dependencies

```sh
npm i

### Development
1. To start the development server, run:
```sh
npm run dev

### Dependencies
This project utilizes the following dependencies:

+ React: A JavaScript library for building user interfaces
+ Vite: A front-end tooling for web development
+ Ant Design: A design component library
+ Sass: A CSS preprocessor
+ React OAuth2 | Google: A React library for Google OAuth
+ jwt-decode: A JWT decoder
+ Papa Parse: A CSV parser


4 changes: 4 additions & 0 deletions docs/_navbar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* Map Dragon
* [Map Dragon Local Installation Directions](https://github.com/NIH-NCPI/map-dragon)
* File Formats
* [Loading a Data Dictionary](datadictionary.md)
Loading
Loading