Commit Graph

41 Commits

Author SHA1 Message Date
iFargle
2033f80258 Reverting to 0.6.1 2023-05-02 12:25:07 +09:00
Marek Pikuła
fe7a3667d4 Complete the major refactor
Major part of #73

Unfortunately, it wasn't possible to split it to multiple smaller
commits, since the changes touched the entire application substantially.
Here is a short list of major changes:

1. Create a separate library (headscale-api), which is used as a
   convenient abstraction layer providing Pythonic interface with
   Pydantic. Headscale API is fully asynchronous library, benefitting
   from improved concurrency for backend requests thus increasing page
   load speed, e.g., on "Machines" page.
2. Create a common common, validated with flask-pydantic API passthrough
   layer from GUI to the backend.
3. Move authentication to a separate (auth.py), consolidating the
   functionality in a single place (with better place for expansion in
   the future).
4. Move configuration management to a separate module (config.py). Use
   Pydantic's BaseSettings for reading values from environment, with
   extensive validation and error reporting.
5. Reduce the number of health checks.
    - Now, most are performed during server initialization. If any test
      fails, the server is started in tainted mode, with only the error
      page exposed (thus reducing the surface of attack in invalid
      state).
    - Key checks are implicit in the requests to the backend and
      guarded by `@headscale.key_check_guard` decorator.
    - Key renewal is moved to server-side scheduler.
6. Introduce type hints to the level satisfactory for mypy static
   analysis. Also, enable some other linters in CI and add optional
   pre-commit hooks.
7. Properly handle some error states. Instead of returning success and
   handling different responses, if something fails, there is HTTP error
   code and standard response for it.
8. General formatting, small rewrites for clarity and more idiomatic
   Python constructs.

Signed-off-by: Marek Pikuła <marek.pikula@embevity.com>
2023-04-21 06:02:29 +00:00
iFargle
c0e1117355 Testing a routes page 2023-03-23 19:10:22 +09:00
iFargle
3ebf219cdc test 2023-03-22 11:36:27 +09:00
iFargle
af9793f8e1 test 2023-03-22 11:23:20 +09:00
iFargle
15fb90ee5b Remove old materializecss and add search scaffolding 2023-03-22 10:00:57 +09:00
iFargle
fd3bef9be6 test 2023-03-21 22:15:00 +09:00
iFargle
fde28d9537 test 2023-03-21 22:10:44 +09:00
iFargle
dbfeca68e1 test 2023-03-21 22:02:30 +09:00
iFargle
3a7e14f728 test 2023-03-21 21:45:24 +09:00
iFargle
83dfb7698c test 2023-03-21 21:37:51 +09:00
iFargle
dc6800ad0f test 2023-03-21 21:34:39 +09:00
iFargle
7620132b5f test 2023-03-21 21:26:18 +09:00
iFargle
6dce61ef34 test 2023-03-21 21:18:35 +09:00
iFargle
f2d16c0bb8 test 2023-03-21 21:07:15 +09:00
iFargle
038181971d Test 2023-03-21 20:35:12 +09:00
iFargle
04e8fa3de4 test 2023-03-21 20:31:05 +09:00
iFargle
e5b309a9fe testing a different method 2023-03-21 20:23:53 +09:00
iFargle
19b76ebb5c tesat 2023-03-21 19:03:06 +09:00
iFargle
f9c7f063c3 Cleanup template 2023-03-21 18:38:02 +09:00
iFargle
fe835e7315 test 2023-03-21 15:06:27 +09:00
iFargle
81165a136c test 2023-03-21 14:23:02 +09:00
iFargle
6899f55543 add search UI element structure 2023-03-21 13:57:17 +09:00
iFargle
4b6b0533ff Update to latest MaterializeCSS and test dark mode 2023-03-21 13:29:03 +09:00
iFargle
90141dc3fd Update mobile icon 2023-02-24 14:03:16 +09:00
iFargle
86506ea88c Use a clearer machines icon 2023-02-24 13:59:21 +09:00
iFargle
098929555b Center icons 2023-02-24 13:54:40 +09:00
iFargle
cb24daaf6d Remove page names, add tooltips on navbar 2023-02-24 13:48:16 +09:00
iFargle
c49e10da47 Test 2023-02-22 18:24:59 +09:00
iFargle
85dca2c2a0 test 2023-02-22 18:12:41 +09:00
iFargle
82765982c9 Test 2023-02-22 17:43:37 +09:00
iFargle
d44e1bb1ec test 2023-02-22 17:10:21 +09:00
iFargle
7a323afb9e test 2023-02-22 16:50:53 +09:00
iFargle
02fc30c5a4 Test 2023-02-22 16:27:57 +09:00
iFargle
3a6e5dc336 test 2023-02-22 16:04:10 +09:00
iFargle
5232cd358d test 2023-02-19 14:17:52 +09:00
iFargle
1e52494c09 test 2023-02-17 20:58:58 +09:00
iFargle
68d48db1c7 Testing fixes for Treafik and nginx 2023-02-13 20:27:10 +09:00
iFargle
cc0149a855 Try embedding css in template 2023-02-10 20:52:28 +09:00
iFargle
5d3e267d96 Make fonts local 2023-02-10 20:16:53 +09:00
iFargle
b5ea066ca6 Initial commit 2023-02-06 04:58:09 +00:00