Dashboard cards, backup last-seen
This commit is contained in:
@@ -344,3 +344,19 @@ def _diffprojections(old, new):
|
||||
'aftertype': None if after is None else after[0],
|
||||
})
|
||||
return changes
|
||||
|
||||
|
||||
@backups_bp.route('/dashboard/stale', methods=['GET'])
|
||||
@jwt_required()
|
||||
@require_permission('backups.view')
|
||||
def dashboard_stale():
|
||||
"""Chains whose backup has stopped running.
|
||||
|
||||
Thin: the rule lives in services/staleness.py, where it is testable without
|
||||
an auth layer in the way. Keyed on the last CONFIRMED check, never on the
|
||||
last change - dedup means an unchanged config writes no revision, so a card
|
||||
keyed on revision age would flag most of a healthy fleet.
|
||||
"""
|
||||
from ..services.staleness import stalechains
|
||||
|
||||
return success_response(stalechains())
|
||||
|
||||
Reference in New Issue
Block a user