mirror of
https://github.com/plantuml-stdlib/C4-PlantUML.git
synced 2022-10-18 01:14:54 +00:00
Merge pull request #135 from kirchsth/feature/126_inclLink
#119, #72: All elements and relationships can support hyperlinks (based on #126)
This commit is contained in:
@@ -12,8 +12,15 @@
|
||||
|
||||
!global $LEGEND_FONT_COLOR = "#FFFFFF"
|
||||
!global $LEGEND_TITLE_COLOR = "#000000"
|
||||
!global $LEGEND_UNDEFINED_BK_COLOR = "#87AECA"
|
||||
!global $LEGEND_UNDEFINED_FONT_COLOR = "#B7DEFA"
|
||||
!global $LEGEND_UNDEFINED_BG_COLOR = "#D5CFEE"
|
||||
!global $LEGEND_UNDEFINED_FONT_COLOR = "#8B77E4"
|
||||
|
||||
!global $LEGEND_SHADOW_TEXT = "(shadow) "
|
||||
!global $LEGEND_NO_SHADOW_TEXT = "(no shadow) "
|
||||
!global $LEGEND_NO_FONT_BG_TEXT = "(no text, no back color) "
|
||||
!global $LEGEND_NO_FONT_TEXT = "(no text color) "
|
||||
!global $LEGEND_NO_BG_TEXT = "(no back color) "
|
||||
!global $LEGEND_NO_LINE_TEXT = "(no line color) "
|
||||
|
||||
' Styling
|
||||
' ##################################
|
||||
@@ -73,12 +80,33 @@ skinparam rectangle<<boundary>> {
|
||||
!global $tagDefaultLegend = ""
|
||||
!global $tagCustomLegend = ""
|
||||
|
||||
' rel specific
|
||||
!unquoted function $toStereos($tags)
|
||||
!if (%strlen($tags) == 0)
|
||||
!return ''
|
||||
!endif
|
||||
!$stereos = ''
|
||||
!$brPos = %strpos($tags, "+")
|
||||
!while ($brPos >= 0)
|
||||
!$tag = %substr($tags, 0, $brPos)
|
||||
!$stereos = $stereos + '<<' + $tag + '>>'
|
||||
%set_variable_value("$" + $tag + "_LineLegend", %true())
|
||||
!$tags = %substr($tags, $brPos+1)
|
||||
!$brPos = %strpos($tags, "+")
|
||||
!endwhile
|
||||
!if (%strlen($tags)>0)
|
||||
!$stereos = $stereos + '<<' + $tags + '>>'
|
||||
%set_variable_value("$" + $tags + "_LineLegend", %true())
|
||||
!endif
|
||||
!return $stereos
|
||||
!endfunction
|
||||
|
||||
!unquoted function $toStereos($elementType, $tags)
|
||||
!if (%strlen($tags) == 0)
|
||||
!$stereos = '<<' + $elementType + '>>'
|
||||
%set_variable_value("$" + $elementType + "Legend", %true())
|
||||
!return $stereos
|
||||
!endif
|
||||
!endif
|
||||
!$stereos = ''
|
||||
!$brPos = %strpos($tags, "+")
|
||||
!while ($brPos >= 0)
|
||||
@@ -133,12 +161,34 @@ skinparam rectangle<<boundary>> {
|
||||
$tagSkin
|
||||
!endprocedure
|
||||
|
||||
' arrow colors cannot start with # (legend background has to start with #)
|
||||
!function ColorNoHash($c)
|
||||
!if (%substr($c, 0, 1) == "#")
|
||||
!$c = %substr($c,1)
|
||||
!endif
|
||||
!return $c
|
||||
!endfunction
|
||||
|
||||
!unquoted procedure $defineRelSkinparams($tagStereo, $textColor, $lineColor)
|
||||
!$elementSkin = "skinparam Arrow<<" + $tagStereo + ">> {" + %newline()
|
||||
!$elementSkin = $elementSkin + " Color "
|
||||
!if ($lineColor!="")
|
||||
!$elementSkin = $elementSkin + ColorNoHash($lineColor)
|
||||
!endif
|
||||
!if ($textColor!="")
|
||||
!$elementSkin = $elementSkin + ";text:" + ColorNoHash($textColor)
|
||||
!endif
|
||||
!$elementSkin = $elementSkin + %newline()
|
||||
!$elementSkin = $elementSkin + "}" + %newline()
|
||||
$elementSkin
|
||||
!endprocedure
|
||||
|
||||
!function $tagLegendEntry($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing)
|
||||
!$tagEntry = "|"
|
||||
!if ($bgColor!="")
|
||||
!$bg = $bgColor
|
||||
!else
|
||||
!$bg = $LEGEND_UNDEFINED_BK_COLOR
|
||||
!$bg = $LEGEND_UNDEFINED_BG_COLOR
|
||||
!endif
|
||||
' named colors have to start with # too
|
||||
!if (%substr($bg, 0, 1) != "#")
|
||||
@@ -158,19 +208,19 @@ $tagSkin
|
||||
!endif
|
||||
!$tagEntry = $tagEntry + " " + $tagStereo + " "
|
||||
!if ($shadowing == "true")
|
||||
!$tagEntry = $tagEntry + "(shadow) "
|
||||
!$tagEntry = $tagEntry + $LEGEND_SHADOW_TEXT
|
||||
!endif
|
||||
!if ($shadowing == "false")
|
||||
!$tagEntry = $tagEntry + "(no shadow) "
|
||||
!$tagEntry = $tagEntry + $LEGEND_NO_SHADOW_TEXT
|
||||
!endif
|
||||
!if ($fontColor == "" && $bgColor == "")
|
||||
!$tagEntry = $tagEntry + "(no font, no back color) "
|
||||
!$tagEntry = $tagEntry + $LEGEND_NO_FONT_BG_TEXT
|
||||
!else
|
||||
!if ($fontColor == "")
|
||||
!$tagEntry = $tagEntry + "(no font color) "
|
||||
!$tagEntry = $tagEntry + $LEGEND_NO_FONT_TEXT
|
||||
!endif
|
||||
!if ($bgColor == "")
|
||||
!$tagEntry = $tagEntry + "(no back color) "
|
||||
!$tagEntry = $tagEntry + $LEGEND_NO_BG_TEXT
|
||||
!endif
|
||||
!endif
|
||||
!$tagEntry = $tagEntry + "</color> "
|
||||
@@ -178,10 +228,54 @@ $tagSkin
|
||||
!return $tagEntry
|
||||
!endfunction
|
||||
|
||||
!unquoted procedure $addTagToDynamicLegend($tagStereo, $bgColor="", $fontColor="", $borderColor="", $shadowing="")
|
||||
!$tagEntry = $tagLegendEntry($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing)
|
||||
!function $tagRelLegendEntry($tagStereo, $textColor, $lineColor)
|
||||
!$tagEntry = "|"
|
||||
' <U+2500> ..white line
|
||||
!if ($lineColor!="")
|
||||
!$tagEntry = $tagEntry + "<color:"+$lineColor+"> <U+2500></color> "
|
||||
!else
|
||||
!$tagEntry = $tagEntry + " <U+2500> "
|
||||
!endif
|
||||
!if ($textColor!="")
|
||||
!$tagEntry = $tagEntry + "<color:"+$textColor+">"
|
||||
!else
|
||||
!$tagEntry = $tagEntry + "<color:"+$LEGEND_UNDEFINED_FONT_COLOR+">"
|
||||
!endif
|
||||
!$tagEntry = $tagEntry + " " + $tagStereo + " "
|
||||
!if ($textColor == "")
|
||||
!$tagEntry = $tagEntry + $LEGEND_NO_FONT_TEXT
|
||||
!endif
|
||||
!if ($lineColor == "")
|
||||
!$tagEntry = $tagEntry + $LEGEND_NO_LINE_TEXT
|
||||
!endif
|
||||
!$tagEntry = $tagEntry + "</color> "
|
||||
!$tagEntry = $tagEntry + "|"
|
||||
!return $tagEntry
|
||||
!endfunction
|
||||
|
||||
!unquoted procedure $addTagToLegend($tagStereo, $bgColor="", $fontColor="", $borderColor="", $shadowing="")
|
||||
'' if a combined element tag is defined (e.g. "v1.0&v1.1") then it is typically a merged color,
|
||||
'' like a new $fontColor="#fdae61" therefore it should be added to the legend
|
||||
'' and the & combined tags will be not removed
|
||||
' !if (%strpos($tagStereo, "&")<0)
|
||||
!$tagEntry = $tagLegendEntry($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing)
|
||||
%set_variable_value("$" + $tagStereo + "LegendEntry", $tagEntry)
|
||||
!$tagCustomLegend = $tagCustomLegend + $tagStereo + "\n"
|
||||
!$tagCustomLegend = $tagCustomLegend + $tagStereo + "\n"
|
||||
' !endif
|
||||
!endprocedure
|
||||
|
||||
!unquoted procedure $addRelTagToLegend($tagStereo, $textColor="", $lineColor="")
|
||||
'' Arrows have a bug with stereotype/skinparams and cannot combine text colors of one stereotype
|
||||
'' and the line color of another stereotype. Therefore the text color of one tag and the line color
|
||||
'' of another tag have to be combined via a "workaround" tag ("v1.0&v1.1").
|
||||
'' This workaround tag could be theoretically removed in the legend but after that there would
|
||||
'' be an inconsistency between the element tags and the rel tags and therefore
|
||||
'' & combined workaround tags are not removed too (and in unlikely cases the color itself could be changed)
|
||||
' !if (%strpos($tagStereo, "&")<0)
|
||||
!$tagEntry = $tagRelLegendEntry($tagStereo, $textColor, $lineColor)
|
||||
%set_variable_value("$" + $tagStereo + "_LineLegendEntry", $tagEntry)
|
||||
!$tagCustomLegend = $tagCustomLegend + $tagStereo + "_Line\n"
|
||||
' !endif
|
||||
!endprocedure
|
||||
|
||||
!procedure $showActiveLegendEntries($allDefined)
|
||||
@@ -203,16 +297,31 @@ $tagSkin
|
||||
!endprocedure
|
||||
|
||||
' used by new defined tags
|
||||
!unquoted procedure AddTagSupport($tagStereo, $bgColor="", $fontColor="", $borderColor="", $shadowing="")
|
||||
!unquoted procedure AddElementTag($tagStereo, $bgColor="", $fontColor="", $borderColor="", $shadowing="")
|
||||
$defineSkinparams($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing)
|
||||
$addTagToDynamicLegend($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing)
|
||||
$addTagToLegend($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing)
|
||||
!endprocedure
|
||||
|
||||
' used by existing elements like person, ...
|
||||
!unquoted procedure UpdateSkinparamsAndLegendEntry($tagStereo, $bgColor="", $fontColor="", $borderColor="", $shadowing="")
|
||||
$defineSkinparams($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing)
|
||||
!$tagEntry = $tagLegendEntry($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing)
|
||||
%set_variable_value("$" + $tagStereo + "LegendEntry", $tagEntry)
|
||||
' used by new defined rel tags
|
||||
!unquoted procedure AddRelTag($tagStereo, $textColor="", $lineColor="")
|
||||
$defineRelSkinparams($tagStereo, $textColor, $lineColor)
|
||||
$addRelTagToLegend($tagStereo, $textColor, $lineColor)
|
||||
!endprocedure
|
||||
|
||||
' update the style of existing elements like person, ...
|
||||
!unquoted procedure UpdateElementStyle($elementName, $bgColor="", $fontColor="", $borderColor="", $shadowing="")
|
||||
$defineSkinparams($elementName, $bgColor, $fontColor, $borderColor, $shadowing)
|
||||
!$tagEntry = $tagLegendEntry($elementName, $bgColor, $fontColor, $borderColor, $shadowing)
|
||||
%set_variable_value("$" + $elementName + "LegendEntry", $tagEntry)
|
||||
!endprocedure
|
||||
|
||||
' update the style of default relation, it has to set both properties (combined statement not working)
|
||||
!unquoted procedure UpdateRelStyle($textColor, $lineColor)
|
||||
!$elementSkin = "skinparam Arrow {" + %newline()
|
||||
!$elementSkin = $elementSkin + " Color " + $lineColor + %newline()
|
||||
!$elementSkin = $elementSkin + " FontColor " + $textColor + %newline()
|
||||
!$elementSkin = $elementSkin + "}" + %newline()
|
||||
$elementSkin
|
||||
!endprocedure
|
||||
|
||||
' tags/stereotypes have to be delimited with \n
|
||||
@@ -220,6 +329,95 @@ $defineSkinparams($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing)
|
||||
!$tagDefaultLegend = $tagStereoEntries
|
||||
!endprocedure
|
||||
|
||||
' Links
|
||||
' ##################################
|
||||
|
||||
!function $getLink($link)
|
||||
!if ($link!="")
|
||||
!return "[[" + $link + "]]"
|
||||
!else
|
||||
!return ""
|
||||
!endif
|
||||
!endfunction
|
||||
|
||||
' Line breaks
|
||||
' ##################################
|
||||
|
||||
' PlantUML supports no DETERMINISTIC/automatic line breaks of "PlantUML line" (C4 Relashionships)
|
||||
' therefore Rel...() implements an automatic line break based on spaces (like in all other objects).
|
||||
' If a $type contains \n then these are used (and no automatic space based line breaks are done)
|
||||
' $REL_TECHN_MAX_CHAR_WIDTH defines the automatic line break position
|
||||
!global $REL_TECHN_MAX_CHAR_WIDTH = 35
|
||||
!global $REL_DESCR_MAX_CHAR_WIDTH = 32
|
||||
|
||||
!unquoted function $breakDescr($descr, $widthStr)
|
||||
!$width = %intval($widthStr)
|
||||
!$multiLine = ""
|
||||
!if (%strpos($descr, "\n") >= 0)
|
||||
!else
|
||||
!while (%strlen($descr)>$width)
|
||||
!$brPos = $width
|
||||
!while ($brPos>0 && %substr($descr, $brPos, 1)!= ' ')
|
||||
!$brPos = $brPos - 1
|
||||
!endwhile
|
||||
|
||||
!if ($brPos < 1)
|
||||
!$brPos = %strpos($descr, " ")
|
||||
!else
|
||||
!endif
|
||||
|
||||
!if ($brPos > 0)
|
||||
!$multiLine = $multiLine + %substr($descr, 0, $brPos) + "\n"
|
||||
!$descr = %substr($descr, $brPos + 1)
|
||||
!else
|
||||
!$multiLine = $multiLine+ $descr
|
||||
!$descr = ""
|
||||
!endif
|
||||
!endwhile
|
||||
!endif
|
||||
!if (%strlen($descr)>0)
|
||||
!$multiLine = $multiLine + $descr
|
||||
!endif
|
||||
!return $multiLine
|
||||
!endfunction
|
||||
|
||||
' $breakTechn() supports //...//; $breakNode() in C4_Deployment supports no //....//
|
||||
!unquoted function $breakTechn($techn, $widthStr)
|
||||
!$width = %intval($widthStr)
|
||||
!$multiLine = ""
|
||||
!if (%strpos($techn, "\n") >= 0)
|
||||
!while (%strpos($techn, "\n") >= 0)
|
||||
!$brPos = %strpos($techn, "\n")
|
||||
!$multiLine = $multiLine + %substr($techn, 0, $brPos) + '</size>//\n//<size:'+$TECHN_FONT_SIZE+'>'
|
||||
!$techn = %substr($techn, $brPos+2)
|
||||
!endwhile
|
||||
!else
|
||||
!while (%strlen($techn)>$width)
|
||||
!$brPos = $width
|
||||
!while ($brPos>0 && %substr($techn, $brPos, 1)!= ' ')
|
||||
!$brPos = $brPos - 1
|
||||
!endwhile
|
||||
|
||||
!if ($brPos < 1)
|
||||
!$brPos = %strpos($techn, " ")
|
||||
!else
|
||||
!endif
|
||||
|
||||
!if ($brPos > 0)
|
||||
!$multiLine = $multiLine + %substr($techn, 0, $brPos) + '</size>//\n//<size:'+$TECHN_FONT_SIZE+'>'
|
||||
!$techn = %substr($techn, $brPos + 1)
|
||||
!else
|
||||
!$multiLine = $multiLine+ $techn
|
||||
!$techn = ""
|
||||
!endif
|
||||
!endwhile
|
||||
!endif
|
||||
!if (%strlen($techn)>0)
|
||||
!$multiLine = $multiLine + $techn
|
||||
!endif
|
||||
!return $multiLine
|
||||
!endfunction
|
||||
|
||||
' Element properties
|
||||
' ##################################
|
||||
|
||||
@@ -306,7 +504,7 @@ left to right direction
|
||||
!endprocedure
|
||||
|
||||
' has to be last call in diagram
|
||||
!unquoted procedure SHOW_DYNAMIC_LEGEND($hideStereotype="true")
|
||||
!unquoted procedure SHOW_LEGEND($hideStereotype="true")
|
||||
!if ($hideStereotype=="true")
|
||||
hide stereotype
|
||||
!endif
|
||||
@@ -329,13 +527,43 @@ 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
|
||||
' ##################################
|
||||
|
||||
!function $getRel($direction, $alias1, $alias2, $label, $techn, $descr, $sprite, $tags, $link)
|
||||
!$rel = $alias1 + ' ' + $direction + ' ' + $alias2
|
||||
!if ($tags != "")
|
||||
!$rel = $rel + ' ' + $toStereos($tags)
|
||||
!endif
|
||||
!$rel = $rel + ' : '
|
||||
!if ($sprite != "")
|
||||
' if it starts with & it's a OpenIconic, details see https://useiconic.com/open/
|
||||
!if (%substr($sprite, 0, 1) != "&")
|
||||
!$rel = $rel + '<$'+$sprite+'> '
|
||||
!else
|
||||
!$rel = $rel + '<'+$sprite+'> '
|
||||
!endif
|
||||
!endif
|
||||
!if ($link != "")
|
||||
!$rel = $rel + '**[[' + $link + ' ' + $label + ']]**'
|
||||
!else
|
||||
!$rel = $rel + '**' + $label + '**'
|
||||
!endif
|
||||
!if ($techn != "")
|
||||
' line break is not deterministic, calculate it
|
||||
!$rel = $rel + '\n//<size:' + $TECHN_FONT_SIZE + '>[' + $breakTechn($techn, $REL_TECHN_MAX_CHAR_WIDTH) + ']</size>//'
|
||||
!endif
|
||||
!if ($descr != "")
|
||||
' line break is not deterministic, calculate it
|
||||
!$rel = $rel + '\n\n' + $breakDescr($descr, $REL_DESCR_MAX_CHAR_WIDTH)
|
||||
!endif
|
||||
!return $rel
|
||||
!endfunction
|
||||
|
||||
!unquoted procedure Rel_($alias1, $alias2, $label, $direction)
|
||||
$alias1 $direction $alias2 : **$label**
|
||||
!endprocedure
|
||||
@@ -343,143 +571,80 @@ $alias1 $direction $alias2 : **$label**
|
||||
$alias1 $direction $alias2 : **$label**\n//<size:$TECHN_FONT_SIZE>[$techn]</size>//
|
||||
!endprocedure
|
||||
|
||||
!unquoted procedure Rel($from, $to, $label)
|
||||
Rel_($from, $to, $label, "-->>")
|
||||
!endprocedure
|
||||
!unquoted procedure Rel($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "-->>")
|
||||
!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)
|
||||
Rel_($from, $to, $label, "<<-->>")
|
||||
!endprocedure
|
||||
!unquoted procedure BiRel($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "<<-->>")
|
||||
!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)
|
||||
Rel_($from, $to, $label, "<<--")
|
||||
!endprocedure
|
||||
!unquoted procedure Rel_Back($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "<<--")
|
||||
!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)
|
||||
Rel_($from, $to, $label, "->>")
|
||||
!endprocedure
|
||||
!unquoted procedure Rel_Neighbor($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "->>")
|
||||
!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)
|
||||
Rel_($from, $to, $label, "<<-")
|
||||
!endprocedure
|
||||
!unquoted procedure Rel_Back_Neighbor($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "<<-")
|
||||
!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)
|
||||
Rel_($from, $to, $label, "-DOWN->>")
|
||||
!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_D($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "-DOWN->>")
|
||||
!endprocedure
|
||||
!unquoted procedure Rel_Down($from, $to, $label)
|
||||
Rel_($from, $to, $label, "-DOWN->>")
|
||||
!endprocedure
|
||||
!unquoted procedure Rel_Down($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "-DOWN->>")
|
||||
!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)
|
||||
Rel_($from, $to, $label, "<<-DOWN->>")
|
||||
!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_D($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "<<-DOWN->>")
|
||||
!endprocedure
|
||||
!unquoted procedure BiRel_Down($from, $to, $label)
|
||||
Rel_($from, $to, $label, "<<-DOWN->>")
|
||||
!endprocedure
|
||||
!unquoted procedure BiRel_Down($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "<<-DOWN->>")
|
||||
!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)
|
||||
Rel_($from, $to, $label, "-UP->>")
|
||||
!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_U($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "-UP->>")
|
||||
!endprocedure
|
||||
!unquoted procedure Rel_Up($from, $to, $label)
|
||||
Rel_($from, $to, $label, "-UP->>")
|
||||
!endprocedure
|
||||
!unquoted procedure Rel_Up($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "-UP->>")
|
||||
!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)
|
||||
Rel_($from, $to, $label, "<<-UP->>")
|
||||
!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_U($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "<<-UP->>")
|
||||
!endprocedure
|
||||
!unquoted procedure BiRel_Up($from, $to, $label)
|
||||
Rel_($from, $to, $label, "<<-UP->>")
|
||||
!endprocedure
|
||||
!unquoted procedure BiRel_Up($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "<<-UP->>")
|
||||
!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)
|
||||
Rel_($from, $to, $label, "-LEFT->>")
|
||||
!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_L($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "-LEFT->>")
|
||||
!endprocedure
|
||||
!unquoted procedure Rel_Left($from, $to, $label)
|
||||
Rel_($from, $to, $label, "-LEFT->>")
|
||||
!endprocedure
|
||||
!unquoted procedure Rel_Left($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "-LEFT->>")
|
||||
!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)
|
||||
Rel_($from, $to, $label, "<<-LEFT->>")
|
||||
!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_L($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "<<-LEFT->>")
|
||||
!endprocedure
|
||||
!unquoted procedure BiRel_Left($from, $to, $label)
|
||||
Rel_($from, $to, $label, "<<-LEFT->>")
|
||||
!endprocedure
|
||||
!unquoted procedure BiRel_Left($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "<<-LEFT->>")
|
||||
!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)
|
||||
Rel_($from, $to, $label, "-RIGHT->>")
|
||||
!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_R($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "-RIGHT->>")
|
||||
!endprocedure
|
||||
!unquoted procedure Rel_Right($from, $to, $label)
|
||||
Rel_($from, $to, $label, "-RIGHT->>")
|
||||
!endprocedure
|
||||
!unquoted procedure Rel_Right($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "-RIGHT->>")
|
||||
!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)
|
||||
Rel_($from, $to, $label, "<<-RIGHT->>")
|
||||
!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_R($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "<<-RIGHT->>")
|
||||
!endprocedure
|
||||
!unquoted procedure BiRel_Right($from, $to, $label)
|
||||
Rel_($from, $to, $label, "<<-RIGHT->>")
|
||||
!endprocedure
|
||||
!unquoted procedure BiRel_Right($from, $to, $label, $techn)
|
||||
Rel_($from, $to, $label, $techn, "<<-RIGHT->>")
|
||||
!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
|
||||
@@ -496,4 +661,4 @@ $from -[hidden]R- $to
|
||||
!endprocedure
|
||||
!unquoted procedure Lay_L($from, $to)
|
||||
$from -[hidden]L- $to
|
||||
!endprocedure
|
||||
!endprocedure
|
||||
|
||||
+15
-15
@@ -23,8 +23,8 @@
|
||||
' Styling
|
||||
' ##################################
|
||||
|
||||
UpdateSkinparamsAndLegendEntry("component", $COMPONENT_BG_COLOR, $COMPONENT_FONT_COLOR, $COMPONENT_BORDER_COLOR)
|
||||
UpdateSkinparamsAndLegendEntry("external_component", $EXTERNAL_COMPONENT_BG_COLOR, $COMPONENT_FONT_COLOR, $EXTERNAL_COMPONENT_BORDER_COLOR)
|
||||
UpdateElementStyle("component", $COMPONENT_BG_COLOR, $COMPONENT_FONT_COLOR, $COMPONENT_BORDER_COLOR)
|
||||
UpdateElementStyle("external_component", $EXTERNAL_COMPONENT_BG_COLOR, $COMPONENT_FONT_COLOR, $EXTERNAL_COMPONENT_BORDER_COLOR)
|
||||
|
||||
' Layout
|
||||
' ##################################
|
||||
@@ -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
|
||||
!endprocedure
|
||||
!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
|
||||
|
||||
+16
-16
@@ -20,8 +20,8 @@
|
||||
|
||||
' Styling
|
||||
' ##################################
|
||||
UpdateSkinparamsAndLegendEntry("container", $CONTAINER_BG_COLOR, $ELEMENT_FONT_COLOR, $CONTAINER_BORDER_COLOR)
|
||||
UpdateSkinparamsAndLegendEntry("external_container", $EXTERNAL_CONTAINER_BG_COLOR, $ELEMENT_FONT_COLOR, $EXTERNAL_CONTAINER_BORDER_COLOR)
|
||||
UpdateElementStyle("container", $CONTAINER_BG_COLOR, $ELEMENT_FONT_COLOR, $CONTAINER_BORDER_COLOR)
|
||||
UpdateElementStyle("external_container", $EXTERNAL_CONTAINER_BG_COLOR, $ELEMENT_FONT_COLOR, $EXTERNAL_CONTAINER_BORDER_COLOR)
|
||||
|
||||
' Layout
|
||||
' ##################################
|
||||
@@ -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
|
||||
|
||||
+25
-24
@@ -25,10 +25,10 @@
|
||||
' Styling
|
||||
' ##################################
|
||||
|
||||
UpdateSkinparamsAndLegendEntry("person", $PERSON_BG_COLOR, $ELEMENT_FONT_COLOR, $PERSON_BORDER_COLOR)
|
||||
UpdateSkinparamsAndLegendEntry("external_person", $EXTERNAL_PERSON_BG_COLOR, $ELEMENT_FONT_COLOR, $EXTERNAL_PERSON_BORDER_COLOR)
|
||||
UpdateSkinparamsAndLegendEntry("system", $SYSTEM_BG_COLOR, $ELEMENT_FONT_COLOR, $SYSTEM_BORDER_COLOR)
|
||||
UpdateSkinparamsAndLegendEntry("external_system", $EXTERNAL_SYSTEM_BG_COLOR, $ELEMENT_FONT_COLOR, $EXTERNAL_SYSTEM_BORDER_COLOR)
|
||||
UpdateElementStyle("person", $PERSON_BG_COLOR, $ELEMENT_FONT_COLOR, $PERSON_BORDER_COLOR)
|
||||
UpdateElementStyle("external_person", $EXTERNAL_PERSON_BG_COLOR, $ELEMENT_FONT_COLOR, $EXTERNAL_PERSON_BORDER_COLOR)
|
||||
UpdateElementStyle("system", $SYSTEM_BG_COLOR, $ELEMENT_FONT_COLOR, $SYSTEM_BORDER_COLOR)
|
||||
UpdateElementStyle("external_system", $EXTERNAL_SYSTEM_BG_COLOR, $ELEMENT_FONT_COLOR, $EXTERNAL_SYSTEM_BORDER_COLOR)
|
||||
|
||||
|
||||
' Sprites
|
||||
@@ -202,44 +202,45 @@ 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
|
||||
|
||||
!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
|
||||
' ##################################
|
||||
|
||||
!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
|
||||
|
||||
+24
-55
@@ -16,8 +16,8 @@
|
||||
' ##################################
|
||||
|
||||
' orig was without background
|
||||
'UpdateSkinparamsAndLegendEntry("node", $fontColor=$NODE_FONT_COLOR, $borderColor=$NODE_BORDER_COLOR)
|
||||
UpdateSkinparamsAndLegendEntry("node", $bgColor=$NODE_BG_COLOR, $fontColor=$NODE_FONT_COLOR, $borderColor=$NODE_BORDER_COLOR)
|
||||
'UpdateElementStyle("node", $fontColor=$NODE_FONT_COLOR, $borderColor=$NODE_BORDER_COLOR)
|
||||
UpdateElementStyle("node", $bgColor=$NODE_BG_COLOR, $fontColor=$NODE_FONT_COLOR, $borderColor=$NODE_BORDER_COLOR)
|
||||
skinparam rectangle<<node>> {
|
||||
FontStyle normal
|
||||
}
|
||||
@@ -25,23 +25,20 @@ skinparam rectangle<<node>> {
|
||||
' Layout
|
||||
' ##################################
|
||||
|
||||
' comment if node should not be added to legend. No dynamic legend extension required
|
||||
' comment if node should not be added to legend. No calculated legend extension required
|
||||
SetDefaultLegendEntries("person\nsystem\ncontainer\nexternal_person\nexternal_system\nexternal_container\nnode")
|
||||
|
||||
' Special
|
||||
' Line breaks
|
||||
' ##################################
|
||||
|
||||
' PlantUML supports no automatic line breaks of "PlantUML containers" (C4 Deployment_Node is a "PlantUML container")
|
||||
' therefore Deployment_Node() implements an automatic line break based on spaces (like in all other objects).
|
||||
' If a $type contains \n then the these are used (and no automatic space based line breaks are done)
|
||||
' therefore (Deployment_)Node() implements an automatic line break based on spaces (like in all other objects).
|
||||
' If a $type contains \n then these are used (and no automatic space based line breaks are done)
|
||||
' $NODE_TYPE_MAX_CHAR_WIDTH defines the automatic line break position
|
||||
!global $NODE_TYPE_MAX_CHAR_WIDTH = 35
|
||||
!global $NODE_DESCR_MAX_CHAR_WIDTH=32
|
||||
|
||||
' Elements
|
||||
' ##################################
|
||||
|
||||
!unquoted function $breakType($type, $widthStr)
|
||||
!unquoted function $breakNode($type, $widthStr)
|
||||
!$width = %intval($widthStr)
|
||||
!$multiLine = ""
|
||||
!if (%strpos($type, "\n") >= 0)
|
||||
@@ -77,36 +74,8 @@ SetDefaultLegendEntries("person\nsystem\ncontainer\nexternal_person\nexternal_sy
|
||||
!return $multiLine
|
||||
!endfunction
|
||||
|
||||
!unquoted function $breakDescr($descr, $widthStr)
|
||||
!$width = %intval($widthStr)
|
||||
!$multiLine = ""
|
||||
!if (%strpos($descr, "\n") >= 0)
|
||||
!else
|
||||
!while (%strlen($descr)>$width)
|
||||
!$brPos = $width
|
||||
!while ($brPos>0 && %substr($descr, $brPos, 1)!= ' ')
|
||||
!$brPos = $brPos - 1
|
||||
!endwhile
|
||||
|
||||
!if ($brPos < 1)
|
||||
!$brPos = %strpos($descr, " ")
|
||||
!else
|
||||
!endif
|
||||
|
||||
!if ($brPos > 0)
|
||||
!$multiLine = $multiLine + %substr($descr, 0, $brPos) + "\n"
|
||||
!$descr = %substr($descr, $brPos + 1)
|
||||
!else
|
||||
!$multiLine = $multiLine+ $descr
|
||||
!$descr = ""
|
||||
!endif
|
||||
!endwhile
|
||||
!endif
|
||||
!if (%strlen($descr)>0)
|
||||
!$multiLine = $multiLine + $descr
|
||||
!endif
|
||||
!return $multiLine
|
||||
!endfunction
|
||||
' Elements
|
||||
' ##################################
|
||||
|
||||
!function $getNode($label, $type, $descr, $sprite)
|
||||
!$nodeText = ""
|
||||
@@ -115,7 +84,7 @@ SetDefaultLegendEntries("person\nsystem\ncontainer\nexternal_person\nexternal_sy
|
||||
!endif
|
||||
!$nodeText = $nodeText + '==' + $label
|
||||
!if ($type != "")
|
||||
!$nodeText = $nodeText + '\n<size:' + $TECHN_FONT_SIZE + '>[' + $breakType($type, $NODE_TYPE_MAX_CHAR_WIDTH) + ']</size>'
|
||||
!$nodeText = $nodeText + '\n<size:' + $TECHN_FONT_SIZE + '>[' + $breakNode($type, $NODE_TYPE_MAX_CHAR_WIDTH) + ']</size>'
|
||||
!endif
|
||||
!if ($descr != "")
|
||||
!$nodeText = $nodeText + '\n\n' + $breakDescr($descr, $NODE_DESCR_MAX_CHAR_WIDTH)
|
||||
@@ -130,7 +99,7 @@ SetDefaultLegendEntries("person\nsystem\ncontainer\nexternal_person\nexternal_sy
|
||||
!endif
|
||||
!$nodeText = $nodeText + '==' + $label
|
||||
!if ($type != "")
|
||||
!$nodeText = $nodeText + '\l<size:' + $TECHN_FONT_SIZE + '>[' + $breakType($type, $NODE_TYPE_MAX_CHAR_WIDTH) + ']</size>'
|
||||
!$nodeText = $nodeText + '\l<size:' + $TECHN_FONT_SIZE + '>[' + $breakNode($type, $NODE_TYPE_MAX_CHAR_WIDTH) + ']</size>'
|
||||
!endif
|
||||
!if ($descr != "")
|
||||
!$nodeText = $nodeText + '\l\l' + $breakDescr($descr, $NODE_DESCR_MAX_CHAR_WIDTH)
|
||||
@@ -145,7 +114,7 @@ SetDefaultLegendEntries("person\nsystem\ncontainer\nexternal_person\nexternal_sy
|
||||
!endif
|
||||
!$nodeText = $nodeText + '==' + $label
|
||||
!if ($type != "")
|
||||
!$nodeText = $nodeText + '\r<size:' + $TECHN_FONT_SIZE + '>[' + $breakType($type, $NODE_TYPE_MAX_CHAR_WIDTH) + ']</size>'
|
||||
!$nodeText = $nodeText + '\r<size:' + $TECHN_FONT_SIZE + '>[' + $breakNode($type, $NODE_TYPE_MAX_CHAR_WIDTH) + ']</size>'
|
||||
!endif
|
||||
!if ($descr != "")
|
||||
!$nodeText = $nodeText + '\r\r' + $breakDescr($descr, $NODE_DESCR_MAX_CHAR_WIDTH)
|
||||
@@ -153,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
|
||||
|
||||
+50
-122
@@ -58,161 +58,89 @@
|
||||
' Relationship
|
||||
' ##################################
|
||||
|
||||
!unquoted procedure Rel_($e_index, $alias1, $alias2, $label, $direction="")
|
||||
!unquoted procedure Rel_($e_index, $alias1, $alias2, $label, $direction)
|
||||
$alias1 $direction $alias2 : **$e_index: $label**
|
||||
!endprocedure
|
||||
!unquoted procedure Rel_($e_index, $alias1, $alias2, $label, $techn, $direction="")
|
||||
!unquoted procedure Rel_($e_index, $alias1, $alias2, $label, $techn, $direction)
|
||||
$alias1 $direction $alias2 : **$e_index: $label**\n//<size:$TECHN_FONT_SIZE>[$techn]</size>//
|
||||
!endprocedure
|
||||
|
||||
!unquoted procedure Rel($from, $to, $label)
|
||||
Rel_(Index(), $from, $to, $label, "-->>")
|
||||
!unquoted procedure Rel($from, $to, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
|
||||
$getRel("-->>", $from, $to, Index() + ": " + $label, $techn, $descr, $sprite, $tags, $link)
|
||||
!endprocedure
|
||||
!unquoted procedure Rel($from, $to, $label, $techn)
|
||||
Rel_(Index(), $from, $to, $label, $techn, "-->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex($e_index, $from, $to, $label)
|
||||
Rel_($e_index, $from, $to, $label, "-->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex($e_index, $from, $to, $label, $tech)
|
||||
Rel_($e_index, $from, $to, $label, $tech, "-->>")
|
||||
!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)
|
||||
Rel_(Index(), $from, $to, $label, "<<--")
|
||||
!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 Rel_Back($from, $to, $label, $techn)
|
||||
Rel_(Index(), $from, $to, $label, $techn, "<<--")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_Back($e_index, $from, $to, $label)
|
||||
Rel_($e_index, $from, $to, $label, "<<--")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_Back($e_index, $from, $to, $label, $techn)
|
||||
Rel_($e_index, $from, $to, $label, $techn, "<<--")
|
||||
!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)
|
||||
Rel_(Index(), $from, $to, $label, "->>")
|
||||
!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 Rel_Neighbor($from, $to, $label, $techn)
|
||||
Rel_(Index(), $from, $to, $label, $techn, "->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_Neighbor($e_index, $from, $to, $label)
|
||||
Rel_($e_index, $from, $to, $label, "->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_Neighbor($e_index, $from, $to, $label, $techn)
|
||||
Rel_($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)
|
||||
Rel_(Index(), $from, $to, $label, "<<-")
|
||||
!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 Rel_Back_Neighbor($from, $to, $label, $techn)
|
||||
Rel_(Index(), $from, $to, $label, $techn, "<<-")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_Back_Neighbor($e_index, $from, $to, $label)
|
||||
Rel_($e_index, $from, $to, $label, "<<-")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_Back_Neighbor($e_index, $from, $to, $label, $techn)
|
||||
Rel_($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)
|
||||
Rel_(Index(), $from, $to, $label, "-DOWN->>")
|
||||
!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_D($from, $to, $label, $techn)
|
||||
Rel_(Index(), $from, $to, $label, $techn, "-DOWN->>")
|
||||
!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 Rel_Down($from, $to, $label)
|
||||
Rel_(Index(), $from, $to, $label, "-DOWN->>")
|
||||
!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 Rel_Down($from, $to, $label, $techn)
|
||||
Rel_(Index(), $from, $to, $label, $techn, "-DOWN->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_D($e_index, $from, $to, $label)
|
||||
Rel_($e_index, $from, $to, $label, "-DOWN->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_D($e_index, $from, $to, $label, $techn)
|
||||
Rel_($e_index, $from, $to, $label, $techn, "-DOWN->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_Down($e_index, $from, $to, $label)
|
||||
Rel_($e_index, $from, $to, $label, "-DOWN->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_Down($e_index, $from, $to, $label, $techn)
|
||||
Rel_($e_index, $from, $to, $label, $techn, "-DOWN->>")
|
||||
!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)
|
||||
Rel_(Index(), $from, $to, $label, "-UP->>")
|
||||
!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_U($from, $to, $label, $techn)
|
||||
Rel_(Index(), $from, $to, $label, $techn, "-UP->>")
|
||||
!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 Rel_Up($from, $to, $label)
|
||||
Rel_(Index(), $from, $to, $label, "-UP->>")
|
||||
!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 Rel_Up($from, $to, $label, $techn)
|
||||
Rel_(Index(), $from, $to, $label, $techn, "-UP->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_U($e_index, $from, $to, $label)
|
||||
Rel_($e_index, $from, $to, $label, "-UP->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_U($e_index, $from, $to, $label, $techn)
|
||||
Rel_($e_index, $from, $to, $label, $techn, "-UP->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_Up($e_index, $from, $to, $label)
|
||||
Rel_($e_index, $from, $to, $label, "-UP->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_Up($e_index, $from, $to, $label, $techn)
|
||||
Rel_($e_index, $from, $to, $label, $techn, "-UP->>")
|
||||
!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)
|
||||
Rel_(Index(), $from, $to, $label, "-LEFT->>")
|
||||
!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_L($from, $to, $label, $techn)
|
||||
Rel_(Index(), $from, $to, $label, $techn, "-LEFT->>")
|
||||
!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 Rel_Left($from, $to, $label)
|
||||
Rel_(Index(), $from, $to, $label, "-LEFT->>")
|
||||
!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 Rel_Left($from, $to, $label, $techn)
|
||||
Rel_(Index(), $from, $to, $label, $techn, "-LEFT->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_L($e_index, $from, $to, $label)
|
||||
Rel_($e_index, $from, $to, $label, "-LEFT->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_L($e_index, $from, $to, $label, $techn)
|
||||
Rel_($e_index, $from, $to, $label, $techn, "-LEFT->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_Left($e_index, $from, $to, $label)
|
||||
Rel_($e_index, $from, $to, $label, "-LEFT->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_Left($e_index, $from, $to, $label, $techn)
|
||||
Rel_($e_index, $from, $to, $label, $techn, "-LEFT->>")
|
||||
!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)
|
||||
Rel_(Index(), $from, $to, $label, "-RIGHT->>")
|
||||
!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_R($from, $to, $label, $techn)
|
||||
Rel_(Index(), $from, $to, $label, $techn, "-RIGHT->>")
|
||||
!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 Rel_Right($from, $to, $label)
|
||||
Rel_(Index(), $from, $to, $label, "-RIGHT->>")
|
||||
!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 Rel_Right($from, $to, $label, $techn)
|
||||
Rel_(Index(), $from, $to, $label, $techn, "-RIGHT->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_R($e_index, $from, $to, $label)
|
||||
Rel_($e_index, $from, $to, $label, "-RIGHT->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_R($e_index, $from, $to, $label, $techn)
|
||||
Rel_($e_index, $from, $to, $label, $techn, "-RIGHT->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_Right($e_index, $from, $to, $label)
|
||||
Rel_($e_index, $from, $to, $label, "-RIGHT->>")
|
||||
!endprocedure
|
||||
!unquoted procedure RelIndex_Right($e_index, $from, $to, $label, $techn)
|
||||
Rel_($e_index, $from, $to, $label, $techn, "-RIGHT->>")
|
||||
!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
|
||||
|
||||
+13
-13
@@ -53,7 +53,7 @@ Rel(web_app, twitter, "Gets tweets from", "HTTPS")
|
||||

|
||||
|
||||
|
||||
## LAYOUT_WITH_LEGEND() or SHOW_DYNAMIC_LEGEND(?hideStereotype)
|
||||
## LAYOUT_WITH_LEGEND() or SHOW_LEGEND(?hideStereotype)
|
||||
|
||||
Colors can help to add additional information or simply to make the diagram more aesthetically pleasing.
|
||||
It can also help to save some space.
|
||||
@@ -80,16 +80,16 @@ Rel(web_app, twitter, "Gets tweets from", "HTTPS")
|
||||
|
||||

|
||||
|
||||
Instead of a static legend (activated with `LAYOUT_WITH_LEGEND()`) a dynamic legend can be activated with `SHOW_DYNAMIC_LEGEND(?hideStereotype)`.
|
||||
Instead of a static legend (activated with `LAYOUT_WITH_LEGEND()`) a calculated legend can be activated with `SHOW_LEGEND(?hideStereotype)`.
|
||||
|
||||
The dynamic legend has following differences:
|
||||
The calculated legend has following differences:
|
||||
* only relevant elements are listed
|
||||
* custom tags/stereotypes are supported
|
||||
* stereotypes can remain visible (with `SHOW_DYNAMIC_LEGEND(false)`)
|
||||
* **`SHOW_DYNAMIC_LEGEND()` has to be last call in the diagram**
|
||||
* custom tags/styles are supported
|
||||
* stereotypes can remain visible (with `SHOW_LEGEND(false)`)
|
||||
* **`SHOW_LEGEND()` has to be last call in the diagram**
|
||||
|
||||
```csharp
|
||||
@startuml SHOW_DYNAMIC_LEGEND Sample
|
||||
@startuml SHOW_LEGEND Sample
|
||||
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
|
||||
|
||||
Person(admin, "Administrator")
|
||||
@@ -101,11 +101,11 @@ System(twitter, "Twitter")
|
||||
Rel(admin, web_app, "Uses", "HTTPS")
|
||||
Rel(web_app, twitter, "Gets tweets from", "HTTPS")
|
||||
|
||||
SHOW_DYNAMIC_LEGEND()
|
||||
SHOW_LEGEND()
|
||||
@enduml
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
## LAYOUT_AS_SKETCH()
|
||||
|
||||
@@ -185,7 +185,7 @@ Person(userB, "User B", "with predefined sprite person2", "person2")
|
||||
@enduml
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
**Using HIDE_PERSON_SPRITE()**
|
||||
@@ -207,7 +207,7 @@ Rel(web_app, twitter, "Gets tweets from", "HTTPS")
|
||||
@enduml
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
**Using SHOW_PERSON_SPRITE()**
|
||||
|
||||
@@ -229,7 +229,7 @@ Rel(web_app, twitter, "Gets tweets from", "HTTPS")
|
||||
@enduml
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
**Using SHOW_PERSON_SPRITE(sprite)**
|
||||
|
||||
@@ -253,5 +253,5 @@ Rel(web_app, twitter, "Gets tweets from", "HTTPS")
|
||||
@enduml
|
||||
```
|
||||
|
||||
")
|
||||
")
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||

|
||||
|
||||
C4-PlantUML combines the benefits of [PlantUML](http://en.plantuml.com/) and the [C4 model](https://c4model.com/) for providing a simple way of describing and communicate software architectures – especially during up-front design sessions – with an intuitive language using open source and platform independent tools.
|
||||
C4-PlantUML combines the benefits of [PlantUML](https://plantuml.com/) and the [C4 model](https://c4model.com/) for providing a simple way of describing and communicate software architectures – especially during up-front design sessions – with an intuitive language using open source and platform independent tools.
|
||||
|
||||
C4-PlantUML includes macros, stereotypes, and other goodies (like VSCode Snippets) for creating C4 diagrams with PlantUML.
|
||||
|
||||
@@ -32,6 +32,8 @@ If you want to use the always up-to-date version in this repo, use the following
|
||||
|
||||
Now let's create a C4 Container diagram:
|
||||
|
||||
\(If you don't want run PlantUML locally you can use e.g. the [PlantUML Web Server](https://www.plantuml.com/plantuml/uml/ZOxDIWGn48JlUOeufn5qSjcJfvNHsugBFsV99iqcsEc4T0VTjpSCE2AYUAeAgVwgjYosIakevytBBK824bPdaHms3pg85BuofjgtwHWbj4DZg2wJzDpaSZAliRh04ioykToZ9Nc-snbux_yUlEdGkOTj9AXJwJLAxQ5ofh4iSetHyeKUTlO0E7HpNoHcigXlW5sDosiuLojaT9_kn-aJk40Py_7q1-Znn09fv4N-swuU0ByFNbVyZlYQqmbR8DyIVW00) too.)
|
||||
|
||||
After you have included `C4_Container.puml` you can use the defined macro definitions for the C4 elements: `Person`, `Person_Ext`, `System`, `System_Ext`, `Container`, `Relationship`, `Boundary`, and `System_Boundary`
|
||||
|
||||
```csharp
|
||||
@@ -69,7 +71,7 @@ Rel(web_app, twitter, "Gets tweets from", "HTTPS")
|
||||
|
||||

|
||||
|
||||
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
|
||||
@@ -84,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")
|
||||
@@ -95,16 +97,42 @@ Rel_R(api, db, "Reads/Writes")
|
||||
@enduml
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
Entities can be decorated with tags and explained via dynamic calculated legends, for example:
|
||||
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
|
||||
```
|
||||
|
||||
> `png` itself supports no links, therefore the following image is generated as `svg` image.
|
||||
> Github does not support `svg` links in README.md.
|
||||
> If you click on the image a new window is opened and there you can use the links.
|
||||
|
||||

|
||||
|
||||
Elements and relations can be decorated with tags and explained via a calculated legend, for example:
|
||||
|
||||
```csharp
|
||||
@startuml
|
||||
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
|
||||
|
||||
AddTagSupport("v1.0", $borderColor="#d73027")
|
||||
AddTagSupport("v1.1", $fontColor="#d73027")
|
||||
AddElementTag("v1.0", $borderColor="#d73027")
|
||||
AddElementTag("v1.1", $fontColor="#d73027")
|
||||
AddElementTag("backup", $fontColor="orange")
|
||||
|
||||
AddRelTag("backup", $textColor="orange", $lineColor="orange")
|
||||
|
||||
Person(user, "Customer", "People that need products")
|
||||
Person(admin, "Administrator", "People that administrates the products via the new v1.1 components", $tags="v1.1")
|
||||
@@ -112,18 +140,20 @@ Container(spa, "SPA", "angular", "The main interface that the customer interacts
|
||||
Container(spaAdmin, "Admin SPA", "angular", "The administrator interface that the customer interacts with via new v1.1", $tags="v1.1")
|
||||
Container(api, "API", "java", "Handles all business logic (incl. new v1.1 extensions)", $tags="v1.0+v1.1")
|
||||
ContainerDb(db, "Database", "Microsoft SQL", "Holds product, order and invoice information")
|
||||
Container(archive, "Archive", "Audit logging", "Stores 5 years", $tags="backup")
|
||||
|
||||
Rel(user, spa, "Uses", "https")
|
||||
Rel(spa, api, "Uses", "https")
|
||||
Rel_R(api, db, "Reads/Writes")
|
||||
Rel(admin, spaAdmin, "Uses", "https")
|
||||
Rel(spaAdmin, api, "Uses", "https")
|
||||
Rel_L(api, archive, "Writes", "messages", $tags="backup")
|
||||
|
||||
SHOW_DYNAMIC_LEGEND()
|
||||
SHOW_LEGEND()
|
||||
@enduml
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
## Supported Diagram Types
|
||||
@@ -133,31 +163,31 @@ Diagram types
|
||||
* System Context & System Landscape diagrams
|
||||
* Import: `!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml`
|
||||
* Macros:
|
||||
* `Person(alias, label, ?description, ?sprite, ?tags)`
|
||||
* `Person(alias, label, ?description, ?sprite, ?tags, $link)`
|
||||
* `Person_Ext`
|
||||
* `System(alias, label, ?description, ?sprite, ?tags)`
|
||||
* `System(alias, label, ?description, ?sprite, ?tags, $link)`
|
||||
* `SystemDb`
|
||||
* `SystemQueue`
|
||||
* `System_Ext`
|
||||
* `SystemDb_Ext`
|
||||
* `SystemQueue_Ext`
|
||||
* `Boundary(alias, label, ?type, ?tags)`
|
||||
* `Enterprise_Boundary(alias, label, ?tags)`
|
||||
* `Boundary(alias, label, ?type, ?tags, $link)`
|
||||
* `Enterprise_Boundary(alias, label, ?tags, $link)`
|
||||
* `System_Boundary`
|
||||
* Container diagram
|
||||
* Import: `!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml`
|
||||
* Additional Macros:
|
||||
* `Container(alias, label, technology, ?description, ?sprite, ?tags)`
|
||||
* `Container(alias, label, technology, ?description, ?sprite, ?tags, $link)`
|
||||
* `ContainerDb`
|
||||
* `ContainerQueue`
|
||||
* `Container_Ext`
|
||||
* `ContainerDb_Ext`
|
||||
* `ContainerQueue_Ext`
|
||||
* `Container_Boundary(alias, label)`
|
||||
* `Container_Boundary(alias, label, ?tags, $link)`
|
||||
* Component diagram
|
||||
* Import: `!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml`
|
||||
* Additional Macros:
|
||||
* `Component(alias, label, technology, ?description, ?sprite, ?tags)`
|
||||
* `Component(alias, label, technology, ?description, ?sprite, ?tags, $link)`
|
||||
* `ComponentDb`
|
||||
* `ComponentQueue`
|
||||
* `Component_Ext`
|
||||
@@ -166,28 +196,28 @@ Diagram types
|
||||
* Dynamic diagram
|
||||
* Import: `!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Dynamic.puml`
|
||||
* Additional Macros:
|
||||
* `RelIndex(index, from, to, label)`
|
||||
* `RelIndex(index, from, to, label, ?tags, $link)`
|
||||
* (lowercase) `increment($offset=1)`: increase current index (procedure which has no direct output)
|
||||
* (lowercase) `setIndex($new_index)`: set the new index (procedure which has no direct output)
|
||||
* `LastIndex()`: return the last used index (function which can be used as argument)
|
||||
|
||||
following 2 macros requires V1.2020.24Beta4 (can be already tested with http://www.plantuml.com/plantuml/)
|
||||
following 2 macros requires V1.2020.24Beta4 (can be already tested with https://www.plantuml.com/plantuml/)
|
||||
* `Index($offset=1)`: returns current index and calculates next index (function which can be used as argument)
|
||||
* `SetIndex($new_index)`: returns new set index and calculates next index (function which can be used as argument)
|
||||
|
||||
* Deployment diagram
|
||||
* Import: `!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Deployment.puml`
|
||||
* Additional Macros:
|
||||
* `Deployment_Node(alias, label, ?type, ?description, ?sprite, ?tags)`
|
||||
* `Node(alias, label, ?type, ?description, ?sprite, ?tags)`: short name of Deployment_Node()
|
||||
* `Node_L(alias, label, ?type, ?description, ?sprite, ?tags)`: left aligned Node()
|
||||
* `Node_R(alias, label, ?type, ?description, ?sprite, ?tags)`: right aligned Node()
|
||||
* `Deployment_Node(alias, label, ?type, ?description, ?sprite, ?tags, $link)`
|
||||
* `Node(alias, label, ?type, ?description, ?sprite, ?tags, $link)`: short name of Deployment_Node()
|
||||
* `Node_L(alias, label, ?type, ?description, ?sprite, ?tags, $link)`: left aligned Node()
|
||||
* `Node_R(alias, label, ?type, ?description, ?sprite, ?tags, $link)`: right aligned Node()
|
||||
|
||||
Take a look at each of the [C4 Model Diagram Samples](samples/C4CoreDiagrams.md).
|
||||
|
||||
## Relationship Types
|
||||
|
||||
* `Rel(from, to, label, ?technology)`
|
||||
* `Rel(from, to, label, ?technology, ?description, ?sprite, ?tags, $link)`
|
||||
* `BiRel` (bidirectional relationship)
|
||||
|
||||
You can force the direction of a relationship by using:
|
||||
@@ -197,6 +227,44 @@ You can force the direction of a relationship by using:
|
||||
* `Rel_L`, `Rel_Left`
|
||||
* `Rel_R`, `Rel_Right`
|
||||
|
||||
Relationship specific sprites are not down scaled, they requires typically smaller icons.
|
||||
Therefore if sprite argument starts with `&` an OpenIconic name can be used too (details see https://useiconic.com/open)
|
||||
|
||||
```csharp
|
||||
@startuml
|
||||
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Dynamic.puml
|
||||
|
||||
Person(user, "User1")
|
||||
Person(user2, "User2")
|
||||
System(system, "System")
|
||||
|
||||
' if sprite starts with &, sprite defines a OpenIconic, details see https://useiconic.com/open/
|
||||
Rel_D(user, system, "requests", "async message", "if sprite starts with &, it defines a OpenIconic like &envelope-closed", $sprite = "&envelope-closed")
|
||||
|
||||
' normal sprites are too big
|
||||
Rel_R(user, user2, "informs", "courier", "normal sprites are too big", "person2")
|
||||
|
||||
' special smaller sprites have to be used
|
||||
sprite $triangle {
|
||||
00000000000
|
||||
00000F00000
|
||||
0000FBF0000
|
||||
0000FBF0000
|
||||
000F999F000
|
||||
000F999F000
|
||||
00F66666F00
|
||||
00F66666F00
|
||||
0F3333333F0
|
||||
0F3333333F0
|
||||
0FFFFFFFFF0
|
||||
00000000000
|
||||
}
|
||||
Rel(user, system, "orders", "http", "only small sprites looks ok, like the small triangle", "triangle")
|
||||
@enduml
|
||||
```
|
||||
|
||||

|
||||
|
||||
In rare cases, you can force the layout of objects which have no relationships by using:
|
||||
|
||||
* `Lay_U`
|
||||
@@ -235,14 +303,14 @@ Rel_L(x, s4, "uses")
|
||||
@enduml
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
## Layout Options
|
||||
|
||||
C4-PlantUML also comes with some layout options to make it easy and reusable to create nice and useful diagrams:
|
||||
|
||||
* [LAYOUT_TOP_DOWN() or LAYOUT_LEFT_RIGHT()](LayoutOptions.md#layout_top_down-or-layout_left_right)
|
||||
* [LAYOUT_WITH_LEGEND() or SHOW_DYNAMIC_LEGEND(?hideStereotype)](LayoutOptions.md#layout_with_legend-or-show_dynamic_legend)
|
||||
* [LAYOUT_WITH_LEGEND() or SHOW_LEGEND(?hideStereotype)](LayoutOptions.md#layout_with_legend-or-SHOW_LEGEND)
|
||||
* [LAYOUT_AS_SKETCH()](LayoutOptions.md#layout_as_sketch)
|
||||
* [HIDE_STEREOTYPE()](LayoutOptions.md#hide_stereotype)
|
||||
|
||||
@@ -255,32 +323,46 @@ C4-PlantUML also comes with some default person sprite options:
|
||||
|
||||
Additional tags/stereotypes can be added to the existing element stereotypes (component, ...) and highlight,... specific aspects:
|
||||
|
||||
* `AddTagSupport(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing)`:
|
||||
After this call the given tag can be used in the diagram, the styles of the tagged elements are updated and the tag is be displayed in the dynamic legend.
|
||||
* `UpdateSkinparamsAndLegendEntry(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing)`
|
||||
This call updates the style of the default element stereotypes (component, ...) and creates no additional legend entry.
|
||||
* `AddElementTag(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing)`:
|
||||
Introduces a new element tag. The styles of the tagged elements are updated and the tag is displayed in the calculated legend.
|
||||
* `AddRelTag(tagStereo, ?textColor, ?lineColor)`:
|
||||
Introduces a new relation tag. The styles of the tagged relations are updated and the tag is displayed in the calculated legend.
|
||||
|
||||
Each element can be extended with one or multiple custom tags/stereotypes via the keyword argument `$tags="..."`, like `Container(spaAdmin, "Admin SPA", $tags="v1.1")`.
|
||||
* `UpdateElementStyle(elementName, ?bgColor, ?fontColor, ?borderColor, ?shadowing)`
|
||||
This call updates the default style of the elements (component, ...) and creates no additional legend entry.
|
||||
* `UpdateRelStyle(textColor, lineColor)`
|
||||
This call updates the default relationship colors and creates no additional legend entry.
|
||||
|
||||
Each element can be extended with one or multiple custom tags via the keyword argument `$tags="..."`, like `Container(spaAdmin, "Admin SPA", $tags="v1.1")`.
|
||||
Multiple tags can be combined with `+`, like `Container(api, "API", $tags="v1.0+v1.1")`.
|
||||
|
||||
**Comments**
|
||||
|
||||
* `SHOW_DYNAMIC_LEGEND()` supports the customized stereotypes
|
||||
* `SHOW_LEGEND()` supports the customized stereotypes
|
||||
(`LAYOUT_WITH_LEGEND()` cannot be used, if the custom tags/stereotypes should be displayed in the legend).
|
||||
* `SHOW_DYNAMIC_LEGEND()` has to be last line in diagram.
|
||||
* `SHOW_LEGEND()` has to be last line in diagram.
|
||||
* Don't use space between `$tags` and `=` (PlantUML does not support it).
|
||||
* Don't use `,` as part of the tag names (PlantUML does not support it in combination with keyword arguments).
|
||||
* If 2 tags defines the same skinparameter, the first definition is used.
|
||||
* If specific skinparameters have to be merged (e.g. 2 tags change the font color) an additional combined tag has to be defined. Use `&` as part of combined tag names. This convention can be used in other tools.
|
||||
* If 2 tags defines the same skinparam, the first definition is used.
|
||||
* If specific skinparams have to be merged (e.g. 2 tags change the font color) an additional combined tag has to be defined. Use `&` as part of combined tag names.
|
||||
|
||||
* Colors of relationship tags cannot be automatically merged (PlantUML does not support it).
|
||||
If one tag modifies the line color and the other the text color, an additional combined tag has to be defined and used.
|
||||
|
||||
```csharp
|
||||
@startuml
|
||||
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
|
||||
|
||||
AddTagSupport("v1.0", $fontColor="#d73027", $borderColor="#d73027")
|
||||
AddTagSupport("v1.1", $fontColor="#ffffbf", $borderColor="#ffffbf")
|
||||
AddTagSupport("v1.0&v1.1", $fontColor="#fdae61", $borderColor="#fdae61")
|
||||
AddTagSupport("fallback", $bgColor="#888888")
|
||||
UpdateElementStyle(person, $fontColor="green")
|
||||
AddElementTag("v1.0", $fontColor="#d73027", $borderColor="#d73027")
|
||||
AddElementTag("v1.1", $fontColor="#ffffbf", $borderColor="#ffffbf")
|
||||
AddElementTag("v1.0&v1.1", $fontColor="#fdae61", $borderColor="#fdae61")
|
||||
AddElementTag("fallback", $bgColor="#444444")
|
||||
|
||||
UpdateRelStyle(black, black)
|
||||
AddRelTag("service1", $textColor="red")
|
||||
AddRelTag("service2", $lineColor="red")
|
||||
AddRelTag("service1&service2", $textColor="red", $lineColor="red")
|
||||
|
||||
Container(spa, "SPA", "angular", "The main interface that the customer interacts with via v1.0", $tags="v1.0")
|
||||
Container(spaAdmin, "Admin SPA", "angular", "The administrator interface that the customer interacts with via new v1.1", $tags="v1.1")
|
||||
@@ -293,15 +375,23 @@ Rel(spaAdmin, api, "Uses", "https")
|
||||
Rel_L(spa, spa2, "Updates", "https")
|
||||
Rel_R(spaAdmin, spaAdmin2, "Updates", "https")
|
||||
|
||||
SHOW_DYNAMIC_LEGEND(false)
|
||||
Person(user, "A user")
|
||||
System(system, "A system")
|
||||
|
||||
Rel_D(user, system, "uses service1 via this call", $tags="service1")
|
||||
Rel_D(user, system, "uses service2 via this call", $tags="service2")
|
||||
Rel_D(user, system, "uses both services via this call", $tags="service1&service2+service1+service2")
|
||||
|
||||
Lay_D(api, user)
|
||||
SHOW_LEGEND(false)
|
||||
@enduml
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
**Custom schema definition**
|
||||
|
||||
If the custom (color) schema is defined via `UpdateSkinparamsAndLegendEntry()` then the legend of existing elements is updated too.
|
||||
If the custom (color) schema is defined via `UpdateElementStyle()` then the legend of existing elements is updated too.
|
||||
|
||||
```csharp
|
||||
@startuml
|
||||
@@ -318,11 +408,14 @@ If the custom (color) schema is defined via `UpdateSkinparamsAndLegendEntry()` t
|
||||
!$COLOR_B_3 = "#8073ac"
|
||||
!$COLOR_B_4 = "#542788"
|
||||
!$COLOR_B_5 = "#2d004b"
|
||||
!$COLOR_REL_LINE = "#8073ac"
|
||||
!$COLOR_REL_TEXT = "#8073ac"
|
||||
|
||||
UpdateSkinparamsAndLegendEntry("person", $bgColor=$COLOR_A_5, $fontColor=$COLOR_NEUTRAL, $borderColor=$COLOR_A_1, $shadowing="true")
|
||||
UpdateSkinparamsAndLegendEntry("external_person", $bgColor=$COLOR_B_5, $fontColor=$COLOR_NEUTRAL, $borderColor=$COLOR_B_1)
|
||||
UpdateSkinparamsAndLegendEntry("system", $bgColor=$COLOR_A_4, $fontColor=$COLOR_NEUTRAL, $borderColor=$COLOR_A_2)
|
||||
UpdateSkinparamsAndLegendEntry("external_system", $bgColor=$COLOR_B_4, $fontColor=$COLOR_NEUTRAL, $borderColor=$COLOR_B_2)
|
||||
UpdateElementStyle("person", $bgColor=$COLOR_A_5, $fontColor=$COLOR_NEUTRAL, $borderColor=$COLOR_A_1, $shadowing="true")
|
||||
UpdateElementStyle("external_person", $bgColor=$COLOR_B_5, $fontColor=$COLOR_NEUTRAL, $borderColor=$COLOR_B_1)
|
||||
UpdateElementStyle("system", $bgColor=$COLOR_A_4, $fontColor=$COLOR_NEUTRAL, $borderColor=$COLOR_A_2)
|
||||
UpdateElementStyle("external_system", $bgColor=$COLOR_B_4, $fontColor=$COLOR_NEUTRAL, $borderColor=$COLOR_B_2)
|
||||
UpdateRelStyle($lineColor=$COLOR_REL_LINE, &textColor=$COLOR_REL_TEXT)
|
||||
|
||||
Person(customer, "Personal Banking Customer")
|
||||
System(banking_system, "Internet Banking System")
|
||||
@@ -335,11 +428,11 @@ Rel_Back(customer, mail_system, "Sends e-mails to")
|
||||
Rel_Neighbor(banking_system, mail_system, "Sends e-mails")
|
||||
Rel(banking_system, mainframe, "Uses")
|
||||
|
||||
SHOW_DYNAMIC_LEGEND()
|
||||
SHOW_LEGEND()
|
||||
@enduml
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
## Element properties
|
||||
|
||||
@@ -381,7 +474,7 @@ Rel(personAlias, containerAlias, "Label", "Optional Technology")
|
||||
@enduml
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
## Snippets for Visual Studio Code
|
||||
|
||||
@@ -396,7 +489,7 @@ It is possible to save them directly inside VS Code: [Creating your own snippets
|
||||
|
||||
## Advanced Samples
|
||||
|
||||
The following advanced samples are reproductions with C4-PlantUML from official [C4 model samples](https://c4model.com/#examples) created by [Simon Brown](http://simonbrown.je/).
|
||||
The following advanced samples are reproductions with C4-PlantUML from official [C4 model samples](https://c4model.com/#examples) created by [Simon Brown](https://simonbrown.je/).
|
||||
|
||||
The core diagram samples from [c4model.com](https://c4model.com/#coreDiagrams) are available [here](samples/C4CoreDiagrams.md).
|
||||
|
||||
@@ -404,25 +497,25 @@ The core diagram samples from [c4model.com](https://c4model.com/#coreDiagrams) a
|
||||
|
||||
Source: [C4_Container Diagram Sample - techtribesjs.puml](samples/C4_Container%20Diagram%20Sample%20-%20techtribesjs.puml)
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
### Message Bus and Microservices
|
||||
|
||||
Source: [C4_Container Diagram Sample - message bus.puml](samples/C4_Container%20Diagram%20Sample%20-%20message%20bus.puml)
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
## Background
|
||||
|
||||
[PlantUML](http://en.plantuml.com/) is an open source project that allows you to create UML diagrams.
|
||||
[PlantUML](https://plantuml.com/) is an open source project that allows you to create UML diagrams.
|
||||
Diagrams are defined using a simple and intuitive language.
|
||||
Images can be generated in PNG, in SVG or in LaTeX format.
|
||||
|
||||
PlantUML was created to allow the drawing of UML diagrams, using a simple and human readable text description.
|
||||
Because it does not prevent you from drawing inconsistent diagrams, it is a drawing tool and not a modeling tool.
|
||||
It is the most used text-based diagram drawing tool with [extensive support into wikis and forums, text editors and IDEs, use by different programming languages and documentation generators](http://en.plantuml.com/running).
|
||||
It is the most used text-based diagram drawing tool with [extensive support into wikis and forums, text editors and IDEs, use by different programming languages and documentation generators](https://plantuml.com/running).
|
||||
|
||||
The [C4 model](https://c4model.com/) for software architecture is an "abstraction-first" approach to diagramming, based upon abstractions that reflect how software architects and developers think about and build software.
|
||||
The small set of abstractions and diagram types makes the C4 model easy to learn and use.
|
||||
@@ -434,8 +527,8 @@ More information can be found here:
|
||||
|
||||
* [The C4 model for software architecture](https://c4model.com/)
|
||||
* [REAL WORLD PlantUML - Sample Gallery](https://real-world-plantuml.com/)
|
||||
* [Visualising and documenting software architecture cheat sheets](http://www.codingthearchitecture.com/2017/04/27/visualising_and_documenting_software_architecture_cheat_sheets.html)
|
||||
* [PlantUML and Structurizr - Create models not diagrams](http://www.codingthearchitecture.com/2016/12/08/plantuml_and_structurizr.html)
|
||||
* [Visualising and documenting software architecture cheat sheets](https://www.codingthearchitecture.com/2017/04/27/visualising_and_documenting_software_architecture_cheat_sheets.html)
|
||||
* [PlantUML and Structurizr - Create models not diagrams](https://www.codingthearchitecture.com/2016/12/08/plantuml_and_structurizr.html)
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ System_Ext(mbs, "Mainframe Banking System", "Stores all of the core banking info
|
||||
|
||||
Container_Boundary(api, "API Application") {
|
||||
Component(sign, "Sign In Controller", "MVC Rest Controlle", "Allows users to sign in to the internet banking system")
|
||||
Component(accounts, "Accounts Summary Controller", "MVC Rest Controlle", "Provides customers with a summory of their bank accounts")
|
||||
Component(accounts, "Accounts Summary Controller", "MVC Rest Controller", "Provides customers with a summary of their bank accounts")
|
||||
Component(security, "Security Component", "Spring Bean", "Provides functionality related to singing in, changing passwords, etc.")
|
||||
Component(mbsfacade, "Mainframe Banking System Facade", "Spring Bean", "A facade onto the mainframe banking system.")
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
@startuml
|
||||
' convert it with additional command line argument -DRELATIVE_INCLUDE="." to use locally
|
||||
!if %variable_exists("RELATIVE_INCLUDE")
|
||||
!include ./../C4_Container.puml
|
||||
!else
|
||||
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
|
||||
!endif
|
||||
|
||||
!define DEVICONS https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/master/devicons
|
||||
!define FONTAWESOME https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/master/font-awesome-5
|
||||
' uncomment the following line and comment the first to use locally
|
||||
' !include C4_Container.puml
|
||||
!include DEVICONS/angular.puml
|
||||
!include DEVICONS/dotnet.puml
|
||||
!include DEVICONS/java.puml
|
||||
!include DEVICONS/msql_server.puml
|
||||
!include FONTAWESOME/server.puml
|
||||
!include FONTAWESOME/envelope.puml
|
||||
|
||||
' LAYOUT_TOP_DOWN()
|
||||
' LAYOUT_AS_SKETCH()
|
||||
LAYOUT_WITH_LEGEND()
|
||||
|
||||
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", "java")
|
||||
Container(spa, "Single-Page App", "JavaScript, Angular", "Provides all the Internet banking functionality to cutomers via their web browser", "angular")
|
||||
Container(mobile_app, "Mobile App", "C#, Xamarin", "Provides a limited subset of the Internet banking functionality to customers via their mobile device", "dotnet")
|
||||
ContainerDb(database, "Database", "SQL Database", "Stores user registraion information, hased auth credentials, access logs, etc.", "msql_server")
|
||||
Container(backend_api, "API Application", "Java, Docker Container", "Provides Internet banking functionality via API", "server")
|
||||
}
|
||||
|
||||
System_Ext(email_system, "E-Mail System", "The internal Microsoft Exchange system", "envelope")
|
||||
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")
|
||||
@enduml
|
||||
@@ -6,8 +6,8 @@
|
||||
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
|
||||
!endif
|
||||
|
||||
LAYOUT_TOP_DOWN()
|
||||
'LAYOUT_AS_SKETCH()
|
||||
' LAYOUT_TOP_DOWN()
|
||||
' LAYOUT_AS_SKETCH()
|
||||
LAYOUT_WITH_LEGEND()
|
||||
|
||||
title Container diagram for Internet Banking System
|
||||
@@ -18,7 +18,7 @@ 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 cutomers 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 registraion information, hased auth credentials, access logs, etc.")
|
||||
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")
|
||||
}
|
||||
|
||||
@@ -37,4 +37,4 @@ 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")
|
||||
@enduml
|
||||
@enduml
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@startuml
|
||||
@startuml "messagebus"
|
||||
' convert it with additional command line argument -DRELATIVE_INCLUDE="." to use locally
|
||||
!if %variable_exists("RELATIVE_INCLUDE")
|
||||
!include ./../C4_Container.puml
|
||||
@@ -13,6 +13,7 @@ LAYOUT_TOP_DOWN()
|
||||
'LAYOUT_AS_SKETCH()
|
||||
LAYOUT_WITH_LEGEND()
|
||||
|
||||
|
||||
Person(customer, Customer, "A customer")
|
||||
|
||||
System_Boundary(c1, "Customer Information") {
|
||||
@@ -50,4 +51,4 @@ Rel(audit_service, audit_store, "Stores events in")
|
||||
|
||||
Lay_R(reporting_service, audit_service)
|
||||
|
||||
@enduml
|
||||
@enduml
|
||||
|
||||
@@ -36,11 +36,11 @@ Rel(anonymous_user, web_app, "Uses", "HTTPS")
|
||||
Rel(aggregated_user, web_app, "Uses", "HTTPS")
|
||||
Rel(administration_user, web_app, "Uses", "HTTPS")
|
||||
|
||||
Rel(web_app, rel_db, "Reads from and writes to", "SQL/JDBC, post 3306")
|
||||
Rel(web_app, rel_db, "Reads from and writes to", "SQL/JDBC, port 3306")
|
||||
Rel(web_app, filesystem, "Reads from")
|
||||
Rel(web_app, nosql, "Reads from", "MongoDB wire protocol, port 27017")
|
||||
|
||||
Rel_U(updater, rel_db, "Reads from and writes data to", "SQL/JDBC, post 3306")
|
||||
Rel_U(updater, rel_db, "Reads from and writes data to", "SQL/JDBC, port 3306")
|
||||
Rel_U(updater, filesystem, "Writes to")
|
||||
Rel_U(updater, nosql, "Reads from and writes to", "MongoDB wire protocol, port 27017")
|
||||
|
||||
@@ -50,4 +50,4 @@ Rel(updater, blogs, "Gets content using RSS and Atom feeds from", "HTTP")
|
||||
|
||||
Lay_R(rel_db, filesystem)
|
||||
|
||||
@enduml
|
||||
@enduml
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@startuml
|
||||
@startuml "enterprise"
|
||||
' convert it with additional command line argument -DRELATIVE_INCLUDE="." to use locally
|
||||
!if %variable_exists("RELATIVE_INCLUDE")
|
||||
!include ./../C4_Context.puml
|
||||
@@ -42,4 +42,4 @@ Rel_L(taxamo, braintree, "Uses for credit card processing")
|
||||
|
||||
Lay_D(customer, braintree)
|
||||
|
||||
@enduml
|
||||
@enduml
|
||||
|
||||
@@ -6,10 +6,12 @@
|
||||
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Deployment.puml
|
||||
!endif
|
||||
|
||||
AddTagSupport("fallback", $bgColor="#c0c0c0")
|
||||
AddElementTag("fallback", $bgColor="#c0c0c0")
|
||||
AddRelTag("fallback", $textColor="#c0c0c0", $lineColor="#438DD5")
|
||||
|
||||
WithoutPropertyHeader()
|
||||
|
||||
' dynamic legend is used (activated in last line)
|
||||
' calculated legend is used (activated in last line)
|
||||
' LAYOUT_WITH_LEGEND()
|
||||
|
||||
title Deployment Diagram for Internet Banking System - Live
|
||||
@@ -61,8 +63,8 @@ Rel(mobile, api, "Makes API calls to", "json/HTTPS")
|
||||
Rel(spa, api, "Makes API calls to", "json/HTTPS")
|
||||
Rel_U(web, spa, "Delivers to the customer's web browser")
|
||||
Rel(api, db, "Reads from and writes to", "JDBC")
|
||||
Rel(api, db2, "Reads from and writes to", "JDBC")
|
||||
Rel(api, db2, "Reads from and writes to", "JDBC", $tags="fallback")
|
||||
Rel_R(db, db2, "Replicates data to")
|
||||
|
||||
SHOW_DYNAMIC_LEGEND()
|
||||
@enduml
|
||||
SHOW_LEGEND()
|
||||
@enduml
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Deployment.puml
|
||||
!endif
|
||||
|
||||
AddTagSupport("fallback", $bgColor="#c0c0c0")
|
||||
AddElementTag("fallback", $bgColor="#c0c0c0")
|
||||
AddRelTag("fallback", $textColor="#c0c0c0", $lineColor="#438DD5")
|
||||
|
||||
' dynamic legend is used (activated in last line)
|
||||
' calculated legend is used (activated in last line)
|
||||
' LAYOUT_WITH_LEGEND()
|
||||
|
||||
title Deployment Diagram for Internet Banking System - Live
|
||||
@@ -50,8 +51,8 @@ Rel(mobile, api, "Makes API calls to", "json/HTTPS")
|
||||
Rel(spa, api, "Makes API calls to", "json/HTTPS")
|
||||
Rel_U(web, spa, "Delivers to the customer's web browser")
|
||||
Rel(api, db, "Reads from and writes to", "JDBC")
|
||||
Rel(api, db2, "Reads from and writes to", "JDBC")
|
||||
Rel(api, db2, "Reads from and writes to", "JDBC", $tags="fallback")
|
||||
Rel_R(db, db2, "Replicates data to")
|
||||
|
||||
SHOW_DYNAMIC_LEGEND()
|
||||
@enduml
|
||||
SHOW_LEGEND()
|
||||
@enduml
|
||||
|
||||
@@ -17,4 +17,4 @@ Container_Boundary(b, "API Application") {
|
||||
Rel_R(c1, c2, "Submits credentials to", "JSON/HTTPS")
|
||||
Rel(c2, c3, "Calls isAuthenticated() on")
|
||||
Rel_R(c3, c4, "select * from users where username = ?", "JDBC")
|
||||
@enduml
|
||||
@enduml
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
@startuml
|
||||
' convert it with additional command line argument -DRELATIVE_INCLUDE="." to use locally
|
||||
!if %variable_exists("RELATIVE_INCLUDE")
|
||||
!include ./../C4_Component.puml
|
||||
!else
|
||||
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml
|
||||
!endif
|
||||
|
||||
SHOW_PERSON_SPRITE(person2)
|
||||
|
||||
UpdateElementStyle("system", $bgColor="chocolate", $fontColor="orange", $borderColor="orange")
|
||||
UpdateRelStyle(black, black)
|
||||
|
||||
AddElementTag("role1", $bgColor="green", $fontColor="white", $borderColor="#d73027", $shadowing="false")
|
||||
AddElementTag("role2", $fontColor="#d73027", $shadowing="true")
|
||||
AddElementTag("role3", $bgColor="orange")
|
||||
AddElementTag("role4", $borderColor="blue")
|
||||
AddElementTag("unusedRole")
|
||||
|
||||
AddRelTag("line1", $lineColor="green", $textColor="blue")
|
||||
AddRelTag("line2", $lineColor="blue", $textColor="green")
|
||||
AddRelTag("line3", $textColor="orange")
|
||||
AddRelTag("line4", $lineColor="orange")
|
||||
' PlantUML cannot combine line styles, a combination has to be added as workaround as first additional tag
|
||||
AddRelTag("line3&line4", $lineColor="orange", $textColor="orange")
|
||||
AddRelTag("unusedLine", $lineColor="red", $textColor="red")
|
||||
|
||||
Person(person, "Person")
|
||||
Person(person1, "Person1", $tags="role1")
|
||||
Person(person2, "Person2", $tags="role2")
|
||||
Person(person21, "Person21", $tags="role2+role1")
|
||||
Person(person321, "Person321", $tags="role3+role2+role1")
|
||||
Person(person4321, "Person43", $tags="role4+role3")
|
||||
Person(person31, "Person31", $tags="role3+role1")
|
||||
Person(person13, "Person13", $tags="role1+role3")
|
||||
|
||||
Person(allInOne, "AllInOne", $tags="role4+role3+role2+role1")
|
||||
|
||||
Component(component, "Component 1", "PlantUML")
|
||||
System(system1A, "System 1A")
|
||||
System(system2, "System 2")
|
||||
|
||||
Rel(allInOne, component, "without a tag")
|
||||
Rel(allInOne, component, "uses line 1", $tags="line1")
|
||||
Rel(allInOne, component, "uses line 2", $tags="line2")
|
||||
Rel(allInOne, system1A, "uses line 3", $tags="line3")
|
||||
Rel(allInOne, system1A, "uses line 4", $tags="line4")
|
||||
Rel(allInOne, system2, "line 3+4 cannot be combined without workaround", $tags="line3+line4")
|
||||
Rel(allInOne, system2, "line 3+4 with workaround", $tags="line3&line4+line3+line4")
|
||||
|
||||
SHOW_LEGEND(false)
|
||||
@enduml
|
||||
@@ -0,0 +1,72 @@
|
||||
@startuml
|
||||
' convert it with additional command line argument -DRELATIVE_INCLUDE="." to use locally
|
||||
!if %variable_exists("RELATIVE_INCLUDE")
|
||||
!include ./../C4_Component.puml
|
||||
!else
|
||||
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml
|
||||
!endif
|
||||
|
||||
System(RelFrom, RelFrom)
|
||||
System(BiRelFrom, BiRelFrom)
|
||||
|
||||
System(RelShort, RelShort)
|
||||
System(BiRelShort, BiRelShort)
|
||||
|
||||
System(RelLong, RelLong)
|
||||
System(BiRelLong, BiRelLong)
|
||||
|
||||
Rel_(RelFrom, To_Rel_UP, "A label", "-UP->>")
|
||||
Rel_(RelFrom, To_Rel_DOWN, "A label", "A techn", "-DOWN->>")
|
||||
|
||||
Rel(RelFrom, "To_Rel", "A label")
|
||||
Rel(RelFrom, "To_Rel_Tech", "A label", "A techn")
|
||||
Rel_Back(RelFrom, "To_Rel_Back", "A label")
|
||||
Rel_Back(RelFrom, "To_Rel_Back_Tech", "A label", "A techn")
|
||||
Rel_Neighbor(RelFrom, "To_Rel_Neighbor", "A label")
|
||||
Rel_Neighbor(RelFrom, "To_Rel_Neighbor_Tech", "A label", "A techn")
|
||||
Rel_Back_Neighbor(RelFrom, "To_Rel_Back_Neighbor", "A label")
|
||||
Rel_Back_Neighbor(RelFrom, "To_Rel_Back_Neighbor_Tech", "A label", "A techn")
|
||||
|
||||
BiRel(BiRelFrom, "To_BiRel", "A label")
|
||||
BiRel(BiRelFrom, "To_BiRel_Tech", "A label", "A techn")
|
||||
|
||||
Rel_D(RelShort, "To_Rel_D", "A label")
|
||||
Rel_D(RelShort, "To_Rel_D_Tech", "A label", "A techn")
|
||||
Rel_Down(RelLong, "To_Rel_Down", "A label")
|
||||
Rel_Down(RelLong, "To_Rel_Down_Tech", "A label", "A techn")
|
||||
Rel_L(RelShort, "To_Rel_L", "A label")
|
||||
Rel_L(RelShort, "To_Rel_L_Tech", "A label", "A techn")
|
||||
Rel_Left(RelLong, "To_Rel_Left", "A label")
|
||||
Rel_Left(RelLong, "To_Rel_Left_Tech", "A label", "A techn")
|
||||
Rel_R(RelShort, "To_Rel_R", "A label")
|
||||
Rel_R(RelShort, "To_Rel_R_Tech", "A label", "A techn")
|
||||
Rel_Right(RelLong, "To_Rel_Right", "A label")
|
||||
Rel_Right(RelLong, "To_Rel_Right_Tech", "A label", "A techn")
|
||||
Rel_U(RelShort, "To_Rel_U", "A label")
|
||||
Rel_U(RelShort, "To_Rel_U_Tech", "A label", "A techn")
|
||||
Rel_Up(RelLong, "To_Rel_Up", "A label")
|
||||
Rel_Up(RelLong, "To_Rel_Up_Tech", "A label", "A techn")
|
||||
|
||||
BiRel_D(BiRelShort, "To_BiRel_D", "A label")
|
||||
BiRel_D(BiRelShort, "To_BiRel_D_Tech", "A label", "A techn")
|
||||
BiRel_Down(BiRelLong, "To_BiRel_Down", "A label")
|
||||
BiRel_Down(BiRelLong, "To_BiRel_Down_Tech", "A label", "A techn")
|
||||
BiRel_L(BiRelShort, "To_BiRel_L", "A label")
|
||||
BiRel_L(BiRelShort, "To_BiRel_L_Tech", "A label", "A techn")
|
||||
BiRel_Left(BiRelLong, "To_BiRel_Left", "A label")
|
||||
BiRel_Left(BiRelLong, "To_BiRel_Left_Tech", "A label", "A techn")
|
||||
BiRel_R(BiRelShort, "To_BiRel_R", "A label")
|
||||
BiRel_R(BiRelShort, "To_BiRel_R_Tech", "A label", "A techn")
|
||||
BiRel_Right(BiRelLong, "To_BiRel_Right", "A label")
|
||||
BiRel_Right(BiRelLong, "To_BiRel_Right_Tech", "A label", "A techn")
|
||||
BiRel_U(BiRelShort, "To_BiRel_U", "A label")
|
||||
BiRel_U(BiRelShort, "To_BiRel_U_Tech", "A label", "A techn")
|
||||
BiRel_Up(BiRelLong, "To_BiRel_Up", "A label")
|
||||
BiRel_Up(BiRelLong, "To_BiRel_Up_Tech", "A label", "A techn")
|
||||
|
||||
Lay_U(RelFrom, BiRelFrom)
|
||||
Lay_D(RelFrom, RelShort)
|
||||
Lay_D(RelShort, RelLong)
|
||||
Lay_R(RelLong, BiRelShort)
|
||||
Lay_L(RelLong, BiRelLong)
|
||||
@enduml
|
||||
@@ -0,0 +1,71 @@
|
||||
@startuml
|
||||
' convert it with additional command line argument -DRELATIVE_INCLUDE="." to use locally
|
||||
!if %variable_exists("RELATIVE_INCLUDE")
|
||||
!include ./../C4_Dynamic.puml
|
||||
!else
|
||||
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Dynamic.puml
|
||||
!endif
|
||||
|
||||
System(RelFrom, RelFrom)
|
||||
System(RelShort, RelShort)
|
||||
System(RelLong, RelLong)
|
||||
|
||||
System(RelIndexFrom, RelIndexFrom)
|
||||
System(RelIndexShort, RelIndexShort)
|
||||
System(RelIndexLong, RelIndexLong)
|
||||
|
||||
Rel_(Index(), RelFrom, To_Rel_UP, "A label", "-UP->>")
|
||||
Rel_(Index(), RelFrom, To_Rel_DOWN, "A label", "A techn", "-DOWN->>")
|
||||
|
||||
Rel(RelFrom, "To_Rel", "A label")
|
||||
Rel(RelFrom, "To_Rel_Tech", "A label", "A techn")
|
||||
Rel_Back(RelFrom, "To_Rel_Back", "A label")
|
||||
Rel_Back(RelFrom, "To_Rel_Back_Tech", "A label", "A techn")
|
||||
Rel_Neighbor(RelFrom, "To_Rel_Neighbor", "A label")
|
||||
Rel_Neighbor(RelFrom, "To_Rel_Neighbor_Tech", "A label", "A techn")
|
||||
Rel_Back_Neighbor(RelFrom, "To_Rel_Back_Neighbor", "A label")
|
||||
Rel_Back_Neighbor(RelFrom, "To_Rel_Back_Neighbor_Tech", "A label", "A techn")
|
||||
|
||||
RelIndex(Index(), RelIndexFrom, "To_RelIndex", "A label")
|
||||
RelIndex(Index(), RelIndexFrom, "To_RelIndex_Tech", "A label", "A techn")
|
||||
|
||||
Rel_D(RelShort, "To_Rel_D", "A label")
|
||||
Rel_D(RelShort, "To_Rel_D_Tech", "A label", "A techn")
|
||||
Rel_Down(RelLong, "To_Rel_Down", "A label")
|
||||
Rel_Down(RelLong, "To_Rel_Down_Tech", "A label", "A techn")
|
||||
Rel_L(RelShort, "To_Rel_L", "A label")
|
||||
Rel_L(RelShort, "To_Rel_L_Tech", "A label", "A techn")
|
||||
Rel_Left(RelLong, "To_Rel_Left", "A label")
|
||||
Rel_Left(RelLong, "To_Rel_Left_Tech", "A label", "A techn")
|
||||
Rel_R(RelShort, "To_Rel_R", "A label")
|
||||
Rel_R(RelShort, "To_Rel_R_Tech", "A label", "A techn")
|
||||
Rel_Right(RelLong, "To_Rel_Right", "A label")
|
||||
Rel_Right(RelLong, "To_Rel_Right_Tech", "A label", "A techn")
|
||||
Rel_U(RelShort, "To_Rel_U", "A label")
|
||||
Rel_U(RelShort, "To_Rel_U_Tech", "A label", "A techn")
|
||||
Rel_Up(RelLong, "To_Rel_Up", "A label")
|
||||
Rel_Up(RelLong, "To_Rel_Up_Tech", "A label", "A techn")
|
||||
|
||||
RelIndex_D(Index(), RelIndexShort, "To_RelIndex_D", "A label")
|
||||
RelIndex_D(Index(), RelIndexShort, "To_RelIndex_D_Tech", "A label", "A techn")
|
||||
RelIndex_Down(Index(), RelIndexLong, "To_RelIndex_Down", "A label")
|
||||
RelIndex_Down(Index(), RelIndexLong, "To_RelIndex_Down_Tech", "A label", "A techn")
|
||||
RelIndex_L(Index(), RelIndexShort, "To_RelIndex_L", "A label")
|
||||
RelIndex_L(Index(), RelIndexShort, "To_RelIndex_L_Tech", "A label", "A techn")
|
||||
RelIndex_Left(Index(), RelIndexLong, "To_RelIndex_Left", "A label")
|
||||
RelIndex_Left(Index(), RelIndexLong, "To_RelIndex_Left_Tech", "A label", "A techn")
|
||||
RelIndex_R(Index(), RelIndexShort, "To_RelIndex_R", "A label")
|
||||
RelIndex_R(Index(), RelIndexShort, "To_RelIndex_R_Tech", "A label", "A techn")
|
||||
RelIndex_Right(Index(), RelIndexLong, "To_RelIndex_Right", "A label")
|
||||
RelIndex_Right(Index(), RelIndexLong, "To_RelIndex_Right_Tech", "A label", "A techn")
|
||||
RelIndex_U(Index(), RelIndexShort, "To_RelIndex_U", "A label")
|
||||
RelIndex_U(Index(), RelIndexShort, "To_RelIndex_U_Tech", "A label", "A techn")
|
||||
RelIndex_Up(Index(), RelIndexLong, "To_RelIndex_Up", "A label")
|
||||
RelIndex_Up(Index(), RelIndexLong, "To_RelIndex_Up_Tech", "A label", "A techn")
|
||||
|
||||
Lay_U(RelFrom, RelIndexFrom)
|
||||
Lay_D(RelFrom, RelShort)
|
||||
Lay_D(RelShort, RelLong)
|
||||
Lay_R(RelLong, RelIndexShort)
|
||||
Lay_L(RelLong, RelIndexLong)
|
||||
@enduml
|
||||
@@ -1,6 +1,6 @@
|
||||
# C4 Model Diagrams
|
||||
|
||||
The following samples are reproductions with C4-PlantUML from [C4 model core diagrams](http://c4model.com/#coreDiagrams) created by [Simon Brown](http://simonbrown.je/).
|
||||
The following samples are reproductions with C4-PlantUML from [C4 model core diagrams](https://c4model.com/#coreDiagrams) created by [Simon Brown](https://simonbrown.je/).
|
||||
|
||||
## Core Diagrams
|
||||
|
||||
@@ -44,13 +44,13 @@ Source: [C4_Dynamic Diagram Sample - bigbankplc.puml](C4_Dynamic%20Diagram%20Sam
|
||||
|
||||
Source: [C4_Deployment Diagram Sample - bigbankplc.puml](C4_Deployment%20Diagram%20Sample%20-%20bigbankplc.puml)
|
||||
|
||||

|
||||

|
||||
|
||||
**with details**
|
||||
|
||||
Source: [C4_Deployment Diagram Sample - bigbankplc-details.puml](C4_Deployment%20Diagram%20Sample%20-%20bigbankplc-details.puml)
|
||||
|
||||

|
||||

|
||||
|
||||
## Icons
|
||||
|
||||
|
||||
@@ -42,4 +42,4 @@ 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")
|
||||
@enduml
|
||||
@enduml
|
||||
|
||||
@@ -48,4 +48,4 @@ Rel(audit_service, audit_store, "Stores events in")
|
||||
|
||||
Lay_R(reporting_service, audit_service)
|
||||
|
||||
@enduml
|
||||
@enduml
|
||||
|
||||
@@ -48,4 +48,4 @@ Rel(updater, blogs, "Gets content using RSS and Atom feeds from", "HTTP")
|
||||
|
||||
Lay_R(rel_db, filesystem)
|
||||
|
||||
@enduml
|
||||
@enduml
|
||||
|
||||
@@ -39,4 +39,4 @@ Rel_L(taxamo, braintree, "Uses for credit card processing")
|
||||
|
||||
Lay_D(customer, braintree)
|
||||
|
||||
@enduml
|
||||
@enduml
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
@startuml
|
||||
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Deployment.puml
|
||||
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Deployment.puml
|
||||
' uncomment the following line and comment the first to use locally
|
||||
' !include C4_Deployment.puml
|
||||
|
||||
AddTagSupport("fallback", $bgColor="#c0c0c0")
|
||||
AddElementTag("fallback", $bgColor="#c0c0c0")
|
||||
AddRelTag("fallback", $textColor="#c0c0c0", $lineColor="#438DD5")
|
||||
|
||||
WithoutPropertyHeader()
|
||||
|
||||
' dynamic legend is used (activated in last line)
|
||||
' calculated legend is used (activated in last line)
|
||||
' LAYOUT_WITH_LEGEND()
|
||||
|
||||
title Deployment Diagram for Internet Banking System - Live
|
||||
@@ -58,8 +60,8 @@ Rel(mobile, api, "Makes API calls to", "json/HTTPS")
|
||||
Rel(spa, api, "Makes API calls to", "json/HTTPS")
|
||||
Rel_U(web, spa, "Delivers to the customer's web browser")
|
||||
Rel(api, db, "Reads from and writes to", "JDBC")
|
||||
Rel(api, db2, "Reads from and writes to", "JDBC")
|
||||
Rel(api, db2, "Reads from and writes to", "JDBC", $tags="fallback")
|
||||
Rel_R(db, db2, "Replicates data to")
|
||||
|
||||
SHOW_DYNAMIC_LEGEND()
|
||||
@enduml
|
||||
SHOW_LEGEND()
|
||||
@enduml
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
@startuml
|
||||
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Deployment.puml
|
||||
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Deployment.puml
|
||||
' uncomment the following line and comment the first to use locally
|
||||
' !include C4_Deployment.puml
|
||||
|
||||
AddTagSupport("fallback", $bgColor="#c0c0c0")
|
||||
AddElementTag("fallback", $bgColor="#c0c0c0")
|
||||
AddRelTag("fallback", $textColor="#c0c0c0", $lineColor="#438DD5")
|
||||
|
||||
' dynamic legend is used (activated in last line)
|
||||
' calculated legend is used (activated in last line)
|
||||
' LAYOUT_WITH_LEGEND()
|
||||
|
||||
title Deployment Diagram for Internet Banking System - Live
|
||||
@@ -47,8 +48,8 @@ Rel(mobile, api, "Makes API calls to", "json/HTTPS")
|
||||
Rel(spa, api, "Makes API calls to", "json/HTTPS")
|
||||
Rel_U(web, spa, "Delivers to the customer's web browser")
|
||||
Rel(api, db, "Reads from and writes to", "JDBC")
|
||||
Rel(api, db2, "Reads from and writes to", "JDBC")
|
||||
Rel(api, db2, "Reads from and writes to", "JDBC", $tags="fallback")
|
||||
Rel_R(db, db2, "Replicates data to")
|
||||
|
||||
SHOW_DYNAMIC_LEGEND()
|
||||
@enduml
|
||||
SHOW_LEGEND()
|
||||
@enduml
|
||||
|
||||
@@ -12,4 +12,4 @@ Container_Boundary(b, "API Application") {
|
||||
Rel_R(c1, c2, "Submits credentials to", "JSON/HTTPS")
|
||||
Rel(c2, c3, "Calls isAuthenticated() on")
|
||||
Rel_R(c3, c4, "select * from users where username = ?", "JDBC")
|
||||
@enduml
|
||||
@enduml
|
||||
|
||||
@@ -32,4 +32,4 @@ setIndex(5)
|
||||
RelIndex_R($index-2, message_bus, audit_service, "Sends customer update events to", "async")
|
||||
increment()
|
||||
RelIndex($index-2, audit_service, audit_store, "Stores events in")
|
||||
@enduml
|
||||
@enduml
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
@startuml
|
||||
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Dynamic.puml
|
||||
|
||||
@@ -28,4 +29,4 @@ RelIndex(Index()-1, reporting_service, reporting_db, "Stores data in")
|
||||
|
||||
RelIndex_R(SetIndex(5)-2, message_bus, audit_service, "Sends customer update events to", "async")
|
||||
RelIndex(Index()-2, audit_service, audit_store, "Stores events in")
|
||||
@enduml
|
||||
@enduml
|
||||
|
||||
Reference in New Issue
Block a user