Appearance
Status Widget
Last updated
A colored badge or circle whose text and color come from an ordered list of rules — Running in green, Idle in amber, Fault in red.
Settings
| Setting | Description | Default |
|---|---|---|
| Shape | Badge (pill with text) or Circle (large pulsing dot with text below) | Badge |
| Status Rules | Ordered list of conditions, each with text and a color | five rules, below |
| Default Text (unmatched values) | Text when no rule matches | the raw value |
| Default Color | Color when no rule matches | gray |
Rules
Each rule has a condition, a value (two for between), the text to show and a color. Click Add to add one, ▲▼ to reorder and × to remove. The first matching rule wins.
| Condition | Matches when the value… |
|---|---|
| = equals | as text, is exactly the rule value. Case-sensitive: Running does not match running |
| ≠ not equals | as text, is not the rule value |
| > greater than, ≥ at least, < less than, ≤ at most | is a number and compares with the rule value |
| ↔ between | is a number from the first to the second value, inclusive |
| is true | is true or 1 |
| is false | is false, 0 or empty |
If a rule's text is empty, the raw value is shown in the rule's color.
A new Status widget starts with these rules, suitable for a boolean running bit or a lower-case state string:
| Condition | Value | Text | Color |
|---|---|---|---|
| equals | true | Running | green |
| equals | false | Stopped | gray |
| equals | running | Running | green |
| equals | idle | Idle | amber |
| equals | fault | Fault | red |
Delete the ones you don't need. Dashboards saved with older status settings (a text map or state map) are converted to this rule list when you open them.
Editing the rules as JSON
Click Edit as JSON above the rules to see and edit the whole list as text, which is quicker for a long state list or one copied from another widget. Click Apply to replace the rules with what is in the box; nothing changes until you do, and Edit as rows goes back to the row editor. Two shapes are accepted:
- The rule list itself, as shown in the box:
[{"condition": "eq", "value": "1", "label": "Running", "color": "#16a34a"}]. condition is one ofeq,ne,gt,lt,gte,lte,between(with value2),trueorfalse, and defaults toeq. A missing color is blue; a missing label shows the value. - A state map, value to text or to text and color:
{"0": "Stopped", "1": {"label": "Running", "color": "#16a34a"}, "2": "Idle"}. Each entry becomes an equals rule, in the order written, blue when no color is given.
If the text is not valid JSON, or a rule has an unknown condition, the box says why and the rules are left as they were.
Binding
The widget reads the binding named value.
Example: a PLC state code
A filler reports State as an integer. Rules:
| Condition | Value | Text | Color |
|---|---|---|---|
| equals | 0 | Stopped | gray |
| equals | 1 | Running | green |
| between | 2 / 9 | Starved / Blocked | amber |
| ≥ at least | 10 | Fault | red |
Default Text Unknown, Default Color purple, so a state nobody planned for stands out.