Skip to content

Commit

Permalink
[8.9] [Security Solution] fix investigation guide label turning red e…
Browse files Browse the repository at this point in the history
…ven though form value is valid (#160577) (#160630)

# Backport

This will backport the following commits from `main` to `8.9`:
- [[Security Solution] fix investigation guide label turning red even
though form value is valid
(#160577)](#160577)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Philippe
Oberti","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-06-27T13:56:31Z","message":"[Security
Solution] fix investigation guide label turning red even though form
value is valid
(#160577)","sha":"849cc89b7607ddbad650e8872b6abdd968c98737","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Threat
Hunting:Investigations","v8.9.0","v8.10.0"],"number":160577,"url":"https://github.com/elastic/kibana/pull/160577","mergeCommit":{"message":"[Security
Solution] fix investigation guide label turning red even though form
value is valid
(#160577)","sha":"849cc89b7607ddbad650e8872b6abdd968c98737"}},"sourceBranch":"main","suggestedTargetBranches":["8.9"],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/160577","number":160577,"mergeCommit":{"message":"[Security
Solution] fix investigation guide label turning red even though form
value is valid
(#160577)","sha":"849cc89b7607ddbad650e8872b6abdd968c98737"}}]}]
BACKPORT-->

Co-authored-by: Philippe Oberti <[email protected]>
  • Loading branch information
kibanamachine and PhilippeOberti authored Jun 27, 2023
1 parent 0deef92 commit fddb90a
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,10 @@ const InsightEditorComponent = ({
<EuiFormRow
label={i18n.LABEL}
helpText={i18n.LABEL_TEXT}
isInvalid={labelController.field.value != null}
isInvalid={
labelController.field.value !== undefined &&
labelController.field.value.trim().length === 0
}
fullWidth
>
<EuiFieldText
Expand Down Expand Up @@ -520,10 +523,10 @@ const exampleInsight = `${insightPrefix}{
"label": "Test action",
"description": "Click to investigate",
"providers": [
[
[
{"field": "event.id", "value": "{{kibana.alert.original_event.id}}", "queryType": "phrase", "excluded": "false"}
],
[
[
{"field": "event.action", "value": "", "queryType": "exists", "excluded": "false"},
{"field": "process.pid", "value": "{{process.pid}}", "queryType": "phrase", "excluded":"false"}
]
Expand Down

0 comments on commit fddb90a

Please sign in to comment.