[ML] Ensure Anomaly Explorer and Single View do not hang by fixing TypeError: finally is not a function (#25961)
* Replace finally with catch/then to fix typeError * update error messages
This commit is contained in:
parent
b3ef0c4eaf
commit
9ea7720b50
|
@ -264,7 +264,8 @@ module.controller('MlExplorerController', function (
|
|||
|
||||
// Populate the map of jobs / detectors / field formatters for the selected IDs.
|
||||
mlFieldFormatService.populateFormats(selectedIds, getIndexPatterns())
|
||||
.finally(() => {
|
||||
.catch((err) => { console.log('Error populating field formats:', err); })
|
||||
.then(() => {
|
||||
// Load the data - if the FieldFormats failed to populate
|
||||
// the default formatting will be used for metric values.
|
||||
loadOverallData();
|
||||
|
|
|
@ -673,9 +673,10 @@ module.controller('MlTimeSeriesExplorerController', function (
|
|||
|
||||
// Populate the map of jobs / detectors / field formatters for the selected IDs and refresh.
|
||||
mlFieldFormatService.populateFormats([jobId], getIndexPatterns())
|
||||
.finally(() => {
|
||||
// Load the data - if the FieldFormats failed to populate
|
||||
// the default formatting will be used for metric values.
|
||||
.catch((err) => { console.log('Error populating field formats:', err); })
|
||||
// Load the data - if the FieldFormats failed to populate
|
||||
// the default formatting will be used for metric values.
|
||||
.then(() => {
|
||||
$scope.refresh();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue