Skip to content

Commit

Permalink
help link #334
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjrobins committed Jan 15, 2024
1 parent 7c1fbd6 commit c4f3fd6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ The configuration of the production application is stored in the `.env.prod` fil
- `SECRET_KEY`: a large random string used for cryptographic signing
- `DATABASE_URL`: URL of a postgres database (e.g. postgres://username:password@postgres:5432/postgres). Note that any special characters in the password must be url-encoded. E.g. `postgres://user:p#ssword!@localhost/foobar` should be written as `postgres://user:p%23ssword!@localhost/foobar`.

and should instead be passed as:



- `RABBITMQ_DEFAULT_USER`: username for rabbitmq server (optional)
- `RABBITMQ_DEFAULT_PASS`: password for rabbitmq server (optional)

Expand All @@ -58,6 +54,10 @@ For search/bind, connecting to the LDAP server either anonymously or with a fixe
- `AUTH_LDAP_USER_GROUP`: (optional) authentication will only succeed if user is in this LDAP group (e.g. `cn=user,ou=groups,dc=example,dc=com`). If not set, then any user in the search base will be authenticated.
- `AUTH_LDAP_ADMIN_GROUP`: (optional) user must be in this LDAP group to be a superuser (e.g. `cn=admin,ou=groups,dc=example,dc=com`). If not set, then no user will be a superuser.

There are also a number of optional variables that can be set:
- `REACT_APP_ROCHE`: set to true to enable Roche branding
- `REACT_APP_HELP_URL`: url of help page shown on login


### SSL Certificate

Expand All @@ -82,6 +82,8 @@ To add tutorial videos to the application, you will need to create a csv file wi

This file should be placed in the `pkpdapp/static/` directory and named `tutorial_videos.csv`.

To link to an external help page url, set the `REACT_APP_HELP_URL` variable in the `.env.prod` file to the url of the help page.

### Containers

The application is deployed using docker containers and docker-compose, so you will need to install these.
Expand Down
5 changes: 5 additions & 0 deletions frontend-v2/src/features/login/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ interface LoginProps {
errorMessage?: string;
}

const { REACT_APP_HELP_URL } = process.env;

const Login: React.FC<LoginProps> = ({ onLogin, isLoading, errorMessage }) => {
const { handleSubmit, control } = useForm<LoginFormInputs>();

Expand All @@ -37,6 +39,9 @@ const Login: React.FC<LoginProps> = ({ onLogin, isLoading, errorMessage }) => {
<CssBaseline />
<form onSubmit={handleSubmit(onSubmit)}>
<Stack spacing={2} sx={{ marginTop: 10 }}>
{ REACT_APP_HELP_URL &&
<Typography variant="caption">To get access to pkpd explorer and for other details please consult the <a href={REACT_APP_HELP_URL}>help page</a></Typography>
}
<Box display="flex" justifyContent="center" alignItems="center">
<Typography
variant="h3"
Expand Down

0 comments on commit c4f3fd6

Please sign in to comment.