Github user mcgilman commented on a diff in the pull request:
https://github.com/apache/nifi/pull/3046#discussion_r223115867
--- Diff:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js
---
@@ -1341,6 +1363,52 @@
}
});
+ // determine whether or not to show the load-balance
icon
+
connectionLabelContainer.select('text.load-balance-icon')
+ .classed('hidden', function () {
+ if (d.permissions.canRead) {
+ return
!isLoadBalanceConfigured(d.component);
+ } else {
+ return true;
+ }
+ }).classed('load-balance-icon-active
fa-rotate-90', function (d) {
+ return d.permissions.canRead &&
d.component.loadBalanceStatus === 'LOAD_BALANCE_ACTIVE';
+
+ }).classed('load-balance-icon-184', function() {
+ return isExpirationConfigured(d.component);
+
+ }).classed('load-balance-icon-200', function() {
+ return !isExpirationConfigured(d.component);
+
+ }).attr('x', function() {
+ return isExpirationConfigured(d.component) ?
184 : 200;
--- End diff --
When the user does not have permission to the connection, the `component`
here will not be set. We need to check this and handle accordingly anywhere we
are invoking `isExpirationConfigured` (see the above 3 cases) since it requires
the `component`.
---