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>
This commit is contained in:
189
docs/API.md
189
docs/API.md
@@ -906,6 +906,191 @@ Monitor these metrics:
|
||||
|
||||
---
|
||||
|
||||
## UDC Log Data Endpoints
|
||||
|
||||
These endpoints provide access to parsed UDC (Universal Data Collector) log data for management reporting.
|
||||
|
||||
### 5. `getUDCPartRuns`
|
||||
|
||||
**Purpose:** Get part run data with cycle times and measurement counts
|
||||
|
||||
**Method:** GET
|
||||
|
||||
**Parameters (all optional):**
|
||||
- `machinenumber` - Filter by machine number (e.g., "3110")
|
||||
- `startdate` - Start date filter (YYYY-MM-DD)
|
||||
- `enddate` - End date filter (YYYY-MM-DD)
|
||||
- `badgenumber` - Filter by operator badge
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"partruns": [
|
||||
{
|
||||
"partrunid": 123,
|
||||
"machinenumber": "3110",
|
||||
"partnumber": "4096525-725G01",
|
||||
"opernumber": "00602",
|
||||
"serialnumber": "FGB0T7LH",
|
||||
"programname": "03100042",
|
||||
"jobnumber": "8J2R4",
|
||||
"badgenumber": "020620BZ",
|
||||
"programstart": "11/19/2025 10:02:53 AM",
|
||||
"programend": "11/20/2025 2:05:16 AM",
|
||||
"cycletime": 57743,
|
||||
"changeover": 720,
|
||||
"measurementcount": 205,
|
||||
"manualcount": 25,
|
||||
"probecount": 180,
|
||||
"ootcount": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
curl "http://server/api.asp?action=getUDCPartRuns&machinenumber=3110&startdate=2025-11-01"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 6. `getUDCOperatorStats`
|
||||
|
||||
**Purpose:** Get aggregated operator statistics including average cycle times and manual response times
|
||||
|
||||
**Method:** GET
|
||||
|
||||
**Parameters (all optional):**
|
||||
- `startdate` - Start date filter (YYYY-MM-DD)
|
||||
- `enddate` - End date filter (YYYY-MM-DD)
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"operators": [
|
||||
{
|
||||
"badgenumber": "020620BZ",
|
||||
"partsrun": 156,
|
||||
"avgcycletime": 19347,
|
||||
"avgchangeover": 5000,
|
||||
"avgmanualtime": 245,
|
||||
"totalmeasurements": 27920,
|
||||
"totalmanual": 3500,
|
||||
"totaloot": 10,
|
||||
"firstrun": "11/1/2025 9:15:51 AM",
|
||||
"lastrun": "12/10/2025 6:54:28 AM"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
curl "http://server/api.asp?action=getUDCOperatorStats&startdate=2025-11-01&enddate=2025-12-31"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 7. `getUDCMachineStats`
|
||||
|
||||
**Purpose:** Get aggregated machine statistics including parts produced and OOT rates
|
||||
|
||||
**Method:** GET
|
||||
|
||||
**Parameters (all optional):**
|
||||
- `startdate` - Start date filter (YYYY-MM-DD)
|
||||
- `enddate` - End date filter (YYYY-MM-DD)
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"machines": [
|
||||
{
|
||||
"machinenumber": "4003",
|
||||
"partsrun": 156,
|
||||
"avgcycletime": 19347,
|
||||
"avgchangeover": 5000,
|
||||
"totalmeasurements": 27920,
|
||||
"totaloot": 10,
|
||||
"firstrun": "5/4/2025 9:15:51 AM",
|
||||
"lastrun": "6/17/2025 6:54:28 AM"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
curl "http://server/api.asp?action=getUDCMachineStats"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 8. `getUDCManualTiming`
|
||||
|
||||
**Purpose:** Get manual data entry response times (time from request prompt to operator entry)
|
||||
|
||||
**Method:** GET
|
||||
|
||||
**Parameters (all optional):**
|
||||
- `machinenumber` - Filter by machine number
|
||||
- `startdate` - Start date filter (YYYY-MM-DD)
|
||||
- `enddate` - End date filter (YYYY-MM-DD)
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"manualrequests": [
|
||||
{
|
||||
"requestid": 123,
|
||||
"badgenumber": "020620BZ",
|
||||
"machinenumber": "3110",
|
||||
"requesttime": "11/19/2025 10:00:27 AM",
|
||||
"responsetime": "11/19/2025 10:05:31 AM",
|
||||
"responseseconds": 304,
|
||||
"description": "GAGE CUT STG4 BLADE DROP"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
curl "http://server/api.asp?action=getUDCManualTiming&machinenumber=3110"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## UDC Data Import
|
||||
|
||||
UDC log files are imported using the Python parser at `/home/camp/projects/UDC/parser/udcparser.py`.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
# Import all log files from default directory
|
||||
python3 udcparser.py
|
||||
|
||||
# Import specific file
|
||||
python3 udcparser.py --file /path/to/UDC_Log_3110.log
|
||||
|
||||
# Specify custom directory
|
||||
python3 udcparser.py --dir /path/to/logs
|
||||
```
|
||||
|
||||
**Database Tables:**
|
||||
- `udcsessions` - Log file sessions
|
||||
- `udcparts` - Part runs with cycle times
|
||||
- `udcmeasurements` - Individual measurements (PROCESSDATA, TOOLDATA)
|
||||
- `udcevents` - Item crossings, messages
|
||||
- `udcmanualrequests` - Manual data entry timing
|
||||
|
||||
---
|
||||
|
||||
## Future Enhancements
|
||||
|
||||
### Planned Features:
|
||||
@@ -926,7 +1111,7 @@ Monitor these metrics:
|
||||
|
||||
---
|
||||
|
||||
**Version:** 1.1
|
||||
**Last Updated:** 2025-12-11
|
||||
**Version:** 1.2
|
||||
**Last Updated:** 2025-12-12
|
||||
**Maintained By:** ShopDB Development Team
|
||||
**Support:** Review `/logs/api.log` for troubleshooting
|
||||
|
||||
Reference in New Issue
Block a user