mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
parent
54be8b9a38
commit
a228bf6947
3 changed files with 22 additions and 20 deletions
|
@ -87,7 +87,7 @@ const CourierRequestHandlerProvider = function () {
|
|||
|
||||
const queryHash = calculateObjectHash(reqBody);
|
||||
// We only need to reexecute the query, if forceFetch was true or the hash of the request body has changed
|
||||
// since the last request.
|
||||
// since the last request
|
||||
const shouldQuery = forceFetch || (searchSource.lastQuery !== queryHash);
|
||||
|
||||
if (shouldQuery) {
|
||||
|
@ -111,26 +111,26 @@ const CourierRequestHandlerProvider = function () {
|
|||
|
||||
searchSource.rawResponse = response;
|
||||
|
||||
let resp = cloneDeep(response);
|
||||
for (const agg of aggs) {
|
||||
if (has(agg, 'type.postFlightRequest')) {
|
||||
resp = await agg.type.postFlightRequest(
|
||||
resp,
|
||||
aggs,
|
||||
agg,
|
||||
requestSearchSource,
|
||||
inspectorAdapters
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
searchSource.finalResponse = resp;
|
||||
|
||||
requestSearchSource.getSearchRequestBody().then(req => {
|
||||
request.json(req);
|
||||
});
|
||||
}
|
||||
|
||||
let resp = cloneDeep(searchSource.rawResponse);
|
||||
for (const agg of aggs) {
|
||||
if (has(agg, 'type.postFlightRequest')) {
|
||||
resp = await agg.type.postFlightRequest(
|
||||
resp,
|
||||
aggs,
|
||||
agg,
|
||||
requestSearchSource,
|
||||
inspectorAdapters
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
searchSource.finalResponse = resp;
|
||||
|
||||
const parsedTimeRange = timeRange ? getTime(aggs.indexPattern, timeRange) : null;
|
||||
const tabifyParams = {
|
||||
metricsAtAllLevels: isHierarchical,
|
||||
|
|
|
@ -203,6 +203,9 @@ export default function ({ getService, getPageObjects }) {
|
|||
await PageObjects.visualize.selectAggregation('Terms');
|
||||
await PageObjects.visualize.selectField('extension.raw');
|
||||
await PageObjects.visualize.setSize(2);
|
||||
await PageObjects.visualize.clickGo();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
|
||||
await PageObjects.visualize.toggleOtherBucket();
|
||||
await PageObjects.visualize.toggleMissingBucket();
|
||||
await PageObjects.visualize.clickGo();
|
||||
|
|
|
@ -81,7 +81,6 @@ export default function ({ getService, getPageObjects }) {
|
|||
['160,000', '44'], ['200,000', '40'], ['240,000', '46'], ['280,000', '39'], ['320,000', '40'], ['360,000', '47']
|
||||
];
|
||||
|
||||
|
||||
await PageObjects.visualize.openInspector();
|
||||
await PageObjects.visualize.setInspectorTablePageSize(50);
|
||||
const data = await PageObjects.visualize.getInspectorTableData();
|
||||
|
@ -118,8 +117,9 @@ export default function ({ getService, getPageObjects }) {
|
|||
it('should apply correct filter on other bucket', async () => {
|
||||
const expectedTableData = [ 'Missing', 'osx' ];
|
||||
|
||||
await PageObjects.visualize.filterPieSlice('Other');
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
await PageObjects.visualize.filterPieSlice('Other');
|
||||
await PageObjects.visualize.waitForVisualization();
|
||||
const pieData = await PageObjects.visualize.getPieChartLabels();
|
||||
log.debug(`pieData.length = ${pieData.length}`);
|
||||
expect(pieData).to.eql(expectedTableData);
|
||||
|
@ -131,7 +131,7 @@ export default function ({ getService, getPageObjects }) {
|
|||
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
await PageObjects.visualize.filterLegend('Other');
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
await PageObjects.visualize.waitForVisualization();
|
||||
const pieData = await PageObjects.visualize.getPieChartLabels();
|
||||
log.debug(`pieData.length = ${pieData.length}`);
|
||||
expect(pieData).to.eql(expectedTableData);
|
||||
|
@ -154,7 +154,6 @@ export default function ({ getService, getPageObjects }) {
|
|||
await PageObjects.visualize.toggleMissingBucket();
|
||||
log.debug('clickGo');
|
||||
await PageObjects.visualize.clickGo();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
const pieData = await PageObjects.visualize.getPieChartLabels();
|
||||
log.debug(`pieData.length = ${pieData.length}`);
|
||||
expect(pieData).to.eql(expectedTableData);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue