0} />
-
+
{content}
diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/processors_reducer/constants.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/processors_reducer/constants.ts
similarity index 100%
rename from x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/processors_reducer/constants.ts
rename to x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/processors_reducer/constants.ts
diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/processors_reducer/index.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/processors_reducer/index.ts
similarity index 100%
rename from x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/processors_reducer/index.ts
rename to x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/processors_reducer/index.ts
diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/processors_reducer/processors_reducer.test.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/processors_reducer/processors_reducer.test.ts
similarity index 100%
rename from x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/processors_reducer/processors_reducer.test.ts
rename to x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/processors_reducer/processors_reducer.test.ts
diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/processors_reducer/processors_reducer.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/processors_reducer/processors_reducer.ts
similarity index 100%
rename from x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/processors_reducer/processors_reducer.ts
rename to x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/processors_reducer/processors_reducer.ts
diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/processors_reducer/utils.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/processors_reducer/utils.ts
similarity index 100%
rename from x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/processors_reducer/utils.ts
rename to x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/processors_reducer/utils.ts
diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/serialize.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/serialize.ts
similarity index 100%
rename from x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/serialize.ts
rename to x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/serialize.ts
diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/types.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/types.ts
similarity index 100%
rename from x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/types.ts
rename to x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/types.ts
diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/use_is_mounted.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/use_is_mounted.ts
similarity index 100%
rename from x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/use_is_mounted.ts
rename to x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/use_is_mounted.ts
diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/utils.test.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/utils.test.ts
similarity index 100%
rename from x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/utils.test.ts
rename to x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/utils.test.ts
diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/utils.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/utils.ts
similarity index 100%
rename from x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/utils.ts
rename to x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/utils.ts
diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form.tsx
index ffd82b0bbaf35..ac8612a36dd7e 100644
--- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form.tsx
+++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form.tsx
@@ -11,7 +11,7 @@ import { EuiButton, EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiSpacer } from
import { useForm, Form, FormConfig } from '../../../shared_imports';
import { Pipeline, Processor } from '../../../../common/types';
-import { OnUpdateHandlerArg, OnUpdateHandler } from '../pipeline_processors_editor';
+import { OnUpdateHandlerArg, OnUpdateHandler } from '../pipeline_editor';
import { PipelineRequestFlyout } from './pipeline_request_flyout';
import { PipelineFormFields } from './pipeline_form_fields';
diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_fields.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_fields.tsx
index a7ffe7ba02caa..b1b2e04e7d0dc 100644
--- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_fields.tsx
+++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_fields.tsx
@@ -16,8 +16,8 @@ import {
ProcessorsEditorContextProvider,
OnUpdateHandler,
OnDoneLoadJsonHandler,
- PipelineProcessorsEditor,
-} from '../pipeline_processors_editor';
+ PipelineEditor,
+} from '../pipeline_editor';
interface Props {
processors: Processor[];
@@ -119,7 +119,7 @@ export const PipelineFormFields: React.FunctionComponent
= ({
onUpdate={onProcessorsUpdate}
value={{ processors, onFailure }}
>
-
+
>
);
diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/pipeline_processors_editor.scss b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/pipeline_processors_editor.scss
deleted file mode 100644
index d5592b87dda51..0000000000000
--- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/pipeline_processors_editor.scss
+++ /dev/null
@@ -1,11 +0,0 @@
-.pipelineProcessorsEditor {
- margin-bottom: $euiSizeXL;
-
- &__container {
- background-color: $euiColorLightestShade;
- }
-
- &__onFailureTitle {
- padding-left: $euiSizeS;
- }
-}
diff --git a/x-pack/plugins/maps/common/descriptor_types/data_request_descriptor_types.ts b/x-pack/plugins/maps/common/descriptor_types/data_request_descriptor_types.ts
index b00281588734d..c9391e1aac749 100644
--- a/x-pack/plugins/maps/common/descriptor_types/data_request_descriptor_types.ts
+++ b/x-pack/plugins/maps/common/descriptor_types/data_request_descriptor_types.ts
@@ -18,6 +18,7 @@ export type MapFilters = {
filters: Filter[];
query?: MapQuery;
refreshTimerLastTriggeredAt?: string;
+ searchSessionId?: string;
timeFilters: TimeRange;
zoom: number;
};
diff --git a/x-pack/plugins/maps/public/actions/map_actions.test.js b/x-pack/plugins/maps/public/actions/map_actions.test.js
index 1d1f8a511c4fa..c091aba14687a 100644
--- a/x-pack/plugins/maps/public/actions/map_actions.test.js
+++ b/x-pack/plugins/maps/public/actions/map_actions.test.js
@@ -260,6 +260,7 @@ describe('map_actions', () => {
$state: { store: 'appState' },
},
];
+ const searchSessionId = '1234';
beforeEach(() => {
//Mocks the "previous" state
@@ -272,6 +273,9 @@ describe('map_actions', () => {
require('../selectors/map_selectors').getFilters = () => {
return filters;
};
+ require('../selectors/map_selectors').getSearchSessionId = () => {
+ return searchSessionId;
+ };
require('../selectors/map_selectors').getMapSettings = () => {
return {
autoFitToDataBounds: false,
@@ -288,12 +292,14 @@ describe('map_actions', () => {
const setQueryAction = await setQuery({
query: newQuery,
filters,
+ searchSessionId,
});
await setQueryAction(dispatchMock, getStoreMock);
expect(dispatchMock.mock.calls).toEqual([
[
{
+ searchSessionId,
timeFilters,
query: newQuery,
filters,
@@ -304,11 +310,25 @@ describe('map_actions', () => {
]);
});
+ it('should dispatch query action when searchSessionId changes', async () => {
+ const setQueryAction = await setQuery({
+ timeFilters,
+ query,
+ filters,
+ searchSessionId: '5678',
+ });
+ await setQueryAction(dispatchMock, getStoreMock);
+
+ // dispatchMock calls: dispatch(SET_QUERY) and dispatch(syncDataForAllLayers())
+ expect(dispatchMock.mock.calls.length).toEqual(2);
+ });
+
it('should not dispatch query action when nothing changes', async () => {
const setQueryAction = await setQuery({
timeFilters,
query,
filters,
+ searchSessionId,
});
await setQueryAction(dispatchMock, getStoreMock);
diff --git a/x-pack/plugins/maps/public/actions/map_actions.ts b/x-pack/plugins/maps/public/actions/map_actions.ts
index 64c35bd207439..afb3df5be73de 100644
--- a/x-pack/plugins/maps/public/actions/map_actions.ts
+++ b/x-pack/plugins/maps/public/actions/map_actions.ts
@@ -19,6 +19,7 @@ import {
getQuery,
getTimeFilters,
getLayerList,
+ getSearchSessionId,
} from '../selectors/map_selectors';
import {
CLEAR_GOTO,
@@ -225,11 +226,13 @@ export function setQuery({
timeFilters,
filters = [],
forceRefresh = false,
+ searchSessionId,
}: {
filters?: Filter[];
query?: Query;
timeFilters?: TimeRange;
forceRefresh?: boolean;
+ searchSessionId?: string;
}) {
return async (
dispatch: ThunkDispatch,
@@ -249,12 +252,14 @@ export function setQuery({
queryLastTriggeredAt: forceRefresh ? generateQueryTimestamp() : prevTriggeredAt,
},
filters: filters ? filters : getFilters(getState()),
+ searchSessionId,
};
const prevQueryContext = {
timeFilters: getTimeFilters(getState()),
query: getQuery(getState()),
filters: getFilters(getState()),
+ searchSessionId: getSearchSessionId(getState()),
};
if (_.isEqual(nextQueryContext, prevQueryContext)) {
diff --git a/x-pack/plugins/maps/public/classes/layers/blended_vector_layer/blended_vector_layer.ts b/x-pack/plugins/maps/public/classes/layers/blended_vector_layer/blended_vector_layer.ts
index 5b33738a91a28..88150da84f23f 100644
--- a/x-pack/plugins/maps/public/classes/layers/blended_vector_layer/blended_vector_layer.ts
+++ b/x-pack/plugins/maps/public/classes/layers/blended_vector_layer/blended_vector_layer.ts
@@ -316,7 +316,10 @@ export class BlendedVectorLayer extends VectorLayer implements IVectorLayer {
const abortController = new AbortController();
syncContext.registerCancelCallback(requestToken, () => abortController.abort());
const searchSource = await this._documentSource.makeSearchSource(searchFilters, 0);
- const resp = await searchSource.fetch({ abortSignal: abortController.signal });
+ const resp = await searchSource.fetch({
+ abortSignal: abortController.signal,
+ sessionId: syncContext.dataFilters.searchSessionId,
+ });
const maxResultWindow = await this._documentSource.getMaxResultWindow();
isSyncClustered = resp.hits.total > maxResultWindow;
const countData = { isSyncClustered } as CountData;
diff --git a/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.tsx b/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.tsx
index 0cb24be445c6e..2304bb277da49 100644
--- a/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.tsx
+++ b/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.tsx
@@ -616,6 +616,7 @@ export class VectorLayer extends AbstractLayer {
sourceQuery,
isTimeAware: this.getCurrentStyle().isTimeAware() && (await source.isTimeAware()),
timeFilters: dataFilters.timeFilters,
+ searchSessionId: dataFilters.searchSessionId,
} as VectorStyleRequestMeta;
const prevDataRequest = this.getDataRequest(dataRequestId);
const canSkipFetch = canSkipStyleMetaUpdate({ prevDataRequest, nextMeta });
@@ -635,6 +636,7 @@ export class VectorLayer extends AbstractLayer {
registerCancelCallback: registerCancelCallback.bind(null, requestToken),
sourceQuery: nextMeta.sourceQuery,
timeFilters: nextMeta.timeFilters,
+ searchSessionId: dataFilters.searchSessionId,
});
stopLoading(dataRequestId, requestToken, styleMeta, nextMeta);
} catch (error) {
diff --git a/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx b/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx
index 6ec51b8e118cb..24b7e0dec519c 100644
--- a/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx
+++ b/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx
@@ -195,6 +195,7 @@ export class ESGeoGridSource extends AbstractESAggSource implements ITiledSingle
async _compositeAggRequest({
searchSource,
+ searchSessionId,
indexPattern,
precision,
layerName,
@@ -204,6 +205,7 @@ export class ESGeoGridSource extends AbstractESAggSource implements ITiledSingle
bufferedExtent,
}: {
searchSource: ISearchSource;
+ searchSessionId?: string;
indexPattern: IndexPattern;
precision: number;
layerName: string;
@@ -280,6 +282,7 @@ export class ESGeoGridSource extends AbstractESAggSource implements ITiledSingle
values: { requestId },
}
),
+ searchSessionId,
});
features.push(...convertCompositeRespToGeoJson(esResponse, this._descriptor.requestType));
@@ -325,6 +328,7 @@ export class ESGeoGridSource extends AbstractESAggSource implements ITiledSingle
// see https://github.com/elastic/kibana/pull/57875#issuecomment-590515482 for explanation on using separate code paths
async _nonCompositeAggRequest({
searchSource,
+ searchSessionId,
indexPattern,
precision,
layerName,
@@ -332,6 +336,7 @@ export class ESGeoGridSource extends AbstractESAggSource implements ITiledSingle
bufferedExtent,
}: {
searchSource: ISearchSource;
+ searchSessionId?: string;
indexPattern: IndexPattern;
precision: number;
layerName: string;
@@ -348,6 +353,7 @@ export class ESGeoGridSource extends AbstractESAggSource implements ITiledSingle
requestDescription: i18n.translate('xpack.maps.source.esGrid.inspectorDescription', {
defaultMessage: 'Elasticsearch geo grid aggregation request',
}),
+ searchSessionId,
});
return convertRegularRespToGeoJson(esResponse, this._descriptor.requestType);
@@ -373,6 +379,7 @@ export class ESGeoGridSource extends AbstractESAggSource implements ITiledSingle
bucketsPerGrid === 1
? await this._nonCompositeAggRequest({
searchSource,
+ searchSessionId: searchFilters.searchSessionId,
indexPattern,
precision: searchFilters.geogridPrecision || 0,
layerName,
@@ -381,6 +388,7 @@ export class ESGeoGridSource extends AbstractESAggSource implements ITiledSingle
})
: await this._compositeAggRequest({
searchSource,
+ searchSessionId: searchFilters.searchSessionId,
indexPattern,
precision: searchFilters.geogridPrecision || 0,
layerName,
diff --git a/x-pack/plugins/maps/public/classes/sources/es_geo_line_source/es_geo_line_source.tsx b/x-pack/plugins/maps/public/classes/sources/es_geo_line_source/es_geo_line_source.tsx
index 9c851dcedb3fa..916a8a291e6b4 100644
--- a/x-pack/plugins/maps/public/classes/sources/es_geo_line_source/es_geo_line_source.tsx
+++ b/x-pack/plugins/maps/public/classes/sources/es_geo_line_source/es_geo_line_source.tsx
@@ -213,6 +213,7 @@ export class ESGeoLineSource extends AbstractESAggSource {
requestDescription: i18n.translate('xpack.maps.source.esGeoLine.entityRequestDescription', {
defaultMessage: 'Elasticsearch terms request to fetch entities within map buffer.',
}),
+ searchSessionId: searchFilters.searchSessionId,
});
const entityBuckets: Array<{ key: string; doc_count: number }> = _.get(
entityResp,
@@ -282,6 +283,7 @@ export class ESGeoLineSource extends AbstractESAggSource {
defaultMessage:
'Elasticsearch geo_line request to fetch tracks for entities. Tracks are not filtered by map buffer.',
}),
+ searchSessionId: searchFilters.searchSessionId,
});
const { featureCollection, numTrimmedTracks } = convertToGeoJson(
tracksResp,
diff --git a/x-pack/plugins/maps/public/classes/sources/es_pew_pew_source/es_pew_pew_source.js b/x-pack/plugins/maps/public/classes/sources/es_pew_pew_source/es_pew_pew_source.js
index 504212ea1ea84..98d3ba6267c6d 100644
--- a/x-pack/plugins/maps/public/classes/sources/es_pew_pew_source/es_pew_pew_source.js
+++ b/x-pack/plugins/maps/public/classes/sources/es_pew_pew_source/es_pew_pew_source.js
@@ -148,6 +148,7 @@ export class ESPewPewSource extends AbstractESAggSource {
requestDescription: i18n.translate('xpack.maps.source.pewPew.inspectorDescription', {
defaultMessage: 'Source-destination connections request',
}),
+ searchSessionId: searchFilters.searchSessionId,
});
const { featureCollection } = convertToLines(esResponse);
diff --git a/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx b/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx
index 5a923f0ce4292..b70a433f2c729 100644
--- a/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx
+++ b/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx
@@ -325,6 +325,7 @@ export class ESSearchSource extends AbstractESSource implements ITiledSingleLaye
searchSource,
registerCancelCallback,
requestDescription: 'Elasticsearch document top hits request',
+ searchSessionId: searchFilters.searchSessionId,
});
const allHits: any[] = [];
@@ -391,6 +392,7 @@ export class ESSearchSource extends AbstractESSource implements ITiledSingleLaye
searchSource,
registerCancelCallback,
requestDescription: 'Elasticsearch document request',
+ searchSessionId: searchFilters.searchSessionId,
});
return {
diff --git a/x-pack/plugins/maps/public/classes/sources/es_source/es_source.ts b/x-pack/plugins/maps/public/classes/sources/es_source/es_source.ts
index 967131e900fc6..64a5cd575a19d 100644
--- a/x-pack/plugins/maps/public/classes/sources/es_source/es_source.ts
+++ b/x-pack/plugins/maps/public/classes/sources/es_source/es_source.ts
@@ -57,6 +57,7 @@ export interface IESSource extends IVectorSource {
registerCancelCallback,
sourceQuery,
timeFilters,
+ searchSessionId,
}: {
layerName: string;
style: IVectorStyle;
@@ -64,6 +65,7 @@ export interface IESSource extends IVectorSource {
registerCancelCallback: (callback: () => void) => void;
sourceQuery?: MapQuery;
timeFilters: TimeRange;
+ searchSessionId?: string;
}): Promise