From 570963b07b2e2cbffd2e5c10eae9896c50f019b2 Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Tue, 10 Oct 2023 11:25:12 +0200 Subject: [PATCH 1/5] [Discover] Unskip flaky field token tests (#168130) - Closes https://github.com/elastic/kibana/issues/168115 This PR unskips the flaky test and also extracts other tests from `discover/group2` into a new `discover/group4`. 100x group2 https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3390 100x group4 https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3386 --- .buildkite/ftr_configs.yml | 1 + .../group2/_data_grid_field_tokens.ts | 34 +++++++++++------ test/functional/apps/discover/group2/index.ts | 13 ------- .../{group2 => group4}/_adhoc_data_views.ts | 0 .../{group2 => group4}/_chart_hidden.ts | 0 .../_context_encoded_url_params.ts | 0 .../{group2 => group4}/_data_view_edit.ts | 0 .../{group2 => group4}/_date_nested.ts | 0 .../_discover_fields_api.ts | 0 .../discover/{group2 => group4}/_esql_view.ts | 0 .../{group2 => group4}/_hide_announcements.ts | 0 .../{group2 => group4}/_huge_fields.ts | 0 .../_indexpattern_with_unmapped_fields.ts | 0 .../_indexpattern_without_timefield.ts | 0 .../_runtime_fields_editor.ts | 0 .../_search_on_page_load.ts | 0 .../functional/apps/discover/group4/config.ts | 18 +++++++++ test/functional/apps/discover/group4/index.ts | 37 +++++++++++++++++++ test/functional/firefox/discover.config.ts | 2 + 19 files changed, 80 insertions(+), 25 deletions(-) rename test/functional/apps/discover/{group2 => group4}/_adhoc_data_views.ts (100%) rename test/functional/apps/discover/{group2 => group4}/_chart_hidden.ts (100%) rename test/functional/apps/discover/{group2 => group4}/_context_encoded_url_params.ts (100%) rename test/functional/apps/discover/{group2 => group4}/_data_view_edit.ts (100%) rename test/functional/apps/discover/{group2 => group4}/_date_nested.ts (100%) rename test/functional/apps/discover/{group2 => group4}/_discover_fields_api.ts (100%) rename test/functional/apps/discover/{group2 => group4}/_esql_view.ts (100%) rename test/functional/apps/discover/{group2 => group4}/_hide_announcements.ts (100%) rename test/functional/apps/discover/{group2 => group4}/_huge_fields.ts (100%) rename test/functional/apps/discover/{group2 => group4}/_indexpattern_with_unmapped_fields.ts (100%) rename test/functional/apps/discover/{group2 => group4}/_indexpattern_without_timefield.ts (100%) rename test/functional/apps/discover/{group2 => group4}/_runtime_fields_editor.ts (100%) rename test/functional/apps/discover/{group2 => group4}/_search_on_page_load.ts (100%) create mode 100644 test/functional/apps/discover/group4/config.ts create mode 100644 test/functional/apps/discover/group4/index.ts diff --git a/.buildkite/ftr_configs.yml b/.buildkite/ftr_configs.yml index 3e0a5e0e9381b..2cc8d8cb0ed7a 100644 --- a/.buildkite/ftr_configs.yml +++ b/.buildkite/ftr_configs.yml @@ -112,6 +112,7 @@ enabled: - test/functional/apps/discover/group1/config.ts - test/functional/apps/discover/group2/config.ts - test/functional/apps/discover/group3/config.ts + - test/functional/apps/discover/group4/config.ts - test/functional/apps/getting_started/config.ts - test/functional/apps/home/config.ts - test/functional/apps/kibana_overview/config.ts diff --git a/test/functional/apps/discover/group2/_data_grid_field_tokens.ts b/test/functional/apps/discover/group2/_data_grid_field_tokens.ts index 44e573d0dafa5..3731c1e15f446 100644 --- a/test/functional/apps/discover/group2/_data_grid_field_tokens.ts +++ b/test/functional/apps/discover/group2/_data_grid_field_tokens.ts @@ -7,7 +7,6 @@ */ import expect from '@kbn/expect'; -import { WebElementWrapper } from '../../../services/lib/web_element_wrapper'; import { FtrProviderContext } from '../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { @@ -21,6 +20,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'header', ]); const esArchiver = getService('esArchiver'); + const log = getService('log'); + const retry = getService('retry'); const dashboardAddPanel = getService('dashboardAddPanel'); const testSubjects = getService('testSubjects'); const kibanaServer = getService('kibanaServer'); @@ -31,26 +32,35 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }; async function findFirstColumnTokens() { - const header = await testSubjects.find('euiDataGridBody > dataGridHeader'); - return await findFirstFieldIcons(header); + return await findFirstFieldIcons('euiDataGridBody > dataGridHeader'); } async function findFirstDocViewerTokens() { await dataGrid.clickRowToggle({ rowIndex: 0 }); - const docViewer = await testSubjects.find('docTableDetailsFlyout'); - return await findFirstFieldIcons(docViewer); + return await findFirstFieldIcons('docTableDetailsFlyout'); } - async function findFirstFieldIcons(element: WebElementWrapper) { - const fieldIcons = await element.findAllByCssSelector('.kbnFieldIcon svg'); + async function findFirstFieldIcons(elementSelector: string) { + let firstFieldIcons: string[] | undefined; - return await Promise.all( - fieldIcons.map((fieldIcon) => fieldIcon.getAttribute('aria-label')).slice(0, 10) - ); + await retry.waitFor('field tokens', async () => { + const element = await testSubjects.find(elementSelector); + const fieldIcons = await element.findAllByCssSelector('.kbnFieldIcon svg'); + + firstFieldIcons = await Promise.all( + fieldIcons.slice(0, 10).map((fieldIcon) => fieldIcon.getAttribute('aria-label')) + ).catch((error) => { + log.debug(`error in findFirstFieldIcons: ${error.message}`); + return undefined; + }); + + return typeof firstFieldIcons !== 'undefined'; + }); + + return firstFieldIcons; } - // Failing: See https://github.com/elastic/kibana/issues/168115 - describe.skip('discover data grid field tokens', function () { + describe('discover data grid field tokens', function () { before(async () => { await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader']); await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); diff --git a/test/functional/apps/discover/group2/index.ts b/test/functional/apps/discover/group2/index.ts index a01110b5dc6ac..8174e3ef93aba 100644 --- a/test/functional/apps/discover/group2/index.ts +++ b/test/functional/apps/discover/group2/index.ts @@ -20,8 +20,6 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); }); - loadTestFile(require.resolve('./_indexpattern_without_timefield')); - loadTestFile(require.resolve('./_discover_fields_api')); loadTestFile(require.resolve('./_data_grid')); loadTestFile(require.resolve('./_data_grid_context')); loadTestFile(require.resolve('./_data_grid_field_data')); @@ -33,16 +31,5 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./_data_grid_pagination')); loadTestFile(require.resolve('./_data_grid_footer')); loadTestFile(require.resolve('./_data_grid_field_tokens')); - loadTestFile(require.resolve('./_adhoc_data_views')); - loadTestFile(require.resolve('./_esql_view')); - loadTestFile(require.resolve('./_indexpattern_with_unmapped_fields')); - loadTestFile(require.resolve('./_runtime_fields_editor')); - loadTestFile(require.resolve('./_huge_fields')); - loadTestFile(require.resolve('./_date_nested')); - loadTestFile(require.resolve('./_search_on_page_load')); - loadTestFile(require.resolve('./_chart_hidden')); - loadTestFile(require.resolve('./_context_encoded_url_params')); - loadTestFile(require.resolve('./_hide_announcements')); - loadTestFile(require.resolve('./_data_view_edit')); }); } diff --git a/test/functional/apps/discover/group2/_adhoc_data_views.ts b/test/functional/apps/discover/group4/_adhoc_data_views.ts similarity index 100% rename from test/functional/apps/discover/group2/_adhoc_data_views.ts rename to test/functional/apps/discover/group4/_adhoc_data_views.ts diff --git a/test/functional/apps/discover/group2/_chart_hidden.ts b/test/functional/apps/discover/group4/_chart_hidden.ts similarity index 100% rename from test/functional/apps/discover/group2/_chart_hidden.ts rename to test/functional/apps/discover/group4/_chart_hidden.ts diff --git a/test/functional/apps/discover/group2/_context_encoded_url_params.ts b/test/functional/apps/discover/group4/_context_encoded_url_params.ts similarity index 100% rename from test/functional/apps/discover/group2/_context_encoded_url_params.ts rename to test/functional/apps/discover/group4/_context_encoded_url_params.ts diff --git a/test/functional/apps/discover/group2/_data_view_edit.ts b/test/functional/apps/discover/group4/_data_view_edit.ts similarity index 100% rename from test/functional/apps/discover/group2/_data_view_edit.ts rename to test/functional/apps/discover/group4/_data_view_edit.ts diff --git a/test/functional/apps/discover/group2/_date_nested.ts b/test/functional/apps/discover/group4/_date_nested.ts similarity index 100% rename from test/functional/apps/discover/group2/_date_nested.ts rename to test/functional/apps/discover/group4/_date_nested.ts diff --git a/test/functional/apps/discover/group2/_discover_fields_api.ts b/test/functional/apps/discover/group4/_discover_fields_api.ts similarity index 100% rename from test/functional/apps/discover/group2/_discover_fields_api.ts rename to test/functional/apps/discover/group4/_discover_fields_api.ts diff --git a/test/functional/apps/discover/group2/_esql_view.ts b/test/functional/apps/discover/group4/_esql_view.ts similarity index 100% rename from test/functional/apps/discover/group2/_esql_view.ts rename to test/functional/apps/discover/group4/_esql_view.ts diff --git a/test/functional/apps/discover/group2/_hide_announcements.ts b/test/functional/apps/discover/group4/_hide_announcements.ts similarity index 100% rename from test/functional/apps/discover/group2/_hide_announcements.ts rename to test/functional/apps/discover/group4/_hide_announcements.ts diff --git a/test/functional/apps/discover/group2/_huge_fields.ts b/test/functional/apps/discover/group4/_huge_fields.ts similarity index 100% rename from test/functional/apps/discover/group2/_huge_fields.ts rename to test/functional/apps/discover/group4/_huge_fields.ts diff --git a/test/functional/apps/discover/group2/_indexpattern_with_unmapped_fields.ts b/test/functional/apps/discover/group4/_indexpattern_with_unmapped_fields.ts similarity index 100% rename from test/functional/apps/discover/group2/_indexpattern_with_unmapped_fields.ts rename to test/functional/apps/discover/group4/_indexpattern_with_unmapped_fields.ts diff --git a/test/functional/apps/discover/group2/_indexpattern_without_timefield.ts b/test/functional/apps/discover/group4/_indexpattern_without_timefield.ts similarity index 100% rename from test/functional/apps/discover/group2/_indexpattern_without_timefield.ts rename to test/functional/apps/discover/group4/_indexpattern_without_timefield.ts diff --git a/test/functional/apps/discover/group2/_runtime_fields_editor.ts b/test/functional/apps/discover/group4/_runtime_fields_editor.ts similarity index 100% rename from test/functional/apps/discover/group2/_runtime_fields_editor.ts rename to test/functional/apps/discover/group4/_runtime_fields_editor.ts diff --git a/test/functional/apps/discover/group2/_search_on_page_load.ts b/test/functional/apps/discover/group4/_search_on_page_load.ts similarity index 100% rename from test/functional/apps/discover/group2/_search_on_page_load.ts rename to test/functional/apps/discover/group4/_search_on_page_load.ts diff --git a/test/functional/apps/discover/group4/config.ts b/test/functional/apps/discover/group4/config.ts new file mode 100644 index 0000000000000..a70a190ca63f8 --- /dev/null +++ b/test/functional/apps/discover/group4/config.ts @@ -0,0 +1,18 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const functionalConfig = await readConfigFile(require.resolve('../../../config.base.js')); + + return { + ...functionalConfig.getAll(), + testFiles: [require.resolve('.')], + }; +} diff --git a/test/functional/apps/discover/group4/index.ts b/test/functional/apps/discover/group4/index.ts new file mode 100644 index 0000000000000..1aab3db2bfc43 --- /dev/null +++ b/test/functional/apps/discover/group4/index.ts @@ -0,0 +1,37 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import { FtrProviderContext } from '../ftr_provider_context'; + +export default function ({ getService, loadTestFile }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const browser = getService('browser'); + + describe('discover/group4', function () { + before(async function () { + await browser.setWindowSize(1600, 1200); + }); + + after(async function unloadMakelogs() { + await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); + }); + + loadTestFile(require.resolve('./_indexpattern_without_timefield')); + loadTestFile(require.resolve('./_discover_fields_api')); + loadTestFile(require.resolve('./_adhoc_data_views')); + loadTestFile(require.resolve('./_esql_view')); + loadTestFile(require.resolve('./_indexpattern_with_unmapped_fields')); + loadTestFile(require.resolve('./_runtime_fields_editor')); + loadTestFile(require.resolve('./_huge_fields')); + loadTestFile(require.resolve('./_date_nested')); + loadTestFile(require.resolve('./_search_on_page_load')); + loadTestFile(require.resolve('./_chart_hidden')); + loadTestFile(require.resolve('./_context_encoded_url_params')); + loadTestFile(require.resolve('./_hide_announcements')); + loadTestFile(require.resolve('./_data_view_edit')); + }); +} diff --git a/test/functional/firefox/discover.config.ts b/test/functional/firefox/discover.config.ts index 332caa668b409..8b7e7205cd434 100644 --- a/test/functional/firefox/discover.config.ts +++ b/test/functional/firefox/discover.config.ts @@ -20,6 +20,8 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { require.resolve('../apps/discover/classic'), require.resolve('../apps/discover/group1'), require.resolve('../apps/discover/group2'), + require.resolve('../apps/discover/group3'), + require.resolve('../apps/discover/group4'), ], junit: { From 99f20d9397eb105cf9be04d20fe22693f7b19eab Mon Sep 17 00:00:00 2001 From: Dario Gieselaar Date: Tue, 10 Oct 2023 12:10:23 +0200 Subject: [PATCH 2/5] [Obs AI Assistant] Disable ILM for conversations (#168371) Co-authored-by: Alex Szabo --- .../server/service/index.ts | 20 ------------------- .../server/service/types.ts | 3 --- 2 files changed, 23 deletions(-) diff --git a/x-pack/plugins/observability_ai_assistant/server/service/index.ts b/x-pack/plugins/observability_ai_assistant/server/service/index.ts index c116e16d27471..978a8a2de6111 100644 --- a/x-pack/plugins/observability_ai_assistant/server/service/index.ts +++ b/x-pack/plugins/observability_ai_assistant/server/service/index.ts @@ -60,9 +60,6 @@ export class ObservabilityAIAssistantService { conversations: getResourceName('index-template-conversations'), kb: getResourceName('index-template-kb'), }, - ilmPolicy: { - conversations: getResourceName('ilm-policy-conversations'), - }, pipelines: { kb: getResourceName('kb-ingest-pipeline'), }, @@ -112,23 +109,6 @@ export class ObservabilityAIAssistantService { template: conversationComponentTemplate, }); - await esClient.ilm.putLifecycle({ - name: this.resourceNames.ilmPolicy.conversations, - policy: { - phases: { - hot: { - min_age: '0s', - actions: { - rollover: { - max_age: '90d', - max_primary_shard_size: '50gb', - }, - }, - }, - }, - }, - }); - await esClient.indices.putIndexTemplate({ name: this.resourceNames.indexTemplate.conversations, composed_of: [this.resourceNames.componentTemplate.conversations], diff --git a/x-pack/plugins/observability_ai_assistant/server/service/types.ts b/x-pack/plugins/observability_ai_assistant/server/service/types.ts index ee44b1beac90f..39c2b29dbb026 100644 --- a/x-pack/plugins/observability_ai_assistant/server/service/types.ts +++ b/x-pack/plugins/observability_ai_assistant/server/service/types.ts @@ -14,9 +14,6 @@ export interface ObservabilityAIAssistantResourceNames { conversations: string; kb: string; }; - ilmPolicy: { - conversations: string; - }; aliases: { conversations: string; kb: string; From 3d979ad04618aeba50e071d6dc70079d00d7811a Mon Sep 17 00:00:00 2001 From: Christos Nasikas Date: Tue, 10 Oct 2023 14:28:36 +0300 Subject: [PATCH 3/5] [Cases] Add migration test for the Find Cases API (#168444) --- .../tests/common/cases/migrations.ts | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/x-pack/test/cases_api_integration/security_and_spaces/tests/common/cases/migrations.ts b/x-pack/test/cases_api_integration/security_and_spaces/tests/common/cases/migrations.ts index 3be3095ca2830..723646a1763e6 100644 --- a/x-pack/test/cases_api_integration/security_and_spaces/tests/common/cases/migrations.ts +++ b/x-pack/test/cases_api_integration/security_and_spaces/tests/common/cases/migrations.ts @@ -18,6 +18,7 @@ import { getCase, getCaseSavedObjectsFromES, resolveCase, + findCases, } from '../../../../common/lib/api'; import { superUser } from '../../../../common/lib/authentication/users'; @@ -73,6 +74,62 @@ export default function createGetTests({ getService }: FtrProviderContext) { syncAlerts: true, }); }); + + it('should return the cases correctly', async () => { + const cases = await findCases({ supertest }); + const theCase = cases.cases[0]; + + const { version, ...caseWithoutVersion } = theCase; + const { cases: _, ...caseStats } = cases; + + expect(cases.cases.length).to.eql(1); + + expect(caseStats).to.eql({ + count_closed_cases: 0, + count_in_progress_cases: 0, + count_open_cases: 1, + page: 1, + per_page: 20, + total: 1, + }); + + expect(caseWithoutVersion).to.eql({ + assignees: [], + category: null, + closed_at: null, + closed_by: null, + comments: [], + connector: { + fields: null, + id: 'connector-1', + name: 'none', + type: '.none', + }, + created_at: '2020-09-28T11:43:52.158Z', + created_by: { + email: null, + full_name: null, + username: 'elastic', + }, + customFields: [], + description: 'This is a brand new case of a bad meanie defacing data', + duration: null, + external_service: null, + id: 'e1900ac0-017f-11eb-93f8-d161651bf509', + owner: 'securitySolution', + settings: { + syncAlerts: true, + }, + severity: 'low', + status: 'open', + tags: ['defacement'], + title: 'Super Bad Security Issue', + totalAlerts: 0, + totalComment: 1, + updated_at: null, + updated_by: null, + }); + }); }); // tests upgrading a 7.11.1 saved object to the latest version From b0dbc706038c77a53c8757d9b8f7149dac71426b Mon Sep 17 00:00:00 2001 From: Stratoula Kalafateli Date: Tue, 10 Oct 2023 14:37:42 +0300 Subject: [PATCH 4/5] [ES|QL] Hides fields with nulls from document view (#168321) ## Summary ES|QL atm can be quite noisy at the Document view with many fields with null values. To improve a bit the experience we decided to not display these values in the Document view. The columns still exist in the available fields list and the expanded row. It is only for the document view that we don't want them to be rendered. In the example below you can see the `meta.char` field which is hidden on the document view but still available in the sidebar and the expanded row. ![image (11)](https://github.com/elastic/kibana/assets/17003240/35f975be-ff96-4eee-8420-571386329cfb) ![image (12)](https://github.com/elastic/kibana/assets/17003240/f5db6303-c583-4114-b18d-fa6088cb618f) ![image (13)](https://github.com/elastic/kibana/assets/17003240/82c5fbb1-5dc7-41c2-8978-c7d248821eee) ### Checklist - [ ] [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 --- .../src/components/data_table.tsx | 2 + .../src/utils/get_render_cell_value.test.tsx | 83 +++++++++++++++++++ .../src/utils/get_render_cell_value.tsx | 29 ++++--- 3 files changed, 103 insertions(+), 11 deletions(-) diff --git a/packages/kbn-unified-data-table/src/components/data_table.tsx b/packages/kbn-unified-data-table/src/components/data_table.tsx index aa61ecdd1bfe6..a1540e88a5cd6 100644 --- a/packages/kbn-unified-data-table/src/components/data_table.tsx +++ b/packages/kbn-unified-data-table/src/components/data_table.tsx @@ -538,6 +538,7 @@ export const UnifiedDataTable = ({ fieldFormats: services.fieldFormats, maxEntries: maxDocFieldsDisplayed, externalCustomRenderers, + isPlainRecord, }), [ dataView, @@ -547,6 +548,7 @@ export const UnifiedDataTable = ({ maxDocFieldsDisplayed, services.fieldFormats, externalCustomRenderers, + isPlainRecord, ] ); diff --git a/packages/kbn-unified-data-table/src/utils/get_render_cell_value.test.tsx b/packages/kbn-unified-data-table/src/utils/get_render_cell_value.test.tsx index d522ae70d28b5..7db7ffedfdecf 100644 --- a/packages/kbn-unified-data-table/src/utils/get_render_cell_value.test.tsx +++ b/packages/kbn-unified-data-table/src/utils/get_render_cell_value.test.tsx @@ -75,6 +75,18 @@ const rowsSource: EsHitRecord[] = [ }, ]; +const rowsSourceWithEmptyValues: EsHitRecord[] = [ + { + _id: '1', + _index: 'test', + _score: 1, + _source: { bytes: 100, extension: null }, + highlight: { + extension: ['@kibana-highlighted-field.gz@/kibana-highlighted-field'], + }, + }, +]; + const rowsFields: EsHitRecord[] = [ { _id: '1', @@ -344,6 +356,77 @@ describe('Unified data table cell rendering', function () { `); }); + it('renders _source column correctly if on text based mode and have nulls', () => { + const DataTableCellValue = getRenderCellValueFn({ + dataView: dataViewMock, + rows: rowsSourceWithEmptyValues.map(build), + useNewFieldsApi: false, + shouldShowFieldHandler: (fieldName) => ['extension', 'bytes'].includes(fieldName), + closePopover: jest.fn(), + fieldFormats: mockServices.fieldFormats as unknown as FieldFormatsStart, + maxEntries: 100, + isPlainRecord: true, + }); + const component = shallow( + + ); + expect(component).toMatchInlineSnapshot(` + + + bytesDisplayName + + + + _index + + + + _score + + + + `); + }); + it('renders fields-based column correctly', () => { const DataTableCellValue = getRenderCellValueFn({ dataView: dataViewMock, diff --git a/packages/kbn-unified-data-table/src/utils/get_render_cell_value.tsx b/packages/kbn-unified-data-table/src/utils/get_render_cell_value.tsx index 2f9a3dd92b575..581230b525757 100644 --- a/packages/kbn-unified-data-table/src/utils/get_render_cell_value.tsx +++ b/packages/kbn-unified-data-table/src/utils/get_render_cell_value.tsx @@ -43,6 +43,7 @@ export const getRenderCellValueFn = ({ fieldFormats, maxEntries, externalCustomRenderers, + isPlainRecord, }: { dataView: DataView; rows: DataTableRecord[] | undefined; @@ -55,6 +56,7 @@ export const getRenderCellValueFn = ({ string, (props: EuiDataGridCellValueElementProps) => React.ReactNode >; + isPlainRecord?: boolean; }) => { return ({ rowIndex, @@ -144,17 +146,22 @@ export const getRenderCellValueFn = ({ compressed className={classnames('unifiedDataTable__descriptionList', CELL_CLASS)} > - {pairs.map(([fieldDisplayName, value]) => ( - - - {fieldDisplayName} - - - - ))} + {pairs.map(([fieldDisplayName, value, fieldName]) => { + // temporary solution for text based mode. As there are a lot of unsupported fields we want to + // hide the empty one from the Document view + if (isPlainRecord && fieldName && row.flattened[fieldName] === null) return null; + return ( + + + {fieldDisplayName} + + + + ); + })} ); } From 631c62b8ffc6ec5a8fa3dab4c0ecc85ba59edb1b Mon Sep 17 00:00:00 2001 From: Alex Szabo Date: Tue, 10 Oct 2023 13:41:42 +0200 Subject: [PATCH 5/5] [Ops] Disable test suite (#168455) ## Summary Disabling a very unstable suite (https://github.com/elastic/kibana/issues/168429) cc: @nkhristinin --- .../security_and_spaces/group10/risk_engine/telemetry_usage.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/telemetry_usage.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/telemetry_usage.ts index 9135879f3e2eb..5306937a97ab5 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/telemetry_usage.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/telemetry_usage.ts @@ -65,7 +65,8 @@ export default ({ getService }: FtrProviderContext) => { }); }); - describe('Risk engine enabled', () => { + // FLAKY: https://github.com/elastic/kibana/issues/168429 + describe.skip('Risk engine enabled', () => { let hostId: string; let userId: string;