(ui) Surface storage pressure in dashboard priorities
Move backup root usage, runway, daily new data, and available capacity into the top dashboard priority area so storage risk is visible before deeper trend details. Refs #27
This commit is contained in:
@@ -135,7 +135,7 @@ def _dashboard_action_items(hosts: list[HostConfig]) -> list[dict[str, object]]:
|
||||
"url": _runs_list_url(host=host_config.host, status="warning", review="needed"),
|
||||
}
|
||||
)
|
||||
if host_config.retention_warning.has_warning:
|
||||
if host_config.retention_warning.get("has_warning"):
|
||||
action_items.append(
|
||||
{
|
||||
"host": host_config,
|
||||
@@ -168,15 +168,15 @@ def _dashboard_next_schedule_rows() -> list[dict[str, object]]:
|
||||
|
||||
def _retention_warning_summary(retention_warning) -> str:
|
||||
parts = []
|
||||
if retention_warning.prune_exceeded:
|
||||
if retention_warning.get("prune_exceeded"):
|
||||
parts.append(
|
||||
f"Scheduled prune would delete {retention_warning.delete_count} snapshot(s), "
|
||||
f"above max {retention_warning.max_delete}."
|
||||
f"Scheduled prune would delete {retention_warning.get('delete_count')} snapshot(s), "
|
||||
f"above max {retention_warning.get('max_delete')}."
|
||||
)
|
||||
if retention_warning.incomplete_count:
|
||||
parts.append(f"{retention_warning.incomplete_count} incomplete snapshot(s) need review.")
|
||||
if retention_warning.error:
|
||||
parts.append(str(retention_warning.error))
|
||||
if retention_warning.get("incomplete_count"):
|
||||
parts.append(f"{retention_warning.get('incomplete_count')} incomplete snapshot(s) need review.")
|
||||
if retention_warning.get("error"):
|
||||
parts.append(str(retention_warning.get("error")))
|
||||
return " ".join(parts)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user