|
|
Web Panel Model Elements |
A Web Panel model element:
· Defines the model elements to expose to the Web Panel Receiver (see Applying the Model Transformer)
· Defines the ports to use
· Starts / stops the Web Panel Receiver
· Opens the Web Panel
· Exports the executable model as a Web Panel Bundle
Web Panel model elements have the following tags:

Controls the port number for the embedded HTTP server that serves the panel UI.
1. Browser access – This is the port you open in a browser to view the panel (e.g. http://localhost:8080/[page])
2. Static file serving - Serves the HTML/CSS/JS panel files
3. SSE stream (/events) - Pushes animation state updates to the web browser in real-time
4. Command endpoint (/command) - Receives button presses / event injections from the panel back to the receiver
5. Layout endpoint (/layout) - Gets/saves panel layout config
The default is 8080. You'd change it if that port is already in use on the machine, or to run multiple Web Panel instances simultaneously.
The port used for the TCP connection between the running executable and the Web Panel Receiver.
· The executable connects outbound to localhost:TCPPort
· The Web Panel Receiver listens on that same port, receives state change messages from the executable, translates them into SSE events, and pushes them to the browser
The default port is 6424. You'd change it if that port is already in use, or to run multiple receivers simultaneously (in which case both TCPPort and HTTPPort would need to differ between instances).
Automatically opens the Web Panel in Rhapsody or an External Web browser. If set to None no Web Panel is opened.
Defines the page to display when the web panel is opened (Runtime, Designer or Debug)
If enabled, the Web Panel Receiver logs all its activity to a log file (in the same folder as the Receiver) for debugging purposes, for example:
- Which port the HTTP server started on
- Template files being copied
- SSE connections opening/closing
- Commands received from the panel
- File requests being served
Used by Export Web Panel Bundle. It specifies the output directory where the standalone bundle is assembled.
Default is "bundle" (relative to the model's unit directory) – but can be an absolute path / contain environment variables.
PanelDir
PanelDir is the working directory where the live panel files are served from during a Receiver session.
Default is "panel" (relative to the model's unit directory) but can be an absolute path / contain environment variables.
On Start Receiver it does two things:
1. Template copy — copies the latest HTML/CSS/JS files from the profile's "Web Panel Templates" folder into PanelDir, so the panel is always up to date with the plugin version
2. File serving — the HTTP server serves all static files from this directory (your layout.json, images, custom assets, etc.)
It's also used by Create Bundle as the source of your user assets — the bundle copies the PanelDir contents into the panel/ subdirectory of ExportDir, then overlays the latest templates on top.
PanelDir is where your panel lives day-to-day during model development; ExportDir is where the exported deployable bundle for non-Rhapsody users gets written.
Web Panel model elements have the following helpers:

This helper:
· Starts the Web Panel Receiver.
· Copies the web-panel templates from the Rhapsody Power Pack Installation into the PanelDir.
· Automatically opens the Web Panel (optional – see properties above).
Opens the Web Panel in either the Rhapsody internal web browser or the default system web browser. The Web Panel is opened on either the debug, design or runtime page as dictated by the properties above.
Creates a Web Panel Bundle
Web Panel Views are optional launch configurations for a Web
Panel. A Web Panel View allows the Web
Panel Receiver or Export Web Panel
Bundle to be launched with a different start page (or export folder) without
the need for a new Component or Web Panel.
For example:
·
One view opens the Runtime panel for operators
·
Another opens a custom dashboard page
· Another opens in an external browser instead of the Rhapsody tab
Connect Web Panel Views to Web Panels using <<viewOfWebPanel>> dependencies.

A Web Panel View carries its own launch and export settings.
All receiver infrastructure (ports, panel directory, component) is inherited
from the Web Panel it targets.
The above helpers may be launched from either a Web Panel or a Web Panel View