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

Fix divers nas et ap

This commit is contained in:
Gabriel Detraz 2018-03-28 19:58:38 +02:00 committed by chirac
parent 3a253f3874
commit f91feff0fc
4 changed files with 10 additions and 4 deletions

View file

@ -38,6 +38,7 @@ from .models import (
Nas, Nas,
Service, Service,
OuverturePort, OuverturePort,
Ipv6List,
OuverturePortList OuverturePortList
) )
@ -46,6 +47,10 @@ class MachineAdmin(VersionAdmin):
pass pass
class Ipv6ListAdmin(VersionAdmin):
pass
class IpTypeAdmin(VersionAdmin): class IpTypeAdmin(VersionAdmin):
pass pass
@ -124,6 +129,7 @@ admin.site.register(Interface, InterfaceAdmin)
admin.site.register(Domain, DomainAdmin) admin.site.register(Domain, DomainAdmin)
admin.site.register(Service, ServiceAdmin) admin.site.register(Service, ServiceAdmin)
admin.site.register(Vlan, VlanAdmin) admin.site.register(Vlan, VlanAdmin)
admin.site.register(Ipv6List, Ipv6ListAdmin)
admin.site.register(Nas, NasAdmin) admin.site.register(Nas, NasAdmin)
admin.site.register(OuverturePort, OuverturePortAdmin) admin.site.register(OuverturePort, OuverturePortAdmin)
admin.site.register(OuverturePortList, OuverturePortListAdmin) admin.site.register(OuverturePortList, OuverturePortListAdmin)

View file

@ -83,7 +83,7 @@ HISTORY_BIND = {
'stack' : topologie.models.Stack, 'stack' : topologie.models.Stack,
'model_switch' : topologie.models.ModelSwitch, 'model_switch' : topologie.models.ModelSwitch,
'constructor_switch' : topologie.models.ConstructorSwitch, 'constructor_switch' : topologie.models.ConstructorSwitch,
'ap' : topologie.models.AccessPoint, 'accesspoint' : topologie.models.AccessPoint,
}, },
'machines' : { 'machines' : {
'machine' : machines.models.Machine, 'machine' : machines.models.Machine,
@ -99,7 +99,7 @@ HISTORY_BIND = {
'ns' : machines.models.Ns, 'ns' : machines.models.Ns,
'service' : machines.models.Service, 'service' : machines.models.Service,
'vlan' : machines.models.Vlan, 'vlan' : machines.models.Vlan,
'nas' : machines.models.Vlan, 'nas' : machines.models.Nas,
'ipv6list' : machines.models.Ipv6List, 'ipv6list' : machines.models.Ipv6List,
}, },
} }

View file

@ -49,7 +49,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ap.interface_set.first.details}}</td> <td>{{ap.interface_set.first.details}}</td>
<td>{{ap.location}}</td> <td>{{ap.location}}</td>
<td class="text-right"> <td class="text-right">
<a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'topologie:history' 'ap' ap.pk %}"> <a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'topologie:history' 'accesspoint' ap.pk %}">
<i class="fa fa-history"></i> <i class="fa fa-history"></i>
</a> </a>
{% can_edit ap %} {% can_edit ap %}

View file

@ -37,7 +37,7 @@ urlpatterns = [
url(r'^$', views.index, name='index'), url(r'^$', views.index, name='index'),
url(r'^index_ap/$', views.index_ap, name='index-ap'), url(r'^index_ap/$', views.index_ap, name='index-ap'),
url(r'^new_ap/$', views.new_ap, name='new-ap'), url(r'^new_ap/$', views.new_ap, name='new-ap'),
url(r'^edit_ap/(?P<ap_id>[0-9]+)$', url(r'^edit_ap/(?P<accesspoint_id>[0-9]+)$',
views.edit_ap, views.edit_ap,
name='edit-ap'), name='edit-ap'),
url(r'^create_ports/(?P<switch_id>[0-9]+)$', url(r'^create_ports/(?P<switch_id>[0-9]+)$',