Repository: nifi
Updated Branches:
  refs/heads/master 64de5c70e -> 8da403ce9


NIFI-5661:
- Allowing the load balance configuration to be shown/edited in both clustered 
and standalone mode.


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/79c03caf
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/79c03caf
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/79c03caf

Branch: refs/heads/master
Commit: 79c03caf4f57a1273cbe5856ec7b6fc007f00a3e
Parents: 64de5c7
Author: Matt Gilman <[email protected]>
Authored: Thu Oct 11 12:23:53 2018 -0400
Committer: Matt Gilman <[email protected]>
Committed: Thu Oct 11 12:23:53 2018 -0400

----------------------------------------------------------------------
 .../canvas/connection-configuration.jsp         |  2 +-
 .../WEB-INF/partials/connection-details.jsp     |  2 +-
 .../js/nf/canvas/nf-connection-configuration.js | 28 +++++++-----------
 .../main/webapp/js/nf/nf-connection-details.js  | 30 +++++++-------------
 4 files changed, 23 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/79c03caf/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/connection-configuration.jsp
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/connection-configuration.jsp
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/connection-configuration.jsp
index fee7da7..1575e88 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/connection-configuration.jsp
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/connection-configuration.jsp
@@ -63,7 +63,7 @@
                             </div>
                         </div>
                     </div>
-                    <div id="load-balance-settings">
+                    <div>
                         <div class="multi-column-settings">
                             <div class="setting">
                                 <div class="setting-name">

http://git-wip-us.apache.org/repos/asf/nifi/blob/79c03caf/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/connection-details.jsp
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/connection-details.jsp
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/connection-details.jsp
index 8ce9684..2887ee9 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/connection-details.jsp
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/connection-details.jsp
@@ -106,7 +106,7 @@
                             <div class="clear"></div>
                         </div>
                     </div>
-                    <div id="read-only-load-balance-settings">
+                    <div>
                         <div class="multi-column-settings">
                             <div class="setting">
                                 <div class="setting-name">

http://git-wip-us.apache.org/repos/asf/nifi/blob/79c03caf/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
index eb58df3..97af35d 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection-configuration.js
@@ -23,14 +23,13 @@
                 'd3',
                 'nf.ErrorHandler',
                 'nf.Common',
-                'nf.ClusterSummary',
                 'nf.Dialog',
                 'nf.Storage',
                 'nf.Client',
                 'nf.CanvasUtils',
                 'nf.Connection'],
-            function ($, d3, nfErrorHandler, nfCommon, nfClusterSummary, 
nfDialog, nfStorage, nfClient, nfCanvasUtils, nfConnection) {
-                return (nf.ConnectionConfiguration = factory($, d3, 
nfErrorHandler, nfCommon, nfClusterSummary, nfDialog, nfStorage, nfClient, 
nfCanvasUtils, nfConnection));
+            function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, 
nfClient, nfCanvasUtils, nfConnection) {
+                return (nf.ConnectionConfiguration = factory($, d3, 
nfErrorHandler, nfCommon, nfDialog, nfStorage, nfClient, nfCanvasUtils, 
nfConnection));
             });
     } else if (typeof exports === 'object' && typeof module === 'object') {
         module.exports = (nf.ConnectionConfiguration =
@@ -38,7 +37,6 @@
                 require('d3'),
                 require('nf.ErrorHandler'),
                 require('nf.Common'),
-                require('nf.ClusterSummary'),
                 require('nf.Dialog'),
                 require('nf.Storage'),
                 require('nf.Client'),
@@ -49,14 +47,13 @@
             root.d3,
             root.nf.ErrorHandler,
             root.nf.Common,
-            root.nf.ClusterSummary,
             root.nf.Dialog,
             root.nf.Storage,
             root.nf.Client,
             root.nf.CanvasUtils,
             root.nf.Connection);
     }
-}(this, function ($, d3, nfErrorHandler, nfCommon, nfClusterSummary, nfDialog, 
nfStorage, nfClient, nfCanvasUtils, nfConnection) {
+}(this, function ($, d3, nfErrorHandler, nfCommon, nfDialog, nfStorage, 
nfClient, nfCanvasUtils, nfConnection) {
     'use strict';
 
     var nfBirdseye;
@@ -1434,18 +1431,13 @@
                     
$('#back-pressure-data-size-threshold').val(connection.backPressureDataSizeThreshold);
 
                     // select the load balance combos
-                    if (nfClusterSummary.isConnectedToCluster()) {
-                        
$('#load-balance-strategy-combo').combo('setSelectedOption', {
-                            value: connection.loadBalanceStrategy
-                        });
-                        
$('#load-balance-compression-combo').combo('setSelectedOption', {
-                            value: connection.loadBalanceCompression
-                        });
-                        
$('#load-balance-partition-attribute').val(connection.loadBalancePartitionAttribute);
-                        $('#load-balance-settings').show();
-                    } else {
-                        $('#load-balance-settings').hide();
-                    }
+                    
$('#load-balance-strategy-combo').combo('setSelectedOption', {
+                        value: connection.loadBalanceStrategy
+                    });
+                    
$('#load-balance-compression-combo').combo('setSelectedOption', {
+                        value: connection.loadBalanceCompression
+                    });
+                    
$('#load-balance-partition-attribute').val(connection.loadBalancePartitionAttribute);
 
                     // format the connection id
                     nfCommon.populateField('connection-id', connection.id);

http://git-wip-us.apache.org/repos/asf/nifi/blob/79c03caf/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js
index b1632b3..f121b01 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-connection-details.js
@@ -21,23 +21,20 @@
     if (typeof define === 'function' && define.amd) {
         define(['jquery',
                 'nf.Common',
-                'nf.ClusterSummary',
                 'nf.ErrorHandler'],
-            function ($, nfCommon, nfClusterSummary, nfErrorHandler) {
-                return (nf.ConnectionDetails = factory($, nfCommon, 
nfClusterSummary, nfErrorHandler));
+            function ($, nfCommon, nfErrorHandler) {
+                return (nf.ConnectionDetails = factory($, nfCommon, 
nfErrorHandler));
             });
     } else if (typeof exports === 'object' && typeof module === 'object') {
         module.exports = (nf.ConnectionDetails = factory(require('jquery'),
             require('nf.Common'),
-            require('nf.ClusterSummary'),
             require('nf.ErrorHandler')));
     } else {
         nf.ConnectionDetails = factory(root.$,
             root.nf.Common,
-            root.nf.ClusterSummary,
             root.nf.ErrorHandler);
     }
-}(this, function ($, nfCommon, nfClusterSummary, nfErrorHandler) {
+}(this, function ($, nfCommon, nfErrorHandler) {
     'use strict';
 
     /**
@@ -533,20 +530,15 @@
                         
nfCommon.populateField('read-only-load-balance-compression', 
nfCommon.getComboOptionText(nfCommon.loadBalanceCompressionOptions, 
connection.loadBalanceCompression));
 
                         // Show the appropriate load-balance configurations
-                        if (nfClusterSummary.isConnectedToCluster()) {
-                            if (connection.loadBalanceStrategy === 
'PARTITION_BY_ATTRIBUTE') {
-                                
$('#read-only-load-balance-partition-attribute-setting').show();
-                            } else {
-                                
$('#read-only-load-balance-partition-attribute-setting').hide();
-                            }
-                            if (connection.loadBalanceStrategy === 
'DO_NOT_LOAD_BALANCE') {
-                                
$('#read-only-load-balance-compression-setting').hide();
-                            } else {
-                                
$('#read-only-load-balance-compression-setting').show();
-                            }
-                            $('#read-only-load-balance-settings').show();
+                        if (connection.loadBalanceStrategy === 
'PARTITION_BY_ATTRIBUTE') {
+                            
$('#read-only-load-balance-partition-attribute-setting').show();
                         } else {
-                            $('#read-only-load-balance-settings').hide();
+                            
$('#read-only-load-balance-partition-attribute-setting').hide();
+                        }
+                        if (connection.loadBalanceStrategy === 
'DO_NOT_LOAD_BALANCE') {
+                            
$('#read-only-load-balance-compression-setting').hide();
+                        } else {
+                            
$('#read-only-load-balance-compression-setting').show();
                         }
 
 

Reply via email to