General UI cleanup

This commit is contained in:
jeremystretch 2021-07-21 11:20:35 -04:00
parent d42138384f
commit 19eafef41e
28 changed files with 677 additions and 648 deletions

View File

@ -304,8 +304,8 @@ OTHER_MENU = Menu(
MenuGroup( MenuGroup(
label="Miscellaneous", label="Miscellaneous",
items=( items=(
MenuItem(label="Config Contexts", MenuItem(label="Config Contexts", url="extras:configcontext_list",
url="extras:configcontext_list", add_url=None, import_url=None), add_url="extras:configcontext_add", import_url=None),
MenuItem(label="Reports", url="extras:report_list", MenuItem(label="Reports", url="extras:report_list",
add_url=None, import_url=None), add_url=None, import_url=None),
MenuItem(label="Scripts", url="extras:script_list", MenuItem(label="Scripts", url="extras:script_list",

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
@use 'sass:map'; @use 'sass:map';
:root { :root {
--nbx-sidebar-bg: #{$gray-100}; --nbx-sidebar-bg: #{$gray-200};
--nbx-sidebar-link-color: #{$gray-800}; --nbx-sidebar-link-color: #{$gray-800};
--nbx-sidebar-link-hover-bg: #{$blue-100}; --nbx-sidebar-link-hover-bg: #{$blue-100};
--nbx-sidebar-title-color: #{$text-muted}; --nbx-sidebar-title-color: #{$text-muted};
@ -23,7 +23,7 @@
--nbx-color-mode-toggle-color: #{$primary}; --nbx-color-mode-toggle-color: #{$primary};
body[data-netbox-color-mode='dark'] { body[data-netbox-color-mode='dark'] {
--nbx-sidebar-bg: #{$gray-900}; --nbx-sidebar-bg: #{$gray-800};
--nbx-sidebar-link-color: #{$gray-200}; --nbx-sidebar-link-color: #{$gray-200};
--nbx-sidebar-link-hover-bg: #{rgba($blue-300, 0.15)}; --nbx-sidebar-link-hover-bg: #{rgba($blue-300, 0.15)};
--nbx-sidebar-title-color: #{$gray-600}; --nbx-sidebar-title-color: #{$gray-600};
@ -300,6 +300,11 @@ body {
vertical-align: bottom; vertical-align: bottom;
} }
} }
&.attr-table {
th {
width: 25%;
}
}
} }
} }
@ -605,6 +610,7 @@ span.color-label {
height: 1rem; height: 1rem;
display: block; display: block;
box-shadow: $box-shadow-sm; box-shadow: $box-shadow-sm;
border: 1px solid #303030;
border-radius: $border-radius; border-radius: $border-radius;
padding: $badge-padding-y $badge-padding-x; padding: $badge-padding-y $badge-padding-x;
} }

View File

@ -30,6 +30,12 @@
<th scope="row">Type</th> <th scope="row">Type</th>
<td><a href="{{ object.type.get_absolute_url }}">{{ object.type }}</a></td> <td><a href="{{ object.type.get_absolute_url }}">{{ object.type }}</a></td>
</tr> </tr>
<tr>
<th scope="row">Status</th>
<td>
<span class="badge bg-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
</td>
</tr>
<tr> <tr>
<th scope="row">Tenant</th> <th scope="row">Tenant</th>
<td> <td>
@ -43,12 +49,6 @@
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr>
<th scope="row">Status</th>
<td>
<span class="badge bg-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
</td>
</tr>
<tr> <tr>
<th scope="row">Install Date</th> <th scope="row">Install Date</th>
<td>{{ object.install_date|annotated_date|placeholder }}</td> <td>{{ object.install_date|annotated_date|placeholder }}</td>

View File

@ -19,7 +19,7 @@
</tr> </tr>
<tr> <tr>
<th scope="row">Name</th> <th scope="row">Name</th>
<th scope="row">{{ object.name }}</th> <td>{{ object.name }}</td>
</tr> </tr>
<tr> <tr>
<th scope="row">Label</th> <th scope="row">Label</th>

View File

@ -6,358 +6,350 @@
{% load plugins %} {% load plugins %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col col-md-12"> <div class="col col-md-6">
<div class="tab-content"> <div class="card">
<div role="tabpanel" class="tab-pane active" id="details"> <h5 class="card-header">
<div class="row"> Device
<div class="col col-md-6"> </h5>
<div class="card"> <div class="card-body">
<h5 class="card-header"> <table class="table table-hover attr-table">
Device <tr>
</h5> <th scope="row">Region</th>
<div class="card-body"> <td>
<table class="table table-hover attr-table"> {% if object.site.region %}
<tr> {% for region in object.site.region.get_ancestors %}
<th scope="row">Region</th> <a href="{{ region.get_absolute_url }}">{{ region }}</a> /
<td> {% endfor %}
{% if object.site.region %} <a href="{{ object.site.region.get_absolute_url }}">{{ object.site.region }}</a>
{% for region in object.site.region.get_ancestors %} {% else %}
<a href="{{ region.get_absolute_url }}">{{ region }}</a> / <span class="text-muted">None</span>
{% endfor %} {% endif %}
<a href="{{ object.site.region.get_absolute_url }}">{{ object.site.region }}</a> </td>
{% else %} </tr>
<span class="text-muted">None</span> <tr>
{% endif %} <th scope="row">Site</th>
</td> <td>
</tr> <a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a>
<tr> </td>
<th scope="row">Site</th> </tr>
<td> <th scope="row">Location</th>
<a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a> <td>
</td> {% if object.location %}
</tr> {% for location in object.location.get_ancestors %}
<th scope="row">Location</th> <a href="{{ location.get_absolute_url }}">{{ location }}</a> /
<td> {% endfor %}
{% if object.location %} <a href="{{ object.location.get_absolute_url }}">{{ object.location }}</a>
{% for location in object.location.get_ancestors %} {% else %}
<a href="{{ location.get_absolute_url }}">{{ location }}</a> / <span class="text-muted">None</span>
{% endfor %} {% endif %}
<a href="{{ object.location.get_absolute_url }}">{{ object.location }}</a> </td>
{% else %} </tr>
<span class="text-muted">None</span> <tr>
{% endif %} <th scope="row">Rack</th>
</td> <td>
</tr> {% if object.rack %}
<tr> <a href="{% url 'dcim:rack' pk=object.rack.pk %}">{{ object.rack }}</a>
<th scope="row">Rack</th>
<td>
{% if object.rack %}
<a href="{% url 'dcim:rack' pk=object.rack.pk %}">{{ object.rack }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Position</th>
<td>
{% if object.parent_bay %}
{% with object.parent_bay.device as parent %}
<a href="{{ parent.get_absolute_url }}">{{ parent }}</a> / {{ object.parent_bay }}
{% if parent.position %}
(U{{ parent.position }} / {{ parent.get_face_display }})
{% endif %}
{% endwith %}
{% elif object.rack and object.position %}
<span>U{{ object.position }} / {{ object.get_face_display }}</span>
{% elif object.rack and object.device_type.u_height %}
<span class="badge bg-warning">Not racked</span>
{% else %}
<span class="text-muted">&mdash;</span>
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Tenant</th>
<td>
{% if object.tenant %}
{% if object.tenant.group %}
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
{% endif %}
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Device Type</th>
<td>
<span><a href="{{ object.device_type.get_absolute_url }}">{{ object.device_type }}</a> ({{ object.device_type.u_height }}U)</span>
</td>
</tr>
<tr>
<th scope="row">Serial Number</th>
<td><code>{{ object.serial|placeholder }}</code></td>
</tr>
<tr>
<th scope="row">Asset Tag</th>
<td><span>{{ object.asset_tag|placeholder }}</span></td>
</tr>
</table>
</div>
</div>
{% if vc_members %}
<div class="card">
<h5 class="card-header">
Virtual Chassis
</h5>
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<th>Device</th>
<th>Position</th>
<th>Master</th>
<th>Priority</th>
</tr>
{% for vc_member in vc_members %}
<tr{% if vc_member == object %} class="info"{% endif %}>
<td>
<a href="{{ vc_member.get_absolute_url }}">{{ vc_member }}</a>
</td>
<td><span class="badge badge-default">{{ vc_member.vc_position }}</span></td>
<td>{% if object.virtual_chassis.master == vc_member %}<i class="mdi mdi-check-bold"></i>{% endif %}</td>
<td>{{ vc_member.vc_priority|default:"" }}</td>
</tr>
{% endfor %}
</table>
</div>
<div class="card-footer text-end noprint">
<a href="{{ object.virtual_chassis.get_absolute_url }}" class="btn btn-primary btn-sm">
<span class="mdi mdi-arrow-right-bold" aria-hidden="true"></span> View Virtual Chassis
</a>
</div>
</div>
{% endif %}
<div class="card">
<h5 class="card-header">
Management
</h5>
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<th scope="row">Status</th>
<td>
<span class="badge bg-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
</td>
</tr>
<tr>
<th scope="row">Role</th>
<td>
<a href="{% url 'dcim:device_list' %}?role={{ object.device_role.slug }}">{{ object.device_role }}</a>
</td>
</tr>
<tr>
<th scope="row">Platform</th>
<td>
{% if object.platform %}
<a href="{{ object.platform.get_absolute_url }}">{{ object.platform }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Primary IPv4</th>
<td>
{% if object.primary_ip4 %}
<a href="{% url 'ipam:ipaddress' pk=object.primary_ip4.pk %}">{{ object.primary_ip4.address.ip }}</a>
{% if object.primary_ip4.nat_inside %}
<span>(NAT for {{ object.primary_ip4.nat_inside.address.ip }})</span>
{% elif object.primary_ip4.nat_outside %}
<span>(NAT: {{ object.primary_ip4.nat_outside.address.ip }})</span>
{% endif %}
{% else %}
<span class="text-muted">&mdash;</span>
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Primary IPv6</th>
<td>
{% if object.primary_ip6 %}
<a href="{% url 'ipam:ipaddress' pk=object.primary_ip6.pk %}">{{ object.primary_ip6.address.ip }}</a>
{% if object.primary_ip6.nat_inside %}
<span>(NAT for {{ object.primary_ip6.nat_inside.address.ip }})</span>
{% elif object.primary_ip6.nat_outside %}
<span>(NAT: {{ object.primary_ip6.nat_outside.address.ip }})</span>
{% endif %}
{% else %}
<span class="text-muted">&mdash;</span>
{% endif %}
</td>
</tr>
{% if object.cluster %}
<tr>
<th>Cluster</th>
<td>
{% if object.cluster.group %}
<a href="{{ object.cluster.group.get_absolute_url }}">{{ object.cluster.group }}</a> /
{% endif %}
<a href="{{ object.cluster.get_absolute_url }}">{{ object.cluster }}</a>
</td>
</tr>
{% endif %}
</table>
</div>
</div>
{% include 'inc/custom_fields_panel.html' %}
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='dcim:device_list' %}
<div class="card">
<h5 class="card-header">
Comments
</h5>
<div class="card-body rendered-markdown">
{% if object.comments %}
{{ object.comments|render_markdown }}
{% else %} {% else %}
<span class="text-muted">None</span> <span class="text-muted">None</span>
{% endif %} {% endif %}
</div> </td>
</div> </tr>
{% plugin_left_page object %} <tr>
</div> <th scope="row">Position</th>
<div class="col col-md-6"> <td>
{% if object.powerports.exists and object.poweroutlets.exists %} {% if object.parent_bay %}
<div class="card"> {% with object.parent_bay.device as parent %}
<h5 class="card-header"> <a href="{{ parent.get_absolute_url }}">{{ parent }}</a> / {{ object.parent_bay }}
Power Utilization {% if parent.position %}
</h5> (U{{ parent.position }} / {{ parent.get_face_display }})
<div class="card-body"> {% endif %}
<table class="table table-hover"> {% endwith %}
<tr> {% elif object.rack and object.position %}
<th>Input</th> <span>U{{ object.position }} / {{ object.get_face_display }}</span>
<th>Outlets</th> {% elif object.rack and object.device_type.u_height %}
<th>Allocated</th> <span class="badge bg-warning">Not racked</span>
<th>Available</th>
<th>Utilization</th>
</tr>
{% for powerport in object.powerports.all %}
{% with utilization=powerport.get_power_draw powerfeed=powerport.connected_endpoint %}
<tr>
<td>{{ powerport }}</td>
<td>{{ utilization.outlet_count }}</td>
<td>{{ utilization.allocated }}VA</td>
{% if powerfeed.available_power %}
<td>{{ powerfeed.available_power }}VA</td>
<td>{% utilization_graph utilization.allocated|percentage:powerfeed.available_power %}</td>
{% else %}
<td class="text-muted">&mdash;</td>
<td class="text-muted">&mdash;</td>
{% endif %}
</tr>
{% for leg in utilization.legs %}
<tr>
<td style="padding-left: 20px">Leg {{ leg.name }}</td>
<td>{{ leg.outlet_count }}</td>
<td>{{ leg.allocated }}</td>
<td>{{ powerfeed.available_power|divide:3 }}VA</td>
{% with phase_available=powerfeed.available_power|divide:3 %}
<td>{% utilization_graph leg.allocated|percentage:phase_available %}</td>
{% endwith %}
</tr>
{% endfor %}
{% endwith %}
{% endfor %}
</table>
</div>
</div>
{% endif %}
<div class="card">
<h5 class="card-header">
Services
</h5>
<div class="card-body">
{% if services %}
<table class="table table-hover">
{% for service in services %}
{% include 'ipam/inc/service.html' %}
{% endfor %}
</table>
{% else %}
<div class="text-muted">
None
</div>
{% endif %}
</div>
{% if perms.ipam.add_service %}
<div class="card-footer text-end noprint">
<a href="{% url 'dcim:device_service_assign' device=object.pk %}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Assign Service
</a>
</div>
{% endif %}
</div>
<div class="card">
<h5 class="card-header">
Images
</h5>
<div class="card-body">
{% include 'inc/image_attachments.html' with images=object.images.all %}
</div>
{% if perms.extras.add_imageattachment %}
<div class="card-footer text-end noprint">
<a href="{% url 'dcim:device_add_image' object_id=object.pk %}" class="btn btn-primary btn-sm">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span>
Attach an Image
</a>
</div>
{% endif %}
</div>
<div class="card noprint">
<h5 class="card-header">
Related Devices
</h5>
<div class="card-body">
{% if related_devices %}
<table class="table table-hover">
<tr>
<th>Device</th>
<th>Rack</th>
<th>Type</th>
</tr>
{% for rd in related_devices %}
<tr>
<td>
<a href="{% url 'dcim:device' pk=rd.pk %}">{{ rd }}</a>
</td>
<td>
{% if rd.rack %}
<a href="{% url 'dcim:rack' pk=rd.rack.pk %}">{{ rd.rack }}</a>
{% else %}
<span class="text-muted">&mdash;</span>
{% endif %}
</td>
<td>{{ rd.device_type }}</td>
</tr>
{% endfor %}
</table>
{% else %} {% else %}
<div class="text-muted">None</div> <span class="text-muted">&mdash;</span>
{% endif %} {% endif %}
</div> </td>
</div> </tr>
{% plugin_right_page object %} <tr>
</div> <th scope="row">Tenant</th>
</div> <td>
<div class="row"> {% if object.tenant %}
<div class="col col-md-12"> {% if object.tenant.group %}
{% plugin_full_width_page object %} <a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
</div> {% endif %}
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Device Type</th>
<td>
<span><a href="{{ object.device_type.get_absolute_url }}">{{ object.device_type }}</a> ({{ object.device_type.u_height }}U)</span>
</td>
</tr>
<tr>
<th scope="row">Serial Number</th>
<td><code>{{ object.serial|placeholder }}</code></td>
</tr>
<tr>
<th scope="row">Asset Tag</th>
<td><span>{{ object.asset_tag|placeholder }}</span></td>
</tr>
</table>
</div> </div>
</div> </div>
{% if vc_members %}
<div class="card">
<h5 class="card-header">
Virtual Chassis
</h5>
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<th>Device</th>
<th>Position</th>
<th>Master</th>
<th>Priority</th>
</tr>
{% for vc_member in vc_members %}
<tr{% if vc_member == object %} class="info"{% endif %}>
<td>
<a href="{{ vc_member.get_absolute_url }}">{{ vc_member }}</a>
</td>
<td><span class="badge badge-default">{{ vc_member.vc_position }}</span></td>
<td>{% if object.virtual_chassis.master == vc_member %}<i class="mdi mdi-check-bold"></i>{% endif %}</td>
<td>{{ vc_member.vc_priority|default:"" }}</td>
</tr>
{% endfor %}
</table>
</div>
<div class="card-footer text-end noprint">
<a href="{{ object.virtual_chassis.get_absolute_url }}" class="btn btn-primary btn-sm">
<span class="mdi mdi-arrow-right-bold" aria-hidden="true"></span> View Virtual Chassis
</a>
</div>
</div>
{% endif %}
<div class="card">
<h5 class="card-header">
Management
</h5>
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<th scope="row">Status</th>
<td>
<span class="badge bg-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
</td>
</tr>
<tr>
<th scope="row">Role</th>
<td>
<a href="{% url 'dcim:device_list' %}?role={{ object.device_role.slug }}">{{ object.device_role }}</a>
</td>
</tr>
<tr>
<th scope="row">Platform</th>
<td>
{% if object.platform %}
<a href="{{ object.platform.get_absolute_url }}">{{ object.platform }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Primary IPv4</th>
<td>
{% if object.primary_ip4 %}
<a href="{% url 'ipam:ipaddress' pk=object.primary_ip4.pk %}">{{ object.primary_ip4.address.ip }}</a>
{% if object.primary_ip4.nat_inside %}
<span>(NAT for {{ object.primary_ip4.nat_inside.address.ip }})</span>
{% elif object.primary_ip4.nat_outside %}
<span>(NAT: {{ object.primary_ip4.nat_outside.address.ip }})</span>
{% endif %}
{% else %}
<span class="text-muted">&mdash;</span>
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Primary IPv6</th>
<td>
{% if object.primary_ip6 %}
<a href="{% url 'ipam:ipaddress' pk=object.primary_ip6.pk %}">{{ object.primary_ip6.address.ip }}</a>
{% if object.primary_ip6.nat_inside %}
<span>(NAT for {{ object.primary_ip6.nat_inside.address.ip }})</span>
{% elif object.primary_ip6.nat_outside %}
<span>(NAT: {{ object.primary_ip6.nat_outside.address.ip }})</span>
{% endif %}
{% else %}
<span class="text-muted">&mdash;</span>
{% endif %}
</td>
</tr>
{% if object.cluster %}
<tr>
<th>Cluster</th>
<td>
{% if object.cluster.group %}
<a href="{{ object.cluster.group.get_absolute_url }}">{{ object.cluster.group }}</a> /
{% endif %}
<a href="{{ object.cluster.get_absolute_url }}">{{ object.cluster }}</a>
</td>
</tr>
{% endif %}
</table>
</div>
</div>
{% include 'inc/custom_fields_panel.html' %}
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='dcim:device_list' %}
<div class="card">
<h5 class="card-header">
Comments
</h5>
<div class="card-body rendered-markdown">
{% if object.comments %}
{{ object.comments|render_markdown }}
{% else %}
<span class="text-muted">None</span>
{% endif %}
</div>
</div>
{% plugin_left_page object %}
</div>
<div class="col col-md-6">
{% if object.powerports.exists and object.poweroutlets.exists %}
<div class="card">
<h5 class="card-header">
Power Utilization
</h5>
<div class="card-body">
<table class="table table-hover">
<tr>
<th>Input</th>
<th>Outlets</th>
<th>Allocated</th>
<th>Available</th>
<th>Utilization</th>
</tr>
{% for powerport in object.powerports.all %}
{% with utilization=powerport.get_power_draw powerfeed=powerport.connected_endpoint %}
<tr>
<td>{{ powerport }}</td>
<td>{{ utilization.outlet_count }}</td>
<td>{{ utilization.allocated }}VA</td>
{% if powerfeed.available_power %}
<td>{{ powerfeed.available_power }}VA</td>
<td>{% utilization_graph utilization.allocated|percentage:powerfeed.available_power %}</td>
{% else %}
<td class="text-muted">&mdash;</td>
<td class="text-muted">&mdash;</td>
{% endif %}
</tr>
{% for leg in utilization.legs %}
<tr>
<td style="padding-left: 20px">Leg {{ leg.name }}</td>
<td>{{ leg.outlet_count }}</td>
<td>{{ leg.allocated }}</td>
<td>{{ powerfeed.available_power|divide:3 }}VA</td>
{% with phase_available=powerfeed.available_power|divide:3 %}
<td>{% utilization_graph leg.allocated|percentage:phase_available %}</td>
{% endwith %}
</tr>
{% endfor %}
{% endwith %}
{% endfor %}
</table>
</div>
</div>
{% endif %}
<div class="card">
<h5 class="card-header">
Services
</h5>
<div class="card-body">
{% if services %}
<table class="table table-hover">
{% for service in services %}
{% include 'ipam/inc/service.html' %}
{% endfor %}
</table>
{% else %}
<div class="text-muted">
None
</div>
{% endif %}
</div>
{% if perms.ipam.add_service %}
<div class="card-footer text-end noprint">
<a href="{% url 'dcim:device_service_assign' device=object.pk %}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Assign Service
</a>
</div>
{% endif %}
</div>
<div class="card">
<h5 class="card-header">
Images
</h5>
<div class="card-body">
{% include 'inc/image_attachments.html' with images=object.images.all %}
</div>
{% if perms.extras.add_imageattachment %}
<div class="card-footer text-end noprint">
<a href="{% url 'dcim:device_add_image' object_id=object.pk %}" class="btn btn-primary btn-sm">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span>
Attach an Image
</a>
</div>
{% endif %}
</div>
<div class="card noprint">
<h5 class="card-header">
Related Devices
</h5>
<div class="card-body">
{% if related_devices %}
<table class="table table-hover">
<tr>
<th>Device</th>
<th>Rack</th>
<th>Type</th>
</tr>
{% for rd in related_devices %}
<tr>
<td>
<a href="{% url 'dcim:device' pk=rd.pk %}">{{ rd }}</a>
</td>
<td>
{% if rd.rack %}
<a href="{% url 'dcim:rack' pk=rd.rack.pk %}">{{ rd.rack }}</a>
{% else %}
<span class="text-muted">&mdash;</span>
{% endif %}
</td>
<td>{{ rd.device_type }}</td>
</tr>
{% endfor %}
</table>
{% else %}
<div class="text-muted">None</div>
{% endif %}
</div>
</div>
{% plugin_right_page object %}
</div>
</div>
<div class="row">
<div class="col col-md-12">
{% plugin_full_width_page object %}
</div> </div>
</div> </div>
</div>
{% endblock %} {% endblock %}

View File

@ -21,24 +21,6 @@
</h5> </h5>
<div class="card-body"> <div class="card-body">
<table class="table table-hover"> <table class="table table-hover">
<tr>
<td colspan="2">
{% if object.enabled %}
<span class="badge bg-success">Enabled</span>
{% else %}
<span class="badge bg-danger">Disabled</span>
{% endif %}
</td>
</tr>
<tr>
<td colspan="2">
{% if object.mgmt_only %}
<span class="badge bg-success">Management Only</span>
{% else %}
<span class="badge bg-danger">Not Management Only</span>
{% endif %}
</td>
</tr>
<tr> <tr>
<th scope="row">Device</th> <th scope="row">Device</th>
<td> <td>
@ -57,6 +39,36 @@
<th scope="row">Type</th> <th scope="row">Type</th>
<td>{{ object.get_type_display }}</td> <td>{{ object.get_type_display }}</td>
</tr> </tr>
<tr>
<th scope="row">Enabled</th>
<td>
{% if object.enabled %}
<i class="mdi mdi-check-bold text-success" title="Yes"></i>
{% else %}
<i class="mdi mdi-close-thick text-danger" title="No"></i>
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Management Only</th>
<td>
{% if object.mgmt_only %}
<i class="mdi mdi-check-bold text-success" title="Yes"></i>
{% else %}
<i class="mdi mdi-close-thick text-danger" title="No"></i>
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Parent</th>
<td>
{% if object.parent %}
<a href="{{ object.parent.get_absolute_url }}">{{ object.parent }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
<tr> <tr>
<th scope="row">LAG</th> <th scope="row">LAG</th>
<td> <td>
@ -81,7 +93,7 @@
</tr> </tr>
<tr> <tr>
<th scope="row">802.1Q Mode</th> <th scope="row">802.1Q Mode</th>
<td>{{ object.get_mode_display }}</td> <td>{{ object.get_mode_display|placeholder }}</td>
</tr> </tr>
</table> </table>
</div> </div>

View File

@ -39,7 +39,7 @@
</tr> </tr>
<tr> <tr>
<th scope="row">Feed Leg</th> <th scope="row">Feed Leg</th>
<td>{{ object.get_feed_leg_display }}</td> <td>{{ object.get_feed_leg_display|placeholder }}</td>
</tr> </tr>
</table> </table>
</div> </div>

View File

@ -27,7 +27,7 @@
</tr> </tr>
<tr> <tr>
<th scope="row">Type</th> <th scope="row">Type</th>
<td>{{ object.get_type_display }}</td> <td>{{ object.get_type_display|placeholder }}</td>
</tr> </tr>
<tr> <tr>
<th scope="row">Description</th> <th scope="row">Description</th>

View File

@ -31,8 +31,8 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col col-12 col-xl-6"> <div class="col col-12 col-xl-5">
<div class="card"> <div class="card">
<h5 class="card-header"> <h5 class="card-header">
Rack Rack
@ -47,28 +47,15 @@
{% endif %} {% endif %}
<a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a> <a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a>
</td> </td>
</tr> </tr>
<tr>
<th scope="row">Location</th>
<td>
{% if object.location %}
{% for location in object.location.get_ancestors %}
<a href="{{ location.get_absolute_url }}">{{ location }}</a> /
{% endfor %}
<a href="{{ object.location.get_absolute_url }}">{{ object.location }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
<tr> <tr>
<th scope="row">Group</th> <th scope="row">Location</th>
<td> <td>
{% if object.group %} {% if object.location %}
{% for group in object.group.get_ancestors %} {% for location in object.location.get_ancestors %}
<a href="{{ group.get_absolute_url }}">{{ group }}</a> / <a href="{{ location.get_absolute_url }}">{{ location }}</a> /
{% endfor %} {% endfor %}
<a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a> <a href="{{ object.location.get_absolute_url }}">{{ object.location }}</a>
{% else %} {% else %}
<span class="text-muted">None</span> <span class="text-muted">None</span>
{% endif %} {% endif %}
@ -109,7 +96,7 @@
</tr> </tr>
<tr> <tr>
<th scope="row">Serial Number</th> <th scope="row">Serial Number</th>
<td><code>{{ object.serial|placeholder }}</code></td> <td>{{ object.serial|placeholder }}</td>
</tr> </tr>
<tr> <tr>
<th scope="row">Asset Tag</th> <th scope="row">Asset Tag</th>
@ -308,8 +295,8 @@
{% endif %} {% endif %}
</div> </div>
{% plugin_left_page object %} {% plugin_left_page object %}
</div> </div>
<div class="col col-12 col-xl-6"> <div class="col col-12 col-xl-7">
<div class="row" style="margin-bottom: 20px"> <div class="row" style="margin-bottom: 20px">
<div class="col col-md-6 col-sm-6 col-xs-12 text-center"> <div class="col col-md-6 col-sm-6 col-xs-12 text-center">
<div style="margin-left: 30px"> <div style="margin-left: 30px">
@ -370,10 +357,10 @@
</div> </div>
{% plugin_right_page object %} {% plugin_right_page object %}
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col col-md-12"> <div class="col col-md-12">
{% plugin_full_width_page object %} {% plugin_full_width_page object %}
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -12,7 +12,7 @@
{% block content %} {% block content %}
<div class="row mb-3"> <div class="row mb-3">
<div class="col col-md-6"> <div class="col col-12 col-xl-5">
<div class="card"> <div class="card">
<h5 class="card-header"> <h5 class="card-header">
Rack Rack
@ -30,10 +30,10 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row">Group</th> <th scope="row">Location</th>
<td> <td>
{% if rack.group %} {% if rack.location %}
<a href="{{ rack.group.get_absolute_url }}">{{ rack.group }}</a> <a href="{{ rack.location.get_absolute_url }}">{{ rack.location }}</a>
{% else %} {% else %}
<span class="text-muted">None</span> <span class="text-muted">None</span>
{% endif %} {% endif %}
@ -87,7 +87,7 @@
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='dcim:rackreservation_list' %} {% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='dcim:rackreservation_list' %}
{% plugin_left_page object %} {% plugin_left_page object %}
</div> </div>
<div class="col col-md-6"> <div class="col col-12 col-xl-7">
<div class="row" style="margin-bottom: 20px"> <div class="row" style="margin-bottom: 20px">
<div class="col col-md-6 col-sm-6 col-xs-12 text-center"> <div class="col col-md-6 col-sm-6 col-xs-12 text-center">
<div style="margin-left: 30px"> <div style="margin-left: 30px">

View File

@ -27,12 +27,6 @@
</h5> </h5>
<div class="card-body"> <div class="card-body">
<table class="table table-hover attr-table"> <table class="table table-hover attr-table">
<tr>
<td colspan="2">
<span class="badge bg-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
</td>
</tr>
<tr> <tr>
<th scope="row">Region</th> <th scope="row">Region</th>
<td> <td>
@ -46,6 +40,25 @@
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr>
<th scope="row">Group</th>
<td>
{% if object.group %}
{% for group in object.group.get_ancestors %}
<a href="{{ group.get_absolute_url }}">{{ group }}</a> /
{% endfor %}
<a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Status</th>
<td>
<span class="badge bg-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
</td>
</tr>
<tr> <tr>
<th scope="row">Tenant</th> <th scope="row">Tenant</th>
<td> <td>

View File

@ -60,7 +60,7 @@
<td> <td>
<a href="{{ vc_member.get_absolute_url }}">{{ vc_member }}</a> <a href="{{ vc_member.get_absolute_url }}">{{ vc_member }}</a>
</td> </td>
<td><span class="badge badge-default">{{ vc_member.vc_position }}</span></td> <td><span class="badge bg-secondary">{{ vc_member.vc_position }}</span></td>
<td>{% if object.master == vc_member %}<i class="mdi mdi-check-bold text-success"></i>{% endif %}</td> <td>{% if object.master == vc_member %}<i class="mdi mdi-check-bold text-success"></i>{% endif %}</td>
<td>{{ vc_member.vc_priority|placeholder }}</td> <td>{{ vc_member.vc_priority|placeholder }}</td>
</tr> </tr>

View File

@ -4,7 +4,7 @@
{% block content %} {% block content %}
<div class="row mb-3"> <div class="row mb-3">
<div class="col col-md-6"> <div class="col col-md-5">
<div class="card"> <div class="card">
<h5 class="card-header"> <h5 class="card-header">
Custom Link Custom Link
@ -46,7 +46,7 @@
</div> </div>
{% plugin_left_page object %} {% plugin_left_page object %}
</div> </div>
<div class="col col-md-6"> <div class="col col-md-7">
<div class="card"> <div class="card">
<h5 class="card-header"> <h5 class="card-header">
Link Text Link Text

View File

@ -9,7 +9,7 @@
{% block content %} {% block content %}
<div class="row mb-3"> <div class="row mb-3">
<div class="col col-md-6"> <div class="col col-md-5">
<div class="card"> <div class="card">
<h5 class="card-header"> <h5 class="card-header">
Export Template Export Template
@ -51,7 +51,7 @@
</div> </div>
{% plugin_left_page object %} {% plugin_left_page object %}
</div> </div>
<div class="col col-md-6"> <div class="col col-md-7">
<div class="card"> <div class="card">
<h5 class="card-header"> <h5 class="card-header">
Template Template

View File

@ -3,52 +3,72 @@
{% load plugins %} {% load plugins %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col col-md-6"> <div class="col col-md-6">
<div class="card"> <div class="card">
<h5 class="card-header"> <h5 class="card-header">
Tag Tag
</h5> </h5>
<div class="card-body"> <div class="card-body">
<table class="table table-hover panel-body attr-table"> <table class="table table-hover panel-body attr-table">
<tr> <tr>
<th scope="row">Name</th> <th scope="row">Name</th>
<td> <td>
{{ object.name }} {{ object.name }}
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row">Slug</th> <th scope="row">Description</th>
<td> <td>
{{ object.slug }} {{ object.description|placeholder }}
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row">Tagged Items</th> <th scope="row">Color</th>
<td> <td>
{{ items_count }} <span class="color-label" style="background-color: #{{ object.color }}">&nbsp;</span>
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row">Color</th> <th scope="row">Tagged Items</th>
<td> <td>
<span class="color-label" style="background-color: #{{ object.color }}">&nbsp;</span> {{ taggeditem_table.rows|length }}
</td> </td>
</tr> </tr>
<tr> </table>
<th scope="row">Description</th> </div>
<td>
{{ object.description|placeholder }}
</td>
</tr>
</table>
</div> </div>
</div> </div>
<div class="col col-md-6">
<div class="card">
<h5 class="card-header">
Tagged Item Types
</h5>
<div class="card-body">
<table class="table table-hover panel-body attr-table">
{% for object_type in object_types %}
<tr>
<td>{{ object_type.content_type.name|bettertitle }}</td>
<td>
{% with viewname=object_type.content_type.model_class|validated_viewname:"list" %}
{% if viewname %}
<a href="{% url viewname %}?tag={{ object.slug }}">{{ object_type.item_count }}</a>
{% else %}
{{ object_type.item_count }}
{% endif %}
{% endwith %}
</td>
</tr>
{% endfor %}
</table>
</div>
</div>
</div> </div>
<div class="col col-md-6"> <div class="row">
{% include 'inc/panel_table.html' with table=items_table heading='Tagged Objects' %} <div class="col">
{% include 'inc/paginator.html' with paginator=items_table.paginator page=items_table.page %} {% include 'inc/panel_table.html' with table=taggeditem_table heading='Tagged Objects' %}
{% include 'inc/paginator.html' with paginator=taggeditem_table.paginator page=items_table.page %}
</div>
</div> </div>
</div> {% plugin_full_width_page object %}
{% plugin_full_width_page object %}
{% endblock %} {% endblock %}

View File

@ -116,11 +116,11 @@
{% include 'inc/panel_table.html' with table=parent_prefixes_table heading='Parent Prefixes' %} {% include 'inc/panel_table.html' with table=parent_prefixes_table heading='Parent Prefixes' %}
{% if duplicate_ips_table.rows %} {% if duplicate_ips_table.rows %}
{# Custom version of panel_table.html #} {# Custom version of panel_table.html #}
<div class="card bg-danger"> <div class="card border-danger">
<h5 class="card-header"> <h5 class="card-header">
Duplicate IP Addresses <span class="text-danger">Duplicate IP Addresses</span>
{% if more_duplicate_ips %} {% if more_duplicate_ips %}
<div class="float-end"> <div class="float-end">
<a type="button" class="btn btn-primary btn-sm" <a type="button" class="btn btn-primary btn-sm"
{% if object.vrf %} {% if object.vrf %}
href="{% url 'ipam:ipaddress_list' %}?address={{ object.address.ip }}&vrf_id={{ object.vrf.pk }}" href="{% url 'ipam:ipaddress_list' %}?address={{ object.address.ip }}&vrf_id={{ object.vrf.pk }}"
@ -128,7 +128,7 @@
href="{% url 'ipam:ipaddress_list' %}?address={{ object.address.ip }}&vrf_id=null" href="{% url 'ipam:ipaddress_list' %}?address={{ object.address.ip }}&vrf_id=null"
{% endif %} {% endif %}
>Show all</a> >Show all</a>
</div> </div>
{% endif %} {% endif %}
</h5> </h5>
<div class="card-body"> <div class="card-body">
@ -137,7 +137,7 @@
</div> </div>
{% endif %} {% endif %}
<div class="my-3"> <div class="my-3">
{% include 'utilities/obj_table.html' with table=related_ips_table heading='Related IP Addresses' %} {% include 'inc/panel_table.html' with table=related_ips_table heading='Related IP Addresses' %}
</div> </div>
{% plugin_right_page object %} {% plugin_right_page object %}
</div> </div>

View File

@ -4,7 +4,7 @@
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col col-md-5"> <div class="col col-md-6">
<div class="card"> <div class="card">
<h5 class="card-header"> <h5 class="card-header">
Prefix Prefix
@ -74,6 +74,12 @@
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr>
<th scope="row">Status</th>
<td>
<span class="badge bg-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
</td>
</tr>
<tr> <tr>
<th scope="row">Role</th> <th scope="row">Role</th>
<td> <td>
@ -85,10 +91,8 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row">Status</th> <th scope="row">Description</th>
<td> <td>{{ object.description|placeholder }}</td>
<span class="label label-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
</td>
</tr> </tr>
<tr> <tr>
<th scope="row">Is a pool</th> <th scope="row">Is a pool</th>
@ -100,10 +104,6 @@
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr>
<th scope="row">Description</th>
<td>{{ object.description|placeholder }}</td>
</tr>
<tr> <tr>
<th scope="row">Utilization</th> <th scope="row">Utilization</th>
<td> <td>
@ -118,24 +118,20 @@
</table> </table>
</div> </div>
</div> </div>
{% include 'inc/custom_fields_panel.html' %}
{% plugin_left_page object %} {% plugin_left_page object %}
</div> </div>
<div class="col col-md-7"> <div class="col col-md-6">
{% if duplicate_prefix_table.rows %} {% include 'inc/custom_fields_panel.html' %}
{% include 'inc/panel_table.html' with table=duplicate_prefix_table heading='Duplicate Prefixes' %} {% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:prefix_list' %}
{% endif %}
{% include 'inc/panel_table.html' with table=parent_prefix_table heading='Parent Prefixes' %}
{% plugin_right_page object %} {% plugin_right_page object %}
</div> </div>
</div> </div>
<div class="row my-3">
<div class="col col-md-5">
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:prefix_list' %}
</div>
</div>
<div class="row"> <div class="row">
<div class="col col-md-12"> <div class="col col-md-12">
{% if duplicate_prefix_table.rows %}
{% include 'inc/panel_table.html' with table=duplicate_prefix_table heading='Duplicate Prefixes' %}
{% endif %}
{% include 'inc/panel_table.html' with table=parent_prefix_table heading='Parent Prefixes' %}
{% plugin_full_width_page object %} {% plugin_full_width_page object %}
</div> </div>
</div> </div>

View File

@ -32,7 +32,8 @@
</table> </table>
</div> </div>
</div> </div>
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:routetarget_list' %}
{% include 'inc/custom_fields_panel.html' %}
{% plugin_left_page object %} {% plugin_left_page object %}
</div> </div>
<div class="col col-md-6"> <div class="col col-md-6">
@ -43,14 +44,6 @@
{% plugin_right_page object %} {% plugin_right_page object %}
</div> </div>
</div> </div>
<div class="row my-3">
<div class="col col-md-6">
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:routetarget_list' %}
</div>
<div class="col col-md-6">
{% include 'inc/custom_fields_panel.html' %}
</div>
</div>
<div class="row"> <div class="row">
<div class="col col-md-12"> <div class="col col-md-12">
{% plugin_full_width_page object %} {% plugin_full_width_page object %}

View File

@ -57,11 +57,11 @@
</table> </table>
</div> </div>
</div> </div>
{% include 'inc/custom_fields_panel.html' %}
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:service_list' %}
{% plugin_left_page object %} {% plugin_left_page object %}
</div> </div>
<div class="col col-md-6"> <div class="col col-md-6">
{% include 'inc/custom_fields_panel.html' %}
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:service_list' %}
{% plugin_right_page object %} {% plugin_right_page object %}
</div> </div>
</div> </div>

View File

@ -4,18 +4,13 @@
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col col-md-4"> <div class="col col-md-6">
<div class="card"> <div class="card">
<h5 class="card-header"> <h5 class="card-header">
VLAN VLAN
</h5> </h5>
<div class="card-body"> <div class="card-body">
<table class="table table-hover attr-table"> <table class="table table-hover attr-table">
<tr>
<td colspan="2">
<span class="badge bg-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
</td>
</tr>
<tr> <tr>
<th scope="row">Site</th> <th scope="row">Site</th>
<td> <td>
@ -60,6 +55,12 @@
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr>
<th scope="row">Status</th>
<td>
<span class="badge bg-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
</td>
</tr>
<tr> <tr>
<th scope="row">Role</th> <th scope="row">Role</th>
<td> <td>
@ -77,11 +78,16 @@
</table> </table>
</div> </div>
</div> </div>
{% include 'inc/custom_fields_panel.html' %}
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:vlan_list' %}
{% plugin_left_page object %} {% plugin_left_page object %}
</div> </div>
<div class="col col-md-8"> <div class="col col-md-6">
{% include 'inc/custom_fields_panel.html' %}
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:vlan_list' %}
{% plugin_right_page object %}
</div>
</div>
<div class="row">
<div class="col col-md-12">
<div class="card"> <div class="card">
<h5 class="card-header"> <h5 class="card-header">
Prefixes Prefixes
@ -98,11 +104,6 @@
</div> </div>
{% endif %} {% endif %}
</div> </div>
{% plugin_right_page object %}
</div>
</div>
<div class="row">
<div class="col col-md-12">
{% plugin_full_width_page object %} {% plugin_full_width_page object %}
</div> </div>
</div> </div>

View File

@ -8,68 +8,74 @@
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col col-md-6"> <div class="col col-md-6">
<div class="card"> <div class="card">
<h5 class="card-header"> <h5 class="card-header">
VRF VRF
</h5> </h5>
<div class="card-body"> <div class="card-body">
<table class="table table-hover attr-table"> <table class="table table-hover attr-table">
<tr> <tr>
<th scope="row">Route Distinguisher</th> <th scope="row">Route Distinguisher</th>
<td><code>{{ object.rd }}</code></td> <td>{{ object.rd|placeholder }}</td>
</tr> </tr>
<tr> <tr>
<th scope="row">Tenant</th> <th scope="row">Tenant</th>
<td> <td>
{% if object.tenant %} {% if object.tenant %}
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a> <a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
{% else %} {% else %}
<span class="text-muted">None</span> <span class="text-muted">None</span>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row">Unique IP Space</th> <th scope="row">Unique IP Space</th>
<td> <td>
{% if object.enforce_unique %} {% if object.enforce_unique %}
<i class="mdi mdi-check-bold text-success" title="Yes"></i> <i class="mdi mdi-check-bold text-success" title="Yes"></i>
{% else %} {% else %}
<i class="mdi mdi-close-thick text-danger" title="No"></i> <i class="mdi mdi-close-thick text-danger" title="No"></i>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row">Description</th> <th scope="row">Description</th>
<td>{{ object.description|placeholder }}</td> <td>{{ object.description|placeholder }}</td>
</tr> </tr>
<tr> <tr>
<th scope="row">Prefixes</th> <th scope="row">Prefixes</th>
<td> <td>
<a href="{% url 'ipam:prefix_list' %}?vrf_id={{ object.pk }}">{{ prefix_count }}</a> <a href="{% url 'ipam:prefix_list' %}?vrf_id={{ object.pk }}">{{ prefix_count }}</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row">IP Addresses</th> <th scope="row">IP Addresses</th>
<td> <td>
<a href="{% url 'ipam:ipaddress_list' %}?vrf_id={{ object.pk }}">{{ ipaddress_count }}</a> <a href="{% url 'ipam:ipaddress_list' %}?vrf_id={{ object.pk }}">{{ ipaddress_count }}</a>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
</div> </div>
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:vrf_list' %} {% plugin_left_page object %}
{% include 'inc/custom_fields_panel.html' %} </div>
{% plugin_left_page object %} <div class="col col-md-6">
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:vrf_list' %}
{% include 'inc/custom_fields_panel.html' %}
{% plugin_right_page object %}
</div> </div>
<div class="col col-md-6">
{% include 'inc/panel_table.html' with table=import_targets_table heading="Import Route Targets" %}
{% include 'inc/panel_table.html' with table=export_targets_table heading="Export Route Targets" %}
{% plugin_right_page object %}
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col col-md-12"> <div class="col col-md-6">
{% plugin_full_width_page object %} {% include 'inc/panel_table.html' with table=import_targets_table heading="Import Route Targets" %}
</div> </div>
<div class="col col-md-6">
{% include 'inc/panel_table.html' with table=export_targets_table heading="Export Route Targets" %}
</div>
</div>
<div class="row">
<div class="col col-md-12">
{% plugin_full_width_page object %}
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -4,7 +4,7 @@
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col-sm-3 col-md-2 col-md-offset-1 border-end"> <div class="col-sm-3 col-md-2 border-end">
<nav class="nav nav-pills nav-justified flex-column"> <nav class="nav nav-pills nav-justified flex-column">
<a class="nav-item nav-link text-start{% if active_tab == 'profile' %} active{% endif %}" href="{% url 'user:profile' %}">Profile</a> <a class="nav-item nav-link text-start{% if active_tab == 'profile' %} active{% endif %}" href="{% url 'user:profile' %}">Profile</a>
<a class="nav-link nav-item text-start{% if active_tab == 'preferences' %} active{% endif %}" href="{% url 'user:preferences' %}">Preferences</a> <a class="nav-link nav-item text-start{% if active_tab == 'preferences' %} active{% endif %}" href="{% url 'user:preferences' %}">Preferences</a>
@ -14,7 +14,7 @@
<a class="nav-link nav-item text-start{% if active_tab == 'api-tokens' %} active{% endif %}" href="{% url 'user:token_list' %}">API Tokens</a> <a class="nav-link nav-item text-start{% if active_tab == 'api-tokens' %} active{% endif %}" href="{% url 'user:token_list' %}">API Tokens</a>
</nav> </nav>
</div> </div>
<div class="col-sm-9 col-md-8 px-4"> <div class="col-sm-9 col-md-10 px-4">
{% block usercontent %}{% endblock %} {% block usercontent %}{% endblock %}
</div> </div>
</div> </div>

View File

@ -4,74 +4,77 @@
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col col-md-5"> <div class="col col-md-6">
<div class="card"> <div class="card">
<h5 class="card-header"> <h5 class="card-header">
Cluster Cluster
</h5> </h5>
<div class="card-body"> <div class="card-body">
<table class="table table-hover attr-table"> <table class="table table-hover attr-table">
<tr> <tr>
<th scope="row">Name</th> <th scope="row">Name</th>
<td>{{ object.name }}</td> <td>{{ object.name }}</td>
</tr> </tr>
<tr> <tr>
<th scope="row">Type</th> <th scope="row">Type</th>
<td><a href="{{ object.type.get_absolute_url }}">{{ object.type }}</a></td> <td><a href="{{ object.type.get_absolute_url }}">{{ object.type }}</a></td>
</tr> </tr>
<tr> <tr>
<th scope="row">Group</th> <th scope="row">Group</th>
<td> <td>
{% if object.group %} {% if object.group %}
<a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a> <a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a>
{% else %} {% else %}
<span class="text-muted">None</span> <span class="text-muted">None</span>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row">Tenant</th> <th scope="row">Tenant</th>
<td> <td>
{% if object.tenant %} {% if object.tenant %}
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a> <a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
{% else %} {% else %}
<span class="text-muted">None</span> <span class="text-muted">None</span>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row">Site</th> <th scope="row">Site</th>
<td> <td>
{% if object.site %} {% if object.site %}
<a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a> <a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a>
{% else %} {% else %}
<span class="text-muted">None</span> <span class="text-muted">None</span>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row">Virtual Machines</th> <th scope="row">Virtual Machines</th>
<td><a href="{% url 'virtualization:virtualmachine_list' %}?cluster_id={{ object.pk }}">{{ object.virtual_machines.count }}</a></td> <td><a href="{% url 'virtualization:virtualmachine_list' %}?cluster_id={{ object.pk }}">{{ object.virtual_machines.count }}</a></td>
</tr> </tr>
</table> </table>
</div>
</div> </div>
{% include 'inc/custom_fields_panel.html' %}
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='virtualization:cluster_list' %}
<div class="card">
<h5 class="card-header">
Comments
</h5>
<div class="card-body rendered-markdown">
{% if object.comments %}
{{ object.comments|render_markdown }}
{% else %}
<span class="text-muted">None</span>
{% endif %}
</div>
</div>
{% plugin_left_page object %}
</div> </div>
<div class="card">
<h5 class="card-header">
Comments
</h5>
<div class="card-body rendered-markdown">
{% if object.comments %}
{{ object.comments|render_markdown }}
{% else %}
<span class="text-muted">None</span>
{% endif %}
</div>
</div>
{% plugin_left_page object %}
</div>
<div class="col col-md-6">
{% include 'inc/custom_fields_panel.html' %}
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='virtualization:cluster_list' %}
{% plugin_right_page object %}
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col col-md-12"> <div class="col col-md-12">

View File

@ -61,7 +61,7 @@
</tr> </tr>
<tr> <tr>
<th scope="row">802.1Q Mode</th> <th scope="row">802.1Q Mode</th>
<td>{{ object.get_mode_display }}</td> <td>{{ object.get_mode_display|placeholder }}</td>
</tr> </tr>
</table> </table>
</div> </div>