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

Support for empty cluster nodes #39

Closed
aaronsteers opened this issue Feb 25, 2020 · 2 comments
Closed

Support for empty cluster nodes #39

aaronsteers opened this issue Feb 25, 2020 · 2 comments
Labels
kind/feature New feature or request

Comments

@aaronsteers
Copy link
Contributor

It appears that cluster nodes are not rendered if they are empty. However there are use cases, such as diagramming a VPC with public/private subnets, where it would be beneficial to render them even if there is nothing in them.

Would it be feasible to add either a blank/white dummy node to hold space inside the cluster, or else support clusters to be rendered (with some minimal height and width) even if they are empty?

@mingrammer mingrammer added the kind/feature New feature or request label Feb 27, 2020
@leandrodamascena
Copy link
Contributor

Hmm I have this problem too .. I'm provisioning a new architecture that need to show an empty Cluster which I'll add resources in next project sprint .. But I need to show now that I have provisioned that separated cluster to add resources in future ...

Python syntax doesn't allow a "with" block code with no code inside ... Maybe using keyword "pass" inside the block to avoid syntax error and change init.py code to detect a empty Cluster block and force to generate a " fake id "in graph section ...

Empty Cluster block in current version

digraph "IOT Diagram" {
        graph [fontcolor="#2D3436" fontname="Sans-Serif" fontsize=15 label="IOT Diagram" nodesep=0.60 pad=2.0 rankdir=LR ranksep=0.75 splines=ortho]
        node [fixedsize=true fontcolor="#2D3436" fontname="Sans-Serif" fontsize=13 height=1.4 imagescale=true labelloc=b shape=box style=rounded width=1.4]
        edge [color="#7B8894"]
        "1fc76bf100e4470bb115e08766f689be" [label=LEO height=1.9 image="D:\DEVEL-PYTHON\github\diagrams2\resources/aws/iot\internet-of-things.png" shape=none]
        subgraph "cluster_AWS Serverless IOT2" {
                graph [bgcolor="#E5F5FD" fontname="Sans-Serif" fontsize=12 label="AWS Serverless IOT2" labeljust=l pencolor="#AEB6BE" rankdir=LR shape=box style=rounded]
        }
}

"Fake id" with patch

digraph "IOT Diagram" {
        graph [fontcolor="#2D3436" fontname="Sans-Serif" fontsize=15 label="IOT Diagram" nodesep=0.60 pad=2.0 rankdir=LR ranksep=0.75 splines=ortho]
        node [fixedsize=true fontcolor="#2D3436" fontname="Sans-Serif" fontsize=13 height=1.4 imagescale=true labelloc=b shape=box style=rounded width=1.4]
        edge [color="#7B8894"]
        "1fc76bf100e4470bb115e08766f689be" [label=LEO height=1.9 image="D:\DEVEL-PYTHON\github\diagrams2\resources/aws/iot\internet-of-things.png" shape=none]
        subgraph "cluster_AWS Serverless IOT2" {
                graph [bgcolor="#E5F5FD" fontname="Sans-Serif" fontsize=12 label="AWS Serverless IOT2" labeljust=l pencolor="#AEB6BE" rankdir=LR shape=box style=rounded]
                "fk_9fdd9f23ffbb4aff8b1c965e3ac259b8" [label="" height=1.9 shape=none]
        }
}

In my option is not a good approach because we are doing a little hack. As @aaronsteers commented, the better option is to create use a dummy resource with a transparent image.

@mingrammer

mingrammer pushed a commit that referenced this issue Jun 2, 2020
* Added support to generic DC Icons #92. Added a blank icon to support #39

* Added Storage into storage folder
@aaronsteers
Copy link
Contributor Author

aaronsteers commented Sep 14, 2020

I returned to this issue just to check in, and was very pleased to see the completion of #171. I've tested this out and it meets my minimum requirements for empty nodes (via the new "Blank" node type inside a cluster).

I'll close this issue because I'm happily unblocked now, but others may re-open if needed.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants