Skip to content

Commit

Permalink
Fix logic with spy pane toggle
Browse files Browse the repository at this point in the history
There is still a bit of a bug here as mentioned in
elastic#13340 but it will be fixed
separately as it’s also an issue in master
  • Loading branch information
stacey-gammon committed Aug 4, 2017
1 parent a685b47 commit f74cc0e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ export class DashboardContainerAPI extends ContainerAPI {
return this.dashboardState.appState;
}

getIsViewOnlyMode() {
return this.dashboardState.getIsViewMode();
}

createChildUistate(path, initialState) {
return this.dashboardState.uiState.createChild(path, initialState, true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { getPersistedStateId } from 'plugins/kibana/dashboard/panel/panel_state'
import { UtilsBrushEventProvider as utilsBrushEventProvider } from 'ui/utils/brush_event';
import { FilterBarClickHandlerProvider as filterBarClickHandlerProvider } from 'ui/filter_bar/filter_bar_click_handler';
import { EmbeddableHandler } from 'ui/embeddable';
import chrome from 'ui/chrome';

export class VisualizeEmbeddableHandler extends EmbeddableHandler {
constructor($compile, $rootScope, visualizeLoader, timefilter, Notifier, Promise) {
Expand Down Expand Up @@ -44,7 +45,7 @@ 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 = container.getIsViewOnlyMode();
visualizeScope.isFullScreenMode = !chrome.getVisible();

container.registerPanelIndexPattern(panel.panelIndex, visualizeScope.savedObj.vis.indexPattern);

Expand Down
7 changes: 0 additions & 7 deletions src/ui/public/embeddable/container_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ export class ContainerAPI {
throw new Error('Must implement getAppState.');
}

/**
* @return {boolean} If the container is marked as being in view only mode or not.
*/
getIsViewOnlyMode() {
throw new Error('Must implement getIsViewOnlyMode.');
}

/**
* Creates a new state for the panel. It's passed the ui state object to use, and is returned
* a PersistedState.
Expand Down
2 changes: 2 additions & 0 deletions test/functional/apps/dashboard/_dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ export default function ({ getService, getPageObjects }) {
});

it('shows other panels after being minimized', async () => {
// Panels are all minimized on a fresh open of a dashboard, so we need to re-expand in order to then minimize.
await PageObjects.dashboard.toggleExpandPanel();
await PageObjects.dashboard.toggleExpandPanel();
const panels = await PageObjects.dashboard.getDashboardPanels();
const visualizations = PageObjects.dashboard.getTestVisualizations();
Expand Down

0 comments on commit f74cc0e

Please sign in to comment.