Skip to content

Commit

Permalink
[SecuritySolution] Update asset criticality CSV upload copy (#181390)
Browse files Browse the repository at this point in the history
## Summary

Copy after changes:

![Screenshot 2024-04-23 at 11 17
36](https://github.com/elastic/kibana/assets/1490444/375d26c8-8337-4ee3-856f-98246c60e49a)
![Screenshot 2024-04-23 at 11 17
46](https://github.com/elastic/kibana/assets/1490444/217a2e74-dcf9-473e-9621-e1bcd8f4be68)
![Screenshot 2024-04-23 at 11 17
58](https://github.com/elastic/kibana/assets/1490444/58203f1a-59c3-4e25-bf85-12019dbf3754)

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
  • Loading branch information
machadoum authored Apr 23, 2024
1 parent cc94a66 commit 2384e46
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import {
EuiCode,
EuiCodeBlock,
EuiFilePicker,
EuiPanel,
Expand Down Expand Up @@ -52,7 +53,7 @@ export const AssetCriticalityFilePickerStep: React.FC<AssetCriticalityFilePicker
<EuiTitle size="xxs">
<h3>
<FormattedMessage
defaultMessage="CSV File Format Requirements"
defaultMessage="Supported file formats and size"
id="xpack.securitySolution.entityAnalytics.assetCriticalityUploadPage.csvFileFormatRequirements"
/>
</h3>
Expand All @@ -62,7 +63,7 @@ export const AssetCriticalityFilePickerStep: React.FC<AssetCriticalityFilePicker
<ul className={listStyle}>
<li>
<FormattedMessage
defaultMessage="Supported file formats: {formats}"
defaultMessage="File formats: {formats}"
id="xpack.securitySolution.entityAnalytics.assetCriticalityUploadPage.acceptedFileFormats"
values={{
formats: SUPPORTED_FILE_EXTENSIONS.join(', '),
Expand All @@ -71,7 +72,7 @@ export const AssetCriticalityFilePickerStep: React.FC<AssetCriticalityFilePicker
</li>
<li>
<FormattedMessage
defaultMessage="You can upload files up to {maxFileSize}"
defaultMessage="Maximum file size: {maxFileSize}"
id="xpack.securitySolution.entityAnalytics.assetCriticalityUploadPage.uploadFileSizeLimit"
values={{
maxFileSize: formatBytes(CRITICALITY_CSV_MAX_SIZE_BYTES),
Expand All @@ -83,7 +84,7 @@ export const AssetCriticalityFilePickerStep: React.FC<AssetCriticalityFilePicker
<EuiTitle size="xxs">
<h3>
<FormattedMessage
defaultMessage="Required CSV Structure"
defaultMessage="Required file structure"
id="xpack.securitySolution.entityAnalytics.assetCriticalityUploadPage.CSVStructureTitle"
/>
</h3>
Expand All @@ -93,7 +94,7 @@ export const AssetCriticalityFilePickerStep: React.FC<AssetCriticalityFilePicker
<ul className={listStyle}>
<li>
<FormattedMessage
defaultMessage="Resource type: Indicate whether the resource is a {host} or a {user}."
defaultMessage="Entity type: Indicate whether the entity is a {host} or a {user}."
id="xpack.securitySolution.entityAnalytics.assetCriticalityUploadPage.assetTypeDescription"
values={{
host: <b>{'host'}</b>,
Expand All @@ -104,21 +105,21 @@ export const AssetCriticalityFilePickerStep: React.FC<AssetCriticalityFilePicker
<li>
{
<FormattedMessage
defaultMessage="Identifier: The unique identifier for each asset's {hostName} or {userName}."
defaultMessage="Identifier: Specify the entity's {hostName} or {userName}."
id="xpack.securitySolution.entityAnalytics.assetCriticalityUploadPage.assetIdentifierDescription"
values={{
hostName: <b>{'Host.name'}</b>,
userName: <b>{'User.name'}</b>,
hostName: <b>{'host.name'}</b>,
userName: <b>{'user.name'}</b>,
}}
/>
}
</li>
<li>
<FormattedMessage
defaultMessage="Criticality label: Use any one of {labels}"
defaultMessage="Criticality level: Specify any one of {labels}"
id="xpack.securitySolution.entityAnalytics.assetCriticalityUploadPage.assetCriticalityLabels"
values={{
labels: <b>{ValidCriticalityLevels.join(', ')}</b>,
labels: <EuiCode>{ValidCriticalityLevels.join(', ')}</EuiCode>,
}}
/>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const AssetCriticalityResultStep: React.FC<{
iconType="checkInCircleFilled"
>
<FormattedMessage
defaultMessage="Your asset criticality assignments have been successfully mapped."
defaultMessage="Your asset criticality levels have been assigned."
id="xpack.securitySolution.entityAnalytics.assetCriticalityResultStep.successMessage"
/>
</EuiCallOut>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('AssetCriticalityValidationStep', () => {
wrapper: TestProviders,
});

expect(container).toHaveTextContent('10 asset criticalities will be assigned');
expect(container).toHaveTextContent('10 asset criticality levels will be assigned');
expect(container).toHaveTextContent("5 lines are invalid and won't be assigned");
expect(container).toHaveTextContent('test.csv preview');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const AssetCriticalityValidationStep: React.FC<AssetCriticalityValidation
<span data-test-subj="asset-criticality-validLinesMessage">
<FormattedMessage
id="xpack.securitySolution.entityAnalytics.assetCriticalityValidationStep.validLinesMessage"
defaultMessage="{validLinesCount, plural, one {{validLinesCountBold} asset criticality will be assigned} other {{validLinesCountBold} asset criticalities will be assigned}}"
defaultMessage="{validLinesCount, plural, one {{validLinesCountBold} asset criticality level will be assigned} other {{validLinesCountBold} asset criticality levels will be assigned}}"
values={{
validLinesCount: validLines.count,
validLinesCountBold: <b>{validLines.count}</b>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ export const AssetCriticalityUploadPage = () => {
<h2>
<FormattedMessage
id="xpack.securitySolution.entityAnalytics.assetCriticalityUploadPage.subTitle"
defaultMessage="Quickly Assign Asset Criticality with CSV Upload"
defaultMessage="Import your asset criticality data"
/>
</h2>
</EuiTitle>
<EuiSpacer size="m" />
<EuiText size="s">
<FormattedMessage
id="xpack.securitySolution.entityAnalytics.assetCriticalityUploadPage.description"
defaultMessage="Effortlessly import asset criticality from your asset management tools via CSV. This simple upload ensures data accuracy and reduces manual input errors."
defaultMessage="Bulk assign asset criticality by importing a CSV, TXT, or TSV file exported from your asset management tools. This ensures data accuracy and reduces manual input errors."
/>
</EuiText>
<EuiSpacer size="s" />
Expand All @@ -152,7 +152,7 @@ export const AssetCriticalityUploadPage = () => {
<EuiText size="s">
<FormattedMessage
id="xpack.securitySolution.entityAnalytics.assetCriticalityUploadPage.information.description"
defaultMessage="Allows you to classify assets based on their value and impact on business operations, to guide prioritization for alert triaging, threat-hunting, and investigation activities."
defaultMessage="Asset criticality allows you to classify entities based on their importance and impact on business operations. Use asset criticality to guide prioritization for alert triaging, threat-hunting, and investigation activities."
/>
</EuiText>
<EuiHorizontalRule />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ describe(
uploadAssetCriticalityFile();

cy.get(FILE_PICKER).should('not.visible');
cy.get(VALID_LINES_MESSAGE).should('have.text', '4 asset criticalities will be assigned');
cy.get(VALID_LINES_MESSAGE).should(
'have.text',
'4 asset criticality levels will be assigned'
);
cy.get(INVALID_LINES_MESSAGE).should('have.text', "1 line is invalid and won't be assigned");

clickAssignButton();
Expand Down

0 comments on commit 2384e46

Please sign in to comment.