-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Logs UI] Add missing ML capabilities checks #72606
[Logs UI] Add missing ML capabilities checks #72606
Conversation
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good 👌 Feel free to ignore, or push to a followup, my minor comments.
Testing the functionality now.
{children ?? ( | ||
<FormattedMessage | ||
id="xpack.infra.logs.analysis.createJobButtonLabel" | ||
defaultMessage="Create ML jobs" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the default text here should it be job instead of jobs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say, it depends on whether we want to abstract away the fact that this module happens to only contain one job. 🤷
|
||
import { i18n } from '@kbn/i18n'; | ||
|
||
export const missingMlResultsPrivilegesTitle = i18n.translate( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would there be any harm in rolling missingMlResultsPrivilegesTitle
and missingMlSetupPrivilegesTitle
into a singular translation as they use the same text?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, I didn't realize that when I factored them out 👍
app: 'kibana', | ||
hash: '/management/security/users', | ||
app: 'management', | ||
pathname: '/security/users', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@weltenwort Hmm, so I'm seeing some weird behaviour with the anomalies and categories tabs. It's really inconsistent, and I can't find the common thread that makes it happen, but I'll try to describe what I'm seeing. It could also be the case that I've misunderstood Kibana roles / privileges, but even if that was the case I'd expect one behaviour rather than multiple. Context: Against the dev-next shared cluster I've created a I then log in to Kibana as that user. Within that single login, I see all of the following behaviours accessing the anomalies tab: So there's a mixture of asking for elevated privileges, saying there's no data, and showing results. What's really curious is the I don't understand the mixture of behaviours here? |
Logging in and out 3 or 4 times I was able to at least get consistency between my roles (I set up
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(After talking on Slack / Zoom I had one part of my none
role misconfigured).
Approving 🎉
💚 Build SucceededBuild metricsasync chunks size
History
To update your PR or re-run it, just comment with: |
This adds several missing Machine Learning capabilities checks to the UI to make sure the user doesn't run into downstream errors resulting from the lack of permissions. It also updates the messages of the permission prompt screens to refer to the new Kibana Machine Learning permissions instead of the old built-in roles.
Summary
This adds several missing Machine Learning capabilities checks to the UI to make sure the user doesn't run into downstream errors resulting from the lack of permissions. It also updates the messages of the permission prompt screens to refer to the new Kibana Machine Learning permissions instead of the old built-in roles.
closes #72416
closes #72590
Details
These buttons are now disabled without "All" Machine Learning permissions:
Previews
Testing
The changes affect both the "Anomalies" and the "Categories" tabs, except for the module setup list changes, which only exist in the former.
For testing the cartesian product of the permission scenarios
and the ML job presence scenarios
could be of particular interest.