[BUG] Frontend not updated based on dynamic setting
What is the bug? Currently we have a default setting off 5 maximum feature anomalies. However this can be changed either dynamically or through opensearch.yml file while spinning up an OS cluster. Currently if a change is made to the number of max anomal detectors for example we don't update the information text on the frontend or we don't block user from creating x features based on new setting and we still keep it at 5. This is caught by the validation API but I think it should be discussed at least if we want to change the form UX based on these dynamic settings.
Messaging such as: "A feature is the field in your index that you use to check for anomalies. You can add up to 5 features" is hard coded or "You can add up to 2 more features." when you shouldn't be able to if setting was changed.
How can one reproduce the bug? Steps to reproduce the behavior:
- Add
plugins.anomaly_detection.max_anomaly_features: 2toopensearch.ymlor dynamically change settings through OS API. - Create Detector on frontend and it will still seem like the number of allowed features is 5 until you an error is caught by validation.
What is the expected behavior? Although validation API catches this or the create API itself if user directly calls on the backend API, it could be cleaner to also change how many features we allow in the form and our frontend messaging based on a setting that we are letting users know are dynamic
We also need to let the frontend use the default detection interval and window delay setting. Currently they are hardcoded on the frontend.