atomr-dashboard 0.3.0

Live web UI over a running atomr system — REST + WebSocket + embedded React SPA, Prometheus / OTLP exporters.
1
2
3
4
5
6
7
8
9
10
11
12
//! Distributed-data snapshot.

use axum::extract::State;
use axum::Json;

use atomr_telemetry::dto::DDataSnapshot;

use crate::AppState;

pub async fn get_ddata(State(state): State<AppState>) -> Json<DDataSnapshot> {
    Json(state.telemetry.ddata.snapshot())
}