This error reporting comes in two forms:
- Errors updating the UI
- Errors with user actions
The former is displayed as one error until a refresh succeeds again. The
latter creates an number of persistent errors until they are cleared by
the user.
See https://github.com/EFForg/rayhunter/issues/334
Severity levels low, medium, high are now exposed to the UI in form of
dotted, dashed and solid lines. The line on the UI represents the
highest-so-far severity seen.
Originally this was intended to be represented by Yellow/Orange/Red, but
this would mean yet another divergence for colorblind mode. This is
colorblind-friendly by default (I think...)
As part of this, simplify EventType so that it becomes a flat "level"
enum without nested variants.
There is also a new debug endpoint that allows one to overwrite the
display level directly for testing.
Each event index corresponds to an index in analyzers. But some events
may be null. We're skipping those events without incrementing the index,
leading to wrong analyzer names.
Add a reanalyze button for individual recordings in the analysis dropdown
As part of this, split out ApiRequestButton so that state transitions
(clickable -> loading/disabled -> done) can be shared across start/stop
recording and this new button. Other buttons might benefit from this as
well.
Also fix a broken checkbox while we're here.
Rayhunter uses a mixture of spawn and spawn_blocking, then also does
some blocking operations inside of async code.
Move everything to async. This allows us to use the single-threaded
runtime.
Now the binary is 100kB smaller, and the memory usage also improved by
~100kB on tplink.
Because we toggle some ioctl settings based on this field, change the
name to better capture that we're selecting which device we want to load
settings for, not just the display module to load. This creates room for
future per-device settings without needing more config file fields.