From 0bc8cf7f49fe8b9e7bf8c3ebc0f30794472aba84 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Tue, 9 Aug 2022 09:53:07 -0500 Subject: [PATCH] Revert "[Security Solution][Data Views] - Update bulk actions data views index param to be snake_case (#138304)" This reverts commit bad17a12775bb45770ccdacacd910d5c383a197e. --- .../common/detection_engine/schemas/common/schemas.ts | 2 +- .../rules/all/bulk_actions/forms/index_patterns_form.tsx | 2 +- .../rules/bulk_actions/rule_params_modifier.ts | 4 ++-- .../security_and_spaces/group1/perform_bulk_action.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/common/schemas.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/common/schemas.ts index c0975925d480c..b0cbd63d8db42 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/common/schemas.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/common/schemas.ts @@ -401,7 +401,7 @@ const bulkActionEditPayloadIndexPatterns = t.intersection([ ]), value: index, }), - t.exact(t.partial({ overwrite_data_views: t.boolean })), + t.exact(t.partial({ overwriteDataViews: t.boolean })), ]); export type BulkActionEditPayloadIndexPatterns = t.TypeOf< diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/index_patterns_form.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/index_patterns_form.tsx index 2ce632be3ef3c..e760a960e6f74 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/index_patterns_form.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/index_patterns_form.tsx @@ -118,7 +118,7 @@ const IndexPatternsFormComponent = ({ const payload = { value: data.index, type: data.overwrite ? BulkActionEditType.set_index_patterns : editAction, - overwrite_data_views: data.overwriteDataViews, + overwriteDataViews: data.overwriteDataViews, }; onConfirm(payload); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/rule_params_modifier.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/rule_params_modifier.ts index 05dd63def9069..e3c8441e91d9a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/rule_params_modifier.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_actions/rule_params_modifier.ts @@ -35,7 +35,7 @@ const applyBulkActionEditToRuleParams = ( "Index patterns can't be added. Machine learning rule doesn't have index patterns property" ); - if (action.overwrite_data_views) { + if (action.overwriteDataViews) { ruleParams.dataViewId = undefined; } @@ -59,7 +59,7 @@ const applyBulkActionEditToRuleParams = ( "Index patterns can't be overwritten. Machine learning rule doesn't have index patterns property" ); - if (action.overwrite_data_views) { + if (action.overwriteDataViews) { ruleParams.dataViewId = undefined; } diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/perform_bulk_action.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/perform_bulk_action.ts index 1a59b28274c15..f3b4ea17f7d04 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/perform_bulk_action.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/perform_bulk_action.ts @@ -580,7 +580,7 @@ export default ({ getService }: FtrProviderContext): void => { { type: BulkActionEditType.add_index_patterns, value: ['initial-index-*'], - overwrite_data_views: true, + overwriteDataViews: true, }, ], })