mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
Ensure we always send a comma delimited index to support commas in index patterns (#17173)
* Ensure we always send a comma delimited index * Get visualizations working for index patterns with commas * Fix test failures
This commit is contained in:
parent
958f959eb3
commit
f3c011d12e
3 changed files with 5 additions and 6 deletions
|
@ -88,7 +88,7 @@ export function SegmentedRequestProvider(Private, timefilter, config) {
|
|||
const indexCount = Math.max(1, Math.floor(this._queue.length / remainingSegments));
|
||||
|
||||
const indices = this._active = this._queue.splice(0, indexCount);
|
||||
params.index = _.pluck(indices, 'index');
|
||||
params.index = indices.map(({ index }) => index).join(',');
|
||||
|
||||
if (_.isNumber(this._desiredSize)) {
|
||||
params.body.size = this._pickSizeForIndices(indices);
|
||||
|
|
|
@ -346,8 +346,7 @@ describe('index pattern', function () {
|
|||
|
||||
it('is fulfilled by the result of interval toIndexList', async function () {
|
||||
const indexList = await indexPattern.toIndexList();
|
||||
expect(indexList[0]).to.equal('foo');
|
||||
expect(indexList[1]).to.equal('bar');
|
||||
expect(indexList).to.equal('foo,bar');
|
||||
});
|
||||
|
||||
describe('with sort order', function () {
|
||||
|
@ -372,7 +371,7 @@ describe('index pattern', function () {
|
|||
|
||||
it('is fulfilled using the id', async function () {
|
||||
const indexList = await indexPattern.toIndexList();
|
||||
expect(indexList).to.eql([indexPattern.title]);
|
||||
expect(indexList).to.eql(indexPattern.title);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -387,7 +386,7 @@ describe('index pattern', function () {
|
|||
|
||||
it('is fulfilled by id', async function () {
|
||||
const indexList = await indexPattern.toIndexList();
|
||||
expect(indexList).to.eql([indexPattern.title]);
|
||||
expect(indexList).to.eql(indexPattern.title);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -289,7 +289,7 @@ export function IndexPatternProvider(Private, config, Promise, confirmModalPromi
|
|||
if (!Array.isArray(detailedIndices)) {
|
||||
return detailedIndices.index;
|
||||
}
|
||||
return _.pluck(detailedIndices, 'index');
|
||||
return detailedIndices.map(({ index }) => index).join(',');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue