Move all Javascript to static

This commit is contained in:
Kumi 2019-01-13 17:28:52 +01:00
parent a81d1211b1
commit 5c6121e630
2 changed files with 21 additions and 22 deletions

View file

@ -90,13 +90,4 @@
<script src="/js/devices.js"></script>
<script>
showdevices();
{% for device in devices %}
updateStatus({{ device.id }});
setInterval(updateStatus, 10000, {{ device.id }});
{% endfor %}
</script>
{% endblock %}

View file

@ -82,3 +82,11 @@ function showusers() {
$("#wifipart").hide();
$("#userpart").show();
};
showdevices();
$("div[id$='-indicator']").each(function() {
device_id = this.id.split("-")[0];
updateStatus(device_id);
setInterval(updateStatus, 10000, device_id);
});