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

Creating Release for UI #283

Merged
merged 89 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
4cdb443
feat: Update analytics configuration and review current analytics events
frostyfan109 Jun 8, 2023
a05a539
feat: Upgrade analytics version
frostyfan109 Jun 16, 2023
e2f8074
feat: Add no results text when search has no results. Fix error messa…
frostyfan109 Jun 16, 2023
3601902
feat: Add count indicator to studies/cdes in result modal. Add bounci…
frostyfan109 Jun 16, 2023
1044a2e
fix: Code style fix
frostyfan109 Jun 16, 2023
69f3e6c
feat: Add study/cde loading indicators to concept card tabs
frostyfan109 Jun 27, 2023
a2c9667
fix: Remove manifest.json for now. This file is used for installing S…
frostyfan109 Jun 29, 2023
9fc85f3
fix: Readd manifest.json and remove meta reference in index file
frostyfan109 Jun 29, 2023
bfa4f33
feat: Add dynamic title/description meta tags
frostyfan109 Jun 30, 2023
b0d5904
fix: Some minor fixes
frostyfan109 Jul 7, 2023
dc33a53
fix: Fix meta titles/descriptions in development builds
frostyfan109 Jul 7, 2023
65befd6
feat: Use env.json meta.title to configure page (tab) title final seg…
frostyfan109 Jul 7, 2023
f99cfa8
fix: Fix hot module reloading for CSS files
frostyfan109 Jul 7, 2023
729be5e
feat: Add collapsible button to variable view histogram for more scre…
frostyfan109 Jul 7, 2023
ef19e0f
Remove High & Medium level vulnerabilities at image level
Jul 20, 2023
3adb55e
Merge branch 'develop' into feature/dug-0.9-ui
frostyfan109 Jul 21, 2023
86f1867
Merge pull request #262 from helxplatform/remove-CVEs
frostyfan109 Jul 21, 2023
c92a2b7
Updated REACT_APP_HELX_SEARCH_URL (should have /search-api suffix).
gaurav Jul 21, 2023
181b300
Merge pull request #263 from helxplatform/feature/dug-0.9-ui
frostyfan109 Jul 21, 2023
febd639
Remove packages with CVEs
Jul 24, 2023
62a28b7
fix: Fix double requests in concept search method and fix small bug w…
frostyfan109 Jul 24, 2023
2dbf601
fix: Fix bug where if cde loading errors, it shows them as loading in…
frostyfan109 Jul 24, 2023
1f509a8
feat: Dug search result explanation tab
frostyfan109 Jul 25, 2023
f38c85d
Update base image
Aug 2, 2023
82f1b39
change the nginx image to a slimmer version
Aug 3, 2023
574ae77
Merge pull request #264 from helxplatform/remove-CVEs
frostyfan109 Aug 8, 2023
d852364
feat: Change concept types to use API parameters. Fix highlighter bug…
frostyfan109 Aug 10, 2023
b030418
feat: Remove x of y pages from result header
frostyfan109 Aug 10, 2023
63383ff
Merge pull request #265 from helxplatform/feature/dug-1.0-ui
YaphetKG Aug 15, 2023
1adc5b1
fix: Add back missing packages to Docker image
frostyfan109 Aug 15, 2023
9e8b904
fix: Remove cat
frostyfan109 Aug 15, 2023
ae64e52
Merge pull request #266 from helxplatform/fix/dockerfile-bash
frostyfan109 Aug 15, 2023
dc8dd1c
feat: Fix variable view no results. Change variable view to display s…
frostyfan109 Sep 1, 2023
e6399ed
fix: Add no related concepts text back into cdes modal tab
frostyfan109 Sep 1, 2023
be28594
Merge pull request #268 from helxplatform/fix/variable-view-no-results
YaphetKG Sep 1, 2023
f94cc42
Added a HEAL Support section to the support page.
gaurav Sep 1, 2023
10ded92
Added a flag to REACT_APP_HIDDEN_SUPPORT_SECTIONS so it can be toggled.
gaurav Sep 1, 2023
85d2d84
Replaced HEAL support URL with bit.ly.
gaurav Sep 1, 2023
2613cbd
Merge pull request #269 from helxplatform/update-support-page
gaurav Sep 1, 2023
65c6351
feat: use context.meta.title in footer and mobile menu header
mbwatson Aug 31, 2023
323be6d
Merge branch 'develop' of https://github.com/helxplatform/helx-ui int…
Hoid Sep 7, 2023
c0728a8
fix: Add longer footer and mobile drawer for heal
Hoid Sep 8, 2023
14690a8
fix: Add target="_blank" to links
Hoid Sep 13, 2023
088372d
Merge pull request #270 from helxplatform/feature/debranding
Hoid Sep 13, 2023
f6c1c6c
BREAKING CHANGE: change image to run as non-root
pj-linebaugh Sep 15, 2023
3e0891e
First stab at removing counts from concept modal.
gaurav Sep 15, 2023
11d9c02
Added rel="noreferrer" as per lint.
gaurav Sep 15, 2023
2f25391
lint removed trailing semicolon.
gaurav Sep 15, 2023
9d7c642
Merge branch 'develop' of https://github.com/helxplatform/helx-ui int…
frostyfan109 Sep 18, 2023
31d8f23
Update layout.js
YaphetKG Sep 18, 2023
63d4df8
Update mobile-menu.js
YaphetKG Sep 18, 2023
92c9183
Fix rel on target _blank links
frostyfan109 Sep 18, 2023
dc6a2b1
Remove blank layout
frostyfan109 Sep 18, 2023
489e164
Adding new events in to variable view and study/variable links
frostyfan109 Sep 18, 2023
5d7f4b8
Add variable/study link click events, cde events
frostyfan109 Sep 18, 2023
d169bd1
Bump font size up on heal-support component
frostyfan109 Sep 18, 2023
d4deb77
Add support page events. Bump font size in support section.
frostyfan109 Sep 18, 2023
c930a66
Add search type (concept vs variable view) event, add biolink filter …
frostyfan109 Sep 18, 2023
4220a4a
Update package-lock
frostyfan109 Sep 18, 2023
47450a7
Merge pull request #273 from helxplatform/feature/analytics
frostyfan109 Sep 18, 2023
6f04972
Updated dockerfile to be more verbose, adding helxui user and group
joshua-seals Sep 18, 2023
3b4d744
Adding bash back
joshua-seals Sep 18, 2023
3584151
BREAKING CHANGE: set /usr/share/nginx perms for gid=0
pj-linebaugh Sep 19, 2023
cab96c9
BREAKING CHANGE: remove other changes
pj-linebaugh Sep 19, 2023
d049f76
First stab at adding updated HEAL support links.
gaurav Sep 19, 2023
1f5782a
Merge pull request #274 from helxplatform/update-user-guide-and-faqs-…
gaurav Sep 19, 2023
5cf8174
Merge branch 'develop' into remove-counts-from-modal
YaphetKG Sep 19, 2023
b302673
Restored "NIH" to footer.
gaurav Sep 19, 2023
fc1054c
Merge pull request #272 from helxplatform/remove-counts-from-modal
YaphetKG Sep 19, 2023
dac88de
Add support for custom branded favicons
frostyfan109 Sep 19, 2023
0a7ef4e
Fix syntax problem
frostyfan109 Sep 19, 2023
e087803
Fix another ejs syntax error
frostyfan109 Sep 19, 2023
f0d90e9
Merge pull request #275 from helxplatform/feature/favicon-branding
frostyfan109 Sep 20, 2023
2054c67
fix: remove unneeded build script
pj-linebaugh Sep 26, 2023
2498bc8
Merge pull request #276 from helxplatform/non-root
pj-linebaugh Sep 26, 2023
c0f69ae
Alter readiness check to use the is_ready API endpoint instead of
waTeim Oct 10, 2023
746b238
feature: refactor to use getAppReady and re-implement that function t…
waTeim Oct 12, 2023
2c956ad
remove try-catch from getAppReady; catch exceptions elsewhere
waTeim Oct 12, 2023
68c49f6
Merge pull request #278 from helxplatform/ready_status
frostyfan109 Oct 13, 2023
af66a8c
BUG: adjust workspace tablist to avoid jyttery effect on Windows
Oct 16, 2023
2556b8f
ENH: removing buildx
Oct 25, 2023
aaec369
Update build-push-dev-image.yml
joshua-seals Oct 25, 2023
7ea334c
Merge pull request #279 from helxplatform/bug-solve-jitteryness
hina-shah Oct 25, 2023
0ea61a4
Fix bug in activity monitor for removed apps
frostyfan109 Oct 25, 2023
7ef07ed
Merge pull request #281 from helxplatform/fix/activity-monitor-remove…
frostyfan109 Oct 25, 2023
ab0a76d
Add extra constraint to fully fix bug hopefully
frostyfan109 Oct 25, 2023
3c912cd
Actually fix bug
frostyfan109 Oct 25, 2023
faebc23
Merge pull request #282 from helxplatform/fix/activity-monitor-remove…
frostyfan109 Oct 25, 2023
bf96146
BREAKING CHANGE: BREAKING: changes for UI, use readiness probe in k8s
pj-linebaugh Oct 26, 2023
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
6 changes: 3 additions & 3 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ REACT_APP_WORKSPACES_ENABLED=false
# Enable when working with Dug
REACT_APP_SEMANTIC_SEARCH_ENABLED='true'
# Points the app to the Dug API
REACT_APP_HELX_SEARCH_URL='https:\/\/heal-dev.apps.renci.org'
REACT_APP_HELX_SEARCH_URL='https:\/\/heal-dev.apps.renci.org\/search-api'
# Only necessary if working with analytics specifically.
# Should be a project token/GA property. Make sure to configure details
# in env.json
Expand All @@ -12,11 +12,11 @@ REACT_APP_ANALYTICS=''
REACT_APP_TRANQL_URL='https:\/\/heal-dev.apps.renci.org\/tranql\/'
# Brand setting. <braini, catalyst, heal, scidas, eduhelx, helx>
REACT_APP_UI_BRAND_NAME='catalyst'
# Hide support page sections if necessary. <'community', 'documentation'>. Comma-delimited string, e.g. "community,documentation"
# Hide support page sections if necessary. <'community', 'documentation', 'heal-support'>. Comma-delimited string, e.g. "community,documentation"
REACT_APP_HIDDEN_SUPPORT_SECTIONS=''
# Hide tabs in the result modal/cards. <'overview', 'studies', 'cdes', 'kgs', 'tranql', 'robokop'>. Comma-delimited string, e.g. "tranql,robokop"
REACT_APP_HIDDEN_RESULT_TABS=''
# Some static assets such as app logo are loaded externally from the dockstore repository (helx-apps).
REACT_APP_DOCKSTORE_BRANCH=master
# Some static assets such as brand logo are loaded externally from the Appstore repository.
REACT_APP_APPSTORE_ASSET_BRANCH=master
REACT_APP_APPSTORE_ASSET_BRANCH=master
40 changes: 19 additions & 21 deletions .github/workflows/build-push-dev-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,25 @@ jobs:
run: echo ${{ steps.vars.outputs.short_sha }}

# https://github.com/marketplace/actions/git-semantic-version
- name: Semver Check
uses: paulhatch/[email protected]
id: version
with:
# The prefix to use to identify tags
tag_prefix: "v"
# A string which, if present in a git commit, indicates that a change represents a
# major (breaking) change, supports regular expressions wrapped with '/'
major_pattern: "/breaking:|major:/"
# A string which indicates the flags used by the `major_pattern` regular expression. Supported flags: idgs
major_regexp_flags: "ig"
# Same as above except indicating a minor change, supports regular expressions wrapped with '/'
minor_pattern: "/feat:|feature:|minor:/"
# A string which indicates the flags used by the `minor_pattern` regular expression. Supported flags: idgs
minor_regexp_flags: "ig"
# A string to determine the format of the version output
# version_format: "${major}.${minor}.${patch}-prerelease${increment}"
version_format: "${major}.${minor}.${patch}-prerelease${increment}"
search_commit_body: false
# - name: Semver Check
# uses: paulhatch/[email protected]
# id: version
# with:
# # The prefix to use to identify tags
# tag_prefix: "v"
# # A string which, if present in a git commit, indicates that a change represents a
# # major (breaking) change, supports regular expressions wrapped with '/'
# major_pattern: "/breaking:|major:/"
# # A string which indicates the flags used by the `major_pattern` regular expression. Supported flags: idgs
# major_regexp_flags: "ig"
# # Same as above except indicating a minor change, supports regular expressions wrapped with '/'
# minor_pattern: "/feat:|feature:|minor:/"
# # A string which indicates the flags used by the `minor_pattern` regular expression. Supported flags: idgs
# minor_regexp_flags: "ig"
# # A string to determine the format of the version output
# # version_format: "${major}.${minor}.${patch}-prerelease${increment}"
# version_format: "${major}.${minor}.${patch}-prerelease${increment}"
# search_commit_body: false

# Docker Buildx is important to caching in the Build And Push Container
# step
Expand Down Expand Up @@ -102,8 +102,6 @@ jobs:
tags: |
${{ github.repository }}:develop
${{ github.repository }}:${{ steps.vars.outputs.short_sha }}
${{ github.repository }}:v${{ steps.version.outputs.version }}
containers.renci.org/${{ github.repository }}:v${{ steps.version.outputs.version }}
containers.renci.org/${{ github.repository }}:develop
containers.renci.org/${{ github.repository }}:${{ steps.vars.outputs.short_sha }}
cache-from: type=registry,ref=${{ github.repository }}:buildcache
Expand Down
20 changes: 14 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
###################
# Build environment
###################
FROM node:18.16-alpine AS builder
FROM node:lts-bullseye-slim AS builder
Copy link
Contributor

Choose a reason for hiding this comment

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

I think using versions is better so that we know for sure what image tag was used.


ARG REACT_APP_WORKSPACES_ENABLED=true
ENV REACT_APP_WORKSPACES_ENABLED=$REACT_APP_WORKSPACES_ENABLED

# Copy and install requirements
WORKDIR /usr/src/app
COPY --chown=node:node "package*.json" /usr/src/app/
RUN npm i -g npm@latest
RUN npm ci
RUN npm install -g npm@latest
RUN npm clean-install

COPY --chown=node:node . /usr/src/app
RUN npm run build
Expand All @@ -19,15 +19,23 @@ RUN npm run build
# Production environment
########################

FROM nginx:latest
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
FROM nginx:1.25.1-alpine-slim
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY --from=builder /usr/src/app/build/ /usr/share/nginx/static/
RUN mv /usr/share/nginx/static/frontend/index.html /usr/share/nginx/html/
# RUN mv /usr/share/nginx/static/frontend/index.html /usr/share/nginx/html/

RUN apk upgrade
RUN apk add bash

WORKDIR /usr/src/app
COPY bin /usr/src/app/bin
ENV PATH="/usr/src/app/bin:${PATH}"

# Allow GID=0 to modify files/dirs. Mainly for OpenShift but can be used
# elsewhere.
RUN chgrp -R 0 /usr/share/nginx && \
chmod -R g=u /usr/share/nginx

EXPOSE 80
CMD ["start_server", "/usr/share/nginx/static/frontend/env.json"]
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
SHELL := /bin/bash
BRANCH_NAME := $(shell git branch --show-current | sed -r 's/[/]+/_/g')
override VERSION := ${BRANCH_NAME}-${VER}
DOCKER_ORG := helxplatform
#DOCKER_ORG := helxplatform
DOCKER_ORG := containers.renci.org/helxplatform
DOCKER_TAG := helx-ui:${VERSION}
BUILD_PATH := ./build/frontend
TYCHO_BRANCH := develop
Expand Down Expand Up @@ -31,7 +32,7 @@ build.npm:
build.image:
if [ -z "$(VER)" ]; then echo "Please provide a value for the VER variable like this:"; echo "make VER=4 build.image"; false; fi;
echo "Building docker image: $(DOCKER_TAG)"
docker build . --no-cache --pull -t $(DOCKER_ORG)/$(DOCKER_TAG)
docker build --platform=linux/amd64 . --no-cache --pull -t $(DOCKER_ORG)/$(DOCKER_TAG)

#build: build project and image
build: build.npm build.image
Expand Down
19 changes: 19 additions & 0 deletions bin/create_index
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

if [ -z "$1" ]
then
echo "Usage: create_index /path/to/build"
exit 1
fi

title="${META_TITLE:-HeLx UI}"
description="${META_DESCRIPTION:-HeLx UI}"
brand_name="${REACT_APP_UI_BRAND_NAME}"
appstore_asset_branch="${REACT_APP_APPSTORE_ASSET_BRANCH}"

cat "$1/index_template.html" | sed \
-e "s/%META_TITLE%/$title/" \
-e "s/%META_DESCRIPTION%/$description/" \
-e "s/%BRAND%/$brand_name/" \
-e "s/%APPSTORE_ASSET_BRANCH%/$appstore_asset_branch/" \
> $1/index.html
27 changes: 18 additions & 9 deletions bin/populate_env
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ search_enabled="${REACT_APP_SEMANTIC_SEARCH_ENABLED:-true}"
search_url="${REACT_APP_HELX_SEARCH_URL}"
brand_name="${REACT_APP_UI_BRAND_NAME}"
tranql_url="${REACT_APP_TRANQL_URL:-\/tranql}"
analytics="${REACT_APP_ANALYTICS:-}"
hidden_support_sections="${REACT_APP_HIDDEN_SUPPORT_SECTIONS}"
hidden_result_tabs="${REACT_APP_HIDDEN_RESULT_TABS}"
deployment_namespace="${REACT_APP_DEPLOYMENT_NAMESPACE}"
appstore_asset_branch="${REACT_APP_APPSTORE_ASSET_BRANCH}"
analytics_enabled="${REACT_APP_ANALYTICS_ENABLED:-false}"
analytics_platform="${REACT_APP_ANALYTICS_PLATFORM}"
analytics_token="${REACT_APP_ANALYTICS_TOKEN}"
meta_title="${META_TITLE:-HeLx UI}"
meta_description="${META_DESCRIPTION:-HeLx UI}"


template='{
Expand All @@ -26,17 +30,18 @@ template='{
"workspaces_enabled": "%WORKSPACES_ENABLED%",
"tranql_url": "%TRANQL_URL%",
"analytics": {
"enabled": true,
"platform": "mixpanel",
"auth": {
"mixpanel_token": "%ANALYTICS%",
"ga_property": ""
}
"enabled": %ANALYTICS_ENABLED%,
"platform": "%ANALYTICS_PLATFORM%",
"token": "%ANALYTICS_TOKEN%"
},
"hidden_support_sections": "%HIDDEN_SUPPORT_SECTIONS%",
"hidden_result_tabs": "%HIDDEN_RESULT_TABS%",
"deployment_namespace": "%DEPLOYMENT_NAMESPACE%",
"appstore_asset_branch": "%APPSTORE_ASSET_BRANCH%"
"appstore_asset_branch": "%APPSTORE_ASSET_BRANCH%",
"meta": {
"title": "%META_TITLE%",
"description": "%META_DESCRIPTION%"
}
}'

echo "$template" | sed \
Expand All @@ -46,8 +51,12 @@ echo "$template" | sed \
-e "s/%BRAND%/$brand_name/" \
-e "s/%HIDDEN_SUPPORT_SECTIONS%/$hidden_support_sections/" \
-e "s/%HIDDEN_RESULT_TABS%/$hidden_result_tabs/" \
-e "s/%ANALYTICS%/$analytics/" \
-e "s/%TRANQL_URL%/$tranql_url/" \
-e "s/%DEPLOYMENT_NAMESPACE%/$deployment_namespace/" \
-e "s/%APPSTORE_ASSET_BRANCH%/$appstore_asset_branch/" \
-e "s/%ANALYTICS_ENABLED%/$analytics_enabled/" \
-e "s/%ANALYTICS_PLATFORM%/$analytics_platform/" \
-e "s/%ANALYTICS_TOKEN%/$analytics_token/" \
-e "s/%META_TITLE%/$meta_title/" \
-e "s/%META_DESCRIPTION%/$meta_description/" \
> $1
7 changes: 7 additions & 0 deletions bin/start_server
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@ if [ -z "$1" ]
echo "Usage: start_server /path/to/output/env.json"
exit 1
fi

# Create env.json file
populate_env $1
# Generate the index.html file
create_index /usr/share/nginx/static/frontend
# Move into nginx html folder
mv /usr/share/nginx/static/frontend/index.html /usr/share/nginx/html/

nginx -g "daemon off;"
22 changes: 22 additions & 0 deletions nginx/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
server {
listen 8080 default_server;
listen [::]:8080 default_server;

server_name _;
root /usr/share/nginx/html;
index index.html index.htm;

charset UTF-8;

location /static/ {
root /usr/share/nginx/;
}

location / {
try_files $uri /index.html;
}

# access_log off;
# log_not_found off;
# error_log /var/log/nginx/error.log error;
}
61 changes: 40 additions & 21 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,22 +1,41 @@
server {
listen 80 default_server;
listen [::]:80 default_server;

server_name _;
root /usr/share/nginx/html;
index index.html index.htm;

charset UTF-8;

location /static/ {
root /usr/share/nginx/;
}

location / {
try_files $uri /index.html;
}

# access_log off;
# log_not_found off;
# error_log /var/log/nginx/error.log error;
# /etc/nginx/nginx.conf

user nginx;
worker_processes auto;

error_log /var/log/nginx/error.log notice;
# pid /var/run/nginx.pid;
pid /tmp/nginx.pid;


events {
worker_connections 1024;
}


http {
# added to run as non-root
client_body_temp_path /tmp/client_temp;
proxy_temp_path /tmp/proxy_temp_path;
fastcgi_temp_path /tmp/fastcgi_temp;
uwsgi_temp_path /tmp/uwsgi_temp;
scgi_temp_path /tmp/scgi_temp;

include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

keepalive_timeout 65;

#gzip on;

include /etc/nginx/conf.d/*.conf;
}
27 changes: 11 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading