Development

This commit is contained in:
Matthew Grotke 2026-05-26 00:12:42 -04:00
parent 537de935e9
commit 63ce42278d
2 changed files with 5 additions and 5 deletions

View file

@ -271,7 +271,7 @@ def _timing_status_msg(entry_ts, action_label):
def _build_timing_msg(entry_ts, action_label='Configuration saved'):
if not _apply_changes_immediately():
from markupsafe import Markup
return Markup(f'{action_label}. Visit <strong>Actions</strong> page to apply your changes.')
return Markup(f'{action_label}. Visit the <strong>Actions</strong> page to apply your changes.')
return _timing_status_msg(entry_ts, action_label)

View file

@ -1652,7 +1652,7 @@ def render_layout(view_id, content_html, tokens):
timing = _format_timing(secs)
text = f'{e(o_user)} has pending changes which will be applied {timing}.' if timing else f'{e(o_user)} has pending changes. The processing service is not running.'
cls = 'info-bar-warning'
other_bars += f'<div class="info-bar {cls}" data-apply-uuid="{e(o_uuid)}" data-apply-user="{e(o_user)}">{text}</div>\n'
other_bars += f'<div class="info-bar {cls}" data-apply-uuid="{e(o_uuid)}" data-apply-user="{e(o_user)}"><span>{text}</span></div>\n'
problem_bars = ''
try:
@ -1693,7 +1693,7 @@ def render_layout(view_id, content_html, tokens):
fix_suffix = (f'Fix will be applied {timing}.' if timing
else 'Fix pending. The processing service is not running.')
else:
fix_suffix = 'Fix pending. Visit <strong>Actions</strong> page ASAP to apply fix.'
fix_suffix = 'Fix pending. Visit the <strong>Actions</strong> page ASAP to apply fix.'
for sev, items in grouped.items():
if not items:
continue
@ -1715,7 +1715,7 @@ def render_layout(view_id, content_html, tokens):
pending_bar = ''
if has_pending_alert:
pending_bar = ('<div class="info-bar info-bar-warning">'
'You have actions pending. Please visit <strong>Actions</strong> page.'
'<span>You have actions pending. Please visit the <strong>Actions</strong> page.</span>'
'</div>\n')
return (f'<!DOCTYPE html>\n<html lang="en">\n<head>\n'
@ -2817,7 +2817,7 @@ def _serve_view(view_id):
for category, message in get_flashed_messages(with_categories=True):
variant = {'error': 'danger', 'warning': 'warning', 'success': 'success'}.get(category, 'info')
msg_html = message if isinstance(message, Markup) else e(message)
flash_html += f'<div class="info-bar info-bar-{variant} info-bar-flash">{msg_html}</div>'
flash_html += f'<div class="info-bar info-bar-{variant} info-bar-flash"><span>{msg_html}</span></div>'
content_html = flash_html + render_items(view_def.get('items', []), tokens, view_req)
return render_layout(view_id, content_html, tokens)