From 7eae567e6c65ea04490a0a1c0cb5d459893af04f Mon Sep 17 00:00:00 2001 From: Matthew Grotke Date: Tue, 26 May 2026 01:32:46 -0400 Subject: [PATCH] Development --- docker/routlin-dash/app/view_page.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docker/routlin-dash/app/view_page.py b/docker/routlin-dash/app/view_page.py index 87be6a0..09be4e1 100644 --- a/docker/routlin-dash/app/view_page.py +++ b/docker/routlin-dash/app/view_page.py @@ -591,7 +591,9 @@ def collect_tokens(): tokens['GENERAL_DAILY_EXECUTE_TIME'] = str(dns_blk_gen.get('daily_execute_time_24hr_local', '-')) tokens['GENERAL_APPLY_ON_SAVE'] = 'true' if session.get('apply_changes_immediately', False) else 'false' - pending_items = get_dashboard_pending() + all_snaps = load_all_snapshots() + _snap_uuid_set = {s.get('uuid') for s in all_snaps} + pending_items = get_dashboard_pending() if pending_items: # Group by command; each group = one row in the Pending Actions table. from collections import defaultdict @@ -601,18 +603,19 @@ def collect_tokens(): rows = '' for cmd, entries in groups.items(): users = ', '.join(sorted({u for _, u in entries if u and u != 'unknown'})) - if cmd == 'fix problems': - req_cell = '-' - else: + snap_uuids = [_uuid for _uuid, _ in entries if _uuid in _snap_uuid_set] + if snap_uuids: req_tags = ''.join( f'' f'{_uuid[:8]}' f'{_uuid[:8]}' f'{_uuid[:8]}' f'' - for _uuid, _ in entries + for _uuid in snap_uuids ) req_cell = f'
{req_tags}
' + else: + req_cell = '-' rows += (f'' f'{e(cmd)}' f'{e(users)}' @@ -633,7 +636,6 @@ def collect_tokens(): tokens['PENDING_ACTIONS_HTML'] = pending_html tokens['NO_PENDING'] = 'true' if not pending_items else '' - all_snaps = load_all_snapshots() done_ts_map = get_done_timestamps() if all_snaps: # UUIDs that cannot be reverted: revert entries themselves, and entries