Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const AIConnectorCard: OnboardingCardComponent<AIConnectorCardMetadata> =
{isInferenceConnector ? (
<FormattedMessage
id="xpack.securitySolution.onboarding.aiConnectorCardInferenceDescription"
defaultMessage="The Elastic-provided connector is selected by default. You can configure another connector and model if you prefer. Learn more about {docsLink} and performance with our {llmMatrixLink}"
defaultMessage="The Elastic-provided connector is selected by default. You can configure another connector and model if you prefer. Learn more about {docsLink} and {llmMatrixLink}"
values={{
llmMatrixLink: <LlmPerformanceMatrixDocsLink text={i18n.LLM_MATRIX_LINK} />,
docsLink: <SiemMigrationDocsLink text={i18n.AI_POWERED_MIGRATIONS_LINK} />,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const AI_CONNECTOR_CARD_DESCRIPTION_INFERENCE_CONNECTOR = i18n.translate(

export const LLM_MATRIX_LINK = i18n.translate(
'xpack.securitySolution.onboarding.aiConnector.llmMatrixLink',
{ defaultMessage: 'LLM performance matrix' }
{ defaultMessage: 'model performance' }
);

export const AI_POWERED_MIGRATIONS_LINK = i18n.translate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const MigrationDataInputFlyout = React.memo<MigrationDataInputFlyoutProps
return (
<EuiFlyoutResizable
onClose={onClose}
size="m"
size={850}
maxWidth={1200}
minWidth={500}
data-test-subj="uploadRulesFlyout"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const LookupsFileUpload = React.memo<LookupsFileUploadProps>(
const isButtonDisabled = showLoader || lookupResources.length === 0;

return (
<EuiFlexGroup direction="column">
<EuiFlexGroup direction="column" gutterSize="s">
<EuiFlexItem>
<EuiFormRow
helpText={errors.map((error) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import {
EuiFlexItem,
EuiIcon,
EuiPanel,
EuiSpacer,
EuiText,
EuiToolTip,
useEuiTheme,
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import type { UploadedLookups } from '../../lookups_data_input';
import * as i18n from './translations';

Expand All @@ -37,60 +37,70 @@ export const MissingLookupsList = React.memo<MissingLookupsListProps>(
({ missingLookups, uploadedLookups, omitLookup, onCopied }) => {
const { euiTheme } = useEuiTheme();
return (
<>
<EuiPanel hasShadow={false} hasBorder className={scrollPanelCss}>
<EuiFlexGroup direction="column" gutterSize="s">
{missingLookups.map((lookupName) => {
const isOmitted = uploadedLookups[lookupName] === '';
return (
<EuiFlexItem key={lookupName}>
<EuiFlexGroup
direction="row"
gutterSize="s"
alignItems="center"
justifyContent="flexStart"
>
<EuiFlexItem grow={false}>
{uploadedLookups[lookupName] != null ? (
<EuiIcon type="checkInCircleFilled" color={euiTheme.colors.success} />
) : (
<EuiIcon type="dot" />
)}
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiText size="s" style={isOmitted ? { textDecoration: 'line-through' } : {}}>
{lookupName}
</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiCopy textToCopy={lookupName}>
{(copy) => (
<CopyLookupNameButton
lookupName={lookupName}
onCopied={onCopied}
copy={copy}
/>
<EuiFlexGroup direction="column" gutterSize="s">
<EuiFlexItem>
<EuiText size="s">
<FormattedMessage
id="xpack.securitySolution.siemMigrations.rules.dataInputFlyout.lookups.copyExportQuery.description"
defaultMessage="Log in to your Splunk admin account, go to the {app}, download the following lookups individually and upload them below. You can also omit lookups that are empty or not needed, and they will be ignored in the translation."
values={{ app: <b>{i18n.LOOKUPS_SPLUNK_APP}</b> }}
/>
</EuiText>
</EuiFlexItem>
<EuiFlexItem>
<EuiPanel hasShadow={false} hasBorder className={scrollPanelCss}>
<EuiFlexGroup direction="column" gutterSize="s">
{missingLookups.map((lookupName) => {
const isOmitted = uploadedLookups[lookupName] === '';
return (
<EuiFlexItem key={lookupName}>
<EuiFlexGroup
direction="row"
gutterSize="s"
alignItems="center"
justifyContent="flexStart"
>
<EuiFlexItem grow={false}>
{uploadedLookups[lookupName] != null ? (
<EuiIcon type="checkInCircleFilled" color={euiTheme.colors.success} />
) : (
<EuiIcon type="dot" />
)}
</EuiCopy>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<OmitLookupButton
lookupName={lookupName}
omitLookup={omitLookup}
isDisabled={isOmitted}
/>
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
);
})}
</EuiFlexGroup>
</EuiPanel>
<EuiSpacer size="s" />
<EuiText size="s" color="subdued">
{i18n.MISSING_LOOKUPS_DESCRIPTION}
</EuiText>
</>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiText
size="s"
style={isOmitted ? { textDecoration: 'line-through' } : {}}
>
{lookupName}
</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiCopy textToCopy={lookupName}>
{(copy) => (
<CopyLookupNameButton
lookupName={lookupName}
onCopied={onCopied}
copy={copy}
/>
)}
</EuiCopy>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<OmitLookupButton
lookupName={lookupName}
omitLookup={omitLookup}
isDisabled={isOmitted}
/>
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
);
})}
</EuiFlexGroup>
</EuiPanel>
</EuiFlexItem>
</EuiFlexGroup>
);
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@ export const LOOKUPS_DATA_INPUT_COPY_TITLE = i18n.translate(
{ defaultMessage: 'Lookups found in your rules' }
);

export const MISSING_LOOKUPS_DESCRIPTION = i18n.translate(
'xpack.securitySolution.siemMigrations.rules.dataInputFlyout.lookups.missingLookupsList.description',
{
defaultMessage:
'For your lookups, go to your admin Splunk account and the Search and Reporting app Lookups page. Download the following lookups individually and upload below.',
}
export const LOOKUPS_SPLUNK_APP = i18n.translate(
'xpack.securitySolution.siemMigrations.rules.dataInputFlyout.lookups.missingLookupsList.appSection',
{ defaultMessage: 'Splunk App for Lookup File Editing' }
);

export const COPY_LOOKUP_NAME_TOOLTIP = i18n.translate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n';

export const LOOKUPS_DATA_INPUT_TITLE = i18n.translate(
'xpack.securitySolution.siemMigrations.rules.dataInputFlyout.lookups.title',
{ defaultMessage: 'Upload identified lookups' }
{ defaultMessage: 'Upload lookups' }
);
export const LOOKUPS_DATA_INPUT_DESCRIPTION = i18n.translate(
'xpack.securitySolution.siemMigrations.rules.dataInputFlyout.lookups.description',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ export const useCheckResourcesStep = ({
return {
title: i18n.RULES_DATA_INPUT_CHECK_RESOURCES_TITLE,
status: uploadStepStatus,
children: (
<EuiText size="xs" color="subdued">
{i18n.RULES_DATA_INPUT_CHECK_RESOURCES_DESCRIPTION}
</EuiText>
),
children: <EuiText size="s">{i18n.RULES_DATA_INPUT_CHECK_RESOURCES_DESCRIPTION}</EuiText>,
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ export const RULES_DATA_INPUT_CHECK_RESOURCES_TITLE = i18n.translate(
export const RULES_DATA_INPUT_CHECK_RESOURCES_DESCRIPTION = i18n.translate(
'xpack.securitySolution.siemMigrations.rules.dataInputFlyout.rules.checkResources.description',
{
defaultMessage: `For best translation results, we will automatically review your rules for macros and lookups and ask you to upload them. Once uploaded, we'll be able to deliver a more complete rule translation for all rules using those macros or lookups.`,
defaultMessage: `For best translation results, we will review the data for macros and lookups. If found, we will ask you to upload them next.`,
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import React, { useCallback } from 'react';
import { EuiCodeBlock, EuiSpacer, EuiText } from '@elastic/eui';
import { EuiCodeBlock, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import { MACROS_SPLUNK_QUERY } from '../../../../constants';
import * as i18n from './translations';
Expand All @@ -26,28 +26,31 @@ export const CopyExportQuery = React.memo<CopyExportQueryProps>(({ onCopied }) =
);

return (
<>
{/* The click event is also dispatched when using the keyboard actions (space or enter) for "copy" button.
<EuiFlexGroup direction="column" gutterSize="s">
<EuiFlexItem>
<EuiText size="s">
<FormattedMessage
id="xpack.securitySolution.siemMigrations.rules.dataInputFlyout.macros.copyExportQuery.description"
defaultMessage="From you admin Splunk account, go to the {section} app and run the above query. Export your results as {format}."
values={{
section: <b>{i18n.MACROS_DATA_INPUT_COPY_DESCRIPTION_SECTION}</b>,
format: <b>{'JSON'}</b>,
}}
/>
</EuiText>
</EuiFlexItem>
<EuiFlexItem>
{/* The click event is also dispatched when using the keyboard actions (space or enter) for "copy" button.
No need to use keyboard specific events, disabling the a11y lint rule:*/}
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}
<div onClick={onClick}>
{/* onCopy react event is dispatched when the user copies text manually */}
<EuiCodeBlock language="text" fontSize="m" paddingSize="m" isCopyable onCopy={onCopied}>
{MACROS_SPLUNK_QUERY}
</EuiCodeBlock>
</div>
<EuiSpacer size="m" />
<EuiText size="s">
<FormattedMessage
id="xpack.securitySolution.siemMigrations.rules.dataInputFlyout.rules.copyExportQuery.description"
defaultMessage="From you admin Splunk account, go to the {section} app and run the above query. Export your results as {format}."
values={{
section: <b>{i18n.MACROS_DATA_INPUT_COPY_DESCRIPTION_SECTION}</b>,
format: <b>{'JSON'}</b>,
}}
/>
</EuiText>
</>
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}
<div onClick={onClick}>
{/* onCopy react event is dispatched when the user copies text manually */}
<EuiCodeBlock language="text" fontSize="m" paddingSize="m" isCopyable onCopy={onCopied}>
{MACROS_SPLUNK_QUERY}
</EuiCodeBlock>
</div>
</EuiFlexItem>
</EuiFlexGroup>
);
});
CopyExportQuery.displayName = 'CopyExportQuery';
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import { i18n } from '@kbn/i18n';

export const MACROS_DATA_INPUT_COPY_TITLE = i18n.translate(
'xpack.securitySolution.siemMigrations.rules.dataInputFlyout.macros.copyExportQuery.title',
{ defaultMessage: 'Copy macros query' }
{ defaultMessage: 'Export macros' }
);

export const MACROS_DATA_INPUT_COPY_DESCRIPTION_SECTION = i18n.translate(
'xpack.securitySolution.siemMigrations.rules.dataInputFlyout.macros.copyExportQuery.description.section',
'xpack.securitySolution.siemMigrations.rules.dataInputFlyout.macros.copyExportQuery.descriptionSection',
{ defaultMessage: 'Search and Reporting' }
);
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const MacrosFileUpload = React.memo<MacrosFileUploadProps>(
const isButtonDisabled = showLoader || macrosToUpload.length === 0;

return (
<EuiFlexGroup direction="column">
<EuiFlexGroup direction="column" gutterSize="s">
<EuiFlexItem>
<EuiFormRow
helpText={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n';

export const MACROS_DATA_INPUT_FILE_UPLOAD_TITLE = i18n.translate(
'xpack.securitySolution.siemMigrations.rules.dataInputFlyout.macros.macrosFileUpload.title',
{ defaultMessage: 'Update your macros export' }
{ defaultMessage: 'Upload exported macros' }
);
export const MACROS_DATA_INPUT_FILE_UPLOAD_PROMPT = i18n.translate(
'xpack.securitySolution.siemMigrations.rules.dataInputFlyout.macros.macrosFileUpload.prompt',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ import { i18n } from '@kbn/i18n';

export const MACROS_DATA_INPUT_TITLE = i18n.translate(
'xpack.securitySolution.siemMigrations.rules.dataInputFlyout.macros.title',
{ defaultMessage: 'Upload identified macros' }
{ defaultMessage: 'Upload macros' }
);
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ export const useCheckResourcesStep = ({
return {
title: i18n.RULES_DATA_INPUT_CHECK_RESOURCES_TITLE,
status: uploadStepStatus,
children: (
<EuiText size="xs" color="subdued">
{i18n.RULES_DATA_INPUT_CHECK_RESOURCES_DESCRIPTION}
</EuiText>
),
children: <EuiText size="s">{i18n.RULES_DATA_INPUT_CHECK_RESOURCES_DESCRIPTION}</EuiText>,
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ export const RULES_DATA_INPUT_CHECK_RESOURCES_TITLE = i18n.translate(
export const RULES_DATA_INPUT_CHECK_RESOURCES_DESCRIPTION = i18n.translate(
'xpack.securitySolution.siemMigrations.rules.dataInputFlyout.rules.checkResources.description',
{
defaultMessage: `For best translation results, we will automatically review your rules for macros and lookups and ask you to upload them. Once uploaded, we'll be able to deliver a more complete rule translation for all rules using those macros or lookups.`,
defaultMessage: `For best translation results, we will review the data for macros and lookups. If found, we will ask you to upload them next.`,
}
);
Loading