04 Production Status

Build a production status dashboard with the ENLYZE API.

What You'll Learn

  • Build a multi-machine production overview

  • Display current production run information

  • Detect ongoing vs completed runs with JSONata

  • Create status indicator panels

  • Use row repeat for dynamic machine sections

Prerequisites

  • Completed Tutorial 4.2 (Querying the ENLYZE API)

  • Completed Tutorial 4.3 (Working with Variables)

  • Understanding of production-runs endpoint and JSONata


Overview

A production status dashboard gives operators and managers a quick overview of:

  • What's running – Current product on each machine

  • Production metrics – OEE, throughput, quantity

  • Run status – Ongoing or completed

  • Time information – When did the run start/end

This tutorial builds a dashboard showing multiple machines side-by-side.


Dashboard Design

Information Hierarchy

Level
Content
Panel Type

Overview

All machines at a glance

Table or stat panels

Per-Machine

Current run details

Stat + table

Detail

Full run history

Table with all runs

Layout Options

Option A: Side-by-side columns

  • Each machine in a column

  • Good for 2-4 machines

  • Easy comparison

Option B: Stacked rows

  • Each machine in a row

  • Better for 5+ machines

  • Can use row repeat

We'll use Option A for this tutorial.


Detecting Current Production Run

The key insight: if a production run has no end time, it's still running.

JSONata for Ongoing Detection

This adds an is_ongoing boolean field to each run.

Getting Only Current Run

To get only runs that are currently ongoing:

Or to get the most recent run (whether ongoing or not):

The API returns runs sorted by start time (most recent first by default).


Building the Dashboard

Step 1: Create Variables

First, create site and machine variables (as learned in Tutorial 4.3).

Or, for a fixed multi-machine dashboard, use constant variables:

Name
Type
Value

machine1_uuid

Constant

141e0927-62b3-4e76-8398-ad82d20f397f

machine1_name

Constant

Kiefel

machine2_uuid

Constant

cc0d2dcb-564b-48cd-a342-71765a536058

machine2_name

Constant

Macchi

Set Hide to "Variable" to keep them invisible to users.

[SCREENSHOT: Constant variables configuration]


Machine Status Section

Creating a Machine Header

Use a Text panel to display the machine name:

  1. Add panel -> Select Text visualization

  2. Set Mode to HTML

  3. Content:

[SCREENSHOT: Text panel with machine name]

Current Product Panel

Show what product is currently running:

Query:

Setting
Value

URL

production-runs?machine=${machine1_uuid}&start=${__from:date:iso}

Root selector

$.data[0].production_order

Panel Settings:

Setting
Value

Visualization

Stat

Text mode

Value

Color mode

None

[SCREENSHOT: Current product stat panel]

Run Status Indicator

Create a visual indicator for run status (ongoing vs completed):

Query:

Setting
Value

URL

production-runs?machine=${machine1_uuid}&start=${__from:date:iso}

Root selector

$.data[0].end = null ? "Running" : "Completed"

Panel Settings:

Setting
Value

Visualization

Stat

Color mode

Background

Value Mappings:

  • "Running" -> Green

  • "Completed" -> Blue

[SCREENSHOT: Run status indicator]


OEE Quick Stats

Show OEE metrics for the latest production run.

Productivity Stat

Setting
Value

URL

production-runs?machine=${machine1_uuid}&start=${__from:date:iso}&end=${__to:date:iso}

Root selector

$.data[0].productivity.score

Unit

Percent (0.0-1.0)

Min

0

Max

1

Thresholds

Red < 0.6, Yellow < 0.8, Green >= 0.8

Repeat for Availability, Performance, and Quality using:

  • $.data[0].availability.score

  • $.data[0].performance.score

  • $.data[0].quality.score

[SCREENSHOT: OEE stat panels row]


Production Run Details Table

Show more details about recent runs.

Query Configuration

Setting
Value

URL

production-runs?machine=${machine1_uuid}&start=${__from:date:iso}&end=${__to:date:iso}

Root selector

See JSONata below

JSONata for detailed run info:

Column Configuration

Selector
Title
Type

order

Order

String

start

Start

Timestamp

end

End

String

oee

OEE

Number

yield

Yield

Number

Field Overrides

  1. Start field: Unit = dateTimeAsIso

  2. OEE field: Unit = percentunit, Min = 0, Max = 1, Cell type = Gauge

[SCREENSHOT: Production runs table]


Multi-Machine Layout

Duplicating for Second Machine

  1. Select all panels for Machine 1

  2. Copy (Ctrl+C)

  3. Paste (Ctrl+V)

  4. Edit each panel to use ${machine2_uuid} and ${machine2_name}

  5. Position in the second column

Using Rows for Organization

Create collapsible rows for each machine:

  1. Add a Row panel

  2. Set title to ${machine1_name}

  3. Drag machine panels into the row

  4. Repeat for Machine 2

[SCREENSHOT: Multi-machine layout with rows]


Advanced: Row Repeat

For dashboards with many machines, use row repeat to automatically create a section for each machine.

Step 1: Create Machine Variable

Create a multi-value variable that returns all machines:

Setting
Value

Name

machine

Type

Query

URL

machines

Root selector

$.data

Columns

name, uuid

Multi-value

Enabled

Include All

Enabled

Step 2: Configure Row Repeat

  1. Create a row with panels for one machine

  2. Click the row title -> Row options

  3. Set Repeat for to machine

  4. Set Repeat direction to Vertical

[SCREENSHOT: Row repeat configuration]

Step 3: Use Variable in Panels

In each panel's query, use ${machine} for the machine UUID:

The row (with all its panels) will repeat for each selected machine.


Joining with Product Names

As learned in Tutorial 4.2, join production-runs with products to show product names:

Query A (Production Runs):

Query B (Products):

Transformations:

  1. Join by field: product_uuid, Mode: Outer

  2. Organize fields: Hide product_uuid, reorder columns


Complete Dashboard Layout

Here's the recommended layout for a 2-machine dashboard:

Each column is 12 units wide (half the dashboard width).

[SCREENSHOT: Complete production status dashboard]


Auto-Refresh for Live Monitoring

For shopfloor displays, enable auto-refresh:

  1. Click the time picker

  2. Select refresh interval (e.g., 30s, 1m, 5m)

  3. Or set in dashboard settings -> General -> Auto refresh

Recommended intervals:

  • Shopfloor display: 30s - 1m

  • Office monitoring: 5m

  • Historical analysis: Off


Practical Exercise

Build a production status dashboard with:

  1. Two machine sections (Kiefel and Macchi)

  2. Per machine:

    • Machine name header

    • Current order (stat panel)

    • Run status indicator (ongoing/completed)

    • Four OEE stat panels

    • Recent runs table with product names

  3. Dashboard settings:

    • Time range: Last 7 days

    • Auto-refresh: 1 minute


Summary

You've learned to build a production status dashboard:

  • Use constant variables for fixed machine configurations

  • Detect ongoing runs with JSONata ($not($exists(end)))

  • Create status indicators with value mappings

  • Display OEE metrics from production runs

  • Organize multi-machine views with rows

  • Use row repeat for dynamic machine sections


What's Next?

Continue with:

  • OEE Dashboard – Build aggregated OEE reports with the productivity-metrics endpoint


Quick Reference

Detecting Ongoing Runs

JSONata
Description

$not($exists($.data[0].end))

Check if latest run is ongoing

$.data[0].end = null ? "Running" : "Done"

Status text

$filter($.data, function($v){ $not($exists($v.end)) })

Filter to ongoing only

Constant Variables

Setting
Value

Type

Constant

Hide

Variable

Query

The fixed value

Production Status Query

Row Repeat Settings

Setting
Value

Repeat for

Variable name

Repeat direction

Vertical

Max per row

1 (for full-width rows)

Last updated