Browse Source

Nouveau réglage sur la politique radius

granuban
Gabriel Detraz 8 years ago
committed by root
parent
commit
948091f428
  1. 20
      preferences/migrations/0015_optionaltopologie_radius_general_policy.py
  2. 20
      preferences/migrations/0016_auto_20170902_1520.py
  3. 7
      preferences/models.py
  4. 6
      preferences/templates/preferences/display_preferences.html

20
preferences/migrations/0015_optionaltopologie_radius_general_policy.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-09-02 13:16
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('preferences', '0014_generaloption_email_from'),
]
operations = [
migrations.AddField(
model_name='optionaltopologie',
name='radius_general_policy',
field=models.CharField(choices=[('MACHINE', 'Sur le vlan de la plage ip machine'), ('DEFINED', 'Prédéfini')], default='DEFINED', max_length=32),
),
]

20
preferences/migrations/0016_auto_20170902_1520.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-09-02 13:20
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('preferences', '0015_optionaltopologie_radius_general_policy'),
]
operations = [
migrations.AlterField(
model_name='optionaltopologie',
name='radius_general_policy',
field=models.CharField(choices=[('MACHINE', 'Sur le vlan de la plage ip machine'), ('DEFINED', 'Prédéfini dans "Vlan où placer les machines après acceptation RADIUS"')], default='DEFINED', max_length=32),
),
]

7
preferences/models.py

@ -46,7 +46,14 @@ class OptionalMachine(models.Model):
class OptionalTopologie(models.Model):
PRETTY_NAME = "Options topologie"
MACHINE = 'MACHINE'
DEFINED = 'DEFINED'
CHOICE_RADIUS = (
(MACHINE, 'Sur le vlan de la plage ip machine'),
(DEFINED, 'Prédéfini dans "Vlan où placer les machines après acceptation RADIUS"'),
)
radius_general_policy = models.CharField(max_length=32, choices=CHOICE_RADIUS, default='DEFINED')
vlan_decision_ok = models.OneToOneField('machines.Vlan', on_delete=models.PROTECT, related_name='decision_ok', blank=True, null=True)
vlan_decision_nok = models.OneToOneField('machines.Vlan', on_delete=models.PROTECT, related_name='decision_nok', blank=True, null=True)

6
preferences/templates/preferences/display_preferences.html

@ -80,6 +80,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<p>
</p>
<table class="table table-striped">
<tr>
<th>Politique générale de placement de vlan</th>
<td>{{ topologieoptions.radius_general_policy }}</td>
<th> Ce réglage défini la politique vlan après acceptation radius : soit sur le vlan de la plage d'ip de la machine, soit sur un vlan prédéfini dans "Vlan où placer les machines après acceptation RADIUS"</th>
<td></td>
</tr>
<tr>
<th>Vlan où placer les machines après acceptation RADIUS</th>
<td>{{ topologieoptions.vlan_decision_ok }}</td>

Loading…
Cancel
Save