diff --git a/src/ui/public/visualize/visualization.html b/src/ui/public/visualize/visualization.html index b2b9725dc2dc9..a6da0ee3dfdf5 100644 --- a/src/ui/public/visualize/visualization.html +++ b/src/ui/public/visualize/visualization.html @@ -21,4 +21,4 @@

No results found

class="visualize-chart"> - + diff --git a/src/ui/public/visualize/visualization.js b/src/ui/public/visualize/visualization.js index d37f2b57b7232..d3f19fbf57c5a 100644 --- a/src/ui/public/visualize/visualization.js +++ b/src/ui/public/visualize/visualization.js @@ -35,6 +35,10 @@ uiModules $scope.addLegend = false; + $scope.shouldShowSpyPanel = () => { + return $scope.vis.type.requiresSearch && $scope.showSpyPanel; + }; + // Show no results message when isZeroHits is true and it requires search $scope.showNoResultsMessage = function () { const requiresSearch = _.get($scope, 'vis.type.requiresSearch'); diff --git a/src/ui/public/visualize/visualize.js b/src/ui/public/visualize/visualize.js index 54f61097b12f6..7a6c5abbf94cc 100644 --- a/src/ui/public/visualize/visualize.js +++ b/src/ui/public/visualize/visualize.js @@ -67,6 +67,11 @@ uiModules }); } + // spy panel is supported only with courier request handler + if (!$scope.vis.type.requestHandler !== 'courier') $scope.showSpyPanel = false; + + if (!$scope.appState) $scope.appState = getAppState(); + const requestHandler = getHandler(requestHandlers, $scope.vis.type.requestHandler); const responseHandler = getHandler(responseHandlers, $scope.vis.type.responseHandler);