Skip to content

Commit

Permalink
fix after-rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
maximpn committed Dec 19, 2024
1 parent 20905ab commit f15a0dd
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 550 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37709,7 +37709,6 @@
"xpack.securitySolution.detectionEngine.createRule.stepDefineRule.SavedQueryFormRowLabel": "Requête enregistrée",
"xpack.securitySolution.detectionEngine.createRule.stepDefineRule.source": "Source",
"xpack.securitySolution.detectionEngine.createRule.stepDefineRule.Su.perRuleExecutionWarning": "L'option d'exécution par règles n'est pas disponible pour le type de règle Seuil",
"xpack.securitySolution.detectionEngine.createRule.stepDefineRule.threatMatchIndexForbiddenError": "Le modèle d'indexation ne peut pas être { forbiddenString }. Veuillez choisir un modèle d'indexation plus spécifique.",
"xpack.securitySolution.detectionEngine.createRule.stepDefineRule.thresholdField.thresholdFieldPlaceholderText": "Tous les résultats",
"xpack.securitySolution.detectionEngine.createRule.stepRuleActions.docsLinkText": "En savoir plus",
"xpack.securitySolution.detectionEngine.createRule.stepRuleActions.invalidMustacheTemplateErrorMessage": "{key} n'est pas un modèle de moustache valide",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37567,7 +37567,6 @@
"xpack.securitySolution.detectionEngine.createRule.stepDefineRule.SavedQueryFormRowLabel": "保存されたクエリ",
"xpack.securitySolution.detectionEngine.createRule.stepDefineRule.source": "送信元",
"xpack.securitySolution.detectionEngine.createRule.stepDefineRule.Su.perRuleExecutionWarning": "しきい値ルールタイプでは、ルール実行単位オプションは使用できません。",
"xpack.securitySolution.detectionEngine.createRule.stepDefineRule.threatMatchIndexForbiddenError": "インデックスパターンを{ forbiddenString }にすることはできません。特定のインデックスパターンを選択してください。",
"xpack.securitySolution.detectionEngine.createRule.stepDefineRule.thresholdField.thresholdFieldPlaceholderText": "すべての結果",
"xpack.securitySolution.detectionEngine.createRule.stepRuleActions.docsLinkText": "詳細",
"xpack.securitySolution.detectionEngine.createRule.stepRuleActions.invalidMustacheTemplateErrorMessage": "{key}は有効なmustacheテンプレートではありません",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36999,7 +36999,6 @@
"xpack.securitySolution.detectionEngine.createRule.stepDefineRule.SavedQueryFormRowLabel": "已保存查询",
"xpack.securitySolution.detectionEngine.createRule.stepDefineRule.source": "源",
"xpack.securitySolution.detectionEngine.createRule.stepDefineRule.Su.perRuleExecutionWarning": "每次规则执行选项不可用于阈值规则类型",
"xpack.securitySolution.detectionEngine.createRule.stepDefineRule.threatMatchIndexForbiddenError": "索引模式不能是{ forbiddenString }。请选择更具体的索引模式。",
"xpack.securitySolution.detectionEngine.createRule.stepDefineRule.thresholdField.thresholdFieldPlaceholderText": "所有结果",
"xpack.securitySolution.detectionEngine.createRule.stepRuleActions.docsLinkText": "了解详情",
"xpack.securitySolution.detectionEngine.createRule.stepRuleActions.invalidMustacheTemplateErrorMessage": "{key} 不是有效的 Mustache 模板",
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
import { i18n } from '@kbn/i18n';

export const THREAT_MATCH_INDEX_FIELD_VALIDATION_REQUIRED_ERROR = i18n.translate(
'xpack.securitySolution.ruleManagement.ruleFields.threatMatchIndex.validation.requiredError',
'xpack.securitySolution.detectionEngine.ruleManagement.ruleFields.threatMatchIndex.validation.requiredError',
{
defaultMessage: 'A minimum of one index pattern is required.',
}
);

export const THREAT_MATCH_INDEX_FIELD_VALIDATION_FORBIDDEN_PATTERN_ERROR = i18n.translate(
'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.threatMatchIndexForbiddenError',
'xpack.securitySolution.detectionEngine.ruleManagement.ruleFields.threatMatchIndexForbiddenError',
{
defaultMessage: 'The index pattern cannot be "*". Please choose a more specific index pattern.',
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ import { NEW_TERMS_FIELDS_LABEL } from '../../../rule_creation/components/new_te
import { HISTORY_WINDOW_START_LABEL } from '../../../rule_creation/components/history_window_start_edit/translations';
import { MACHINE_LEARNING_JOB_ID_LABEL } from '../../../rule_creation/components/machine_learning_job_id_edit/translations';
import { ANOMALY_THRESHOLD_LABEL } from '../../../rule_creation/components/anomaly_threshold_edit/translations';
import type { FieldValueQueryBar } from '../query_bar_field';
import { THREAT_MATCH_MAPPING_FIELD_LABEL } from '../../../rule_creation/components/threat_match_mapping_edit/translations';
import { THREAT_MATCH_QUERY_FIELD_LABEL } from '../../../rule_creation/components/threat_match_query_edit/translations';
import { THREAT_MATCH_INDEX_FIELD_LABEL } from '../../../rule_creation/components/threat_match_index_edit/translations';
import { THREAT_MATCH_INDICATOR_PATH_FIELD_LABEL } from '../../../rule_creation/components/threat_match_indicator_path_edit/translations';
import type { FieldValueQueryBar } from '../query_bar_field';

const DescriptionListContainer = styled(EuiDescriptionList)`
max-width: 600px;
Expand Down Expand Up @@ -348,12 +348,6 @@ export const getDescriptionItem = (
});
} else if (field === 'threatMapping') {
const threatMap: ThreatMapping = get(field, data);
<<<<<<< HEAD
return buildThreatMappingDescription(label, threatMap);
} else if (field === 'newTermsFields') {
const values: string[] = get(field, data);
return buildStringArrayDescription(NEW_TERMS_FIELDS_LABEL, field, values);
=======
return buildThreatMappingDescription(THREAT_MATCH_MAPPING_FIELD_LABEL, threatMap);
} else if (field === 'threatIndicatorPath') {
return [
Expand All @@ -362,7 +356,9 @@ export const getDescriptionItem = (
description: get(field, data),
},
];
>>>>>>> ab5ed90002e (fix Threat Match readonly labels)
} else if (field === 'newTermsFields') {
const values: string[] = get(field, data);
return buildStringArrayDescription(NEW_TERMS_FIELDS_LABEL, field, values);
} else if (Array.isArray(get(field, data)) && field !== 'threatMapping') {
const values: string[] = get(field, data);
return buildStringArrayDescription(label, field, values);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,6 @@ import {
} from '../../../../../common/detection_engine/utils';
import { EqlQueryEdit } from '../../../rule_creation/components/eql_query_edit';
import { DataViewSelectorField } from '../data_view_selector_field';
<<<<<<< HEAD
<<<<<<< HEAD
import { ThreatMatchInput } from '../threatmatch_input';
import { ThreatMatchIndexEdit } from '../../../rule_creation/components/threat_match_index_edit';
import { ThreatMatchQueryEdit } from '../../../rule_creation/components/threat_match_query_edit';
import { ThreatMatchMappingEdit } from '../../../rule_creation/components/threat_match_mapping_edit';
=======
import { ThreatMatchEdit } from '../threat_match_edit/threat_match_edit';
>>>>>>> 49853eaf618 (add threat mapping persistence functionality)
=======
>>>>>>> 81726efc647 (post-rebase conflicts resolving)
import { useFetchIndex } from '../../../../common/containers/source';
import { RequiredFields } from '../../../rule_creation/components/required_fields';
import { DocLink } from '../../../../common/components/links_to_docs/doc_link';
Expand All @@ -98,20 +87,13 @@ import { AnomalyThresholdEdit } from '../../../rule_creation/components/anomaly_
import { HistoryWindowStartEdit } from '../../../rule_creation/components/history_window_start_edit';
import { NewTermsFieldsEdit } from '../../../rule_creation/components/new_terms_fields_edit';
import { EsqlQueryEdit } from '../../../rule_creation/components/esql_query_edit';
<<<<<<< HEAD
import { CreateCustomMlJobButton } from '../../../rule_creation/components/create_ml_job_button/create_ml_job_button';
import { ThreatMatchEdit } from '../threat_match_edit';
import { usePersistentNewTermsState } from './use_persistent_new_terms_state';
import { usePersistentAlertSuppressionState } from './use_persistent_alert_suppression_state';
import { usePersistentThresholdState } from './use_persistent_threshold_state';
=======
import { ThreatMatchEdit } from '../threat_match_edit';
>>>>>>> 81726efc647 (post-rebase conflicts resolving)
import { usePersistentQuery } from './use_persistent_query';
<<<<<<< HEAD
import { usePersistentMachineLearningState } from './use_persistent_machine_learning_state';
=======
>>>>>>> 49853eaf618 (add threat mapping persistence functionality)
import { usePersistentThreatMatchState } from './use_persistent_threat_match_state';

const CommonUseField = getUseField({ component: Field });
Expand Down Expand Up @@ -246,8 +228,6 @@ const StepDefineRuleComponent: FC<StepDefineRuleProps> = ({
form,
});
usePersistentAlertSuppressionState({ form });
<<<<<<< HEAD
<<<<<<< HEAD
usePersistentThresholdState({ form, ruleTypePath: 'ruleType', thresholdPath: 'threshold' });
usePersistentMachineLearningState({
form,
Expand All @@ -262,14 +242,6 @@ const StepDefineRuleComponent: FC<StepDefineRuleProps> = ({
historyWindowStartPath: 'historyWindowSize',
});
usePersistentThreatMatchState({ form });
=======
usePersistentThreatMatchState({
form,
});
>>>>>>> 49853eaf618 (add threat mapping persistence functionality)
=======
usePersistentThreatMatchState({ form });
>>>>>>> 30e3c9c1f35 (fix validation upon saving)

const handleSetRuleFromTimeline = useCallback<SetRuleQuery>(
({ index: timelineIndex, queryBar: timelineQueryBar, eqlOptions }) => {
Expand Down Expand Up @@ -649,7 +621,6 @@ const StepDefineRuleComponent: FC<StepDefineRuleProps> = ({
</RuleTypeEuiFormRow>
</>
)}
<<<<<<< HEAD
{isMlRule(ruleType) && (
<EuiFormRow fullWidth>
<>
Expand All @@ -672,52 +643,6 @@ const StepDefineRuleComponent: FC<StepDefineRuleProps> = ({
<ThresholdEdit esFields={indexPattern.fields as FieldSpec[]} path="threshold" />
</EuiFormRow>
)}
=======
<RuleTypeEuiFormRow $isVisible={isMlRule(ruleType)} fullWidth>
<>
<UseField
path="machineLearningJobId"
component={MlJobSelect}
componentProps={{
describedByIds: ['detectionEngineStepDefineRulemachineLearningJobId'],
}}
/>
<UseField
path="anomalyThreshold"
component={AnomalyThresholdSlider}
componentProps={{
describedByIds: ['detectionEngineStepDefineRuleAnomalyThreshold'],
}}
/>
</>
</RuleTypeEuiFormRow>
<RuleTypeEuiFormRow
$isVisible={isThresholdRule}
data-test-subj="thresholdInput"
fullWidth
>
<>
<UseMultiFields
fields={{
thresholdField: {
path: 'threshold.field',
},
thresholdValue: {
path: 'threshold.value',
},
thresholdCardinalityField: {
path: 'threshold.cardinality.field',
},
thresholdCardinalityValue: {
path: 'threshold.cardinality.value',
},
}}
>
{ThresholdInputChildren}
</UseMultiFields>
</>
</RuleTypeEuiFormRow>
>>>>>>> 49853eaf618 (add threat mapping persistence functionality)
{isThreatMatchRule(ruleType) && (
<ThreatMatchEdit
indexPatternPath="threatIndex"
Expand All @@ -727,7 +652,6 @@ const StepDefineRuleComponent: FC<StepDefineRuleProps> = ({
threatIndexPatterns={threatIndexPatterns}
loading={threatIndexPatternsLoading}
/>
<<<<<<< HEAD
)}
{isNewTermsRule(ruleType) && (
<EuiFormRow data-test-subj="newTermsInput" fullWidth>
Expand All @@ -736,8 +660,6 @@ const StepDefineRuleComponent: FC<StepDefineRuleProps> = ({
<HistoryWindowStartEdit path="historyWindowSize" />
</>
</EuiFormRow>
=======
>>>>>>> 49853eaf618 (add threat mapping persistence functionality)
)}
<EuiSpacer size="m" />

Expand Down
Loading

0 comments on commit f15a0dd

Please sign in to comment.