Skip to content

Commit

Permalink
[ML] Adding capabilties check to create job button in dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
jgowdyelastic committed Nov 27, 2023
1 parent e7478d5 commit 9a030da
Showing 1 changed file with 9 additions and 2 deletions.
Expand Up @@ -47,7 +47,10 @@ export function JobSelectorTable({

const {
services: {
application: { navigateToApp },
application: {
navigateToApp,
capabilities: { ml: mlCapabilities },
},
},
} = useMlKibana();

Expand Down Expand Up @@ -269,7 +272,11 @@ export function JobSelectorTable({
iconType="iInCircle"
>
<EuiText textAlign="center">
<EuiButton color="primary" onClick={navigateToWizard}>
<EuiButton
color="primary"
onClick={navigateToWizard}
disabled={!mlCapabilities.canCreateJob}
>
<FormattedMessage
id="xpack.ml.jobSelector.createJobButtonLabel"
defaultMessage="Create job"
Expand Down

0 comments on commit 9a030da

Please sign in to comment.