Add software tool functionality with device connection and upgrade options
- Implemented the software tool page with user interface for connecting devices. - Added functionality to display connection status and software upgrade options. - Included a help modal with step-by-step instructions for users. - Integrated error handling and user permission checks. - Enhanced user experience with dynamic content updates and visual feedback.
This commit is contained in:
@@ -46,7 +46,8 @@ if(isset($get_content) && $get_content!=''){
|
||||
$clause .= ' AND e.serialnumber = :'.$v[0];
|
||||
}
|
||||
elseif ($v[0] == 'hw_version') {
|
||||
//build up search
|
||||
//build up search - translate hardware version for comparison
|
||||
$criterias[$v[0]] = translateDeviceHardwareVersion($criterias[$v[0]]);
|
||||
$clause .= ' AND ps.hw_version = :'.$v[0];
|
||||
}
|
||||
elseif ($v[0] == 'status') {
|
||||
@@ -152,9 +153,11 @@ if (!isset($criterias['productrowid']) && isset($criterias['sn']) && $criterias[
|
||||
|
||||
//check if current version is send and update the equipment record
|
||||
if(isset($criterias['hw_version']) && $criterias['hw_version'] !=''){
|
||||
// Translate hardware version to standardized format
|
||||
$translated_hw_version = translateDeviceHardwareVersion($criterias['hw_version']);
|
||||
$sql = 'UPDATE equipment SET hw_version = ?, updatedby = ? WHERE serialnumber = ? ';
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute([$criterias['hw_version'],$username,$criterias['sn']]);
|
||||
$stmt->execute([$translated_hw_version,$username,$criterias['sn']]);
|
||||
}
|
||||
|
||||
//GET PRODUCTCODE, SW_VERSION_UPGRADE, HW_VERSION from equipment SN
|
||||
|
||||
Reference in New Issue
Block a user