From 07df3b1f4813899c3477b5f5118ba7a675e2f6d7 Mon Sep 17 00:00:00 2001 From: Karen Grigoryan Date: Tue, 4 Jun 2024 15:41:58 +0200 Subject: [PATCH] =?UTF-8?q?[Security=20Solution][DQD]=20add=20nested=20fie?= =?UTF-8?q?ld=20items=20for=20incompatible=20and=20=E2=80=A6=20(#184657)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …same family fields Addresses #184037 - Add `incompatibleFieldItems` and `sameFamilyFieldItems` as nested fields with required attributes. Steps to verify the change: 1. Bootup PR branch with local es + kibana 2. Open Kibana DevTools 3. Call `GET .kibana-data-quality-dashboard-results-default/_mapping` 4. Verify existence of properly nested `incompatibleFieldItems` and `sameFamilyFieldItems` new fields ![image](https://github.com/elastic/kibana/assets/1625373/c92a37d8-3b03-4e70-a881-975355a0c834) ![image](https://github.com/elastic/kibana/assets/1625373/ce23f8d2-0e4a-45bd-b005-3abd975fc47b) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../server/lib/data_stream/results_field_map.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/x-pack/plugins/ecs_data_quality_dashboard/server/lib/data_stream/results_field_map.ts b/x-pack/plugins/ecs_data_quality_dashboard/server/lib/data_stream/results_field_map.ts index a8d4fadb72ca1..8fbb3c354df8d 100644 --- a/x-pack/plugins/ecs_data_quality_dashboard/server/lib/data_stream/results_field_map.ts +++ b/x-pack/plugins/ecs_data_quality_dashboard/server/lib/data_stream/results_field_map.ts @@ -18,8 +18,19 @@ export const resultsFieldMap: FieldMap = { totalFieldCount: { type: 'long', required: true }, ecsFieldCount: { type: 'long', required: true }, customFieldCount: { type: 'long', required: true }, + incompatibleFieldItems: { type: 'nested', required: true, array: true }, + 'incompatibleFieldItems.fieldName': { type: 'keyword', required: true }, + 'incompatibleFieldItems.expectedValue': { type: 'keyword', required: true }, + 'incompatibleFieldItems.actualValue': { type: 'keyword', required: true }, + 'incompatibleFieldItems.description': { type: 'keyword', required: true }, + 'incompatibleFieldItems.reason': { type: 'keyword', required: true }, incompatibleFieldCount: { type: 'long', required: true }, sameFamilyFieldCount: { type: 'long', required: true }, + sameFamilyFieldItems: { type: 'nested', required: true, array: true }, + 'sameFamilyFieldItems.fieldName': { type: 'keyword', required: true }, + 'sameFamilyFieldItems.expectedValue': { type: 'keyword', required: true }, + 'sameFamilyFieldItems.actualValue': { type: 'keyword', required: true }, + 'sameFamilyFieldItems.description': { type: 'keyword', required: true }, sameFamilyFields: { type: 'keyword', required: true, array: true }, unallowedMappingFields: { type: 'keyword', required: true, array: true }, unallowedValueFields: { type: 'keyword', required: true, array: true },