Commit Graph

112 Commits

Author SHA1 Message Date
cproudlock
2a1c434d38 Fix IIf() runtime bug in updatedevicedirect.asp
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>
2025-12-22 09:46:50 -05:00
cproudlock
84c2120652 Add printer QR code printing and Windows name auto-update
- 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>
2025-12-19 16:38:38 -05:00
cproudlock
51f4c078c7 Add badge printing, test pages, and eDNC cleanup script
- 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>
2025-12-18 10:36:48 -05:00
cproudlock
b858d069c5 Standardize share toast notifications and fix PC scanning/editing
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>
2025-12-17 15:31:59 -05:00
cproudlock
a4096ace94 Fix network device description/machinenotes display and edit
- 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>
2025-12-17 13:47:56 -05:00
cproudlock
a5b4013949 Add weekly/monthly views for events and tool data summaries
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>
2025-12-16 10:13:49 -05:00
cproudlock
0d0e589ea4 Add UDC data retention and summarization system
- 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>
2025-12-16 09:18:02 -05:00
cproudlock
ed52086732 Add UDC reporting views and fix udcactivesessions table structure
- 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>
2025-12-16 08:08:29 -05:00
cproudlock
8be7469e63 Add missing udcclmfiles table to UDC schema
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>
2025-12-16 07:58:49 -05:00
cproudlock
91fe5a6c66 Add UDC Performance Dashboard and Tool Health features
- Add displayudc.asp with Dashboard tab containing:
  - Production Trend chart (daily parts)
  - OOT Rate Trend chart (daily OOT %)
  - Machine Utilization chart (top 10 by runtime hours)
  - Top Operators chart (top 10 by parts produced)
- Add tabs for drill-down: Live Activity, Operators, Machines, Parts,
  Quality/OOT, Timing, Activity Log, Tool Health, Uptime, IT Diagnostics

- Add Tool Health section to displaymachine.asp UDC tab:
  - Summary cards (tools monitored, measurements, OOT count)
  - Tool status table with health indicators
  - Recent OOT events display

- Add UDC API endpoints in api.asp:
  - getUDCPartRuns, getUDCOperatorStats, getUDCMachineStats, getUDCManualTiming

- Add sql/udctables.sql schema for UDC data storage

- Update docs/API.md with UDC endpoint documentation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 07:54:13 -05:00
cproudlock
95072d96fc Fix printerlookup.asp: Use correct column name ipaddress
Printers table uses 'ipaddress' not 'address' per schema.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 10:04:13 -05:00
cproudlock
0d263fccdb Fix printerlookup.asp: Add Dim objConn,rs for Option Explicit
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>
2025-12-12 10:03:33 -05:00
cproudlock
0f859cbda7 Fix displaypc.asp: Replace IIf() with If-Then-Else, remove badges
- 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>
2025-12-12 10:02:07 -05:00
cproudlock
d67520152d Add vw_ednclogs view for easy querying with hostname
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 09:36:06 -05:00
cproudlock
1595dca751 Fix ednc_tables.sql - fresh table creation (not migration)
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>
2025-12-12 09:35:06 -05:00
cproudlock
a1a10a51d2 eDNC: Use machineid instead of hostname for proper FK relationship
- 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>
2025-12-12 09:33:27 -05:00
cproudlock
4441dde2e8 displaypc.asp: Add eDNC recent activity log (last 10 entries)
Shows file, action (cleaned/ok/failed/error), and timestamp

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 09:01:57 -05:00
cproudlock
4e37378923 Add eDNC-Fix API endpoints and displaypc.asp integration
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>
2025-12-12 08:55:27 -05:00
cproudlock
de7d8faacd Update STANDARDS.md to v1.2
- Note authentication not yet implemented (SAML planned)
- Add DSN toggle documentation for dev/prod environments
- Add API endpoint testing section with curl examples
- Update PC identification (machinetypeid=33 only, removed 34-46)
- Add comid column gotcha (was using communicationid)
- Update config file structure (config.asp.example)
- Update configuration template with dual-database setup

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 08:23:50 -05:00
cproudlock
c96f1c4c0a Fix column name in getRecordedIP API
- Change communicationid to comid (correct column name)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 08:21:29 -05:00
cproudlock
1e17fd3026 Add config.asp to gitignore, provide example template
- 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>
2025-12-12 08:12:47 -05:00
cproudlock
131aaaddbf Centralize credentials and make migration idempotent
- 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>
2025-12-12 08:11:28 -05:00
cproudlock
e0d89f9957 Security fixes and schema cleanup
- Fix SQL injection in displayprofile.asp (parameterized query)
- Add HTMLEncode to XSS-vulnerable output in 5 display pages
- Add Option Explicit to computers.asp, displaymachines.asp, displaypcs.asp, displayapplication.asp, displayprofile.asp
- Update STANDARDS.md with test script reference, secrets management, column naming gotchas
- Fix equipment type ranges in CLAUDE.md and QUICK_REFERENCE.md (1-15, 21-25)
- Add migration SQL to cleanup redundant PC machinetypes (34-46)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 07:22:16 -05:00
cproudlock
693789138d Move API credentials to secrets.md (gitignored)
- 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>
2025-12-11 17:41:32 -05:00
cproudlock
f04ac08200 Add .gitignore for logs, IIS folders, editor files
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>
2025-12-11 17:39:35 -05:00
cproudlock
c4ad415cc1 Add README.md, document Gitea API token
- 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>
2025-12-11 17:37:34 -05:00
cproudlock
8cc93b1e57 Document test suite in CLAUDE.md
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>
2025-12-11 17:31:58 -05:00
cproudlock
22a60a9e5a Add bash test script, fix test endpoints
- 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>
2025-12-11 17:30:56 -05:00
cproudlock
dda3ecc81c Comprehensive test script for all ShopDB forms
- Rewrote test_forms.ps1 with complete form coverage
- Tests: notifications, equipment, printers, subnets, applications,
  KB articles, vendors, models, and all network device types
- Added edit form page load tests
- Added API endpoint tests
- Added validation tests for required fields
- Uses AUTOTEST_ prefix for easy cleanup identification
- Added cleanup_test_data.sql for database cleanup
- Removed outdated test_forms.sh and test_savemachine.html

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 17:22:19 -05:00
cproudlock
1bf843fd01 Document environment access limitations for Claude
- 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>
2025-12-11 17:15:27 -05:00
cproudlock
eda9cd2208 Update docs: fix counts, add reference tables, document Zabbix API
- 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>
2025-12-11 17:14:56 -05:00
cproudlock
d1a93979f2 Fix database schema documentation to match actual tables
- Fix table names: pc_comm_config → commconfig, pc_dnc_config → dncconfig
- Fix column name: communications.gateway → defaultgateway
- Clarify printers uses 'ipaddress' while communications uses 'address'
- Update CREATE TABLE statements to match actual schema
- Add warranties table to QUICK_REFERENCE.md

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 17:09:44 -05:00
cproudlock
76c6145bf7 Add missing views to QUICK_REFERENCE.md
Added 7 missing views:
- vw_downtime_by_type, vw_incident_durations (reports)
- vw_kb_by_application, vw_installed_apps_by_machine, vw_pc_app_stats (apps)
- vw_subnet_list, vw_usb_checkout_history (other)

Removed non-existent vw_machine_relationships reference

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 17:04:54 -05:00
cproudlock
3bce4852db Update QUICK_REFERENCE.md for Phase 2 schema
- Rewrite Core Tables section for unified machines table
- Update PC/Equipment/Network device identification queries
- Add communications table (replaces pc_network_interfaces)
- Update column names (address not ipaddress, machineid not pcid)
- Update Important Views section with current views
- Fix SQL query examples for new schema
- Update file structure and resource references
- Update database credentials

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 17:02:18 -05:00
cproudlock
3457028513 Update API docs with 4 missing endpoints
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>
2025-12-11 16:58:09 -05:00
cproudlock
95bd2b591d Add printer lookup page and fiscal week theme styling
- 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>
2025-12-11 16:56:08 -05:00
cproudlock
94b421f73a Consolidate documentation: archive 45+ historical docs
- Move completed migration docs to docs/archive/
- Move session summaries to docs/archive/sessions/
- Rename API_ASP_DOCUMENTATION.md to docs/API.md
- Archive redundant Claude reference files
- Update docs/README.md as simplified index
- Reduce active docs from 45+ files to 8 essential files

Remaining docs:
- CLAUDE.md (AI context)
- TODO.md (task tracking)
- docs/README.md, API.md, QUICK_REFERENCE.md
- docs/ASP_DEVELOPMENT_GUIDE.md, STANDARDS.md

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 13:13:41 -05:00
cproudlock
4cdc2f0742 Clean up sql directory after production sync
- 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>
2025-12-11 12:33:49 -05:00
cproudlock
0e3371f458 Add database view consolidation and migrate legacy tables
- 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>
2025-12-11 11:16:48 -05:00
cproudlock
1f1bd8ee02 Remove legacy pc tables, fix ASP issues, update dashboard APIs
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>
2025-12-11 09:05:06 -05:00
cproudlock
e598f72616 Remove emojis from all markdown docs, add consolidation plan
- 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>
2025-12-11 07:42:52 -05:00
cproudlock
9fc3420716 Remove unused and backup ASP files
Cleanup:
- 41 backup/broken files (.backup*, .broken, .bak)
- 3 duplicate PC listing files (listpcs.asp, pclist.asp, pcs.asp)
- 6 unused utility files:
  - aspJSON.asp (test stub)
  - printerlookup.asp (unused, had SQL injection)
  - bulkupdatenotificationtypes.asp
  - cleanupduplicateprintersexecute.asp
  - checkprintermachinescount.asp
  - checkduplicateprinters.asp
- backup/ directory with old v2 design assets
- Include backup files (.production, .produciton typo)

Total: 69 files removed
2025-12-10 20:45:23 -05:00
cproudlock
249bfbba8c Standardize ASP filenames: remove underscores
Renamed 45 ASP files to follow lowercase concatenated naming convention:
- Direct handlers: save_machine_direct.asp -> savemachinedirect.asp
- USB files: checkin_usb.asp -> checkinusb.asp
- API files: api_usb.asp -> apiusb.asp
- Map files: network_map.asp -> networkmap.asp
- Printer files: printer_lookup.asp -> printerlookup.asp

Also:
- Updated 84+ internal references across all ASP and JS files
- Deleted 6 test/duplicate files (editmacine.asp, test_*.asp)
- Updated production migration guide with filename changes
- Added rename scripts for Linux (bash) and Windows (PowerShell)
2025-12-10 20:40:05 -05:00
cproudlock
6162db9fcf Fix compliance table column names (snake_case to camelCase)
Renamed columns in compliance and compliancescans tables:
- scan_date -> scandate
- deployment_notes -> deploymentnotes
- is_third_party_managed -> isthirdpartymanaged
- third_party_manager -> thirdpartymanager
- ot_asset_* -> otasset*
- is_compliant -> iscompliant
- compliance_notes -> compliancenotes
- scan_name -> scanname
- scan_result -> scanresult
- scan_details -> scandetails

Updated ASP files:
- displaymachine.asp, displaypc.asp - fixed column reads
- editmachine.asp, editpc.asp, editdevice.asp, machine_edit.asp - fixed column reads
- savemachineedit.asp, savemachine_direct.asp, updatedevice_direct.asp - fixed SQL

Updated production migration guide with new Step 4 for compliance columns.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 20:22:49 -05:00
cproudlock
aac39d8a9f Add comprehensive production migration guide for Dec 10, 2025 changes
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>
2025-12-10 20:12:47 -05:00
cproudlock
b4b81b850a Add equipment data sync for dualpath partner machines
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>
2025-12-10 20:09:56 -05:00
cproudlock
f8083be467 Add automatic controller propagation for dualpath machines
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>
2025-12-10 20:04:01 -05:00
cproudlock
30ea1bb42f Execute naming convention fix on dev - tables renamed, ASP updated
Database changes applied:
- machine_overrides -> machineoverrides
- pc_comm_config -> commconfig
- pc_dnc_config -> dncconfig
- pc_dualpath_assignments -> dualpathassignments
- pc_network_interfaces -> networkinterfaces
- usb_checkouts -> usbcheckouts

ASP files updated (10 files):
- api.asp, api_usb.asp
- displaypc.asp, displaysubnet.asp, displaymachine.asp
- displayusb.asp, displayprofile.asp
- usb_history.asp, savecheckin_usb.asp, savecheckout_usb.asp

9 views recreated with new table references.

Tested and verified working on dev environment.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 14:59:47 -05:00
cproudlock
946074148f Convert bash scripts to PowerShell for Windows production
- 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>
2025-12-10 14:50:42 -05:00
cproudlock
2894260235 Add database naming convention fix scripts
Scripts to standardize table names from snake_case to camelCase:
- machine_overrides -> machineoverrides
- pc_comm_config -> commconfig
- pc_dnc_config -> dncconfig
- pc_dualpath_assignments -> dualpathassignments
- pc_network_interfaces -> networkinterfaces
- usb_checkouts -> usbcheckouts

Includes:
- SQL scripts for table renames and view recreation
- ASP file update script
- Documentation update script
- Production deployment guide for Windows/IIS/MySQL 5.6

Related to Gitea Issue #1

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 14:48:40 -05:00