{% extends 'generic/object.html' %} {% load buttons %} {% load static %} {% load helpers %} {% load plugins %} {% block breadcrumbs %} {{ block.super }} {% if object.parent_bay %} {% endif %} {% endblock %} {% block extra_controls %} {% if perms.dcim.change_device %} {% endif %} {% endblock %} {% block extra_tabs %} {% with tab_name='device-bays' devicebay_count=object.devicebays.count %} {% if active_tab == tab_name or devicebay_count %} {% endif %} {% endwith %} {% with tab_name='module-bays' modulebay_count=object.modulebays.count %} {% if active_tab == tab_name or modulebay_count %} {% endif %} {% endwith %} {% with tab_name='interfaces' interface_count=object.interfaces_count %} {% if active_tab == tab_name or interface_count %} {% endif %} {% endwith %} {% with tab_name='front-ports' frontport_count=object.frontports.count %} {% if active_tab == tab_name or frontport_count %} {% endif %} {% endwith %} {% with tab_name='rear-ports' rearport_count=object.rearports.count %} {% if active_tab == tab_name or rearport_count %} {% endif %} {% endwith %} {% with tab_name='console-ports' consoleport_count=object.consoleports.count %} {% if active_tab == tab_name or consoleport_count %} {% endif %} {% endwith %} {% with tab_name='console-server-ports' consoleserverport_count=object.consoleserverports.count %} {% if active_tab == tab_name or consoleserverport_count %} {% endif %} {% endwith %} {% with tab_name='power-ports' powerport_count=object.powerports.count %} {% if active_tab == tab_name or powerport_count %} {% endif %} {% endwith %} {% with tab_name='power-outlets' poweroutlet_count=object.poweroutlets.count %} {% if active_tab == tab_name or poweroutlet_count %} {% endif %} {% endwith %} {% with tab_name='inventory-items' inventoryitem_count=object.inventoryitems.count %} {% if active_tab == tab_name or inventoryitem_count %} {% endif %} {% endwith %} {% if perms.dcim.napalm_read_device and object.status == 'active' and object.primary_ip and object.platform.napalm_driver %} {# NAPALM-enabled tabs #} {% endif %} {% if perms.extras.view_configcontext %} {% endif %} {% endblock %}