You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/05/25 14:42:23 UTC

[GitHub] [nifi] mcgilman commented on a diff in pull request #6073: NIFI-9959 Add UI Support for Sensitive Dynamic Properties

mcgilman commented on code in PR #6073:
URL: https://github.com/apache/nifi/pull/6073#discussion_r881738432


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js:
##########
@@ -2115,32 +2143,36 @@
                                         var row = propertyData.getRowById(id);
                                         propertyGrid.setActiveCell(row, propertyGrid.getColumnIndex('value'));
                                         propertyGrid.editActiveCell();
-                                    });
-                                } else {
-                                    // if this row is currently hidden, clear the value and show it
-                                    if (existingItem.hidden === true) {
-                                        propertyData.updateItem(existingItem.id, $.extend(existingItem, {
-                                            hidden: false,
-                                            previousValue: null,
-                                            value: null
-                                        }));
-
-                                        // select the new properties row
-                                        var row = propertyData.getRowById(existingItem.id);
-                                        propertyGrid.setActiveCell(row, propertyGrid.getColumnIndex('value'));
-                                        propertyGrid.editActiveCell();
                                     } else {
-                                        nfDialog.showOkDialog({
-                                            headerText: 'Property Exists',
-                                            dialogContent: 'A property with this name already exists.'
-                                        });
-
-                                        // select the existing properties row
-                                        var row = propertyData.getRowById(existingItem.id);
-                                        propertyGrid.setSelectedRows([row]);
-                                        propertyGrid.scrollRowIntoView(row);
+                                        // if this row is currently hidden, clear the value and show it
+                                        if (existingItem.hidden === true) {
+                                            propertyData.updateItem(existingItem.id, $.extend(existingItem, {
+                                                hidden: false,
+                                                previousValue: null,
+                                                value: null
+                                            }));
+
+                                            // select the new properties row
+                                            var row = propertyData.getRowById(existingItem.id);
+                                            propertyGrid.setActiveCell(row, propertyGrid.getColumnIndex('value'));
+                                            propertyGrid.editActiveCell();
+                                            propertyGrid.invalidateRow(row);
+                                            propertyGrid.render();

Review Comment:
   I believe calls to `invalidateRow` and `render` are preventing the `editActiveCell` from opening the editor for this row.



##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js:
##########
@@ -2028,17 +2045,26 @@
                         var newPropertyDialogMarkup =
                             '<div id="new-property-dialog" class="dialog cancellable small-dialog hidden">' +
                                 '<div class="dialog-content">' +
-                                    '<div>' +
-                                    '<div class="setting-name">Property name</div>' +
+                                    '<div class="setting">' +
+                                        '<div class="setting-name">Property name</div>' +
                                         '<div class="setting-field new-property-name-container">' +
                                             '<input class="new-property-name" type="text"/>' +
                                         '</div>' +
                                     '</div>' +
+                                    '<div class="setting">' +
+                                        '<div class="setting-field new-property-sensitive-value-container">' +
+                                            '<div class="setting-name">Sensitive Value</div>' +

Review Comment:
   Can we add a tooltip icon here to provide guidance regarding this feature? Specifically, when it's supported and when the user is able to drive the sensitivity of the dynamic property.



-- 
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