Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions client/nginx-start/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ echo "window.RUNTIME_REACT_APP_SSO_CLIENT='${REACT_APP_SSO_CLIENT}';" >> $JS_PAT
echo "window.RUNTIME_REACT_APP_API_HOST='${REACT_APP_API_HOST}';" >> $JS_PATH
echo "window.RUNTIME_REACT_APP_DWPBI_URL='${REACT_APP_DWPBI_URL}';" >> $JS_PATH
echo "window.RUNTIME_OPENSHIFT_BUILD_COMMIT='${OPENSHIFT_BUILD_COMMIT}';" >> $JS_PATH
echo "window.RUNTIME_APP_VERSION='${APP_VERSION}';" >> $JS_PATH

echo "---> Creating nginx.conf ..."
envsubst '${ENVIRONMENT}' < /tmp/src/nginx.conf.tmpl > /etc/nginx/nginx.conf
1 change: 1 addition & 0 deletions client/src/js/Constants.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const RUNTIME_OPENSHIFT_BUILD_COMMIT = window.RUNTIME_OPENSHIFT_BUILD_COMMIT ?? '';
export const RUNTIME_APP_VERSION = window.RUNTIME_APP_VERSION ?? '';

Check warning on line 2 in client/src/js/Constants.js

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Prefer `globalThis` over `window`.

See more on https://sonarcloud.io/project/issues?id=bcgov_crt&issues=AZ8AhefBkJxGi-tUWb__&open=AZ8AhefBkJxGi-tUWb__&pullRequest=553

export const API_URL = window.RUNTIME_REACT_APP_API_HOST
? `${window.location.protocol}//${window.RUNTIME_REACT_APP_API_HOST}/api`
Expand Down
11 changes: 10 additions & 1 deletion client/src/js/components/fragments/Footer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
import React from 'react';

import * as Constants from '../../Constants';

const Footer = () => {
return <footer className="footer"></footer>;
const displayVersion =
Constants.RUNTIME_APP_VERSION || Constants.RUNTIME_OPENSHIFT_BUILD_COMMIT || 'Version unavailable';

return (
<footer className="footer text-center small text-muted py-1">
<div>Version: {displayVersion}</div>
</footer>
);
};

export default Footer;
Loading