Skip to content

Commit

Permalink
add Markup to dashboard to render tables from macros
Browse files Browse the repository at this point in the history
  • Loading branch information
jirivrany committed Nov 3, 2023
1 parent 378c949 commit 289040b
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions flowapp/views/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
make_response,
abort,
)
from markupsafe import Markup
from flowapp import models, validators, flowspec
from flowapp.auth import auth_required
from flowapp.constants import (
Expand Down Expand Up @@ -303,9 +304,9 @@ def create_admin_response(
table_title=table_title,
css_classes=active_css_rstate(rtype, rstate),
count_match=count_match,
dashboard_table_body=dashboard_table_body,
dashboard_table_head=dashboard_table_head,
dashboard_table_foot=dashboard_table_foot,
dashboard_table_body=Markup(dashboard_table_body),
dashboard_table_head=Markup(dashboard_table_head),
dashboard_table_foot=Markup(dashboard_table_foot),
rules_columns=table_columns,
rtype=rtype,
rstate=rstate,
Expand Down Expand Up @@ -408,14 +409,14 @@ def create_user_response(
"pages/dashboard_user.html",
table_title=table_title,
rules_columns=table_columns,
dashboard_table_editable=dashboard_table_editable,
dashboard_table_readonly=dashboard_table_readonly,
dashboard_table_editable=Markup(dashboard_table_editable),
dashboard_table_readonly=Markup(dashboard_table_readonly),
display_editable=display_editable,
display_readonly=display_readonly,
css_classes=active_css_rstate(rtype, rstate),
dashboard_table_editable_head=dashboard_table_editable_head,
dashboard_table_readonly_head=dashboard_table_readonly_head,
dashboard_table_foot=dashboard_table_foot,
dashboard_table_editable_head=Markup(dashboard_table_editable_head),
dashboard_table_readonly_head=Markup(dashboard_table_readonly_head),
dashboard_table_foot=Markup(dashboard_table_foot),
rtype=rtype,
rstate=rstate,
sort_key=sort_key,
Expand Down Expand Up @@ -488,9 +489,9 @@ def create_view_response(
count_match=count_match,
rstate=rstate,
rtype=rtype,
dashboard_table_body=dashboard_table_body,
dashboard_table_head=dashboard_table_head,
dashboard_table_foot=dashboard_table_foot,
dashboard_table_body=Markup(dashboard_table_body),
dashboard_table_head=Markup(dashboard_table_head),
dashboard_table_foot=Markup(dashboard_table_foot),
)
)

Expand Down

0 comments on commit 289040b

Please sign in to comment.