Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nounous
re2o
Commits
917d49cf
Commit
917d49cf
authored
Sep 03, 2017
by
Gabriel Detraz
Committed by
chirac
Sep 03, 2017
Browse files
Fix affichage stackw
parent
a64158e4
Changes
2
Show whitespace changes
Inline
Side-by-side
topologie/models.py
View file @
917d49cf
...
@@ -60,8 +60,6 @@ class Stack(models.Model):
...
@@ -60,8 +60,6 @@ class Stack(models.Model):
def
clean
(
self
):
def
clean
(
self
):
if
self
.
member_id_max
<
self
.
member_id_min
:
if
self
.
member_id_max
<
self
.
member_id_min
:
import
traceback
traceback
.
print_exc
()
raise
ValidationError
({
'member_id_max'
:
"L'id maximale est inférieure à l'id minimale"
})
raise
ValidationError
({
'member_id_max'
:
"L'id maximale est inférieure à l'id minimale"
})
class
Switch
(
models
.
Model
):
class
Switch
(
models
.
Model
):
...
...
topologie/templates/topologie/aff_stacks.html
View file @
917d49cf
...
@@ -28,14 +28,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
...
@@ -28,14 +28,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<th>
Stack
</th>
<th>
Stack
</th>
<th>
ID
</th>
<th>
ID
</th>
<th>
Details
</th>
<th>
Details
</th>
<th>
Membres
</th>
</tr>
</tr>
</thead>
</thead>
{% for stack in stack_list %}
{% for stack in stack_list %}
<tr>
{% for switch in stack.switch_set.all %}
<td>
{{stack.name}}
</td>
<tr
class=
"active"
>
<td>
{{stack.stack_id}}
</td>
{% if forloop.first %}
<td>
{{stack.details}}
</td>
<td
rowspan=
"{{ stack.switch_set.all|length }}"
>
{{stack.name}}
</td>
<td
class=
"text-right"
>
<td
rowspan=
"{{ stack.switch_set.all|length }}"
>
{{stack.stack_id}}
</td>
<td
rowspan=
"{{ stack.switch_set.all|length }}"
>
{{stack.details}}
</td>
{% endif %}
<td>
{{switch}}
</td>
{% if forloop.first %}
<td
rowspan=
"{{ stack.switch_set.all|length }}"
>
<a
class=
"btn btn-info btn-sm"
role=
"button"
title=
"Historique"
href=
"{% url 'topologie:history' 'stack' stack.pk %}"
>
<a
class=
"btn btn-info btn-sm"
role=
"button"
title=
"Historique"
href=
"{% url 'topologie:history' 'stack' stack.pk %}"
>
<i
class=
"glyphicon glyphicon-time"
></i>
<i
class=
"glyphicon glyphicon-time"
></i>
</a>
</a>
...
@@ -48,6 +54,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
...
@@ -48,6 +54,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</a>
</a>
{% endif %}
{% endif %}
</td>
</td>
{% endif %}
</tr>
</tr>
{% endfor %}
{% endfor %}
{% endfor %}
</table>
</table>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment