(ui) Improve dashboard host card scanability
Add per-host status chips for queued, running, warning, and failed runs so the dashboard shows operational pressure without needing to open each host. Restructure host cards into clearer backup activity and snapshot health sections, with less visual clutter and better mobile wrapping.
This commit is contained in:
@@ -55,6 +55,14 @@ class ViewTests(TestCase):
|
||||
},
|
||||
},
|
||||
)
|
||||
BackupRun.objects.create(host=host, status=BackupRun.Status.QUEUED)
|
||||
BackupRun.objects.create(host=host, status=BackupRun.Status.RUNNING)
|
||||
BackupRun.objects.create(
|
||||
host=host,
|
||||
run_type=BackupRun.RunType.MANUAL,
|
||||
status=BackupRun.Status.FAILED,
|
||||
started_at=datetime(2026, 5, 19, 1, 15, tzinfo=timezone.utc),
|
||||
)
|
||||
|
||||
response = self.client.get(reverse("dashboard"))
|
||||
|
||||
@@ -70,6 +78,12 @@ class ViewTests(TestCase):
|
||||
self.assertContains(response, "warning")
|
||||
self.assertContains(response, "manual")
|
||||
self.assertContains(response, "scheduled")
|
||||
self.assertContains(response, "Backup activity")
|
||||
self.assertContains(response, "Snapshot health")
|
||||
self.assertContains(response, "queued 1")
|
||||
self.assertContains(response, "running 1")
|
||||
self.assertContains(response, "warning 1")
|
||||
self.assertContains(response, "failed 1")
|
||||
|
||||
def test_dashboard_renders_backup_trend_summary(self) -> None:
|
||||
self.client.force_login(self.staff_user)
|
||||
|
||||
Reference in New Issue
Block a user