graph_switch.dot 3.89 KB
Newer Older
grisel-davy's avatar
grisel-davy committed
1
{% block graph_dot %}
2
strict digraph {
3 4
graph [label="TOPOLOGIE DU RÉSEAU", labelloc=t, fontsize=40];
node [fontname=Helvetica fontsize=8 shape=plaintext];
5
edge[arrowhead=none];
grisel-davy's avatar
grisel-davy committed
6 7 8 9 10


{% block subgraphs %}
{% for sub in subs %}
subgraph cluster_{{ sub.bat_id }} {
11
fontsize=15;
grisel-davy's avatar
grisel-davy committed
12
label="Batiment {{ sub.bat_name }}";
grisel-davy's avatar
grisel-davy committed
13

grisel-davy's avatar
grisel-davy committed
14
{% if sub.bornes %}
15
{% block bornes %}
grisel-davy's avatar
grisel-davy committed
16
node [label=<
17
<TABLE BGCOLOR="{{ colors.back}}" BORDER="0" CELLBORDER="0" CELLSPACING="0">
18
<TR>
grisel-davy's avatar
grisel-davy committed
19 20 21 22 23 24
	<TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="{{ colors.head_bornes }}"> 
	<FONT FACE="Helvetica Bold" COLOR="white">Borne</FONT></TD>
	<TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="{{ colors.head_bornes }}"> 
	<FONT FACE="Helvetica Bold" COLOR="white">Switch</FONT></TD>
	<TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="{{ colors.head_bornes }}"> 
	<FONT FACE="Helvetica Bold" COLOR="white">Port</FONT></TD>
25
</TR>
grisel-davy's avatar
grisel-davy committed
26
{% for borne in sub.bornes %}
grisel-davy's avatar
grisel-davy committed
27 28 29 30 31 32 33 34 35 36 37
<TR>
	<TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BORDER="0">
		<FONT COLOR="{{ colors.texte }}" >{{ borne.name }}</FONT>
	</TD>
	<TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BORDER="0">
		<FONT COLOR="{{ colors.texte }}" >{{ borne.switch }}</FONT>
	</TD>
	<TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BORDER="0">
		<FONT COLOR="{{ colors.texte }}" >{{ borne.port }}</FONT>
	</TD>
</TR>
grisel-davy's avatar
grisel-davy committed
38
{% endfor %}
39 40
</TABLE>
>] {{sub.bat_name}}bornes;
grisel-davy's avatar
grisel-davy committed
41
{% endblock %}
42
{% endif %}
grisel-davy's avatar
grisel-davy committed
43

44
{% if sub.machines %}
45 46 47
{% block machines %}
node [label=<
<TABLE BGCOLOR="{{ colors.back}}" BORDER="0" CELLBORDER="0" CELLSPACING="0">
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
<TR>
	<TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="{{ colors.head_server }}"> 
	<FONT FACE="Helvetica Bold" COLOR="white">Machine</FONT></TD>
	<TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="{{ colors.head_server }}"> 
	<FONT FACE="Helvetica Bold" COLOR="white">Switch</FONT></TD>
	<TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="{{ colors.head_server }}"> 
	<FONT FACE="Helvetica Bold" COLOR="white">Port</FONT></TD>
</TR>

{% for machine in sub.machines %}
<TR>
	<TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BORDER="0">
		<FONT COLOR="{{ colors.texte }}" >{{ machine.name }}</FONT>
	</TD>
	<TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BORDER="0">
		<FONT COLOR="{{ colors.texte }}" >{{ machine.switch }}</FONT>
	</TD>
	<TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BORDER="0">
		<FONT COLOR="{{ colors.texte }}" >{{ machine.port }}</FONT>
	</TD>
</TR>
{% endfor %}
grisel-davy's avatar
grisel-davy committed
70
</TABLE>
71 72
>] {{sub.bat_name}}machines;
{% endblock %}
grisel-davy's avatar
grisel-davy committed
73 74 75
{% endif %}


grisel-davy's avatar
grisel-davy committed
76 77 78
{% block switchs %}
{% for switch in sub.switchs %}
node [label=<
grisel-davy's avatar
grisel-davy committed
79 80
<TABLE BGCOLOR="{{ colors.back }}" BORDER="0" CELLBORDER="0" CELLSPACING="0">
<TR><TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="{{ colors.head }}">
grisel-davy's avatar
grisel-davy committed
81 82 83 84
<FONT FACE="Helvetica Bold" COLOR="white">
{{ switch.name }}
</FONT></TD></TR>
<TR><TD ALIGN="LEFT" BORDER="0">
grisel-davy's avatar
grisel-davy committed
85
<FONT COLOR="{{ colors.texte }}" >Modèle</FONT>
grisel-davy's avatar
grisel-davy committed
86 87
</TD>
<TD ALIGN="LEFT">
grisel-davy's avatar
grisel-davy committed
88
<FONT COLOR="{{ colors.texte }}" >{{ switch.model }}</FONT>
grisel-davy's avatar
grisel-davy committed
89 90
</TD></TR>
<TR><TD ALIGN="LEFT" BORDER="0">
grisel-davy's avatar
grisel-davy committed
91
<FONT COLOR="{{ colors.texte }}" >Taille</FONT>
grisel-davy's avatar
grisel-davy committed
92 93
</TD>
<TD ALIGN="LEFT">
grisel-davy's avatar
grisel-davy committed
94
<FONT COLOR="{{ colors.texte }}" >{{ switch.nombre }}</FONT>
grisel-davy's avatar
grisel-davy committed
95 96 97 98
</TD></TR>
{% block liens %}
{% for port in switch.ports %}
<TR><TD ALIGN="LEFT" BORDER="0">
grisel-davy's avatar
grisel-davy committed
99
<FONT COLOR="{{ colors.texte }}" >{{ port.numero }}</FONT>
grisel-davy's avatar
grisel-davy committed
100 101
</TD>
<TD ALIGN="LEFT">
grisel-davy's avatar
grisel-davy committed
102
<FONT COLOR="{{ colors.texte }}" >{{ port.related }}</FONT>
grisel-davy's avatar
grisel-davy committed
103 104 105 106
</TD></TR>
{% endfor %}
{% endblock %}
</TABLE>
grisel-davy's avatar
grisel-davy committed
107
>] "{{ switch.id }}" ;
grisel-davy's avatar
grisel-davy committed
108 109 110 111 112 113 114 115 116
{% endfor %}
{% endblock %}
}
{% endfor %}
{% endblock %}


{% block isoles %}
{% for switchs in alone %}
grisel-davy's avatar
grisel-davy committed
117 118 119
"{{switchs.id}}" [label=<
<TABLE BGCOLOR="{{ colors.back }}" BORDER="0" CELLBORDER="0" CELLSPACING="0">
<TR><TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="{{ colors.head }}">
grisel-davy's avatar
grisel-davy committed
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
<FONT FACE="Helvetica Bold" COLOR="white">
{{switchs.name}}
</FONT></TD></TR>
</TABLE>
>]
{% endfor %}
{% endblock %}


{% block links %}
{% for link in links %}
"{{ link.depart }}" -> "{{ link.arrive }}";
{% endfor %}
{% endblock %}
}
{% endblock %}