fix(ui): keep device details open across identity changes

This commit is contained in:
lda committed 2026-10-12 23:59:23 +07:00 Verified
1 parent 4eef8c758f
commit 4e290e6de8
12 files changed
+324 -32

No files matched your search

@@ -216,6 +216,20 @@ mod tests {
.unwrap();
assert_eq!(listed.len(), 1000);
assert!(listed.iter().all(|row| row.device_key != "pc-1000"));
{
use axum::extract::Path;
let details =
super::super::get_fleet_device(State(state.clone()), Path("pc-1000".into()))
.await
.unwrap()
.into_response();
assert_eq!(details.status(), StatusCode::OK);
let body = axum::body::to_bytes(details.into_body(), usize::MAX)
.await
.unwrap();
let row: serde_json::Value = serde_json::from_slice(&body).unwrap();
assert_eq!(row["device_key"], "pc-1000");
}
for route_id in [None, Some("valid")] {
let selected = load_selected_route(&state, "pc-1000", route_id)
.await