mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
bootstrap 5 class updates
This commit is contained in:
@@ -6,13 +6,13 @@
|
||||
{% load plugins %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li><a href="{% url 'dcim:powerfeed_list' %}">Power Feeds</a></li>
|
||||
<li><a href="{{ object.power_panel.site.get_absolute_url }}">{{ object.power_panel.site }}</a></li>
|
||||
<li><a href="{{ object.power_panel.get_absolute_url }}">{{ object.power_panel }}</a></li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'dcim:powerfeed_list' %}">Power Feeds</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ object.power_panel.site.get_absolute_url }}">{{ object.power_panel.site }}</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ object.power_panel.get_absolute_url }}">{{ object.power_panel }}</a></li>
|
||||
{% if object.rack %}
|
||||
<li><a href="{{ object.rack.get_absolute_url }}">{{ object.rack }}</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ object.rack.get_absolute_url }}">{{ object.rack }}</a></li>
|
||||
{% endif %}
|
||||
<li>{{ object }}</li>
|
||||
<li class="breadcrumb-item">{{ object }}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -25,13 +25,13 @@
|
||||
<div class="card-body">
|
||||
<table class="table table-hover attr-table">
|
||||
<tr>
|
||||
<td>Power Panel</td>
|
||||
<th scope="row">Power Panel</th>
|
||||
<td>
|
||||
<a href="{{ object.power_panel.get_absolute_url }}">{{ object.power_panel }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rack</td>
|
||||
<th scope="row">Rack</th>
|
||||
<td>
|
||||
{% if object.rack %}
|
||||
<a href="{{ object.rack.get_absolute_url }}">{{ object.rack }}</a>
|
||||
@@ -41,19 +41,19 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Type</td>
|
||||
<th scope="row">Type</th>
|
||||
<td>
|
||||
<span class="badge bg-{{ object.get_type_class }}">{{ object.get_type_display }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Status</td>
|
||||
<th scope="row">Status</th>
|
||||
<td>
|
||||
<span class="badge bg-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Connected Device</td>
|
||||
<th scope="row">Connected Device</th>
|
||||
<td>
|
||||
{% if object.connected_endpoint %}
|
||||
<a href="{{ object.connected_endpoint.device.get_absolute_url }}">{{ object.connected_endpoint.device }}</a> ({{ object.connected_endpoint }})
|
||||
@@ -63,7 +63,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Utilization (Allocated)</td>
|
||||
<th scope="row">Utilization (Allocated)</th>
|
||||
{% with utilization=object.connected_endpoint.get_power_draw %}
|
||||
{% if utilization %}
|
||||
<td>
|
||||
@@ -87,23 +87,23 @@
|
||||
<div class="card-body">
|
||||
<table class="table table-hover attr-table">
|
||||
<tr>
|
||||
<td>Supply</td>
|
||||
<th scope="row">Supply</th>
|
||||
<td>{{ object.get_supply_display }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Voltage</td>
|
||||
<th scope="row">Voltage</th>
|
||||
<td>{{ object.voltage }}V</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Amperage</td>
|
||||
<th scope="row">Amperage</th>
|
||||
<td>{{ object.amperage }}A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Phase</td>
|
||||
<th scope="row">Phase</th>
|
||||
<td>{{ object.get_phase_display }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Max Utilization</td>
|
||||
<th scope="row">Max Utilization</th>
|
||||
<td>{{ object.max_utilization }}%</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -126,7 +126,7 @@
|
||||
{% elif object.cable %}
|
||||
<table class="table table-hover attr-table">
|
||||
<tr>
|
||||
<td>Cable</td>
|
||||
<th scope="row">Cable</th>
|
||||
<td>
|
||||
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
||||
<a href="{% url 'dcim:powerfeed_trace' pk=object.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
||||
@@ -136,27 +136,27 @@
|
||||
</tr>
|
||||
{% if object.connected_endpoint %}
|
||||
<tr>
|
||||
<td>Device</td>
|
||||
<th scope="row">Device</th>
|
||||
<td>
|
||||
<a href="{{ object.connected_endpoint.device.get_absolute_url }}">{{ object.connected_endpoint.device }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<th scope="row">Name</th>
|
||||
<td>
|
||||
<a href="{{ object.connected_endpoint.get_absolute_url }}">{{ object.connected_endpoint.name }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Type</td>
|
||||
<th scope="row">Type</th>
|
||||
<td>{{ object.connected_endpoint.get_type_display|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<th scope="row">Description</th>
|
||||
<td>{{ object.connected_endpoint.description|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Path Status</td>
|
||||
<th scope="row">Path Status</th>
|
||||
<td>
|
||||
{% if object.path.is_active %}
|
||||
<span class="badge bg-success">Reachable</span>
|
||||
@@ -169,15 +169,20 @@
|
||||
</table>
|
||||
{% else %}
|
||||
<div class="text-muted">
|
||||
{% if perms.dcim.add_cable %}
|
||||
<a href="{% url 'dcim:powerfeed_connect' termination_a_id=object.pk termination_b_type='power-port' %}?return_url={{ object.get_absolute_url }}" class="btn btn-primary btn-sm pull-right">
|
||||
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> Connect
|
||||
</a>
|
||||
{% endif %}
|
||||
Not connected
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if not object.mark_connected and not object.cable %}
|
||||
<div class="card-footer">
|
||||
{% if perms.dcim.add_cable %}
|
||||
<a href="{% url 'dcim:powerfeed_connect' termination_a_id=object.pk termination_b_type='power-port' %}?return_url={{ object.get_absolute_url }}"
|
||||
class="btn btn-primary btn-sm float-end">
|
||||
<i class="mdi mdi-ethernet-cable" aria-hidden="true"></i> Connect
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
|
Reference in New Issue
Block a user