Equipment Hub
The Equipment Hub at /equipment is the single entry page for the operational view of your plant. One round-trip pulls everything: KPIs, work-center status, capacity heatmap, alerts, and today's preventive-maintenance schedule. Server-Sent Events (SSE) patch the view in real time as state changes on the floor.
When to use it
- Plant manager / shift lead: live status of every work center and critical asset, one screen.
- Operator on a floor tablet: quick glance at what's running, what's down, and what needs attention.
- Maintenance lead: at-a-glance view of overdue PMs, low-stock spare parts, and active breakdowns.
What you see
KPI strip (top row, 6 cards)
| KPI | What it means |
|---|---|
| Utilization | Today's average utilization across all CAPA-flagged work centers, from the most recent CapaSnapshot. |
| OEE | Today's planning OEE (the average oee_target_percent weighted by load). v1 uses the planning factor — measured OEE from quality data comes later. |
| Open Maintenance | Count of MaintenanceEvent rows where status is SCHEDULED or IN_PROGRESS. |
| Spare Parts Low | Count of items where is_spare_part = true and qty_on_hand ≤ safety_stock_qty. |
| Overdue PMs | Count of active MaintenanceSchedule rows where next_due_at < now(). |
| WCs at Risk | Count of work centers with utilization ≥ 100% on today's CapaSnapshot. |
Each KPI tile shows — when the underlying data isn't loaded yet (no snapshot, no data, or the module isn't enabled).
Equipment Status Board
Grid of work centers and their child assets, color-coded by runtime status:
- 🟢 RUNNING — currently producing
- 🟡 SETUP — changeover or warm-up
- ⚪ IDLE — operational but not producing
- 🔵 MAINTENANCE — taken down for planned maintenance
- 🔴 DOWN — unplanned downtime
A work-center card's status is the worst of its critical child assets — one critical asset going DOWN floors the whole work-center card. Non-critical asset issues don't propagate up.
Two view modes (toggle in the board header, persisted to localStorage):
- Leaf view — flat grid of every leaf asset. Best for shallow hierarchies.
- Rollup view — top-level (root) assets only; the badge shows
n descendants downwhen any descendant is non-green.
When an asset's status changes via SSE, its chip pulses for 2 seconds in the new color so the change is unmissable from a distance.
Capacity Heatmap (right column)
7-day × WorkCenter grid. Each cell is colored by utilization:
- Green: <85%
- Lime: 85–99%
- Yellow: 100–119%
- Red: ≥120%
Cells with material-shortage uncertainty get a diagonal-stripe overlay. The tooltip shows the exact utilization percent, risk level, and the bottleneck SKU if any.
Click any cell to drill into the Capacity Planner for that work center on that day.
Alerts Feed (bottom-left)
Live feed of SSE events. Each entry shows severity (INFO / WARNING / CRITICAL), type, and a one-line message:
maintenance_due/maintenance_overdue— a PM is approaching or past duespare_part_low_stock— anis_spare_partitem dropped below safety stockworkcenter_overloaded— a WC's snapshot flipped to overloadworkcenter_status_changed— a WC's runtime status changed (computed from children)asset_status_changed— an asset's runtime status changedworkorder_eta_slipped— an ETA shift pushed past the planned end date
The feed dedupes and orders newest-first. Click to drill into the relevant record.
Today's PM Schedule (bottom-right)
List of MaintenanceSchedule rows whose next_due_at falls within the next 7 days. Each row has a one-click Mark Done affordance that opens a popover for optional notes and immediately creates a MaintenanceEvent (status COMPLETE) + advances the schedule's last_done_at/next_due_at. See Preventive Maintenance.
How widgets are gated
| Widget | Requires |
|---|---|
| Hub shell + KPIs + Status Board + Alerts | EQUIPMENT_PERMITTED + equipment_read |
| Capacity Heatmap | CAPA_PERMITTED + capa_read |
| Today's PM Schedule | MAINTENANCE_PERMITTED + maintenance_read |
If a module is off, the widget renders an "Enable {Module}" empty-state card instead of disappearing — so admins know what they're missing.
Refresh model
- On mount: single
/equipment/hubround-trip fetches the composite snapshot. - Every 60s: background poll refetches the snapshot (in case SSE missed events).
- Real-time: SSE patches the in-memory state for any of the events listed above.
If /equipment/hub returns an error envelope (e.g. one of the underlying RPCs failed during a partial deploy), the page renders an empty state for the missing widgets — it does NOT abort the whole page.
Troubleshooting
| Symptom | Likely cause |
|---|---|
KPIs show — everywhere | No CapaSnapshot rows yet. Run the nightly cron (build-ms 02:00) or use the Capacity Planner's "Recompute" button on at least one WC. |
| Status board is empty | No assets have a work_center_id set. See Asset Management → Link to a Work Center. |
| Capacity heatmap shows "no snapshot" | Same — no CapaSnapshot rows. |
| No alerts ever appear | SSE not connected (network/proxy issue) OR no cron has run yet to generate maintenance_due / spare_part_low_stock events. |
| "Enable Capacity" card instead of heatmap | CAPA_PERMITTED is off for the tenant. See Permissions. |
Related
- Capacity Planner — drill into per-WC capacity detail
- Asset Management — set up the assets that appear on the status board
- Preventive Maintenance — create the PM plans that drive the alert feed