Current Implementation
Currently, you can save your configurations by clicking the Download
button in the implementor tools. which downloads a .json
file into your downloads directory. However, these changes only exist in your dev environment.
Desired Behaviour
There is need to introduce a feature that will allow users to save their local configurations to the server using our implementer tools. This means that any changes made in the implementer tools will be applied to all users, instead of only being kept on a personal computer.
Ref: [O3-310] Application-writable config.json file in frontends/ - OpenMRS Issues
Initial suggestion
- Create a
config.json
file that the application is allowed to manage. This should be stored in the application home directory. - Create a REST endpoint
PUT /frontend/config
in themodule-spa
that sets the value of the createdconfig.json
. - Serve the
config.json
file along with everything else in thefrontend
files. - Create a button in the Implementer Tools that sends a PUT request to the
/frontend/config
endpoint with the updated configuration settings.
Idea evaluation
From yesterday’s coffee-break meeting, there a lot of questions that were raised about the ideal solution for this requirement with regards to the desired location of the config.json
because different implementations desire to store there configs in different locations due to different implementations methodologies.
This thread is to ideally ensure that the resolution satisfies all implementations.