Surface baseline maintenance status in the dashboard
Retention and per-field value capping already ran automatically every poll cycle, but the dashboard showed only a single "DB size" line — no visibility into what got deleted, which fields are hitting the max-values-per-field cap, or whether disk space is reclaimable, without SSHing in. baseline.py's maintenance() now also reports the specific (stream, entity, field) rows it trimmed for exceeding the cap, surfaced in a new Baseline Maintenance dashboard panel alongside size/reclaimable bytes and rows deleted last cycle. Deliberately no live-vacuum button: VACUUM needs the service stopped first, so the dashboard only shows when it's worth doing and points at the existing offline CLI command. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -109,6 +109,12 @@ class DashboardTests(unittest.TestCase):
|
||||
self.assertIn("Detector Health", HTML)
|
||||
self.assertIn("detector_health", HTML)
|
||||
|
||||
def test_dashboard_shows_baseline_maintenance(self):
|
||||
self.assertIn("baseline-maintenance", HTML)
|
||||
self.assertIn("Baseline Maintenance", HTML)
|
||||
self.assertIn("high_cardinality_fields", HTML)
|
||||
self.assertIn("baseline-maintenance --vacuum", HTML)
|
||||
|
||||
def test_review_actions_carry_detector_for_precision_tracking(self):
|
||||
self.assertIn('data-detector="${esc(r.detector', HTML)
|
||||
self.assertIn("detector: button.dataset.detector", HTML)
|
||||
|
||||
Reference in New Issue
Block a user