From f83863ebae700ade07aa8b93ac1e2d82a6cf053c Mon Sep 17 00:00:00 2001 From: Matt Gilman Date: Wed, 9 Nov 2016 09:41:57 -0500 Subject: [PATCH] NIFI-3009: - Fixing NaN error when backpressure is not configured. This closes #1200 --- .../src/main/webapp/js/nf/canvas/nf-connection.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js index 081c9dd163..8cf427186a 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js @@ -1362,7 +1362,11 @@ nf.Connection = (function () { .duration(400) .attr({ 'width': function (d) { - return (backpressureBarWidth * d.status.aggregateSnapshot.percentUseBytes) / 100; + if (nf.Common.isDefinedAndNotNull(d.status.aggregateSnapshot.percentUseBytes)) { + return (backpressureBarWidth * d.status.aggregateSnapshot.percentUseBytes) / 100; + } else { + return 0; + } } }).each('end', function () { backpressurePercentDataSize @@ -1398,7 +1402,11 @@ nf.Connection = (function () { .duration(400) .attr({ 'width': function (d) { - return (backpressureBarWidth * d.status.aggregateSnapshot.percentUseCount) / 100; + if (nf.Common.isDefinedAndNotNull(d.status.aggregateSnapshot.percentUseCount)) { + return (backpressureBarWidth * d.status.aggregateSnapshot.percentUseCount) / 100; + } else { + return 0; + } } }).each('end', function () { backpressurePercentObject