Optically separate device and WiFi management

This commit is contained in:
Kumi 2019-01-13 11:48:05 +01:00
parent db86431b48
commit ddff965bda
2 changed files with 58 additions and 43 deletions

View file

@ -5,6 +5,11 @@
<p><b>Organization:</b> {{ organization }}</p>
<p><b>User:</b> {{ user.first_name }} {{ user.last_name }} ({{ user.username }})</p>
<div align="center"><b>Manage:</b> <a href="#" onclick="showdevices();">Devices</a> &dash; <a href="#" onclick="showwifi();">WiFi</a></div>
<div name="devicespart" id="devicespart">
<h2>Devices</h2>
<div class="table-responsive">
<table id="table" name="table" class="table">
<thead>
@ -29,7 +34,9 @@
</table>
</div>
</div>
<div name="wifipart" id="wifipart">
<h2>WiFi</h2>
<div class="table-responsive">
@ -52,14 +59,12 @@
</table>
</div>
</div>
<script src="/js/devices.js"></script>
<script>
/*$(document).ready(function() {
$('#table').DataTable();
});*/
showdevices();
{% for device in devices %}
updateStatus({{ device.id }});
setInterval(updateStatus, 10000, {{ device.id }});

View file

@ -64,3 +64,13 @@ function askreboot(device_id) {
function downloadnotice() {
alert("Your file is being prepared. This will take a minute, please be patient and do not leave this page. The download will start automatically.");
};
function showdevices() {
$("#devicespart").show();
$("#wifipart").hide();
};
function showwifi() {
$("#devicespart").hide();
$("#wifipart").show();
};