mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-05-01 18:00:00 -07:00
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.
27 lines
684 B
Rust
27 lines
684 B
Rust
use rayhunter::analysis::analyzer::EventType;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
mod generic_framebuffer;
|
|
|
|
pub mod headless;
|
|
pub mod orbic;
|
|
pub mod tmobile;
|
|
pub mod tplink;
|
|
pub mod tplink_framebuffer;
|
|
pub mod tplink_onebit;
|
|
pub mod uz801;
|
|
pub mod wingtech;
|
|
|
|
#[derive(Clone, Copy, PartialEq, Serialize, Deserialize)]
|
|
pub enum DisplayState {
|
|
/// We're recording but no warning has been found yet.
|
|
Recording,
|
|
/// We're not recording.
|
|
Paused,
|
|
/// A non-informational event has been detected.
|
|
///
|
|
/// Note that EventType::Informational is never sent through this. If it is, it's the same as
|
|
/// Recording
|
|
WarningDetected { event_type: EventType },
|
|
}
|