[control] Overview for the UI: who is looking (viewer) and the underlying pause reason, so the UI offers the right action

This commit is contained in:
2026-11-07 23:44:25 +01:00
parent f9dd2247f8
commit aed5fbfcff
3 changed files with 30 additions and 4 deletions
+12
View File
@@ -528,9 +528,21 @@ pub struct Overview {
pub intermediate: Option<super::pki::IntermediateView>,
pub site: Option<SiteView>,
pub paused: Option<Blocked>,
/// Why changes are paused: the underlying code (`apply.needs_attention`, `control.files_unwritten`,
/// `repo.unreadable`, `engine.caddy`, …), so the UI can offer the right action.
pub paused_reason: Option<String>,
/// Set when control cannot read health from edge (`health.unavailable`).
pub health_error: Option<Blocked>,
pub rev: Option<String>,
/// Who is looking: the Authelia user (through edge) or the API token's name.
pub viewer: Option<Viewer>,
}
#[derive(Debug, Clone, Serialize, ToSchema)]
pub struct Viewer {
pub name: String,
/// `authelia` or `token`.
pub via: String,
}
pub fn added_at(c: &Control, hostname: &str) -> Option<String> {