Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Profiling] Add validations to settings (elastic#175972)
## Summary In elastic#174712, we integrated the new settings field component into the Universal profiling settings. The new setting field supports validation on the user input, based on the schema of the given setting. Since some of the Universal profiling settings have schema with specified restrictions, which were not enforced in the UI before, this PR adds schema validation so that they are enforced. **Settings with `schema` restrictions:** [observability:profilingCo2PerKWH](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L492): >= 0 [observability:profilingDatacenterPUE](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L469): >=0 [observability:profilingPerVCPUWattX86](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L425): >=0 [observability:profilingPervCPUWattArm64](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L440): >=0 [observability:profilingAWSCostDiscountRate](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L501): >=0 and <=100 [observability:profilingCostPervCPUPerHour](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L523): >=0 and <=100 <img width="1147" alt="Screenshot 2024-01-31 at 14 08 10" src="https://github.com/elastic/kibana/assets/59341489/ace8da2e-ae0b-4d94-997b-bec3534a4bfe"> --------- Co-authored-by: kibanamachine <[email protected]>
- Loading branch information