From 37f0c3bb57bff959ea3082dd50a4a3137a9508bb Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Thu, 14 Sep 2017 13:44:51 +0000 Subject: [PATCH] Mac autocapture sur le menu nas --- .../migrations/0057_nas_autocapture_mac.py | 20 +++++++++++++++++++ machines/models.py | 1 + machines/templates/machines/aff_nas.html | 2 ++ machines/templates/machines/sidebar.html | 2 +- 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 machines/migrations/0057_nas_autocapture_mac.py diff --git a/machines/migrations/0057_nas_autocapture_mac.py b/machines/migrations/0057_nas_autocapture_mac.py new file mode 100644 index 00000000..feefa25f --- /dev/null +++ b/machines/migrations/0057_nas_autocapture_mac.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-09-14 13:43 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('machines', '0056_nas_port_access_mode'), + ] + + operations = [ + migrations.AddField( + model_name='nas', + name='autocapture_mac', + field=models.BooleanField(default=False), + ), + ] diff --git a/machines/models.py b/machines/models.py index c6c80a38..7f86d0c0 100644 --- a/machines/models.py +++ b/machines/models.py @@ -154,6 +154,7 @@ class Nas(models.Model): nas_type = models.ForeignKey('MachineType', on_delete=models.PROTECT, related_name='nas_type') machine_type = models.ForeignKey('MachineType', on_delete=models.PROTECT, related_name='machinetype_on_nas') port_access_mode = models.CharField(choices=AUTH, default=default_mode, max_length=32) + autocapture_mac = models.BooleanField(default=False) def __str__(self): return self.name diff --git a/machines/templates/machines/aff_nas.html b/machines/templates/machines/aff_nas.html index 8d0f35ed..dc8fd079 100644 --- a/machines/templates/machines/aff_nas.html +++ b/machines/templates/machines/aff_nas.html @@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc., Type du nas Type de machine reliées au nas Mode d'accès + Autocapture mac @@ -38,6 +39,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {{ nas.nas_type }} {{ nas.machine_type }} {{ nas.port_access_mode }} + {{ nas.autocapture_mac }} {% if is_infra %} {% include 'buttons/edit.html' with href='machines:edit-nas' id=nas.id %} diff --git a/machines/templates/machines/sidebar.html b/machines/templates/machines/sidebar.html index 974b7fdb..7334f628 100644 --- a/machines/templates/machines/sidebar.html +++ b/machines/templates/machines/sidebar.html @@ -48,7 +48,7 @@ with this program; if not, write to the Free Software Foundation, Inc., - Correspondances nas-machines + Gestion des nas