* added table to device page
* request devices from js from db
This commit is contained in:
@ -186,21 +186,35 @@
|
||||
<table id="table-pickupdates" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>City</th>
|
||||
<th>Device ID</th>
|
||||
<th>Devicename</th>
|
||||
<th>Devicelocation</th>
|
||||
<th>Zone</th>
|
||||
<th>Waste Type</th>
|
||||
<th>Date</th>
|
||||
<th>X</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="picupdates-tablebody">
|
||||
<tr>
|
||||
<td>42</td>
|
||||
<td>new Device</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-primary">Configure</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>42</td>
|
||||
<td>lukis anziges</td>
|
||||
<td>htl steyr</td>
|
||||
<td>Steyr/2/Plastic</td>
|
||||
<td>del</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>City</th>
|
||||
<th>Device ID</th>
|
||||
<th>Devicename</th>
|
||||
<th>Devicelocation</th>
|
||||
<th>Zone</th>
|
||||
<th>Waste Type</th>
|
||||
<th>Date</th>
|
||||
<th>X</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
@ -1,37 +1,8 @@
|
||||
$(document).ready(function () {
|
||||
$('#btn-newdevice').click(function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
Swal.showLoading({
|
||||
title: 'No connection to Database',
|
||||
html: 'Setup DB here --> <a href="index.html">click<a/>.',
|
||||
});
|
||||
$.post('/senddata/Devicedata', 'action=getdevices', function (data) {
|
||||
|
||||
// Swal.fire({
|
||||
// type: "error",
|
||||
// title: 'No connection to Database',
|
||||
// html: 'Setup DB here --> <a href="index.html">click<a/>.',
|
||||
// onBeforeOpen: () => {
|
||||
// Swal.showLoading()
|
||||
// },
|
||||
// }).then((result) => {
|
||||
// console.log('Popup closed. ')
|
||||
//
|
||||
// });
|
||||
|
||||
|
||||
// $.post('/senddata/loginget', 'username=' + username + '&password=' + password, function (data) {
|
||||
//
|
||||
// console.log(data);
|
||||
// if (data.status == "nodbconn"){
|
||||
//
|
||||
// }
|
||||
// if (data.accept == true) {
|
||||
// console.log("successfully logged in!");
|
||||
// document.cookie = "username=" + username;
|
||||
// window.location = 'dashboard.html';
|
||||
// }
|
||||
// }, 'json');
|
||||
});
|
||||
console.log(data);
|
||||
}, 'json');
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user