8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-24 20:33:11 +00:00
This commit is contained in:
Hugo Levy-Falk 2019-09-20 11:37:49 +02:00 committed by chirac
parent d98eb4e011
commit c8554ac635
4 changed files with 27 additions and 1 deletions

View file

@ -381,7 +381,7 @@ class OptionalMachineSerializer(NamespacedHMSerializer):
model = preferences.OptionalMachine model = preferences.OptionalMachine
fields = ('password_machine', 'max_lambdauser_interfaces', fields = ('password_machine', 'max_lambdauser_interfaces',
'max_lambdauser_aliases', 'ipv6_mode', 'create_machine', 'max_lambdauser_aliases', 'ipv6_mode', 'create_machine',
'ipv6') 'ipv6', 'dns_ttl')
class OptionalTopologieSerializer(NamespacedHMSerializer): class OptionalTopologieSerializer(NamespacedHMSerializer):

View file

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.23 on 2019-09-20 09:32
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('preferences', '0062_auto_20190910_1909'),
]
operations = [
migrations.AddField(
model_name='optionalmachine',
name='dns_ttl',
field=models.IntegerField(default=86400, verbose_name='Time To Live for DNS records'),
),
]

View file

@ -173,6 +173,10 @@ class OptionalMachine(AclMixin, PreferencesModel):
create_machine = models.BooleanField( create_machine = models.BooleanField(
default=True default=True
) )
dns_ttl = models.IntegerField(
default=86400,
verbose_name=_("Time To Live for DNS records")
)
@cached_property @cached_property
def ipv6(self): def ipv6(self):

View file

@ -183,6 +183,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<tr> <tr>
<th>{% trans "Creation of machines" %}</th> <th>{% trans "Creation of machines" %}</th>
<td>{{ machineoptions.create_machine|tick }}</td> <td>{{ machineoptions.create_machine|tick }}</td>
<th>{% trans "Time To Live for DNS records" %}</th>
<td>{{ machineoptions.dns_ttl }}</td>
</tr> </tr>
</table> </table>
</div> </div>