WebCTRL is a trademark of Automated Logic Corporation. Any other trademarks mentioned herein are the property of their respective owners.
This repository provides two tools for automatically checking graphics errors in a WebCTRL system:
- Command-Line Tool - A standalone executable for system administrators to run automated checks from the command line
- Browser-Based Tool - An embeddable HTML page that runs directly in WebCTRL graphics for end users
Both tools are designed to help system administrators and operators proactively monitor the health of their WebCTRL graphics. They should function on WebCTRL 8.0 and later versions.
The command-line tool is a standalone executable that uses Puppeteer, a Node.js library that automates the Chrome browser. Chrome is used behind the scenes to interact with the WebCTRL system as a real user would.
- Download the latest release from the following link:
graphics-error-scraper.zip
- This will work only for 64-bit Windows OS.
- For other operating systems, you are free to build from source.
- Unzip the contents to a convenient location on your computer.
Run the tool from the command line with the following options:
Usage: graphics-error-scraper [options]
-u, --url <url> Target URL (required)
-U, --username <username> Username (required)
-p, --password <password> Password (required)
-o, --output <file> Output file (default: errors.json, use - for stdout)
-f, --force Overwrite output file if it exists
-i, --ignoressl Ignore SSL certificate errors (required for insecure HTTP)
-t, --timeout <ms> Timeout for page actions in milliseconds (default: 180000)
-h, --headless <bool> Headless mode (true/false, default: true)
-v, --verbose Verbose logging (flag or "true")
--version, -v Print version and exit
Note: For this tool to function correctly, the WebCTRL user account must have the Automatically collapse trees option unchecked in his or her settings.
graphics-error-scraper -u https://webctrl.example.com -U admin -p hvac1234 -o results.json
- The tool will log in to the specified WebCTRL system, expand all geographic tree nodes, and check each graphic for errors.
- Results are saved to the specified output file in JSON format, or printed to the console if
-o -is used.
[
{
"displayPath": "Automatic Controls Equipment Systems / Office Building / Utilities / Building Electric Meter Totalizer",
"gqlPath": "#aces_electric_meter_totalizer",
"graphicName": "Default",
"graphicFile": "aces_electric_meter_totalizer.view",
"actionErrors": [
{
"details": "Uncaught Could not find trend report or an embedded trend at real_pwr_tn",
"type": "UI_Error",
"number": 0,
"line": 449
}
]
}
]The browser-based tool (embed.html) provides a simpler alternative that runs directly in the user's browser without requiring any downloads or installations. This tool can be embedded into a WebCTRL graphic as an HTML content control.
- REST API Addon must be installed on your WebCTRL system
- Download from: https://github.com/automatic-controls/rest-api-addon
- Download the pre-made view file: error-scraper.view
- Upload the view file to your WebCTRL system
- Add the graphic to any location in your geographic tree
Alternatively, you can manually embed embed.html into an HTML content control in any existing graphic.
- Open the graphic in WebCTRL
- The tool will automatically display in the HTML control
- Optional: Enter a root GQL path to scope the check to a specific area of your system (e.g.,
#building_1)- If left blank, the tool will check all graphics in the entire system
- Click the button to run the error check
- Results will be displayed directly in the browser
- No Installation Required - Runs entirely in the browser using JavaScript
- Easy Access - Available directly within WebCTRL for all users
- Scoped Checking - Option to check only a specific branch of the geographic tree instead of the entire system
- Instant Results - View errors immediately without switching applications