Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate component tree diagram #169

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions buildDocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ docker run --rm --volume "$PWD:/src" -w "/src" capsulecorplab/asciidoctor-extend
# generate use-case-diagrams.puml from liquid template
docker run --rm --volume "$PWD:/src" -w "/src" capsulecorplab/asciidoctor-extended:asciidocsy-nodejs 'node m30mlTools/generateDoc.js --unifiedModel=dist/architecture.yaml --template=templates/use-case-diagram.puml.liquid --out=dist/use-case-diagram.puml'

# generate component-tree-diagram.puml from liquid template
docker run --rm --volume "$PWD:/src" -w "/src" capsulecorplab/asciidoctor-extended:asciidocsy-nodejs 'node m30mlTools/generateDoc.js --unifiedModel=dist/component.yaml --template=templates/component-tree-diagram.puml.liquid --out=dist/component-tree-diagram.puml'

# generate mission-conops.adoc from liquid template
docker run --rm --volume "$PWD:/src" -w "/src" capsulecorplab/asciidoctor-extended:asciidocsy-nodejs 'node m30mlTools/generateDoc.js --unifiedModel=dist/architecture.yaml --template=templates/mission-conops.adoc.liquid --out=dist/mission-conops.adoc'

Expand Down
34 changes: 34 additions & 0 deletions templates/component-tree-diagram.puml.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@startuml
skinparam linetype polyline

/'
left to right direction
skinparam linetype ortho
'/

frame "{{architecture.description}} Component Tree Diagram" {

{% for component_hash in architecture.components %}
{% for component in component_hash %}
{% if component.description %}
["{{component.description}}"]
{% for subsystem_hash in component.components %}
{% for subsystem in subsystem_hash %}
{% if subsystem.description %}
["{{component.description}}"] +-- ["{{subsystem.description}}"]
{% for subsystemcomponent_hash in subsystem.components %}
{% for subsystemcomponent in subsystemcomponent_hash %}
{% if subsystemcomponent.description %}
["{{subsystem.description}}"] +-- ["{{subsystemcomponent.description}}"]
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}

}
@enduml
9 changes: 9 additions & 0 deletions templates/mission-conops.adoc.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,12 @@ a|{% for reference in field.derivedFrom %}
{% endif %}

{% endfor %}

== System Model

=== Component Tree Diagram

[plantuml, component-tree-diagram, svg]
....
include::./component-tree-diagram.puml[User Stories as Use Case Diagram]
....