Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #717 from mattrjacobs/dashboard-error-msg-when-con…
…nection-fails

Add error message to HTML when connecting to metrics source fails
  • Loading branch information
mattrjacobs committed Mar 20, 2015
2 parents c7b248c + 44dc791 commit 75f5c3b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hystrix-dashboard/src/main/webapp/monitor/monitor.html
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 75f5c3b

Please sign in to comment.