WGDashboard icon indicating copy to clipboard operation
WGDashboard copied to clipboard

Big refactor with split of code by functional area

Open theonlynexus opened this issue 2 years ago • 3 comments

WARNING: some of the DB fields have been renamed, thus this is a breaking PR

In this PR, the application has been split into:

  • dashboard.py (browser endpoints)
  • wg.py (Wireguard related functions)
  • db.py (Database related functions)
  • rest_routes.py (REST call endpoints)

I also tried to keep it DRY and simplify code wherever possible. 99% of the changes are in the Python files, a few small changes have been done to templates and Javascript files.

In theory performance should also be improved, as the code was simplified. For example, the configuration is read only once, before each request, instead of being reloaded in a number of different methods.

theonlynexus avatar Jul 20 '22 07:07 theonlynexus

I have forked the project, and I am continuing development at https://github.com/theonlynexus/WGDashboard_2

If and when you have time to pick up development again, I am more than willing to merge the two code-bases again.

theonlynexus avatar Sep 14 '22 07:09 theonlynexus