From da30e40e0919bcdd6e98753c40ffb481c8d6e784 Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Thu, 29 May 2025 10:30:13 +0200 Subject: [PATCH] [Discover] Show ES|QL request URL in Inpector flyout (#221816) - Closes https://github.com/elastic/kibana/issues/221581 ## Summary This PR adds the missing `requestParams` to the search interceptor code. This makes the request URL appear again in Inpector flyout (Request tab). Screenshot 2025-05-28 at 17 55 09 ### Checklist - [x] [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 - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) (cherry picked from commit 7fae9c5d6e86a588f6657dabe6894519449a03ad) --- .../data/public/search/search_interceptor/search_interceptor.ts | 1 + test/functional/apps/discover/esql/_esql_view.ts | 2 ++ .../functional/test_suites/common/discover/esql/_esql_view.ts | 2 ++ 3 files changed, 5 insertions(+) diff --git a/src/platform/plugins/shared/data/public/search/search_interceptor/search_interceptor.ts b/src/platform/plugins/shared/data/public/search/search_interceptor/search_interceptor.ts index a5456b2fa34b5..8f8ccfa8208d0 100644 --- a/src/platform/plugins/shared/data/public/search/search_interceptor/search_interceptor.ts +++ b/src/platform/plugins/shared/data/public/search/search_interceptor/search_interceptor.ts @@ -511,6 +511,7 @@ export class SearchInterceptor { rawResponse: esqlResponse, isPartial: esqlResponse.is_partial, isRunning: esqlResponse.is_running, + requestParams, warning, }; default: diff --git a/test/functional/apps/discover/esql/_esql_view.ts b/test/functional/apps/discover/esql/_esql_view.ts index f4c92caea6caa..55ef3e0c490a3 100644 --- a/test/functional/apps/discover/esql/_esql_view.ts +++ b/test/functional/apps/discover/esql/_esql_view.ts @@ -362,6 +362,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const requestNames = await inspector.getRequestNames(); expect(requestNames).to.contain('Table'); expect(requestNames).to.contain('Visualization'); + const request = await inspector.getRequest(1); + expect(request.command).to.be('POST /_query/async?drop_null_columns'); }); }); diff --git a/x-pack/test_serverless/functional/test_suites/common/discover/esql/_esql_view.ts b/x-pack/test_serverless/functional/test_suites/common/discover/esql/_esql_view.ts index e6259b033bede..dd053d16692c9 100644 --- a/x-pack/test_serverless/functional/test_suites/common/discover/esql/_esql_view.ts +++ b/x-pack/test_serverless/functional/test_suites/common/discover/esql/_esql_view.ts @@ -370,6 +370,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const requestNames = await inspector.getRequestNames(); expect(requestNames).to.contain('Table'); expect(requestNames).to.contain('Visualization'); + const request = await inspector.getRequest(1); + expect(request.command).to.be('POST /_query/async?drop_null_columns'); }); }); });