diff --git a/topologie/templates/topologie/graph_switch.dot b/topologie/templates/topologie/graph_switch.dot index 20df6c2d..3835cd91 100644 --- a/topologie/templates/topologie/graph_switch.dot +++ b/topologie/templates/topologie/graph_switch.dot @@ -1,5 +1,5 @@ {% block graph_dot %} -digraph switchs { +digraph Topologie { node [ fontname=Helvetica fontsize=8 @@ -12,44 +12,71 @@ edge[arrowhead=odot,arrowtail=dot] subgraph cluster_{{ sub.bat_id }} { label="Batiment {{ sub.bat_name }}"; +{% if sub.bornes %} +node [label=< + + + + + + {% block bornes %} {% for borne in sub.bornes %} -node[label="{{borne.name}}"] {{borne.id}}; + + + + + {% endfor %} {% endblock %} +
+ + Borne + Switch + Port
+ {{ borne.name }} + + {{ borne.switch }} + + {{ borne.port }} +
+>] {{sub.bat_name}}bornes; +{% endif %} + + {% block switchs %} {% for switch in sub.switchs %} node [label=< - -
+ + {% block liens %} {% for port in switch.ports %} {% endfor %} {% endblock %}
{{ switch.name }}
-Modèle +Modèle -{{ switch.model }} +{{ switch.model }}
-Nombre de ports +Taille -{{ switch.nombre }} +{{ switch.nombre }}
-{{ port.numero }} +{{ port.numero }} -{{ port.related }} +{{ port.related }}
->] {{ switch.id }} ; +>] "{{ switch.id }}" ; {% endfor %} {% endblock %} } @@ -59,9 +86,9 @@ node [label=< {% block isoles %} {% for switchs in alone %} -{{switchs.id}} [label=< - -
+"{{switchs.id}}" [label=< + +
{{switchs.name}}