Skip to content

Commit

Permalink
Add External tag to external systems (#703)
Browse files Browse the repository at this point in the history
This makes it more convenient to style them.
  • Loading branch information
raphael committed May 9, 2024
1 parent a8aa4ae commit 3e23f9d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion expr/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ func (s *SoftwareSystem) EvalName() string {
// Finalize adds the 'SoftwareSystem' tag ands finalizes relationships.
func (s *SoftwareSystem) Finalize() {
s.PrefixTags(SoftwareSystemTags...)
if s.Location == LocationExternal {
s.PrefixTags("External")
}
s.Element.Finalize()
}

Expand Down Expand Up @@ -83,7 +86,7 @@ func (s *SoftwareSystem) AddContainer(c *Container) *Container {
for _, cmp := range c.Components {
existing.AddComponent(cmp) // will merge if needed
}
if olddsl := existing.DSLFunc; olddsl != nil {
if olddsl := existing.DSLFunc; olddsl != nil && c.DSLFunc != nil {
existing.DSLFunc = func() { olddsl(); c.DSLFunc() }
}
return existing
Expand Down

0 comments on commit 3e23f9d

Please sign in to comment.