mirror of https://gitlab.federez.net/re2o/re2o
committed by
root
11 changed files with 351 additions and 8 deletions
@ -0,0 +1,31 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.10.7 on 2017-11-16 00:10 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
import django.core.validators |
||||
|
from django.db import migrations, models |
||||
|
import django.db.models.deletion |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [ |
||||
|
('machines', '0065_auto_20171115_1514'), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.CreateModel( |
||||
|
name='Srv', |
||||
|
fields=[ |
||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
||||
|
('service', models.CharField(max_length=31)), |
||||
|
('protocole', models.CharField(choices=[('TCP', 'TCP'), ('UDP', 'UDP')], default='TCP', max_length=3)), |
||||
|
('ttl', models.PositiveIntegerField(default=172800, help_text='Time To Live')), |
||||
|
('priority', models.PositiveIntegerField(validators=[django.core.validators.MaxValueValidator(65535)])), |
||||
|
('weight', models.PositiveIntegerField(validators=[django.core.validators.MaxValueValidator(65535)])), |
||||
|
('port', models.PositiveIntegerField(validators=[django.core.validators.MaxValueValidator(65535)])), |
||||
|
('extension', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='machines.Extension')), |
||||
|
('target', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='machines.Domain')), |
||||
|
], |
||||
|
), |
||||
|
] |
||||
@ -0,0 +1,37 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.10.7 on 2017-11-16 00:52 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
import django.core.validators |
||||
|
from django.db import migrations, models |
||||
|
import django.db.models.deletion |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [ |
||||
|
('machines', '0066_srv'), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.AlterField( |
||||
|
model_name='srv', |
||||
|
name='port', |
||||
|
field=models.PositiveIntegerField(help_text='Port (tcp/udp)', validators=[django.core.validators.MaxValueValidator(65535)]), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='srv', |
||||
|
name='priority', |
||||
|
field=models.PositiveIntegerField(help_text="La priorité du serveur cible (valeur entière non négative, plus elle est faible, plus ce serveur sera utilisé s'il est disponible)", validators=[django.core.validators.MaxValueValidator(65535)]), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='srv', |
||||
|
name='target', |
||||
|
field=models.ForeignKey(help_text='Serveur cible', on_delete=django.db.models.deletion.PROTECT, to='machines.Domain'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='srv', |
||||
|
name='weight', |
||||
|
field=models.PositiveIntegerField(help_text='Poids relatif pour les enregistrements de même priorité (valeur entière de 0 à 65535)', validators=[django.core.validators.MaxValueValidator(65535)]), |
||||
|
), |
||||
|
] |
||||
@ -0,0 +1,60 @@ |
|||||
|
{% comment %} |
||||
|
Re2o est un logiciel d'administration développé initiallement au rezometz. Il |
||||
|
se veut agnostique au réseau considéré, de manière à être installable en |
||||
|
quelques clics. |
||||
|
|
||||
|
Copyright © 2017 Gabriel Détraz |
||||
|
Copyright © 2017 Goulven Kermarec |
||||
|
Copyright © 2017 Augustin Lemesle |
||||
|
|
||||
|
This program is free software; you can redistribute it and/or modify |
||||
|
it under the terms of the GNU General Public License as published by |
||||
|
the Free Software Foundation; either version 2 of the License, or |
||||
|
(at your option) any later version. |
||||
|
|
||||
|
This program is distributed in the hope that it will be useful, |
||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
GNU General Public License for more details. |
||||
|
|
||||
|
You should have received a copy of the GNU General Public License along |
||||
|
with this program; if not, write to the Free Software Foundation, Inc., |
||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
||||
|
{% endcomment %} |
||||
|
|
||||
|
<table class="table table-striped"> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th>Service</th> |
||||
|
<th>Protocole</th> |
||||
|
<th>Extension</th> |
||||
|
<th>TTL</th> |
||||
|
<th>Priorité</th> |
||||
|
<th>Poids</th> |
||||
|
<th>Port</th> |
||||
|
<th>Cible</th> |
||||
|
<th></th> |
||||
|
<th></th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
{% for srv in srv_list %} |
||||
|
<tr> |
||||
|
<td>{{ srv.service }}</td> |
||||
|
<td>{{ srv.protocole }}</td> |
||||
|
<td>{{ srv.extension }}</td> |
||||
|
<td>{{ srv.ttl }}</td> |
||||
|
<td>{{ srv.prority }}</td> |
||||
|
<td>{{ srv.weight }}</td> |
||||
|
<td>{{ srv.port }}</td> |
||||
|
<td>{{ srv.target }}</td> |
||||
|
<td class="text-right"> |
||||
|
{% if is_infra %} |
||||
|
{% include 'buttons/edit.html' with href='machines:edit-srv' id=srv.id %} |
||||
|
{% endif %} |
||||
|
{% include 'buttons/history.html' with href='machines:history' name='srv' id=srv.id %} |
||||
|
</td> |
||||
|
</tr> |
||||
|
{% endfor %} |
||||
|
</table> |
||||
|
|
||||
|
|
||||
Loading…
Reference in new issue