NIFI-3009:

- Fixing NaN error when backpressure is not configured.
This closes #1200
This commit is contained in:
Matt Gilman 2016-11-09 09:41:57 -05:00 committed by Scott Aslan
parent b426de1793
commit f83863ebae

View File

@ -1362,7 +1362,11 @@ nf.Connection = (function () {
.duration(400) .duration(400)
.attr({ .attr({
'width': function (d) { '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 () { }).each('end', function () {
backpressurePercentDataSize backpressurePercentDataSize
@ -1398,7 +1402,11 @@ nf.Connection = (function () {
.duration(400) .duration(400)
.attr({ .attr({
'width': function (d) { '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 () { }).each('end', function () {
backpressurePercentObject backpressurePercentObject