Skip to content

Commit 2b5339c

Browse files
kibanamachineagusruidiazgdelasticmachinePhilippeOberti
authored
[8.19] [Security Solution] Fix comma separated process.arg not wraps properly (#223544) (#224878)
# Backport This will backport the following commits from `main` to `8.19`: - [[Security Solution] Fix comma separated process.arg not wraps properly (#223544)](#223544) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Agustina Nahir Ruidiaz","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-06-23T14:02:10Z","message":"[Security Solution] Fix comma separated process.arg not wraps properly (#223544)\n\n## Summary\nFixes: https://github.com/elastic/kibana/issues/129154\nThis PR implements a spacing adjustment (`8px`) to improve readability\nwhen rendering multi-valued fields in flyout Overview Tab table.\n\nSpecifically:\n\n- Adds extra vertical spacing between separate entries for any field\nthat contains multiple values (with the exception of agent.status and\nlink).\n\n- Retains normal line-wrap spacing for single values or text that wraps\nnaturally.\n\n- Adds unit tests to verify correct spacing behavior in both single- and\nmulti-value scenarios.\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n\nhttps://github.com/user-attachments/assets/403b2f42-f112-43c9-bdfb-ee8571f69dcb\n\n<img width=\"583\" alt=\"Screenshot 2025-06-12 at 14 25 56\"\nsrc=\"https://github.com/user-attachments/assets/5d3c75ae-8847-41ac-b9fb-cf1300771cda\"\n/>\n\n---------\n\nCo-authored-by: Elastic Machine <[email protected]>\nCo-authored-by: kibanamachine <[email protected]>","sha":"12df6b02456f710fa27a6f28c5f1e32938fc6d71","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Threat Hunting","Team: SecuritySolution","Team:Threat Hunting:Investigations","ci:cloud-deploy","backport:version","v9.1.0","v8.19.0"],"title":"[Security Solution] Fix comma separated process.arg not wraps properly","number":223544,"url":"https://github.com/elastic/kibana/pull/223544","mergeCommit":{"message":"[Security Solution] Fix comma separated process.arg not wraps properly (#223544)\n\n## Summary\nFixes: https://github.com/elastic/kibana/issues/129154\nThis PR implements a spacing adjustment (`8px`) to improve readability\nwhen rendering multi-valued fields in flyout Overview Tab table.\n\nSpecifically:\n\n- Adds extra vertical spacing between separate entries for any field\nthat contains multiple values (with the exception of agent.status and\nlink).\n\n- Retains normal line-wrap spacing for single values or text that wraps\nnaturally.\n\n- Adds unit tests to verify correct spacing behavior in both single- and\nmulti-value scenarios.\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n\nhttps://github.com/user-attachments/assets/403b2f42-f112-43c9-bdfb-ee8571f69dcb\n\n<img width=\"583\" alt=\"Screenshot 2025-06-12 at 14 25 56\"\nsrc=\"https://github.com/user-attachments/assets/5d3c75ae-8847-41ac-b9fb-cf1300771cda\"\n/>\n\n---------\n\nCo-authored-by: Elastic Machine <[email protected]>\nCo-authored-by: kibanamachine <[email protected]>","sha":"12df6b02456f710fa27a6f28c5f1e32938fc6d71"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/223544","number":223544,"mergeCommit":{"message":"[Security Solution] Fix comma separated process.arg not wraps properly (#223544)\n\n## Summary\nFixes: https://github.com/elastic/kibana/issues/129154\nThis PR implements a spacing adjustment (`8px`) to improve readability\nwhen rendering multi-valued fields in flyout Overview Tab table.\n\nSpecifically:\n\n- Adds extra vertical spacing between separate entries for any field\nthat contains multiple values (with the exception of agent.status and\nlink).\n\n- Retains normal line-wrap spacing for single values or text that wraps\nnaturally.\n\n- Adds unit tests to verify correct spacing behavior in both single- and\nmulti-value scenarios.\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n\nhttps://github.com/user-attachments/assets/403b2f42-f112-43c9-bdfb-ee8571f69dcb\n\n<img width=\"583\" alt=\"Screenshot 2025-06-12 at 14 25 56\"\nsrc=\"https://github.com/user-attachments/assets/5d3c75ae-8847-41ac-b9fb-cf1300771cda\"\n/>\n\n---------\n\nCo-authored-by: Elastic Machine <[email protected]>\nCo-authored-by: kibanamachine <[email protected]>","sha":"12df6b02456f710fa27a6f28c5f1e32938fc6d71"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Agustina Nahir Ruidiaz <[email protected]> Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Philippe Oberti <[email protected]>
1 parent 3f38e64 commit 2b5339c

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/highlighted_fields_cell.tsx

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
import type { FC } from 'react';
99
import React, { useMemo } from 'react';
10-
import { EuiFlexItem } from '@elastic/eui';
10+
import { css } from '@emotion/react';
11+
import { useEuiTheme } from '@elastic/eui';
1112
import { getAgentTypeForAgentIdField } from '../../../../common/lib/endpoint/utils/get_agent_type_for_agent_id_field';
1213
import type { ResponseActionAgentType } from '../../../../../common/endpoint/service/response_actions/constants';
1314
import { AgentStatus } from '../../../../common/components/endpoint/agents/agent_status';
@@ -58,14 +59,24 @@ export const HighlightedFieldsCell: FC<HighlightedFieldsCellProps> = ({
5859
const agentType: ResponseActionAgentType = useMemo(() => {
5960
return getAgentTypeForAgentIdField(originalField);
6061
}, [originalField]);
62+
const { euiTheme } = useEuiTheme();
6163

6264
return (
63-
<>
65+
<React.Fragment
66+
css={css`
67+
div {
68+
margin-bottom: ${euiTheme.size.xs};
69+
}
70+
71+
div:last-child {
72+
margin-bottom: 0;
73+
}
74+
`}
75+
>
6476
{values != null &&
6577
values.map((value, i) => {
6678
return (
67-
<EuiFlexItem
68-
grow={false}
79+
<div
6980
key={`${i}-${value}`}
7081
data-test-subj={`${value}-${HIGHLIGHTED_FIELDS_CELL_TEST_ID}`}
7182
>
@@ -85,9 +96,9 @@ export const HighlightedFieldsCell: FC<HighlightedFieldsCellProps> = ({
8596
) : (
8697
<span data-test-subj={HIGHLIGHTED_FIELDS_BASIC_CELL_TEST_ID}>{value}</span>
8798
)}
88-
</EuiFlexItem>
99+
</div>
89100
);
90101
})}
91-
</>
102+
</React.Fragment>
92103
);
93104
};

x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/table_field_value_cell.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,7 @@ export const TableFieldValueCell = memo(
7070
}
7171

7272
return (
73-
<EuiFlexGroup
74-
data-test-subj={`event-field-${data.field}`}
75-
direction="column"
76-
gutterSize="none"
77-
>
73+
<EuiFlexGroup data-test-subj={`event-field-${data.field}`} direction="column" gutterSize="xs">
7874
{values.map((value, i) => {
7975
if (fieldFromBrowserField == null) {
8076
return (

x-pack/solutions/security/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui';
1111
import { EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui';
1212
import { isEmpty, isNumber } from 'lodash/fp';
1313
import React from 'react';
14-
import { css } from '@emotion/css';
14+
import { css } from '@emotion/react';
1515
import type { FieldSpec } from '@kbn/data-plugin/common';
1616
import { EntityTypeToIdentifierField } from '../../../../../../common/entity_analytics/types';
1717
import { getAgentTypeForAgentIdField } from '../../../../../common/lib/endpoint/utils/get_agent_type_for_agent_id_field';
@@ -119,7 +119,7 @@ const FormattedFieldValueComponent: React.FC<{
119119
fieldName={fieldName}
120120
value={value}
121121
tooltipProps={
122-
isUnifiedDataTable ? undefined : { position: 'bottom', className: dataGridToolTipOffset }
122+
isUnifiedDataTable ? undefined : { position: 'bottom', css: dataGridToolTipOffset }
123123
}
124124
/>
125125
);
@@ -227,7 +227,7 @@ const FormattedFieldValueComponent: React.FC<{
227227
<EuiToolTip
228228
data-test-subj="message-tool-tip"
229229
position="bottom"
230-
className={dataGridToolTipOffset}
230+
css={dataGridToolTipOffset}
231231
content={
232232
<EuiFlexGroup direction="column" gutterSize="none">
233233
<EuiFlexItem grow={false}>

0 commit comments

Comments
 (0)