From aeb192fa54f1bebc4534bc3f83cb72ca75526828 Mon Sep 17 00:00:00 2001 From: Adrian Lupu Date: Sat, 13 Mar 2021 18:20:30 +0200 Subject: [PATCH 1/4] updated readme and code snippets to include database/queue systems --- .vscode/C4.code-snippets | 76 ++++++++++++++++++++++++++++++++++++++++ C4_Context.puml | 8 +++++ README.md | 4 +++ 3 files changed, 88 insertions(+) diff --git a/.vscode/C4.code-snippets b/.vscode/C4.code-snippets index 2bdb30c..7ca1b57 100644 --- a/.vscode/C4.code-snippets +++ b/.vscode/C4.code-snippets @@ -356,6 +356,82 @@ ], "description": "Add External System with Description to C4 diagram" }, + "C4_SystemDb": { + "scope": "plantuml", + "prefix": "Database System", + "body": [ + "SystemDb(${1:alias}, \"${2:label}\")" + ], + "description": "Add Database System to C4 diagram" + }, + "C4_SystemDb_Descr": { + "scope": "plantuml", + "prefix": "Database System with Description", + "body": [ + "SystemDb(${1:alias}, \"${2:label}\", \"${3:description}\")" + ], + "description": "Add Database System with Description to C4 diagram" + }, + "C4_SystemDb_Ext": { + "scope": "plantuml", + "prefix": [ + "External Database System", + "Database System (External)" + ], + "body": [ + "SystemDb_Ext(${1:alias}, \"${2:label}\")" + ], + "description": "Add External Database System to C4 diagram" + }, + "C4_SystemDb_Ext_Descr": { + "scope": "plantuml", + "prefix": [ + "External Database System with Description", + "Database System (External) with Description" + ], + "body": [ + "SystemDb_Ext(${1:alias}, \"${2:label}\", \"${3:description}\")" + ], + "description": "Add External Database System with Description to C4 diagram" + }, + "C4_SystemQueue": { + "scope": "plantuml", + "prefix": "Queue System", + "body": [ + "SystemQueue(${1:alias}, \"${2:label}\")" + ], + "description": "Add Queue System to C4 diagram" + }, + "C4_SystemQueue_Descr": { + "scope": "plantuml", + "prefix": "Queue System with Description", + "body": [ + "SystemQueue(${1:alias}, \"${2:label}\", \"${3:description}\")" + ], + "description": "Add Queue System with Description to C4 diagram" + }, + "C4_SystemQueue_Ext": { + "scope": "plantuml", + "prefix": [ + "External Queue System", + "Queue System (External)" + ], + "body": [ + "SystemQueue_Ext(${1:alias}, \"${2:label}\")" + ], + "description": "Add External Queue System to C4 diagram" + }, + "C4_SystemQueue_Ext_Descr": { + "scope": "plantuml", + "prefix": [ + "External Queue System with Description", + "Queue System (External) with Description" + ], + "body": [ + "SystemQueue_Ext(${1:alias}, \"${2:label}\", \"${3:description}\")" + ], + "description": "Add External Queue System with Description to C4 diagram" + }, "C4_System_Boundary": { "scope": "plantuml", "prefix": [ diff --git a/C4_Context.puml b/C4_Context.puml index e9ca4be..03c4d9f 100644 --- a/C4_Context.puml +++ b/C4_Context.puml @@ -222,10 +222,18 @@ rectangle "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("external_ database "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("system", $tags) as $alias !endprocedure +!unquoted procedure SystemQueue($alias, $label, $descr="", $sprite="", $tags="") +queue "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("system", $tags) as $alias +!endprocedure + !unquoted procedure SystemDb_Ext($alias, $label, $descr="", $sprite="", $tags="") database "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("external_system", $tags) as $alias !endprocedure +!unquoted procedure SystemQueue_Ext($alias, $label, $descr="", $sprite="", $tags="") +queue "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("external_system", $tags) as $alias +!endprocedure + ' Boundaries ' ################################## diff --git a/README.md b/README.md index 7facfb7..2c60ad4 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,11 @@ Diagram types * `Person(alias, label, ?description, ?sprite, ?tags)` * `Person_Ext` * `System(alias, label, ?description, ?sprite, ?tags)` + * `SystemDb` + * `SystemQueue` * `System_Ext` + * `SystemDb_Ext` + * `SystemQueue_Ext` * `Boundary(alias, label, ?type, ?tags)` * `Enterprise_Boundary(alias, label, ?tags)` * `System_Boundary` From 1c86ba40b1cb01a2e5ffd6ddbc116208d97ff819 Mon Sep 17 00:00:00 2001 From: KIRCHSTH Date: Fri, 19 Mar 2021 17:15:01 +0100 Subject: [PATCH 2/4] #119, #72: Add link support: All elements (except relations) are updated --- C4.puml | 15 +++++++++++++-- C4_Component.puml | 24 ++++++++++++------------ C4_Container.puml | 28 ++++++++++++++-------------- C4_Context.puml | 25 +++++++++++++------------ C4_Deployment.puml | 24 ++++++++++++------------ 5 files changed, 64 insertions(+), 52 deletions(-) diff --git a/C4.puml b/C4.puml index 0564fe8..279443a 100644 --- a/C4.puml +++ b/C4.puml @@ -312,6 +312,17 @@ $elementSkin !$tagDefaultLegend = $tagStereoEntries !endprocedure +' Links +' ################################## + +!function $getLink($link) + !if ($link!="") + !return "[[" + $link + "]]" + !else + !return "" + !endif +!endfunction + ' Line breaks ' ################################## @@ -499,8 +510,8 @@ endlegend !endif !endfunction -!unquoted procedure Boundary($alias, $label, $type="", $tags="") -rectangle "$getBoundary($label, $type)" $toStereos("boundary", $tags) as $alias +!unquoted procedure Boundary($alias, $label, $type="", $tags="", $link="") +rectangle "$getBoundary($label, $type)" $toStereos("boundary", $tags) as $alias $getLink($link) !endprocedure ' Relationship diff --git a/C4_Component.puml b/C4_Component.puml index 5eeb434..5f660d4 100644 --- a/C4_Component.puml +++ b/C4_Component.puml @@ -64,26 +64,26 @@ endlegend !endif !endfunction -!unquoted procedure Component($alias, $label, $techn, $descr="", $sprite="", $tags="") -rectangle "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("component",$tags) as $alias +!unquoted procedure Component($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="") +rectangle "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("component",$tags) as $alias $getLink($link) !endprocedure -!unquoted procedure ComponentDb($alias, $label, $techn, $descr="", $sprite="", $tags="") -database "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("component",$tags) as $alias +!unquoted procedure ComponentDb($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="") +database "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("component",$tags) as $alias $getLink($link) !endprocedure -!unquoted procedure ComponentQueue($alias, $label, $techn, $descr="", $sprite="", $tags="") -queue "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("component",$tags) as $alias +!unquoted procedure ComponentQueue($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="") +queue "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("component",$tags) as $alias $getLink($link) !endprocedure -!unquoted procedure Component_Ext($alias, $label, $techn, $descr="", $sprite="", $tags="") -rectangle "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_component",$tags) as $alias +!unquoted procedure Component_Ext($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="") +rectangle "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_component",$tags) as $alias $getLink($link) !endprocedure -!unquoted procedure ComponentDb_Ext($alias, $label, $techn, $descr="", $sprite="", $tags="") -database "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_component",$tags) as $alias +!unquoted procedure ComponentDb_Ext($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="") +database "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_component",$tags) as $alias $getLink($link) !endprocedure -!unquoted procedure ComponentQueue_Ext($alias, $label, $techn, $descr="", $sprite="", $tags="") -queue "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_component",$tags) as $alias +!unquoted procedure ComponentQueue_Ext($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="") +queue "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_component",$tags) as $alias $getLink($link) !endprocedure diff --git a/C4_Container.puml b/C4_Container.puml index 169944b..3b72153 100644 --- a/C4_Container.puml +++ b/C4_Container.puml @@ -59,33 +59,33 @@ endlegend !endif !endfunction -!unquoted procedure Container($alias, $label, $techn, $descr="", $sprite="", $tags="") -rectangle "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("container", $tags) as $alias +!unquoted procedure Container($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="") +rectangle "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("container", $tags) as $alias $getLink($link) !endprocedure -!unquoted procedure ContainerDb($alias, $label, $techn, $descr="", $sprite="", $tags="") -database "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("container", $tags) as $alias +!unquoted procedure ContainerDb($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="") +database "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("container", $tags) as $alias $getLink($link) !endprocedure -!unquoted procedure ContainerQueue($alias, $label, $techn, $descr="", $sprite="", $tags="") -queue "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("container", $tags) as $alias +!unquoted procedure ContainerQueue($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="") +queue "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("container", $tags) as $alias $getLink($link) !endprocedure -!unquoted procedure Container_Ext($alias, $label, $techn, $descr="", $sprite="", $tags="") -rectangle "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_container", $tags) as $alias +!unquoted procedure Container_Ext($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="") +rectangle "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_container", $tags) as $alias $getLink($link) !endprocedure -!unquoted procedure ContainerDb_Ext($alias, $label, $techn, $descr="", $sprite="", $tags="") -database "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_container", $tags) as $alias +!unquoted procedure ContainerDb_Ext($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="") +database "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_container", $tags) as $alias $getLink($link) !endprocedure -!unquoted procedure ContainerQueue_Ext($alias, $label, $techn, $descr="", $sprite="", $tags="") -queue "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_container", $tags) as $alias +!unquoted procedure ContainerQueue_Ext($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="") +queue "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_container", $tags) as $alias $getLink($link) !endprocedure ' Boundaries ' ################################## -!unquoted procedure Container_Boundary($alias, $label, $tags="") -Boundary($alias, $label, "Container", $tags) +!unquoted procedure Container_Boundary($alias, $label, $tags="", $link="") +Boundary($alias, $label, "Container", $tags, $link) !endprocedure diff --git a/C4_Context.puml b/C4_Context.puml index 884cec2..7e04a1d 100644 --- a/C4_Context.puml +++ b/C4_Context.puml @@ -202,28 +202,29 @@ endlegend !endif !endfunction -!unquoted procedure Person($alias, $label, $descr="", $sprite="", $tags="") -rectangle "$getPerson($label, $descr, $sprite)$getProps()" $toStereos("person", $tags) as $alias +!unquoted procedure Person($alias, $label, $descr="", $sprite="", $tags="", $link="") +rectangle "$getPerson($label, $descr, $sprite)$getProps()" $toStereos("person", $tags) as $alias $getLink($link) !endprocedure -!unquoted procedure Person_Ext($alias, $label, $descr="", $sprite="", $tags="") -rectangle "$getPerson($label, $descr, $sprite)$getProps()" $toStereos("external_person", $tags) as $alias +!unquoted procedure Person_Ext($alias, $label, $descr="", $sprite="", $tags="", $link="") +rectangle "$getPerson($label, $descr, $sprite)$getProps()" $toStereos("external_person", $tags) as $alias $getLink($link) !endprocedure -!unquoted procedure System($alias, $label, $descr="", $sprite="", $tags="") -rectangle "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("system", $tags) as $alias +!unquoted procedure System($alias, $label, $descr="", $sprite="", $tags="", $link="") +rectangle "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("system", $tags) as $alias $getLink($link) !endprocedure -!unquoted procedure System_Ext($alias, $label, $descr="", $sprite="", $tags="") -rectangle "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("external_system", $tags) as $alias +!unquoted procedure System_Ext($alias, $label, $descr="", $sprite="", $tags="", $link="") +rectangle "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("external_system", $tags) as $alias $getLink($link) !endprocedure ' Boundaries ' ################################## -!unquoted procedure Enterprise_Boundary($alias, $label, $tags="") -Boundary($alias, $label, "Enterprise", $tags) +!unquoted procedure Enterprise_Boundary($alias, $label, $tags="", $link="") +Boundary($alias, $label, "Enterprise", $tags, $link) !endprocedure -!unquoted procedure System_Boundary($alias, $label, $tags="") -Boundary($alias, $label, "System", $tags) + +!unquoted procedure System_Boundary($alias, $label, $tags="", $link="") +Boundary($alias, $label, "System", $tags, $link) !endprocedure diff --git a/C4_Deployment.puml b/C4_Deployment.puml index 0ced07a..00ca6bd 100644 --- a/C4_Deployment.puml +++ b/C4_Deployment.puml @@ -122,26 +122,26 @@ SetDefaultLegendEntries("person\nsystem\ncontainer\nexternal_person\nexternal_sy !return $nodeText !endfunction -!unquoted procedure Deployment_Node($alias, $label, $type="", $descr="", $sprite="", $tags="") -rectangle "$getNode($label, $type, $descr, $sprite)$getProps()" $toStereos("node",$tags) as $alias +!unquoted procedure Deployment_Node($alias, $label, $type="", $descr="", $sprite="", $tags="", $link="") +rectangle "$getNode($label, $type, $descr, $sprite)$getProps()" $toStereos("node",$tags) as $alias $getLink($link) !endprocedure -!unquoted procedure Deployment_Node_L($alias, $label, $type="", $descr="", $sprite="", $tags="") -rectangle "$getNode_L($label, $type, $descr, $sprite)$getProps_L()" $toStereos("node",$tags) as $alias +!unquoted procedure Deployment_Node_L($alias, $label, $type="", $descr="", $sprite="", $tags="", $link="") +rectangle "$getNode_L($label, $type, $descr, $sprite)$getProps_L()" $toStereos("node",$tags) as $alias $getLink($link) !endprocedure -!unquoted procedure Deployment_Node_R($alias, $label, $type="", $descr="", $sprite="", $tags="") -rectangle "$getNode_R($label, $type, $descr, $sprite)$getProps_R()" $toStereos("node",$tags) as $alias +!unquoted procedure Deployment_Node_R($alias, $label, $type="", $descr="", $sprite="", $tags="", $link="") +rectangle "$getNode_R($label, $type, $descr, $sprite)$getProps_R()" $toStereos("node",$tags) as $alias $getLink($link) !endprocedure -!unquoted procedure Node($alias, $label, $type="", $descr="", $sprite="", $tags="") -rectangle "$getNode($label, $type, $descr, $sprite)$getProps()" $toStereos("node",$tags) as $alias +!unquoted procedure Node($alias, $label, $type="", $descr="", $sprite="", $tags="", $link="") +rectangle "$getNode($label, $type, $descr, $sprite)$getProps()" $toStereos("node",$tags) as $alias $getLink($link) !endprocedure -!unquoted procedure Node_L($alias, $label, $type="", $descr="", $sprite="", $tags="") -rectangle "$getNode_L($label, $type, $descr, $sprite)$getProps_L()" $toStereos("node",$tags) as $alias +!unquoted procedure Node_L($alias, $label, $type="", $descr="", $sprite="", $tags="", $link="") +rectangle "$getNode_L($label, $type, $descr, $sprite)$getProps_L()" $toStereos("node",$tags) as $alias $getLink($link) !endprocedure -!unquoted procedure Node_R($alias, $label, $type="", $descr="", $sprite="", $tags="") -rectangle "$getNode_R($label, $type, $descr, $sprite)$getProps_R()" $toStereos("node",$tags) as $alias +!unquoted procedure Node_R($alias, $label, $type="", $descr="", $sprite="", $tags="", $link="") +rectangle "$getNode_R($label, $type, $descr, $sprite)$getProps_R()" $toStereos("node",$tags) as $alias $getLink($link) !endprocedure From abe96b114209b9f8459486223936742a0569fc50 Mon Sep 17 00:00:00 2001 From: KIRCHSTH Date: Fri, 19 Mar 2021 18:39:30 +0100 Subject: [PATCH 3/4] #119, #72: Add link support: Added SystemDb..., SystemQueue... are updated --- C4_Context.puml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/C4_Context.puml b/C4_Context.puml index e612bd8..850f470 100644 --- a/C4_Context.puml +++ b/C4_Context.puml @@ -218,20 +218,20 @@ rectangle "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("system", rectangle "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("external_system", $tags) as $alias $getLink($link) !endprocedure -!unquoted procedure SystemDb($alias, $label, $descr="", $sprite="", $tags="") -database "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("system", $tags) as $alias +!unquoted procedure SystemDb($alias, $label, $descr="", $sprite="", $tags="", $link="") +database "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("system", $tags) as $alias $getLink($link) !endprocedure -!unquoted procedure SystemQueue($alias, $label, $descr="", $sprite="", $tags="") -queue "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("system", $tags) as $alias +!unquoted procedure SystemQueue($alias, $label, $descr="", $sprite="", $tags="", $link="") +queue "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("system", $tags) as $alias $getLink($link) !endprocedure -!unquoted procedure SystemDb_Ext($alias, $label, $descr="", $sprite="", $tags="") -database "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("external_system", $tags) as $alias +!unquoted procedure SystemDb_Ext($alias, $label, $descr="", $sprite="", $tags="", $link="") +database "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("external_system", $tags) as $alias $getLink($link) !endprocedure -!unquoted procedure SystemQueue_Ext($alias, $label, $descr="", $sprite="", $tags="") -queue "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("external_system", $tags) as $alias +!unquoted procedure SystemQueue_Ext($alias, $label, $descr="", $sprite="", $tags="", $link="") +queue "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("external_system", $tags) as $alias $getLink($link) !endprocedure ' Boundaries From e24ddc02ca427702eda8bdbde8892f1aaa4e09ea Mon Sep 17 00:00:00 2001 From: KIRCHSTH Date: Fri, 19 Mar 2021 19:47:58 +0100 Subject: [PATCH 4/4] #119, #72: Add link support: Relationships are updated, Readme.md extended --- C4.puml | 92 ++++++++++++++++++++++++----------------------- C4_Dynamic.puml | 96 ++++++++++++++++++++++++------------------------- README.md | 31 ++++++++++++---- 3 files changed, 121 insertions(+), 98 deletions(-) diff --git a/C4.puml b/C4.puml index b95491a..45106c0 100644 --- a/C4.puml +++ b/C4.puml @@ -523,7 +523,7 @@ rectangle "$getBoundary($label, $type)" $toStereos("boundary", $tags) as $alias ' Relationship ' ################################## -!function $getRel($direction, $alias1, $alias2, $label, $techn, $descr, $sprite, $tags) +!function $getRel($direction, $alias1, $alias2, $label, $techn, $descr, $sprite, $tags, $link) !$rel = $alias1 + ' ' + $direction + ' ' + $alias2 !if ($tags != "") !$rel = $rel + ' ' + $toStereos($tags) @@ -537,7 +537,11 @@ rectangle "$getBoundary($label, $type)" $toStereos("boundary", $tags) as $alias !$rel = $rel + '<'+$sprite+'> ' !endif !endif - !$rel = $rel + '**' + $label + '**' + !if ($link != "") + !$rel = $rel + '**[[' + $link + ' ' + $label + ']]**' + !else + !$rel = $rel + '**' + $label + '**' + !endif !if ($techn != "") ' line break is not deterministic, calculate it !$rel = $rel + '\n//[' + $breakTechn($techn, $REL_TECHN_MAX_CHAR_WIDTH) + ']//' @@ -556,80 +560,80 @@ $alias1 $direction $alias2 : **$label** $alias1 $direction $alias2 : **$label**\n//[$techn]// !endprocedure -!unquoted procedure Rel($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-->>", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-->>", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure BiRel($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("<<-->>", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure BiRel($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("<<-->>", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Back($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("<<--", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_Back($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("<<--", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Neighbor($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("->>", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_Neighbor($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("->>", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Back_Neighbor($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("<<-", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_Back_Neighbor($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("<<-", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_D($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-DOWN->>", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_D($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-DOWN->>", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Down($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-DOWN->>", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_Down($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-DOWN->>", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure BiRel_D($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("<<-DOWN->>", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure BiRel_D($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("<<-DOWN->>", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure BiRel_Down($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("<<-DOWN->>", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure BiRel_Down($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("<<-DOWN->>", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_U($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-UP->>", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_U($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-UP->>", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Up($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-UP->>", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_Up($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-UP->>", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure BiRel_U($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("<<-UP->>", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure BiRel_U($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("<<-UP->>", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure BiRel_Up($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("<<-UP->>", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure BiRel_Up($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("<<-UP->>", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_L($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-LEFT->>", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_L($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-LEFT->>", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Left($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-LEFT->>", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_Left($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-LEFT->>", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure BiRel_L($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("<<-LEFT->>", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure BiRel_L($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("<<-LEFT->>", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure BiRel_Left($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("<<-LEFT->>", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure BiRel_Left($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("<<-LEFT->>", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_R($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-RIGHT->>", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_R($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-RIGHT->>", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Right($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-RIGHT->>", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_Right($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-RIGHT->>", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure BiRel_R($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("<<-RIGHT->>", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure BiRel_R($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("<<-RIGHT->>", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure BiRel_Right($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("<<-RIGHT->>", $from, $to, $label, $techn, $descr, $sprite, $tags) +!unquoted procedure BiRel_Right($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("<<-RIGHT->>", $from, $to, $label, $techn, $descr, $sprite, $tags, $link) !endprocedure ' Layout Helpers diff --git a/C4_Dynamic.puml b/C4_Dynamic.puml index 70d89e5..a307e84 100644 --- a/C4_Dynamic.puml +++ b/C4_Dynamic.puml @@ -65,82 +65,82 @@ $alias1 $direction $alias2 : **$e_index: $label** $alias1 $direction $alias2 : **$e_index: $label**\n//[$techn]// !endprocedure -!unquoted procedure Rel($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure RelIndex($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure RelIndex($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Back($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("<<--", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_Back($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("<<--", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure RelIndex_Back($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("<<--", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure RelIndex_Back($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("<<--", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Neighbor($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_Neighbor($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure RelIndex_Neighbor($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel($e_index, $from, $to, $label, $techn, "->>") +!unquoted procedure RelIndex_Neighbor($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Back_Neighbor($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("<<-", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_Back_Neighbor($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("<<-", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure RelIndex_Back_Neighbor($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel($e_index, $from, $to, $label, $techn, "<<-") +!unquoted procedure RelIndex_Back_Neighbor($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("<<-", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_D($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-DOWN->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_D($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-DOWN->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Down($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-DOWN->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_Down($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-DOWN->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure RelIndex_D($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-DOWN->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure RelIndex_D($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-DOWN->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure RelIndex_Down($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-DOWN->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure RelIndex_Down($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-DOWN->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_U($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-UP->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_U($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-UP->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Up($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-UP->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_Up($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-UP->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure RelIndex_U($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-UP->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure RelIndex_U($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-UP->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure RelIndex_Up($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-UP->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure RelIndex_Up($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-UP->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_L($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-LEFT->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_L($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-LEFT->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Left($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-LEFT->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_Left($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-LEFT->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure RelIndex_L($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-LEFT->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure RelIndex_L($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-LEFT->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure RelIndex_Left($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-LEFT->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure RelIndex_Left($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-LEFT->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_R($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-RIGHT->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_R($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-RIGHT->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure Rel_Right($from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-RIGHT->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure Rel_Right($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-RIGHT->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure RelIndex_R($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-RIGHT->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure RelIndex_R($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-RIGHT->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure -!unquoted procedure RelIndex_Right($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="") -$getRel("-RIGHT->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags) +!unquoted procedure RelIndex_Right($e_index, $from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="") +$getRel("-RIGHT->>", $from, $to, $e_index + ": " + $label, $techn, $descr, $sprite, $tags, $link) !endprocedure diff --git a/README.md b/README.md index 35c1302..6ee7be9 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Rel(web_app, twitter, "Gets tweets from", "HTTPS") ![Basic Sample](https://www.plantuml.com/plantuml/png/JP1FIyD04CNl-HHZlAHG4ogUF3KDeWShmQHwBDDaj0lxZzs9eOZVtGcjhNiPcFURUMzs6Ha33qR32gFge47ZDILNodPww0dsp3xU5qN0CVzKl1zsGwJGESjaEU-SAR0F2ksN7lnGL7StjKRBc_LpeP4fihIsbT2eB8NSYr6Ir1IYindsHjavfELKLUI0x48wIvf3P3BRbHjiZ-6GTGk1ZhdWgAKp-4v0tdbpDj9kYzuB-KuxABtNgaDMpgRIggxdK3Pr_lBGoaWWkCqNi7wh9gtKseqHfgiYi0CvoQCWPj2i9ijsLCmKW9KXBLvH8lwSGcPy56NF2HCnUINzTzmbrYRAfDIdjgqReIReh5xMF19BZ96cyX6S-J-o9DlB1_u2 "Basic Sample") -Entities can also be decorated with icons using the last parameter, for example: +Entities can also be decorated with icons/sprites using the $sprite parameter, for example: ```csharp @startuml @@ -86,10 +86,10 @@ Entities can also be decorated with icons using the last parameter, for example: LAYOUT_WITH_LEGEND() -Person(user, "Customer", "People that need products", "users") -Container(spa, "SPA", "angular", "The main interface that the customer interacts with", "angular") -Container(api, "API", "java", "Handles all business logic", "java") -ContainerDb(db, "Database", "Microsoft SQL", "Holds product, order and invoice information", "msql_server") +Person(user, "Customer", "People that need products", $sprite="users") +Container(spa, "SPA", "angular", "The main interface that the customer interacts with", $sprite="angular") +Container(api, "API", "java", "Handles all business logic", $sprite="java") +ContainerDb(db, "Database", "Microsoft SQL", "Holds product, order and invoice information", $sprite="msql_server") Rel(user, spa, "Uses", "https") Rel(spa, api, "Uses", "https") @@ -97,7 +97,26 @@ Rel_R(api, db, "Reads/Writes") @enduml ``` -![test](https://www.plantuml.com/plantuml/png/hL9DZzCm4BtdLtXxeIjjwmDmuRHLMzXA_Q8VL9ogQJnfZHmxUEnM_7l6QRORM90uS8erx-NDl9dtI05yYAN9xhJDJLGeJY5Kz45A3vV-KOTJF4H2dpiRq8P-xae9ockmPnEhA8VlUai3DcndKsaW80KkxOVC1ctHzwka_KP4op-MB2322KNXZ74NRO_2C4c0LU8NM7lYbnFSM1YNWp4_MECsuUi6sPt28acDnbycmyLy_GykGgpOo5jPfV5PfASPxHNCw57bDLkH9L10BnMU4qQtBXyNyyrWDrulPkF_sgYkmGN9bTXx_tAIPrSIx34QQ4o_Xh_16Vw6bVJTx7coC_x-UykDJBDJizFfuEjYkzdl9fkd_NJyQJmVTU-pRCa4Pxk9-20wmqY1X_KTVY_HLGRvWX24HLIYyax5F502Q-7EVNOxN9SguFfwEKXmOomzDvo0aYb2ymfz0NaZcPAHD-sk6B2skF3Esmhj5b1fHWRBIIAavQJl4yVD80bEbU1RCP68KtRK-OtLqXWTkkh0zH44E01XuinqxXsv8eZrvsajwOoYPxiFmdd58wPKQtjscWreMpXVGj3E9dxh5jmhMw5fzddToPQmtbaTBIOal4QkVlu0xrTNh_MeAmH5SbSdY-57j8hl-HC0 "test") +![Sprites/Icons](http://www.plantuml.com/plantuml/png/hP9BZzem4CVl-HHUr0ChBPj3sqkbIek0Tf5uK1v5FQ59F05NZfrw9l3rEmvXD-f3wg4dE_EV-VyyCtaYXi1rQPCxut9RQrGdvee-f6c0o-FHyAdEQiAGUyVe-37tPLfPSB5cGAojoTBHky4gXdRpMLe2CGO97KPI0SPXUAoYVtAdiP1FDPvydOwMYyq_WBYkG8Uthq0Zwg2GZ05LmJ3IZQVn73LweNnQBhR3_MIpd4_-AwY9mGN9bpXu_pgrMrSfk6DjeMtwT_axdE5lMaa_x84mdF7NyautQNmxjJET3RyjTzl3VhfzFimcdoUBSVy-ILQIu5q_9ZwetgWczYM6djnNw2kBYa_0oY5gLGMlwvn9n3VNJZ_s6a3lFdbPO9ygaEBDQXWzsWRZTNj2LKgACeun592trYpnlCLUDH26kiZikw2RKnS5bH7ZuMeQ_UEmulaCJbia1TOgsPqa4YdhZoRlsiNihjSuw-jCgiV0a05XT9gRF7Zo1QlDbrbZxQscsnWUb0yQWnASFFliJOvo5ZwKmCQxBgopAs4cQxJjlA-psX5Ij6z-FKc8UgD8Vt-M3-jhxysJrmYQqdr4HVa9dPPz_mG0 "Sprites/Icons") + +Similar to icons/sprites is it possible to add links to all elements and relationships: + +```csharp +@startuml Basic Sample +!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml + +Person(admin, "Administrator", $sprite="person2", $link="https://github.com/plantuml-stdlib/C4-PlantUML/blob/master/LayoutOptions.md#hide_person_sprite-or-show_person_spritesprite") +System_Boundary(c1, "Sample System", $link="https://github.com/plantuml-stdlib/C4-PlantUML") { + Container(web_app, "Web Application", "C#, ASP.NET Core 2.1 MVC", $descr="Allows users to compare multiple Twitter timelines", $link="https://github.com/plantuml-stdlib/C4-PlantUML/blob/master/LayoutOptions.md") +} +System(twitter, "Twitter", $link="https://github.com/plantuml-stdlib/C4-PlantUML") + +Rel(admin, web_app, "Uses", "HTTPS", $link="https://plantuml.com/link") +Rel(web_app, twitter, "Gets tweets from", "HTTPS", $link="https://plantuml.com/link") +@enduml +``` + +![Links](http://www.plantuml.com/plantuml/png/jP9FYzH04CNl-HHjhuTPc4dOnPCmiECWUjZLOB9w39rqQHhxJrDL8GpYTxTxizb5F8W3vf0chrBl_NZ93R52dfmjNXW_s4c369aZlQugL7FvpV0uzHC13i4pU2w7uAfebSyxEs9jJLyTN-tgBDtVtLPE4GCcgJkc3MKyO1cpVr43Kl0RfPtnMo4F-JJ4g3YWt8gN5D4mx6LyUEywIzRuxtkv0YqmVoNeRUXNZ5jr2XD_Z6o2fzBfYz5ew9Q4RWdS1TpH6ERVrUKkBulcb8nSzoPCNYiyROQhnDue5os8PNOkgBmKFmgHhgUYDZFqdOen9No1NXnYj6PGcLqcwNYn5OUcBZ-yRTCAWhWkhyJTvsFErq03xkN1sZ2JoD-B10UH2A9246woR39nEnjcGC76GM86-Yyjfzf-FXQtuIKnyJzcdrzNKNm2k_u_prNT4r3kvttRrisVxglbWtyU9QFiysJmJFWEcD8ZvECh1lUFhZVWTP9-0G00 "Links") Elements and relations can be decorated with tags and explained via a calculated legend, for example: