{% extends 'generic/object.html' %} {% load helpers %} {% load i18n %} {% block content %}
{% trans "Policy" %}
{% trans "Enabled" %} {{ object.enabled|yesno:"Yes,No" }}
{% trans "Lowest score to approve or close" %} {{ object.min_score }}
{% trans "A current completed run is required" %} {{ object.require_passed_run|yesno:"Yes,No" }}
{% trans "Run when the change is staged" %} {{ object.run_on_submission|yesno:"Yes,No" }}
{% trans "Scope" %}
{# A policy with no scope applies to every change. Within a kind any #} {# entry matches; across kinds every named kind must match. #} {% for label, entries in scope %} {% if entries %}

{{ label }}: {% for entry in entries %}{{ entry }}{% if not forloop.last %}, {% endif %}{% endfor %}

{% endif %} {% endfor %}

{% trans "Nothing listed means this policy applies to every change." %}

{% trans "Rules" %}
{% if rules %} {% for rule in rules %} {% endfor %}
{% trans "Name" %} {% trans "Engine" %} {% trans "Category" %} {% trans "Severity" %} {% trans "Enabled" %}
{{ rule.name }} {{ rule.get_engine_display }} {{ rule.category|placeholder }} {{ rule.get_severity_display }} {{ rule.enabled|yesno:"Yes,No" }} {% if perms.forward_netbox.change_forwardchangevalidationrule %} {% trans "Edit" %} {% endif %} {% if perms.forward_netbox.delete_forwardchangevalidationrule %} {% trans "Delete" %} {% endif %}
{% else %}

{% trans "No rules yet: a policy with no rules checks nothing." %}

{% endif %} {% if perms.forward_netbox.add_forwardchangevalidationrule %} {% trans "Add rule" %} {% endif %}
{% endblock content %}