Skip to content
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

Remove implicit filter from search bar UI #6174

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ All notable changes to the Wazuh app project will be documented in this file.

- Removed the `disabled_roles` and `customization.logo.sidebar` settings [#5840](https://github.com/wazuh/wazuh-dashboard-plugins/pull/5840)
- Removed the ability to configure the visibility of modules and removed `extensions.*` settings [#5840](https://github.com/wazuh/wazuh-dashboard-plugins/pull/5840)
- Removed the implicit filter of WQL language of the search bar UI [#6174](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6174)

## Wazuh v4.7.1 - OpenSearch Dashboards 2.8.0 - Revision 01

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,46 +17,6 @@ exports[`SearchBar component Renders correctly to match the snapshot of query la
<div
class="euiFormControlLayout euiFormControlLayout--fullWidth euiFormControlLayout--group"
>
<div
class="euiPopover euiPopover--anchorDownCenter euiFormControlLayout__prepend"
>
<div
class="euiPopover__anchor"
>
<button
class="euiButtonEmpty euiButtonEmpty--primary"
type="button"
>
<span
class="euiButtonContent euiButtonEmpty__content"
>
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon--inherit euiIcon-isLoading euiButtonContent__icon"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
/>
<span
class="euiButtonEmpty__text"
>
<span
class="euiCodeBlock euiCodeBlock--fontSmall euiCodeBlock--paddingLarge euiCodeBlock--inline prismjs language-none"
>
<code
class="euiCodeBlock__code"
>
id!=000 and
</code>
</span>
</span>
</span>
</button>
</div>
</div>
<div
class="euiFormControlLayout__childrenWrapper"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ describe('SearchBar component', () => {
const wrapper = render(<SearchBar {...componentProps} />);

await waitFor(() => {
const elementImplicitQuery = wrapper.container.querySelector(
'.euiCodeBlock__code',
);
expect(elementImplicitQuery?.innerHTML).toEqual('id!=000 and ');
expect(wrapper.container).toMatchSnapshot();
});
});
Expand Down
32 changes: 0 additions & 32 deletions plugins/main/public/components/search-bar/query-language/wql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1156,38 +1156,6 @@ export const WQL = {
);
}
},
prepend: implicitQueryAsQL ? (
<EuiPopover
button={
<EuiButtonEmpty
onClick={() =>
params.setQueryLanguageConfiguration(state => ({
...state,
isOpenPopoverImplicitFilter:
!state.isOpenPopoverImplicitFilter,
}))
}
iconType='filter'
>
<EuiCode>{implicitQueryAsQL}</EuiCode>
</EuiButtonEmpty>
}
isOpen={
params.queryLanguage.configuration.isOpenPopoverImplicitFilter
}
closePopover={() =>
params.setQueryLanguageConfiguration(state => ({
...state,
isOpenPopoverImplicitFilter: false,
}))
}
>
<EuiText>
Implicit query: <EuiCode>{implicitQueryAsQL}</EuiCode>
</EuiText>
<EuiText color='subdued'>This query is added to the input.</EuiText>
</EuiPopover>
) : null,
// Disable the focus trap in the EuiInputPopover.
// This causes when using the Search suggestion, the suggestion popover can be closed.
// If this is disabled, then the suggestion popover is open after a short time for this
Expand Down
Loading