Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request refactors the cluster configuration form to improve validation, state management, and user experience around application monitoring and cost visibility configuration. The main changes include replacing the Prometheus toggle logic with a more generic application metrics toggle, introducing schema-based validation for cost visibility, and streamlining the handling of configuration states and errors.
Application Monitoring and Cost Visibility Improvements
isAppMetricsEnabled
state andtoggleAppMetrics
handler, updating all related props, logic, and UI components for clarity and consistency. Added logic to disable the application metrics toggle when cost visibility is enabled, with a tooltip explaining the restriction. [1] [2] [3] [4] [5] [6]isAppMetricsEnabled
state, ensuring Prometheus-related fields are only included when appropriate. [1] [2]Cost Visibility Configuration and Validation
SCHEMA_07_VALIDATOR
, replacing manual JSON parsing. AddedcostModuleSchema
prop and related state handling, and ensured the provider field is not sent to the backend. Improved error handling and user feedback for invalid configurations. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]Form Validation and Navigation Enhancements
Code Cleanup and Consistency
Metadata and Prop Passing
costModuleSchema
is passed through metadata and props to all relevant components, supporting schema-based validation and configuration. [1] [2]Let me know if you'd like to dive deeper into any specific change or see how these improvements affect the user experience!
Fixes # (issue)
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: