mirror of https://gitlab.federez.net/re2o/re2o
9 changed files with 208 additions and 14 deletions
@ -0,0 +1,43 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
from django.db import migrations, models |
||||
|
import django.db.models.deletion |
||||
|
import django.core.validators |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [ |
||||
|
('machines', '0030_auto_20161118_1730'), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.CreateModel( |
||||
|
name='Mx', |
||||
|
fields=[ |
||||
|
('id', models.AutoField(auto_created=True, primary_key=True, verbose_name='ID', serialize=False)), |
||||
|
('priority', models.IntegerField(unique=True)), |
||||
|
('name', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to='machines.Alias')), |
||||
|
('zone', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='machines.Extension')), |
||||
|
], |
||||
|
), |
||||
|
migrations.CreateModel( |
||||
|
name='Ns', |
||||
|
fields=[ |
||||
|
('id', models.AutoField(auto_created=True, primary_key=True, verbose_name='ID', serialize=False)), |
||||
|
('interface', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to='machines.Interface')), |
||||
|
('zone', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='machines.Extension')), |
||||
|
], |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='iptype', |
||||
|
name='domaine_ip', |
||||
|
field=models.GenericIPAddressField(protocol='IPv4'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='iptype', |
||||
|
name='domaine_range', |
||||
|
field=models.IntegerField(validators=[django.core.validators.MinValueValidator(8), django.core.validators.MaxValueValidator(32)]), |
||||
|
), |
||||
|
] |
||||
@ -0,0 +1,26 @@ |
|||||
|
<table class="table table-striped"> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th>Zone concernée</th> |
||||
|
<th>Priorité</th> |
||||
|
<th>Enregistrement</th> |
||||
|
<th></th> |
||||
|
<th></th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
{% for mx in mx_list %} |
||||
|
<tr> |
||||
|
<td>{{ mx.zone }}</td> |
||||
|
<td>{{ mx.priority }}</td> |
||||
|
<td>{{ mx.name }}</td> |
||||
|
<td class="text-right"> |
||||
|
{% if is_infra %} |
||||
|
{% include 'buttons/edit.html' with href='machines:edit-mx' id=mx.id %} |
||||
|
{% endif %} |
||||
|
{% include 'buttons/history.html' with href='machines:history' name='mx' id=mx.id %} |
||||
|
</td> |
||||
|
</tr> |
||||
|
{% endfor %} |
||||
|
</table> |
||||
|
|
||||
|
|
||||
Loading…
Reference in new issue