-
Notifications
You must be signed in to change notification settings - Fork 2
/
c4.puml
113 lines (94 loc) · 2.92 KB
/
c4.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
!$FG_COLOR = "#FFFFFF"
!$BG_COLOR = "#1287A8"
!$BG_COLOR_ACCENT = "#0d6882"
!$LINE_FG_COLOR = "#333333"
!$EXTERNAL_BG_COLOR = "#0D3D56"
!$NEW_BG_COLOR = "#83B86C"
!$MODIFIED_BG_COLOR = "#C2571A"
!$REMOVED_BG_COLOR = "#AD2A1A"
hide stereotype
skinparam shadowing false
skinparam defaultTextAlignment center
skinparam wrapWidth 200
skinparam DefaultFontSize 12
skinparam ArrowColor $LINE_FG_COLOR
skinparam ArrowThickness 0.5
skinparam ArrowFontSize 11
skinparam maxMessageSize 150
skinparam rectangle<<person>> {
roundCorner 50
}
skinparam rectangle {
BorderThickness 0
FontColor $FG_COLOR
BackgroundColor $BG_COLOR
BackgroundColor<<new>> $NEW_BG_COLOR
BackgroundColor<<modified>> $MODIFIED_BG_COLOR
BackgroundColor<<removed>> $REMOVED_BG_COLOR
BackgroundColor<<external>> $EXTERNAL_BG_COLOR
}
skinparam database {
BorderColor $BG_COLOR_ACCENT
FontColor $FG_COLOR
BackgroundColor $BG_COLOR
BackgroundColor<<new>> $NEW_BG_COLOR
BackgroundColor<<modified>> $MODIFIED_BG_COLOR
BackgroundColor<<removed>> $REMOVED_BG_COLOR
BackgroundColor<<external>> $EXTERNAL_BG_COLOR
}
skinparam rectangle<<boundary>> {
BorderStyle dashed
BorderThickness 0.5
BorderColor $LINE_FG_COLOR
FontColor $LINE_FG_COLOR
BackgroundColor transparent
}
skinparam Legend {
BackgroundColor White
BorderThickness 0
}
!procedure ShowLegend()
legend right
|= |= Type |
|<$BG_COLOR> | Existing |
|<$EXTERNAL_BG_COLOR>| External |
|<$NEW_BG_COLOR> | New |
|<$MODIFIED_BG_COLOR>| Modified |
|<$REMOVED_BG_COLOR> | To be removed |
endlegend
!endprocedure
!procedure Boundary($name, $type)
rectangle "_Spacer()<size:12>$name</size>\n<size:9>[$type]</size>" <<boundary>>
!endprocedure
!procedure Person($label, $desc, $type = "Person")
rectangle _EntityBody($label, $desc, $type) <<person>>
!endprocedure
!procedure System($label, $desc, $type = "Software System")
rectangle _EntityBody($label, $desc, $type)
!endprocedure
!procedure Container($label, $desc)
rectangle _EntityBody($label, $desc, "Container")
!endprocedure
!procedure Container($label, $desc, $tech)
!$type = "Container: " + $tech
rectangle _EntityBody($label, $desc, $type)
!endprocedure
!procedure Component($label, $desc)
rectangle _EntityBody($label, $desc, "Component")
!endprocedure
!procedure Component($label, $desc, $tech)
!$type = "Component: " + $tech
rectangle _EntityBody($label, $desc, $type)
!endprocedure
!procedure Database($label, $desc)
database _EntityBody($label, $desc, "Database")
!endprocedure
!procedure Database($label, $desc, $tech)
!$type = "Database: " + $tech
database _EntityBody($label, $desc, $type)
!endprocedure
!function Tech($tech) return "\n<i>[" + $tech + "]</i>"
!procedure _EntityBody($label, $desc, $type)
"_Spacer()<size:16><b>$label</b></size>\n<size:9>[$type]</size>\n_Spacer()$desc\n"
!endprocedure
!function _Spacer() return "<size:5> </size>\n"