Skip to content

Commit

Permalink
[ML] Adds applyAsync to updates in the Data Visualizer (#28241) (#28328)
Browse files Browse the repository at this point in the history
  • Loading branch information
peteharverson authored Jan 9, 2019
1 parent 1146eb9 commit 88b6fa8
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { SearchItemsProvider } from 'plugins/ml/jobs/new_job/utils/new_job_utils
import { loadCurrentIndexPattern, loadCurrentSavedSearch, timeBasedIndexCheck } from 'plugins/ml/util/index_utils';
import { checkMlNodesAvailable } from 'plugins/ml/ml_nodes_check/check_ml_nodes';
import { ml } from 'plugins/ml/services/ml_api_service';
import { initPromise } from 'plugins/ml/util/promise';
import template from './datavisualizer.html';

uiRoutes
Expand All @@ -41,8 +40,7 @@ uiRoutes
privileges: checkGetJobsPrivilege,
indexPattern: loadCurrentIndexPattern,
savedSearch: loadCurrentSavedSearch,
checkMlNodesAvailable,
initPromise: initPromise(true)
checkMlNodesAvailable
}
});

Expand Down Expand Up @@ -499,6 +497,9 @@ module
notify.error(`Error loading data for metrics in index ${indexPattern.title}. ${err.message}`,
{ lifetime: 30000 });
}
})
.then(() => {
$scope.$applyAsync();
});

}
Expand Down Expand Up @@ -550,6 +551,9 @@ module
notify.error(`Error loading data for fields in index ${indexPattern.title}. ${err.message}`,
{ lifetime: 30000 });
}
})
.then(() => {
$scope.$applyAsync();
});
} else {
$scope.fieldFilterIcon = 0;
Expand Down Expand Up @@ -600,6 +604,9 @@ module
notify.error(`Error loading data for fields in index ${indexPattern.title}. ${err.message}`,
{ lifetime: 30000 });
}

$scope.$applyAsync();

});

}
Expand Down

0 comments on commit 88b6fa8

Please sign in to comment.