Skip to content

Commit

Permalink
Fix lose of filters in FIM
Browse files Browse the repository at this point in the history
  • Loading branch information
juankaromo authored and Jesús Ángel committed Aug 19, 2019
1 parent 20cb4c5 commit 4077345
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions public/controllers/agent/agents.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@ export class AgentsController {
this.$scope.showSyscheckFiles = !this.$scope.showSyscheckFiles;
if (!this.$scope.showSyscheckFiles) {
this.$scope.$emit('changeTabView', {
tabView: this.$scope.tabView
tabView: this.$scope.tabView,
sameSection: true
});
}
this.$scope.$applyAsync();
Expand All @@ -393,7 +394,8 @@ export class AgentsController {
this.$scope.showScaScan = !this.$scope.showScaScan;
if (!this.$scope.showScaScan) {
this.$scope.$emit('changeTabView', {
tabView: this.$scope.tabView
tabView: this.$scope.tabView,
sameSection: true
});
}
this.$scope.$applyAsync();
Expand Down
4 changes: 3 additions & 1 deletion public/controllers/overview/overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ export class OverviewController {
localChange || preserveDiscover
);
} else {
this.$scope.$emit('changeTabView', { tabView: this.tabView });
this.$scope.$emit('changeTabView', {
tabView: this.tabView
});
}

this.checkMetrics(this.tab, subtab);
Expand Down
3 changes: 2 additions & 1 deletion public/kibana-integrations/kibana-discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -1041,11 +1041,12 @@ function discoverController(
'changeTabView',
(evt, parameters) => {
$scope.pinnedFilters = getPinnedFilters();
if (parameters.tabView !== 'discover') {
if (parameters.tabView !== 'discover' && !parameters.sameSection ) {
queryFilter.removeAll();
}
evt.stopPropagation();
$scope.tabView = parameters.tabView || 'panels';
$scope.tab = parameters.tab;
}
);

Expand Down

0 comments on commit 4077345

Please sign in to comment.