cproudlock a4051e381a fix: stop logging failures from silently breaking PC-machine relationships
Two related fixes in api.asp:

1. CreatePCMachineRelationship now archives stale Controls relationships in
   BOTH directions (Equipment->PC and the legacy PC->Equipment shape some
   prod rows use), so a self-registering PC cannot leave a stale controller
   active alongside its new link. Previously only the Equipment->PC direction
   was archived, leaving reversed legacy rows dangling.

2. LogToFile now clears Err before returning. It runs under On Error Resume
   Next; a failed write (logs dir not writable, disk full) left Err set, and
   CreatePCMachineRelationship tests Err.Number right after a LogToFile call,
   so a logging failure was misread as fatal and silently aborted relationship
   creation. Verified live: with the fix, updateCompleteAsset creates the PC,
   archives the reversed legacy relationship, and links the new PC.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 11:21:47 -04:00

ShopDB

Manufacturing shop floor infrastructure management system for GE Aerospace. Tracks machines, PCs, printers, and network devices.

Tech Stack

  • Backend: Classic ASP (VBScript)
  • Database: MySQL 5.6
  • Frontend: Bootstrap 4.6, jQuery, DataTables
  • Server: IIS on Windows

Features

  • Equipment inventory (CNC machines, lathes, mills, etc.)
  • PC asset tracking with warranty monitoring
  • Printer management with Zabbix integration
  • Network device tracking (switches, access points, cameras)
  • Knowledge base for troubleshooting
  • Interactive floor maps
  • REST API for PowerShell data collection

Quick Start

# Start dev environment
~/start-dev-env.sh

# Access application
http://192.168.122.151:8080

# Run tests
./tests/test_forms.sh

# Connect to MySQL
docker exec -it dev-mysql mysql -u root -prootpassword shopdb

Documentation

Document Purpose
CLAUDE.md AI assistant context
docs/QUICK_REFERENCE.md Cheat sheets, common queries
docs/API.md REST API documentation
docs/STANDARDS.md Coding standards

Database Schema

machines table (unified)
  ├── Equipment (machinetypeid 1-15)
  ├── PCs (pctypeid IS NOT NULL)
  └── Network Devices (machinetypeid 16-20)

printers table (separate)
communications table (network interfaces)
machinerelationships table (PC↔equipment links)

Testing

./tests/test_forms.sh    # 41 endpoint tests

Tests page loads, form submissions, and API endpoints.

License

Internal use - GE Aerospace

Description
No description provided
Readme 69 MiB
Languages
Classic ASP 51.9%
JavaScript 35.6%
CSS 8.7%
HTML 1.9%
Python 1%
Other 0.9%