📋Copy from device #721
Some checks are pending
docker / docker_dev (push) Waiting to run

This commit is contained in:
jokob-sk
2024-07-03 09:07:33 +10:00
parent 624e30842a
commit 70d117cb6d
3 changed files with 9 additions and 9 deletions

View File

@@ -27,7 +27,7 @@ function checkDbLock() {
type: 'GET',
success: function(response) {
// console.log(response);
console.log(response);
if (response == 0) {
// console.log('Database is not locked');
$(".header-status-locked-db").hide()

View File

@@ -66,6 +66,13 @@
"filePath": "/app/front/log/app_front.log",
"textAreaCssClass": "logs logs-small"
},
{
"buttons": [
],
"fileName": "db_is_locked.log",
"filePath": "/app/front/log/db_is_locked.log",
"textAreaCssClass": "logs logs-small"
},
{
"buttons": [
{

View File

@@ -901,18 +901,11 @@ function copyFromDevice() {
$MAC_FROM = $_REQUEST['macFrom'];
$MAC_TO = $_REQUEST['macTo'];
if ((false === filter_var($MAC_FROM , FILTER_VALIDATE_MAC) && $MAC_FROM != "Internet" && $MAC_FROM != "") ) {
throw new Exception('Invalid mac address');
}
if ((false === filter_var($MAC_TO , FILTER_VALIDATE_MAC) && $MAC_TO != "Internet" && $MAC_TO != "") ) {
throw new Exception('Invalid mac address');
}
global $db;
// clean-up temporary table
$sql = "DROP TABLE temp_devices ";
$sql = "DROP TABLE IF EXISTS temp_devices ";
$result = $db->query($sql);
// create temporary table with the source data