fix: only show OTA button when firmware differs from current version
This commit is contained in:
parent
9218d10540
commit
02ab0d0139
@ -87,11 +87,19 @@
|
||||
<i class="bi bi-wifi"></i>
|
||||
</button>
|
||||
</form>
|
||||
{% if firmwares %}
|
||||
<button class="btn btn-sm btn-outline-warning" title="Firmware Update"
|
||||
{% if firmwares and device.version and device.online %}
|
||||
{% set needs_update = [] %}
|
||||
{% for fw in firmwares %}
|
||||
{% if device.version not in fw.name %}
|
||||
{% if needs_update.append(1) %}{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if needs_update %}
|
||||
<button class="btn btn-sm btn-outline-warning" title="Firmware Update verfuegbar"
|
||||
data-bs-toggle="modal" data-bs-target="#ota-{{ device.id }}">
|
||||
<i class="bi bi-cloud-arrow-up"></i>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<button class="btn btn-sm btn-outline-primary" data-bs-toggle="modal"
|
||||
data-bs-target="#edit-{{ device.id }}">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user