Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit ee2ee0ad authored by klafyvel's avatar klafyvel

Merge branch 'cleanup_machines' into 'dev'

Clean up of machines

See merge request federez/re2o!310
parents 92e66bb1 48d5ab10
......@@ -41,4 +41,3 @@ def can_view(user):
can = user.has_module_perms('machines')
return can, None if can else _("You don't have the right to view this"
" application.")
......@@ -29,7 +29,6 @@ from __future__ import unicode_literals
from django.contrib import admin
from reversion.admin import VersionAdmin
from .models import IpType, Machine, MachineType, Domain, IpList, Interface
from .models import (
Extension,
SOA,
......@@ -47,6 +46,7 @@ from .models import (
Ipv6List,
OuverturePortList,
)
from .models import IpType, Machine, MachineType, Domain, IpList, Interface
class MachineAdmin(VersionAdmin):
......@@ -98,6 +98,7 @@ class TxtAdmin(VersionAdmin):
""" Admin view of a TXT object """
pass
class DNameAdmin(VersionAdmin):
""" Admin view of a DName object """
pass
......@@ -147,12 +148,12 @@ class ServiceAdmin(VersionAdmin):
""" Admin view of a ServiceAdmin object """
list_display = ('service_type', 'min_time_regen', 'regular_time_regen')
class RoleAdmin(VersionAdmin):
""" Admin view of a RoleAdmin object """
pass
admin.site.register(Machine, MachineAdmin)
admin.site.register(MachineType, MachineTypeAdmin)
admin.site.register(IpType, IpTypeAdmin)
......
......@@ -35,13 +35,12 @@ Formulaires d'ajout, edition et suppressions de :
from __future__ import unicode_literals
from django.forms import ModelForm, Form
from django import forms
from django.forms import ModelForm, Form
from django.utils.translation import ugettext_lazy as _
from re2o.field_permissions import FieldPermissionFormMixin
from re2o.mixins import FormRevMixin
from .models import (
Domain,
Machine,
......@@ -68,6 +67,7 @@ from .models import (
class EditMachineForm(FormRevMixin, FieldPermissionFormMixin, ModelForm):
"""Formulaire d'édition d'une machine"""
class Meta:
model = Machine
fields = '__all__'
......@@ -80,12 +80,14 @@ class EditMachineForm(FormRevMixin, FieldPermissionFormMixin, ModelForm):
class NewMachineForm(EditMachineForm):
"""Creation d'une machine, ne renseigne que le nom"""
class Meta(EditMachineForm.Meta):
fields = ['name']
class EditInterfaceForm(FormRevMixin, FieldPermissionFormMixin, ModelForm):
"""Edition d'une interface. Edition complète"""
class Meta:
model = Interface
fields = ['machine', 'type', 'ipv4', 'mac_address', 'details']
......@@ -116,7 +118,7 @@ class EditInterfaceForm(FormRevMixin, FieldPermissionFormMixin, ModelForm):
interface=self.instance
)
if "machine" in self.fields:
self.fields['machine'].queryset = Machine.objects.all()\
self.fields['machine'].queryset = Machine.objects.all() \
.select_related('user')
can_use_all_machinetype, _reason = MachineType.can_use_all(user)
if not can_use_all_machinetype:
......@@ -128,12 +130,14 @@ class EditInterfaceForm(FormRevMixin, FieldPermissionFormMixin, ModelForm):
class AddInterfaceForm(EditInterfaceForm):
"""Ajout d'une interface à une machine. En fonction des droits,
affiche ou non l'ensemble des ip disponibles"""
class Meta(EditInterfaceForm.Meta):
fields = ['type', 'ipv4', 'mac_address', 'details']
class AliasForm(FormRevMixin, ModelForm):
"""Ajout d'un alias (et edition), CNAME, contenant nom et extension"""
class Meta:
model = Domain
fields = ['name', 'extension']
......@@ -151,6 +155,7 @@ class AliasForm(FormRevMixin, ModelForm):
class DomainForm(FormRevMixin, ModelForm):
"""Ajout et edition d'un enregistrement de nom, relié à interface"""
class Meta:
model = Domain
fields = ['name']
......@@ -183,6 +188,7 @@ class DelAliasForm(FormRevMixin, Form):
class MachineTypeForm(FormRevMixin, ModelForm):
"""Ajout et edition d'un machinetype, relié à un iptype"""
class Meta:
model = MachineType
fields = ['type', 'ip_type']
......@@ -214,6 +220,7 @@ class DelMachineTypeForm(FormRevMixin, Form):
class IpTypeForm(FormRevMixin, ModelForm):
"""Formulaire d'ajout d'un iptype. Pas d'edition de l'ip de start et de
stop après creation"""
class Meta:
model = IpType
fields = '__all__'
......@@ -227,6 +234,7 @@ class IpTypeForm(FormRevMixin, ModelForm):
class EditIpTypeForm(IpTypeForm):
"""Edition d'un iptype. Pas d'edition du rangev4 possible, car il faudrait
synchroniser les objets iplist"""
class Meta(IpTypeForm.Meta):
fields = ['extension', 'type', 'need_infra', 'domaine_ip_network', 'domaine_ip_netmask',
'prefix_v6', 'prefix_v6_length',
......@@ -253,6 +261,7 @@ class DelIpTypeForm(FormRevMixin, Form):
class ExtensionForm(FormRevMixin, ModelForm):
"""Formulaire d'ajout et edition d'une extension"""
class Meta:
model = Extension
fields = '__all__'
......@@ -285,6 +294,7 @@ class DelExtensionForm(FormRevMixin, Form):
class Ipv6ListForm(FormRevMixin, FieldPermissionFormMixin, ModelForm):
"""Gestion des ipv6 d'une machine"""
class Meta:
model = Ipv6List
fields = ['ipv6', 'slaac_ip']
......@@ -296,6 +306,7 @@ class Ipv6ListForm(FormRevMixin, FieldPermissionFormMixin, ModelForm):
class SOAForm(FormRevMixin, ModelForm):
"""Ajout et edition d'un SOA"""
class Meta:
model = SOA
fields = '__all__'
......@@ -324,6 +335,7 @@ class DelSOAForm(FormRevMixin, Form):
class MxForm(FormRevMixin, ModelForm):
"""Ajout et edition d'un MX"""
class Meta:
model = Mx
fields = ['zone', 'priority', 'name']
......@@ -357,6 +369,7 @@ class NsForm(FormRevMixin, ModelForm):
"""Ajout d'un NS pour une zone
On exclue les CNAME dans les objets domain (interdit par la rfc)
donc on prend uniquemet """
class Meta:
model = Ns
fields = ['zone', 'ns']
......@@ -388,6 +401,7 @@ class DelNsForm(FormRevMixin, Form):
class TxtForm(FormRevMixin, ModelForm):
"""Ajout d'un txt pour une zone"""
class Meta:
model = Txt
fields = '__all__'
......@@ -416,6 +430,7 @@ class DelTxtForm(FormRevMixin, Form):
class DNameForm(FormRevMixin, ModelForm):
"""Add a DNAME entry for a zone"""
class Meta:
model = DName
fields = '__all__'
......@@ -444,6 +459,7 @@ class DelDNameForm(FormRevMixin, Form):
class SrvForm(FormRevMixin, ModelForm):
"""Ajout d'un srv pour une zone"""
class Meta:
model = Srv
fields = '__all__'
......@@ -473,6 +489,7 @@ class DelSrvForm(FormRevMixin, Form):
class NasForm(FormRevMixin, ModelForm):
"""Ajout d'un type de nas (machine d'authentification,
swicths, bornes...)"""
class Meta:
model = Nas
fields = '__all__'
......@@ -501,6 +518,7 @@ class DelNasForm(FormRevMixin, Form):
class RoleForm(FormRevMixin, ModelForm):
"""Add and edit role."""
class Meta:
model = Role
fields = '__all__'
......@@ -509,9 +527,9 @@ class RoleForm(FormRevMixin, ModelForm):
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
super(RoleForm, self).__init__(*args, prefix=prefix, **kwargs)
self.fields['servers'].queryset = (Interface.objects.all()
.select_related(
'domain__extension'
))
.select_related(
'domain__extension'
))
class DelRoleForm(FormRevMixin, Form):
......@@ -533,6 +551,7 @@ class DelRoleForm(FormRevMixin, Form):
class ServiceForm(FormRevMixin, ModelForm):
"""Ajout et edition d'une classe de service : dns, dhcp, etc"""
class Meta:
model = Service
fields = '__all__'
......@@ -541,9 +560,9 @@ class ServiceForm(FormRevMixin, ModelForm):
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
super(ServiceForm, self).__init__(*args, prefix=prefix, **kwargs)
self.fields['servers'].queryset = (Interface.objects.all()
.select_related(
'domain__extension'
))
.select_related(
'domain__extension'
))
def save(self, commit=True):
# TODO : None of the parents of ServiceForm use the commit
......@@ -574,6 +593,7 @@ class DelServiceForm(FormRevMixin, Form):
class VlanForm(FormRevMixin, ModelForm):
"""Ajout d'un vlan : id, nom"""
class Meta:
model = Vlan
fields = ['vlan_id', 'name', 'comment']
......@@ -614,6 +634,7 @@ class DelVlanForm(FormRevMixin, Form):
class EditOuverturePortConfigForm(FormRevMixin, ModelForm):
"""Edition de la liste des profils d'ouverture de ports
pour l'interface"""
class Meta:
model = Interface
fields = ['port_lists']
......@@ -630,6 +651,7 @@ class EditOuverturePortConfigForm(FormRevMixin, ModelForm):
class EditOuverturePortListForm(FormRevMixin, ModelForm):
"""Edition de la liste des ports et profils d'ouverture
des ports"""
class Meta:
model = OuverturePortList
fields = '__all__'
......@@ -642,9 +664,10 @@ class EditOuverturePortListForm(FormRevMixin, ModelForm):
**kwargs
)
class SshFpForm(FormRevMixin, ModelForm):
"""Edits a SSHFP record."""
class Meta:
model = SshFp
exclude = ('machine',)
......@@ -656,4 +679,3 @@ class SshFpForm(FormRevMixin, ModelForm):
prefix=prefix,
**kwargs
)
This diff is collapsed.
......@@ -26,8 +26,8 @@
Serializers for the Machines app
"""
from rest_framework import serializers
from machines.models import (
Interface,
IpType,
......@@ -148,13 +148,13 @@ class TypeSerializer(serializers.ModelSerializer):
get ForeignKey values. Infos about the general port policy is added """
extension = ExtensionNameField(read_only=True)
ouverture_ports_tcp_in = serializers\
ouverture_ports_tcp_in = serializers \
.SerializerMethodField('get_port_policy_input_tcp')
ouverture_ports_tcp_out = serializers\
ouverture_ports_tcp_out = serializers \
.SerializerMethodField('get_port_policy_output_tcp')
ouverture_ports_udp_in = serializers\
ouverture_ports_udp_in = serializers \
.SerializerMethodField('get_port_policy_input_udp')
ouverture_ports_udp_out = serializers\
ouverture_ports_udp_out = serializers \
.SerializerMethodField('get_port_policy_output_udp')
class Meta:
......@@ -400,7 +400,7 @@ class OuverturePortsSerializer(serializers.Serializer):
return {
i.ipv4.ipv4: {
"tcp_in": [j.tcp_ports_in() for j in i.port_lists.all()],
"tcp_out": [j.tcp_ports_out()for j in i.port_lists.all()],
"tcp_out": [j.tcp_ports_out() for j in i.port_lists.all()],
"udp_in": [j.udp_ports_in() for j in i.port_lists.all()],
"udp_out": [j.udp_ports_out() for j in i.port_lists.all()],
}
......@@ -413,7 +413,7 @@ class OuverturePortsSerializer(serializers.Serializer):
return {
i.ipv6: {
"tcp_in": [j.tcp_ports_in() for j in i.port_lists.all()],
"tcp_out": [j.tcp_ports_out()for j in i.port_lists.all()],
"tcp_out": [j.tcp_ports_out() for j in i.port_lists.all()],
"udp_in": [j.udp_ports_in() for j in i.port_lists.all()],
"udp_out": [j.udp_ports_out() for j in i.port_lists.all()],
}
......
......@@ -28,21 +28,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<table class="table table-striped">
<thead>
<tr>
<th>{% trans "Aliases" %}</th>
<th></th>
</tr>
<tr>
<th>{% trans "Aliases" %}</th>
<th></th>
</tr>
</thead>
{% for alias in alias_list %}
<tr>
<td>{{ alias }}</td>
<td class="text-right">
{% can_edit alias %}
{% include 'buttons/edit.html' with href='machines:edit-alias' id=alias.id %}
{% include 'buttons/edit.html' with href='machines:edit-alias' id=alias.id %}
{% acl_end %}
{% history_button alias %}
</td>
</tr>
{% endfor %}
</table>
......@@ -26,11 +26,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<table class="table table-striped">
<thead>
<tr>
<th>{% trans "Target zone" %}</th>
<th>{% trans "Record" %}</th>
<th></th>
</tr>
<tr>
<th>{% trans "Target zone" %}</th>
<th>{% trans "Record" %}</th>
<th></th>
</tr>
</thead>
{% for dname in dname_list %}
<tr>
......@@ -38,11 +38,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ dname.dns_entry }}</td>
<td class="text-right">
{% can_edit dname %}
{% include 'buttons/edit.html' with href='machines:edit-dname' id=dname.id %}
{% include 'buttons/edit.html' with href='machines:edit-dname' id=dname.id %}
{% acl_end %}
{% history_button dname %}
</td>
</tr>
{% endfor %}
</table>
......@@ -30,34 +30,33 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>{% trans "Extension" %}</th>
<th>{% trans "'infra' right required" %}</th>
<th>{% trans "SOA record" %}</th>
<th>{% trans "A record origin" %}</th>
{% if ipv6_enabled %}
<th>{% trans "AAAA record origin" %}</th>
{% endif %}
<th></th>
</tr>
</thead>
{% for extension in extension_list %}
<tr>
<td>{{ extension.name }}</td>
<td>{{ extension.need_infra|tick }}</td>
<td>{{ extension.soa }}</td>
<td>{{ extension.origin }}</td>
<th>{% trans "Extension" %}</th>
<th>{% trans "'infra' right required" %}</th>
<th>{% trans "SOA record" %}</th>
<th>{% trans "A record origin" %}</th>
{% if ipv6_enabled %}
<td>{{ extension.origin_v6 }}</td>
<th>{% trans "AAAA record origin" %}</th>
{% endif %}
<td class="text-right">
{% can_edit extension %}
{% include 'buttons/edit.html' with href='machines:edit-extension' id=extension.id %}
{% acl_end %}
{% history_button extension %}
</td>
<th></th>
</tr>
</thead>
{% for extension in extension_list %}
<tr>
<td>{{ extension.name }}</td>
<td>{{ extension.need_infra|tick }}</td>
<td>{{ extension.soa }}</td>
<td>{{ extension.origin }}</td>
{% if ipv6_enabled %}
<td>{{ extension.origin_v6 }}</td>
{% endif %}
<td class="text-right">
{% can_edit extension %}
{% include 'buttons/edit.html' with href='machines:edit-extension' id=extension.id %}
{% acl_end %}
{% history_button extension %}
</td>
</tr>
{% endfor %}
</table>
</div>
......@@ -31,36 +31,36 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>{% trans "IP type" %}</th>
<th>{% trans "Extension" %}</th>
<th>{% trans "'infra' right required" %}</th>
<th>{% trans "IPv4 range" %}</th>
<th>{% trans "v6 prefix" %}</th>
<th>{% trans "DNSSEC reverse v4/v6" %}</th>
<th>{% trans "On VLAN(s)" %}</th>
<th>{% trans "Default ports opening" %}</th>
<th></th>
</tr>
</thead>
{% for type in iptype_list %}
<tr>
<td>{{ type.type }}</td>
<td>{{ type.extension }}</td>
<td>{{ type.need_infra|tick }}</td>
<td>{{ type.domaine_ip_start }}-{{ type.domaine_ip_stop }}{% if type.ip_network %}<b><u> on </b></u>{{ type.ip_network }}{% endif %}</td>
<td>{{ type.prefix_v6 }}/{{ type.prefix_v6_length }}</td>
<td>{{ type.reverse_v4|tick }}/{{ type.reverse_v6|tick }}</td>
<td>{{ type.vlan }}</td>
<td>{{ type.ouverture_ports }}</td>
<td class="text-right">
{% can_edit type %}
{% include 'buttons/edit.html' with href='machines:edit-iptype' id=type.id %}
{% acl_end %}
{% history_button type %}
</td>
<th>{% trans "IP type" %}</th>
<th>{% trans "Extension" %}</th>
<th>{% trans "'infra' right required" %}</th>
<th>{% trans "IPv4 range" %}</th>
<th>{% trans "v6 prefix" %}</th>
<th>{% trans "DNSSEC reverse v4/v6" %}</th>
<th>{% trans "On VLAN(s)" %}</th>
<th>{% trans "Default ports opening" %}</th>
<th></th>
</tr>
</thead>
{% for type in iptype_list %}
<tr>
<td>{{ type.type }}</td>
<td>{{ type.extension }}</td>
<td>{{ type.need_infra|tick }}</td>
<td>{{ type.domaine_ip_start }}-{{ type.domaine_ip_stop }}{% if type.ip_network %}<b><u> on </u></b>
{{ type.ip_network }}{% endif %}</td>
<td>{{ type.prefix_v6 }}/{{ type.prefix_v6_length }}</td>
<td>{{ type.reverse_v4|tick }}/{{ type.reverse_v6|tick }}</td>
<td>{{ type.vlan }}</td>
<td>{{ type.ouverture_ports }}</td>
<td class="text-right">
{% can_edit type %}
{% include 'buttons/edit.html' with href='machines:edit-iptype' id=type.id %}
{% acl_end %}
{% history_button type %}
</td>
</tr>
{% endfor %}
</table>
</div>
......@@ -28,26 +28,25 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<table class="table table-striped">
<thead>
<tr>
<th>{% trans "IPv6 addresses" %}</th>
<th>{% trans "SLAAC" %}</th>
<th></th>
</tr>
</thead>
<tr>
<th>{% trans "IPv6 addresses" %}</th>
<th>{% trans "SLAAC" %}</th>
<th></th>
</tr>
</thead>
{% for ipv6 in ipv6_list %}
<tr>
<td>{{ ipv6.ipv6 }}</td>
<td>{{ ipv6.slaac_ip }}</td>
<td class="text-right">
{% can_edit ipv6 %}
{% include 'buttons/edit.html' with href='machines:edit-ipv6list' id=ipv6.id %}
{% include 'buttons/edit.html' with href='machines:edit-ipv6list' id=ipv6.id %}
{% acl_end %}
{% can_delete ipv6 %}
{% include 'buttons/suppr.html' with href='machines:del-ipv6list' id=ipv6.id %}
{% include 'buttons/suppr.html' with href='machines:del-ipv6list' id=ipv6.id %}
{% acl_end %}
{% history_button ipv6 %}
</td>
</tr>
{% endfor %}
</table>
......@@ -28,11 +28,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<table class="table table-striped">
<thead>
<tr>
<th>{% trans "Machine type" %}</th>
<th>{% trans "Matching IP type" %}</th>
<th></th>
</tr>
<tr>
<th>{% trans "Machine type" %}</th>
<th>{% trans "Matching IP type" %}</th>
<th></th>
</tr>
</thead>
{% for type in machinetype_list %}
<tr>
......@@ -40,11 +40,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ type.ip_type }}</td>
<td class="text-right">
{% can_edit type %}
{% include 'buttons/edit.html' with href='machines:edit-machinetype' id=type.id %}
{% include 'buttons/edit.html' with href='machines:edit-machinetype' id=type.id %}
{% acl_end %}
{% history_button type %}
</td>
</tr>
{% endfor %}
</table>
......@@ -28,12 +28,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<table class="table table-striped">
<thead>
<tr>
<th>{% trans "Concerned zone" %}</th>
<th>{% trans "Priority" %}</th>
<th>{% trans "Record" %}</th>
<th></th>
</tr>
<tr>
<th>{% trans "Concerned zone" %}</th>
<th>{% trans "Priority" %}</th>
<th>{% trans "Record" %}</th>
<th></th>
</tr>
</thead>
{% for mx in mx_list %}
<tr>
......@@ -42,11 +42,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ mx.name }}</td>
<td class="text-right">
{% can_edit mx %}
{% include 'buttons/edit.html' with href='machines:edit-mx' id=mx.id %}
{% include 'buttons/edit.html' with href='machines:edit-mx' id=mx.id %}
{% acl_end %}
{% history_button mx %}
</td>
</tr>
{% endfor %}
</table>
......@@ -29,29 +29,28 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<table class="table table-striped">
<thead>
<tr>
<th>{% trans "Name" %}</th>
<th>{% trans "NAS device type" %}</th>
<th>{% trans "Machine type linked to the NAS device" %}</th>
<th>{% trans "Access mode" %}</th>
<th>{% trans "MAC address auto capture" %}</th>
<th></th>
</tr>
<tr>
<th>{% trans "Name" %}</th>
<th>{% trans "NAS device type" %}</th>
<th>{% trans "Machine type linked to the NAS device" %}</th>
<th>{% trans "Access mode" %}</th>
<th>{% trans "MAC address auto capture" %}</th>
<th></th>
</tr>
</thead>
{% for nas in nas_list %}
<tr>
<td>{{ nas.name }}</td>
<td>{{ nas.nas_type }}</td>
<td>{{ nas.nas_type }}</td>
<td>{{ nas.machine_type }}</td>
<td>{{ nas.port_access_mode }}</td>
<td>{{ nas.autocapture_mac|tick }}</td>
<td class="text-right">
{% can_edit nas %}
{% include 'buttons/edit.html' with href='machines:edit-nas' id=nas.id %}
{% include 'buttons/edit.html' with href='machines:edit-nas' id=nas.id %}
{% acl_end %}
{% history_button nas %}
</td>
</tr>
{% endfor %}
</table>
......@@ -28,11 +28,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<table class="table table-striped">
<thead>
<tr>
<th>{% trans "Concerned zone" %}</th>
<th>{% trans "Authoritarian interface for the concerned zone" %}</th>
<th></th>
</tr>
<tr>
<th>{% trans "Concerned zone" %}</th>
<th>{% trans "Authoritarian interface for the concerned zone" %}</th>
<th></th>
</tr>
</thead>
{% for ns in ns_list %}
<tr>
......@@ -40,11 +40,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ ns.ns }}</td>
<td class="text-right">
{% can_edit ns %}
{% include 'buttons/edit.html' with href='machines:edit-ns' id=ns.id %}
{% include 'buttons/edit.html' with href='machines:edit-ns' id=ns.id %}
{% acl_end %}
{% history_button ns %}
</td>
</tr>
{% endfor %}
</table>
......@@ -29,13 +29,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<table class="table table-striped">
<thead>
<tr>
<th>{% trans "Role name" %}</th>
<th>{% trans "Specific role" %}</th>
<th>{% trans "Servers" %}</th>
<th></th>
<th></th>
</tr>
<tr>
<th>{% trans "Role name" %}</th>
<th>{% trans "Specific role" %}</th>
<th>{% trans "Servers" %}</th>
<th></th>
<th></th>
</tr>
</thead>
{% for role in role_list %}
<tr>
......@@ -43,12 +43,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ role.specific_role }}</td>
<td>{% for serv in role.servers.all %}{{ serv }}, {% endfor %}</td>
<td class="text-right">
{% can_edit role %}
{% include 'buttons/edit.html' with href='machines:edit-role' id=role.id %}
{% acl_end %}
{% history_button role %}
</td>
</tr>
{% can_edit role %}
{% include 'buttons/edit.html' with href='machines:edit-role' id=role.id %}
{% acl_end %}
{% history_button role %}
</td>
</tr>
{% endfor %}
</table>
......@@ -27,13 +27,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<table class="table table-striped">
<thead>
<tr>
<th>{% trans "Service name" %}</th>
<th>{% trans "Server" %}</th>
<th>{% trans "Last regeneration" %}</th>
<th>{% trans "Regeneration required" %}</th>
<th>{% trans "Regeneration activated" %}</th>
</tr>
<tr>
<th>{% trans "Service name" %}</th>
<th>{% trans "Server" %}</th>
<th>{% trans "Last regeneration" %}</th>
<th>{% trans "Regeneration required" %}</th>
<th>{% trans "Regeneration activated" %}</th>
</tr>
</thead>
{% for server in servers_list %}
<tr>
......@@ -47,4 +47,3 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</tr>
{% endfor %}
</table>