Skip to content

Refactorize flask webapps to prepare for beacon REST API

Lucas Felix requested to merge webapps-refacto into master

Most changes here are refactoring (detail in each commit) to prepare the addition of a Rest API to the beacon server.

Still there is one visible change from the outside, beacon server has no more --homepage-port and --webapp-port options, but only --web-port which basically regroup both apps on the same server (config page is now located under hostname:<web_port>/config)

In the future, Rest API would also use the same port. Routing would look like this:

  • localhost -> homepage
  • localhost/config -> config page
  • localhost/api -> Rest API root url
    • localhost/api/service/ -> return URLs of different services like the redis databases, supervisor, ...
    • localhost/api/config/ -> read/write/delete/move... config files
    • localhost/api/.../ -> anything else we want to extend the API

Finally, after a transition time, we could merge --port and --web-port into a single option and remove the previous beacon protocol in favor of the Rest API

Merge request reports