per-source polling, initial client state, webhook, preview, client tracking
- per-source poll intervals: spawn task per source with own interval,
manager re-checks sources every 30s for add/remove
- initial screen update on TCP connect: send layout + widget states
- client tracking: ClientRegistry port, GET /api/clients, dashboard list
- webhook adapter: POST /api/webhook/{source_id} feeds data into projection
- widget preview: GET /api/widgets/{id}/preview returns current state
- serve SPA from Axum: ServeDir + index.html fallback via KFRAME_SPA_DIR
- layout builder delete confirmation with AlertDialog
- form validation: required fields disable save button
- guide page at /guide
- fix architecture: ClientDto to api-types, ClientRegistry + WidgetStateReader
ports in domain, DataProjection has internal Mutex, no adapter cross-deps
- ESP32: full screen clear on layout change (stale pixel fix)
This commit is contained in:
17
crates/api-types/src/client.rs
Normal file
17
crates/api-types/src/client.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
use domain::ConnectedClient;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct ClientDto {
|
||||
pub addr: String,
|
||||
pub connected_at: u64,
|
||||
}
|
||||
|
||||
impl From<&ConnectedClient> for ClientDto {
|
||||
fn from(c: &ConnectedClient) -> Self {
|
||||
Self {
|
||||
addr: c.addr.clone(),
|
||||
connected_at: c.connected_at,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
pub mod client;
|
||||
pub mod data_source;
|
||||
pub mod layout;
|
||||
pub mod preset;
|
||||
pub mod widget;
|
||||
|
||||
pub use client::ClientDto;
|
||||
pub use data_source::DataSourceDto;
|
||||
pub use layout::{LayoutChildDto, LayoutDto, LayoutNodeDto, SizingDto};
|
||||
pub use preset::{CreatePresetDto, PresetDto};
|
||||
|
||||
Reference in New Issue
Block a user