diff --git a/src/core_plugins/metrics/public/kbn_vis_types/request_handler.js b/src/core_plugins/metrics/public/kbn_vis_types/request_handler.js index 41b296ed0bc3e..839b79c56fcf1 100644 --- a/src/core_plugins/metrics/public/kbn_vis_types/request_handler.js +++ b/src/core_plugins/metrics/public/kbn_vis_types/request_handler.js @@ -7,7 +7,7 @@ const MetricsRequestHandlerProvider = function (Private, Notifier, config, timef return { name: 'metrics', - handler: function (vis /*, appState, uiState*/) { + handler: function (vis /*, appState, uiState, queryFilter*/) { return new Promise((resolve) => { const panel = vis.params; diff --git a/src/core_plugins/timelion/public/vis/timelion_request_handler.js b/src/core_plugins/timelion/public/vis/timelion_request_handler.js index 312de599a3bd0..978c7d4163cd1 100644 --- a/src/core_plugins/timelion/public/vis/timelion_request_handler.js +++ b/src/core_plugins/timelion/public/vis/timelion_request_handler.js @@ -11,7 +11,7 @@ const TimelionRequestHandlerProvider = function (Private, Notifier, $http, $root return { name: 'timelion', - handler: function (vis /*, appState, uiState */) { + handler: function (vis /*, appState, uiState, queryFilter*/) { return new Promise((resolve, reject) => { console.log('[timelion] get'); diff --git a/src/ui/public/vis/request_handlers/courier.js b/src/ui/public/vis/request_handlers/courier.js index 774a1de9eb955..2d79342d3dd3a 100644 --- a/src/ui/public/vis/request_handlers/courier.js +++ b/src/ui/public/vis/request_handlers/courier.js @@ -5,7 +5,7 @@ import { VisRequestHandlersRegistryProvider } from 'ui/registry/vis_request_hand const CourierRequestHandlerProvider = function (Private, courier, timefilter) { return { name: 'courier', - handler: function (vis, appState, uiState, searchSource, queryFilter) { + handler: function (vis, appState, uiState, queryFilter, searchSource) { if (queryFilter && vis.editorMode) { diff --git a/src/ui/public/visualize/visualize.js b/src/ui/public/visualize/visualize.js index e2b789bbffc8d..a97422455ff62 100644 --- a/src/ui/public/visualize/visualize.js +++ b/src/ui/public/visualize/visualize.js @@ -55,7 +55,7 @@ uiModules $scope.fetch = _.debounce(function () { // searchSource is only there for courier request handler - requestHandler($scope.vis, $scope.appState, $scope.uiState, $scope.savedObj.searchSource, queryFilter) + requestHandler($scope.vis, $scope.appState, $scope.uiState, queryFilter, $scope.savedObj.searchSource) .then(requestHandlerResponse => { //No need to call the response handler when there have been no data nor has been there changes @@ -106,9 +106,7 @@ uiModules $scope.$on('courier:searchRefresh', reload); // dashboard will fire fetch event when it wants to refresh $scope.$on('fetch', reload); - queryFilter.on('update', () => { - $scope.fetch(); - }); + queryFilter.on('update', $scope.fetch); if ($scope.appState) { let oldUiState;