mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-06 09:55:18 +00:00
Merge pull request #1049 from wazuh/issue-964
Reset timefilter auto-refresh feature when not in visualization tabs
This commit is contained in:
commit
89f7099acf
@ -69,6 +69,7 @@ export class AgentsController {
|
||||
}
|
||||
|
||||
$onInit() {
|
||||
timefilter.setRefreshInterval({pause:true,value:0})
|
||||
this.$scope.TabDescription = TabDescription;
|
||||
|
||||
this.$rootScope.reportStatus = false;
|
||||
@ -321,12 +322,7 @@ export class AgentsController {
|
||||
// Switch tab
|
||||
async switchTab(tab, force = false) {
|
||||
if (this.ignoredTabs.includes(tab)) {
|
||||
const timeFilterRefreshStatus = timefilter.getRefreshInterval();
|
||||
const toggle =
|
||||
timeFilterRefreshStatus &&
|
||||
timeFilterRefreshStatus.value &&
|
||||
!timeFilterRefreshStatus.pause;
|
||||
if (toggle) timefilter.toggleRefresh();
|
||||
timefilter.setRefreshInterval({pause:true,value:0})
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Find more information about this on the LICENSE file.
|
||||
*/
|
||||
import { FilterHandler } from '../../utils/filter-handler';
|
||||
import { timefilter } from 'ui/timefilter';
|
||||
|
||||
export function ClusterController(
|
||||
$scope,
|
||||
@ -27,6 +28,7 @@ export function ClusterController(
|
||||
appState,
|
||||
genericReq
|
||||
) {
|
||||
timefilter.setRefreshInterval({pause:true,value:0})
|
||||
$scope.search = term => {
|
||||
$scope.$broadcast('wazuhSearch', { term });
|
||||
};
|
||||
|
@ -25,6 +25,7 @@ import {
|
||||
} from '../../utils/overview-metrics';
|
||||
|
||||
import { queryConfig } from '../../services/query-config';
|
||||
import { timefilter } from 'ui/timefilter';
|
||||
|
||||
export class OverviewController {
|
||||
constructor(
|
||||
@ -54,6 +55,7 @@ export class OverviewController {
|
||||
}
|
||||
|
||||
$onInit() {
|
||||
timefilter.setRefreshInterval({pause:true,value:0})
|
||||
this.wodlesConfiguration = false;
|
||||
this.TabDescription = TabDescription;
|
||||
this.$rootScope.reportStatus = false;
|
||||
@ -211,6 +213,10 @@ export class OverviewController {
|
||||
// Switch tab
|
||||
async switchTab(newTab, force = false) {
|
||||
try {
|
||||
if(newTab === 'welcome') {
|
||||
timefilter.setRefreshInterval({pause:true,value:0})
|
||||
}
|
||||
|
||||
if (newTab !== 'welcome') {
|
||||
await this.fetchWodles();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user