diff --git a/docker/routlin-dash/app/factory.py b/docker/routlin-dash/app/factory.py
index 03ceed5..57040e5 100644
--- a/docker/routlin-dash/app/factory.py
+++ b/docker/routlin-dash/app/factory.py
@@ -1528,7 +1528,7 @@ def build_item(item, tokens, inherited_req=None):
# Layout renderer =====================================================
-def render_layout(view_id, content_html, tokens, page_name=None):
+def render_layout(view_id, content_html, tokens, page_name=None, suppress_pending_bar=False):
level = client_level()
has_pending_alert = not config_utils._apply_changes_immediately() and bool(config_utils.get_dashboard_pending())
titlebar_html = f'
{config_utils.WEB_APP_DISPLAY_NAME}
'
@@ -1645,7 +1645,7 @@ def render_layout(view_id, content_html, tokens, page_name=None):
pass
pending_bar = ''
- if has_pending_alert and not problem_bars and view_id != 'actions':
+ if has_pending_alert and not problem_bars and view_id != 'actions' and not suppress_pending_bar:
pending_bar = (
''
'
You have actions pending. Please visit the Actions page.'
diff --git a/docker/routlin-dash/app/main.py b/docker/routlin-dash/app/main.py
index 62835ea..28ce412 100644
--- a/docker/routlin-dash/app/main.py
+++ b/docker/routlin-dash/app/main.py
@@ -106,13 +106,17 @@ def serve_view(page_name):
config_utils.queue_command('gen radius')
flash_html = ''
+ has_success_flash = False
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 factory.e(message)
flash_html += f'
{msg_html}
'
+ if category == 'success':
+ has_success_flash = True
content_html = flash_html + factory.build_items(view_def.get('items', []), tokens, view_req)
- return factory.render_layout(page_name, content_html, tokens, page_name=page_name)
+ return factory.render_layout(page_name, content_html, tokens, page_name=page_name,
+ suppress_pending_bar=has_success_flash)
# Register blueprints =================================================