ci-server-engineer/.claude/skills/graphics/tasks/create-display.md
cliu ecf1f226f2 Knowledge: sample operator HMI findings (layouts, display XML, users), ISS-068..075
- layouts.md: tab set must be the last child of its frame set (web); desktop tab frames ignore
  zoom (navigate ... stretchDisplay); web activates the last tab loaded; web tab labels = display
  title; one layout command at a time; connectionState breaks the web layout (corrects 6.3);
  per-user layout verified on desktop and web
- create-display.md: new section "Writing display XML directly" (text size, rounding, arc angles
  clockwise on both clients, Clicked b1, web item attributes, asDateTime, server-side command as
  CIX_PROCESS with group OPERATOR, alarm overview columns / white area)
- deploy-displays.md: 8-display sample scripts; jwuiutl -v re-saves files
- trend.md: CIENG_TrendLab as history, cieng_feed.ps1, 50-pen hairline trade-off, component
  opaque, micro trend "Record not found" without history
- users-groups.md: PASSWORD "" for an empty password; sample user CIENG; open session blocks
  group removal (DSSSDA03 stopped)
- configure-audit.md, L25 / R30 / C50 summaries, SKILL.md, issues ISS-068..075, progress rows
- Every statement tested on CI Server R1.03.00 2026-10-02..06 (desktop and web, test display and
  test layouts removed afterwards)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 11:25:41 +11:00

83 lines
6.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
task: Build a display in the Edit Module and check the saved file
version: R1.03
source: IM 36K10C50-01EN §1.2, §1.7, §2, §4.8.1; practiced on CI-Eng-Sample (display CIENG_Tank) 2026-10-01; display XML written by the sample generator and checked on desktop and web 2026-10-02 to 2026-10-06 (installed web client code, component definitions in DEPLOY\components)
status: verified
---
# Build a display (Edit Module)
The user draws; Claude gives the steps and checks the result. The sample displays
`examples/CI-Eng-Sample/displays/CIENG_*.xml` are not drawn but written by a generator
(`displays/generator/`); *Writing display XML directly* lists the rules they follow.
## Steps for the user
1. Start the Edit Module and log in.
2. *File > New Display*, name `<DisplayName>`; tick **HTML display** if it should also run in a
browser (the editor then hides unsupported components and properties).
3. Add components from the component bar, for example:
- **Text** — title.
- **Number field** — in the Properties sheet click **Value**, open the connection dialog,
*Items* tab, pick `<Section>.<Tag>`.
- **Alarm Overview** — right-click > *Component Properties*; *Filter* tab for an ASA, section
or tag filter; *Types* tab for current/historical.
- **Trend** — component properties, pen 1 = `<Section>.<Tag>` (a new trend has 5 empty pens;
the item must be in a storage group).
4. *File > Save* (or *Save with Revision Information*). Close the tab when done: an open
display is locked (`<DisplayName>.lck`) and `jwuiutl` skips it.
## Check the saved file
Folder `%TLS_WAP_PATH%\cfg\operatorInterfaces\DEPLOY\displays\` (and with HTML mode also
`%TLS_WAP_PATH%\mobileoperator\operatorInterfaces\DEPLOY\displays\<DisplayName>.html`).
```
grep -n "<html>\|<width>\|<height>\|itemName\|itemId\|<source" <DisplayName>.xml
```
- `<html>true</html>` = HTML mode; `<width>`/`<height>` must be set for the HTML display.
- Item connections: `<itemName>` + `<itemId>` (node.group.number…); trend pens:
`<source type="sourceID" uri="ci:/item/<item>"/>` (`uri=""` = empty pen).
- Write a fixed value with a button (verified in the HTML display, buttons *Manual* / *Auto* on
the former `CIENG_Tank` and, since 2026-10-06, on `CIENG_Control`): `<button>` › `<data>` › `<action type="actionSetItemAttribute">` with
`<event type="event" event="On action"/>`, `<filter type="filter"><value>1.0</value></filter>`
and a `<connection>` with `<direction>2</direction>`, `<itemName>`, `<itemAttribute>ItemValue`
(the factory popups use `ItemValueOW`, presumably the overwrite variant like `itmval -o`; not tested). The factory popup `AOG_SetNumberPV` uses the
same action behind its *Apply* button.
- After the item is deleted and loaded again it gets a **new id**; the display still validates,
but on 2026-10-01 the HTML display showed **0** and the popup `ITM-E-NO_MAIN, No main item
found` for a number field whose stored `<itemId>` was stale, also in a fresh session. Deleting
the `<itemId>` line (keeping `<itemName>`) and redeploying fixed it: the field binds by name.
Sample displays therefore carry no `<itemId>`; for displays made in the Edit Module, reconnect
or remove the ids after reloading items (ISS-052).
## Writing display XML directly (verified 2026-10-02 to 2026-10-06)
The Edit Module stores one element per component (`<text>`, `<number>`, `<rectangle>`, `<arc>`,
`<button>`, `<slider>` …, names as in `DEPLOY\components\*.xml`), its position as centre plus half
sizes, and the connections in `<data>`. Files written by hand or by a script load in the Edit
Module, the Operator Interface and the HTML display, if these rules are kept (sample generator:
`examples/CI-Eng-Sample/displays/generator/`):
| Topic | Rule (R1.03.00) |
|---|---|
| Text / number size | With `<keepOriginalSize>false` the HTML export **scales the text to its box** (e.g. `scale(0.98, 3.80)` in a 40 px box); with `true` it is drawn at its font size, centred on the box (tested 2026-10-06) |
| Rectangle rounding | `roundingX` / `roundingY` are a **fraction 0..1** of the half width / height; values above 1 draw an ellipse, on the desktop and on the web (tested 2026-10-06) |
| Arc angles | `startAngle` / `extentAngle` in degrees **clockwise** from 3 o'clock (screen y down), negative values allowed; the same on both clients, fixed or connected (tested 2026-10-06: 0/90 = lower-right quarter) |
| Click on a shape | event `Clicked b1` (buttons: `On action`), e.g. an *Open display* action on a rectangle (2026-10-02) |
| Item attributes for the web | `ItemValue`, `ItemDesc`, `ItemStatusMnemonic`, `ItemUpdTime` (epoch seconds), `ItemHHL` / `ItemHL` / `ItemLL` / `ItemLLL` (limits), `ItemName` (micro trend pens), list in the web client code; `ItemDescription` does not exist (sample faceplate and Control tab, 2026-10-06) |
| Showing a time | number field with `<asDateTime>true` connected to `ItemUpdTime`; a `dateTimeField` shows the value on the web only when editable (2026-10-02/06) |
| Server-side command | `<action type="actionExecuteCommand">` with `<command>` and `<onServer>true</onServer>` runs on the CI Server node as the service account `CIX_PROCESS`, also from the web; a user in the factory group `OPERATOR` may use it (tested 2026-10-06, sample live-data *Start*) |
| Alarm overview | `autoFit` true in a tab that is hidden while loading squeezes all columns to ~0 px on the web: set `autoFit` false and give `column<Name>Width`; `column…Visible` for `AlarmAttribute` is an array property (a plain value fails the HTML export with `ClassCastException`); the empty part of the list stays **white** on both clients (no property; web: `jquery.dataTables.css` forces it); web rows are 20 px at a 14 px font (2026-10-02/06) |
## Verified (CIENG_Tank, 2026-10-01)
Text `CI-Eng-Sample Tank 1`, number field on `TANK1.LEVEL` (live: 72 → 61), alarm overview
(no filter; listed the TANK1.LEVEL alarms), trend pen `TANK1.LEVEL` (legend
`CI-Eng-Sample.TANK1.LEVEL [CIENG_SCAN10S]` = highest-priority storage group). In the HTML
display the trend drew no line: a trend needs 50 visible pens to draw on the web (ISS-041;
workaround and all trend settings in `trend.md`). The sample file is now padded with
`add_trend_spares.ps1` (49 spares) and draws in the browser too. `CIENG_Tank` was replaced by the
generated `CIENG_*` displays on 2026-10-06; they carry no `<itemId>` and found the recreated items
after a full `remove.cmd` / `load.cmd` cycle in a fresh session (2026-10-06).