Web Screenshot
WebScreenshot allows automated capturing of websites into PNG format which are saved into the Station files. These screenshots can then be exposed via a simple servlet rather than giving access to any part of the station files. WebScreenshot uses the Internet Explorer (IE) browser on the station/server it's installed on to capture these images. You'll want to ensure that IE is installed and updated to the latest version with the necessary plugins installed (for example Adobe Flash) for optimal results.
This component requested the Activelogix:webScreenshot license feature to operate
Installation / Usage
After installing the JAR and license file, the WebScreenshot component can be accessed by opening the "webScreenshot" palette. There are two components within the palette:
- WebScreenshot - Main application, can be installed anywhere in the station. Only one WebScreenshot should be installed per station.
- Screenshot - Allows capturing of one website, must be placed underneath the "WebScreenshot" component.
All screenshots will be taken and saved into the file:^screenshots folder. WebScreenshots automatically exposes this folder with a file servlet and screenshots can be accessed with the URL:
http://ip_address/webscreenshot/screenshot_name.png
- ip_address - The IP address of the server hosting WebScreenshots
- screenshot-name - The AX nav name given to the child Screenshot component
WebScreenshot
- Status - Status of WebScreenshot
- Fault Cause - Explanation of any error (such as unlicensed)
- Screenshot* - any number of Screenshot components can be added as children to the WebSCreenshot component
In the above image we see that there are two automated "Screenshot" components which will capture a webpage at some interval and save them to the station. These images will be saved as "Dashboard1.png" and "Dashboard2.png" to reflect the names given.
Screenshot
- Status - Status of this Screenshot component. Will display "Capturing" when a screenshot is taking place
- Interval - How often this component will capture a screenshot of the webpage
- URL - The URL of the website that will be captured
- Min-Width - The minimum width of the resulting screenshot. For example, if the requested screenshot is only 400px wide but "Min Width" is set to 600px, the resulting screenshot would be 600px.
- Delay - How long the website will be allowed to load before captured in milliseconds.
Periscope takes 5+ seconds to load depending on the speed of the server. It's best to set the delay to at least 10 seconds (10000 ms). Also, Auto-Login can be used to automate login of specific dashboards without having to expose them publicly. Refer to the Periscope Manual for more information.
Important Notes:
- You must be logged into the station to see the screenshots unless the guest user has been enabled and granted access to "WebScreenshot".
- If using these screenshots publicly and you want to avoid a login screen, the guest user needs to be enabled and assigned a category to limit permissions. To do this, take the following steps:
- Create a "WebScreenshot" category in the "CategoryService" of the Niagara station.
- Go to Station > Config > Services > CategoryService.
- Right click on "CategoryService" and select "Category Manager" under "Views".
- Click on "New" and add a "WebScreenshot" category in an unused index.
- Right click on "CategoryService" and select "Category Browser".
- Click on the box in "WebScreenshot" row under the "WebScreenshot" category column. In the example below, the "WebScreenshot" row is under the "Config" which is one of the places you can drop the WebScreenshot object.
- Save the new category created.
- Enable the "guest" user in "UserService"
- Go to Station > Config > UserService
- Click on "guest" user and edit.
- Enable the "guest" user and assign the "WebScreenshot" permissions by clicking on the double chevron.
- Select "Operator Read" and "Admin Read" for the "WebScreenshot" category.
- Click "OK" to save.
- When a user enters the WebScreenshot address created above (http://ip_address/webscreenshot/screenshot_name.png), they will be able to access the screenshots without logging into the station.
- Create a "WebScreenshot" category in the "CategoryService" of the Niagara station.