You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "mtien-apache (via GitHub)" <gi...@apache.org> on 2023/04/05 19:26:27 UTC

[GitHub] [nifi] mtien-apache commented on a diff in pull request #7117: NIFI-11287: detect dependent properties when the property it depends on references a parameter (UI)

mtien-apache commented on code in PR #7117:
URL: https://github.com/apache/nifi/pull/7117#discussion_r1158927643


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js:
##########
@@ -2001,6 +2021,43 @@
         propertyData.setItems([]);
     };
 
+    /**
+     * Gets all the referenced parameters from the {parameterContext} based on the value of {parameterReference} with matching {sensitive} property
+     *
+     * @param {string} parameterReference
+     * @param {ParameterContextEntity} parameterContext
+     * @param {boolean} sensitive
+     * @returns {ParameterEntity[]}
+     */
+    var getExistingParametersReferenced = function (parameterReference, parameterContext, sensitive) {
+        var parameters = _.get(parameterContext.component, 'parameters', []);
+        var existingParametersReferenced = [];
+
+        if (!_.isNil(parameterReference) && !_.isEmpty(parameters)) {
+            // can't use from common/constants because we are modifying the lastIndex below
+            var paramRefsRegex = /#{(')?([a-zA-Z0-9-_. ]+)\1}/gm;

Review Comment:
   @exceptionfactory It's not necessary to define a separate capturing group for `'`. I updated this block of code.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org