From a7658397718afefa8d25c0a039e03a6d03a44cf8 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Tue, 14 Apr 2015 08:58:18 -0600 Subject: [PATCH] upgrade hystrix to 1.4.4 and integrate dashboard changes fixes gh-300 --- pom.xml | 2 +- .../hystrix/dashboard/HystrixDashboardConfiguration.java | 2 +- .../components/hystrixCommand/templates/hystrixCircuit.html | 3 +++ .../src/main/resources/templates/hystrix/monitor.ftl | 4 ++++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 2ddd99d0..a45d8d3d 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ 0.6.5 1.1.147 8.1.0 - 1.4.1 + 1.4.4 2.0.0 1.0.28 0.20.7 diff --git a/spring-cloud-netflix-hystrix-dashboard/src/main/java/org/springframework/cloud/netflix/hystrix/dashboard/HystrixDashboardConfiguration.java b/spring-cloud-netflix-hystrix-dashboard/src/main/java/org/springframework/cloud/netflix/hystrix/dashboard/HystrixDashboardConfiguration.java index 03a01983..d7747602 100644 --- a/spring-cloud-netflix-hystrix-dashboard/src/main/java/org/springframework/cloud/netflix/hystrix/dashboard/HystrixDashboardConfiguration.java +++ b/spring-cloud-netflix-hystrix-dashboard/src/main/java/org/springframework/cloud/netflix/hystrix/dashboard/HystrixDashboardConfiguration.java @@ -251,7 +251,7 @@ public class HystrixDashboardConfiguration { && CONNECTION_CLOSE_VALUE.equalsIgnoreCase(header.getValue())) { log.warn("Ignoring 'Connection: close' header from stream response"); } - else { + else if (!HttpHeaders.TRANSFER_ENCODING.equalsIgnoreCase(header.getName())) { response.addHeader(header.getName(), header.getValue()); } } diff --git a/spring-cloud-netflix-hystrix-dashboard/src/main/resources/static/hystrix/components/hystrixCommand/templates/hystrixCircuit.html b/spring-cloud-netflix-hystrix-dashboard/src/main/resources/static/hystrix/components/hystrixCommand/templates/hystrixCircuit.html index e50a3524..58b8aaa0 100644 --- a/spring-cloud-netflix-hystrix-dashboard/src/main/resources/static/hystrix/components/hystrixCommand/templates/hystrixCircuit.html +++ b/spring-cloud-netflix-hystrix-dashboard/src/main/resources/static/hystrix/components/hystrixCommand/templates/hystrixCircuit.html @@ -9,6 +9,9 @@ <%= addCommas(rollingCountTimeout) %> <%= addCommas(rollingCountThreadPoolRejected) %> <% } %> + <% if(propertyValue_executionIsolationStrategy == 'SEMAPHORE') { %> + <%= addCommas(rollingCountSemaphoreRejected) %> + <% } %> <%= addCommas(rollingCountFailure) %>
diff --git a/spring-cloud-netflix-hystrix-dashboard/src/main/resources/templates/hystrix/monitor.ftl b/spring-cloud-netflix-hystrix-dashboard/src/main/resources/templates/hystrix/monitor.ftl index 84b2e25d..c54f6dc4 100644 --- a/spring-cloud-netflix-hystrix-dashboard/src/main/resources/templates/hystrix/monitor.ftl +++ b/spring-cloud-netflix-hystrix-dashboard/src/main/resources/templates/hystrix/monitor.ftl @@ -131,6 +131,8 @@ // }, 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: " + JSON.stringify(e)); @@ -166,6 +168,8 @@ // }, 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);