Skip to content

Commit

Permalink
fixing issues tim found
Browse files Browse the repository at this point in the history
  • Loading branch information
ppisljar committed Jun 8, 2018
1 parent 1c0c025 commit 024b516
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
9 changes: 3 additions & 6 deletions src/core_plugins/kibana/public/visualize/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,16 +245,13 @@ function VisEditor($scope, $route, timefilter, AppState, $window, kbnUrl, courie
timefilter.on('update', updateTimeRange);

// update the searchSource when filters update
$scope.$listen(queryFilter, 'update', function () {
savedVis.searchSource.set('filter', $scope.state.filters);
$state.save();
$scope.vis.forceReload();
});
$scope.$listen(queryFilter, 'update', $scope.fetch);

// update the searchSource when query updates
$scope.fetch = function () {
savedVis.searchSource.set('query', $scope.state.query);
$state.save();
savedVis.searchSource.set('query', $state.query);
savedVis.searchSource.set('filter', $scope.state.filters);
$scope.vis.forceReload();
};

Expand Down
3 changes: 1 addition & 2 deletions src/ui/public/vis/request_handlers/courier.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ const CourierRequestHandlerProvider = function (Private, courier, timefilter) {
return vis.onSearchRequestStart(searchSource, searchRequest);
});

// Add the explicit passed timeRange as a filter to the requestSearchSource.
requestSearchSource.filter(() => {
timeFilterSearchSource.filter(() => {
return timefilter.get(searchSource.get('index'), timeRange);
});

Expand Down

0 comments on commit 024b516

Please sign in to comment.