(ui) Add dashboard operational status summary
Make queued, running, warning, and failed run states more visible at the top of the dashboard with contextual status summaries and highlighted summary metrics. Also show an all-clear message when configured hosts have no active or problematic runs.
This commit is contained in:
@@ -84,6 +84,11 @@ class ViewTests(TestCase):
|
||||
self.assertContains(response, "running 1")
|
||||
self.assertContains(response, "warning 1")
|
||||
self.assertContains(response, "failed 1")
|
||||
self.assertContains(response, "Operational Status")
|
||||
self.assertContains(response, "1 failed run needs review.")
|
||||
self.assertContains(response, "1 run completed with warnings.")
|
||||
self.assertContains(response, "1 backup run in progress.")
|
||||
self.assertContains(response, "1 backup run waiting for the worker.")
|
||||
|
||||
def test_dashboard_renders_backup_trend_summary(self) -> None:
|
||||
self.client.force_login(self.staff_user)
|
||||
@@ -148,6 +153,17 @@ class ViewTests(TestCase):
|
||||
self.assertContains(response, "No completed backup runs with stats yet.")
|
||||
self.assertContains(response, "growth estimates")
|
||||
|
||||
def test_dashboard_shows_all_clear_operational_status(self) -> None:
|
||||
self.client.force_login(self.staff_user)
|
||||
GlobalConfig.objects.create(name="default", backup_root="/opt/pobsync/backups")
|
||||
HostConfig.objects.create(host="web-01", address="web-01.example.test")
|
||||
|
||||
response = self.client.get(reverse("dashboard"))
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertContains(response, "Operational Status")
|
||||
self.assertContains(response, "No queued, running, warning, or failed runs.")
|
||||
|
||||
def test_dashboard_surfaces_retention_warnings(self) -> None:
|
||||
self.client.force_login(self.staff_user)
|
||||
host = HostConfig.objects.create(
|
||||
|
||||
Reference in New Issue
Block a user