Admin Console
For configuration, management and monitoring purposes Webswing provides a convenient web interface.
Server Statistics
In the top navigation bar you can access Sessions.
Here you can see details about each session, shut down the session, or record the session.
You can filter the sessions by selecting the application name on the left. In the top is aggregated data about CPU, RAM and Network consumption.
If you select Finished Sessions Tab then you can see history of all finished sessions with some useful details - username, IP address, session duration, ...
Latency
The Latency Graph consists of the following partial graphs
- Average HTTP ping latency - delay between sending a request and obtaining response (no business logic is performed on the server)
- Average Server Rendering latency - delay between sending user event to Swing app and receiving rendering event from the awt framework
- Average Client Rendering latency - delay between receiving rendering event and displaying it to user in JavaScript
- Max E2E frame based latency - latency from the user event to server + server rendering + sending the change back to user + client rendering
Customization
By default the graphs show CPU/Memory usage history of the last 10 minutes. This is due to memory requirements of the data. The defaults can be changed during startup of Webswing Server by providing specific System properties. Please note that low interval and high history size results in extended Memory and CPU usage.
webswing.stats.interval=10 (Granularity of the metrics, average of last 10 seconds is default)
webswing.stats.historySize=60 (Number of observations kept in memory, 60 by default)
webswing.stats.memUsageWarn=0.8 (Threshold to generate a memory usage warning, 80% default)
webswing.stats.latencyWarn=700 (Threshold to generate a network latency warning, 700ms default)
webswing.stats.pingWarn=500 (Threshold to generate a ping warning, 500ms default)
Application Statistics
You can also see some basics statistics of each application from the main screen of Admin Console. This may help you to quickly analyze the current state of the applications to support the maintenance and monitoring.
Overall application statistics - session aggregated.
The Show sessions button will navigate you to the Sessions page. It will be pre-filtered for the specific application.
Clone view
In the session detail page you can click the View button to see the copy of the user's session. The following information and features are available:
- Username of the session owner
- Statistics of current session
- Clone view of the session
- Full control of the application
- Possibility to record the session
- Shutting down the session
Configuration overview
General
Setting | Description |
---|---|
Web Folder | Folder to be used to store customized static web files like HTML, CSS or Javascript. |
Restricted Resources | Defined Path-prefix restricts access to resources only to authenticated users. Applies to static resources inside 'Web Folder' or packaged with Webswing. |
Localization Folder | Folder to be used to store customized messages and translations in supported languages. English is available by default. |
CORS Origins | If you are embedding webswing to page on different domain, you have to enable Cross-origin resource sharing (CORS) by adding the domain in this list. Use * to allow all domains. |
Security
Setting | Description |
---|---|
Security Module Class Path | Additional classpath for built-in Security module or for defining custom security module. |
Security Module Name | Select one of the default window decoration themes or a enter path to a XFWM4 theme folder |
Security Module Config | Specific configuration for the selected security module. By default EMBEDDED security module has list of Users and corresponding Roles specified here |
Logs
In the top navigation bar you can access Logs.
Within the logs page 3 logs are accessible:
- Audit - application access logs, pointed to System Property webswing.log.file.audit (by default audit.log)
- Server - application event logs, pointed to System Property webswing.log.file.server (by default webswing.log)
- Session - application event logs, as configured in the application (if log per session is enabled)
Installation
To add admin console to your Webswing distribution follow these steps:
- Download the Webswing Examples Distribution and copy
apps/webapps/admin
to${webswing.rootDir}/apps/webapps/admin
of your distribution - Add webFolder configuration to
webswing.config
file within the / element:
"/" : {
"path" : "/",
"security" : {
"module" : "EMBEDED",
"config" : {
"users" : [ {
"username" : "admin",
"password" : "pwd",
"roles" : [ "admin" ]
}, {
"username" : "support",
"password" : "pwd",
"roles" : [ "support" ]
}, {
"username" : "user",
"password" : "pwd"
} ]
},
"classPath" : [ ]
},
"icon" : null,
"webFolder" : "${webswing.rootDir}/apps/webapps",
"langFolder" : "${webswing.configDir}/lang",
"homeDir" : "${user.dir}",
"swingConfig" : null,
"allowedCorsOrigins" : [ "*" ]
},
- Start your Webswing server
- You should be able to open http://localhost:8080/admin login with default values