mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-08 10:56:27 +00:00
Merge branch 'master' into graph_topo
This commit is contained in:
commit
c64f71c2c4
6 changed files with 87 additions and 7 deletions
36
machines/migrations/0079_auto_20180416_0107.py
Normal file
36
machines/migrations/0079_auto_20180416_0107.py
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.10.7 on 2018-04-15 23:07
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
def rename_permission_soa_to_srv(apps, schema_editor):
|
||||||
|
Permission = apps.get_model('auth', 'Permission')
|
||||||
|
# The Permission called 'view_soa' but in the Srv object
|
||||||
|
try:
|
||||||
|
to_rename = Permission.objects.get(
|
||||||
|
codename='view_soa',
|
||||||
|
content_type__model='srv'
|
||||||
|
)
|
||||||
|
except Permission.DoesNotExist:
|
||||||
|
# The permission is missing so no problem
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
to_rename.name = 'Peut voir un object srv'
|
||||||
|
to_rename.codename = 'view_srv'
|
||||||
|
to_rename.save()
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('machines', '0078_auto_20180415_1252'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RunPython(rename_permission_soa_to_srv),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='srv',
|
||||||
|
options={'permissions': (('view_srv', 'Peut voir un objet srv'),)},
|
||||||
|
),
|
||||||
|
]
|
|
@ -698,7 +698,7 @@ class Srv(RevMixin, AclMixin, models.Model):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
permissions = (
|
permissions = (
|
||||||
("view_soa", "Peut voir un objet soa"),
|
("view_srv", "Peut voir un objet srv"),
|
||||||
)
|
)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|
|
@ -190,7 +190,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Description de l'association</th>
|
<th>Description de l'association</th>
|
||||||
<td>{{ assooptions.description }}</td>
|
<td colspan="3">{{ assooptions.description | safe }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -30,7 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>{% blocktrans %}About {{AssoName}}{% endblocktrans %}</h2>
|
<h2>{% blocktrans %}About {{AssoName}}{% endblocktrans %}</h2>
|
||||||
{{ description }}
|
{{ description | safe }}
|
||||||
|
|
||||||
<h2>{% trans "About Re2o" %}</h2>
|
<h2>{% trans "About Re2o" %}</h2>
|
||||||
<p>{% blocktrans %}
|
<p>{% blocktrans %}
|
||||||
|
|
36
topologie/migrations/0059_auto_20180415_2249.py
Normal file
36
topologie/migrations/0059_auto_20180415_2249.py
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.10.7 on 2018-04-16 03:49
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('topologie', '0058_remove_switch_location'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='switch',
|
||||||
|
name='model',
|
||||||
|
field=models.ForeignKey(blank=True, help_text='Modèle du switch', null=True, on_delete=django.db.models.deletion.SET_NULL, to='topologie.ModelSwitch'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='switch',
|
||||||
|
name='number',
|
||||||
|
field=models.PositiveIntegerField(help_text='Nombre de ports'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='switch',
|
||||||
|
name='stack_member_id',
|
||||||
|
field=models.PositiveIntegerField(blank=True, help_text='Baie de brassage du switch', null=True),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='switch',
|
||||||
|
name='switchbay',
|
||||||
|
field=models.ForeignKey(blank=True, help_text='Baie de brassage du switch', null=True, on_delete=django.db.models.deletion.SET_NULL, to='topologie.SwitchBay'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -121,25 +121,33 @@ class Switch(AclMixin, Machine):
|
||||||
id_max de la stack parente"""
|
id_max de la stack parente"""
|
||||||
PRETTY_NAME = "Switch / Commutateur"
|
PRETTY_NAME = "Switch / Commutateur"
|
||||||
|
|
||||||
number = models.PositiveIntegerField()
|
number = models.PositiveIntegerField(
|
||||||
|
help_text="Nombre de ports"
|
||||||
|
)
|
||||||
stack = models.ForeignKey(
|
stack = models.ForeignKey(
|
||||||
'topologie.Stack',
|
'topologie.Stack',
|
||||||
blank=True,
|
blank=True,
|
||||||
null=True,
|
null=True,
|
||||||
on_delete=models.SET_NULL
|
on_delete=models.SET_NULL
|
||||||
)
|
)
|
||||||
stack_member_id = models.PositiveIntegerField(blank=True, null=True)
|
stack_member_id = models.PositiveIntegerField(
|
||||||
|
blank=True,
|
||||||
|
null=True,
|
||||||
|
help_text="Baie de brassage du switch"
|
||||||
|
)
|
||||||
model = models.ForeignKey(
|
model = models.ForeignKey(
|
||||||
'topologie.ModelSwitch',
|
'topologie.ModelSwitch',
|
||||||
blank=True,
|
blank=True,
|
||||||
null=True,
|
null=True,
|
||||||
on_delete=models.SET_NULL
|
on_delete=models.SET_NULL,
|
||||||
|
help_text="Modèle du switch"
|
||||||
)
|
)
|
||||||
switchbay = models.ForeignKey(
|
switchbay = models.ForeignKey(
|
||||||
'topologie.SwitchBay',
|
'topologie.SwitchBay',
|
||||||
blank=True,
|
blank=True,
|
||||||
null=True,
|
null=True,
|
||||||
on_delete=models.SET_NULL
|
on_delete=models.SET_NULL,
|
||||||
|
help_text="Baie de brassage du switch"
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|
Loading…
Reference in a new issue