EquipmentTree¶
Hierarchy of equipment (site, area, unit, module) with a status per node, that the operator expands, collapses and selects (IND-119).

Recipes and plant structure · Widget catalog · API reference ·
schema equipmenttree.schema.json
Example¶
The traits of the picture above:
ai.EquipmentTree(
value="P-102",
label="EquipmentTree",
expanded=["Plant", "Plant/Mixing"],
nodes=[
{
"label": "Plant",
"level": "site",
"children": [
{
"label": "Mixing",
"level": "area",
"status": "normal",
"children": [
{"label": "Mixer M-101", "level": "unit", "status": "running"},
{
"id": "P-102",
"label": "Pump P-102",
"level": "equipment",
"status": "alarm",
},
{
"label": "Valve XV-103",
"level": "equipment",
"status": "maintenance",
},
],
},
{
"label": "Packing",
"level": "area",
"children": [
{"label": "Filler", "level": "unit", "status": "stopped"},
{"label": "Capper", "level": "unit", "status": "fault"},
],
},
],
},
{
"label": "Utilities",
"level": "area",
"status": "warning",
"children": [{"label": "Boiler", "level": "unit", "status": "offline"}],
},
],
size=(320, 240),
)
Traits¶
| Trait | Type | Default | Set by | Description |
|---|---|---|---|---|
mode |
"control", "indicator" |
"control" |
host | "control": the user sets the value; "indicator": display only. |
size |
array | [320,280] |
host | [width, height] in CSS pixels. |
value |
string | "" |
host, widget | Id of the selected node, empty for none. Set by the host, or by the operator selecting a node in control mode. |
nodes |
array of object | [] |
host | Root nodes, each {label, id, level, status, children}. Python rejects a node without a label, an unknown status or a repeated id; without a kernel such a node (and its children) is skipped. |
expanded |
array of string | [] |
host, widget | Ids of the expanded nodes. Set by the host, or by the operator expanding and collapsing nodes. |
show_level |
boolean | true |
host | Show the level of each node next to its label. |
Common traits (7), shared with other widgets
| Trait | Type | Default | Set by | Description |
|---|---|---|---|---|
label |
string | "" |
host | Plain text, never interpreted as HTML (SEC-002). |
disabled |
boolean | false |
host | Greyed out, input rejected. |
visible |
boolean | true |
host | |
tooltip |
string | "" |
host | Plain text shown on hover. |
style |
"modern", "classic", "system" |
"modern" |
host | |
theme |
"auto", "light", "dark", "system" |
"auto" |
host | "auto": the style decides; "system": the host page or the operating system (STYLE-007). |
skin |
object | {} |
host | Replaceable drawing parts: part name -> SVG source, sanitized (STYLE-005, STYLE-006). |
Set by: host, the program (Python, Julia, ...); widget, the user through the widget;
derived, computed from other traits by the host that owns the state, or by the widget.
See the trait contract.