From 5bd59b447ca134668b53a63b811bec40ec348802 Mon Sep 17 00:00:00 2001 From: Ian Yenien Serrano Date: Tue, 16 Jul 2024 20:50:33 +0200 Subject: [PATCH 1/2] Add saved queries button --- .../components/common/search-bar/search-bar.scss | 10 ++++++++++ .../components/common/search-bar/search-bar.tsx | 14 ++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/plugins/main/public/components/common/search-bar/search-bar.scss b/plugins/main/public/components/common/search-bar/search-bar.scss index a952bea825..f45d922c38 100644 --- a/plugins/main/public/components/common/search-bar/search-bar.scss +++ b/plugins/main/public/components/common/search-bar/search-bar.scss @@ -1,3 +1,13 @@ .wz-search-bar-no-padding .globalQueryBar:not(:empty) { padding: 0px !important; } + +.wz-search-bar { + > .euiFlexGroup { + &:first-child { + #GlobalFilterGroup { + display: none; + } + } + } +} diff --git a/plugins/main/public/components/common/search-bar/search-bar.tsx b/plugins/main/public/components/common/search-bar/search-bar.tsx index dcc46a3f22..4dd1a6c8d4 100644 --- a/plugins/main/public/components/common/search-bar/search-bar.tsx +++ b/plugins/main/public/components/common/search-bar/search-bar.tsx @@ -6,7 +6,6 @@ import { SearchBarProps, Filter, } from '../../../../../../src/plugins/data/public'; -import useSearchBar from './use-search-bar'; export interface WzSearchBarProps extends SearchBarProps { fixedFilters?: Filter[]; @@ -49,9 +48,7 @@ export const WzSearchBar = ({ > {preQueryBar ? {preQueryBar} : null} - + ) : null} @@ -68,10 +65,11 @@ export const WzSearchBar = ({ {fixedFilters?.map((filter, idx) => ( - {`${filter.meta.key}: ${typeof filter.meta.value === 'function' - ? filter.meta.value() - : filter.meta.value - }`} + {`${filter.meta.key}: ${ + typeof filter.meta.value === 'function' + ? filter.meta.value() + : filter.meta.value + }`} ))} From f0700fd9944bb80ca98929b00cbe2a323dfbc331 Mon Sep 17 00:00:00 2001 From: Ian Yenien Serrano Date: Wed, 17 Jul 2024 16:12:02 +0200 Subject: [PATCH 2/2] Add changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c3aa28869..8635e4b88b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,7 +42,7 @@ All notable changes to the Wazuh app project will be documented in this file. - Upgraded versions of `follow-redirects` and `es5-ext` [#6626](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6626) - Changed agent log collector socket API response controller component [#6660](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6660) - Improve margins and paddings in the Events, Inventory and Control tabs [#6708](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6708) -- Refactored the search bar to correctly handle fixed and user-added filters [#6716](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6716) [#6755](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6755) +- Refactored the search bar to correctly handle fixed and user-added filters [#6716](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6716) [#6755](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6755) [#6833](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6833) - Generate URL with predefined filters [#6745](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6745) - Migrated AngularJS routing to ReactJS [#6689](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6689) [#6775](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6775) [#6790](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6790 - Improvement of the filter management system by implementing new standard modules [#6534](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6534) [#6772](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6772)