* 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
c51ec363a3
commit
a5950b7db6
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…
Reference in a new issue