Skip to content

Commit

Permalink
Merge branch 'main' into IVS-24_Blank_Validator_Page_Issue_69
Browse files Browse the repository at this point in the history
  • Loading branch information
civilx64 authored Jul 14, 2024
2 parents 8a8cc3d + 9d3a16f commit b4a144a
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 26 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# .dockerignore file for docker compose
**/.env
**/.dev
**/.ssh
**/.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# variables in Docker Compose
VERSION = 0.6.4
VERSION = 0.6.5
DEBUG = True
ENV = Development
PUBLIC_URL = http://localhost
Expand Down
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
VERSION=v0.6.4

none:
@echo ERROR: Enter at least one target (start, start-load-balanced, start-full, start-infra-only, stop, build, rebuild, clean, fetch-modules)

Expand Down Expand Up @@ -36,18 +34,22 @@ rebuild: clean

rebuild-frontend:
docker stop frontend || true
docker rmi --force buildingsmart/validationsvc-frontend:${VERSION}
docker rmi --force $$(docker images -q 'buildingsmart/validationsvc-frontend' | uniq) || true
docker compose build

rebuild-backend:
docker stop backend || true
docker stop worker || true
docker rmi --force buildingsmart/validationsvc-backend:${VERSION}
docker rmi --force $$(docker images -q 'buildingsmart/validationsvc-backend' | uniq) || true
docker compose build

clean:
docker compose down
docker image prune --force
docker stop backend || true
docker stop worker || true
docker stop frontend || true
docker rmi --force $$(docker images -q 'buildingsmart/validationsvc-frontend' | uniq) || true
docker rmi --force $$(docker images -q 'buildingsmart/validationsvc-backend' | uniq) || true
docker image prune --all --force --filter=label=org.opencontainers.image.vendor="buildingSMART.org"
docker system prune --all --force --volumes --filter=label=org.opencontainers.image.vendor="buildingSMART.org"

fetch-modules:
Expand Down
2 changes: 1 addition & 1 deletion backend/.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# 4) host environment variables
# 5) default value in code

VERSION = 0.6.4
VERSION = 0.6.5
DEBUG = True
ENV = Development
PUBLIC_URL = http://localhost:3000
Expand Down
4 changes: 1 addition & 3 deletions docker/frontend/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ README.md

dist
node_modules
build

.env
build
1 change: 1 addition & 0 deletions docker/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ COPY ./frontend/src ./src
COPY ./frontend/public ./public
COPY ./frontend/package* ./
COPY ./frontend/.env.* ./
COPY ./frontend/.env ./

# build React app
RUN npm install && \
Expand Down
1 change: 1 addition & 0 deletions frontend/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_VERSION=$npm_package_version
8 changes: 4 additions & 4 deletions frontend/package-lock.json

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

7 changes: 5 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"name": "ui",
"version": "0.6.4",
"name": "bsi-valsvc-ui",
"description": "WebUI of the bSI Validation Service",
"version": "0.6.5",
"author": "buildingSMART International Ltd.",
"license": "MIT",
"private": true,
"dependencies": {
"@emotion/react": "^11.10.5",
Expand Down
7 changes: 4 additions & 3 deletions frontend/src/Footer.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import {PageContext} from './Page';
import { useContext } from 'react';
import { VERSION } from './environment';

import { PageContext } from './Page';
import { useContext } from 'react';

function Footer(){
const context = useContext(PageContext);

const style = {padding:'4px', textAlign:'center'};
return (
<div style={style}>
<span>{context["environment"]} - Version 0.6.4 | Copyright © 2024 buildingSMART All Rights Reserved | <a href="https://www.buildingsmart.org/wp-content/uploads/2018/05/PrivacyandCookiePolicyV2.pdf" target="_blank" rel="noopener">Privacy and Cookie Statement</a>&nbsp;| <a href="https://www.buildingsmart.org/wp-content/uploads/2021/09/20210923_TermsOfService.pdf" target="_blank" rel="noopener">Terms and Conditions</a>&nbsp;|</span>
<span>{context["environment"]} - Version {VERSION} | Copyright © {new Date().getFullYear()} buildingSMART All Rights Reserved | <a href="https://www.buildingsmart.org/wp-content/uploads/2018/05/PrivacyandCookiePolicyV2.pdf" target="_blank" rel="noopener">Privacy and Cookie Statement</a>&nbsp;| <a href="https://www.buildingsmart.org/wp-content/uploads/2021/09/20210923_TermsOfService.pdf" target="_blank" rel="noopener">Terms and Conditions</a>&nbsp;|</span>
{context["pageTitle"] === "report" &&<div> This validation report is generated by bSI Validation Service based on the input IFC model | bSI assumes no responsability or liability for the content of this report</div>}
</div>
)
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/SideMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import HomeIcon from '@mui/icons-material/Home';
import CheckIcon from '@mui/icons-material/Check';
import Divider from '@mui/material/Divider';

import { VERSION } from './environment';

import { PageContext } from './Page';
import { useContext } from 'react';

Expand Down Expand Up @@ -48,7 +50,7 @@ export default function SideMenu() {
<Divider />
<ListItem key={"test"} disablePadding>
<ListItemButton>
<ListItemText style={{ textAlign: 'center' }} primary={`${context["environment"]} v0.6.4`} />
<ListItemText style={{ textAlign: 'center' }} primary={`${context["environment"]} v${VERSION}`} />
</ListItemButton>
</ListItem>
</List>
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/environment.js
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
export const FETCH_PATH = process.env.REACT_APP_FETCH_PATH;
export const FETCH_PATH = process.env.REACT_APP_FETCH_PATH;
export const VERSION = process.env.REACT_APP_VERSION;
export const PUBLIC_URL = process.env.PUBLIC_URL;
export const NODE_ENV = process.env.NODE_ENV;
9 changes: 6 additions & 3 deletions frontend/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ import Logout from './Logout';
import Report from './Report';
import Page from './Page';

import { FETCH_PATH, VERSION, PUBLIC_URL, NODE_ENV } from './environment';

import reportWebVitals from './reportWebVitals';
import { BrowserRouter, Routes, Route } from "react-router-dom";

console.log('REACT_APP_FETCH_PATH', process.env.REACT_APP_FETCH_PATH)
console.log('PUBLIC_URL', process.env.PUBLIC_URL)
console.log('NODE_ENV', process.env.NODE_ENV)
console.log('REACT_APP_VERSION', VERSION)
console.log('REACT_APP_FETCH_PATH', FETCH_PATH)
console.log('PUBLIC_URL', PUBLIC_URL)
console.log('NODE_ENV', NODE_ENV)

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
Expand Down

0 comments on commit b4a144a

Please sign in to comment.