RDKDEV-1421 Add thunderUI Documentation#123
Open
gourivarma3 wants to merge 1 commit into
Open
Conversation
Author
|
Added README.md for thunderUI |
There was a problem hiding this comment.
Pull request overview
Adds a comprehensive technical README under docs/ describing ThunderUI’s purpose, architecture, module structure, and runtime/build configuration to help developers understand and operate the project.
Changes:
- Introduces a full ThunderUI design/architecture overview (including Mermaid diagrams).
- Documents module responsibilities and component interactions (JSON-RPC/WebSocket + REST fallback).
- Describes configuration and persistence behavior (conf/env/localStorage).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ThunderUI provides a single-page web application that communicates with Thunder's Controller plugin over JSON-RPC (via WebSocket) and REST HTTP. On startup, it queries the Controller for the list of active plugins on the device and dynamically constructs a navigation menu and per-plugin views. Each plugin view exposes the operations and data surfaces offered by the corresponding Thunder plugin, ranging from network configuration and device diagnostics to browser control and tracing. The UI runs entirely in the browser; all persistent device state resides in Thunder and is accessed through the API layer. User session state (last active plugin, last navigated URL) is kept in browser `localStorage`. | ||
|
|
||
| ThunderUI is deployed as static web assets (`bundle.js`, `index.html`, `img/`) under `${datadir}/WPEFramework/Controller/UI` on the target device and is served directly by the Thunder Controller's built-in HTTP server. |
|
|
||
| ### RDK-V Platform and Integration Requirements | ||
|
|
||
| - **WPEFramework Version**: Requires a Thunder instance exposing the Controller plugin via HTTP on port 80 and WebSocket notification channel at `/Service/Controller`. |
| ### RDK-V Platform and Integration Requirements | ||
|
|
||
| - **WPEFramework Version**: Requires a Thunder instance exposing the Controller plugin via HTTP on port 80 and WebSocket notification channel at `/Service/Controller`. | ||
| - **Build Dependencies**: Node.js (≥ 17 handled automatically with OpenSSL legacy provider), npm, Webpack 4, ThunderJS v1.2.4, `copy-webpack-plugin`, `css-loader`, `style-loader`, `dotenv-webpack`. |
| - Bootstrap and routing: `src/js/core/application.js` | ||
| - Per-plugin lifecycle: `src/js/core/plugin.js` | ||
|
|
||
| - **Event Processing**: All incoming WebSocket messages from the Controller notification channel are parsed in `WpeApi.startWebSocket`. Each message is matched against the `socketListeners` array by callsign; listeners registered with callsign `'all'` receive every notification. Individual plugin views register and unregister listeners via `addWebSocketListener` / `removeWebSocketListener`. |
| participant PluginView as Subscribed Plugin View | ||
|
|
||
| Thunder->>WpeApi: WebSocket push: {callsign, event, params} | ||
| WpeApi->>WpeApi: Parse and route to socketListeners[] |
Comment on lines
+352
to
+358
| | Key | Content | | ||
| | ---------------------------- | ------------------------------------------------------------------- | | ||
| | `lastActivePlugin` | Callsign of the last active plugin view, restored on next page load | | ||
| | `thunderUI_selectedInstance` | Last selected composite Thunder instance name | | ||
| | `thunderUI_currentPlugin` | Last active plugin in the context of the selected instance | | ||
| | `paused` | Whether the device status footer statistics display was hidden | | ||
| | `autoFwdKeys` | Whether automatic key forwarding to RemoteControl is enabled | |
| | **Thunder Plugins** | | | | ||
| | `Controller` | Plugin lifecycle management: enumerate active plugins, activate, deactivate, suspend, resume | `Controller.1.status`, `Controller.1.activate`, `Controller.1.deactivate`, `Controller.1.suspend`, `Controller.1.resume` | | ||
| | `DeviceInfo` | Read device identity and resource metrics for the status footer and Device Info view | `DeviceInfo.1.status` (system info, network interfaces) | | ||
| | `Network` | Read network interface list and IP addresses; set default interface; execute ping | `Network.1.interfaces`, `Network.1.defaultinterface`, `Network.1.ping` | |
| | `TraceControl` | Read and set trace module enable/disable state; stream live trace output | `TraceControl.1.set`; WebSocket stream at `/Service/TraceControl` | | ||
| | `MessageControl` | Read and set message control enable/disable state; stream live debug messages | `MessageControl.1.enable`; WebSocket stream at `/Service/MessageControl` | | ||
| | `Power` | Read current power state; trigger power state transitions | `Power.1.state` (read/write) | | ||
| | `DisplaySettings` | Read/set video resolution, sound mode, zoom setting, connected displays | `DisplaySettings.1.currentresolution`, `DisplaySettings.1.supportedresolutions`, `DisplaySettings.1.setsoundmode` | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.