mirror of https://github.com/apache/nifi.git
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:
parent
39ca75d868
commit
d693293c43
|
@ -201,6 +201,9 @@ var ua = {
|
||||||
}, {
|
}, {
|
||||||
text: 'by action',
|
text: 'by action',
|
||||||
value: 'action'
|
value: 'action'
|
||||||
|
}, {
|
||||||
|
text: 'by any field',
|
||||||
|
value: 'any'
|
||||||
}],
|
}],
|
||||||
select: function (option) {
|
select: function (option) {
|
||||||
ua.applyRuleFilter();
|
ua.applyRuleFilter();
|
||||||
|
@ -1484,14 +1487,32 @@ var ua = {
|
||||||
conditions.push(condition.expression);
|
conditions.push(condition.expression);
|
||||||
});
|
});
|
||||||
return conditions;
|
return conditions;
|
||||||
} else {
|
} else if (filterType.value === 'action') {
|
||||||
var actions = [];
|
var actions = [];
|
||||||
$.each(rule.actions, function (_, action) {
|
$.each(rule.actions, function (_, action) {
|
||||||
actions.push(action.attribute);
|
actions.push(action.attribute);
|
||||||
actions.push(action.value);
|
actions.push(action.value);
|
||||||
});
|
});
|
||||||
return actions;
|
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 [];
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue