{% extends 'generic/object.html' %}
{% load helpers %}
{% load i18n %}
{% block content %}
{% if not object.enabled %}
{% trans "This assignment is disabled and is not used for any device or VM. Check that its scope is still right, then enable it again." %}
{% endif %}
{% if object.is_missing_scope %}
{% trans "This assignment has no scope and is not global, so it is ignored when resolving credentials. This usually means the objects it was scoped to were deleted. Add a scope or turn on Global, then enable it again." %}
{% endif %}
{% if object.is_global_with_scope %}
{% trans "This assignment is global but still has scope values, so it only matches that scope and never acts as a catch-all. Clear every scope field or turn off Global." %}
{% endif %}
| {% trans "Credential" %} |
{{ object.credential|linkify }} |
| {% trans "Priority" %} |
{{ object.priority }} |
| {% trans "Enabled" %} |
{% checkmark object.enabled %} |
| {% trans "Global" %} |
{% checkmark object.global_scope %} |
| {% trans "Devices" %} |
{% for d in object.devices.all %}{{ d|linkify }}{% if not forloop.last %}, {% endif %}{% empty %}{{ ''|placeholder }}{% endfor %} |
| {% trans "Virtual Machines" %} |
{% for vm in object.virtual_machines.all %}{{ vm|linkify }}{% if not forloop.last %}, {% endif %}{% empty %}{{ ''|placeholder }}{% endfor %} |
| {% trans "Sites" %} |
{% for s in object.sites.all %}{{ s|linkify }}{% if not forloop.last %}, {% endif %}{% empty %}{{ ''|placeholder }}{% endfor %} |
| {% trans "Device Roles" %} |
{% for r in object.device_roles.all %}{{ r|linkify }}{% if not forloop.last %}, {% endif %}{% empty %}{{ ''|placeholder }}{% endfor %} |
| {% trans "Platforms" %} |
{% for p in object.platforms.all %}{{ p|linkify }}{% if not forloop.last %}, {% endif %}{% empty %}{{ ''|placeholder }}{% endfor %} |
| {% trans "Manufacturers" %} |
{% for m in object.manufacturers.all %}{{ m|linkify }}{% if not forloop.last %}, {% endif %}{% empty %}{{ ''|placeholder }}{% endfor %} |
| {% trans "Tenants" %} |
{% for t in object.tenants.all %}{{ t|linkify }}{% if not forloop.last %}, {% endif %}{% empty %}{{ ''|placeholder }}{% endfor %} |
{% endblock content %}