{% block graph_dot %}
digraph {
graph [label="TOPOLOGIE DU RÉSEAU", labelloc=t, fontsize=40];
node [fontname=Helvetica fontsize=8 shape=plaintext];
edge[arrowhead=none];
{% block subgraphs %}
{% for sub in subs %}
subgraph cluster_{{ sub.bat_id }} {
fontsize=15;
label="Bâtiment {{ sub.bat_name }}";
{% if sub.bornes %}
{% block bornes %}
node [label=<
Borne |
Switch |
Port |
{% for borne in sub.bornes %}
{{ borne.name }}
|
{{ borne.switch }}
|
{{ borne.port }}
|
{% endfor %}
>] "{{sub.bat_name}}bornes";
{% endblock %}
{% endif %}
{% if sub.machines %}
{% block machines %}
node [label=<
Machine |
Switch |
Port |
{% for machine in sub.machines %}
{{ machine.name }}
|
{{ machine.switch }}
|
{{ machine.port }}
|
{% endfor %}
>] "{{sub.bat_name}}machines";
{% endblock %}
{% endif %}
{% block switchs %}
{% for switch in sub.switchs %}
node [label=<
{{ switch.name }}
|
Modèle
|
{{ switch.model }}
|
Taille
|
{{ switch.nombre }}
|
{% block liens %}
{% for port in switch.ports %}
{{ port.numero }}
|
{{ port.related }}
|
{% endfor %}
{% endblock %}
>] "{{ switch.id }}" ;
{% endfor %}
{% endblock %}
}
{% endfor %}
{% endblock %}
{% block isoles %}
{% for switchs in alone %}
"{{switchs.id}}" [label=<
>]
{% endfor %}
{% endblock %}
{% block links %}
{% for link in links %}
"{{ link.depart }}" -> "{{ link.arrive }}";
{% endfor %}
{% endblock %}
}
{% endblock %}