0.36.0: per-stack image-update indicator on the Stacks overview

Shows an amber "Update" pill next to a stack's status (and highlights the
inline Update button) when any of the stack's images has a newer digest in
the registry. Reuses the existing background image-update check — a new
update_service.stacks_update_summary() reads the cached digests in a single
container sweep (no extra registry calls), exposed as GET /api/stacks/updates
and proxied per agent at GET /api/agents/{id}/stacks/updates. The Stacks page
and each remote-host section poll it every 60s.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
menzelj
2026-06-16 18:52:51 +00:00
co-authored by Claude Opus 4.8
parent a4b1bbcdd1
commit cd15cdc75e
12 changed files with 115 additions and 9 deletions
+8 -1
View File
@@ -27,7 +27,7 @@ from models.setting import (
)
from models.auto_update import AutoUpdateRead, AutoUpdateWrite
from models.user import User
from services import audit_service, auto_update_service, compose_service, notify_service, stats_service
from services import audit_service, auto_update_service, compose_service, notify_service, stats_service, update_service
from services.convert_service import convert_docker_run
router = APIRouter(prefix="/api/stacks", tags=["stacks"])
@@ -144,6 +144,13 @@ def stacks_stats(_user: User = Depends(get_current_user)) -> dict:
return stats_service.stack_stats()
@router.get("/updates")
def stacks_updates(_user: User = Depends(get_current_user)) -> dict:
"""Per-stack image-update availability, read from the cached registry
digests (no live registry calls — safe for the list to poll)."""
return update_service.stacks_update_summary()
@router.get("/{stack_id}")
def get_stack(
stack_id: str,