The PC IP lookup was using the deprecated pc_network_interfaces table
which no longer exists. Updated to use the communications table and
machines table with proper Phase 2 joins.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rewrite displaysubnet.asp with two-column layout and profile card
- Add Details, Devices, and Edit tabs matching other display pages
- Use parameterized queries and HTML encoding for security
- Fix device queries to use machines/communications tables
- Add includes/email.asp helper for Python Email API integration
- Update api.asp GetShopfloorPCs to include all PC types with 10.134.* IPs
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove emoji icons from UI text (lightbulb, wrench, warning, printer, checkmark)
- Replace AI-sounding comment phrases with specific descriptions
- Keep technical arrow notation in code comments (→) for mapping documentation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
VBScript does not have an IIf() function. Replaced 6 IIf() calls
with proper If-Then-Else variable preparation for network interface
parameter handling (ip1/mac1, ip2/mac2, ip3/mac3).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add printerqrcode.asp for single printer QR code labels (ULINE S-20135)
- Add printerqrbatch.asp for batch printing multiple printers (6 per page)
- Add auto-update of Windows name when changing associated machine
- Windows name follows naming standard: [CSF]-[Machine]-[Vendor][Model]
- Remove UDC integrations from displaymachine.asp
- Add toner_inventory.csv for HP printer toner tracking
- Fix printerqrbatch.asp to show all printers, not just CSF ones
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- printbadge.asp: Machine badge printing with barcode (Code39)
- testcalc.asp: Test page for UDC calculation debugging
- testpage.asp: Generic test page template
- sql/drop_ednc_tables.sql: Cleanup script for deprecated eDNC tables
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Share Toast Notifications:
- Unified toast style across all pages (purple gradient, top-right position)
- Updated displayapplication.asp, displaytopic.asp, displayudc.asp
- Updated printerlinksgenerator.asp (replaced alert with toast)
- Same text: "Link Copied!" / "This link will show the search term..."
PC Scanning/Editing Fixes:
- savedevicedirect.asp: Use machinetypeid=33 to detect PCs (not pctypeid)
- savedevicedirect.asp: Use new Dell TBD model (ID 110) for new PCs
- editpc.asp: Model dropdown includes current model even if vendor ispc=0
- editpc.asp: Fixed vendor query to use ispc=1 instead of ismachine=1
Database changes (manual):
- Set ispc=1 for Dell, Dell Inc., DellInc., HP vendors
- Created Dell TBD model (ID 110) as default PC model
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix ADO cursor issue where reading rs("description") twice caused
empty values (IsNull check consumed the field value)
- Change all device pages to read description field once using
`description = rs("description") & ""` pattern
- Add deviceDescription variable in displaydevice.asp
- Fix machinetypeid mapping: IDF=17, Camera=18 (was swapped)
- Add model dropdown fix to include currently assigned model
- Add server application tracking feature
- Various other improvements and fixes
Files affected:
- displaydevice.asp, displaylocationdevice.asp
- deviceaccesspoint.asp, deviceserver.asp, deviceswitch.asp
- devicecamera.asp, deviceidf.asp
- savenetworkdevice.asp, networkdevices.asp
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New views:
- vwudcevents_monthly: Monthly event counts by machine/type
- vwudctooldata_weekly: Weekly tool data trends by machine/tool
- vwudctooldata_monthly: Monthly tool data trends by machine/tool
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Creates daily summary tables: udcmeasurements_daily, udcevents_daily, udctooldata_daily
- Stored procedures:
- sp_udc_backfill_summaries(): One-time backfill of historical data
- sp_udc_summarize_date(date): Summarize a specific date
- sp_udc_purge_old_data(days): Purge raw data older than X days
- sp_udc_daily_maintenance(days): Daily summarize + purge
- Weekly/monthly views for trend analysis
- Keeps summaries forever, purges raw data after retention period
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fixed udcactivesessions table to match actual production schema
- Added 11 new views for UDC reporting:
- vwudctoolhealthbymachine: Tool health aggregated by machine
- vwudctoolhealthbytool: Tool health by tool number
- vwudcootdetail: OOT measurements detail
- vwudctoolootdetail: Tool OOT detail
- vwudcactivesessions: Active sessions with machine details
- vwudcviolations: Violations with context
- vwudcdailyproduction: Daily production summary
- vwudcerrorsummary: Error summary by machine
- vwudcconnectionsummary: Connection events summary
- vwudcheaderupdates: Badge changes with context
- vwudcclmfiles: CLM file import status
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The file tracking table was missing from udctables.sql but existed
in the database. Required for clmparser.py incremental imports.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
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>