cleanup(#1014): remove is_manager from ContainerView, add manager_name to StateSnapshot

This commit is contained in:
damocles 2026-06-03 16:24:13 +02:00 committed by mara
commit 6feab54882
3 changed files with 18 additions and 14 deletions

View file

@ -173,6 +173,9 @@ struct StateSnapshot {
/// "apply everything you've buffered".
seq: u64,
hostname: String,
/// The logical name of the manager agent. Lets the dashboard identify
/// the manager container without a separate `is_manager` bool on each row.
manager_name: String,
manager_port: u16,
any_stale: bool,
containers: Vec<ContainerView>,
@ -446,6 +449,7 @@ async fn api_state(headers: HeaderMap, State(state): State<AppState>) -> axum::J
axum::Json(StateSnapshot {
seq,
hostname,
manager_name: MANAGER_NAME.to_owned(),
manager_port: lifecycle::agent_web_port(MANAGER_NAME),
any_stale,
containers,