Skip to content

Commit

Permalink
Fixes #337.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbrowndotje committed Sep 18, 2024
1 parent 6c39ea6 commit ce11bf3
Show file tree
Hide file tree
Showing 15 changed files with 156 additions and 151 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- structurizr-dsl: Adds support for local theme files to be specified via `theme` (https://github.com/structurizr/java/issues/331).
- structurizr-export: Adds support for icons to the Ilograph exporter (https://github.com/structurizr/java/issues/332).
- structurizr-export: Adds support for imports to the Ilograph exporter (https://github.com/structurizr/java/issues/332).
- structurizr-export: Fixes https://github.com/structurizr/java/issues/337 (Malformed subgraph name in Mermaid render).

## 2.2.0 (2nd July 2024)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ protected void writeFooter(ModelView view, IndentingWriter writer) {

@Override
protected void startEnterpriseBoundary(ModelView view, String enterpriseName, IndentingWriter writer) {
writer.writeLine("subgraph enterprise [" + enterpriseName + "]");
writer.writeLine("subgraph enterprise [\"" + enterpriseName + "\"]");
writer.indent();
writer.writeLine("style enterprise fill:#ffffff,stroke:#444444,color:#444444");
writer.writeLine();
Expand Down Expand Up @@ -118,7 +118,7 @@ protected void startGroupBoundary(ModelView view, String group, IndentingWriter
color = elementStyle.getColor();
}

writer.writeLine(String.format("subgraph group%s [" + groupName + "]", groupId));
writer.writeLine(String.format("subgraph group%s [\"" + groupName + "\"]", groupId));
writer.indent();
writer.writeLine(String.format("style group%s fill:#ffffff,stroke:%s,color:%s,stroke-dasharray:5", groupId, color, color));
writer.writeLine();
Expand All @@ -136,7 +136,7 @@ protected void startSoftwareSystemBoundary(ModelView view, SoftwareSystem softwa
ElementStyle elementStyle = view.getViewSet().getConfiguration().getStyles().findElementStyle(softwareSystem);
String color = elementStyle.getStroke();

writer.writeLine(String.format("subgraph %s [%s]", softwareSystem.getId(), softwareSystem.getName()));
writer.writeLine(String.format("subgraph %s [\"%s\"]", softwareSystem.getId(), softwareSystem.getName()));
writer.indent();
writer.writeLine(String.format("style %s fill:#ffffff,stroke:%s,color:%s", softwareSystem.getId(), color, color));
writer.writeLine();
Expand All @@ -154,7 +154,7 @@ protected void startContainerBoundary(ModelView view, Container container, Inden
ElementStyle elementStyle = view.getViewSet().getConfiguration().getStyles().findElementStyle(container);
String color = elementStyle.getStroke();

writer.writeLine(String.format("subgraph %s [%s]", container.getId(), container.getName()));
writer.writeLine(String.format("subgraph %s [\"%s\"]", container.getId(), container.getName()));
writer.indent();
writer.writeLine(String.format("style %s fill:#ffffff,stroke:%s,color:%s", container.getId(), color, color));
writer.writeLine();
Expand All @@ -171,7 +171,7 @@ protected void endContainerBoundary(ModelView view, IndentingWriter writer) {
protected void startDeploymentNodeBoundary(DeploymentView view, DeploymentNode deploymentNode, IndentingWriter writer) {
ElementStyle elementStyle = view.getViewSet().getConfiguration().getStyles().findElementStyle(deploymentNode);

writer.writeLine(String.format("subgraph %s [%s]", deploymentNode.getId(), deploymentNode.getName()));
writer.writeLine(String.format("subgraph %s [\"%s\"]", deploymentNode.getId(), deploymentNode.getName()));
writer.indent();
writer.writeLine(String.format("style %s fill:#ffffff,stroke:%s,color:%s", deploymentNode.getId(), elementStyle.getStroke(), elementStyle.getColor()));
writer.writeLine();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ graph TB
18[("<div style='font-weight: bold'>Database</div><div style='font-size: 70%; margin-top: 0px'>[Container: Oracle Database Schema]</div><div style='font-size: 80%; margin-top:10px'>Stores user registration<br />information, hashed<br />authentication credentials,<br />access logs, etc.</div>")]
style 18 fill:#438dd5,stroke:#2e6295,color:#ffffff

subgraph 11 [API Application]
subgraph 11 ["API Application"]
style 11 fill:#ffffff,stroke:#2e6295,color:#2e6295

12["<div style='font-weight: bold'>Sign In Controller</div><div style='font-size: 70%; margin-top: 0px'>[Component: Spring MVC Rest Controller]</div><div style='font-size: 80%; margin-top:10px'>Allows users to sign in to<br />the Internet Banking System.</div>"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ graph TB
5["<div style='font-weight: bold'>E-mail System</div><div style='font-size: 70%; margin-top: 0px'>[Software System]</div><div style='font-size: 80%; margin-top:10px'>The internal Microsoft<br />Exchange e-mail system.</div>"]
style 5 fill:#999999,stroke:#6b6b6b,color:#ffffff

subgraph 7 [Internet Banking System]
subgraph 7 ["Internet Banking System"]
style 7 fill:#ffffff,stroke:#0b4884,color:#0b4884

10["<div style='font-weight: bold'>Web Application</div><div style='font-size: 70%; margin-top: 0px'>[Container: Java and Spring MVC]</div><div style='font-size: 80%; margin-top:10px'>Delivers the static content<br />and the Internet banking<br />single page application.</div>"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ graph TB
subgraph diagram ["Internet Banking System - Deployment - Development"]
style diagram fill:#ffffff,stroke:#ffffff

subgraph 50 [Developer Laptop]
subgraph 50 ["Developer Laptop"]
style 50 fill:#ffffff,stroke:#888888,color:#000000

subgraph 51 [Web Browser]
subgraph 51 ["Web Browser"]
style 51 fill:#ffffff,stroke:#888888,color:#000000

52["<div style='font-weight: bold'>Single-Page Application</div><div style='font-size: 70%; margin-top: 0px'>[Container: JavaScript and Angular]</div><div style='font-size: 80%; margin-top:10px'>Provides all of the Internet<br />banking functionality to<br />customers via their web<br />browser.</div>"]
style 52 fill:#438dd5,stroke:#2e6295,color:#ffffff
end

subgraph 53 [Docker Container - Web Server]
subgraph 53 ["Docker Container - Web Server"]
style 53 fill:#ffffff,stroke:#888888,color:#000000

subgraph 54 [Apache Tomcat]
subgraph 54 ["Apache Tomcat"]
style 54 fill:#ffffff,stroke:#888888,color:#000000

55["<div style='font-weight: bold'>Web Application</div><div style='font-size: 70%; margin-top: 0px'>[Container: Java and Spring MVC]</div><div style='font-size: 80%; margin-top:10px'>Delivers the static content<br />and the Internet banking<br />single page application.</div>"]
Expand All @@ -28,10 +28,10 @@ graph TB

end

subgraph 59 [Docker Container - Database Server]
subgraph 59 ["Docker Container - Database Server"]
style 59 fill:#ffffff,stroke:#888888,color:#000000

subgraph 60 [Database Server]
subgraph 60 ["Database Server"]
style 60 fill:#ffffff,stroke:#888888,color:#000000

61[("<div style='font-weight: bold'>Database</div><div style='font-size: 70%; margin-top: 0px'>[Container: Oracle Database Schema]</div><div style='font-size: 80%; margin-top:10px'>Stores user registration<br />information, hashed<br />authentication credentials,<br />access logs, etc.</div>")]
Expand All @@ -42,10 +42,10 @@ graph TB

end

subgraph 63 [Big Bank plc]
subgraph 63 ["Big Bank plc"]
style 63 fill:#ffffff,stroke:#888888,color:#000000

subgraph 64 [bigbank-dev001]
subgraph 64 ["bigbank-dev001"]
style 64 fill:#ffffff,stroke:#888888,color:#000000

65["<div style='font-weight: bold'>Mainframe Banking System</div><div style='font-size: 70%; margin-top: 0px'>[Software System]</div><div style='font-size: 80%; margin-top:10px'>Stores all of the core<br />banking information about<br />customers, accounts,<br />transactions, etc.</div>"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ graph TB
subgraph diagram ["Internet Banking System - Deployment - Live"]
style diagram fill:#ffffff,stroke:#ffffff

subgraph 67 [Customer's mobile device]
subgraph 67 ["Customer's mobile device"]
style 67 fill:#ffffff,stroke:#888888,color:#000000

68["<div style='font-weight: bold'>Mobile App</div><div style='font-size: 70%; margin-top: 0px'>[Container: Xamarin]</div><div style='font-size: 80%; margin-top:10px'>Provides a limited subset of<br />the Internet banking<br />functionality to customers<br />via their mobile device.</div>"]
style 68 fill:#438dd5,stroke:#2e6295,color:#ffffff
end

subgraph 69 [Customer's computer]
subgraph 69 ["Customer's computer"]
style 69 fill:#ffffff,stroke:#888888,color:#000000

subgraph 70 [Web Browser]
subgraph 70 ["Web Browser"]
style 70 fill:#ffffff,stroke:#888888,color:#000000

71["<div style='font-weight: bold'>Single-Page Application</div><div style='font-size: 70%; margin-top: 0px'>[Container: JavaScript and Angular]</div><div style='font-size: 80%; margin-top:10px'>Provides all of the Internet<br />banking functionality to<br />customers via their web<br />browser.</div>"]
Expand All @@ -23,13 +23,13 @@ graph TB

end

subgraph 72 [Big Bank plc]
subgraph 72 ["Big Bank plc"]
style 72 fill:#ffffff,stroke:#888888,color:#000000

subgraph 73 [bigbank-web***]
subgraph 73 ["bigbank-web***"]
style 73 fill:#ffffff,stroke:#888888,color:#000000

subgraph 74 [Apache Tomcat]
subgraph 74 ["Apache Tomcat"]
style 74 fill:#ffffff,stroke:#888888,color:#000000

75["<div style='font-weight: bold'>Web Application</div><div style='font-size: 70%; margin-top: 0px'>[Container: Java and Spring MVC]</div><div style='font-size: 80%; margin-top:10px'>Delivers the static content<br />and the Internet banking<br />single page application.</div>"]
Expand All @@ -38,10 +38,10 @@ graph TB

end

subgraph 77 [bigbank-api***]
subgraph 77 ["bigbank-api***"]
style 77 fill:#ffffff,stroke:#888888,color:#000000

subgraph 78 [Apache Tomcat]
subgraph 78 ["Apache Tomcat"]
style 78 fill:#ffffff,stroke:#888888,color:#000000

79["<div style='font-weight: bold'>API Application</div><div style='font-size: 70%; margin-top: 0px'>[Container: Java and Spring MVC]</div><div style='font-size: 80%; margin-top:10px'>Provides Internet banking<br />functionality via a<br />JSON/HTTPS API.</div>"]
Expand All @@ -50,10 +50,10 @@ graph TB

end

subgraph 82 [bigbank-db01]
subgraph 82 ["bigbank-db01"]
style 82 fill:#ffffff,stroke:#888888,color:#000000

subgraph 83 [Oracle - Primary]
subgraph 83 ["Oracle - Primary"]
style 83 fill:#ffffff,stroke:#888888,color:#000000

84[("<div style='font-weight: bold'>Database</div><div style='font-size: 70%; margin-top: 0px'>[Container: Oracle Database Schema]</div><div style='font-size: 80%; margin-top:10px'>Stores user registration<br />information, hashed<br />authentication credentials,<br />access logs, etc.</div>")]
Expand All @@ -62,10 +62,10 @@ graph TB

end

subgraph 86 [bigbank-db02]
subgraph 86 ["bigbank-db02"]
style 86 fill:#ffffff,stroke:#888888,color:#000000

subgraph 87 [Oracle - Secondary]
subgraph 87 ["Oracle - Secondary"]
style 87 fill:#ffffff,stroke:#888888,color:#000000

88[("<div style='font-weight: bold'>Database</div><div style='font-size: 70%; margin-top: 0px'>[Container: Oracle Database Schema]</div><div style='font-size: 80%; margin-top:10px'>Stores user registration<br />information, hashed<br />authentication credentials,<br />access logs, etc.</div>")]
Expand All @@ -74,7 +74,7 @@ graph TB

end

subgraph 90 [bigbank-prod001]
subgraph 90 ["bigbank-prod001"]
style 90 fill:#ffffff,stroke:#888888,color:#000000

91["<div style='font-weight: bold'>Mainframe Banking System</div><div style='font-size: 70%; margin-top: 0px'>[Software System]</div><div style='font-size: 80%; margin-top:10px'>Stores all of the core<br />banking information about<br />customers, accounts,<br />transactions, etc.</div>"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ graph TB
subgraph diagram ["API Application - Dynamic"]
style diagram fill:#ffffff,stroke:#ffffff

subgraph 11 [API Application]
subgraph 11 ["API Application"]
style 11 fill:#ffffff,stroke:#2e6295,color:#2e6295

12["<div style='font-weight: bold'>Sign In Controller</div><div style='font-size: 70%; margin-top: 0px'>[Component: Spring MVC Rest Controller]</div><div style='font-size: 80%; margin-top:10px'>Allows users to sign in to<br />the Internet Banking System.</div>"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ graph TB
subgraph diagram ["Internet Banking System - System Context"]
style diagram fill:#ffffff,stroke:#ffffff

subgraph group1 [Big Bank plc]
subgraph group1 ["Big Bank plc"]
style group1 fill:#ffffff,stroke:#cccccc,color:#cccccc,stroke-dasharray:5

4["<div style='font-weight: bold'>Mainframe Banking System</div><div style='font-size: 70%; margin-top: 0px'>[Software System]</div><div style='font-size: 80%; margin-top:10px'>Stores all of the core<br />banking information about<br />customers, accounts,<br />transactions, etc.</div>"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ graph TB
subgraph diagram ["System Landscape"]
style diagram fill:#ffffff,stroke:#ffffff

subgraph group1 [Big Bank plc]
subgraph group1 ["Big Bank plc"]
style group1 fill:#ffffff,stroke:#cccccc,color:#cccccc,stroke-dasharray:5

2["<div style='font-weight: bold'>Customer Service Staff</div><div style='font-size: 70%; margin-top: 0px'>[Person]</div><div style='font-size: 80%; margin-top:10px'>Customer service staff within<br />the bank.</div>"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ graph LR
subgraph diagram ["Spring PetClinic - Deployment - Live"]
style diagram fill:#ffffff,stroke:#ffffff

subgraph 5 [Amazon Web Services]
subgraph 5 ["Amazon Web Services"]
style 5 fill:#ffffff,stroke:#232f3e,color:#232f3e

subgraph 6 [US-East-1]
subgraph 6 ["US-East-1"]
style 6 fill:#ffffff,stroke:#147eba,color:#147eba

subgraph 12 [Amazon RDS]
subgraph 12 ["Amazon RDS"]
style 12 fill:#ffffff,stroke:#3b48cc,color:#3b48cc

subgraph 13 [MySQL]
subgraph 13 ["MySQL"]
style 13 fill:#ffffff,stroke:#3b48cc,color:#3b48cc

14[("<div style='font-weight: bold'>Database</div><div style='font-size: 70%; margin-top: 0px'>[Container: Relational database schema]</div><div style='font-size: 80%; margin-top:10px'>Stores information regarding<br />the veterinarians, the<br />clients, and their pets.</div>")]
Expand All @@ -26,10 +26,10 @@ graph LR
style 7 fill:#ffffff,stroke:#693cc5,color:#693cc5
8("<div style='font-weight: bold'>Elastic Load Balancer</div><div style='font-size: 70%; margin-top: 0px'>[Infrastructure Node]</div><div style='font-size: 80%; margin-top:10px'>Automatically distributes<br />incoming application traffic.</div>")
style 8 fill:#ffffff,stroke:#693cc5,color:#693cc5
subgraph 9 [Autoscaling group]
subgraph 9 ["Autoscaling group"]
style 9 fill:#ffffff,stroke:#cc2264,color:#cc2264

subgraph 10 [Amazon EC2]
subgraph 10 ["Amazon EC2"]
style 10 fill:#ffffff,stroke:#d86613,color:#d86613

11("<div style='font-weight: bold'>Web Application</div><div style='font-size: 70%; margin-top: 0px'>[Container: Java and Spring Boot]</div><div style='font-size: 80%; margin-top:10px'>Allows employees to view and<br />manage information regarding<br />the veterinarians, the<br />clients, and their pets.</div>")
Expand Down
Loading

0 comments on commit ce11bf3

Please sign in to comment.