1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #4914: Fix toggling cable status under device view

This commit is contained in:
Jeremy Stretch
2020-07-28 12:54:21 -04:00
parent a206b422fb
commit d1a505d07f
3 changed files with 7 additions and 4 deletions

View File

@ -6,6 +6,7 @@
* [#4905](https://github.com/netbox-community/netbox/issues/4905) - Fix front port count on device type view
* [#4912](https://github.com/netbox-community/netbox/issues/4912) - Fix image attachment API endpoint
* [#4914](https://github.com/netbox-community/netbox/issues/4914) - Fix toggling cable status under device view
---

View File

@ -49,11 +49,13 @@
<table class="table table-hover panel-body attr-table">
<tr>
<td>Type</td>
<td>{{ cable.get_type_display }}</td>
<td>{{ cable.get_type_display|placeholder }}</td>
</tr>
<tr>
<td>Status</td>
<td>{{ cable.get_status_display }}</td>
<td>
<span class="label label-{{ cable.get_status_class }}">{{ cable.get_status_display }}</span>
</td>
</tr>
<tr>
<td>Label</td>

View File

@ -975,7 +975,7 @@ function toggleConnection(elem) {
xhr.setRequestHeader("X-CSRFToken", "{{ csrf_token }}");
},
data: {
'status': 'False'
'status': 'planned'
},
context: this,
success: function() {
@ -994,7 +994,7 @@ function toggleConnection(elem) {
xhr.setRequestHeader("X-CSRFToken", "{{ csrf_token }}");
},
data: {
'status': 'True'
'status': 'connected'
},
context: this,
success: function() {