mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
# Backport This will backport the following commits from `main` to `8.x`: - [[ES|QL] Pass the took time to the inspector (#194806)](https://github.com/elastic/kibana/pull/194806) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Stratoula Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2024-10-04T05:49:31Z","message":"[ES|QL] Pass the took time to the inspector (#194806)\n\n## Summary\r\n\r\nNow that this PR https://github.com/elastic/elasticsearch/pull/112595\r\nlanded in our snapshot, we can have the query time in the inspector.\r\n\r\n<img width=\"798\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/1ba1c59e-f094-4a56-964d-d76bdc1db8b3\">\r\n\r\n\r\n<img width=\"1017\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/48464d7c-60c0-4924-bfcb-85f82b7caa40\">","sha":"2621bb7acbc3809db98a85e5c2ce3bfabc8ee660","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","v9.0.0","backport:prev-minor","Feature:ES|QL","Team:ESQL","v8.16.0"],"title":"[ES|QL] Pass the took time to the inspector","number":194806,"url":"https://github.com/elastic/kibana/pull/194806","mergeCommit":{"message":"[ES|QL] Pass the took time to the inspector (#194806)\n\n## Summary\r\n\r\nNow that this PR https://github.com/elastic/elasticsearch/pull/112595\r\nlanded in our snapshot, we can have the query time in the inspector.\r\n\r\n<img width=\"798\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/1ba1c59e-f094-4a56-964d-d76bdc1db8b3\">\r\n\r\n\r\n<img width=\"1017\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/48464d7c-60c0-4924-bfcb-85f82b7caa40\">","sha":"2621bb7acbc3809db98a85e5c2ce3bfabc8ee660"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194806","number":194806,"mergeCommit":{"message":"[ES|QL] Pass the took time to the inspector (#194806)\n\n## Summary\r\n\r\nNow that this PR https://github.com/elastic/elasticsearch/pull/112595\r\nlanded in our snapshot, we can have the query time in the inspector.\r\n\r\n<img width=\"798\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/1ba1c59e-f094-4a56-964d-d76bdc1db8b3\">\r\n\r\n\r\n<img width=\"1017\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/48464d7c-60c0-4924-bfcb-85f82b7caa40\">","sha":"2621bb7acbc3809db98a85e5c2ce3bfabc8ee660"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
This commit is contained in:
parent
8a604f12cd
commit
18b2b5c371
2 changed files with 17 additions and 0 deletions
|
@ -681,6 +681,7 @@ export interface ESQLSearchResponse {
|
|||
// while columns only the available ones (non nulls)
|
||||
all_columns?: ESQLColumn[];
|
||||
values: ESQLRow[];
|
||||
took?: number;
|
||||
}
|
||||
|
||||
export interface ESQLSearchParams {
|
||||
|
|
|
@ -271,6 +271,22 @@ export const getEsqlFn = ({ getStartDependencies }: EsqlFnArguments) => {
|
|||
defaultMessage: 'The number of documents returned by the query.',
|
||||
}),
|
||||
},
|
||||
...(rawResponse?.took && {
|
||||
queryTime: {
|
||||
label: i18n.translate('data.search.es_search.queryTimeLabel', {
|
||||
defaultMessage: 'Query time',
|
||||
}),
|
||||
value: i18n.translate('data.search.es_search.queryTimeValue', {
|
||||
defaultMessage: '{queryTime}ms',
|
||||
values: { queryTime: rawResponse.took },
|
||||
}),
|
||||
description: i18n.translate('data.search.es_search.queryTimeDescription', {
|
||||
defaultMessage:
|
||||
'The time it took to process the query. ' +
|
||||
'Does not include the time to send the request or parse it in the browser.',
|
||||
}),
|
||||
},
|
||||
}),
|
||||
})
|
||||
.json(params)
|
||||
.ok({ json: rawResponse, requestParams });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue