Ratings | | Unique User Downloads | | Download Rankings |
Not yet rated by the users | | Total: 36 | | All time: 520 This week: 2 |
|
Description | | Author |
This object can display the status of accessing a URL in a page.
It takes a given URL and tries to send an HTTP request to retrieve its response status.
The object can display the status of the access to the URL by changing the CSS style of a given element of the current page changing the element class value from red to green is the status is OK.
The object can update the status continuously by polling the given URL in regular intervals of time within a given number of seconds. | |
|
|
Innovation award
Nominee: 2x
Winner: 2x |
|
Example
/**
* Set-up onload event handler for traffic light monitoring an external URL.
*/
window.addEventListener('load', function() {
"use strict";
var
sRemoteURL = "http://www.bbc.co.uk/",
iCheckInterval = 2000, // 2 secs
oTrafficLight1 = new TrafficLight(),
sTL1 = oTrafficLight1.create("traffic-light-1");
oTrafficLight1.monitor(sRemoteURL, iCheckInterval, sTL1);
}, false);
|
Details
URL Monitor
Provide visual URL monitoring for a dashboard.
[1]: https://tinram.github.io/images/urlmonitor.png
![url-monitor][1]
Examples
Using http://localhost/URL-Monitor/ as the file location.
1.
http://localhost/URL-Monitor/local.html
Monitor three local URLs generating different HTTP statuses in a set time period.
2.
http://localhost/URL-Monitor/remote.html
Monitor one remote URL.
Time Periods
Time periods can be easily changed.
The default polling is every 2 seconds (/js/x_loader.js files) over a 20 second error collection time period (/js/trafficlight.js [line 18]).
License
URL-Monitor is released under the GPL v.3.
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.