NIFI-13853: Added the ability to filter by all to the Advanced Rules page (#9371)

* NIFI-13853: Added the ability to filter by all to the Advanced Rules pag

* NIFI-13853: Fixed formatting

* NIFI-13853: Removed labels in filter by everything

Removed 'Name, Comments, Condition, Action' labels

Co-authored-by: Rob Fellows <rob.fellows@gmail.com>

* NIFI-13853: Fixed indentation

* NIFI-13853:Fixed the indentation

For some reason my last commit didn't fix the indentation

---------

Co-authored-by: Rob Fellows <rob.fellows@gmail.com>

This closes #9371
This commit is contained in:
Hunter Goller 2024-10-21 16:46:56 -04:00 committed by GitHub
parent 39ca75d868
commit d693293c43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 22 additions and 1 deletions

View File

@ -201,6 +201,9 @@ var ua = {
}, {
text: 'by action',
value: 'action'
}, {
text: 'by any field',
value: 'any'
}],
select: function (option) {
ua.applyRuleFilter();
@ -1484,14 +1487,32 @@ var ua = {
conditions.push(condition.expression);
});
return conditions;
} else {
} else if (filterType.value === 'action') {
var actions = [];
$.each(rule.actions, function (_, action) {
actions.push(action.attribute);
actions.push(action.value);
});
return actions;
} else if (filterType.value === 'any') {
// Return all relevant details for the rule
var allDetails = [];
allDetails.push(rule.name);
allDetails.push(rule.comments);
// Add conditions
$.each(rule.conditions, function (_, condition) {
allDetails.push(condition.expression);
});
// Add actions
$.each(rule.actions, function (_, action) {
allDetails.push(action.attribute);
allDetails.push(action.value);
});
return allDetails;
}
return [];
},
/**