mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[ML] Removing promise override function (#28360)
This commit is contained in:
parent
efb28f127a
commit
b443bd42da
8 changed files with 0 additions and 36 deletions
|
@ -14,7 +14,6 @@ const module = uiModules.get('apps/ml', ['react']);
|
|||
import { getDataVisualizerBreadcrumbs } from '../breadcrumbs';
|
||||
import { checkBasicLicense } from 'plugins/ml/license/check_license';
|
||||
import { checkFindFileStructurePrivilege } from 'plugins/ml/privilege/check_privilege';
|
||||
import { initPromise } from 'plugins/ml/util/promise';
|
||||
|
||||
import uiRoutes from 'ui/routes';
|
||||
|
||||
|
@ -27,7 +26,6 @@ uiRoutes
|
|||
resolve: {
|
||||
CheckLicense: checkBasicLicense,
|
||||
privileges: checkFindFileStructurePrivilege,
|
||||
initPromise: initPromise(false)
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ import { checkGetJobsPrivilege } from 'plugins/ml/privilege/check_privilege';
|
|||
import { getMlNodeCount } from 'plugins/ml/ml_nodes_check/check_ml_nodes';
|
||||
import { getJobManagementBreadcrumbs } from 'plugins/ml/jobs/breadcrumbs';
|
||||
import { loadNewJobDefaults } from 'plugins/ml/jobs/new_job/utils/new_job_defaults';
|
||||
import { initPromise } from 'plugins/ml/util/promise';
|
||||
|
||||
import uiRoutes from 'ui/routes';
|
||||
|
||||
|
@ -33,7 +32,6 @@ uiRoutes
|
|||
privileges: checkGetJobsPrivilege,
|
||||
mlNodeCount: getMlNodeCount,
|
||||
loadNewJobDefaults,
|
||||
initPromise: initPromise(false)
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ const module = uiModules.get('apps/ml', ['react']);
|
|||
import { checkFullLicense } from '../../../license/check_license';
|
||||
import { checkGetJobsPrivilege, checkPermission } from '../../../privilege/check_privilege';
|
||||
import { checkMlNodesAvailable } from '../../../ml_nodes_check/check_ml_nodes';
|
||||
import { initPromise } from 'plugins/ml/util/promise';
|
||||
import { getCreateCalendarBreadcrumbs, getEditCalendarBreadcrumbs } from '../../breadcrumbs';
|
||||
|
||||
import uiRoutes from 'ui/routes';
|
||||
|
@ -37,7 +36,6 @@ uiRoutes
|
|||
CheckLicense: checkFullLicense,
|
||||
privileges: checkGetJobsPrivilege,
|
||||
checkMlNodesAvailable,
|
||||
initPromise: initPromise(false)
|
||||
}
|
||||
})
|
||||
.when('/settings/calendars_list/edit_calendar/:calendarId', {
|
||||
|
@ -47,7 +45,6 @@ uiRoutes
|
|||
CheckLicense: checkFullLicense,
|
||||
privileges: checkGetJobsPrivilege,
|
||||
checkMlNodesAvailable,
|
||||
initPromise: initPromise(false)
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ const module = uiModules.get('apps/ml', ['react']);
|
|||
import { checkFullLicense } from '../../../license/check_license';
|
||||
import { checkGetJobsPrivilege, checkPermission } from '../../../privilege/check_privilege';
|
||||
import { getMlNodeCount } from '../../../ml_nodes_check/check_ml_nodes';
|
||||
import { initPromise } from '../../../util/promise';
|
||||
import { getCalendarManagementBreadcrumbs } from '../../breadcrumbs';
|
||||
|
||||
import uiRoutes from 'ui/routes';
|
||||
|
@ -37,7 +36,6 @@ uiRoutes
|
|||
CheckLicense: checkFullLicense,
|
||||
privileges: checkGetJobsPrivilege,
|
||||
mlNodeCount: getMlNodeCount,
|
||||
initPromise: initPromise(false)
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ import { getCreateFilterListBreadcrumbs, getEditFilterListBreadcrumbs } from '..
|
|||
import { checkFullLicense } from 'plugins/ml/license/check_license';
|
||||
import { checkGetJobsPrivilege, checkPermission } from 'plugins/ml/privilege/check_privilege';
|
||||
import { getMlNodeCount } from 'plugins/ml/ml_nodes_check/check_ml_nodes';
|
||||
import { initPromise } from 'plugins/ml/util/promise';
|
||||
import { EditFilterList } from './edit_filter_list';
|
||||
|
||||
import uiRoutes from 'ui/routes';
|
||||
|
@ -38,7 +37,6 @@ uiRoutes
|
|||
CheckLicense: checkFullLicense,
|
||||
privileges: checkGetJobsPrivilege,
|
||||
mlNodeCount: getMlNodeCount,
|
||||
initPromise: initPromise(false)
|
||||
}
|
||||
})
|
||||
.when('/settings/filter_lists/edit_filter_list/:filterId', {
|
||||
|
@ -48,7 +46,6 @@ uiRoutes
|
|||
CheckLicense: checkFullLicense,
|
||||
privileges: checkGetJobsPrivilege,
|
||||
mlNodeCount: getMlNodeCount,
|
||||
initPromise: initPromise(false)
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ import { getFilterListsBreadcrumbs } from '../../breadcrumbs';
|
|||
import { checkFullLicense } from 'plugins/ml/license/check_license';
|
||||
import { checkGetJobsPrivilege, checkPermission } from 'plugins/ml/privilege/check_privilege';
|
||||
import { getMlNodeCount } from 'plugins/ml/ml_nodes_check/check_ml_nodes';
|
||||
import { initPromise } from 'plugins/ml/util/promise';
|
||||
import { FilterLists } from './filter_lists';
|
||||
|
||||
import uiRoutes from 'ui/routes';
|
||||
|
@ -38,7 +37,6 @@ uiRoutes
|
|||
CheckLicense: checkFullLicense,
|
||||
privileges: checkGetJobsPrivilege,
|
||||
mlNodeCount: getMlNodeCount,
|
||||
initPromise: initPromise(false)
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ const module = uiModules.get('apps/ml', ['react']);
|
|||
import { checkFullLicense } from '../license/check_license';
|
||||
import { checkGetJobsPrivilege, checkPermission } from '../privilege/check_privilege';
|
||||
import { getMlNodeCount } from '../ml_nodes_check/check_ml_nodes';
|
||||
import { initPromise } from '../util/promise';
|
||||
import { getSettingsBreadcrumbs } from './breadcrumbs';
|
||||
|
||||
import uiRoutes from 'ui/routes';
|
||||
|
@ -36,7 +35,6 @@ uiRoutes
|
|||
CheckLicense: checkFullLicense,
|
||||
privileges: checkGetJobsPrivilege,
|
||||
mlNodeCount: getMlNodeCount,
|
||||
initPromise: initPromise(false)
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License;
|
||||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
// to work around the need for wrapping all of our promises in $q for our angular code
|
||||
// we replace the native Promise with $q.
|
||||
// For pages which are mainly react, initPromise should be called with false
|
||||
// and any calls to promises in angular code wrapped in $q.when
|
||||
// once we're free of angular this file can be removed.
|
||||
|
||||
const promise = window.Promise;
|
||||
|
||||
export function initPromise(replacePromise) {
|
||||
return function ($q) {
|
||||
window.Promise = replacePromise ? $q : promise;
|
||||
return Promise.resolve();
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue