feat: restyle admin UI and add per-user sync run history
Adds a self-hosted stylesheet (no CDN dependencies) with a card-based dashboard and color-coded status badges, and shows the last 10 sync runs per user on the detail page.
This commit is contained in:
@@ -204,6 +204,16 @@ class SyncRunRepository:
|
||||
def get(self, sync_run_id: int) -> SyncRun | None:
|
||||
return self.session.get(SyncRun, sync_run_id)
|
||||
|
||||
def list_recent_for_user(self, user_id: int, limit: int = 10) -> list[SyncRun]:
|
||||
return list(
|
||||
self.session.scalars(
|
||||
select(SyncRun)
|
||||
.where(SyncRun.user_id == user_id)
|
||||
.order_by(SyncRun.started_at.desc())
|
||||
.limit(limit)
|
||||
)
|
||||
)
|
||||
|
||||
def finish(
|
||||
self,
|
||||
sync_run_id: int,
|
||||
|
||||
Reference in New Issue
Block a user