Database changes (run sql/migration_drop_pc_tables.sql on prod):
- Drop pc, pc_backup_phase2, pc_to_machine_id_mapping tables
- Rename pcid columns to machineid in machineoverrides, dualpathassignments, networkinterfaces
- Recreate 9 views to use machines.machineid instead of pcid
- Clean orphaned records and add FK constraints to machines table
ASP fixes:
- editprinter.asp: Fix CLng type mismatch when no printerid provided
- includes/sql.asp: Remove AutoDeactivateExpiredNotifications (endtime handles expiry)
- includes/leftsidebar.asp: Update fiscal week banner styling, remove dead Information link
- charts/warrantychart.asp: Use vw_warranty_status instead of pc table
Dashboard API renames (naming convention):
- shopfloor-dashboard: Update to use apishopfloor.asp, apibusinessunits.asp
- tv-dashboard: Rename api_slides.asp to apislides.asp
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Strip emojis from 47 markdown files across docs/, sql/, and root
- Add docs/DOCS_CONSOLIDATION_PLAN.md with plan to reduce 45 docs to 8
- Establish no-emoji rule for documentation going forward
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Consolidates all database changes into a single step-by-step guide:
1. Table naming convention fix (6 tables renamed)
2. View recreation (9 views)
3. Fix backwards Controls relationships
4. Propagate controllers to dualpath machines
5. Sync equipment data between dualpath partners
Includes pre-deployment checklist, rollback plan, and verification steps.
Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When a dualpath relationship is created, equipment data is now automatically
synced between partners. This ensures both machines share the same:
- Controller type and OS
- Model number
- Serial number
- Communication settings (IP, Serial config)
Location data (mapleft, maptop) is NOT synced since dualpath machines
occupy slightly different physical positions.
Changes:
- includes/db_helpers.asp: Add CopyEquipmentDataToDualpathPartner(),
CopyCommConfigToDualpathPartner(), and SyncDualpathPartnerData() functions
- savemachineedit.asp: Call SyncDualpathPartnerData() on dualpath creation
- savemachine_direct.asp: Call SyncDualpathPartnerData() on dualpath creation
- sql/sync_dualpath_equipment_data.sql: One-time script to sync existing pairs
Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When a PC is assigned to control equipment that has a dualpath relationship,
the controller is now automatically propagated to the dualpath partner machine.
Changes:
- includes/db_helpers.asp: Add PropagateControllerToDualpathMachines() and
PropagateControllerFromDualpathMachine() helper functions
- savemachine_direct.asp: Call propagation on new equipment creation
- savemachineedit.asp: Call propagation when editing equipment relationships
- api.asp: Add PropagateControllerToDualpathMachinesAPI() for PowerShell API
Also includes one-time fix script (sql/fix_dualpath_controller_relationships.sql)
that fixes 140 backwards relationships (Equipment->PC to PC->Equipment) and
propagates controllers to 30 dualpath machines that were missing them.
Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace 05_update_asp_files.sh with 05_update_asp_files.ps1
- Replace 06_update_docs.sh with 06_update_docs.ps1
- Update PRODUCTION_DEPLOYMENT_GUIDE.md with PowerShell commands
Both scripts support -Execute flag (dry run by default)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Security fixes:
- Add HTMLEncode to displaysubnets.asp output
- Add HTMLEncode to displayapplications.asp URL attributes
Icon standardization:
- Use zmdi-plus-circle for all Add buttons (displaypcs, pcs, pclist, computers, listpcs)
- Use zmdi-edit for all Edit tab icons (displayapplication, displayprinter, displaysubnet, displaydevice)
- Replace icon-note with zmdi icons throughout
Layout consistency:
- Standardize title row margin-bottom to 15px across all pages
- Add table-hover class to all data tables
- Fix editpc.asp title from "Edit Equipment" to "Edit PC"
- Fix editpc.asp back link to point to displaypcs.asp
Terminology:
- Change "Make" to "Vendor" in displayprinters.asp
- Standardize Back button text to "Back to [Page]" format
Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
PowerShell scripts have been moved to a separate repository:
ssh://git@localhost:2222/cproudlock/powershell-scripts.git
This separates concerns and allows independent versioning of:
- Asset collection scripts
- Remote execution scripts
- WinRM configuration utilities
- Registry backup tools
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create machine_map_editor.asp for bulk position editing
- Draggable Leaflet markers for repositioning machines
- Sidebar with filterable machine list
- Pending changes tracking with save/reset functionality
- Proper Y-axis coordinate conversion (2550 - top)
- Update machine_map.asp
- Reduce marker size from 20px to 12px to reduce overlap
- Filter out network devices (16-20) and PCs (33+) from display
- Show equipment only (machinetypeid 2-15)
- Add updateMachinePositions API endpoint in api.asp
- Accepts JSON array of position changes
- Updates mapleft/maptop for multiple machines
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
charts/udcchart.asp, charts/ma3chart.asp:
- Add COALESCE to handle NULL aggregate values
- Add NULL checks for VBScript CInt operations
- Change machinecount to only count PCs (pctypeid IS NOT NULL)
- UDC/CLM/MA3 apps only exist on PCs, not equipment
displaymachines.asp:
- Add machinetypeid < 33 filter to exclude PC machine types
- PCs with NULL pctypeid were incorrectly showing on equipment list
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
displaypcs.asp:
- Replace "All Time" filter with WinRM status filter
- Options: All, Needs WinRM (Has Equipment), Has WinRM, No WinRM
- Add VNC IP fallback when hostname unavailable
displaypc.asp:
- Add VNC IP fallback when hostname unavailable
api.asp:
- Add isactive field support for installedapps table
- UDC/CLM process detection sets isactive=1 if running, 0 if not
displaymachines.asp:
- Fix to exclude PC machine types (machinetypeid >= 33)
- PCs were incorrectly showing on equipment list
Update-ShopfloorPCs-Remote.ps1:
- Add UDC.exe and PPMon.exe (CLM) process detection
- Set isactive flag based on running process
- Add 10.134.* to TrustedHosts for IP fallback connections
Update-PC-CompleteAsset.ps1:
- Add UDC/CLM process detection for local execution
- Set isactive flag on tracked applications
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Use string concatenation instead of variable interpolation to avoid
PowerShell interpreting KB as a special token.
Co-Authored-By: Claude <noreply@anthropic.com>
Port names like 10.80.92.53_2 are now cleaned to 10.80.92.53 before
sending to the API for printer lookup.
Co-Authored-By: Claude <noreply@anthropic.com>
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>