From 4244fed1f8e703cb049d8d79de2fb085389ee9a8 Mon Sep 17 00:00:00 2001 From: Ben Christensen Date: Fri, 21 Dec 2012 09:57:37 -0800 Subject: [PATCH 1/2] remove characters from name that break regex/js/sorting --- .../main/webapp/components/hystrixCommand/hystrixCommand.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hystrix-dashboard/src/main/webapp/components/hystrixCommand/hystrixCommand.js b/hystrix-dashboard/src/main/webapp/components/hystrixCommand/hystrixCommand.js index a7cbbabf2..d413cb9a2 100644 --- a/hystrix-dashboard/src/main/webapp/components/hystrixCommand/hystrixCommand.js +++ b/hystrix-dashboard/src/main/webapp/components/hystrixCommand/hystrixCommand.js @@ -87,6 +87,9 @@ */ function preProcessData(data) { validateData(data); + // clean up the 'name' field so it doesn't have invalid characters + data.name = data.name.replace(/[.:-]/g,'_'); + // do math converAllAvg(data); calcRatePerSecond(data); } From 28c179e9ef964c34e90251da342b4fecc4f6a66b Mon Sep 17 00:00:00 2001 From: Ben Christensen Date: Fri, 21 Dec 2012 09:57:56 -0800 Subject: [PATCH 2/2] shorten long names to fit in UI --- .../hystrixCommand/templates/hystrixCircuitContainer.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hystrix-dashboard/src/main/webapp/components/hystrixCommand/templates/hystrixCircuitContainer.html b/hystrix-dashboard/src/main/webapp/components/hystrixCommand/templates/hystrixCircuitContainer.html index 53e6c0819..63176dc51 100644 --- a/hystrix-dashboard/src/main/webapp/components/hystrixCommand/templates/hystrixCircuitContainer.html +++ b/hystrix-dashboard/src/main/webapp/components/hystrixCommand/templates/hystrixCircuitContainer.html @@ -4,6 +4,9 @@ if(displayName.substring(0, 36) == 'APIDependencyCommand_CircuitBreaker_') { displayName = displayName.substring(36, displayName.length); } + if(displayName.length > 32) { + displayName = displayName.substring(0,4) + "..." + displayName.substring(displayName.length-20, displayName.length); + } %>