This is an automated email from the ASF dual-hosted git repository.
rfellows pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new 227dcf5 NIFI-9777: (#5850) - Adding support to remove attributes from
verification requests.
227dcf5 is described below
commit 227dcf54566ae10648881169f5ce881fc3d28c5f
Author: Matt Gilman <[email protected]>
AuthorDate: Tue Mar 8 16:25:32 2022 -0500
NIFI-9777: (#5850) - Adding support to remove attributes from verification
requests.
This closes #5850
---
.../src/main/webapp/js/nf/canvas/nf-verify.js | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-verify.js
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-verify.js
index 0e50c83..ba39c95 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-verify.js
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-verify.js
@@ -539,6 +539,10 @@
}
};
+ var actionFormatter = function (row, cell, value, columnDef,
dataContext) {
+ return '<div title="Delete" class="delete-attribute pointer fa
fa-trash"></div>';
+ };
+
// define the column model for the referenced attributes table
var referencedAttributesColumns = [
{
@@ -557,6 +561,13 @@
sortable: true,
resizable: true,
cssClass: 'pointer'
+ },
+ {
+ id: "actions",
+ name: " ",
+ minWidth: 10,
+ width: 10,
+ formatter: actionFormatter
}
];
@@ -597,6 +608,14 @@
// prevents standard edit logic
e.stopImmediatePropagation();
+ } else if (referencedAttributesGrid.getColumns()[args.cell].id ===
'actions') {
+ var attribute = referencedAttributesData.getItem(args.row);
+
+ var target = $(e.target);
+ if (target.hasClass('delete-attribute')) {
+ // remove the attribute from the table
+ referencedAttributesData.deleteItem(attribute.id);
+ }
}
});
referencedAttributesGrid.onBeforeCellEditorDestroy.subscribe(function
(e, args) {