Coder Social home page Coder Social logo

Comments (8)

kirchsth avatar kirchsth commented on June 1, 2024 1

Update: correct solution see next comment

If you want a different type, then I would directly use a boundary and define its own $type like

Boundary(anotherBoundary, "Another Boundary", $type="BOUNDARY TYPE", $tags="v1") {

details see https://github.com/plantuml-stdlib/C4-PlantUML?tab=readme-ov-file#sample-with-different-boundary-tag-combinations

BR Helmut

from c4-plantuml.

kirchsth avatar kirchsth commented on June 1, 2024

HI @NathanDotTo,

I will try to implement it in one of the next weekends.
But in the meantime you could use following workaround for e.g. System_Boundary:

  • extend { at the end of System(...) and combine it with $tags="system_boundary" to
    System(..., $tags="system_boundary") {
  • close the boundary with a } after all included elements

like (follow the image link then you see the code)

BR Helmut

from c4-plantuml.

NathanDotTo avatar NathanDotTo commented on June 1, 2024

Cool, that worked, thanks! :-)

from c4-plantuml.

NathanDotTo avatar NathanDotTo commented on June 1, 2024

I have also had cause to use the type too, like this:

System(a_system, "A Cloud Platform", "X-as-a-Service (XaaS) ", $type="GCP", $tags="system_boundary") {
  Container ...
}

from c4-plantuml.

kirchsth avatar kirchsth commented on June 1, 2024

Hi @NathanDotTo,

sorry, I forgot my implementation (indention) related to the $type support of a (System/Container/...)Boundary.
You can define it via the tags AddBoundaryTag(tagName, ..., $type="NewType", ...) and then e.g. all (Systems) boundaries which uses the $tag displays the updated $type automatically too.
Sample see below (follow the image link then you see the code):

BR Helmut

from c4-plantuml.

kirchsth avatar kirchsth commented on June 1, 2024

Hi @NathanDotTo,

I implemented a version in my extended branch (details see #352) can you please check it via my branch?
(the only difference is that you have to use my extended branch !include https://raw.githubusercontent.com/kirchsth/C4-PlantUML/extended/...

@startuml
!include https://raw.githubusercontent.com/kirchsth/C4-PlantUML/extended/C4_Container.puml

AddBoundaryTag("chatGPT", $type="ChatGPT", $bgColor="red", $fontColor="white", $borderColor="darkred", $sprite="robot2")

Person(admin, "Administrator",$sprite="person2")
System_Boundary(c1, "Sample System", $descr="ChatGPT with model gpt-3.5-turbo. It has been updated to feature higher accuracy", $tags="chatGPT") {
    Container(web_app, "Web Application", "C#, ASP.NET Core 2.1 MVC", "Allows users to compare multiple Twitter timelines")
}
System(twitter, "Twitter")

Rel(admin, web_app, "Uses", "HTTPS")
Rel(web_app, twitter, "Gets tweets from", "HTTPS")

SHOW_LEGEND()
@enduml

Thank you and best regards
Helmut

from c4-plantuml.

NathanDotTo avatar NathanDotTo commented on June 1, 2024

Thank you for this. I will be able to test this next week.

from c4-plantuml.

NathanDotTo avatar NathanDotTo commented on June 1, 2024

I have tested this, and it works, thank you :-)

from c4-plantuml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.