From 078bf142ae1fcfa4697bf7604dcca33c241d24fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Larsg=C3=A5rd?= Date: Mon, 23 Feb 2015 12:07:38 +0100 Subject: [PATCH] This fixes #692. If ratePerSecond is NaN, set errorThenVolume to -1 --- .../main/webapp/components/hystrixCommand/hystrixCommand.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hystrix-dashboard/src/main/webapp/components/hystrixCommand/hystrixCommand.js b/hystrix-dashboard/src/main/webapp/components/hystrixCommand/hystrixCommand.js index dc3757592..b9245df31 100644 --- a/hystrix-dashboard/src/main/webapp/components/hystrixCommand/hystrixCommand.js +++ b/hystrix-dashboard/src/main/webapp/components/hystrixCommand/hystrixCommand.js @@ -237,8 +237,7 @@ var ratePerSecond = data.ratePerSecond; var ratePerSecondPerHost = data.ratePerSecondPerHost; var ratePerSecondPerHostDisplay = ratePerSecondPerHost; - var errorThenVolume = (data.errorPercentage * 100000000) + ratePerSecond; - + var errorThenVolume = isNan( ratePerSecond )? -1: (data.errorPercentage * 100000000) + ratePerSecond; // set the rates on the div element so it's available for sorting $('#CIRCUIT_' + data.escapedName).attr('rate_value', ratePerSecond); $('#CIRCUIT_' + data.escapedName).attr('error_then_volume', errorThenVolume);