Option Explicit requires all variables to be declared. objConn and rs
are created in sql.asp but need to be pre-declared in the calling page.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- VBScript doesn't have IIf() function - replaced with proper syntax
- Removed badge styling per user preference, use plain text
- Added FROM DUAL to scalar subquery for compatibility
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Production doesn't have the table yet, so create it fresh with
machineid schema from the start.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- ednclogs table now uses machineid to link to machines table
- Removed redundant hostname storage (derive from machines table)
- Updated LogDNCEvent to look up and insert machineid
- Updated GetDNCStats to join machines table for hostname
- Updated displaypc.asp queries to use machineid directly
- sql/ednc_tables.sql is now a migration script for existing production
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
API endpoints:
- logDNCEvent: Log events from eDNC-Fix PowerShell script
- getDNCStats: Get all eDNC installations and stats
Database tables (sql/ednc_tables.sql):
- ednc_logs: Event log entries
- ednc_installations: Per-hostname tracking
displaypc.asp:
- Shows eDNC-Fix stats in Applications tab if installed
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove config.asp from tracking (contains credentials)
- Add config.asp.example with placeholder values
- Update .gitignore to exclude config.asp
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move all DB credentials to config.asp with DSN/ODBC toggle
- Add Zabbix API URL and token to centralized config
- Update sql.asp, api.asp, apiusb.asp, zabbix.asp to use config
- Add GetConnectionString() and GetEmployeeConnectionString() functions
- Make migration SQL idempotent (safe to run multiple times)
- Add duplicate index cleanup (appname_2) to migration
- Document employee DB access limitation in CLAUDE.md
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Created secrets.md for Zabbix/Gitea tokens and DB creds
- Updated CLAUDE.md to reference secrets.md
- Added secrets.md to .gitignore
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Ignores:
- logs/ directory
- aspnet_client/ (IIS generated, not needed for Classic ASP)
- test result CSV files
- editor temp files
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Created README.md for Gitea project page
- Added Gitea API token to CLAUDE.md for future access
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add Testing section so Claude knows to run ./tests/test_forms.sh
after making changes to verify all forms work correctly.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Created test_forms.sh for bash/curl testing
- Fixed networkdevices.asp (no underscore)
- Use non-redirect form endpoints for reliable testing
- All 41 tests pass
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add section clarifying dev vs production access
- Note that Zabbix, prod IIS, prod DB, prod logs are inaccessible
- Clarify user must relay prod info and deploy changes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix table count (29→35) and view count (23→26) in QUICK_REFERENCE.md
- Fix pc_dnc_config → dncconfig in DualPath PCs SQL example
- Add 8 additional reference/lookup tables to documentation
- Document Zabbix API URL and token in CLAUDE.md
- Add Gitea section placeholder
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added documentation for:
- getShopfloorPCs: List active shopfloor PCs
- getRecordedIP: Look up recorded IP by hostname
- updateWinRMStatus: Update WinRM enabled status
- updateMachinePositions: Bulk update map positions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add printerlookup.asp for Zabbix integration (lookup by IP/FQDN)
- Add fiscal week sidebar styling for all 16 themes
- Update CLAUDE.md with External Integrations section
- Fix fiscal week box centering with inline styles
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove 27 completed one-off migration scripts
- Remove old backup file (dev-backup-20251120)
- Remove completed shell scripts for prod import/export
- Archive migration_phase1-4 directories and documentation
- Keep only view_consolidation.sql as active script
All migrations have been applied to production.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Drop 27 unused views, create 24 new purpose-built views
- New views cover: equipment, PCs, printers, notifications, applications,
knowledge base, USB history, subnets, maps, and reports/charts
- Migration scripts for legacy network device tables (servers, cameras,
switches, accesspoints, idfs) to unified machines table
- Migration scripts for legacy tables (machineoverrides, dualpathassignments,
networkinterfaces)
- Update displaydevice.asp and displaylocationdevice.asp to use machines table
- Fix deviceserver.asp type mismatch error with HTMLEncode
- Hide Applications tab for equipment in displaymachine.asp
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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>