Giter VIP home page Giter VIP logo

Comments (2)

leandrodamascena avatar leandrodamascena commented on May 18, 2024 1

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

from diagrams.

aaronsteers avatar aaronsteers commented on May 18, 2024 1

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!

from diagrams.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.