Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nwdiag : add shape as router #1745

Open
jcralbino opened this issue Apr 19, 2024 · 4 comments
Open

nwdiag : add shape as router #1745

jcralbino opened this issue Apr 19, 2024 · 4 comments
Labels

Comments

@jcralbino
Copy link

jcralbino commented Apr 19, 2024

Is your feature request related to a problem? Please describe.
In nwdiag when defining nodes part of a network we can use a limited set of shapes as defined plantuml nwdiag
as defined bellow:

  network Network {
    Label       [shape = label]       
    Node        [shape = node]        
    Package     [shape = package]     
    Person      [shape = person]      
    Queue       [shape = queue]       
    Stack       [shape = stack]       
    Rectangle   [shape = rectangle]   
    Storage     [shape = storage]     
    Usecase     [shape = usecase]     
  }

I would like to allow the use of the following two options

shape = firewall
shape = router

Describe the solution you'd like
The shape option should include the option of including a firewall, and router example.
There are open icons that can be used for that.

Or the one in AWS for the router included already in plantuml
!include <aws/Compute/AmazonVPC/router/router>

Or the OSA icon for firewall
!include <osa/firewall/firewall>

Another collection of icons relevant for this feature are available here
https://extensions.libreoffice.org/en/extensions/show/vrt-network-equipment

Describe alternatives you've considered
Using the plantuml bellow provides similar results

@startuml
!include <osa/firewall/firewall>
!include <aws/Compute/AmazonVPC/router/router>
nwdiag {      
      network network {
          address = "address"


          firewall [ address = "" description= "<$firewall>\nFW" ]
          router [address = "" description = "<$router>\n RTR]
      }
}
@enduml

Additional context
Using the description field to define the 'shape' is not intuitive, this option will be more user friendly for a very common use case of this nwdiag tool

@jcralbino
Copy link
Author

This would allow also a better definition of the description text without considering the visual aspect of the icon.
It would be interesting also to be able to control where the description is shown , if bellow icon/shape , right , left.

@The-Lum
Copy link
Collaborator

The-Lum commented Apr 20, 2024

Hi all,

See also old request here:

Regards,
Th.

@jcralbino
Copy link
Author

Thanks looking into this

I realised they we could achieve similar results using the description field, but this is also limiting how that field is used.

If the shape field is used then description content can be used in more ways.

Is it possible to add this shape to the symbols available in all diagrams ?

@jcralbino
Copy link
Author

For example in this case for this code

@startuml
!include <aws/Compute/AmazonVPC/router/router>
nwdiag {
  node [description ="<$router>\n BIG LONG TEXT IS NOT CENTERED AND LINE ABOVE NOT CENTERED"]
}
@enduml

We get something like:
image

If we use the shape we get something like:

@startuml
!include <aws/Compute/AmazonVPC/router/router>
nwdiag {
  node [shape="storage"]
  node [description ="BIG LONG TEXT IS NOT CENTERED AND LINE ABOVE NOT CENTERED"]
}
@enduml

that generates this :
image

and this:

@startuml
!include <aws/Compute/AmazonVPC/router/router>
nwdiag {
  node [shape="person"]
  node [description ="BIG LONG TEXT IS NOT CENTERED AND LINE ABOVE NOT CENTERED"]
}
@enduml

Generates this
image

For me neither of them are good examples.
The goal of this Issue was to be able to separate the "icon" from the text.

So it seems that using the shape option is not the best way of doing that.

My goal is to undestand how i can be able to associate a textual description information with more flexibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants