mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[ML] Fixes race condition related to view by swimlane update. (#28990)
Fixes a race condition where the view-by swimlane would stay empty after switching the view-by field in the dropdown.
This commit is contained in:
parent
8cc8679355
commit
d819e3347a
3 changed files with 10 additions and 1 deletions
|
@ -84,7 +84,6 @@
|
|||
|
||||
<div
|
||||
class="ml-explorer-swimlane euiText"
|
||||
ng-if="showViewBySwimlane"
|
||||
ng-mouseenter="setSwimlaneSelectActive(true)"
|
||||
ng-mouseleave="setSwimlaneSelectActive(false)"
|
||||
>
|
||||
|
|
|
@ -376,6 +376,7 @@ module.controller('MlExplorerController', function (
|
|||
return {
|
||||
chartWidth: $scope.swimlaneWidth,
|
||||
MlTimeBuckets: TimeBuckets,
|
||||
showViewBySwimlane: $scope.showViewBySwimlane,
|
||||
swimlaneData: getSwimlaneData(swimlaneType),
|
||||
swimlaneType,
|
||||
selection: $scope.appState.mlExplorerSwimlane
|
||||
|
|
|
@ -20,6 +20,8 @@ const module = uiModules.get('apps/ml');
|
|||
|
||||
import { mlExplorerDashboardService } from './explorer_dashboard_service';
|
||||
|
||||
import { SWIMLANE_TYPE } from './explorer_constants';
|
||||
|
||||
module.directive('mlExplorerSwimlane', function () {
|
||||
|
||||
function link(scope, element) {
|
||||
|
@ -33,6 +35,13 @@ module.directive('mlExplorerSwimlane', function () {
|
|||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
scope.swimlaneType === SWIMLANE_TYPE.VIEW_BY &&
|
||||
props.showViewBySwimlane === false
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
ReactDOM.render(
|
||||
React.createElement(ExplorerSwimlane, props),
|
||||
element[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue