Browse Source

Mac autocapture sur le menu nas

granuban
Gabriel Detraz 8 years ago
committed by root
parent
commit
37f0c3bb57
  1. 20
      machines/migrations/0057_nas_autocapture_mac.py
  2. 1
      machines/models.py
  3. 2
      machines/templates/machines/aff_nas.html
  4. 2
      machines/templates/machines/sidebar.html

20
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),
),
]

1
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

2
machines/templates/machines/aff_nas.html

@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<th>Type du nas</th>
<th>Type de machine reliées au nas</th>
<th>Mode d'accès</th>
<th>Autocapture mac</th>
<th></th>
</tr>
</thead>
@ -38,6 +39,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ nas.nas_type }}</td>
<td>{{ nas.machine_type }}</td>
<td>{{ nas.port_access_mode }}</td>
<td>{{ nas.autocapture_mac }}</td>
<td class="text-right">
{% if is_infra %}
{% include 'buttons/edit.html' with href='machines:edit-nas' id=nas.id %}

2
machines/templates/machines/sidebar.html

@ -48,7 +48,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</a>
<a class="list-group-item list-group-item-info" href="{% url "machines:index-nas" %}">
<i class="glyphicon glyphicon-list"></i>
Correspondances nas-machines
Gestion des nas
</a>
<a class="list-group-item list-group-item-info" href="{% url "machines:index-service" %}">
<i class="glyphicon glyphicon-list"></i>

Loading…
Cancel
Save