e-mission / nrel-openpath-deploy-configs

Configurations for current OpenPATH deployments, published for transparency
BSD 3-Clause "New" or "Revised" License
2 stars 9 forks source link

Admin Dashboard Dynamic Config #12

Closed AlirezaRa94 closed 1 year ago

AlirezaRa94 commented 1 year ago

Hi @shankari,

This is the way that I have implemented dynamic config. The dashboard loads the JSON file and reads the permissions for each part of the dashboard.

If this is not OK, can you please explain more about your expectations?

shankari commented 1 year ago

@AlirezaRa94

as we discussed today, there should not be one admin dashboard file. The admin dashboard will not be configured in the same way for all the deployments. Instead, the admin dashboard flags should be added to the existing config files (e.g. to any of the files in https://github.com/e-mission/nrel-openpath-deploy-configs/tree/main/configs)

And then the admin dashboard should read the appropriate config for the deployment and apply the flags/permissions from it.

Again, the admin dashboard should not read a single, static file because then we cannot have different configurations for different deployments.

Again, we have handled this in both python and javascript in the public dashboard; you should be able to use at least one of them as a template for your work.