{# SPDX-License-Identifier: Apache-2.0 #} {# Copyright (C) 2025 Marcin Zieba #} {% extends 'generic/_base.html' %} {% block title %}Apply Rule — Preview{% endblock %} {% block content %}
Back to rule list
{# ── Rule summary ─────────────────────────────────────────────────────────────── #}
Rule
Module Type
{% if rule.module_type_is_regex %} {{ rule.module_type_pattern }} regex {% elif rule.module_type %} {{ rule.module_type.model }} {% else %} {% endif %}
Parent Module Type
{% if rule.parent_module_type %} {{ rule.parent_module_type.model }} {% else %} Any {% endif %}
Device Type
{% if rule.device_type %} {{ rule.device_type.model }} {% else %} Any {% endif %}
Platform
{% if rule.platform %} {{ rule.platform.name }} {% else %} Any {% endif %}
Name Template
{{ rule.name_template }}
{% if rule.channel_count %}
Channels
{{ rule.channel_count }} starting at {{ rule.channel_start }}
{% endif %}
{# ── Preview table ────────────────────────────────────────────────────────────── #}
{% csrf_token %}
Preview
{% if has_more %} Showing {{ preview|length }} of {{ total_checked }}+ examined that would change (batch limit: {{ batch_limit }}) {% else %} {{ preview|length }} would change ({{ total_checked }} examined) {% endif %}
{% if preview %}
{% for entry in preview %} {% endfor %}
Device Module Type Current Name New Name(s)
{% if entry.module.device %} {{ entry.module.device }} {% else %}{% endif %} {% if entry.module.module_type %} {{ entry.module.module_type.model }} {% else %} {% endif %} {{ entry.current_name }} {% for new_name in entry.new_names %} {{ new_name }}{% if not forloop.last %}
{% endif %} {% endfor %}
{% else %}
No installed interfaces would be affected by this rule.
{% endif %}
{# ── Apply controls ───────────────────────────────────────────────────────────── #} {% if preview %}
Apply
{% if has_more %}
At least {{ batch_limit }} interfaces would be affected. Synchronous apply is limited to {{ batch_limit }} interfaces per run. Use Run as Background Job to process all of them.
{% endif %} {% if can_apply %} {% else %}

You do not have permission to apply interface changes. (requires dcim.change_interface)

{% endif %}
{% endif %}
{% endblock %}