Skip to content

Commit

Permalink
fix mermaid
Browse files Browse the repository at this point in the history
  • Loading branch information
haidaraM committed Mar 23, 2024
1 parent 25c3ab1 commit c1dfc9a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ansibleplaybookgrapher/renderer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def render(
:param hide_empty_plays: Whether to hide empty plays or not when rendering the graph
:param hide_plays_without_roles: Whether to hide plays without any roles or not
:param kwargs:
:return: The filename of the rendered file
:return: The path of the rendered file
"""
pass

Expand Down
9 changes: 7 additions & 2 deletions ansibleplaybookgrapher/renderer/graphviz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,13 @@ def render(
**kwargs,
) -> str:
"""
:param hide_plays_without_roles:
:return: The filename where the playbooks where rendered
:param open_protocol_handler: The protocol handler name to use
:param open_protocol_custom_formats: The custom formats to use when the protocol handler is set to custom
:param output_filename: The output filename without any extension
:param view: Whether to open the rendered file in the default viewer
:param hide_empty_plays: Whether to hide empty plays or not when rendering the graph
:param hide_plays_without_roles: Whether to hide plays without any roles or not
:return: The path of the rendered file
"""
save_dot_file = kwargs.get("save_dot_file", False)

Expand Down
7 changes: 5 additions & 2 deletions ansibleplaybookgrapher/renderer/mermaid.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,14 @@ def render(
) -> str:
"""
:param hide_plays_without_roles:
:param open_protocol_handler: Not supported for the moment
:param open_protocol_custom_formats: Not supported for the moment
:param output_filename: The output filename without any extension
:param view: Not supported for the moment
:param hide_empty_plays: Whether to hide empty plays or not when rendering the graph
:param hide_plays_without_roles: Whether to hide plays without any roles or not
:param directive: Mermaid directive
:param orientation: Mermaid graph orientation
:param kwargs:
:return:
"""
Expand Down Expand Up @@ -95,7 +97,8 @@ def render(
)

mermaid_code += playbook_builder.build_playbook(
hide_empty_plays=hide_empty_plays
hide_empty_plays=hide_empty_plays,
hide_plays_without_roles=hide_plays_without_roles
)
link_order = playbook_builder.link_order
roles_built.update(playbook_builder.roles_built)
Expand Down

0 comments on commit c1dfc9a

Please sign in to comment.