8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-25 04:43:10 +00:00

Rename index_stack into index_physical_grouping

This commit is contained in:
Maël Kervella 2018-04-10 12:11:48 +00:00
parent e924e91964
commit b805ca94d7
4 changed files with 13 additions and 13 deletions

View file

@ -37,9 +37,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<i class="fa fa-wifi"></i> <i class="fa fa-wifi"></i>
Bornes WiFi Bornes WiFi
</a> </a>
<a class="list-group-item list-group-item-info" href="{% url "topologie:index-stack" %}"> <a class="list-group-item list-group-item-info" href="{% url "topologie:index-physical-grouping" %}">
<i class="fa fa-list-ul"></i> <i class="fa fa-list-ul"></i>
Stacks Groupements physiques
</a> </a>
<a class="list-group-item list-group-item-info" href="{% url "topologie:index-model-switch" %}"> <a class="list-group-item list-group-item-info" href="{% url "topologie:index-model-switch" %}">
<i class="fa fa-list-ul"></i> <i class="fa fa-list-ul"></i>

View file

@ -64,7 +64,7 @@ urlpatterns = [
views.edit_switch, views.edit_switch,
name='edit-switch'), name='edit-switch'),
url(r'^new_stack/$', views.new_stack, name='new-stack'), url(r'^new_stack/$', views.new_stack, name='new-stack'),
url(r'^index_stack/$', views.index_stack, name='index-stack'), url(r'^index_physical_grouping/$', views.index_physical_grouping, name='index-physical-grouping'),
url(r'^edit_stack/(?P<stackid>[0-9]+)$', url(r'^edit_stack/(?P<stackid>[0-9]+)$',
views.edit_stack, views.edit_stack,
name='edit-stack'), name='edit-stack'),

View file

@ -184,7 +184,7 @@ def index_ap(request):
@can_view_all(Stack) @can_view_all(Stack)
@can_view_all(Building) @can_view_all(Building)
@can_view_all(SwitchBay) @can_view_all(SwitchBay)
def index_stack(request): def index_physical_grouping(request):
"""Affichage de la liste des stacks (affiche l'ensemble des switches)""" """Affichage de la liste des stacks (affiche l'ensemble des switches)"""
stack_list = Stack.objects\ stack_list = Stack.objects\
.prefetch_related('switch_set__interface_set__domain__extension') .prefetch_related('switch_set__interface_set__domain__extension')
@ -208,7 +208,7 @@ def index_stack(request):
request.GET.get('order'), request.GET.get('order'),
SortTable.TOPOLOGIE_INDEX_SWITCH_BAY SortTable.TOPOLOGIE_INDEX_SWITCH_BAY
) )
return render(request, 'topologie/index_stack.html', { return render(request, 'topologie/index_physical_grouping.html', {
'stack_list': stack_list, 'stack_list': stack_list,
'switch_bay_list': switch_bay_list, 'switch_bay_list': switch_bay_list,
'building_list' : building_list, 'building_list' : building_list,
@ -320,7 +320,7 @@ def edit_stack(request, stack, stackid):
if stack.is_valid(): if stack.is_valid():
if stack.changed_data: if stack.changed_data:
stack.save() stack.save()
return redirect(reverse('topologie:index-stack')) return redirect(reverse('topologie:index-physical-grouping'))
return form({'topoform': stack, 'action_name' : 'Editer'}, 'topologie/topo.html', request) return form({'topoform': stack, 'action_name' : 'Editer'}, 'topologie/topo.html', request)
@ -335,7 +335,7 @@ def del_stack(request, stack, stackid):
except ProtectedError: except ProtectedError:
messages.error(request, "La stack %s est affectée à un autre\ messages.error(request, "La stack %s est affectée à un autre\
objet, impossible de la supprimer" % stack) objet, impossible de la supprimer" % stack)
return redirect(reverse('topologie:index-stack')) return redirect(reverse('topologie:index-physical-grouping'))
return form({'objet': stack}, 'topologie/delete.html', request) return form({'objet': stack}, 'topologie/delete.html', request)
@ -665,7 +665,7 @@ def new_switch_bay(request):
if switch_bay.is_valid(): if switch_bay.is_valid():
switch_bay.save() switch_bay.save()
messages.success(request, "La baie a été créé") messages.success(request, "La baie a été créé")
return redirect(reverse('topologie:index-model-switch')) return redirect(reverse('topologie:index-physical-grouping'))
return form({'topoform': switch_bay, 'action_name' : 'Ajouter'}, 'topologie/topo.html', request) return form({'topoform': switch_bay, 'action_name' : 'Ajouter'}, 'topologie/topo.html', request)
@ -678,7 +678,7 @@ def edit_switch_bay(request, switch_bay, switchbayid):
if switch_bay.changed_data: if switch_bay.changed_data:
switch_bay.save() switch_bay.save()
messages.success(request, "Le switch a bien été modifié") messages.success(request, "Le switch a bien été modifié")
return redirect(reverse('topologie:index-model-switch')) return redirect(reverse('topologie:index-physical-grouping'))
return form({'topoform': switch_bay, 'action_name' : 'Editer'}, 'topologie/topo.html', request) return form({'topoform': switch_bay, 'action_name' : 'Editer'}, 'topologie/topo.html', request)
@ -693,7 +693,7 @@ def del_switch_bay(request, switch_bay, switchbayid):
except ProtectedError: except ProtectedError:
messages.error(request, "La baie %s est affecté à un autre objet,\ messages.error(request, "La baie %s est affecté à un autre objet,\
impossible de la supprimer (switch ou user)" % switch_bay) impossible de la supprimer (switch ou user)" % switch_bay)
return redirect(reverse('topologie:index-model-switch')) return redirect(reverse('topologie:index-physical-grouping'))
return form({ return form({
'objet': switch_bay, 'objet': switch_bay,
'objet_name': 'Baie de switch' 'objet_name': 'Baie de switch'
@ -708,7 +708,7 @@ def new_building(request):
if building.is_valid(): if building.is_valid():
building.save() building.save()
messages.success(request, "Le batiment a été créé") messages.success(request, "Le batiment a été créé")
return redirect(reverse('topologie:index-model-switch')) return redirect(reverse('topologie:index-physical-grouping'))
return form({'topoform': building, 'action_name' : 'Ajouter'}, 'topologie/topo.html', request) return form({'topoform': building, 'action_name' : 'Ajouter'}, 'topologie/topo.html', request)
@ -721,7 +721,7 @@ def edit_building(request, building, buildingid):
if building.changed_data: if building.changed_data:
building.save() building.save()
messages.success(request, "Le batiment a bien été modifié") messages.success(request, "Le batiment a bien été modifié")
return redirect(reverse('topologie:index-model-switch')) return redirect(reverse('topologie:index-physical-grouping'))
return form({'topoform': building, 'action_name' : 'Editer'}, 'topologie/topo.html', request) return form({'topoform': building, 'action_name' : 'Editer'}, 'topologie/topo.html', request)
@ -736,7 +736,7 @@ def del_building(request, building, buildingid):
except ProtectedError: except ProtectedError:
messages.error(request, "Le batiment %s est affecté à un autre objet,\ messages.error(request, "Le batiment %s est affecté à un autre objet,\
impossible de la supprimer (switch ou user)" % building) impossible de la supprimer (switch ou user)" % building)
return redirect(reverse('topologie:index-model-switch')) return redirect(reverse('topologie:index-physical-grouping'))
return form({ return form({
'objet': building, 'objet': building,
'objet_name': 'Bâtiment' 'objet_name': 'Bâtiment'