Enhance logging functionality in API and UI components
- Implemented detailed logging for USB serial communication in readdevice.js. - Added log file management features in logfile.php, including deletion and selection of log files. - Created a new communication log API endpoint in com_log.php to store USB communication data. - Improved user interface for log file selection and added confirmation for log deletion.
This commit is contained in:
7
api.php
7
api.php
@@ -168,14 +168,17 @@ if($is_jwt_valid && str_contains($version, 'v')) {
|
||||
// END check if endPoint is fileUpload
|
||||
//------------------------------------------
|
||||
|
||||
if (isAllowed($collection,$profile,$permission,'R') === 1 && empty($input) && file_exists($api_file)){
|
||||
if ($collection === 'com_log' && file_exists($api_file_post)) {
|
||||
include_once $api_file_post;
|
||||
}
|
||||
elseif (isAllowed($collection,$profile,$permission,'R') === 1 && empty($input) && file_exists($api_file)){
|
||||
|
||||
include_once $api_file;
|
||||
}
|
||||
elseif (isAllowed($collection,$profile,$permission,'U') === 1 && !empty($input) && file_exists($api_file_post)){
|
||||
|
||||
include_once $api_file_post;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user