line type = network type
This commit is contained in:
parent
e8c090b3be
commit
212a082af3
2 changed files with 9 additions and 0 deletions
|
@ -8,6 +8,7 @@ Changes:
|
||||||
- Improved design
|
- Improved design
|
||||||
- Added the ability to generate url
|
- Added the ability to generate url
|
||||||
- Added display of connections with the host
|
- Added display of connections with the host
|
||||||
|
- Github package
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
![example graph](./example.png)
|
![example graph](./example.png)
|
||||||
|
|
|
@ -194,10 +194,18 @@ def draw_container(g: Graph, c: Container):
|
||||||
|
|
||||||
|
|
||||||
def draw_link(g: Graph, networks: typing.Dict[str, Network], link: Link):
|
def draw_link(g: Graph, networks: typing.Dict[str, Network], link: Link):
|
||||||
|
if networks[link.network_name].isolated:
|
||||||
|
style="dashed"
|
||||||
|
elif networks[link.network_name].name == "host":
|
||||||
|
style="bold"
|
||||||
|
else:
|
||||||
|
style="solid"
|
||||||
|
|
||||||
g.edge(
|
g.edge(
|
||||||
f"container_{link.container_id}:{link.endpoint_id}",
|
f"container_{link.container_id}:{link.endpoint_id}",
|
||||||
f"network_{link.network_name}",
|
f"network_{link.network_name}",
|
||||||
color=networks[link.network_name].color,
|
color=networks[link.network_name].color,
|
||||||
|
style=style,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue