Skip to content

Fixes #4025: Cable status class #4026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion netbox/templates/dcim/cable_trace.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h4>
{% if cable.label %}<code>{{ cable.label }}</code>{% else %}Cable #{{ cable.pk }}{% endif %}
</a>
</h4>
<p><span class="label label-{% if cable.status %}success{% else %}info{% endif %}">{{ cable.get_status_display }}</span></p>
<p><span class="label label-{{ cable.get_status_class }}">{{ cable.get_status_display }}</span></p>
<p>{{ cable.get_type_display|default:"" }}</p>
{% if cable.length %}{{ cable.length }} {{ cable.get_length_unit_display }}{% endif %}
{% if cable.color %}
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/dcim/inc/cable_toggle_buttons.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% if perms.dcim.change_cable %}
{% if cable.status %}
{% if cable.status == 'connected' %}
<a href="#" class="btn btn-warning btn-xs cable-toggle connected" title="Mark planned" data="{{ cable.pk }}">
<i class="glyphicon glyphicon-ban-circle" aria-hidden="true"></i>
</a>
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/dcim/inc/consoleport.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tr class="consoleport{% if cp.cable.status %} success{% elif cp.cable %} info{% endif %}">
<tr class="consoleport{% if cp.cable %} {{ cp.cable.get_status_class }}{% endif %}">

{# Name #}
<td>
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/dcim/inc/consoleserverport.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% load helpers %}

<tr class="consoleserverport{% if csp.cable.status %} success{% elif csp.cable %} info{% endif %}">
<tr class="consoleserverport{% if csp.cable %} {{ csp.cable.get_status_class }}{% endif %}">

{# Checkbox #}
{% if perms.dcim.change_consoleserverport or perms.dcim.delete_consoleserverport %}
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/dcim/inc/frontport.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% load helpers %}
<tr class="frontport{% if frontport.cable.status %} success{% elif frontport.cable %} info{% endif %}">
<tr class="frontport{% if frontport.cable %} {{ frontport.cable.get_status_class }}{% endif %}">

{# Checkbox #}
{% if perms.dcim.change_frontport or perms.dcim.delete_frontport %}
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/dcim/inc/interface.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% load helpers %}
<tr class="interface{% if not iface.enabled %} danger{% elif iface.cable.status %} success{% elif iface.cable %} info{% elif iface.is_virtual %} warning{% endif %}" id="interface_{{ iface.name }}">
<tr class="interface{% if not iface.enabled %} danger{% elif iface.cable %} {{ iface.cable.get_status_class }}{% elif iface.is_virtual %} warning{% endif %}" id="interface_{{ iface.name }}">

{# Checkbox #}
{% if perms.dcim.change_interface or perms.dcim.delete_interface %}
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/dcim/inc/poweroutlet.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% load helpers %}

<tr class="poweroutlet{% if po.cable.status %} success{% elif po.cable %} info{% endif %}">
<tr class="poweroutlet{% if po.cable %} {{ po.cable.get_status_class }}{% endif %}">

{# Checkbox #}
{% if perms.dcim.change_poweroutlet or perms.dcim.delete_poweroutlet %}
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/dcim/inc/powerport.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tr class="powerport{% if pp.cable.status %} success{% elif pp.cable %} info{% endif %}">
<tr class="powerport{% if pp.cable %} {{ pp.cable.get_status_class }}{% endif %}">

{# Name #}
<td>
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/dcim/inc/rearport.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% load helpers %}
<tr class="rearport{% if rearport.cable.status %} success{% elif rearport.cable %} info{% endif %}">
<tr class="rearport{% if rearport.cable %} {{ rearport.cable.get_status_class }}{% endif %}">

{# Checkbox #}
{% if perms.dcim.change_rearport or perms.dcim.delete_rearport %}
Expand Down