- Gunak dashboard is React JS application. It provides the reporting functionality by embedding metabase dashboards.
- Metabase is open source software (https://www.metabase.com/) for reporting. Metabase stores the user and report/dashboard definition in its own database. We are using h2 database and version 0.38.2 of metabase.
There are two ways in which one can run Gunak Dashboard application on local environment.
- Production metabase - to do this you require SECRET KEY.
- Local metabase - you can set up metabase server locally.
- You need node version 14.16.*
- Ensure that Make utility is available.
- Run
make deps
to install all JavaScript package dependencies. - Run
make test
to run unit tests. - If you run dashboard with command
make start
it will launch the dashboard application connected to local application server. But you will not be able to run any reports since it connects to reporting server which runs in production. For more see the next point. - Run
make start-with-prod-server
to connect to local application server. When the report is run it would connect to production reporting server.
- You would require a secret key and set its value in your environment variable FA_METABASE_SECRET_KEY on the machine which is running Gunak server.
- Start the server by executing command
make run_server_nhsrc_prod_metabase
. - Launch your dashboard application by running command
make start-with-prod-server
- Install metabase locally by following instructions here (https://www.metabase.com/docs/latest/operations-guide/running-the-metabase-jar-file.html).
- Replace the h2 database file by name metabase.db.mv.db (in the same folder as metabase.jar) from the production metabase dump (keep the same name).
- Start metabase server by using java -jar metabase.jar
- Login to metabase application by connecting to http://localhost:300 and login provided to you.
- Go to http://localhost:/admin/settings/embedding_in_other_applications and create/copy the key.
- Set the key in OS environment variable of gunak server FA_METABASE_SECRET_KEY
- Start the gunak server by executing command
make run_server_nhsrc
- Launch your dashboard application by running command
make start