Skip to content

Commit

Permalink
adapt puml styling (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
milesstoetzner authored Sep 4, 2024
1 parent 35b51af commit 9390da2
Show file tree
Hide file tree
Showing 6 changed files with 150 additions and 120 deletions.
247 changes: 135 additions & 112 deletions docs/docs/variability4tosca/rules/index.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/assets/templates/puml/topology/artifact.template.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ file "<%= puml.toText(artifact) %>" as <%= puml.toId(artifact) %>
<% if(puml.hasLink(artifact)) {-%>
url of <%= puml.toId(artifact) %> is [[ <%= puml.getLink(artifact) %> ]]
<% } -%>
<%= puml.toId(artifact) %> - <%= puml.toId(artifact.container) %>
<%= puml.toId(artifact) %> . <%= puml.toId(artifact.container) %>
6 changes: 5 additions & 1 deletion src/assets/templates/puml/topology/node.template.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
rectangle "<%= puml.toText(node) %>" as <%= puml.toId(node) -%><%= puml.isAsterisk(node) ? ' #line.dashed' : '' -%>
<% if (puml.isAsterisk(node)) { -%>
rectangle "..." as <%= puml.toId(node) -%> #white;line.dotted -%>
<% } else { -%>
rectangle "<%= puml.toText(node) %>" as <%= puml.toId(node) -%>
<% } -%>

<% if(puml.hasLink(node)) {-%>
url of <%= puml.toId(node) %> is [[ <%= puml.getLink(node) %> ]]
Expand Down
1 change: 1 addition & 0 deletions src/assets/templates/puml/topology/template.template.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ skinparam ArrowThickness 1.5
skinparam file {
BorderColor black
BorderThickness 1.5
BackgroundColor white
}

skinparam interface {
Expand Down
9 changes: 5 additions & 4 deletions tasks/docs/generate/rules/template.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@ We assess the deployment quality of the following scenarios.
### Scenario #<%= index + 1 %>
A node template whose node type is or is derived from the node type <%= link(group.component) -%>
In this scenario, the node template "component" of node type <%= link(group.component) -%> is deployed.
<% if (group.artifact) { -%>
and which has an artifact whose artifact type is or is derived from <%= link(group.artifact) -%>,
This node template is implemented by its deployment artifact "artifact" of artifact type <%= link(group.artifact) -%>.
<% } -%>
<% if (group.hosting.length !== 0) { -%>
and which <%- group.hosting.map(it => it === "*" ? "is hosted on an arbitrary hosting stack" : `is hosted on a node template whose node type is or is derived from ${link(it)}`).join(", which ") -%>
The node template <%- group.hosting.map((type, index) => type === "*" ? "is hosted on an arbitrary hosting stack of arbitrary length" : `is hosted on the node template "host ${index + 1}" of node type ${link(type)}`).join(", which ") -%>.
<% } else { -%>
The scenario does not require a specific hosting.
<% } -%>
.
<figure markdown><%- group.svg %></figure>
Expand Down
5 changes: 3 additions & 2 deletions tests/puml/topology/service-template.topology.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ skinparam ArrowThickness 1.5
skinparam file {
BorderColor black
BorderThickness 1.5
BackgroundColor white
}

skinparam interface {
Expand All @@ -26,7 +27,7 @@ rectangle "application\n(example.nodes.Application)" as node_application
url of node_application is [[ https://vintner.opentosca.org ]]
file "tar_archive\n(tar.archive)" as artifact_tar_archive_0_node_application
url of artifact_tar_archive_0_node_application is [[ https://vintner.opentosca.org ]]
artifact_tar_archive_0_node_application - node_application
artifact_tar_archive_0_node_application . node_application

rectangle "runtime\n(example.nodes.Runtime)" as node_runtime

Expand All @@ -40,7 +41,7 @@ rectangle "dbms\n(example.nodes.DBMS)" as node_dbms

rectangle "compute\n(example.nodes.Compute)" as node_compute

rectangle "hosting\n(*)" as node_hosting #line.dashed
rectangle "..." as node_hosting #white;line.dotted

rectangle "provider\n(some.provider)" as node_provider

Expand Down

0 comments on commit 9390da2

Please sign in to comment.