Commit 18b132f9 authored by Andrea Ida Malkah Klaura's avatar Andrea Ida Malkah Klaura
Browse files

document dashboard config settings

parent e8741e92
......@@ -33,7 +33,17 @@ npm run e2e
npm test
```
## Configuration of the steering/pv backend
## Configuration
All global configuration settings of the dashboard application can be set in the corresponding `config/*.env.js` files. You can use different settings of a `dev`elopment, a `prod`uction and a `test` environment. So for a productive environment you will have to set all values in `config/prod.env.js`. In then `config/dev.env.js` you can overwrite only those value that differ from those in the production setting.
All values are provided with comments in the `config/prod.env.js`, so you can just take a look there. Here are some important notes on what to set and what to not forget.
Most likely the only values that you will have to set in the `dev.env.js` file different from the `prod.env.js` file are those containing links. Also be aware that these settings become environment variables once compiled by _Vue.js_. Therefore an integer is represented as `'23'` while a string is represented as `'"23"'` in the config file. Sometimes this is important.
For the _OpenID Connect_ settings it is very important to use exactly the same redirect URIs as defined in you OIDC client settings in the _aura/steering_ module. So `API_STEERING_OIDC_REDIRECT_URI` and `API_STEERING_OIDC_REDIRECT_URI_SILENT` should ideally be a copy-paste from there. This can be a nasty debug issue if you don't get the login to work. For example we once had the issue that while the _steering_ used `http://localhost:8080/static/oidc_callback.html` as the parameter for the REDIRECT_URI, the dashboard had configured `http://127.0.0.1:8080/static/oidc_callback.html`. You would expect that this resolves to the same location, but even if `localhost` resolves to `127.0.0.1`, the _OIDC provider_ in the _steering_ module does a string comparison of what it receives from the client and what it has configured.
## Configuration of the steering backend
For the dashboard to run in a dev mode you only need the `npm install` and `npm run dev` commands. To access show data in the show manager you also have to have the [steering/pv module](https://gitlab.servus.at/autoradio/pv) running somewhere. There you need to add the following lines to the `pv/local_settings.py`, in order to allow CORS requests from you dashboard:
......
......@@ -7,18 +7,8 @@ module.exports = merge(prodEnv, {
OIDC_CLIENT_ID: '"174626"',
API_STEERING: '"http://127.0.0.1:8000/api/v1/"',
API_STEERING_SHOWS: '"http://127.0.0.1:8000/api/v1/shows/"',
// OIDC endpoint of the pv/steering module
API_STEERING_OIDC_URI: '"http://localhost:8000/openid"',
// number of seconds before token gets invalid, when renewal should be started
API_STEERING_OIDC_EXPIRE_NOTIFICATION: '120',
// local callback handlers that are called by the pv/steering OIDC module after login/renwal
API_STEERING_OIDC_REDIRECT_URI: '"http://localhost:8080/static/oidc_callback.html"',
API_STEERING_OIDC_REDIRECT_URI_SILENT: '"http://localhost:8080/static/oidc_callback_silentRenew.html"',
API_STEERING_OIDC_REDIRECT_URI_POPUP: '"http://localhost:8080/static/oidc_callback_popupRenew.html"',
// address that is called by the pv/steering OIDC module after logout - should be the dashboard entry point
API_STEERING_OIDC_REDIRECT_URI_POSTLOGOUT: '"http://localhost:8080"',
// how many timeslots should be shown by default (has to be a string)
TIMESLOT_FILTER_DEFAULT_NUMSLOTS: '"10"',
// how many days timeslots should be fetched by default from now (has to be an int)
TIMESLOT_FILTER_DEFAULT_DAYS: '60'
})
'use strict'
module.exports = {
NODE_ENV: '"production"'
NODE_ENV: '"production"',
/*
aura/steering REST API settings
===============================
*/
// These are the REST API endpoints of your aura/steering module
API_STEERING: '"http://YOUR.STEERING.DOMAIN/api/v1/"',
API_STEERING_SHOWS: '"http://YOUR.STEERING.DOMAIN/api/v1/shows/"',
/*
Open ID Connect settings
========================
*/
// Put your OpenID Connect client ID here. You get it in the setup of the aura/steering module.
OIDC_CLIENT_ID: '"174626"',
// OIDC endpoint of the pv/steering module
API_STEERING_OIDC_URI: '"http://YOUR.STEERING.DOMAIN/openid"',
// Number of seconds before token gets invalid, when renewal should be started
API_STEERING_OIDC_EXPIRE_NOTIFICATION: '120',
// Local callback handlers that are called by the aura/steering OIDC module after login/renwal.
// It is important to put exactly the same URI here as it is configured in your OIDC client settings
// in the aura/steering module. Don't mix IPs and DNS names!
API_STEERING_OIDC_REDIRECT_URI: '"http://FINAL.DASHBOARD.DOMAIN/static/oidc_callback.html"',
API_STEERING_OIDC_REDIRECT_URI_SILENT: '"http://FINAL.DASHBOARD.DOMAIN/static/oidc_callback_silentRenew.html"',
// address that is called by the pv/steering OIDC module after logout - should be the dashboard entry point
API_STEERING_OIDC_REDIRECT_URI_POSTLOGOUT: '"http://FINAL.DASHBOARD.DOMAIN"',
/*
Dashboard UI defaults
=====================
*/
// How many timeslots should be shown by default? (has to be a string)
TIMESLOT_FILTER_DEFAULT_NUMSLOTS: '"10"',
// For how many days from now should timeslots be fetched by default? (has to be an int)
TIMESLOT_FILTER_DEFAULT_DAYS: '60'
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment