Ability to add a label to a group in nwdiag

0 votes
asked Sep 3, 2020 in Wanted features by rremer (140 points)

It'd be great to be able to add a label to a group in nwdiag 

Something like "group : label  {" or just "group label  {"

Group example

2 Answers

0 votes
answered Sep 4, 2020 by The-Lu (70,400 points)

Hello all,

In the same way, perhaps add also, for the group element:

  • description;
  • shape.

Like:

@startuml
nwdiag {
  // define group at outside network definitions
  group grouplabel  {
    color = "#FF7777";
    description = "long group label";
    shape = node;

    web01;
    web02;
    db01;
  }

  network dmz {
    web01;
    web02;
  }
  network internal {
    web01;
    web02;
    db01 [address = ".101", shape = database];
  }
}
@enduml

→ Link to PlantUML online server.

That is only a proposal,

Regards,
Th.

0 votes
answered Dec 16, 2020 by plantuml (295,760 points)

With last beta http://beta.plantuml.net/plantuml.jar you can now have :

@startuml
nwdiag {
  group {
    color = "#FF7777";
    description = "long group label";

    web01;
    web02;
    db01;
  }

  network dmz {
    web01;
    web02;
  }
  network internal {
    web01;
    web02;
    db01 [address = ".101", shape = database];
  }
}
@enduml

Is this what you were expecting ?

commented Dec 22, 2020 by The-Lu (70,400 points)

Hello PlantUML team,

That is good for label or description.

  • Could you add also shape for group?

Thank for your support,
Regards,
Th.

commented Dec 23, 2020 by The-Lu (70,400 points)

Hello PlantUML team,

Another wanted feature:

  • Would it be possible to choose between label on the top or label on the bottom of the group?

But I have no idea of syntax!
Why not:

  • top_description
  • bottom_description

or

  • description_top
  • description_bottom

or a new field:

  • location = top or bottom

Thank for your support,
Regards,
Th.

...