* added table to device page

* request devices from js from db
This commit is contained in:
lukas-heiligenbrunner
2020-01-13 21:00:33 +01:00
parent ac02e4bd62
commit 92ef4cc0c6
7 changed files with 74 additions and 49 deletions

View File

@ -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');
});