structurizr / export

Export models and views to external formats.
https://docs.structurizr.com/export
Apache License 2.0
18 stars 28 forks source link

Show additional properties / details in deploymentNode diagrams #46

Closed djjlewis closed 1 year ago

djjlewis commented 1 year ago

I'm not sure the best place to put this, but I'm using Structurizr lite in a container so will go with here for now :-)

C4-PlantUML allows for any number of Property attributes to be applied to a deployment node which can be useful for giving additional details (SKUs, sizing, IPs, hostnames etc) e.g.

SetPropertyHeader("Property","Value", "Description")
AddProperty("Prop1", "Value1", "Details1")
AddProperty("Prop2", "Value2", "Details2")
Deployment_Node_L(nodeAlias, "Label", "Optional Type", "Optional Description (with custom property header)") {

  WithoutPropertyHeader()
  AddProperty("PropC1", "ValueC1")
  AddProperty("PropC2", "ValueC2")
  Container(containerAlias, "Label", "Technology", "Optional Description (without property header)")
}

image

I noticed that the deploymentNodes rendered in the deployment diagrams by Structurizr Lite (and the CLI export) only show the values from name and technologyand anything else is ignored / not rendered e.g. description

As a work around I can add anything of interest into name or technology, but do you think it would be useful to render a general set / table of properties similar to C4-PlantUML?

simonbrowndotje commented 1 year ago

Properties are not rendered, to keep the diagram looking simple, but are available via the tooltips.

djjlewis commented 1 year ago

Thanks @simonbrowndotje , I wondered if this is something I could add for our own use and noticed it has in fact already been included (https://github.com/structurizr/export/pull/12). However, this PR did not include support for Deployment Nodes as they are rendered on a slightly different code path.

I've just opened https://github.com/structurizr/export/pull/45 which add this support so would be grateful if you can take a look!

simonbrowndotje commented 1 year ago

I'm using Structurizr lite

I've just opened https://github.com/structurizr/export/pull/45 which add this support

Are you aware that Lite doesn't use the export library?

djjlewis commented 1 year ago

Yes.. tbh, including this information in an export from the cli was my main use case but didn't appreciate how the different repos were split and used until I went to do the work yesterday!

simonbrowndotje commented 1 year ago

Sure, PR merged ... thanks!