diff --git a/buildDocs.sh b/buildDocs.sh index da471265..78315489 100755 --- a/buildDocs.sh +++ b/buildDocs.sh @@ -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' diff --git a/templates/component-tree-diagram.puml.liquid b/templates/component-tree-diagram.puml.liquid new file mode 100644 index 00000000..6bb268c6 --- /dev/null +++ b/templates/component-tree-diagram.puml.liquid @@ -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 diff --git a/templates/mission-conops.adoc.liquid b/templates/mission-conops.adoc.liquid index 3832471f..d7834692 100644 --- a/templates/mission-conops.adoc.liquid +++ b/templates/mission-conops.adoc.liquid @@ -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] +....