2021-03-02 15:58:33 -05:00
|
|
|
{% extends 'generic/object.html' %}
|
2019-12-06 16:13:52 -05:00
|
|
|
{% load buttons %}
|
2019-03-11 22:40:52 -04:00
|
|
|
{% load static %}
|
|
|
|
{% load helpers %}
|
2020-03-15 23:45:18 -04:00
|
|
|
{% load plugins %}
|
2019-03-11 22:40:52 -04:00
|
|
|
|
2021-03-02 15:58:33 -05:00
|
|
|
{% block breadcrumbs %}
|
2021-07-20 12:14:01 -04:00
|
|
|
{{ block.super }}
|
2021-06-16 16:27:37 -04:00
|
|
|
<li class="breadcrumb-item"><a href="{% url 'dcim:powerfeed_list' %}?site_id={{ object.power_panel.site.pk }}">{{ object.power_panel.site }}</a></li>
|
|
|
|
<li class="breadcrumb-item"><a href="{% url 'dcim:powerfeed_list' %}?power_panel_id={{ object.power_panel.pk }}">{{ object.power_panel }}</a></li>
|
2021-03-02 15:58:33 -05:00
|
|
|
{% if object.rack %}
|
2021-06-16 16:27:37 -04:00
|
|
|
<li class="breadcrumb-item"><a href="{% url 'dcim:powerfeed_list' %}?rack_id={{ object.rack.pk }}">{{ object.rack }}</a></li>
|
2021-03-02 15:58:33 -05:00
|
|
|
{% endif %}
|
2019-03-11 22:40:52 -04:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<div class="row">
|
2021-04-30 15:55:37 -07:00
|
|
|
<div class="col col-md-6">
|
2021-03-13 02:19:42 -07:00
|
|
|
<div class="card">
|
|
|
|
<h5 class="card-header">
|
|
|
|
Power Feed
|
|
|
|
</h5>
|
|
|
|
<div class="card-body">
|
|
|
|
<table class="table table-hover attr-table">
|
|
|
|
<tr>
|
2021-04-13 21:51:12 -07:00
|
|
|
<th scope="row">Power Panel</th>
|
2022-03-22 14:51:20 -04:00
|
|
|
<td>{{ object.power_panel|linkify }}</td>
|
2021-03-13 02:19:42 -07:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2021-04-13 21:51:12 -07:00
|
|
|
<th scope="row">Rack</th>
|
2022-03-22 14:51:20 -04:00
|
|
|
<td>{{ object.rack|linkify|placeholder }}</td>
|
2021-03-13 02:19:42 -07:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2021-04-13 21:51:12 -07:00
|
|
|
<th scope="row">Type</th>
|
2022-02-11 14:25:13 -05:00
|
|
|
<td>{% badge object.get_type_display bg_color=object.get_type_color %}</td>
|
2021-03-13 02:19:42 -07:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2021-04-13 21:51:12 -07:00
|
|
|
<th scope="row">Status</th>
|
2022-02-11 14:25:13 -05:00
|
|
|
<td>{% badge object.get_status_display bg_color=object.get_status_color %}</td>
|
2021-03-13 02:19:42 -07:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2022-11-04 08:28:09 -04:00
|
|
|
<th scope="row">Description</th>
|
|
|
|
<td>{{ object.description|placeholder }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2021-04-13 21:51:12 -07:00
|
|
|
<th scope="row">Connected Device</th>
|
2021-03-13 02:19:42 -07:00
|
|
|
<td>
|
2022-10-04 14:36:14 -04:00
|
|
|
{% if object.connected_endpoints %}
|
|
|
|
{{ object.connected_endpoints.0.device|linkify }} ({{ object.connected_endpoints.0|linkify:"name" }})
|
2021-03-13 02:19:42 -07:00
|
|
|
{% else %}
|
2022-06-15 22:33:21 +02:00
|
|
|
{{ ''|placeholder }}
|
2021-03-13 02:19:42 -07:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2021-04-13 21:51:12 -07:00
|
|
|
<th scope="row">Utilization (Allocated)</th>
|
2022-10-04 14:36:14 -04:00
|
|
|
{% with utilization=object.connected_endpoints.0.get_power_draw %}
|
2021-03-13 02:19:42 -07:00
|
|
|
{% if utilization %}
|
|
|
|
<td>
|
|
|
|
{{ utilization.allocated }}VA / {{ object.available_power }}VA
|
|
|
|
{% if object.available_power > 0 %}
|
|
|
|
{% utilization_graph utilization.allocated|percentage:object.available_power %}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
{% else %}
|
|
|
|
<td class="text-muted">N/A</td>
|
|
|
|
{% endif %}
|
|
|
|
{% endwith %}
|
|
|
|
</tr>
|
|
|
|
</table>
|
2019-03-11 22:40:52 -04:00
|
|
|
</div>
|
2019-03-22 21:58:45 -04:00
|
|
|
</div>
|
2021-03-13 02:19:42 -07:00
|
|
|
<div class="card">
|
|
|
|
<h5 class="card-header">
|
|
|
|
Electrical Characteristics
|
|
|
|
</h5>
|
|
|
|
<div class="card-body">
|
|
|
|
<table class="table table-hover attr-table">
|
|
|
|
<tr>
|
2021-04-13 21:51:12 -07:00
|
|
|
<th scope="row">Supply</th>
|
2021-03-13 02:19:42 -07:00
|
|
|
<td>{{ object.get_supply_display }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2021-04-13 21:51:12 -07:00
|
|
|
<th scope="row">Voltage</th>
|
2021-03-13 02:19:42 -07:00
|
|
|
<td>{{ object.voltage }}V</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2021-04-13 21:51:12 -07:00
|
|
|
<th scope="row">Amperage</th>
|
2021-03-13 02:19:42 -07:00
|
|
|
<td>{{ object.amperage }}A</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2021-04-13 21:51:12 -07:00
|
|
|
<th scope="row">Phase</th>
|
2021-03-13 02:19:42 -07:00
|
|
|
<td>{{ object.get_phase_display }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2021-04-13 21:51:12 -07:00
|
|
|
<th scope="row">Max Utilization</th>
|
2021-03-13 02:19:42 -07:00
|
|
|
<td>{{ object.max_utilization }}%</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2019-03-22 21:58:45 -04:00
|
|
|
</div>
|
2019-03-11 22:40:52 -04:00
|
|
|
</div>
|
2021-10-19 14:21:31 -04:00
|
|
|
{% include 'inc/panels/custom_fields.html' %}
|
2021-10-21 11:23:31 -04:00
|
|
|
{% include 'inc/panels/tags.html' %}
|
2020-11-19 11:29:18 -05:00
|
|
|
{% plugin_left_page object %}
|
2020-10-05 13:23:55 -04:00
|
|
|
</div>
|
2021-04-30 15:55:37 -07:00
|
|
|
<div class="col col-md-6">
|
2022-10-03 16:11:24 -04:00
|
|
|
<div class="card">
|
|
|
|
<h5 class="card-header">Connection</h5>
|
|
|
|
<div class="card-body">
|
|
|
|
{% if object.mark_connected %}
|
|
|
|
<div class="text-muted">
|
|
|
|
<span class="text-success"><i class="mdi mdi-check-bold"></i></span> Marked as connected
|
2020-02-20 14:16:18 -05:00
|
|
|
</div>
|
2022-10-03 16:11:24 -04:00
|
|
|
{% elif object.cable %}
|
2022-12-30 19:01:51 +01:00
|
|
|
{% include 'dcim/inc/connection_endpoints.html' with trace_url='dcim:powerfeed_trace' %}
|
2022-10-03 16:11:24 -04:00
|
|
|
{% else %}
|
|
|
|
<div class="text-muted">
|
|
|
|
Not connected
|
2021-04-13 21:51:12 -07:00
|
|
|
</div>
|
2022-10-03 16:11:24 -04:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% if not object.mark_connected and not object.cable %}
|
|
|
|
<div class="card-footer">
|
|
|
|
{% if perms.dcim.add_cable %}
|
|
|
|
<a href="{% url 'dcim:cable_add' %}?a_terminations_type=dcim.powerfeed&a_terminations={{ object.pk }}&b_terminations_type=dcim.powerport&termination_b_site={{ object.device.site.pk }}&termination_b_rack={{ object.device.rack.pk }}&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 %}
|
2021-03-13 02:19:42 -07:00
|
|
|
</div>
|
2022-10-03 16:11:24 -04:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% include 'inc/panels/comments.html' %}
|
|
|
|
{% plugin_right_page object %}
|
2020-03-15 23:45:18 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
2021-04-30 15:55:37 -07:00
|
|
|
<div class="col col-md-12">
|
2020-11-19 11:29:18 -05:00
|
|
|
{% plugin_full_width_page object %}
|
2019-03-11 22:40:52 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|