Add USB checkout system and SSO profile page

New Features:
- USB Device checkout/check-in system with barcode scanning
  - displayusb.asp: List all USB devices with status
  - addusb.asp: Add new USB devices via barcode scan
  - checkout_usb.asp/savecheckout_usb.asp: Check out USB to SSO
  - checkin_usb.asp/savecheckin_usb.asp: Check in with wipe confirmation
  - usb_history.asp: Full checkout history with filters
  - api_usb.asp: JSON API for AJAX lookups
- displayprofile.asp: SSO profile page showing user info and USB history
- Date/time format changed to 12-hour (MM/DD/YYYY h:mm AM/PM)
- SSO links in USB history now link to profile page via search

Database:
- New machinetypeid 44 for USB devices
- New usb_checkouts table for tracking checkouts

Cleanup:
- Removed v2 folder (duplicate/old files)
- Removed old debug/test files
- Removed completed migration documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
cproudlock
2025-12-07 11:16:14 -05:00
parent c7834d4b99
commit 65b622c361
1061 changed files with 19034 additions and 213120 deletions

185
logs/api-2025-11-21.log Executable file
View File

@@ -0,0 +1,185 @@
11/21/2025 1:26:21 PM - === NEW updateCompleteAsset REQUEST ===
11/21/2025 1:26:21 PM - Hostname: H2PRFM94
11/21/2025 1:26:21 PM - Serial: 2PRFM94
11/21/2025 1:26:21 PM - PC Type: Standard
11/21/2025 1:26:22 PM - Created new vendor ID: 34
11/21/2025 1:26:22 PM - Mapped pcType 'Standard' to machinetypeid: 33
11/21/2025 1:26:22 PM - Vendor ID: 34, Model ID: 1, Machine Type ID: 33
11/21/2025 1:26:22 PM - Updating existing PC, machineid: 5360
11/21/2025 1:26:22 PM - UPDATE SQL built: UPDATE machines SET serialnumber = '2PRFM94', modelnumberid = 1, machinetypeid = 33, loggedinuser = '570005354', machinenumber = NULL, osid = 18, machinestatusid = 3, lastupdated = NOW() WHERE machine...
11/21/2025 1:26:22 PM - InsertOrUpdatePC returning machineid: 5360
11/21/2025 1:26:22 PM - PC record created/updated. machineid: 5360
11/21/2025 1:27:05 PM - === NEW updateCompleteAsset REQUEST ===
11/21/2025 1:27:05 PM - Hostname: TESTPC002
11/21/2025 1:27:05 PM - Serial: TEST002
11/21/2025 1:27:05 PM - PC Type: Standard
11/21/2025 1:27:05 PM - Found existing vendor ID: 34
11/21/2025 1:27:05 PM - Mapped pcType 'Standard' to machinetypeid: 33
11/21/2025 1:27:05 PM - Vendor ID: 34, Model ID: 1, Machine Type ID: 33
11/21/2025 1:27:05 PM - Inserting new PC
11/21/2025 1:27:05 PM - Building INSERT SQL...
11/21/2025 1:27:05 PM - Values: hostname=TESTPC002, serial=TEST002
11/21/2025 1:27:05 PM - SQL built successfully, executing...
11/21/2025 1:27:05 PM - Retrieved new machineid from LAST_INSERT_ID: 5470
11/21/2025 1:27:05 PM - InsertOrUpdatePC returning machineid: 5470
11/21/2025 1:27:05 PM - PC record created/updated. machineid: 5470
11/21/2025 1:29:53 PM - === NEW updateCompleteAsset REQUEST ===
11/21/2025 1:29:53 PM - Hostname: TESTPC003
11/21/2025 1:29:53 PM - Serial: TEST003
11/21/2025 1:29:53 PM - PC Type: Standard
11/21/2025 1:29:53 PM - Found existing vendor ID: 34
11/21/2025 1:29:53 PM - Mapped pcType 'Standard' to machinetypeid: 33
11/21/2025 1:29:53 PM - Vendor ID: 34, Model ID: 1, Machine Type ID: 33
11/21/2025 1:29:53 PM - Inserting new PC
11/21/2025 1:29:53 PM - Building INSERT SQL...
11/21/2025 1:29:53 PM - Values: hostname=TESTPC003, serial=TEST003
11/21/2025 1:29:53 PM - SQL built successfully, executing...
11/21/2025 1:29:54 PM - Retrieved new machineid from LAST_INSERT_ID: 5471
11/21/2025 1:29:54 PM - InsertOrUpdatePC returning machineid: 5471
11/21/2025 1:29:54 PM - PC record created/updated. machineid: 5471
11/21/2025 1:33:19 PM - === NEW updateCompleteAsset REQUEST ===
11/21/2025 1:33:19 PM - Hostname: APITEST-STD01
11/21/2025 1:33:19 PM - Serial: APITEST001
11/21/2025 1:33:19 PM - PC Type: Standard
11/21/2025 1:33:19 PM - Found existing vendor ID: 34
11/21/2025 1:33:19 PM - Mapped pcType 'Standard' to machinetypeid: 33
11/21/2025 1:33:20 PM - Vendor ID: 34, Model ID: 1, Machine Type ID: 33
11/21/2025 1:33:20 PM - Inserting new PC
11/21/2025 1:33:20 PM - Building INSERT SQL...
11/21/2025 1:33:20 PM - Values: hostname=APITEST-STD01, serial=APITEST001
11/21/2025 1:33:20 PM - SQL built successfully, executing...
11/21/2025 1:33:20 PM - Retrieved new machineid from LAST_INSERT_ID: 5472
11/21/2025 1:33:20 PM - InsertOrUpdatePC returning machineid: 5472
11/21/2025 1:33:20 PM - PC record created/updated. machineid: 5472
11/21/2025 1:33:51 PM - === NEW updateCompleteAsset REQUEST ===
11/21/2025 1:33:51 PM - Hostname: APITEST-SHOP01
11/21/2025 1:33:51 PM - Serial: APITEST002
11/21/2025 1:33:51 PM - PC Type: Shopfloor
11/21/2025 1:33:51 PM - ClearShopfloorData: Cannot find machineid for hostname: APITEST-SHOP01
11/21/2025 1:33:51 PM - Found existing vendor ID: 12
11/21/2025 1:33:51 PM - Mapped pcType 'Shopfloor' to machinetypeid: 35
11/21/2025 1:33:51 PM - Vendor ID: 12, Model ID: 1, Machine Type ID: 35
11/21/2025 1:33:51 PM - Inserting new PC
11/21/2025 1:33:52 PM - Building INSERT SQL...
11/21/2025 1:33:52 PM - Values: hostname=APITEST-SHOP01, serial=APITEST002
11/21/2025 1:33:52 PM - SQL built successfully, executing...
11/21/2025 1:33:52 PM - Retrieved new machineid from LAST_INSERT_ID: 5473
11/21/2025 1:33:52 PM - InsertOrUpdatePC returning machineid: 5473
11/21/2025 1:33:52 PM - PC record created/updated. machineid: 5473
11/21/2025 1:33:52 PM - ERROR inserting network interface: [MySQL][ODBC 9.4(w) Driver][mysqld-5.6.51]Unknown column 'gateway' in 'field list'
11/21/2025 1:33:52 PM - ERROR inserting network interface: [MySQL][ODBC 9.4(w) Driver][mysqld-5.6.51]Unknown column 'gateway' in 'field list'
11/21/2025 1:33:52 PM - Network interfaces inserted: 0
11/21/2025 1:33:52 PM - Comm configs inserted: 0
11/21/2025 1:33:52 PM - ERROR inserting DNC config: [MySQL][ODBC 9.4(w) Driver][mysqld-5.6.51]Unknown column 'machineid' in 'field list'
11/21/2025 1:33:52 PM - DNC config inserted: False
11/21/2025 1:33:52 PM - CreatePCMachineRelationship: Executing SQL: SELECT machineid FROM machines WHERE machinenumber = 'M1234' AND machinetypeid NOT IN (33,34,35)
11/21/2025 1:33:52 PM - CreatePCMachineRelationship: Equipment not found for machine number: M1234
11/21/2025 1:33:52 PM - PC-Machine relationship created: False
11/21/2025 1:35:26 PM - === NEW updateCompleteAsset REQUEST ===
11/21/2025 1:35:26 PM - Hostname: APITEST-SHOP02
11/21/2025 1:35:26 PM - Serial: APITEST003
11/21/2025 1:35:26 PM - PC Type: Shopfloor
11/21/2025 1:35:26 PM - ClearShopfloorData: Cannot find machineid for hostname: APITEST-SHOP02
11/21/2025 1:35:27 PM - Found existing vendor ID: 12
11/21/2025 1:35:27 PM - Mapped pcType 'Shopfloor' to machinetypeid: 35
11/21/2025 1:35:27 PM - Vendor ID: 12, Model ID: 1, Machine Type ID: 35
11/21/2025 1:35:27 PM - Inserting new PC
11/21/2025 1:35:27 PM - Building INSERT SQL...
11/21/2025 1:35:27 PM - Values: hostname=APITEST-SHOP02, serial=APITEST003
11/21/2025 1:35:27 PM - SQL built successfully, executing...
11/21/2025 1:35:27 PM - Retrieved new machineid from LAST_INSERT_ID: 5474
11/21/2025 1:35:27 PM - InsertOrUpdatePC returning machineid: 5474
11/21/2025 1:35:27 PM - PC record created/updated. machineid: 5474
11/21/2025 1:35:27 PM - Network interfaces inserted: 2
11/21/2025 1:35:27 PM - CreatePCMachineRelationship: Executing SQL: SELECT machineid FROM machines WHERE machinenumber = 'M1234' AND machinetypeid NOT IN (33,34,35)
11/21/2025 1:35:27 PM - CreatePCMachineRelationship: Equipment not found for machine number: M1234
11/21/2025 1:35:27 PM - PC-Machine relationship created: False
11/21/2025 1:36:43 PM - UpdatePrinterMapping: hostname=APITEST-STD01, printerFQDN=Printer-10-80-92-48.printer.geaerospace.net
11/21/2025 1:37:06 PM - UpdatePrinterMapping: hostname=APITEST-STD01, printerFQDN=Printer-10-80-92-48.printer.geaerospace.net
11/21/2025 1:37:20 PM - UpdatePrinterMapping: hostname=APITEST-STD01, printerFQDN=10.80.92.48
11/21/2025 1:39:58 PM - UpdateInstalledApps: hostname=APITEST-STD01
11/21/2025 1:39:58 PM - Parsed apps array, count: 2
11/21/2025 1:39:58 PM - App 0: name='', version=''
11/21/2025 1:39:58 PM - App 1: name='', version=''
11/21/2025 1:39:58 PM - Installed apps inserted: 0
11/21/2025 1:43:34 PM - UpdateInstalledApps: hostname=APITEST-STD01
11/21/2025 1:43:34 PM - Parsed apps array, count: 2
11/21/2025 1:43:34 PM - App 0: name='Microsoft Office', version='16.0'
11/21/2025 1:43:34 PM - GetOrCreateApplication called with appName='Microsoft Office', appVersion='16.0'
11/21/2025 1:43:34 PM - ERROR querying applications: Variable is undefined
11/21/2025 1:43:34 PM - GetOrCreateApplication returned appid: 0
11/21/2025 1:43:34 PM - App 1: name='Chrome', version='120.0'
11/21/2025 1:43:34 PM - GetOrCreateApplication called with appName='Chrome', appVersion='120.0'
11/21/2025 1:43:34 PM - ERROR querying applications: Variable is undefined
11/21/2025 1:43:34 PM - GetOrCreateApplication returned appid: 0
11/21/2025 1:43:35 PM - Installed apps inserted: 0
11/21/2025 12:13:39 PM - === NEW updateCompleteAsset REQUEST ===
11/21/2025 12:13:39 PM - Hostname: TESTPC-V4
11/21/2025 12:13:39 PM - Serial: TEST123
11/21/2025 12:13:39 PM - PC Type: Standard
11/21/2025 12:13:39 PM - Found existing vendor ID: 34
11/21/2025 12:13:39 PM - Mapped pcType 'Standard' to machinetypeid: 33
11/21/2025 12:13:39 PM - Vendor ID: 34, Model ID: 1, Machine Type ID: 33
11/21/2025 12:13:39 PM - Inserting new PC
11/21/2025 12:13:39 PM - Building INSERT SQL...
11/21/2025 12:13:39 PM - Values: hostname=TESTPC-V4, serial=TEST123
11/21/2025 12:13:39 PM - SQL built successfully, executing...
11/21/2025 12:13:39 PM - Retrieved new machineid from LAST_INSERT_ID: 5475
11/21/2025 12:13:39 PM - InsertOrUpdatePC returning machineid: 5475
11/21/2025 12:13:39 PM - PC record created/updated. machineid: 5475
11/21/2025 12:17:19 PM - === NEW updateCompleteAsset REQUEST ===
11/21/2025 12:17:19 PM - Hostname: TESTPC-V6
11/21/2025 12:17:19 PM - Serial: TEST123V6
11/21/2025 12:17:20 PM - PC Type: Standard
11/21/2025 12:17:20 PM - Found existing vendor ID: 34
11/21/2025 12:17:20 PM - Mapped pcType 'Standard' to machinetypeid: 33
11/21/2025 12:17:20 PM - Vendor ID: 34, Model ID: 1, Machine Type ID: 33
11/21/2025 12:17:20 PM - Inserting new PC
11/21/2025 12:17:20 PM - Building INSERT SQL...
11/21/2025 12:17:20 PM - Values: hostname=TESTPC-V6, serial=TEST123V6
11/21/2025 12:17:20 PM - SQL built successfully, executing...
11/21/2025 12:17:20 PM - Retrieved new machineid from LAST_INSERT_ID: 5476
11/21/2025 12:17:20 PM - InsertOrUpdatePC returning machineid: 5476
11/21/2025 12:17:20 PM - PC record created/updated. machineid: 5476
11/21/2025 12:20:14 PM - === NEW updateCompleteAsset REQUEST ===
11/21/2025 12:20:14 PM - Hostname: TESTPC-V7
11/21/2025 12:20:14 PM - Serial: TEST123V7
11/21/2025 12:20:15 PM - PC Type: Standard
11/21/2025 12:20:15 PM - Mapped pcType 'Standard' to machinetypeid: 33
11/21/2025 12:20:15 PM - Vendor ID: 34, Model ID: 98, Machine Type ID: 33
11/21/2025 12:20:15 PM - Inserting new PC
11/21/2025 12:20:15 PM - Building INSERT SQL...
11/21/2025 12:20:15 PM - Values: hostname=TESTPC-V7, serial=TEST123V7
11/21/2025 12:20:15 PM - SQL built successfully, executing...
11/21/2025 12:20:15 PM - Retrieved new machineid from LAST_INSERT_ID: 5477
11/21/2025 12:20:15 PM - InsertOrUpdatePC returning machineid: 5477
11/21/2025 12:20:15 PM - PC record created/updated. machineid: 5477
11/21/2025 12:22:09 PM - === NEW updateCompleteAsset REQUEST ===
11/21/2025 12:22:09 PM - Hostname: TESTPC-V8
11/21/2025 12:22:09 PM - Serial: TEST123V8
11/21/2025 12:22:09 PM - PC Type: Standard
11/21/2025 12:22:10 PM - Mapped pcType 'Standard' to machinetypeid: 33
11/21/2025 12:22:10 PM - Vendor ID: 34, Model ID: 98, Machine Type ID: 33
11/21/2025 12:22:10 PM - Inserting new PC
11/21/2025 12:22:10 PM - Building INSERT SQL...
11/21/2025 12:22:10 PM - Values: hostname=TESTPC-V8, serial=TEST123V8
11/21/2025 12:22:10 PM - SQL built successfully, executing...
11/21/2025 12:22:10 PM - Retrieved new machineid from LAST_INSERT_ID: 5478
11/21/2025 12:22:10 PM - InsertOrUpdatePC returning machineid: 5478
11/21/2025 12:22:10 PM - PC record created/updated. machineid: 5478
11/21/2025 12:26:13 PM - === NEW updateCompleteAsset REQUEST ===
11/21/2025 12:26:13 PM - Hostname: TESTPC-V10
11/21/2025 12:26:13 PM - Serial: TEST123V10
11/21/2025 12:26:13 PM - PC Type: Standard
11/21/2025 12:26:48 PM - === NEW updateCompleteAsset REQUEST ===
11/21/2025 12:26:48 PM - Hostname: TESTPC-V10B
11/21/2025 12:26:48 PM - Serial: TEST123V10B
11/21/2025 12:26:48 PM - PC Type: Standard
11/21/2025 12:26:48 PM - PC record created/updated. machineid: 5479
11/21/2025 1:01:43 PM - UpdatePrinterMapping: hostname=TESTPC-V10B, printerFQDN=10.80.92.57
11/21/2025 1:04:25 PM - === NEW updateCompleteAsset REQUEST ===
11/21/2025 1:04:25 PM - Hostname: TESTPC-V13
11/21/2025 1:04:25 PM - Serial: TEST123V13
11/21/2025 1:04:25 PM - PC Type: Standard
11/21/2025 1:04:25 PM - PC record created/updated. machineid: 5480
11/21/2025 1:04:33 PM - UpdatePrinterMapping: hostname=TESTPC-V13, printerFQDN=10.80.92.57

29
logs/api-2025-12-02.log Executable file
View File

@@ -0,0 +1,29 @@
12/2/2025 4:23:21 AM - UpdateInstalledApps: hostname=G7B48FZ3ESF
12/2/2025 4:23:21 AM - Parsed apps array, count: 2
12/2/2025 4:23:21 AM - App 0: appid=30, appname='Tanium', version='7.4.7.1179'
12/2/2025 4:23:22 AM - GetOrCreateAppVersion called with appId=30, appVersion='7.4.7.1179'
12/2/2025 4:23:22 AM - Version not found, creating new...
12/2/2025 4:23:22 AM - Created new app version with id: 1
12/2/2025 4:23:22 AM - GetOrCreateAppVersion returned appversionid: 1
12/2/2025 4:23:22 AM - ERROR inserting installedapp: Type mismatch
12/2/2025 4:23:22 AM - App 1: appid=7, appname='Oracle', version='11r2'
12/2/2025 4:23:22 AM - GetOrCreateAppVersion called with appId=7, appVersion='11r2'
12/2/2025 4:23:22 AM - Version not found, creating new...
12/2/2025 4:23:22 AM - Created new app version with id: 2
12/2/2025 4:23:22 AM - GetOrCreateAppVersion returned appversionid: 2
12/2/2025 4:23:22 AM - ERROR inserting installedapp: Type mismatch
12/2/2025 4:23:22 AM - Installed apps inserted: 0
12/2/2025 4:29:48 AM - UpdateInstalledApps: hostname=G7B48FZ3ESF
12/2/2025 4:29:48 AM - Parsed apps array, count: 1
12/2/2025 4:29:48 AM - App 0: appid=30, appname='Tanium', version='7.4.7.1179'
12/2/2025 4:29:48 AM - GetOrCreateAppVersion called with appId=30, appVersion='7.4.7.1179'
12/2/2025 4:29:48 AM - Found existing appversionid: 1
12/2/2025 4:29:48 AM - GetOrCreateAppVersion returned appversionid: 1
12/2/2025 4:29:48 AM - Installed apps inserted: 1
12/2/2025 5:03:28 AM - UpdateInstalledApps: hostname=G9KN7PZ3ESF
12/2/2025 5:03:28 AM - Parsed apps array, count: 1
12/2/2025 5:03:28 AM - App 0: appid=30, appname='Tanium', version='7.4.7.1179'
12/2/2025 5:03:28 AM - GetOrCreateAppVersion called with appId=30, appVersion='7.4.7.1179'
12/2/2025 5:03:28 AM - Found existing appversionid: 1
12/2/2025 5:03:28 AM - GetOrCreateAppVersion returned appversionid: 1
12/2/2025 5:03:28 AM - Installed apps inserted: 1

25
logs/api-2025-12-03.log Executable file
View File

@@ -0,0 +1,25 @@
12/3/2025 9:22:06 AM - === NEW updateCompleteAsset REQUEST ===
12/3/2025 9:22:06 AM - Hostname: TEST-CMM-PC
12/3/2025 9:22:06 AM - Serial: TESTCMM123
12/3/2025 9:22:06 AM - PC Type: CMM
12/3/2025 9:22:06 AM - PC record created/updated. machineid: 5778
12/3/2025 9:23:38 AM - === NEW updateCompleteAsset REQUEST ===
12/3/2025 9:23:38 AM - Hostname: TEST-CMM-PC2
12/3/2025 9:23:38 AM - Serial: TESTCMM456
12/3/2025 9:23:38 AM - PC Type: CMM
12/3/2025 9:23:39 AM - PC record created/updated. machineid: 5779
12/3/2025 9:23:52 AM - === NEW updateCompleteAsset REQUEST ===
12/3/2025 9:23:52 AM - Hostname: TEST-WAXTRACE-PC
12/3/2025 9:23:53 AM - Serial: TESTWAX123
12/3/2025 9:23:53 AM - PC Type: WaxTrace
12/3/2025 9:23:53 AM - PC record created/updated. machineid: 5780
12/3/2025 9:24:17 AM - === NEW updateCompleteAsset REQUEST ===
12/3/2025 9:24:17 AM - Hostname: TEST-KEYENCE-PC
12/3/2025 9:24:17 AM - Serial: TESTKEY123
12/3/2025 9:24:17 AM - PC Type: Keyence
12/3/2025 9:24:17 AM - PC record created/updated. machineid: 5781
12/3/2025 9:42:01 AM - === NEW updateCompleteAsset REQUEST ===
12/3/2025 9:42:01 AM - Hostname: TEST-CMM-PC
12/3/2025 9:42:01 AM - Serial: TESTCMM999
12/3/2025 9:42:01 AM - PC Type: CMM
12/3/2025 9:42:01 AM - PC record created/updated. machineid: 5782

6
logs/api-2025-12-04.log Executable file
View File

@@ -0,0 +1,6 @@
12/4/2025 1:36:22 PM - === NEW updateCompleteAsset REQUEST ===
12/4/2025 1:36:22 PM - Hostname: TEST-CURL-PC
12/4/2025 1:36:22 PM - Serial: CURL12345
12/4/2025 1:36:22 PM - PC Type: Shopfloor
12/4/2025 1:36:22 PM - ClearShopfloorData: Cannot find machineid for hostname: TEST-CURL-PC
12/4/2025 1:36:23 PM - PC record created/updated. machineid: 5780