mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 10:23:14 -04:00
[ML] Fixes retaining the swimlane selection on a timefilter refresh.
This commit is contained in:
parent
c9a870bc43
commit
3d1c43d331
2 changed files with 5 additions and 8 deletions
|
@ -267,6 +267,7 @@ export const Explorer = injectI18n(injectObservablesAsProps(
|
||||||
stateUpdate.indexPattern = indexPattern;
|
stateUpdate.indexPattern = indexPattern;
|
||||||
|
|
||||||
this.updateExplorer(stateUpdate, true);
|
this.updateExplorer(stateUpdate, true);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Listen for changes to job selection.
|
// Listen for changes to job selection.
|
||||||
|
@ -313,17 +314,20 @@ export const Explorer = injectI18n(injectObservablesAsProps(
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateExplorer(stateUpdate, true);
|
this.updateExplorer(stateUpdate, true);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// RELOAD reloads full Anomaly Explorer and clears the selection.
|
// RELOAD reloads full Anomaly Explorer and clears the selection.
|
||||||
if (action === EXPLORER_ACTION.RELOAD) {
|
if (action === EXPLORER_ACTION.RELOAD) {
|
||||||
this.props.appStateHandler(APP_STATE_ACTION.CLEAR_SELECTION);
|
this.props.appStateHandler(APP_STATE_ACTION.CLEAR_SELECTION);
|
||||||
this.updateExplorer({ ...payload, ...getClearedSelectedAnomaliesState() }, true);
|
this.updateExplorer({ ...payload, ...getClearedSelectedAnomaliesState() }, true);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// REDRAW reloads Anomaly Explorer and tries to retain the selection.
|
// REDRAW reloads Anomaly Explorer and tries to retain the selection.
|
||||||
if (action === EXPLORER_ACTION.REDRAW) {
|
if (action === EXPLORER_ACTION.REDRAW) {
|
||||||
this.updateExplorer({}, false);
|
this.updateExplorer({}, false);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
} else if (this.previousSwimlaneLimit !== this.props.swimlaneLimit) {
|
} else if (this.previousSwimlaneLimit !== this.props.swimlaneLimit) {
|
||||||
this.previousSwimlaneLimit = this.props.swimlaneLimit;
|
this.previousSwimlaneLimit = this.props.swimlaneLimit;
|
||||||
|
|
|
@ -198,7 +198,7 @@ module.controller('MlExplorerController', function (
|
||||||
|
|
||||||
subscriptions.add(mlTimefilterRefresh$.subscribe(() => {
|
subscriptions.add(mlTimefilterRefresh$.subscribe(() => {
|
||||||
if ($scope.jobSelectionUpdateInProgress === false) {
|
if ($scope.jobSelectionUpdateInProgress === false) {
|
||||||
explorer$.next({ action: EXPLORER_ACTION.RELOAD });
|
explorer$.next({ action: EXPLORER_ACTION.REDRAW });
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -209,13 +209,6 @@ module.controller('MlExplorerController', function (
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add a watcher for auto-refresh of the time filter to refresh all the data.
|
|
||||||
subscriptions.add(mlTimefilterRefresh$.subscribe(() => {
|
|
||||||
if ($scope.jobSelectionUpdateInProgress === false) {
|
|
||||||
explorer$.next({ action: EXPLORER_ACTION.RELOAD });
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
subscriptions.add(subscribeAppStateToObservable(AppState, 'mlShowCharts', showCharts$, () => $rootScope.$applyAsync()));
|
subscriptions.add(subscribeAppStateToObservable(AppState, 'mlShowCharts', showCharts$, () => $rootScope.$applyAsync()));
|
||||||
subscriptions.add(subscribeAppStateToObservable(AppState, 'mlSelectInterval', interval$, () => $rootScope.$applyAsync()));
|
subscriptions.add(subscribeAppStateToObservable(AppState, 'mlSelectInterval', interval$, () => $rootScope.$applyAsync()));
|
||||||
subscriptions.add(subscribeAppStateToObservable(AppState, 'mlSelectSeverity', severity$, () => $rootScope.$applyAsync()));
|
subscriptions.add(subscribeAppStateToObservable(AppState, 'mlSelectSeverity', severity$, () => $rootScope.$applyAsync()));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue