caqtDM Web Documentation, first try

This commit is contained in:
brands committed 2026-11-25 13:10:31 +01:00
1 parent d7b8aabd44
commit 087480db5d
16 files changed
+876

No files matched your search

@@ -0,0 +1,322 @@
---
title: caQtDM Web – Administration at PSI
tags:
- SLS
- PROSCAN
- SwissFEL
- HIPA
---
# caQtDM Web – Administration at PSI
Audience: administrators of the PSI caQtDM Web servers (controls group).
As of 2026-11-25, caQtDM Web V4.9.0.
This document covers the PSI-specific setup: the Gitea repositories and images, the Podman installation on the servers, the configuration of the CAS instances, the systemd units, pitfalls seen during commissioning and the Podman commands for debugging. The generic architecture, the build and the configuration reference are in «caQtDM Web – Architecture and Setup».
## 1. Repositories and images
| What | Where |
|---|---|
| Deployment files (compose files, nginx template, systemd units, overview page) | `git@gitea.psi.ch:caqtdm-web/caqtdm-deployment-files.git`, branch `main` |
| caQtDM sources incl. the web client and the Dockerfiles | GitHub `caqtdm/caqtdm`, submodule `caQtDM_Web` |
| Release builds for deployment | <https://gitea.psi.ch/caqtdm-release> (release branch, tagged versions) |
| caQtDM Web image | `gitea.psi.ch/caqtdm-web/caqtdm:latest` |
| nginx image | `gitea.psi.ch/caqtdm-web/nginx:latest` |
The source code of caQtDM lives on GitHub. The Gitea organisations at PSI are used for development and for building the packages and images for deployment internally; in particular <https://gitea.psi.ch/caqtdm-release> builds the release branch from its tags. The web images are built from `caQtDM_Web/docker/caqtdm/Dockerfile` and `caQtDM_Web/docker/nginx/Dockerfile` and pushed to the Gitea registry. We are still in development, so the deployment uses the `:latest` tag. The registry also keeps date-stamped tags (`YYYYMMDD-<commit>`); pin one of those in the compose file if a server must stay on a known version.
### 1.1 Registry login and the read-only token
The service user on the servers (`svcusr-gfa_bigscr`) is not a Gitea user and cannot own tokens. Image pulls and the clone of the deployment repository therefore use a **general read-only token**. It was deliberately created so that an installation service can read images and the deployment repository, and nothing else. Its value is kept in the `README.md` of the deployment repository and is written as `<TOKEN>` here.
```bash
podman login gitea.psi.ch -u <gitea-user> -p <TOKEN>
podman pull gitea.psi.ch/caqtdm-web/caqtdm:latest
podman pull gitea.psi.ch/caqtdm-web/nginx:latest
git clone https://<TOKEN>@gitea.psi.ch/caqtdm-web/caqtdm-deployment-files.git
```
Note: `podman system reset` deletes the stored login as well; log in again afterwards.
## 2. Files in the deployment repository
| File | Purpose |
|---|---|
| `README.md` | Installation notes of the controls group (source of most of this part). |
| `compose.cas.yaml` | **The CAS stack** on `cas-novnc-srv-00.psi.ch`: one nginx plus eight caQtDM containers on a bridge network, the setup users see as «CAS caQtDM Web Overview». |
| `compose.sls.yaml`, `compose.swissfel.yaml`, `compose.hipa.yaml`, `compose.proscan.yaml` | Older **single-facility stacks** for big screens: one nginx plus one caQtDM container with `network_mode: host`, IOC subnets by broadcast address, virtual screen 3840×2160. |
| `compose.sls-vac.yaml`, `compose.swissfel-vac.yaml`, `compose.sls-neg.yaml` | Single-facility vacuum/NEG stacks with nginx basic auth (`BASIC_AUTH_USER`/`BASIC_AUTH_PASSWORD`). |
| `compose.panelgen.yaml`, `caQtDM_Web_Links.md` | Local test stack for generated panels (bound to `127.0.0.1`), not tracked in git. |
| `caqtdm_web_subroutes.conf.template` | nginx configuration template for the multi-instance routing. Mounted into the nginx container. |
| `<stack>-compose.service` | systemd units, one per stack (`cas`, `sls`, `swissfel`, `hipa`, `proscan`, `sls-vac`, `sls-neg`, `swissfel-vac`). |
| `gencert.sh` | Creates the self-signed `caqtdm_web.crt` / `caqtdm_web.key` (`CN=$HOST`, valid 31415 days). The certificate files are not committed. |
| `gateway.access` | Example access file for a CA gateway; not referenced by any compose file. |
| `static-page/` | Overview page: `index.html`, `routes.json`, `routes.js`, `styles.css`, logos. |
Differences between the two generations of stacks:
| | CAS stack (`compose.cas.yaml`) | Single-facility stacks |
|---|---|---|
| Network | Bridge network `caqtdm-web`; nginx routes by path | caQtDM on the host network, nginx via `slirp4netns`, `PROXY_BACKEND=http://10.0.2.2` |
| PV access | Through the facility CA gateway (`*-cagw.psi.ch:5062`) | Direct broadcast to the IOC subnets plus beamline gateways |
| Instances | Eight, selected by URL path | One, at `/` |
| caQtDM arguments | `ENTRY_PANEL` + `EXTRA_ARGS` | Explicit `command:` line |
| Mode | Four read-only, four read-write | Read-write |
## 3. The CAS instances (`compose.cas.yaml`)
nginx service:
```yaml
environment:
CAQTDM_DEFAULT_ROUTE: sls/
CAQTDM_DEFAULT_BACKEND: caqtdm-sls
CAQTDM_PATH_MAP: |
~^/sls/ caqtdm-sls;
~^/swissfel/ caqtdm-swissfel;
~^/hipa/ caqtdm-hipa;
~^/proscan/ caqtdm-proscan;
~^/sf-plc-vcs/ caqtdm-swissfel-plc-vcs;
~^/sf-vac-expert/ caqtdm-swissfel-vac;
~^/sls-vac-expert/ caqtdm-sls-vac;
~^/sf-drps-expert/ caqtdm-swissfel-drps;
volumes:
- ./caqtdm_web_subroutes.conf.template:/etc/nginx/templates/caqtdm_web.conf.template:ro
- ./caqtdm_web.crt:/etc/nginx/ssl/caqtdm_web.crt:ro
- ./caqtdm_web.key:/etc/nginx/ssl/caqtdm_web.key:ro
- ./static-page:/var/www/caqtdm_web/static:ro
```
The per-route basic auth for the read-write instances is prepared in the file but commented out; all routes are open on purpose. Read-write only means that the panel can be operated (sub-panels opened, tabs switched); on the EPICS side the instances stay read-only through the gateway.
caQtDM services:
| Route | Service | Mode | Launcher root | `ENTRY_PANEL` | Gateway |
|---|---|---|---|---|---|
| `/sls/` | `caqtdm-sls` | ro | `SLS.json` | `A_OP_StatusDisplay.ui` | `sls-cagw.psi.ch:5062` |
| `/swissfel/` | `caqtdm-swissfel` | ro | `S_.json` | `S_OP_overview.ui` | `sf-cagw.psi.ch:5062` |
| `/hipa/` | `caqtdm-hipa` | ro | `Z_.json` | `Z_OP_hipa-status.ui` | `hipa-cagw.psi.ch:5062` |
| `/proscan/` | `caqtdm-proscan` | ro | `P_.json` | `proscan-status.ui` | `proscan-cagw.psi.ch:5062` |
| `/sf-plc-vcs/` | `caqtdm-swissfel-plc-vcs` | rw | `S_.json` | `S_PLC_VCS_Diagnose_Main.ui` | `sf-cagw.psi.ch:5062` |
| `/sf-vac-expert/` | `caqtdm-swissfel-vac` | rw | `S_.json` | `S_VCS_SwissFEL-Expert_1.ui` | `sf-cagw.psi.ch:5062` |
| `/sls-vac-expert/` | `caqtdm-sls-vac` | rw | `SLS.json` | `A_VCS_SLS.ui` | `sls-cagw.psi.ch:5062` |
| `/sf-drps-expert/` | `caqtdm-swissfel-drps` | rw | `S_.json` | `S_DRPS_overview_all.ui` | `sf-cagw.psi.ch:5062` |
Read-only means `EXTRA_ARGS` contains `-novnc_readonly`. All instances use `-web_timeout 76`.
Environment common to all eight:
```yaml
- TZ=Europe/Zurich
- EPICS_CA_MAX_ARRAY_BYTES=40000000
- EPICS_CA_AUTO_ADDR_LIST=NO
- QT_LOGGING_RULES=default.debug=true # DRPS: caqtdm.*.debug=true plus CAQTDM_LOGGING_CONSOLE_VERBOSE=1
```
Panels and launchers come from NFS, mounted read-only from `/net/gfa05/export/<facility>/<group>/config/qt` and `…/config/launcher` (plus `ioc/qt` and `ioc/modules/qt`) to the same paths without the `/net/gfa05/export/<facility>` prefix. `CAQTDM_DISPLAY_PATH` lists the mounted `qt` directories and the `op/config/launcher` directory (SwissFEL also `plc/config/launcher`), for example for SwissFEL:
```
/sf/op/config/qt:/sf/bd/config/qt:/sf/diag/config/qt:/sf/id/config/qt:/sf/laser/config/qt:/sf/mag/config/qt:/sf/photo/config/qt:/sf/plc/config/qt:/sf/rf/config/qt:/sf/ts/config/qt:/sf/vcs/config/qt:/sf/controls/config/qt:/ioc/modules/qt:/ioc/qt:/sf/op/config/launcher:/sf/plc/config/launcher
```
Three things must agree when you add or rename an instance:
1. the service name and its line in `CAQTDM_PATH_MAP`,
2. the entry in `static-page/routes.json` (`name`, `path`, `mode`),
3. the mounts and `CAQTDM_DISPLAY_PATH` of the service.
## 4. Preparing a server (Podman)
Target: RHEL-like host, rootless Podman, service user `svcusr-gfa_bigscr` (uid 45874; the vacuum stacks run as `gac-gfa_vac`).
```bash
sudo dnf install podman podman-compose
```
Allow the rootless user to bind ports 80 and 443:
```bash
echo 'net.ipv4.ip_unprivileged_port_start=80' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
```
Give the service user a persistent runtime directory. Without this, Podman falls back to `/tmp/storage-run-<uid>` and gets into an inconsistent state after a while («weird podman state», see pitfalls):
```bash
sudo loginctl enable-linger svcusr-gfa_bigscr
loginctl show-user svcusr-gfa_bigscr -p Linger -p RuntimePath # expect Linger=yes, RuntimePath=/run/user/45874
```
In the service user's `~/.bash_profile`:
```bash
export XDG_RUNTIME_DIR="/run/user/$(id -u)"
```
Then, as the service user:
```bash
sudo -u svcusr-gfa_bigscr -i
systemctl --user enable --now podman.socket
podman login gitea.psi.ch -u <gitea-user> -p <TOKEN>
git clone https://<TOKEN>@gitea.psi.ch/caqtdm-web/caqtdm-deployment-files.git
cd caqtdm-deployment-files
HOST=$(hostname -f) ./gencert.sh
```
Make sure the NFS exports under `/net/gfa05/export/…` are mounted on the host (automounter) before the containers start; Podman bind-mounts them read-only.
## 5. Installing a stack as a systemd service
Example for the CAS stack (replace `cas` by `hipa`, `swissfel`, … for the others):
```bash
sudo cp cas-compose.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable cas-compose.service
```
First run by hand as the service user, to pull the images and see the output:
```bash
sudo -u svcusr-gfa_bigscr -i
cd caqtdm-deployment-files
podman-compose --file compose.cas.yaml up -d
podman ps
podman-compose --file compose.cas.yaml down
exit
```
Then start the service:
```bash
sudo systemctl start cas-compose.service
sudo systemctl status cas-compose.service
```
What the unit does (`cas-compose.service`):
| Directive | Effect |
|---|---|
| `WorkingDirectory=/home/svcusr-gfa_bigscr/caqtdm-deployment-files` | compose file and certificates are taken from the clone. |
| `ExecStartPre=-rm -rf /tmp/storage-run-45874` | Removes a stale fallback runtime directory before each start. |
| `ExecStart=/usr/bin/podman-compose --file compose.cas.yaml up` | Foreground; container output goes to the journal. |
| `ExecStop=… down`, `ExecStopPost=/usr/bin/podman system prune -f` | Removes stopped containers and dangling images on stop. |
| `Restart=always`, `TimeoutStartSec=240`, `KillMode=mixed` | Restarts the stack after any exit. |
| `User=svcusr-gfa_bigscr` | Rootless Podman. |
`swissfel-compose.service` differs: it sets `Environment=XDG_RUNTIME_DIR=/run/user/45874`, `RestartSec=5` and `TimeoutStopSec=240`, and has no `rm -rf` and no prune step.
The systemd units with rootless Podman are a pragmatic solution for the current servers. A clean Kubernetes installation would be the better long-term basis for running these stacks.
## 6. Rolling out a new caQtDM version
```bash
sudo -u svcusr-gfa_bigscr -i
podman pull gitea.psi.ch/caqtdm-web/caqtdm:latest
podman pull gitea.psi.ch/caqtdm-web/nginx:latest
exit
sudo systemctl restart cas-compose.service
```
Check: open an instance in the browser; the menu bar shows the new version string (`V4.9.0 Build=<date>`). Open the Logs window and a launcher entry. All users of the stack lose their session during the restart and have to reload.
If stability matters more than being current, replace `:latest` in the compose file by a date-stamped tag from the registry and commit that change to the deployment repository.
## 7. Pitfalls during commissioning
| Symptom | Cause | Fix |
|---|---|---|
| nginx cannot bind port 80/443 as the service user. | Rootless Podman may not use ports below 1024. | `net.ipv4.ip_unprivileged_port_start=80` in `/etc/sysctl.conf`. |
| Containers hang, `podman ps` lists them but they do not respond; stack cannot be restarted («weird podman state»). | Service user without linger session; Podman used `/tmp/storage-run-<uid>` as runtime dir. | `loginctl enable-linger`, `XDG_RUNTIME_DIR=/run/user/<uid>` in the profile and in the unit, delete `/tmp/storage-run-<uid>/containers` and `…/libpod/tmp`, `podman system reset`, log in to the registry again. |
| Panels show no values; `caget` from inside the container times out. | Broadcast does not leave the container network; `EPICS_CA_ADDR_LIST` empty or wrong. | `EPICS_CA_AUTO_ADDR_LIST=NO` and the gateway (`<facility>-cagw.psi.ch:5062`) in `EPICS_CA_ADDR_LIST`. |
| Container exits immediately. | Launcher file or `ENTRY_PANEL` not found; or, with an explicit `command:`, `-novnc_readonly` placed before `-novnc`. | Read `podman logs` of the container, check `CAQTDM_DISPLAY_PATH` and the mounts. In the CAS stack the image's `CMD` already puts `-server -novnc` before `EXTRA_ARGS`, so the order problem only occurs in hand-written `command:` lines. |
| `caQtDM -- Invalid web timeout … (min. 76s), disabling` in the log; idle panels stay alive for 30 minutes. | `-web_timeout` below 76 seconds. | Use 76 or more. |
| Launcher button missing in the menu bar. | `-web_launcher_root_file` missing, or the JSON could not be parsed, or it has an empty `menu`. | Look for the launcher messages in `podman logs`; check the file with a JSON validator. |
| Tile on the overview page opens a different facility or a 404. | `routes.json` and `CAQTDM_PATH_MAP` out of sync. | Keep the three places listed at the end of chapter 3 in sync. |
| nginx container exits with a certificate error. | `caqtdm_web.crt` / `.key` missing in the working directory. | Run `HOST=$(hostname -f) ./gencert.sh` as the service user. |
| Read-write instance is reachable without a password. | By design: read-write is needed to operate the panel (open sub-panels); on the EPICS side the instance is still read-only through the gateway. | Nothing to fix. If a password is ever wanted, enable the `BASIC_AUTH_PATH_MAP` block in `compose.cas.yaml` and set `BASIC_AUTH_USER_<KEY>` / `BASIC_AUTH_PASSWORD_<KEY>` (values stay out of git). |
| `/admin/` shows `Status: closed (code 1006)`. | The admin page is a placeholder in the nginx image with no server counterpart; nothing serves `/instance/0/admin`. | Nothing to fix. Ignore the page. |
| NFS panels not found after a reboot. | Automounter not yet active when the stack started. | `After=network-online.target` is set; if it recurs, add a dependency on the automount unit or restart the stack. |
## 8. Podman commands for debugging
As the service user (`sudo -u svcusr-gfa_bigscr -i`):
```bash
podman ps -a # containers of the stack
podman ps -a --sync # same, but re-synchronised with the runtime (use when the normal list looks wrong)
podman logs -f <container> # live log of nginx or one caQtDM instance
podman inspect <container> # mounts, environment, network
podman exec -it <container> sh # shell inside a container
ss -ltnp # listening ports on the host (80, 443)
pgrep -a conmon # one conmon per running container
journalctl -u cas-compose.service -f # output of the whole stack via systemd
```
Inside a caQtDM container:
```bash
echo $CAQTDM_DISPLAY_PATH
ls /sf/op/config/qt | head # are the NFS mounts there?
ls /sf/op/config/launcher/S_.json # is the launcher file there?
ps aux | grep caQtDM # main process plus one child per open panel
/opt/epics/bin/*/caget <PV> # Channel Access through the gateway
```
Recovering a broken stack (SwissFEL as example). Container names are `<project>_<service>_1`, where the project is the `name:` of the compose file (`caqtdm-swissfel` for SwissFEL). Compose files without `name:`, such as `compose.cas.yaml`, use the directory name instead, so the CAS containers are called `caqtdm-deployment-files_nginx_1`, `caqtdm-deployment-files_caqtdm-sls_1` and so on:
```bash
sudo systemctl stop swissfel-compose
sudo -u svcusr-gfa_bigscr -i
podman ps -a # take the real container names from here
podman container cleanup caqtdm-swissfel_caqtdm_1 caqtdm-swissfel_nginx_1
exit
sudo systemctl start swissfel-compose
```
Last resort, only if the cleanup fails (this throws away all container state of the user):
```bash
sudo -u svcusr-gfa_bigscr rm -rf /run/user/45874/containers
sudo reboot now
```
Image housekeeping:
```bash
podman images
podman rmi gitea.psi.ch/caqtdm-web/caqtdm:latest # remove an image (re-pull afterwards)
podman system prune -f # remove stopped containers and dangling images
podman system reset # wipe everything incl. the registry login
```
## 9. Reading the caQtDM logs
Each caQtDM container writes to its stdout, so `podman logs -f <container>` (or the journal of the systemd unit) is the place to look. The CAS instances run with `QT_LOGGING_RULES=default.debug=true`; `caqtdm.*.debug=true` plus `CAQTDM_LOGGING_CONSOLE_VERBOSE=1` (as on the DRPS instance) gives the most detail: control messages, child-process starts with their arguments and port assignments, timeouts and launcher parsing.
The control messages between browser and server are plain text, fields separated by `|`. The ones you will meet in the log:
| Message | Direction | Meaning |
|---|---|---|
| `VERSION\|V4.9.0 Build=…` | server → browser | Version shown in the menu bar. |
| `USERS\|n` | server → all | Number of browsers on this process («Users: n»). |
| `LAUNCHER\|{json}` | server → browser | Launcher menu definition. |
| `INTERACTIVE\|true/false` | server → browser | Sets the RW/RO badge. |
| `INIT_PROGRESS\|…`, `PROGRESS\|n` | server → all | Loading progress bar. |
| `LOG\|text` | server → all | Entry for the Logs window. |
| `OPEN\|path\|macros` | server → all | Related display: «open in new tab?» dialog. |
| `RESOLVE\|path\|macros` | browser → main | Ask for a panel; answered with `INSTANCE\|vncPort\|webPort`. |
| `SELECT_LAUNCHER\|file` | browser → server | Switch launcher for this browser only. |
| `PING` / `PONG` | both | Heartbeat every 50 s. |
## 10. Typical fault pictures seen by users
| What the user sees | Likely cause | Where to look |
|---|---|---|
| «Connection lost. Reconnecting...» and it never comes back | Stack restarted, or the panel's child process ended (timeout) and the page was not reloaded | `systemctl status`, `podman logs` of the instance; ask the user to reload |
| «Maximum instance limit reached» | More than `-web_instance_limit` panels open on one instance (default 1000) | `ps aux` in the container; raise the limit or lower `-web_timeout` |
| Panel stays on «Loading» or the Logs window reports a missing file | File not in `CAQTDM_DISPLAY_PATH`, NFS mount missing, or wrong name in the launcher/URL | `podman exec … ls`, `podman logs` |
| Version in the menu bar is old after an update | Image not pulled, or the stack was not recreated | `podman images`, restart the service |
| «Users: 1» although several people are looking | Each panel+macro combination has its own count; others may be on a different panel | Expected behaviour (see «User Guide», chapter 3) |
| Widgets white / no values on one instance only | Gateway of that facility unreachable | `caget` from inside the container, check `EPICS_CA_ADDR_LIST` |
@@ -0,0 +1,234 @@
---
title: caQtDM Web – Architecture and Setup
tags:
- SLS
- PROSCAN
- SwissFEL
- HIPA
---
# caQtDM Web – Architecture and Setup
Audience: people who want to understand how caQtDM Web is built, or who want to run their own server.
As of 2026-11-25, caQtDM Web V4.9.0.
«caQtDM Web – Administration at PSI» describes the PSI-specific installation on `cas-novnc-srv-00.psi.ch` (Podman, systemd, Gitea). This document is generic.
## 1. Architecture
### 1.1 Components
![Components of a caQtDM Web server](images/12_architecture.svg)
- **nginx** is the only component reachable from outside. It serves the static files (overview page, the web client `user/`, the URL Builder) and proxies the WebSocket connections to the right caQtDM container, based on the first path segment of the URL.
- **One caQtDM container per instance.** Each container runs the caQtDM viewer in server mode with its own start panel, launcher, panel directories and EPICS environment. An instance is what a user sees as `/sls/`, `/swissfel/` and so on.
- **CA gateway.** Inside a container network, Channel Access broadcasts do not reach the IOCs. Each container therefore talks to a Channel Access gateway (or to IOCs by unicast address) through `EPICS_CA_ADDR_LIST`.
### 1.2 Process model inside one instance
![Process model inside one instance](images/13_process_model.svg)
- The **main process** shows the start panel (`ENTRY_PANEL`). It listens on two ports: a **control WebSocket** (default 30000) and the **VNC/RFB WebSocket** of the qnovnc platform plugin (default 30001).
- When a browser asks for another panel (launcher entry, URL with `?path=`, related display), the main process starts a **child process** for that panel with `-slave_server`. The child is keyed by absolute file path plus macros; a second request for the same combination joins the existing child instead of starting another.
- Every process takes **two ports from a pool of 30000–39999** (control and VNC). The reverse proxy forwards `/<instance>/websockify/<port>` to that port on the right container.
- A child process ends when no browser has been connected to it for `-web_timeout` seconds (with `-web_interaction_timeout`: when nobody has interacted for that long). The main process never ends on its own.
- **All browsers connected to one process share one framebuffer and one input queue.** This is why every viewer of a panel sees the same thing and why related displays pop up a dialog for everybody.
### 1.3 URL scheme
| URL | Served by |
|---|---|
| `/` | Overview page (static, `static-page/index.html` + `routes.json`). |
| `/<instance>/` | The web client (`user/index.html`). |
| `/<instance>/?path=<file>&macros=K:V,…[&display]` | Web client opening a specific panel. |
| `/<instance>/url-builder/` | URL Builder for that instance. |
| `/<instance>/websockify/3NNNN` | WebSocket, proxied to port `3NNNN` of that instance's container. |
| `/admin/` | Static placeholder page without a server counterpart (see «Administration at PSI», pitfalls). |
The instance name is an arbitrary first path segment; nginx maps it to a container through `CAQTDM_PATH_MAP`. Reserved segments are `url-builder`, `noVNC`, `admin`, `websockify` and `static`.
## 2. A special build of caQtDM
caQtDM Web is **not** a regular caQtDM package with a web option switched on. Two things are required that the normal caQtDM packages do not contain:
1. **caQtDM compiled with `CAQTDM_WEB=1`.** This build flag adds the server-side code: the control WebSocket server, the launcher manager, the port pool, the child-process management and the web-specific behaviour (no printing, no tooltips, disabled shell commands). The Docker build additionally sets `CAQTDM_MODBUS=1` and `CAQTDM_GPS=1` and compiles against Qt 6.
2. **The qnovnc Qt platform plugin** (`libqnovnc.so`, from <https://github.com/caqtdm/qnovnc-platform-plugin>, built with CMake and installed into Qt's `plugins/platforms/` directory). With `-server -novnc`, caQtDM sets `QT_QPA_PLATFORM` to this plugin, which renders the panel into a virtual framebuffer and serves it over RFB/WebSocket. Without the plugin, server mode does not start.
Both parts exist **only in the Docker image `caqtdm-web/caqtdm`**, built from `caQtDM_Web/docker/caqtdm/Dockerfile` in the caQtDM source tree. The RPM, DEB, AppImage, macOS and Windows packages of caQtDM are built without `CAQTDM_WEB` and ship no qnovnc plugin. If you want caQtDM Web, use the container image.
Build stage of that Dockerfile, for reference:
| Step | Detail |
|---|---|
| Base | `alpine:latest`, Qt 6 packages from Alpine (qtbase, qttools, qt5compat, qtwebsockets, qtsvg, qtpositioning, qtlocation, qtserialbus, qtimageformats, qwt). |
| EPICS Base | `R7.0.10`, cloned from GitHub and built into `/opt/epics`. |
| caQtDM | `qmake6 all.pro && make` with `CAQTDM_WEB=1`, `CAQTDM_MODBUS=1`, `CAQTDM_GPS=1`, Qwt 6.1, Python 3, ZeroMQ; installed to `/opt/caqtdm/lib/qt6`. |
| qnovnc plugin | Cloned from GitHub, `cmake --build … --target install`, copied to `/usr/lib/qt6/plugins/platforms/libqnovnc.so`. |
| Runtime image | Alpine with the Qt 6 runtime libraries, fonts (DejaVu, Lucida Sans Typewriter), `caQtDM_Tests/` as `/opt/caqtdm/caqtdm_tests`. |
## 3. The containers
| Container | Image | Task | Ports | Volumes |
|---|---|---|---|---|
| **nginx** | `caqtdm-web/nginx` (based on `nginx:mainline-alpine`) | Reverse proxy, static files (`user/`, `admin/`, overview page), TLS termination, optional basic auth. | 80, 443 | nginx template, certificate and key, `static-page/` (overview page). |
| **caqtdm** (one per instance) | `caqtdm-web/caqtdm` | Runs `caQtDM -server -novnc -host 0.0.0.0 $EXTRA_ARGS $ENTRY_PANEL`. Renders the panels, serves the WebSockets. | none published (30000–39999 inside the container network only) | Panel and launcher directories, read-only. |
| **gateway** (optional) | `caqtdm-web/gateway` (Debian, EPICS Base R7.0.10, PCAS, ca-gateway) | Channel Access gateway on the host network, so that containers can reach IOCs that are only reachable by broadcast. | 5062 on the host network | `gateway.access` |
Where the images come from:
- Source: `caQtDM_Web/docker/{caqtdm,nginx,gateway}/Dockerfile` in the caQtDM repository (`caQtDM_Web` is a git submodule; clone with `--recursive`).
- `caQtDM_Web/docker/compose.yaml` builds a single instance with the gateway, `compose.multi.yaml` builds two instances behind one nginx.
- The images used at PSI are built internally on Gitea from these Dockerfiles and pushed to `gitea.psi.ch/caqtdm-web/` (see «Administration at PSI»).
What the nginx image does at start (entrypoint hooks in `docker/nginx/`):
- `12-basic-auth_htpasswd.sh` creates `.htpasswd` files from `BASIC_AUTH_USER`/`BASIC_AUTH_PASSWORD` or from the per-route map.
- `13-basic-auth_config.envsh` turns those into the `AUTH_CONFIG`, `CAQTDM_AUTH_FILE_MAP` and `CAQTDM_AUTH_REALM_MAP` placeholders of the template.
- `15-local-resolvers.envsh` fills `DNS_SERVER` so that nginx can resolve container names at request time.
- A self-signed certificate for `INSTALL_HOSTNAME` (valid one year) is generated at image build time; mount your own to replace it.
## 4. Configuration reference
### 4.1 caQtDM command-line options for web mode
Passed through `EXTRA_ARGS` in the container. `-server -novnc -host 0.0.0.0` and the entry panel are added by the image's `CMD`.
| Option | Meaning | Notes / default |
|---|---|---|
| `-server` | Run as web server. Forces the Fusion theme; a `.ui` file argument is required. | Required. |
| `-novnc` | Use the qnovnc platform plugin. | Required. |
| `-novnc_readonly` | Read-only instance: the plugin drops all mouse and keyboard events. | **Must come after `-novnc`**, otherwise caQtDM exits. Passed on to child processes. |
| `-slave_server` | Child-process mode: no `RESOLVE` handling, starts no further processes. | Internal; set automatically for children. |
| `-server_port <p>` | VNC/RFB port of the main process. | Default 30001. **Side effect:** also sets the control port to `p+1`. Always set both ports explicitly if you change one. |
| `-web_server_port <p>` | Control WebSocket port of the main process. | Default 30000. |
| `-web_timeout <s>` | Idle timeout for child processes in seconds; a child ends when no browser has been connected for that long. | Values of about 75 s or less disable the timeout (message «min. 76s»). Unset is treated as 30 minutes in children. PSI uses `76`. |
| `-web_interaction_timeout` | Count the timeout from the last user interaction instead of the last connection. | Only together with `-web_timeout`. |
| `-web_instance_limit <n>` | Maximum number of child processes the main process starts. | Default 1000, maximum 5000, 0 is rejected. Needs 2×n free ports in the pool. |
| `-host <ip>` | Bind address of both sockets. | Default `127.0.0.1`; the container uses `0.0.0.0` because nginx connects from another container. |
| `-web_launcher_root_file <file>` | Launcher definition (pylauncher JSON) shown in the menu bar. | Resolved via `CAQTDM_DISPLAY_PATH`; caQtDM exits if the file is not found. |
| `-web_allow_insecure_cashell_commands` | Documented switch to allow caShellCommand/caScriptButton in web mode. | Has no effect in V4.9.0: the flag is parsed but never applied, so caShellCommand and caScriptButton stay disabled. |
### 4.2 Environment variables in the caqtdm container
| Variable | Meaning | Example / default |
|---|---|---|
| `ENTRY_PANEL` | Start panel of the main process. | Default `tests.ui` (a test panel inside the image). |
| `EXTRA_ARGS` | Additional options, see 4.1. | `-web_launcher_root_file S_.json -web_timeout 76 -novnc_readonly` |
| `CAQTDM_DISPLAY_PATH` | Colon-separated search path for panels **and launcher files**. | Default `/app/caqtdm_display_path:/opt/caqtdm/caqtdm_tests` |
| `CAQTDM_VIRTUAL_WIDTH`, `CAQTDM_VIRTUAL_HEIGHT` | Size of the virtual screen. | Default: taken from the panel's geometry. |
| `EPICS_CA_ADDR_LIST` | Gateway or IOC addresses (unicast). | `sf-cagw.psi.ch:5062` |
| `EPICS_CA_AUTO_ADDR_LIST` | Must be `NO` in a container network (broadcast does not work there). | `NO` |
| `EPICS_CA_MAX_ARRAY_BYTES` | Maximum array size for Channel Access. | Image default `40000000`. |
| `QT_LOGGING_RULES` | Qt logging categories; caQtDM Web logs under `caqtdm.web.*`. | `default.debug=true` or `caqtdm.*.debug=true` |
| `CAQTDM_LOGGING_CONSOLE_VERBOSE` | More console output from caQtDM. | `1` |
| `TZ` | Time zone for time stamps. | `Europe/Zurich` |
### 4.3 Environment variables in the nginx container
| Variable | Meaning |
|---|---|
| `PROXY_BACKEND` | Backend for a single-instance setup (default `http://caqtdm`). Not used by the multi-instance template. |
| `CAQTDM_DEFAULT_BACKEND` | Container that serves requests whose path matches no entry in the map. |
| `CAQTDM_PATH_MAP` | One line per instance: `~^/<instance>/ <container>;`. This is the routing table. |
| `CAQTDM_DEFAULT_ROUTE` | Default route for the overview page (used by `routes.js`). |
| `BASIC_AUTH_USER`, `BASIC_AUTH_PASSWORD` | Global basic authentication for everything. |
| `BASIC_AUTH_PATH_MAP` with `BASIC_AUTH_USER_<KEY>` / `BASIC_AUTH_PASSWORD_<KEY>` | Per-route basic authentication: `~^/<instance>/ KEY;` per line. |
| `INSTALL_HOSTNAME`, `INSTALL_CERT_BASENAME` | Host name in the generated certificate and base name of the certificate files in `/etc/nginx/ssl/`. |
| `DNS_SERVER` | Resolver for container names; auto-detected by the entrypoint hook. |
### 4.4 Launcher definition
The launcher in the menu bar is a **pylauncher JSON file** (<https://github.com/paulscherrerinstitute/pylauncher>), the same format the desktop launcher uses. It is given with `-web_launcher_root_file` and found through `CAQTDM_DISPLAY_PATH`; files it references are found the same way.
```json
{
"menu-title": { "text": "SF Launcher", "style": "color: #1a4d8f" },
"file-choice": [
{ "text": "RF", "file": "S_RF.json" },
{ "text": "Vacuum", "file": "S_VCS.json" }
],
"menu": [
{ "type": "title", "text": "GLOBAL" },
{ "type": "caqtdm", "text": "Status", "panel": "S_OP_overview.ui", "tip": "Machine status" },
{ "type": "caqtdm", "text": "Gun", "panel": "S_RF_gun.ui", "macros": "P=SINEG01,R=RGUN" },
{ "type": "separator" },
{ "type": "menu", "text": "Diagnostics", "file": "S_DIAG.json" },
{ "type": "menu", "text": "Inline sub-menu", "menu": [
{ "type": "caqtdm", "text": "BPM overview", "panel": "S_DIAG_bpm.ui" }
]},
{ "type": "cmd", "text": "Start something", "command": "start_tool.sh" }
]
}
```
| Element | Behaviour in the web client |
|---|---|
| `menu-title` | Text and colour of the launcher button. |
| `file-choice` | Alternative launchers offered by **Select Launcher**. The root file is listed first. Without `file-choice` the Select Launcher button is hidden. |
| `title`, `separator` | Headings and separators in the menu. |
| `menu` with `menu: [...]` or `file:` | Sub-menu, inline or loaded from another JSON file (merged recursively; circular references are blocked). |
| `caqtdm`, `medm`, `pep` | Panel entries. `panel`, `file` or `path` give the file, `macros` the macros, `param` extra parameters (a `-macro` inside `param` is merged into the macros). |
| `cmd` | Shown with a Copy button only; nothing is executed. |
| `tip` | Tooltip of the entry. |
Panel paths in the launcher are reduced to the **file name**; the file must therefore be reachable through `CAQTDM_DISPLAY_PATH`.
## 5. Setting up your own server
Prerequisites: a Linux host with Podman (or Docker) and the compose plugin, network access to the PVs (directly by unicast or through a CA gateway), and the panel files on a path you can mount.
1. **Get the sources** (the web client is a submodule). The source code lives on GitHub; the PSI Gitea repositories are used for development and for building the deployment images internally (see «Administration at PSI»).
```bash
git clone --recursive https://github.com/caqtdm/caqtdm.git
```
2. **Build the images** from `caQtDM_Web/docker/compose.multi.yaml` (two instances behind nginx; use `compose.yaml` for one instance plus gateway):
```bash
cd caqtdm/caQtDM_Web/docker
podman compose -f compose.multi.yaml build
```
The build compiles EPICS Base, caQtDM and the qnovnc plugin and takes a while. At PSI, prebuilt images are pulled from `gitea.psi.ch/caqtdm-web/` instead (see «Administration at PSI»).
3. **Define the instances.** For every caqtdm service in the compose file set:
- the panel and launcher directories as read-only volumes and `CAQTDM_DISPLAY_PATH` to match,
- `ENTRY_PANEL`, `EXTRA_ARGS` (launcher file, timeout, `-novnc_readonly` for display-only instances),
- `EPICS_CA_ADDR_LIST` with the gateway or IOC addresses and `EPICS_CA_AUTO_ADDR_LIST=NO`.
4. **Define the routes** in the nginx service: one `CAQTDM_PATH_MAP` line per instance and a `CAQTDM_DEFAULT_BACKEND`. Mount `caQtDM_Web/caqtdm_web_subroutes.conf.template` as `/etc/nginx/templates/caqtdm_web.conf.template`.
5. **Overview page (optional).** Copy `static-page/` from the PSI deployment repository, edit `routes.json` so that it lists the same routes as `CAQTDM_PATH_MAP`, and mount it to `/var/www/caqtdm_web/static`.
6. **Certificate.** Either keep the self-signed certificate from the image, or generate one and mount `caqtdm_web.crt` and `caqtdm_web.key` into `/etc/nginx/ssl/`:
```bash
HOST=$(hostname -f) ./gencert.sh
```
7. **Start:**
```bash
podman compose -f compose.multi.yaml up -d
```
8. **Check:** open `http://<host>:8080/instance1/` (ports as published in the compose file), watch the Loading bar, open the Logs window and look for «Connected to server.», open a launcher entry and check that it appears in a new tab.
Broadcast note: Channel Access name resolution by broadcast does not cross a container network. Either list the IOCs or a gateway in `EPICS_CA_ADDR_LIST`, or run the gateway container from `compose.yaml` with `network_mode: host`.
## 6. Network and security
- caQtDM itself has **no authentication**. Access control is done in nginx: global basic auth (`BASIC_AUTH_USER`/`PASSWORD`) or per route (`BASIC_AUTH_PATH_MAP`).
- The template serves plain HTTP **and** HTTPS. The HTTP→HTTPS redirect is present but commented out; enable it (`return 301 https://$host$request_uri;`) if you want HTTPS only.
- caQtDM binds to `127.0.0.1` by default. Only the reverse proxy should be reachable from outside; the container network keeps the 30000–39999 ports private.
- Panel paths from the browser are validated on both sides: relative only, no `..`, limited character set. The server searches only inside `CAQTDM_DISPLAY_PATH`.
- A **read-write** instance lets every viewer operate the same panel. Treat it like a shared console: restrict it with basic auth or by network, and remember that the EPICS gateway's access rules, not the RW badge, decide whether writes reach the machine.
- `caShellCommand` and `caScriptButton` are disabled in web mode. From the web point of view they are critical, because a panel could run arbitrary commands on the server with the rights of the service user. They stay disabled at PSI; the documented switch has no effect anyway (see 4.1).
## 7. Operation (generic)
- **Update:** pull the new image and recreate the containers (`podman compose … pull && podman compose … up -d`). The version in the menu bar confirms the change.
- **Restart one instance:** `podman compose -f <file> restart <service>`. Users of that instance see «Connection lost. Reconnecting...» and must reload the page once the main process is back.
- **Known limitations:** on Windows the qnovnc plugin is read-only only; the Oxygen theme is slow in server mode (Fusion is forced); the port pool allows at most about 5000 panel processes per instance; there is no message history in the Logs window.
PSI-specific operation (Podman on `cas-novnc-srv-00`, systemd units, Gitea registry, logs, pitfalls and debugging commands) is in «caQtDM Web – Administration at PSI».
@@ -0,0 +1,178 @@
---
title: caQtDM Web – User Guide
tags:
- SLS
- PROSCAN
- SwissFEL
- HIPA
---
# caQtDM Web – User Guide
Audience: people who want to look at caQtDM panels in a web browser.
As of 2026-11-25, caQtDM Web V4.9.0.
## 1. What is caQtDM Web?
caQtDM Web shows ordinary caQtDM panels in a web browser. The panel files are the same ones the desktop caQtDM uses (`.ui`, `.prc`, `.adl`, `.edl`); nothing has to be converted for the web. Nothing needs to be installed on your computer, a current browser with WebSocket support is enough.
How it works, in short:
- The panel runs on the server. The browser receives a live picture of it (a noVNC stream) and sends mouse and keyboard input back.
- Every panel (more precisely: every combination of panel file and macros) runs as its own process on the server. The first person who opens it starts it, everybody else who opens the same panel joins it.
- **Everyone who has the same panel open sees the same picture and shares the same mouse and keyboard.** If one person scrolls, switches a tab or opens a sub-panel, all other viewers see it. This is different from desktop caQtDM, where every window belongs to one person.
- A panel opened from the launcher or from a link is closed on the server after 76 seconds without a viewer. The next person who opens it starts it again, which takes a moment. The start panel of an instance always stays running.
- Each facility has its own instance with its own launcher and its own start panel.
![A panel in the browser](images/11_panel_example.jpg)
## 2. Getting started: the overview page
Address inside the PSI network: <http://cas-novnc-srv-00.psi.ch>
![Overview page](images/01_overview.png)
The page «CAS caQtDM Web Overview» lists all instances as tiles. Each tile shows the name, the path, the mode (Read-only or Read-write) and two buttons:
- **Open** opens the instance with its start panel and default launcher.
- **URL Builder** opens the URL Builder of that instance (see chapter 4).
| Instance | Path | Mode | Default launcher |
|---|---|---|---|
| SLS | `/sls/` | Read-only | SLS Launcher |
| SwissFEL | `/swissfel/` | Read-only | SF Launcher |
| HIPA | `/hipa/` | Read-only | Operation |
| PROSCAN | `/proscan/` | Read-only | Operation |
| SwissFEL PLC/VCS | `/sf-plc-vcs/` | Read-write | SF Launcher |
| SwissFEL VAC Expert | `/sf-vac-expert/` | Read-write | SF Launcher |
| SLS VAC Expert | `/sls-vac-expert/` | Read-write | SLS Launcher |
| SwissFEL DRPS Expert | `/sf-drps-expert/` | Read-write | SF Launcher |
You can also type the address of an instance directly, for example `http://cas-novnc-srv-00.psi.ch/swissfel/`. The trailing slash matters: without it the server redirects you to the address with the slash.
## 3. The menu bar
A menu bar sits at the top of every instance. The panel is shown below it.
![Menu bar of a read-only instance](images/02_toolbar_ro.png)
| Element (left to right) | Function |
|---|---|
| **Launcher menu** (for example «SF Launcher») | Drop-down menu with the panels of the facility, grouped into sections and sub-menus. Clicking an entry opens that panel **in a new browser tab**. The button carries the name of the launcher that is currently selected. Entries that would run a command on the desktop (type `cmd`) do not run anything in the browser; they show the command text with a **Copy** button. |
| **Select Launcher** | Switches to another launcher, for example from the general SF Launcher to an expert launcher (RF, Magnets, Diagnostics, Vacuum, …). The button is only shown when the instance offers alternative launchers. |
| **Reset** (tooltip «Reset to default launcher») | Appears only while a launcher other than the default one is selected. Restores the default launcher of the instance. |
| **URL Builder** | Opens the URL Builder as a dialog inside the page. The icon in the dialog's title bar opens it in a new tab instead. |
| **caQtDM Web, version** | Name and version of the server, for example `V4.9.0 Build=Oct 5 2026 18:19`. Please include it when reporting a problem. |
| **RO / RW** | Mode of the instance, see chapter 6. The tooltip explains the state («Server is read-only. You can't interact with the panel.» or «Server is read/write. You can interact with the panel.»). |
| **Loading: n%** | Progress bar, shown while a panel is loading. It disappears a few seconds after the panel is complete. |
| **View** | Contains **Full Screen**, which shows the panel full screen. Choosing it again, or pressing Esc, leaves full screen. |
| **Logs** | Opens the window «caQtDM Web Messages» with messages and time stamps, for example «Connected to server.». A red dot on the button means there are new messages. The window only shows messages from the moment you connected; there is no history. |
| **Users: n** | Number of browsers that currently have **this panel** open. It is not the number of users on the whole instance. |
### 3.1 Launcher menu
![Launcher menu with a sub-menu](images/03_launcher_menu.png)
The launcher is the same one the desktop launcher uses (the «pylauncher» definition of the facility). Sections such as *GLOBAL* and *SYSTEM* are headings; entries with an arrow open a sub-menu on hover.
### 3.2 Select Launcher and Reset
![Select Launcher](images/04_select_launcher.png)
The first entry in the list is the default launcher of the instance; the others are the expert launchers it offers. After you pick one, the launcher button takes its name and the **Reset** button appears:
![Menu bar with the RF launcher selected](images/05_reset_button.png)
Your choice is remembered in your browser (not on the server), so it is still active the next time you open the instance, and it is shared between your tabs. Other users are not affected. **Reset** returns to the default launcher and forgets the stored choice.
### 3.3 Logs
![caQtDM Web Messages](images/08_logs.png)
The Logs window shows the messages the panel would print in the message window of desktop caQtDM, plus the connection messages of the browser («Connected to server.», «Disconnected from server.», «Reconnected to server.»). Panel loading problems, for example a missing file, show up here. Because every viewer of a panel shares the same process, you also see messages caused by other viewers.
### 3.4 View
![View menu](images/09_view_menu.png)
**Full Screen** hands the panel area to the browser's full-screen mode; the menu bar is hidden until you leave full screen with Esc.
### 3.5 Connection lost
If the connection to the server breaks, the overlay «Connection lost. Reconnecting...» covers the panel. The page reconnects by itself, first after one second, then with growing intervals up to ten seconds. If the panel process on the server has ended in the meantime (for example because the server was restarted), reload the page.
## 4. URL Builder: direct links to a panel
The URL Builder creates a link that opens a specific panel with the right macros directly. Such links are handy for bookmarks, wiki pages and e-mails. It is available as a dialog in the menu bar and as a page of its own at `/<instance>/url-builder/`, for example <http://cas-novnc-srv-00.psi.ch/swissfel/url-builder/>.
![URL Builder dialog](images/06_url_builder_dialog.png)
1. **File path (relative)**: path of the panel file, relative to the panel directories of the instance. In practice this is usually just the file name, for example `S_OP_overview.ui`. Allowed extensions: `.ui`, `.prc`, `.adl`, `.edl`. If you leave the extension out, `.ui` is added.
2. **Macros**: macros in the form `NAME1=VALUE1;NAME2=VALUE2`, separated by a semicolon or a line break.
3. **Generated URL**: the finished link. **Copy** copies it to the clipboard, **Open** opens it in a new tab.
![URL Builder page with an example](images/07_url_builder_page.png)
Without a file path no link is produced («File path is required.»).
### 4.1 What a link looks like
```
http://cas-novnc-srv-00.psi.ch/swissfel/?path=S_OP_overview.ui&macros=P:S10,R:CB01
```
| Part | Meaning |
|---|---|
| `/swissfel/` | The instance. The slash after the name is required. |
| `path=` | The panel file, relative. |
| `macros=` | Macros as `NAME:VALUE`, several separated by commas. The URL Builder converts your `=` and `;` into this form. |
Rules the URL Builder enforces:
- The path must be relative. Absolute paths (`/…`, `C:\…`, `\\server\…`) and `..` are rejected, on the server side too.
- Allowed characters in the path: letters, digits, `.`, `_`, `-`, `/` and space.
- Macro names consist of letters, digits and `_`. Macro values must not be empty and must not contain `,` or `&`.
### 4.2 Extra parameters you can add by hand
| Parameter | Effect |
|---|---|
| `&display` | Hides the menu bar. Useful for a kiosk screen or a panel embedded in another page. Example: `http://cas-novnc-srv-00.psi.ch/swissfel/?path=S_OP_overview.ui&display` |
## 5. Opening panels from within a panel
- **Related displays** (buttons that open another panel) work. Because the panel is shared, the request goes to **every** viewer of that panel: each of them gets a dialog asking whether to open the new panel, and the new panel opens in a new browser tab. If you did not click anything and such a dialog appears, somebody else did.
- **Links to documents or web pages** (caMimeDisplay) do not open directly. For a web address the browser offers to open it; for a file path it offers to copy the path.
- **Shell commands and scripts** (caShellCommand, caScriptButton) are disabled in the web version for security reasons. The panel shows «execution disabled due to security reasons».
- **Tooltips** are switched off in the web version, because they would appear for all viewers at once.
- **Printing** from the panel is not available. Use the browser's own print or screenshot function instead.
## 6. Two kinds of «read-only»: what is meant?
caQtDM Web has two independent kinds of read-only. They are easily confused.
### 6.1 Read-only on the EPICS side (network)
The server `cas-novnc-srv-00.psi.ch` is in the office network. It reaches the machine PVs only through the EPICS Channel Access gateway of the facility (`sls-cagw`, `sf-cagw`, `hipa-cagw`, `proscan-cagw`, port 5062). Whether writes are allowed is decided by the access rules of that gateway, not by caQtDM Web. For the office gateways these rules are intended to permit reading only; if you need to be sure for a particular PV, ask the controls group.
### 6.2 Read-only in the menu bar (RO / RW)
The badge in the menu bar and on the overview page tells you whether the instance accepts user input at all:
![Menu bar of a read-write instance](images/10_toolbar_rw.png)
- **RO (Read-only):** The panel is display only. All mouse and keyboard input is discarded on the server; nothing you do in the panel has an effect, not even scrolling or switching a tab inside the panel.
- **RW (Read-write):** The panel can be operated: buttons can be clicked, tabs switched, further panels opened from the panel. Remember that everybody else looking at the same panel sees and shares what you do.
### 6.3 How they combine
| Menu bar | EPICS side | Result |
|---|---|---|
| RO | read-only | Display only, no interaction. |
| RW | read-only | Panel can be operated; writes to PVs are refused by the gateway. |
| RW | read-write | Panel can be operated and PVs can be changed. Only possible on a server that is connected without a read-only gateway. |
## 7. Help and contact
Contact: Helge Brands, <helge.brands@psi.ch>.
When reporting a problem, please include the instance (for example `/swissfel/`), the panel, the version from the menu bar and, if possible, the messages from the Logs window.
Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

@@ -0,0 +1,86 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1040" height="400" viewBox="0 0 1040 400" font-family="Helvetica, Arial, sans-serif" font-size="13">
<defs>
<marker id="arrow" markerWidth="10" markerHeight="10" refX="9" refY="5" orient="auto" markerUnits="strokeWidth">
<path d="M0,0 L10,5 L0,10 z" fill="#444"/>
</marker>
</defs>
<style>
.box { fill: #f4f7fb; stroke: #3b5b8c; stroke-width: 1.5; rx: 6; }
.box2 { fill: #fff8e8; stroke: #a0742a; stroke-width: 1.5; rx: 6; }
.box3 { fill: #eef8ee; stroke: #3c7a3c; stroke-width: 1.5; rx: 6; }
.t { fill: #222; }
.h { fill: #222; font-weight: bold; }
.s { fill: #555; font-size: 11px; }
.ln { stroke: #444; stroke-width: 1.5; fill: none; marker-end: url(#arrow); }
.lbl { fill: #444; font-size: 11px; }
</style>
<!-- Browser -->
<rect class="box" x="20" y="160" width="160" height="80"/>
<text class="h" x="100" y="188" text-anchor="middle">Browser</text>
<text class="s" x="100" y="206" text-anchor="middle">noVNC client</text>
<text class="s" x="100" y="222" text-anchor="middle">+ menu bar</text>
<!-- nginx -->
<rect class="box" x="260" y="160" width="180" height="80"/>
<text class="h" x="350" y="188" text-anchor="middle">nginx</text>
<text class="s" x="350" y="206" text-anchor="middle">reverse proxy, static files</text>
<text class="s" x="350" y="222" text-anchor="middle">ports 80 / 443</text>
<!-- caQtDM containers -->
<rect class="box2" x="520" y="50" width="170" height="70"/>
<text class="h" x="605" y="78" text-anchor="middle">caQtDM container</text>
<text class="s" x="605" y="98" text-anchor="middle">instance /sls/</text>
<rect class="box2" x="520" y="165" width="170" height="70"/>
<text class="h" x="605" y="193" text-anchor="middle">caQtDM container</text>
<text class="s" x="605" y="213" text-anchor="middle">instance /swissfel/</text>
<rect class="box2" x="520" y="280" width="170" height="70"/>
<text class="h" x="605" y="308" text-anchor="middle">caQtDM container</text>
<text class="s" x="605" y="328" text-anchor="middle">instance n</text>
<!-- Gateways -->
<rect class="box3" x="740" y="50" width="130" height="70"/>
<text class="h" x="805" y="78" text-anchor="middle">CA gateway</text>
<text class="s" x="805" y="98" text-anchor="middle">sls-cagw:5062</text>
<rect class="box3" x="740" y="165" width="130" height="70"/>
<text class="h" x="805" y="193" text-anchor="middle">CA gateway</text>
<text class="s" x="805" y="213" text-anchor="middle">sf-cagw:5062</text>
<rect class="box3" x="740" y="280" width="130" height="70"/>
<text class="h" x="805" y="308" text-anchor="middle">CA gateway</text>
<text class="s" x="805" y="328" text-anchor="middle">…</text>
<!-- Machine network -->
<rect class="box3" x="910" y="50" width="110" height="300"/>
<text class="h" x="965" y="190" text-anchor="middle">Machine</text>
<text class="h" x="965" y="208" text-anchor="middle">network</text>
<text class="s" x="965" y="228" text-anchor="middle">IOCs</text>
<!-- Arrows browser -> nginx -->
<path class="ln" d="M180,200 L258,200"/>
<text class="lbl" x="219" y="192" text-anchor="middle">HTTP / WebSocket</text>
<!-- nginx -> containers -->
<path class="ln" d="M440,190 L518,90"/>
<path class="ln" d="M440,200 L518,200"/>
<path class="ln" d="M440,210 L518,310"/>
<text class="lbl" x="480" y="150" text-anchor="middle">by URL path</text>
<!-- containers -> gateways -->
<path class="ln" d="M690,85 L738,85"/>
<path class="ln" d="M690,200 L738,200"/>
<path class="ln" d="M690,315 L738,315"/>
<text class="lbl" x="714" y="70" text-anchor="middle">CA</text>
<!-- gateways -> machine network -->
<path class="ln" d="M870,85 L908,85"/>
<path class="ln" d="M870,200 L908,200"/>
<path class="ln" d="M870,315 L908,315"/>
<!-- container network bracket -->
<rect x="505" y="30" width="200" height="340" fill="none" stroke="#a0742a" stroke-dasharray="5,4" rx="8"/>
<text class="s" x="605" y="22" text-anchor="middle" fill="#a0742a">container network (ports 30000–39999 private)</text>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

@@ -0,0 +1,56 @@
<svg xmlns="http://www.w3.org/2000/svg" width="820" height="400" viewBox="0 0 820 400" font-family="Helvetica, Arial, sans-serif" font-size="13">
<defs>
<marker id="arrow" markerWidth="10" markerHeight="10" refX="9" refY="5" orient="auto" markerUnits="strokeWidth">
<path d="M0,0 L10,5 L0,10 z" fill="#444"/>
</marker>
</defs>
<style>
.box { fill: #fff8e8; stroke: #a0742a; stroke-width: 1.5; rx: 6; }
.boxb { fill: #f4f7fb; stroke: #3b5b8c; stroke-width: 1.5; rx: 6; }
.h { fill: #222; font-weight: bold; }
.s { fill: #555; font-size: 11px; }
.ln { stroke: #444; stroke-width: 1.5; fill: none; marker-end: url(#arrow); }
.dl { stroke: #3b5b8c; stroke-width: 1.5; fill: none; stroke-dasharray: 5,4; marker-end: url(#arrow); }
.lbl { fill: #444; font-size: 11px; }
</style>
<!-- Main process -->
<rect class="box" x="250" y="30" width="320" height="90"/>
<text class="h" x="410" y="56" text-anchor="middle">Main process (one per instance)</text>
<text class="s" x="410" y="76" text-anchor="middle">caQtDM -server -novnc … ENTRY_PANEL</text>
<text class="s" x="410" y="94" text-anchor="middle">control WebSocket :30000 · VNC :30001</text>
<text class="s" x="410" y="110" text-anchor="middle">never ends on its own</text>
<!-- Child processes -->
<rect class="box" x="80" y="200" width="280" height="90"/>
<text class="h" x="220" y="226" text-anchor="middle">Child process</text>
<text class="s" x="220" y="246" text-anchor="middle">panel A + macros X</text>
<text class="s" x="220" y="262" text-anchor="middle">2 ports from the pool 30000–39999</text>
<text class="s" x="220" y="278" text-anchor="middle">ends after -web_timeout without viewers</text>
<rect class="box" x="460" y="200" width="280" height="90"/>
<text class="h" x="600" y="226" text-anchor="middle">Child process</text>
<text class="s" x="600" y="246" text-anchor="middle">panel B</text>
<text class="s" x="600" y="262" text-anchor="middle">2 ports from the pool 30000–39999</text>
<text class="s" x="600" y="278" text-anchor="middle">ends after -web_timeout without viewers</text>
<!-- Main -> children -->
<path class="ln" d="M330,120 L230,198"/>
<path class="ln" d="M490,120 L590,198"/>
<text class="lbl" x="230" y="160" text-anchor="end">starts on RESOLVE path|macros</text>
<text class="lbl" x="590" y="160" text-anchor="start">starts on RESOLVE path|macros</text>
<!-- Browsers -->
<rect class="boxb" x="80" y="340" width="110" height="40"/>
<text class="h" x="135" y="365" text-anchor="middle">Browser 1</text>
<rect class="boxb" x="250" y="340" width="110" height="40"/>
<text class="h" x="305" y="365" text-anchor="middle">Browser 2</text>
<rect class="boxb" x="545" y="340" width="110" height="40"/>
<text class="h" x="600" y="365" text-anchor="middle">Browser 3</text>
<!-- Browsers -> children -->
<path class="dl" d="M135,340 L180,292"/>
<path class="dl" d="M305,340 L260,292"/>
<path class="dl" d="M600,340 L600,292"/>
<text class="lbl" x="220" y="318" text-anchor="middle">same framebuffer, same input</text>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB