mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
display hits and total hits for courier inspector requests (#23434)
* display hits and total hits for courier inspector requests * update Hits help text to explain difference between total hits * fix functional test
This commit is contained in:
parent
5d9d7242e5
commit
1b763d8ba6
2 changed files with 7 additions and 2 deletions
|
@ -54,10 +54,15 @@ function getResponseInspectorStats(searchSource, resp) {
|
|||
}
|
||||
|
||||
if (resp && resp.hits) {
|
||||
stats.Hits = {
|
||||
stats['Hits (total)'] = {
|
||||
value: `${resp.hits.total}`,
|
||||
description: 'The number of documents that match the query.',
|
||||
};
|
||||
|
||||
stats.Hits = {
|
||||
value: `${resp.hits.hits.length}`,
|
||||
description: 'The number of documents returned by the query.',
|
||||
};
|
||||
}
|
||||
|
||||
if (lastRequest && (lastRequest.ms === 0 || lastRequest.ms)) {
|
||||
|
|
|
@ -28,7 +28,7 @@ export default function ({ getService, getPageObjects }) {
|
|||
const STATS_ROW_VALUE_INDEX = 1;
|
||||
function getHitCount(requestStats) {
|
||||
const hitsCountStatsRow = requestStats.find((statsRow) => {
|
||||
return statsRow[STATS_ROW_NAME_INDEX] === 'Hits';
|
||||
return statsRow[STATS_ROW_NAME_INDEX] === 'Hits (total)';
|
||||
});
|
||||
return hitsCountStatsRow[STATS_ROW_VALUE_INDEX];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue