[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:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user