Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

Nodes name in svg file or more verbose debug

0 votes


I need to get positions of elements in output file.

Is there a posibility that verbose mode will write positions (x,y) of elements while processing?

Or, like dot(graphviz) include comment to svg file, like:

        subgraph cluster_ha101_0 {
                node [shape=component,style=filled,fillcolor="#FFFCB2",color="red",nodesep=0.1,ranksep=0.1]
                ha101_nginx [label=nginx]
                ha101_haproxy [label=haproxy]
                ha101_ssh [label=ssh]
                ha101_cron [label=cron]

                ha101_nginx -> ha101_haproxy

will generate:

<g id="clust1" class="cluster"><title>cluster_ha101_0</title>
<polygon fill="none" stroke="black" points="796.659,-238 796.659,-428 1132.66,-428 1132.66,-238 796.659,-238"/>
<text text-anchor="middle" x="964.659" y="-412.8" font-family="Times,serif" font-size="14.00">ha101</text>
<!-- ha101_nginx -->
<g id="node1" class="node"><title>ha101_nginx</title>
<polygon fill="#fffcb2" stroke="red" points="1124.66,-397 1070.66,-397 1070.66,-393 1066.66,-393 1066.66,-389 1070.66,-389 1070.66,-369 1066.66,-369 1066.66,-365 1070.66,-365 1070.66,-361 1124.66,-361 1124.66,-397"/>
<polyline fill="none" stroke="red" points="1070.66,-393 1074.66,-393 1074.66,-389 1070.66,-389 "/>
<polyline fill="none" stroke="red" points="1070.66,-369 1074.66,-369 1074.66,-365 1070.66,-365 "/>
<text text-anchor="middle" x="1097.66" y="-375.3" font-family="Times,serif" font-size="14.00">nginx</text>
<!-- ha101_haproxy -->
<g id="node2" class="node"><title>ha101_haproxy</title>
<polygon fill="#fffcb2" stroke="red" points="1124.16,-282 1063.16,-282 1063.16,-278 1059.16,-278 1059.16,-274 1063.16,-274 1063.16,-254 1059.16,-254 1059.16,-250 1063.16,-250 1063.16,-246 1124.16,-246 1124.16,-282"/>
<polyline fill="none" stroke="red" points="1063.16,-278 1067.16,-278 1067.16,-274 1063.16,-274 "/>
<polyline fill="none" stroke="red" points="1063.16,-254 1067.16,-254 1067.16,-250 1063.16,-250 "/>
<text text-anchor="middle" x="1093.66" y="-260.3" font-family="Times,serif" font-size="14.00">haproxy</text>
<!-- ha101_nginx&#45;&gt;ha101_haproxy -->
<g id="edge1" class="edge"><title>ha101_nginx&#45;&gt;ha101_haproxy</title>
<path fill="none" stroke="black" d="M1097.05,-360.838C1096.41,-342.669 1095.38,-313.725 1094.63,-292.394"/>
<polygon fill="black" stroke="black" points="1098.12,-292.194 1094.27,-282.324 1091.13,-292.441 1098.12,-292.194"/>

and i can get element position from svg, but plant uml don't put comment to svg

asked Jul 3, 2016 in Wanted features by anonymous

1 Answer

0 votes

Nice idea!
We've build a first (and minimal) version, where a comment is printed for classes (only to SVG).
You can get it there https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

For example:

class Foo
class Bar
Foo --> Bar

Now, we have to extend this feature.
It would be nice if you could give us small snipset/examples of diagrams you are using where you want other SVG comments.



answered Jul 7, 2016 by plantuml (112,180 points)
  actor user
  actor admin

  cloud "floating ip" {
          interface HTTPS as ha_https

  node "ha101" {
          component haproxy as ha101_haproxy
          component ssh as ha101_ssh
          component nginx as ha101_nginx

          ha101_nginx --> ha101_haproxy
          ha_https --> ha101_nginx

  node "app101" {
          component app_app as app101_app

  node "app102" {
          component app_app as app102_app

  node "app103" {
          component app_app as app103_app

  node "db101" {
          database postgresql as db101_postgresql

  app101_app --> db101_postgresql
  app102_app --> db101_postgresql
  app103_app --> db101_postgresql
  user --> ha_https
  ha101_haproxy --> app101_app
  ha101_haproxy --> app102_app
  ha101_haproxy --> app103_app
  admin --> ha101_ssh


and any apperance of app101_app is in <text> field and not in comment to whole polygon of that comonent.

I want to automate generatation uml files from my shinken inventory, then generete SVG file and set it as background in nagvis, then analyze SVG file for positions of elements, and put host and services statuses on map in nagvis.
Full automatic monitoring :)
Last beta is more verbose:

Tell us if you need some more comments.
thanks :)
i think I've got what I want
Support This Project Offer 250 Mo! Follow PlantUML on Twitter