Skip to content

Commit

Permalink
Add error message to HTML when connecting to metrics source fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Jacobs committed Mar 20, 2015
1 parent c7b248c commit 44dc791
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hystrix-dashboard/src/main/webapp/monitor/monitor.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ <h2><span id="title_name"></span></h2>
// }, false);

source.addEventListener('error', function(e) {
$("#dependencies .loading").html("Unable to connect to Command Metric Stream.");
$("#dependencies .loading").addClass("failed");
if (e.eventPhase == EventSource.CLOSED) {
// Connection was closed.
console.log("Connection was closed on error: " + e);
Expand Down Expand Up @@ -166,6 +168,8 @@ <h2><span id="title_name"></span></h2>
// }, false);

source.addEventListener('error', function(e) {
$("#dependencyThreadPools .loading").html("Unable to connect to Thread Pool Metric Stream.");
$("#dependencyThreadPools .loading").addClass("failed");
if (e.eventPhase == EventSource.CLOSED) {
// Connection was closed.
console.log("Connection was closed on error: " + e);
Expand Down

0 comments on commit 44dc791

Please sign in to comment.