From 349ab6f14d6bf794570aaf50f730f197b6d111ae Mon Sep 17 00:00:00 2001 From: Federico Rodriguez Date: Fri, 5 Feb 2021 17:56:02 -0300 Subject: [PATCH 1/5] Filter fields empty queries --- public/kibana-integrations/kibana-discover.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/kibana-integrations/kibana-discover.js b/public/kibana-integrations/kibana-discover.js index 9a2bfae1e4..5ace5ef7d2 100644 --- a/public/kibana-integrations/kibana-discover.js +++ b/public/kibana-integrations/kibana-discover.js @@ -297,7 +297,12 @@ function discoverController( filterManager.getUpdates$(), { next: () => { - $scope.state.filters = filterManager.getAppFilters(); + //Patch empty fields + const filters = filterManager.getAppFilters(); + if(filters.filter(item=>item.meta.params.query==='').length) + filterManager.setFilters(filters.filter(item=>item.meta.params.query)); + //end of patch empty fields + $scope.state.filters = filters; $scope.updateDataSource(); }, }, From f683602992efd6293be4b1f353097007b1a3d440 Mon Sep 17 00:00:00 2001 From: Federico Rodriguez Date: Mon, 8 Feb 2021 10:17:29 -0300 Subject: [PATCH 2/5] Added toast warning when a field is empty --- public/kibana-integrations/kibana-discover.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/public/kibana-integrations/kibana-discover.js b/public/kibana-integrations/kibana-discover.js index 5ace5ef7d2..999cdc5b93 100644 --- a/public/kibana-integrations/kibana-discover.js +++ b/public/kibana-integrations/kibana-discover.js @@ -20,7 +20,7 @@ import discoverTemplate from '../templates/discover/discover.html'; import store from '../redux/store'; import { updateVis } from '../redux/actions/visualizationsActions'; -import { getAngularModule, getCore, getDiscoverModule, getPlugins } from '../kibana-services'; +import { getAngularModule, getCore, getDiscoverModule, getPlugins, getToasts } from '../kibana-services'; import { getRequestInspectorStats, getResponseInspectorStats, @@ -299,8 +299,15 @@ function discoverController( next: () => { //Patch empty fields const filters = filterManager.getAppFilters(); - if(filters.filter(item=>item.meta.params.query==='').length) + if(filters.filter(item=>item.meta.params.query==='').length){ + getToasts().add({ + color: 'warning', + title: 'Invalid field value', + text: 'The filter field contains invalid value', + toastLifeTimeMs: 10000, + }); filterManager.setFilters(filters.filter(item=>item.meta.params.query)); + } //end of patch empty fields $scope.state.filters = filters; $scope.updateDataSource(); From 898c0aa3e96e8d2f18e79d3d7edff4b3f611274e Mon Sep 17 00:00:00 2001 From: Federico Rodriguez Date: Wed, 17 Feb 2021 18:58:31 -0300 Subject: [PATCH 3/5] Added changes to changelog.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 578d33aff6..cf3a20b2b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to the Wazuh app project will be documented in this file. ### Fixed - Fix server error Invalid token specified: Cannot read property 'replace' of undefined [#2899](https://github.com/wazuh/wazuh-kibana-app/issues/2899) +- Fixed forcing a non numeric filter value in a number type field [#2961](https://github.com/wazuh/wazuh-kibana-app/pull/2961) ## Wazuh v4.0.4 - Kibana 7.10.0 , 7.10.2 - Revision 4017 From df407220c3631030ad02baebfb4f249e0c4a3bbc Mon Sep 17 00:00:00 2001 From: Toni <34042064+Desvelao@users.noreply.github.com> Date: Fri, 19 Feb 2021 11:19:00 +0100 Subject: [PATCH 4/5] fix(changelog): Moved PR in changelog --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53d6191392..ddec5ec429 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to the Wazuh app project will be documented in this file. +## Wazuh v4.1.1 - Kibana 7.10.0 , 7.10.2 - Revision 4102 + +### Fixed + +- Fixed forcing a non numeric filter value in a number type field [#2961](https://github.com/wazuh/wazuh-kibana-app/pull/2961) + ## Wazuh v4.1.0 - Kibana 7.10.0 , 7.10.2 - Revision 4101 ### Added @@ -20,7 +26,6 @@ All notable changes to the Wazuh app project will be documented in this file. ### Fixed - Fix server error Invalid token specified: Cannot read property 'replace' of undefined [#2899](https://github.com/wazuh/wazuh-kibana-app/issues/2899) -- Fixed forcing a non numeric filter value in a number type field [#2961](https://github.com/wazuh/wazuh-kibana-app/pull/2961) - Fix show empty files rules and decoders: [#2923](https://github.com/wazuh/wazuh-kibana-app/issues/2923) - Fixed wrong hover texts in CDB lists actions [#2929](https://github.com/wazuh/wazuh-kibana-app/pull/2929) - Fixed access to forbidden agents information when exporting agents listt [2918](https://github.com/wazuh/wazuh-kibana-app/pull/2918) From eec1aa2f47c179029225f440e91376854c2fbb76 Mon Sep 17 00:00:00 2001 From: Toni <34042064+Desvelao@users.noreply.github.com> Date: Fri, 19 Feb 2021 11:19:27 +0100 Subject: [PATCH 5/5] fix(changelog): Moved PR in changelog