Merge pull request #390 from kirchsth/feature/376_386_Layout
#376 (and #386): Lay_...() has correct orientation in combination with LAYOUT_LANDSCAPE() (and theme documentation is updated)pull/393/head
commit
3643f58401
@ -0,0 +1,47 @@
|
|||||||
|
@startuml
|
||||||
|
|
||||||
|
' convert it with additional command line argument -DRELATIVE_INCLUDE="./.." to use locally
|
||||||
|
!if %variable_exists("RELATIVE_INCLUDE")
|
||||||
|
!include %get_variable_value("RELATIVE_INCLUDE")/C4_Container.puml
|
||||||
|
!else
|
||||||
|
' !include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
|
||||||
|
!include https://raw.githubusercontent.com/kirchsth/C4-PlantUML/extended/C4_Container.puml
|
||||||
|
!endif
|
||||||
|
|
||||||
|
LAYOUT_LANDSCAPE()
|
||||||
|
|
||||||
|
' C4-PlantUML v2.12 fixed a missing rotation bug in Lay_* calls in combination with LAYOUT_LANDSCAPE call
|
||||||
|
' (details see https://github.com/plantuml-stdlib/C4-PlantUML/issues/376)
|
||||||
|
' If older diagrams should remain unchanged the bugfix can be deactivated with following statement
|
||||||
|
' !NO_LAY_ROTATE = 1
|
||||||
|
' Or if the conversion is started via command line with following argument
|
||||||
|
' -NO_LAY_ROTATE=1
|
||||||
|
' like
|
||||||
|
' java -jar plantuml.jar -NO_LAY_ROTATE=1 ...
|
||||||
|
|
||||||
|
'!NO_LAY_ROTATE = 1
|
||||||
|
|
||||||
|
Person(x, "X")
|
||||||
|
System(sUp, "S up")
|
||||||
|
System(sRight, "S right")
|
||||||
|
System(sDown, "S down")
|
||||||
|
System(sLeft, "S left")
|
||||||
|
|
||||||
|
Rel_U(x, sUp, "uses")
|
||||||
|
Rel_R(x, sRight, "uses")
|
||||||
|
Rel_D(x, sDown, "uses")
|
||||||
|
Rel_L(x, sLeft, "uses")
|
||||||
|
|
||||||
|
Person(a, "A")
|
||||||
|
Person(bUp, "B up")
|
||||||
|
Person(cRight, "C right")
|
||||||
|
Person(dDown, "D down")
|
||||||
|
Person(eLeft, "E left")
|
||||||
|
|
||||||
|
Lay_U(a, bUp)
|
||||||
|
Lay_R(a, cRight)
|
||||||
|
Lay_D(a, dDown)
|
||||||
|
Lay_L(a, eLeft)
|
||||||
|
|
||||||
|
HIDE_STEREOTYPE()
|
||||||
|
@enduml
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
@startuml
|
||||||
|
|
||||||
|
' convert it with additional command line argument -DRELATIVE_INCLUDE="./.." to use locally
|
||||||
|
!if %variable_exists("RELATIVE_INCLUDE")
|
||||||
|
!include %get_variable_value("RELATIVE_INCLUDE")/C4_Container.puml
|
||||||
|
!else
|
||||||
|
' !include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
|
||||||
|
!include https://raw.githubusercontent.com/kirchsth/C4-PlantUML/extended/C4_Container.puml
|
||||||
|
!endif
|
||||||
|
|
||||||
|
LAYOUT_LANDSCAPE()
|
||||||
|
|
||||||
|
' C4-PlantUML v2.12 fixed a missing rotation bug in Lay_* calls in combination with LAYOUT_LANDSCAPE call
|
||||||
|
' (details see https://github.com/plantuml-stdlib/C4-PlantUML/issues/376)
|
||||||
|
' If older diagrams should remain unchanged the bugfix can be deactivated with following statement
|
||||||
|
' !NO_LAY_ROTATE = 1
|
||||||
|
' Or if the conversion is started via command line with following argument
|
||||||
|
' -NO_LAY_ROTATE=1
|
||||||
|
' like
|
||||||
|
' java -jar plantuml.jar -NO_LAY_ROTATE=1 ...
|
||||||
|
|
||||||
|
!NO_LAY_ROTATE = 1
|
||||||
|
|
||||||
|
Person(x, "X")
|
||||||
|
System(sUp, "S up")
|
||||||
|
System(sRight, "S right")
|
||||||
|
System(sDown, "S down")
|
||||||
|
System(sLeft, "S left")
|
||||||
|
|
||||||
|
Rel_U(x, sUp, "uses")
|
||||||
|
Rel_R(x, sRight, "uses")
|
||||||
|
Rel_D(x, sDown, "uses")
|
||||||
|
Rel_L(x, sLeft, "uses")
|
||||||
|
|
||||||
|
Person(a, "A")
|
||||||
|
Person(bUp, "B up")
|
||||||
|
Person(cRight, "C right")
|
||||||
|
Person(dDown, "D down")
|
||||||
|
Person(eLeft, "E left")
|
||||||
|
|
||||||
|
Lay_U(a, bUp)
|
||||||
|
Lay_R(a, cRight)
|
||||||
|
Lay_D(a, dDown)
|
||||||
|
Lay_L(a, eLeft)
|
||||||
|
|
||||||
|
HIDE_STEREOTYPE()
|
||||||
|
@enduml
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
@startuml
|
||||||
|
' theme from C4-Stdlib (The !theme statement has to be BEFORE the !include statements.)
|
||||||
|
!theme C4_united from <C4/themes>
|
||||||
|
|
||||||
|
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
|
||||||
|
|
||||||
|
title Container diagram for Internet Banking System
|
||||||
|
|
||||||
|
Person(customer, Customer, "A customer of the bank, with personal bank accounts")
|
||||||
|
|
||||||
|
System_Boundary(c1, "Internet Banking") {
|
||||||
|
Container(web_app, "Web Application", "Java, Spring MVC", "Delivers the static content and the Internet banking SPA")
|
||||||
|
Container(spa, "Single-Page App", "JavaScript, Angular", "Provides all the Internet banking functionality to customers via their web browser")
|
||||||
|
Container(mobile_app, "Mobile App", "C#, Xamarin", "Provides a limited subset of the Internet banking functionality to customers via their mobile device")
|
||||||
|
ContainerDb(database, "Database", "SQL Database", "Stores user registration information, hashed auth credentials, access logs, etc.")
|
||||||
|
Container(backend_api, "API Application", "Java, Docker Container", "Provides Internet banking functionality via API")
|
||||||
|
}
|
||||||
|
|
||||||
|
System_Ext(email_system, "E-Mail System", "The internal Microsoft Exchange system")
|
||||||
|
System_Ext(banking_system, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.")
|
||||||
|
|
||||||
|
Rel(customer, web_app, "Uses", "HTTPS")
|
||||||
|
Rel(customer, spa, "Uses", "HTTPS")
|
||||||
|
Rel(customer, mobile_app, "Uses")
|
||||||
|
|
||||||
|
Rel_Neighbor(web_app, spa, "Delivers")
|
||||||
|
Rel(spa, backend_api, "Uses", "async, JSON/HTTPS")
|
||||||
|
Rel(mobile_app, backend_api, "Uses", "async, JSON/HTTPS")
|
||||||
|
Rel_Back_Neighbor(database, backend_api, "Reads from and writes to", "sync, JDBC")
|
||||||
|
|
||||||
|
Rel_Back(customer, email_system, "Sends e-mails to")
|
||||||
|
Rel_Back(email_system, backend_api, "Sends e-mails using", "sync, SMTP")
|
||||||
|
Rel_Neighbor(backend_api, banking_system, "Uses", "sync/async, XML/HTTPS")
|
||||||
|
|
||||||
|
SHOW_LEGEND()
|
||||||
|
@enduml
|
||||||
Loading…
Reference in New Issue