From bc5b7c63be48ae482b99718971f0805945457594 Mon Sep 17 00:00:00 2001 From: edpibu Date: Wed, 26 Sep 2018 14:49:03 +0200 Subject: [PATCH] Added info on switch page --- topologie/templates/topologie/index_p.html | 15 +++++++++++++++ topologie/views.py | 5 ++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/topologie/templates/topologie/index_p.html b/topologie/templates/topologie/index_p.html index aabb9e21..56177a06 100644 --- a/topologie/templates/topologie/index_p.html +++ b/topologie/templates/topologie/index_p.html @@ -31,6 +31,21 @@ with this program; if not, write to the Free Software Foundation, Inc., {% block content %}

{% trans "Switch:"%} {{ nom_switch }}

+ + + + + + + + + + + + + +
{% trans "Switch bay" %}{% trans "Switch model" %}{% trans "Stack" %}
{{ switch_bay }}{{ switch_model }}{{ switch_stack }}
+
{% trans " Edit" %} {% can_create Port %} {% trans " Add a port" %} diff --git a/topologie/views.py b/topologie/views.py index 1e8bfee4..41cf5dfd 100644 --- a/topologie/views.py +++ b/topologie/views.py @@ -189,7 +189,10 @@ def index_port(request, switch, switchid): { 'port_list': port_list, 'id_switch': switchid, - 'nom_switch': switch + 'nom_switch': switch, + 'switch_bay': switch.switchbay, + 'switch_model': switch.model, + 'switch_stack': switch.stack } )