Closed Anddd7 closed 10 months ago
is this in the latest package? I don't see this option on the Cluster
.
UPDATE: found it https://github.com/Anddd7/diagrams-ext/releases/tag/0.23.5-alpha3
What about using Custom
for icons on the Cluster
?
is this in the latest package? I don't see this option on the
Cluster
.UPDATE: found it https://github.com/Anddd7/diagrams-ext/releases/tag/0.23.5-alpha3
To make it easier to use, i rename it to diagrams-ext
and uploaded to pypi, you can download it pip install diagrams-ext
.
with Cluster("your-vpc", icon_node=VPC):
...
Another way is, I supposed this feature will be merged in upstream oneday๐, so i don't want to add some customized features here. So i create another repo: https://github.com/Anddd7/diagrams-patterns
I packaged some common component, like private/public subnet, region as cluster, you can check the example https://github.com/Anddd7/diagrams-patterns/blob/main/poc_aws_complex.py
What about using
Custom
for icons on theCluster
?
I modified to code to accept string path directly, icon_node: Union[Type["Node"], str] = None,
oops, i just tried, url is not working, absolute path can.
with Cluster("your-vpc", icon_node="/path/to/image.png"):
:fire: got error
with Cluster("your-vpc", icon_node="https://img.icons8.com/ios-filled/50/share-3.png"):
Add the icon as part of label in cluster, to visualize the 'VPC' type resources.
Origin PR: https://github.com/mingrammer/diagrams/pull/853 Others:
Demo: