PowerShell was sending datetime in US locale format (12/7/2025 10:05:28 PM)
but MySQL requires ISO format (YYYY-MM-DD HH:MM:SS).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Changed Invoke-RemoteAssetCollection.ps1 default URL to production:
https://tsgwp00525.rd.ds.ge.com/shopdb/api.asp
- Added SSL/TLS certificate bypass for HTTPS connections in both:
- Update-PC-CompleteAsset.ps1
- Invoke-RemoteAssetCollection.ps1
- Set TLS 1.2 as minimum protocol version
- Security group logon\g03078610 confirmed correct
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Changed "Function" label to "PC Type"
- Added PC Type value from pctype table (pctypename) instead of machinetype
- Changed WinRM display from badge to plain text
- Added uptime display showing days since last boot
- Added lastboottime and uptime_days to SQL query
- Added LEFT JOIN to pctype table for PC type name
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
api.asp:
- Add pctypeid to inline UPDATE and INSERT statements in UpdateCompleteAsset
- Call GetPCTypeIdFromPCType to properly map pcType string to pctypeid
- Add "HEATTREAT" (no space) variant to GetPCTypeIdFromPCType function
displaypc.asp:
- Add relationship notification for PC types that can control equipment
(CMM=5, Wax/Trace=6, Keyence=7, Genspect=8, Heat Treat=9, Part Marker=10)
- Shows info alert with link to Edit Machine page
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- api.asp: Add pctypeid to UPDATE statement so PC type changes are saved
(was only set on INSERT, not UPDATE - Heat Treat PCs stayed as Shopfloor)
- api.asp: Add installedApps parameter and SaveInstalledApps() function
to save tracked apps during updateCompleteAsset calls
- network_map.asp: Fix query to use m.machinetypeid instead of mo.machinetypeid
(IDFs and other network devices weren't appearing on map)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replaced add_lastboottime_column.sql with comprehensive add_uptime_tracking.sql
- Updates 3 views to include lastboottime and uptime_days columns:
- vw_active_pcs: Active PCs with warranty info
- vw_shopfloor_pcs: Shopfloor PCs
- vw_recent_updates: Recently updated machines
- Includes verification queries
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Database: Add lastboottime column to machines table
- API: Accept lastBootUpTime parameter and store in lastboottime column
- PowerShell: Collect LastBootUpTime from Win32_OperatingSystem
- Update-PC-Minimal.ps1: Add last boot time collection
- Update-ShopfloorPCs-Remote.ps1: Add last boot time collection and API posting
- Display: Add Uptime column to displaypcs.asp with color-coded badges
- > 90 days: red badge
- > 30 days: yellow badge
- > 7 days: blue badge
- <= 7 days: muted text
- Filter: Add "Uptime > X days" filter dropdown (7, 30, 90 days)
- SQL: Production migration script for lastboottime column
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added HeatTreat (appid 77) to applications.csv for detection
Also updated PowerShell script (separate folder):
- Added Heat Treat PC type detection via "HeatTreat" application
- Fixed Genspect to return "Genspect" instead of "Measuring"
- Updated detection priority comment
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added GetPCTypeIdFromPCType() function to map pcType strings to pctypeid
- INSERT now includes pctypeid column (was missing, causing PCs to not be
properly identified as PCs in Phase 2 schema)
- pctypeid mapping: Standard=1, Engineer=2, Shopfloor=3, CMM=5, Wax/Trace=6,
Keyence=7, Genspect/EAS1000=8, Heat Treat=9, Part Marker=10
- WJPRT* pattern override now sets both machinetypeid and pctypeid
- Fixed EAS1000/GENSPECT to map to same pctypeid (8)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- PCs now identified by pctypeid IS NOT NULL (not machinetypeid >= 33)
- Equipment identified by pctypeid IS NULL (not machinetypeid < 33)
- Updated 8 files: search.asp, savemachineedit.asp, displaymachine.asp,
displaypc.asp, displaypcs.asp, machine_map.asp, displaymachines.asp, api.asp
- Simplified queries and removed redundant machinetypeid checks
- Updated all related comments to reflect new pattern
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix missing space before GROUP BY in PC list pages (displaypcs, computers, listpcs, pclist, pcs)
- Add pctypeid-based equipment filtering in editdevice.asp (CMM PCs only see CMM equipment)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- PCs identified by pctypeid IS NOT NULL instead of machinetypeid list
- Equipment identified by pctypeid IS NULL instead of NOT IN list
- Fixed devicecamera.asp: IDF dropdown uses machinetypeid 17, not 34
- Fixed displaypcs.asp: measuring tool filter uses pctypeid = 7
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
All PCs now use machinetypeid 33 (PC) with pctypeid for sub-type:
- Standard, Engineer, Shopfloor, CMM, Wax/Trace, Keyence, Genspect, Heat Treat
Added new pctypes: Keyence, Genspect, Heat Treat
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Printer name only generates when there's enough info:
- Model must be selected (vendor available)
- AND either CSF name entered OR machine selected
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Printer name auto-generates from CSF name, machine/location, vendor, model
- Format: CSFName-Location-VendorDescription (e.g., CSF21-7701-HP-LaserJet)
- FQDN auto-generates from IP: Printer-10-80-92-69.printer.geaerospace.net
- Added data attributes to model and machine dropdowns for JS access
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- HP and Xerox printers: universal installer (one batch call)
- Non-HP/Xerox with installpath: use specific installer
- Non-HP/Xerox without installpath: show warning for manual install
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Removed specific installer logic - all printers now use PrinterInstaller.exe
- Fixed /PRINTER= parameter quoting: /PRINTER="Name1,Name2" (quotes around value)
- Single call with comma-separated printer names
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Changed from: "/PRINTER=Name1,Name2" (quotes around entire param)
Changed to: /PRINTER="Name1,Name2" (quotes around value only)
This matches the expected format in PrinterInstaller.iss comment:
// Or multiple: /PRINTER="Printer1,Printer2,Printer3"
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Instead of calling PrinterInstaller.exe separately for each printer
(which opened multiple GUI wizards), now collects all printers without
specific installers and passes them comma-separated in one call.
- Specific installers still run individually with /SILENT
- Universal installer printers batched: /PRINTER=Name1,Name2,Name3
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Removed VBScript Dim statements from inside while loop which caused
re-declaration errors on subsequent iterations. Now uses standardized
printer names directly from database instead of generating them.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Use location (machine number/alias) as display name fallback when
printercsfname is not set. Show model number as secondary info instead
of location to avoid redundancy.
Fixes Coaching 115 and similar printers without CSF names assigned.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Restored original structure using wjf_employees-sql.asp include
- Added USB History tab with separate shopdb connection
- Fixed 500 error caused by trying to handle missing employees DB
- Employee profile now works on production, USB history gracefully
degrades if shopdb unavailable
- Added DataTables for USB checkout history display
- Uses 12-hour date format (MM/DD/YYYY h:mm AM/PM)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
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>
- Fix FormTracePak app_id from 68 to 76 (68 is Media Creator Full Edition)
- Add installed app tracking to remote WinRM script with embedded patterns
- Add IP fallback for failed hostname connections (uses recorded 10.134.* IPs)
- Add getRecordedIP API endpoint to lookup primary IP by hostname
- Mark 10.134.*.* as primary IPs, other ranges as secondary/equipment IPs
- Fix WinRM serialization issue by converting matched apps to JSON before return
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- search.asp: Route to displaypc.asp for PCs (machinetypeid 33-43 or
machinetypeid 1 with hostname), displaymachine.asp for equipment
- search.asp: Add hostname search capability for PCs
- Update-ShopfloorPCs-Remote.ps1: Fix hashtable conversion bug that caused
empty API errors - pass $result directly instead of PSObject.Properties
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
## Printer Installer Map Fixes
- Fixed printer_installer_map.asp to pass printer IDs instead of generated names
- Fixed install_printer.asp dictionary key collision by using printerid
## Network Device FQDN Support
- Added fqdn column to machines table (migration script included)
- Updated device edit pages: deviceaccesspoint.asp, deviceserver.asp,
deviceswitch.asp, devicecamera.asp
- Updated save_network_device.asp to handle FQDN in INSERT/UPDATE
- Updated network_devices.asp to display FQDN for Server, Switch, Camera
- Updated vw_network_devices view to include FQDN from machines table
- Added FQDN field to machine_edit.asp Network tab
- Updated savemachineedit.asp to save FQDN
## Printer Install Path Edit
- Added installpath field to displayprinter.asp Edit tab
- Updated editprinter.asp to save installpath changes
## Documentation
- Added IIS log location to CLAUDE.md
## Production Migration
- sql/add_fqdn_to_machines.sql - Run on production to add column and update view
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Issue: api.log was growing indefinitely with no rotation
Impact: With 200+ PCs reporting daily, log file would grow to 2+ GB/year
Fix: Changed logging to create daily log files
- Old: logs/api.log (single file, grows forever)
- New: logs/api-YYYY-MM-DD.log (one file per day)
Example log files:
- logs/api-2025-11-21.log
- logs/api-2025-11-22.log
- logs/api-2025-11-23.log
Benefits:
- Easier to troubleshoot (find logs by date)
- Automatic separation (no manual log rotation needed)
- Can delete old logs after N days
- File sizes manageable (~6MB/day estimated)
Cleanup Recommendation:
Delete logs older than 30 days:
forfiles /p "C:\inetpub\wwwroot\shopdb\logs" /s /m api-*.log /d -30 /c "cmd /c del @path"
Or use Windows Task Scheduler to automate cleanup
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
Issues Fixed:
1. UpdateInstalledApps() was using wrong table name 'machineapplications'
- Changed to correct table 'installedapps'
2. INSERT was missing 'isactive' column required by installedapps table
3. GetOrCreateApplication() was using wrong column names:
- 'applicationid' → 'appid' (primary key)
- 'applicationname' → 'appname'
- Removed 'version' column (doesn't exist in applications table)
- Now stores version info in 'appdescription' field
How It Works Now:
- PowerShell script collects installed apps from registry
- Filters to tracked apps (UDC, PPDCS, Oracle, Tanium, eDNC, etc.)
- Sends to api.asp with action=updateInstalledApps
- API deletes old app mappings for PC: DELETE FROM installedapps
- API creates/finds apps in 'applications' table
- API inserts new mappings: INSERT INTO installedapps (machineid, appid, isactive)
Tables Used:
- applications (appid, appname, appdescription, isactive)
- installedapps (machineid, appid, isactive)
Impact: Application tracking now works correctly with Phase 2 schema
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
Issue: Active Only mode was showing notifications marked isactive=1 even if
their endtime had passed, displaying them with 'Complete' status.
Root Cause: WHERE clause only checked isactive=1, not whether endtime < NOW()
Fix: Updated WHERE clause to exclude notifications past their endtime:
- Active notifications now require: isactive=1 AND (endtime IS NULL OR endtime >= NOW())
- Still shows recently completed notifications within 30-min grace period for fade-out
- 'Active Only' badge now accurately reflects truly active notifications
Impact: Users will no longer see 'Complete' notifications when filtering to Active Only
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
Extended the shopfloor dashboard upcoming events window to show more
advance notice of scheduled changes and incidents.
Changes:
- api_shopfloor.asp: Changed INTERVAL 72 HOUR to INTERVAL 5 DAY
- Dashboard display: "Next 72 Hours" → "Next 5 Days"
- No events message: Updated to reflect 5-day window
Benefits:
- Better visibility for weekly planned maintenance
- More advance notice for upcoming changes
- Aligns with typical weekly planning cycles
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Prevents data refresh from interrupting carousel animations, especially
when looping from last event back to first.
Problem:
- Carousel rotates every 5 seconds
- Data refreshes every 10 seconds
- With 4 events: collision at 20s when looping back to index 0
- Refresh would cut off the smooth slide-up transition
Solution:
- Track transition state with isTransitioning flag
- If renderEvents() called during transition, store data and return early
- After 800ms transition completes, render pending data automatically
- Max delay: 800ms, only when collision occurs
- 99% of refreshes happen instantly (no collision)
Benefits:
- Works with ANY number of events (4 or 400)
- Smooth transitions every time
- Minimal delay (max 800ms, rarely happens)
- Future-proof - no magic timing numbers
- Console logs show when delay occurs
Timeline example (4 events):
- 0s: test 2 (index 0)
- 5s: test again (index 1) - transition starts, isTransitioning=true
- 5.8s: transition completes, isTransitioning=false
- 10s: REFRESH (no collision, renders immediately)
- 15s: test 3 (index 2)
- 20s: test (index 3) - transition starts
- 20s: REFRESH (collision! delayed)
- 20.8s: transition completes, pending data renders ✅🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The carousel was resetting to index 0 every 10 seconds when the dashboard
refreshed data from the API. This caused the carousel to show:
- 0s: test 2 (index 0)
- 5s: test again (index 1)
- 10s: DATA REFRESH → reset to test 2 (index 0) ❌
Fixed by:
- Preserving currentUpcomingIndex across renderEvents() calls
- Only reset index if it's out of range for new data
- Render the currently active event instead of always starting at 0
- Added logging to show index preservation
Now the carousel cycles continuously through all 4 events without
resetting when the page refreshes data every 10 seconds.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>