diff --git a/x-pack/legacy/plugins/ml/public/jobs/jobs_list/components/job_details/job_details.js b/x-pack/legacy/plugins/ml/public/jobs/jobs_list/components/job_details/job_details.js
index fa3dffe62b4018..ef7add4e87e265 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/jobs_list/components/job_details/job_details.js
+++ b/x-pack/legacy/plugins/ml/public/jobs/jobs_list/components/job_details/job_details.js
@@ -123,7 +123,7 @@ class JobDetailsUI extends Component {
content: ,
});
- tabs.push(...[ {
+ tabs.push({
id: 'datafeed-preview',
name: intl.formatMessage({
id: 'xpack.ml.jobsList.jobDetails.tabs.datafeedPreviewLabel',
@@ -137,7 +137,7 @@ class JobDetailsUI extends Component {
defaultMessage: 'Forecasts'
}),
content: ,
- }]);
+ });
}
if (mlAnnotationsEnabled && fullDetails) {
diff --git a/x-pack/legacy/plugins/ml/public/jobs/jobs_list/components/jobs_list/jobs_list.js b/x-pack/legacy/plugins/ml/public/jobs/jobs_list/components/jobs_list/jobs_list.js
index 3b35705e67b5ba..d3145cb7978642 100644
--- a/x-pack/legacy/plugins/ml/public/jobs/jobs_list/components/jobs_list/jobs_list.js
+++ b/x-pack/legacy/plugins/ml/public/jobs/jobs_list/components/jobs_list/jobs_list.js
@@ -138,7 +138,10 @@ class JobsListUI extends Component {
),
onSelectionChange: this.props.selectJobChange
};
-
+ // Adding 'width' props to columns for use in the Kibana management jobs list table
+ // The version of the table used in ML > Job Managment depends on many EUI class overrides that set the width explicitly.
+ // The ML > Job Managment table won't change as the overwritten class styles take precedence, though these values may need to
+ // be updated if we move to always using props for width.
const columns = [
{
name: '',
diff --git a/x-pack/legacy/plugins/ml/public/management/jobs_list/index.ts b/x-pack/legacy/plugins/ml/public/management/jobs_list/index.ts
index e86e354c3157c7..071d5ab6c6dfab 100644
--- a/x-pack/legacy/plugins/ml/public/management/jobs_list/index.ts
+++ b/x-pack/legacy/plugins/ml/public/management/jobs_list/index.ts
@@ -4,21 +4,13 @@
* you may not use this file except in compliance with the Elastic License.
*/
-/*
- * 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.
- */
-
// @ts-ignore no declaration module
import { ReactDOM, render, unmountComponentAtNode } from 'react-dom';
import routes from 'ui/routes';
import { canGetManagementMlJobs } from '../../privilege/check_privilege';
-import { JOBS_LIST_PATH } from '../management_urls';
-import { JobsListPage } from './components';
-import { AccessDeniedPage } from './components';
+import { JOBS_LIST_PATH, ACCESS_DENIED_PATH } from '../management_urls';
+import { JobsListPage, AccessDeniedPage } from './components';
import { getJobsListBreadcrumbs } from '../breadcrumbs';
-import { ACCESS_DENIED_PATH } from '../management_urls';
const template = `
diff --git a/x-pack/legacy/plugins/ml/public/privilege/check_privilege.ts b/x-pack/legacy/plugins/ml/public/privilege/check_privilege.ts
index 27b2b5edfcc434..695eba29195930 100644
--- a/x-pack/legacy/plugins/ml/public/privilege/check_privilege.ts
+++ b/x-pack/legacy/plugins/ml/public/privilege/check_privilege.ts
@@ -15,12 +15,20 @@ import { ACCESS_DENIED_PATH } from '../management/management_urls';
let privileges: Privileges = getDefaultPrivileges();
-// TODO: needs to resolve regardless of space
export function canGetManagementMlJobs(kbnUrl: any) {
return new Promise((resolve, reject) => {
getPrivileges().then(({ capabilities, isPlatinumOrTrialLicense }) => {
privileges = capabilities;
- if (privileges.canGetJobs && isPlatinumOrTrialLicense === true) {
+ const isManageML =
+ privileges.canGetJobs &&
+ privileges.canCreateJob &&
+ privileges.canUpdateJob &&
+ privileges.canOpenJob &&
+ privileges.canCloseJob &&
+ privileges.canDeleteJob &&
+ privileges.canForecastJob;
+
+ if (isManageML === true && isPlatinumOrTrialLicense === true) {
return resolve();
} else {
kbnUrl.redirect(ACCESS_DENIED_PATH);