Skip to content

Commit

Permalink
Restored query from search bar in visualizations
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesús Ángel committed Aug 14, 2019
1 parent 82f0f32 commit 439128f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion public/kibana-integrations/kibana-discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,6 @@ function discoverController(
queryFilter.getFilters()
);
$rootScope.$broadcast('updateVis');
$rootScope.$broadcast('fetch');
if ($location.search().tab != 'configuration') {
loadedVisualizations.removeAll();
$rootScope.rendered = false;
Expand Down Expand Up @@ -648,7 +647,12 @@ function discoverController(
$scope.updateQueryAndFetch = function({ query, dateRange }) {
// Wazuh filters are not ready yet
if (!filtersAreReady()) return;

// Update query from search bar
discoverPendingUpdates.removeAll();
discoverPendingUpdates.addItem($state.query, queryFilter.getFilters());
$rootScope.$broadcast('updateVis');

timefilter.setTime(dateRange);
if (query) $state.query = query;
$scope.fetch();
Expand Down

0 comments on commit 439128f

Please sign in to comment.