-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refine filter mechanism #6672
Comments
Fix modules redirections with predefined filters via URLTasks
Current solution
<EuiButtonEmpty
iconType='popout'
aria-label='popout'
href={getCore().application.getUrlForApp(threatHunting.id, {
path: `#/overview/?tab=general&tabView=panels&addRuleFilter=1001`
})}
target='blank'
>
View alerts of this Rule
</EuiButtonEmpty>
const regex = new RegExp('addRuleFilter=' + '[^&]*');
const match = this.$window.location.href.match(regex);
if (match && match[0]) {
const id = match[0].split('=')[1];
let filter = filterHandler.ruleIdQuery(id);
filter.$state.isImplicit = false;
filters.push(filter);
this.$window.location.href = this.$window.location.href.replace(
regex,
'',
);
} Disadvantages
# Possible solutions
// redirect manager or something
redirector.redirectToApp({
tab: 'general',
tabView: 'panels',
applicationId: 'threat-hunting',
filters: [{ key: 'rule.id', value: '1001' }]
}) Then this service construct the URL with the params like:
ProblemWhen the URL is refreshed using enter or F5 the a_ content is cleaned
For instance: getCore().application.getUrlForApp(threatHunting.id, {
path: `#/overview/?tab=general&tabView=panels&filters='ruleId=1001&ruleMitreId=T100`
}) Then, when the data source is loaded the data source filter manager gets the query params, creates the filters and add on it. |
Proposals to display implicit filters in the search barCurrently, to display the implicit filters, the search bar component native to OpenSearch is manipulated and the close buttons for the filter badges are removed. This practice sometimes results in incorrect functionality because we are interfering with the behavior of a component outside our control. To achieve a stable behavior for displaying implicit filters, the following alternatives are proposed.
Option 1: Show all implicit filters
|
Description
After testing all main features integrated we detected some odd behaviors that need fixing.
Tasks
The text was updated successfully, but these errors were encountered: