diff --git a/CHANGELOG.md b/CHANGELOG.md index eb3377ac25..0a3c6fcec5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ All notable changes to the Wazuh app project will be documented in this file. - Fix Security events table is empty when switching the pinned agents [#2956](https://github.com/wazuh/wazuh-kibana-app/pull/2956) - Fix disabled switch visual edit button when json content is empty [#2957](https://github.com/wazuh/wazuh-kibana-app/issues/2957) - Fixed main and `More` menus for unsupported agents [#2959](https://github.com/wazuh/wazuh-kibana-app/pull/2959) +- Fixed forcing a non numeric filter value in a number type field [#2961](https://github.com/wazuh/wazuh-kibana-app/pull/2961) - Fixed wrong number of alerts in Security Events [#2964](https://github.com/wazuh/wazuh-kibana-app/pull/2964) - Fixed search with strange characters of agent in Management groups [#2970](https://github.com/wazuh/wazuh-kibana-app/pull/2970) - Fix the statusCode error message [#2971](https://github.com/wazuh/wazuh-kibana-app/pull/2971) diff --git a/public/kibana-integrations/kibana-discover.js b/public/kibana-integrations/kibana-discover.js index 9a2bfae1e4..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, @@ -297,7 +297,19 @@ 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){ + 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(); }, },