mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
adding scope appy back (#14269)
This commit is contained in:
parent
44a71071ac
commit
51b6b51aac
4 changed files with 7 additions and 8 deletions
|
@ -21,4 +21,4 @@
|
||||||
class="visualize-chart"></div>
|
class="visualize-chart"></div>
|
||||||
<visualize-legend aria-hidden="{{!vis.type.isAccessible}}" ng-if="addLegend"></visualize-legend>
|
<visualize-legend aria-hidden="{{!vis.type.isAccessible}}" ng-if="addLegend"></visualize-legend>
|
||||||
</div>
|
</div>
|
||||||
<visualize-spy ng-if="shouldShowSpyPanel()"></visualize-spy>
|
<visualize-spy ng-if="showSpyPanel"></visualize-spy>
|
||||||
|
|
|
@ -35,10 +35,6 @@ uiModules
|
||||||
|
|
||||||
$scope.addLegend = false;
|
$scope.addLegend = false;
|
||||||
|
|
||||||
$scope.shouldShowSpyPanel = () => {
|
|
||||||
return $scope.vis.type.requiresSearch && $scope.showSpyPanel;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Show no results message when isZeroHits is true and it requires search
|
// Show no results message when isZeroHits is true and it requires search
|
||||||
$scope.showNoResultsMessage = function () {
|
$scope.showNoResultsMessage = function () {
|
||||||
const requiresSearch = _.get($scope, 'vis.type.requiresSearch');
|
const requiresSearch = _.get($scope, 'vis.type.requiresSearch');
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
ui-state="uiState"
|
ui-state="uiState"
|
||||||
class="vis-editor-content"
|
class="vis-editor-content"
|
||||||
search-source="savedObj.searchSource"
|
search-source="savedObj.searchSource"
|
||||||
show-spy-panel="showSpyPanel"
|
show-spy-panel="shouldShowSpyPanel()"
|
||||||
/>
|
/>
|
||||||
<visualization
|
<visualization
|
||||||
ng-if="editorMode==false"
|
ng-if="editorMode==false"
|
||||||
|
@ -15,6 +15,6 @@
|
||||||
vis-data="visData"
|
vis-data="visData"
|
||||||
ui-state="uiState"
|
ui-state="uiState"
|
||||||
search-source="savedObj.searchSource"
|
search-source="savedObj.searchSource"
|
||||||
show-spy-panel="showSpyPanel"
|
show-spy-panel="shouldShowSpyPanel()"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,10 @@ uiModules
|
||||||
}
|
}
|
||||||
|
|
||||||
// spy panel is supported only with courier request handler
|
// spy panel is supported only with courier request handler
|
||||||
if (!$scope.vis.type.requestHandler !== 'courier') $scope.showSpyPanel = false;
|
$scope.shouldShowSpyPanel = () => {
|
||||||
|
if ($scope.vis.type.requestHandler !== 'courier') return false;
|
||||||
|
return $scope.vis.type.requiresSearch && $scope.showSpyPanel;
|
||||||
|
};
|
||||||
|
|
||||||
if (!$scope.appState) $scope.appState = getAppState();
|
if (!$scope.appState) $scope.appState = getAppState();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue