-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Metrics settings uses the Logs UI capabilities #48180
Comments
Pinging @elastic/infra-logs-ui (Team:infra-logs-ui) |
No, this refers to the fact that there is a separate capability kibana/x-pack/legacy/plugins/infra/public/pages/infrastructure/snapshot/index.tsx Line 80 in 560ac8f
Somewhere along the way we accidentally lost that so that on both settings tabs we check the logs capabilities. That those share an underlying saved object is a separate issue that is tracked in #31287. This is about reconstituting the UI checks to a comparable effect before the settings tab refactoring. |
So we want to use I'm still worried about what happens if the Should we instead be refactoring this into two |
To restore the original functionality a single flag would suffice. But I like the idea of disabling some fields in the settings form. In the interest of code cleanliness I would vote for implementing it as a single prop that can take three values instead of two booleans. interface SourceConfigurationSettingsProps {
editableSettings: 'metricsSettings' | 'logsSettings' | 'none';
} That means we could split the /// in MetricsSettingsPage
<SourceConfigurationSettings editableSettings={uiCapabilities.metrics.configureSource ? 'metricsSettings' : 'none'} /> /// in LogsSettingsPage
<SourceConfigurationSettings editableSettings={uiCapabilities.logs.configureSource ? 'logsSettings' : 'none'} /> @Zacqary what do you think? |
I'd have to refactor a bunch of components, like the Do we want both Metrics and Logs fields to still be visible on both pages? Or do we want to make only Metrics-related ones visible on Metrics, and vice versa? |
This is the relevance as I remember it:
|
Currently, Metrics and Logs share the
infrastructure-ui-source
saved-object for storing their settings. However, prior to 7.4 when the end-user had read access to Metrics and write-access to Logs, they were able to update the source configuration only in the Logs application not in the Metrics application. This is no longer the case in 7.4, and both the Logs and Metrics use of the settings page use the logs ui capabilities.The text was updated successfully, but these errors were encountered: