mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
# Conflicts: # netbox/dcim/tables/template_code.py # netbox/netbox/views/__init__.py # netbox/project-static/css/base.css # netbox/templates/base.html # netbox/templates/circuits/circuit.html # netbox/templates/circuits/circuittermination_edit.html # netbox/templates/circuits/inc/circuit_termination.html # netbox/templates/circuits/provider.html # netbox/templates/dcim/device.html # netbox/templates/dcim/device/base.html # netbox/templates/dcim/device_component.html # netbox/templates/dcim/devicetype.html # netbox/templates/dcim/inc/device_napalm_tabs.html # netbox/templates/dcim/rack.html # netbox/templates/dcim/site.html # netbox/templates/dcim/virtualchassis.html # netbox/templates/extras/configcontext.html # netbox/templates/extras/object_journal.html # netbox/templates/extras/tag.html # netbox/templates/generic/object.html # netbox/templates/generic/object_list.html # netbox/templates/home.html # netbox/templates/inc/nav_menu.html # netbox/templates/ipam/aggregate.html # netbox/templates/ipam/ipaddress.html # netbox/templates/ipam/prefix.html # netbox/templates/ipam/vlan.html # netbox/templates/ipam/vlangroup_edit.html # netbox/templates/ipam/vlangroup_vlans.html # netbox/templates/secrets/secret.html # netbox/templates/tenancy/tenant.html # netbox/templates/users/api_tokens.html # netbox/templates/virtualization/cluster.html # netbox/templates/virtualization/vminterface_edit.html # netbox/utilities/forms/fields.py # netbox/utilities/templates/buttons/export.html
57 lines
3.1 KiB
HTML
57 lines
3.1 KiB
HTML
{% extends 'dcim/device/base.html' %}
|
|
{% load render_table from django_tables2 %}
|
|
{% load helpers %}
|
|
{% load static %}
|
|
|
|
{% block content %}
|
|
<form method="post">
|
|
{% csrf_token %}
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h5>Front Ports</h5>
|
|
<div class="float-end noprint">
|
|
{% if request.user.is_authenticated %}
|
|
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#DeviceFrontPortTable_config" title="Configure table"><i class="mdi mdi-cog"></i> Configure</button>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
{% render_table frontport_table 'inc/table.html' %}
|
|
</div>
|
|
<div class="card-footer noprint">
|
|
{% if perms.dcim.change_frontport %}
|
|
<button type="submit" name="_rename" formaction="{% url 'dcim:frontport_bulk_rename' %}?return_url={% url 'dcim:device_frontports' pk=object.pk %}" class="btn btn-outline-warning btn-sm">
|
|
<i class="bi bi-input-cursor-text" aria-hidden="true"></i> Rename
|
|
</button>
|
|
<button type="submit" name="_edit" formaction="{% url 'dcim:frontport_bulk_edit' %}?device={{ object.pk }}&return_url={% url 'dcim:device_frontports' pk=object.pk %}" class="btn btn-warning btn-sm">
|
|
<i class="bi bi-pencil-fill" aria-hidden="true"></i> Edit
|
|
</button>
|
|
<button type="submit" name="_disconnect" formaction="{% url 'dcim:frontport_bulk_disconnect' %}?return_url={% url 'dcim:device_frontports' pk=object.pk %}" class="btn btn-outline-danger btn-sm">
|
|
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
|
</button>
|
|
{% endif %}
|
|
{% if perms.dcim.delete_frontport %}
|
|
<button type="submit" formaction="{% url 'dcim:frontport_bulk_delete' %}?return_url={% url 'dcim:device_frontports' pk=object.pk %}" class="btn btn-danger btn-sm">
|
|
<i class="bi bi-trash-fill" aria-hidden="true"></i> Delete
|
|
</button>
|
|
{% endif %}
|
|
{% if perms.dcim.add_frontport %}
|
|
<div class="float-end">
|
|
<a href="{% url 'dcim:frontport_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_frontports' pk=object.pk %}" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-plus" aria-hidden="true"></i> Add front ports
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{% include 'inc/paginator.html' with paginator=frontport_table.paginator page=frontport_table.page %}
|
|
{% table_config_form frontport_table %}
|
|
{% endblock %}
|
|
|
|
{% block javascript %}
|
|
<script src="{% static 'js/connection_toggles.js' %}?v{{ settings.VERSION }}"></script>
|
|
<script src="{% static 'js/tableconfig.js' %}?v{{ settings.VERSION }}"></script>
|
|
{% endblock %}
|