NIFI-4436:
- Minor tweak to when the max height for the options list is calculated per PR 
comments.
- Resolving logic issue in two phase commit when updating variable registry.
- Fixing variable visibility.


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

Branch: refs/heads/master
Commit: fa996cd418601b0f1abeb5a926ac6146a96b0c07
Parents: f702f80
Author: Matt Gilman <[email protected]>
Authored: Wed Jan 3 20:57:37 2018 -0500
Committer: Bryan Bende <[email protected]>
Committed: Mon Jan 8 12:44:57 2018 -0500

----------------------------------------------------------------------
 .../apache/nifi/web/api/ProcessGroupResource.java |  2 +-
 .../org/apache/nifi/web/api/VersionsResource.java | 12 ++++++------
 .../main/webapp/js/jquery/combo/jquery.combo.js   |  4 ++++
 .../main/webapp/js/nf/canvas/nf-flow-version.js   | 18 ------------------
 4 files changed, 11 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/fa996cd4/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java
index 96e1e08..6e99a07 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java
@@ -620,7 +620,7 @@ public class ProcessGroupResource extends 
ApplicationResource {
         final VariableRegistryDTO requestRegistryDto = 
requestVariableRegistryEntity.getVariableRegistry();
         if (!groupId.equals(requestRegistryDto.getProcessGroupId())) {
             throw new IllegalArgumentException(String.format("The process 
group id (%s) in the request body does "
-                    + "not equal the process group id of the requested 
resource (%s).", registryDto.getProcessGroupId(), groupId));
+                    + "not equal the process group id of the requested 
resource (%s).", requestRegistryDto.getProcessGroupId(), groupId));
         }
 
         if (isReplicateRequest()) {

http://git-wip-us.apache.org/repos/asf/nifi/blob/fa996cd4/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/VersionsResource.java
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/VersionsResource.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/VersionsResource.java
index 53dc091..b106948 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/VersionsResource.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/VersionsResource.java
@@ -1590,12 +1590,12 @@ public class VersionsResource extends 
ApplicationResource {
 
 
     private static class InitiateChangeFlowVersionRequestWrapper extends 
Entity {
-        final VersionControlInformationEntity versionControlInformationEntity;
-        final ComponentLifecycle componentLifecycle;
-        final URI exampleUri;
-        final Set<AffectedComponentEntity> affectedComponents;
-        final boolean replicateRequest;
-        final VersionedFlowSnapshot flowSnapshot;
+        private final VersionControlInformationEntity 
versionControlInformationEntity;
+        private final ComponentLifecycle componentLifecycle;
+        private final URI exampleUri;
+        private final Set<AffectedComponentEntity> affectedComponents;
+        private final boolean replicateRequest;
+        private final VersionedFlowSnapshot flowSnapshot;
 
         public InitiateChangeFlowVersionRequestWrapper(final 
VersionControlInformationEntity versionControlInformationEntity, final 
ComponentLifecycle componentLifecycle,
                                                        final URI exampleUri, 
final Set<AffectedComponentEntity> affectedComponents, final boolean 
replicateRequest,

http://git-wip-us.apache.org/repos/asf/nifi/blob/fa996cd4/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/combo/jquery.combo.js
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/combo/jquery.combo.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/combo/jquery.combo.js
index 009f206..07d1c5b 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/combo/jquery.combo.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/combo/jquery.combo.js
@@ -176,6 +176,10 @@
                             if (maxHeight > 0) {
                                 comboOptions.css('max-height', maxHeight + 
'px');
                             }
+                        } else {
+                            var windowHeight = $(window).height();
+                            maxHeight = windowHeight - (position.top + 
Math.round(combo.outerHeight())) - 32;
+                            comboOptions.css('max-height', maxHeight + 'px');
                         }
 
                         // create the list that will contain the options

http://git-wip-us.apache.org/repos/asf/nifi/blob/fa996cd4/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-flow-version.js
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-flow-version.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-flow-version.js
index 96c467a..ebbfd25 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-flow-version.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-flow-version.js
@@ -214,14 +214,8 @@
                 });
             }
 
-            // determine the max registry height
-            var windowHeight = $(window).height();
-            var registryOffset = 
$('#import-flow-version-registry-combo').offset();
-            var registryMaxHeight = windowHeight - registryOffset.top - 64;
-
             // load the registries
             registryCombo.combo({
-                maxHeight: registryMaxHeight,
                 options: registries,
                 select: function (selectedOption) {
                     selectRegistry(dialog, selectedOption, bucketCombo, 
flowCombo, selectBucket, bucketCheck)
@@ -296,14 +290,8 @@
                 }
             }
 
-            // determine the max bucket height
-            var windowHeight = $(window).height();
-            var bucketOffset = $('#import-flow-version-bucket-combo').offset();
-            var bucketMaxHeight = windowHeight - bucketOffset.top - 64;
-
             // load the buckets
             bucketCombo.combo('destroy').combo({
-                maxHeight: bucketMaxHeight,
                 options: buckets,
                 select: selectBucket
             });
@@ -902,14 +890,8 @@
                 });
             }
 
-            // determine the max flow height
-            var windowHeight = $(window).height();
-            var flowOffset = $('#import-flow-version-name-combo').offset();
-            var flowMaxHeight = windowHeight - flowOffset.top - 64;
-
             // load the buckets
             $('#import-flow-version-name-combo').combo('destroy').combo({
-                maxHeight: flowMaxHeight,
                 options: versionedFlows,
                 select: function (selectedFlow) {
                     if (nfCommon.isDefinedAndNotNull(selectedFlow.value)) {

Reply via email to