Skip to content

Commit

Permalink
more review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Feb 26, 2020
1 parent ac8c04b commit 122491a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions x-pack/legacy/plugins/maps/public/actions/map_actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
getTransientLayerId,
getOpenTooltips,
getQuery,
getDataRequest,
getDataRequestDescriptor,
} from '../selectors/map_selectors';
import { FLYOUT_STATE } from '../reducers/ui';
import {
Expand Down Expand Up @@ -89,7 +89,7 @@ function getLayerLoadingCallbacks(dispatch, getState, layerId) {
dispatch(updateSourceDataRequest(layerId, newData));
},
isRequestStillActive: (dataId, requestToken) => {
const dataRequest = getDataRequest(getState(), layerId, dataId);
const dataRequest = getDataRequestDescriptor(getState(), layerId, dataId);
if (!dataRequest) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export class ESGeoGridSource extends AbstractESAggSource {
);
}

async compositeAggRequest({
async _compositeAggRequest({
searchSource,
indexPattern,
precision,
Expand Down Expand Up @@ -254,7 +254,7 @@ export class ESGeoGridSource extends AbstractESAggSource {

// Do not use composite aggregation when there are no terms sub-aggregations
// see https://github.com/elastic/kibana/pull/57875#issuecomment-590515482 for explanation on using separate code paths
async nonCompositeAggRequest({
async _nonCompositeAggRequest({
searchSource,
indexPattern,
precision,
Expand Down Expand Up @@ -305,14 +305,14 @@ export class ESGeoGridSource extends AbstractESAggSource {

const features =
bucketsPerGrid === 1
? await this.nonCompositeAggRequest({
? await this._nonCompositeAggRequest({
searchSource,
indexPattern,
precision: searchFilters.geogridPrecision,
layerName,
registerCancelCallback,
})
: await this.compositeAggRequest({
: await this._compositeAggRequest({
searchSource,
indexPattern,
precision: searchFilters.geogridPrecision,
Expand Down
4 changes: 2 additions & 2 deletions x-pack/legacy/plugins/maps/public/selectors/map_selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ export const getRefreshConfig = ({ map }) => {

export const getRefreshTimerLastTriggeredAt = ({ map }) => map.mapState.refreshTimerLastTriggeredAt;

export function getLayerDescriptor(state = {}, layerId) {
function getLayerDescriptor(state = {}, layerId) {
const layerListRaw = getLayerListRaw(state);
return layerListRaw.find(layer => layer.id === layerId);
}

export function getDataRequest(state = {}, layerId, dataId) {
export function getDataRequestDescriptor(state = {}, layerId, dataId) {
const layerDescriptor = getLayerDescriptor(state, layerId);
if (!layerDescriptor || !layerDescriptor.__dataRequests) {
return;
Expand Down

0 comments on commit 122491a

Please sign in to comment.