mirror of https://gitlab.federez.net/re2o/re2o
26 changed files with 1315 additions and 28 deletions
@ -0,0 +1,40 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.10.7 on 2018-09-19 20:25 |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import migrations, models |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('machines', '0094_auto_20180815_1918'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AddField( |
|||
model_name='vlan', |
|||
name='arp_protect', |
|||
field=models.BooleanField(default=False), |
|||
), |
|||
migrations.AddField( |
|||
model_name='vlan', |
|||
name='dhcp_snooping', |
|||
field=models.BooleanField(default=False), |
|||
), |
|||
migrations.AddField( |
|||
model_name='vlan', |
|||
name='dhcpv6_snooping', |
|||
field=models.BooleanField(default=False), |
|||
), |
|||
migrations.AddField( |
|||
model_name='vlan', |
|||
name='igmp', |
|||
field=models.BooleanField(default=False, help_text='Gestion multicast v4'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='vlan', |
|||
name='mld', |
|||
field=models.BooleanField(default=False, help_text='Gestion multicast v6'), |
|||
), |
|||
] |
|||
@ -0,0 +1,102 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.10.7 on 2018-09-19 20:25 |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import migrations, models |
|||
import django.db.models.deletion |
|||
import re2o.aes_field |
|||
import re2o.mixins |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('machines', '0095_auto_20180919_2225'), |
|||
('preferences', '0050_auto_20180818_1329'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.CreateModel( |
|||
name='RadiusKey', |
|||
fields=[ |
|||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
|||
('radius_key', re2o.aes_field.AESEncryptedField(help_text='Clef radius', max_length=255)), |
|||
('comment', models.CharField(blank=True, help_text='Commentaire de cette clef', max_length=255, null=True)), |
|||
('default_switch', models.BooleanField(default=True, help_text='Clef par défaut des switchs', unique=True)), |
|||
], |
|||
options={ |
|||
'permissions': (('view_radiuskey', 'Peut voir un objet radiuskey'),), |
|||
}, |
|||
bases=(re2o.mixins.AclMixin, models.Model), |
|||
), |
|||
migrations.CreateModel( |
|||
name='Reminder', |
|||
fields=[ |
|||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
|||
('days', models.IntegerField(default=7, help_text="Délais entre le mail et la fin d'adhésion", unique=True)), |
|||
('message', models.CharField(blank=True, default='', help_text='Message affiché spécifiquement pour ce rappel', max_length=255, null=True)), |
|||
], |
|||
options={ |
|||
'permissions': (('view_reminder', 'Peut voir un objet reminder'),), |
|||
}, |
|||
bases=(re2o.mixins.AclMixin, models.Model), |
|||
), |
|||
migrations.CreateModel( |
|||
name='SwitchManagementCred', |
|||
fields=[ |
|||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
|||
('management_id', models.CharField(help_text='Login du switch', max_length=63)), |
|||
('management_pass', re2o.aes_field.AESEncryptedField(help_text='Mot de passe', max_length=63)), |
|||
('default_switch', models.BooleanField(default=True, help_text='Creds par défaut des switchs', unique=True)), |
|||
], |
|||
options={ |
|||
'permissions': (('view_switchmanagementcred', 'Peut voir un objet switchmanagementcred'),), |
|||
}, |
|||
bases=(re2o.mixins.AclMixin, models.Model), |
|||
), |
|||
migrations.AddField( |
|||
model_name='optionaltopologie', |
|||
name='sftp_login', |
|||
field=models.CharField(blank=True, help_text='Login sftp des switchs', max_length=32, null=True), |
|||
), |
|||
migrations.AddField( |
|||
model_name='optionaltopologie', |
|||
name='sftp_pass', |
|||
field=re2o.aes_field.AESEncryptedField(blank=True, help_text='Mot de passe sftp', max_length=63, null=True), |
|||
), |
|||
migrations.AddField( |
|||
model_name='optionaltopologie', |
|||
name='switchs_ip_type', |
|||
field=models.OneToOneField(blank=True, help_text="Plage d'ip de management des switchs", null=True, on_delete=django.db.models.deletion.PROTECT, to='machines.IpType'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='optionaltopologie', |
|||
name='switchs_provision', |
|||
field=models.CharField(choices=[('sftp', 'sftp'), ('tftp', 'tftp')], default='tftp', help_text='Mode de récupération des confs par les switchs', max_length=32), |
|||
), |
|||
migrations.AddField( |
|||
model_name='optionaltopologie', |
|||
name='switchs_rest_management', |
|||
field=models.BooleanField(default=False, help_text='Rest management, activé si provision auto'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='optionaltopologie', |
|||
name='switchs_web_management', |
|||
field=models.BooleanField(default=False, help_text='Web management, activé si provision automatique'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='optionaltopologie', |
|||
name='switchs_web_management_ssl', |
|||
field=models.BooleanField(default=False, help_text='Web management ssl. Assurez-vous que un certif est installé sur le switch !'), |
|||
), |
|||
migrations.AlterField( |
|||
model_name='mailmessageoption', |
|||
name='welcome_mail_en', |
|||
field=models.TextField(default='', help_text='Mail de bienvenue en anglais'), |
|||
), |
|||
migrations.AlterField( |
|||
model_name='mailmessageoption', |
|||
name='welcome_mail_fr', |
|||
field=models.TextField(default='', help_text='Mail de bienvenue en français'), |
|||
), |
|||
] |
|||
@ -0,0 +1,57 @@ |
|||
{% 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 %} |
|||
{% load acl %} |
|||
{% load logs_extra %} |
|||
<table class="table table-striped"> |
|||
<thead> |
|||
<tr> |
|||
<th>Id Clef</th> |
|||
<th>Commentaire</th> |
|||
<th>Clef par default des switchs</th> |
|||
<th>Clef utilisée par les switchs</th> |
|||
<th></th> |
|||
<th></th> |
|||
</tr> |
|||
</thead> |
|||
{% for radiuskey in radiuskey_list %} |
|||
<tr> |
|||
<td>{{ radiuskey.id }}</td> |
|||
<td>{{ radiuskey.comment }}</td> |
|||
<td>{{ radiuskey.default_switch }}</td> |
|||
<td>{{ radiuskey.switch_set.all|join:", " }}</td> |
|||
<td class="text-right"> |
|||
{% can_edit radiuskey %} |
|||
{% include 'buttons/edit.html' with href='preferences:edit-radiuskey' id=radiuskey.id %} |
|||
{% acl_end %} |
|||
{% can_delete radiuskey %} |
|||
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'preferences:del-radiuskey' radiuskey.pk %}"> |
|||
<i class="fa fa-trash"></i> |
|||
</a> |
|||
{% acl_end %} |
|||
{% history_button radiuskey %} |
|||
</td> |
|||
</tr> |
|||
{% endfor %} |
|||
</table> |
|||
|
|||
@ -0,0 +1,55 @@ |
|||
{% 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 %} |
|||
{% load acl %} |
|||
{% load logs_extra %} |
|||
<table class="table table-striped"> |
|||
<thead> |
|||
<tr> |
|||
<th>Identifiant</th> |
|||
<th>Creds par default des switchs</th> |
|||
<th>Utilisé pour les switchs</th> |
|||
<th></th> |
|||
<th></th> |
|||
</tr> |
|||
</thead> |
|||
{% for switchmanagementcred in switchmanagementcred_list %} |
|||
<tr> |
|||
<td>{{ switchmanagementcred.management_id }}</td> |
|||
<td>{{ switchmanagementcred.default_switch }}</td> |
|||
<td>{{ switchmanagementcred.switch_set.all|join:", " }}</td> |
|||
<td class="text-right"> |
|||
{% can_edit switchmanagementcred %} |
|||
{% include 'buttons/edit.html' with href='preferences:edit-switchmanagementcred' id=switchmanagementcred.id %} |
|||
{% acl_end %} |
|||
{% can_delete switchmanagementcred %} |
|||
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'preferences:del-switchmanagementcred' switchmanagementcred.pk %}"> |
|||
<i class="fa fa-trash"></i> |
|||
</a> |
|||
{% acl_end %} |
|||
{% history_button switchmanagementcred %} |
|||
</td> |
|||
</tr> |
|||
{% endfor %} |
|||
</table> |
|||
|
|||
@ -0,0 +1,40 @@ |
|||
{% extends "topologie/sidebar.html" %} |
|||
{% 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 %} |
|||
|
|||
{% load bootstrap3 %} |
|||
|
|||
{% block title %}Création et modification de machines{% endblock %} |
|||
|
|||
{% block content %} |
|||
|
|||
<form class="form" method="post"> |
|||
{% csrf_token %} |
|||
<h4>Attention, voulez-vous vraiment supprimer cet objet {{ objet_name }} ( {{ objet }} ) ?</h4> |
|||
{% bootstrap_button "Confirmer" button_type="submit" icon="trash" %} |
|||
</form> |
|||
<br /> |
|||
<br /> |
|||
<br /> |
|||
{% endblock %} |
|||
@ -0,0 +1,32 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.10.7 on 2018-09-19 20:25 |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import migrations, models |
|||
import django.db.models.deletion |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('preferences', '0051_auto_20180919_2225'), |
|||
('topologie', '0062_auto_20180815_1918'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AddField( |
|||
model_name='modelswitch', |
|||
name='firmware', |
|||
field=models.CharField(blank=True, max_length=255, null=True), |
|||
), |
|||
migrations.AddField( |
|||
model_name='switch', |
|||
name='management_creds', |
|||
field=models.ForeignKey(blank=True, help_text='Identifiant de management de ce switch', null=True, on_delete=django.db.models.deletion.PROTECT, to='preferences.SwitchManagementCred'), |
|||
), |
|||
migrations.AddField( |
|||
model_name='switch', |
|||
name='radius_key', |
|||
field=models.ForeignKey(blank=True, help_text='Clef radius du switch', null=True, on_delete=django.db.models.deletion.PROTECT, to='preferences.RadiusKey'), |
|||
), |
|||
] |
|||
@ -0,0 +1,20 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.10.7 on 2018-09-20 16:28 |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import migrations, models |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('topologie', '0063_auto_20180919_2225'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AddField( |
|||
model_name='switch', |
|||
name='automatic_provision', |
|||
field=models.BooleanField(default=False, help_text='Provision automatique de ce switch'), |
|||
), |
|||
] |
|||
@ -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 %} |
|||
|
|||
{% load acl %} |
|||
{% load logs_extra %} |
|||
|
|||
<div class="table-responsive"> |
|||
<table class="table table-striped"> |
|||
<thead> |
|||
<tr> |
|||
<th>Id</th> |
|||
<th>Nom</th> |
|||
<th>Arp Protect</th> |
|||
<th>Dhcp Snooping</th> |
|||
<th>Dhcpv6 Snooping</th> |
|||
<th>Igmp</th> |
|||
<th>Mld</th> |
|||
<th></th> |
|||
</tr> |
|||
</thead> |
|||
{% for vlan in vlan_list %} |
|||
<tr> |
|||
<td>{{ vlan.vlan_id }}</td> |
|||
<td>{{ vlan.name }}</td> |
|||
<td>{{ vlan.arp_protect }}</td> |
|||
<td>{{ vlan.dhcp_snooping }}</td> |
|||
<td>{{ vlan.dhcpv6_snooping }}</td> |
|||
<td>{{ vlan.igmp }}</td> |
|||
<td>{{ vlan.mld }}</td> |
|||
<td class="text-right"> |
|||
{% can_edit vlan %} |
|||
{% include 'buttons/edit.html' with href='topologie:edit-vlanoptions' id=vlan.id %} |
|||
{% acl_end %} |
|||
{% history_button vlan %} |
|||
</td> |
|||
</tr> |
|||
{% endfor %} |
|||
</table> |
|||
</div> |
|||
Loading…
Reference in new issue