From aedab1840bf63032baa27f60805580fd0cded325 Mon Sep 17 00:00:00 2001 From: Stacey Gammon Date: Wed, 9 Aug 2017 10:39:04 -0400 Subject: [PATCH] Intentionally show spy pane in full screen mode, but not embed mode (#13395) (#13415) --- .../visualize/embeddable/visualize_embeddable_handler.js | 5 ++++- .../public/visualize/embeddable/visualize_template.html | 2 +- src/ui/public/chrome/api/controls.js | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/core_plugins/kibana/public/visualize/embeddable/visualize_embeddable_handler.js b/src/core_plugins/kibana/public/visualize/embeddable/visualize_embeddable_handler.js index 8bb5c6e9ccd8c..f2ba4e26bdd81 100644 --- a/src/core_plugins/kibana/public/visualize/embeddable/visualize_embeddable_handler.js +++ b/src/core_plugins/kibana/public/visualize/embeddable/visualize_embeddable_handler.js @@ -45,7 +45,10 @@ export class VisualizeEmbeddableHandler extends EmbeddableHandler { visualizeScope.savedObj.vis.listeners.click = this.filterBarClickHandler(container.getAppState()); visualizeScope.savedObj.vis.listeners.brush = this.brushEvent(container.getAppState()); - visualizeScope.isFullScreenMode = !chrome.getVisible(); + + // The chrome is permanently hidden in "embed mode" in which case we don't want to show the spy pane, since + // we deem that situation to be more public facing and want to hide more detailed information. + visualizeScope.getShouldShowSpyPane = () => !chrome.getIsChromePermanentlyHidden(); container.registerPanelIndexPattern(panel.panelIndex, visualizeScope.savedObj.vis.indexPattern); diff --git a/src/core_plugins/kibana/public/visualize/embeddable/visualize_template.html b/src/core_plugins/kibana/public/visualize/embeddable/visualize_template.html index 4a7d8fd6481a5..c15cbe656f6df 100644 --- a/src/core_plugins/kibana/public/visualize/embeddable/visualize_template.html +++ b/src/core_plugins/kibana/public/visualize/embeddable/visualize_template.html @@ -1,5 +1,5 @@ { + return permanentlyHideChrome; + }; + /** * @param {boolean} display - should the chrome be displayed * @return {chrome}