{% extends BASE_TEMPLATE %} {% load i18n %} {% block bodyclass %}switchport-grid{% endblock %} {% block view_content %}

{% trans "Switchport Grid" %} — {{ object }}

{% if not switch_configs %}

{% trans "No switch configurations defined for this rack. Add switches in the Rack Configuration form first." %}

{% elif not rows %}

{% trans "No assets found in this rack." %}

{% else %}
{% csrf_token %}
{% if last_refresh %} {% trans "Last refresh:" %} {{ last_refresh }} {% endif %}
{% if has_conflicts %}
⚠ {% trans "Some ports you entered are already in use by another asset. Review the highlighted cells, tick 'overwrite' to reassign each one, then Save again. Everything else was already saved." %}
{% endif %}
{% csrf_token %} {% for sc in switch_configs %} {% if sc.backend_validation %} {% endif %} {% endfor %} {% for row in rows %} {% for cell in row.cells %} {% if cell.switch_config.backend_validation %} {% endif %} {% endfor %} {% endfor %}
{% trans "U" %} {% trans "Asset" %} {{ sc.label }} {{ sc.switch.barcode }} {{ sc.switch.hostname }} {% trans "netmaker" %}
{{ row.asset.position|default:"-" }} {{ row.asset.barcode|default:row.asset.hostname }}
{% if cell.is_conflict %} {% endif %}
{% if cell.validation %} {% include "switchports/_netmaker_cell.html" with validation=cell.validation %} {% elif cell.value and has_validation %} {% elif cell.port_label_proposal %} {{ cell.port_label_proposal }} {% endif %}

{% trans "How to use:" %}

{% trans "netmaker column legend:" %}

{% endif %} {% include "switchports/_netmaker_styles.html" %} {{ client_validation|json_script:"switch-validation-data" }} {% endblock %}