Skip to content

Commit

Permalink
Merge pull request #43 from unity-sds/develop
Browse files Browse the repository at this point in the history
Merging `develop` branch to `main`.
  • Loading branch information
rtapella authored Nov 11, 2024
2 parents 52deb67 + 16e29ba commit 0d6ddf2
Show file tree
Hide file tree
Showing 48 changed files with 1,752 additions and 2,758 deletions.
14 changes: 9 additions & 5 deletions .env/.env
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
# GENERAL
VITE_UNITY_UI_VERSION=${npm_package_version}
VITE_ADMIN_EMAIL=ENV_UNITY_UI_ADMIN_EMAIL
VITE_WWW_DOMAIN=ENV_UNITY_UI_WWW_DOMAIN
VITE_BASE_PATH=ENV_UNITY_UI_BASE_PATH
VITE_PROJECT=ENV_UNITY_UI_PROJECT
VITE_VENUE=ENV_UNITY_UI_VENUE

# Auth
VITE_AUTH_OAUTH_CLIENT_ID=ENV_UNITY_UI_AUTH_OAUTH_CLIENT_ID
#VITE_AUTH_OAUTH_CLIENT_ID=ENV_UNITY_UI_AUTH_OAUTH_CLIENT_ID
VITE_AUTH_OAUTH_REDIRECT_URI=ENV_UNITY_UI_AUTH_OAUTH_REDIRECT_URI
VITE_AUTH_OAUTH_LOGOUT_ENDPOINT=ENV_UNITY_UI_AUTH_OAUTH_LOGOUT_ENDPOINT
VITE_AUTH_OAUTH_PROVIDER_URL=ENV_UNITY_UI_AUTH_OAUTH_PROVIDER_URL
VITE_AUTH_APP_ADMIN_GROUP_NAME=ENV_UNITY_UI_AUTH_APP_ADMIN_GROUP_NAME
VITE_AUTH_APP_APP_VIEWER_GROUP_NAME=ENV_UNITY_UI_AUTH_APP_APP_VIEWER_GROUP_NAME

# CS
VITE_HEALTH_API_ENDPOINT=ENV_UNITY_UI_HEALTH_API_ENDPOINT

# ADS
VITE_ADS_URL=ENV_UNITY_UI_ADS_URL

# DS
VITE_STAC_BROWSER_URL=ENV_UNITY_UI_STAC_BROWSER_URL

# SPS
VITE_SPS_WPST_ENDPOINT=ENV_UNITY_UI_SPS_WPST_ENDPOINT
VITE_SPS_WPST_ENDPOINT=ENV_UNITY_UI_SPS_WPST_ENDPOINTVITE_ADMIN_EMAIL
12 changes: 8 additions & 4 deletions .env/.env.docker.example
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
# GENERAL
ENV_UNITY_UI_ADMIN_EMAIL=REPLACE_WITH_ADMIN_EMAIL
ENV_UNITY_UI_WWW_DOMAIN=REPLACE_WITH_UNITY_DOMAIN_NAME
ENV_UNITY_UI_BASE_PATH=REPLACE_WITH_BASE_PATH
ENV_UNITY_UI_PROJECT=REPLACE_WITH_UNITY_PROJECT_NAME
ENV_UNITY_UI_VENUE=REPLACE_WITH_UNITY_VENUE_NAME

# Auth
ENV_UNITY_UI_AUTH_OAUTH_CLIENT_ID=REPLACE_WITH_COGNITO_USER_POOL_CLIENT_ID
#ENV_UNITY_UI_AUTH_OAUTH_CLIENT_ID=REPLACE_WITH_COGNITO_USER_POOL_CLIENT_ID
ENV_UNITY_UI_AUTH_OAUTH_REDIRECT_URI=REPLACE_WITH_URL_OF_APPLICATION_WITH_PORT_IF_NEEDED
ENV_UNITY_UI_AUTH_OAUTH_LOGOUT_ENDPOINT=REPLACE_WITH_COGNITO_DOMAIN/logout
ENV_UNITY_UI_AUTH_OAUTH_PROVIDER_URL=REPLACE_WITH_COGNITO_DOMAIN/oauth2
ENV_UNITY_UI_AUTH_APP_ADMIN_GROUP_NAME=REPLACE_WITH_USER_POOL_ADMIN_GROUP_NAME
ENV_UNITY_UI_AUTH_APP_APP_VIEWER_GROUP_NAME=REPLACE_WITH_USER_PROOL_VIEWER_GROUP_NAME

# CS
ENV_UNITY_UI_HEALTH_API_ENDPOINT=REPLACE_WITH_HEALTH_API_ENDPOINT_URL

# ADS
ENV_UNITY_UI_ADS_URL=REPLACE_WITH_ADS_URL

# DS
VITE_STAC_BROWSER_URL=REPLACE_WITH_STAC_BROWSER_URL

# SPS
ENV_UNITY_UI_SPS_WPST_ENDPOINT=REPLACE_WITH_ADES_WPST_URL
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.16.0
lts/iron
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,28 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased (0.8.0)
- Added support to report on when health API endpoint is not available in navbar and on health dashboard
- Fixed clickable area of navbar menu items
- Added support to hard code links for projects/venues
- Added health check URL to health dashboard [#40](https://github.com/unity-sds/unity-ui/issues/40)
- Fixed health dashboard column resizer element z-index
- Added cards to homepage [#38](https://github.com/unity-sds/unity-ui/issues/38)

## [0.7.0] 2024-09-27
- Updated node version lts/iron
- Added ability to fetch health information from Health API Endpoint for Health Dashboard
- Removed cognito authentication
- Added authorization via httpd proxy
- Removed unneeded navigation links
- Removed job monitoring and new job features
- Added progress bar to be displayed when health information is being fetched
- Various code cleanup and optimization activities

## [0.6.0] (unreleased)
- Added Health Dashboard using static JSON file containing example health information. [#29](https://github.com/unity-sds/unity-ui/issues/29)
- Updated navbar menu so that it is (partially) dynamic. External UI information is loaded via the Health JSON file. [#20](https://github.com/unity-sds/unity-ui/issues/20)

## [0.5.0] 2024-04-15
- Updated Navbar CSS styling to match Figma designs [#5](https://github.com/unity-sds/unity-ui/issues/5)
- Added CI/CD workflow to build application as a docker image. [#21](https://github.com/unity-sds/unity-ui/issues/21)
Expand Down
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
############################################################
# Code Building Stage

FROM node:lts-hydrogen as builder
FROM node:lts-iron AS builder

RUN apt-get update

Expand All @@ -29,7 +29,7 @@ ENV UNITY_WWW_ROOT=/var/www/unity-ui
ENV ENTRYPOINT_FOLDER=/entrypoint.d

RUN apt-get update \
&& apt-get install -y apache2 \
&& apt-get install -y apache2 libapache2-mod-auth-openidc\
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean

Expand All @@ -38,16 +38,21 @@ WORKDIR ${UNITY_WWW_ROOT}
COPY --from=builder /usr/src/app/dist ./

# Configure apache2
COPY ./etc/apache2/sites-available/unity-ui.conf /etc/apache2/sites-available/
RUN a2enmod headers \
&& a2enmod rewrite \
&& a2enmod setenvif \
&& a2enmod auth_openidc
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
RUN sed -i "s/Listen 80/Listen 8080/g" /etc/apache2/ports.conf
COPY ./etc/apache2/sites-available/unity-ui.conf /etc/apache2/sites-available/
RUN a2dissite 000-default.conf
RUN a2ensite unity-ui.conf

# Copy and set up files needed for container startup
COPY ./entrypoint.d/* ${ENTRYPOINT_FOLDER}/
RUN chmod 777 -R ${ENTRYPOINT_FOLDER}/* && chmod +x -R ${ENTRYPOINT_FOLDER}/*

EXPOSE 80
EXPOSE 8080

# Default process to run on container startup
ENTRYPOINT ["/entrypoint.d/docker-entrypoint.sh"]
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ destroy-image:
kill:
docker kill ${CONTAINER_NAME}

login:
docker exec -it $(CONTAINER_NAME) /bin/bash

run:
docker run --env-file=./.env/.env.docker -t -i --rm -p 8080:80 --name ${CONTAINER_NAME} ${IMAGE_NAME}
docker run --env-file=./.env/.env.docker -t -i --rm -p 8080:8080 --name ${CONTAINER_NAME} ${IMAGE_NAME}

start:
docker start ${CONTAINER_NAME}
Expand Down
9 changes: 8 additions & 1 deletion etc/apache2/sites-available/unity-ui.conf
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
<VirtualHost *:80>
<VirtualHost *:8080>

ServerName localhost
DocumentRoot /var/www/unity-ui/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

SetEnvIf oidc_access_token ^(.*)$ OIDC_ACCESS_TOKEN=$1
SetEnvIf oidc_claim_username ^(.*)$ OIDC_CLAIM_USERNAME=$1
SetEnvIf oidc_claim_email ^(.*)$ OIDC_CLAIM_EMAIL=$1
Header add Set-Cookie oidc_access_token=%{OIDC_ACCESS_TOKEN}e;Domain=${ENV_UNITY_UI_WWW_DOMAIN};Path=/;SameSite=strict;
Header add Set-Cookie oidc_claim_username=%{OIDC_CLAIM_USERNAME}e;Domain=${ENV_UNITY_UI_WWW_DOMAIN};Path=/;SameSite=strict;
Header add Set-Cookie oidc_claim_email=%{OIDC_CLAIM_EMAIL}e;Domain=${ENV_UNITY_UI_WWW_DOMAIN};Path=/;SameSite=strict;

<Directory /var/www/unity-ui/>
Options -Indexes
AllowOverride All
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
window.EventEmitter = EventEmitter;
</script>
<script type="module">
import "/src/styles/variables.scss";
import "/src/styles/styles.scss";
</script>

</head>
Expand Down
Loading

0 comments on commit 0d6ddf2

Please sign in to comment.