Skip to content

Commit

Permalink
[ObsUx][Infra-ML] Add parameter to prefill host in the feedback form …
Browse files Browse the repository at this point in the history
…in hosts view ml flyout (#177959)

Closes #177700

## Summary

This PR adds a parameter to prefill "Host Anomalies" in the feedback
form in hosts view ml flyout (so when the host job is the only option)

## Testing
- Go to Hosts view > Anomaly detection
- Check the feedback form
   - the first question should be prefilled with "Host Anomalies" option
   


https://github.com/elastic/kibana/assets/14139027/217723ab-524e-4fed-9432-79f596eacdbe
  • Loading branch information
jennypavlova authored Mar 5, 2024
1 parent cbcbb93 commit 0280b63
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@ export const FlyoutHome = (props: Props) => {
});

// Used for prefilling the feedback form (if both types are enabled do not prefill)
// In case the host type is the only option (if props.hideJobType is true) - prefill 'host'
const mlJobTypeByNode =
hostJobSummaries.length > 0 && k8sJobSummaries.length === 0
props.hideJobType || (hostJobSummaries.length > 0 && k8sJobSummaries.length === 0)
? 'host'
: hostJobSummaries.length === 0 && k8sJobSummaries.length > 0
? 'pod'
Expand Down

0 comments on commit 0280b63

Please sign in to comment.