fix ota status js a bit
This commit is contained in:
parent
152c9c2ee7
commit
d15ca0832c
2 changed files with 5 additions and 2 deletions
|
@ -149,6 +149,9 @@ function connect() {
|
|||
row.querySelectorALL('.auto-reboot').forEach(x => x.remove());
|
||||
row.querySelectorAll('button').forEach(x => x.remove());
|
||||
}
|
||||
if (data.status === 'canceled') {
|
||||
row.querySelectorALL('.device_status').forEach(x => x.remove());
|
||||
}
|
||||
{% endif %}
|
||||
break;
|
||||
|
||||
|
@ -215,7 +218,7 @@ function connect() {
|
|||
var total = parseInt(row.querySelector('.total_bytes').innerText);
|
||||
row.querySelector('.received_bytes').innerText = data.msg.received_bytes;
|
||||
row.querySelector('progress').value = data.msg.received_bytes;
|
||||
row.querySelector('.device_status').innerText = data.msg.status;
|
||||
row.querySelector('.device_status').forEach(x => x.innerText = ' / '+data.msg.status);
|
||||
row.querySelectorAll('.auto-apply a').forEach(x => x.innerText = data.msg.auto_apply ? 'yes' : 'no');
|
||||
row.querySelectorAll('.auto-reboot a').forEach(x => x.innerText = data.msg.auto_reboot ? 'yes' : 'no');
|
||||
row.querySelectorAll('button[name=apply]').forEach(
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<tr id="ota-recipient-{{ update.pk }}-{{ recipient.node_id }}" data-recipient="{{ recipient.pk }}">
|
||||
<td>{% mesh_node recipient.node %}</td>
|
||||
<td>
|
||||
<span class="status"></span> / <span class="device_status"></span><br>
|
||||
<span class="status"></span><span class="device_status"></span><br>
|
||||
<span class="auto-apply"><strong>auto apply:</strong> <a href="#"></a><br></span>
|
||||
<span class="auto-reboot"><strong>auto reboot:</strong> <a href="#"></a><br></span>
|
||||
</td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue