Avoid mget calls for every visualization after panel collapse

This will still cause the data to refresh (an msearch call).
This commit is contained in:
Stacey Gammon 2017-01-24 12:26:43 -05:00
parent 912454a31f
commit fb73d3491c
3 changed files with 6 additions and 4 deletions

View file

@ -61,7 +61,7 @@
</div>
<dashboard-grid
ng-if="!hasExpandedPanel()"
ng-show="!hasExpandedPanel()"
on-panel-removed="onPanelRemoved"
panels="state.panels"
get-vis-click-handler="filterBarClickHandler(state)"
@ -81,4 +81,6 @@
save-state="saveState"
create-child-ui-state="createChildUiState"
toggle-expand="toggleExpandPanel(expandedPanel.panelIndex)">
</dashboard-panel>
</dashboard-app>

View file

@ -217,6 +217,9 @@ app.directive('dashboardGrid', function ($compile, Notifier) {
g.min_widget_width = (g.options.widget_margins[0] * 2) + g.options.widget_base_dimensions[0];
g.min_widget_height = (g.options.widget_margins[1] * 2) + g.options.widget_base_dimensions[1];
if ($container.width() <= 0) {
return;
}
g.$widgets.each(function (i, widget) {
g.resize_widget($(widget));
});

View file

@ -4,12 +4,9 @@
{{::savedObj.title}}
</span>
<div class="btn-group">
<!--
Pulling out due to https://github.com/elastic/kibana/issues/9766. Uncomment when fixed.
<a aria-label="Expand" ng-click="toggleExpand()">
<span class="fa" ng-class="{'fa-expand': !isExpanded, 'fa-compress': isExpanded}"></span>
</a>
-->
<a aria-label="Edit" ng-show="!isFullScreenMode && editUrl" ng-href="{{::editUrl}}">
<i aria-hidden="true" class="fa fa-pencil"></i>
</a>