exceptionfactory commented on code in PR #7117:
URL: https://github.com/apache/nifi/pull/7117#discussion_r1157337337


##########
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:
   Is it necessary to define a capturing group for the `'` character? It seems 
like the pattern could be adjusted to use a single capturing group:
   ```suggestion
               var paramRefsRegex = /#{'?([a-zA-Z0-9-_. ]+)'?}/gm;
   ```



-- 
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-unsubscr...@nifi.apache.org

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

Reply via email to