From cecd5daf044adbb12dbfd82d2b2e94283d7b5f9b Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Thu, 7 Feb 2019 05:42:40 -0700 Subject: [PATCH] [Maps] do not show joins UI for ES geo grid source (#30309) --- x-pack/plugins/maps/public/shared/layers/layer.js | 2 +- .../layers/sources/es_geo_grid_source/es_geo_grid_source.js | 4 ++++ x-pack/plugins/maps/public/shared/layers/sources/source.js | 4 ++++ .../maps/public/shared/layers/sources/vector_source.js | 3 +++ x-pack/plugins/maps/public/shared/layers/vector_layer.js | 4 ---- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/maps/public/shared/layers/layer.js b/x-pack/plugins/maps/public/shared/layers/layer.js index 8be7a06e86af..324bc8f7d97f 100644 --- a/x-pack/plugins/maps/public/shared/layers/layer.js +++ b/x-pack/plugins/maps/public/shared/layers/layer.js @@ -51,7 +51,7 @@ export class AbstractLayer { } isJoinable() { - return false; + return this._source.isJoinable(); } async getDisplayName() { diff --git a/x-pack/plugins/maps/public/shared/layers/sources/es_geo_grid_source/es_geo_grid_source.js b/x-pack/plugins/maps/public/shared/layers/sources/es_geo_grid_source/es_geo_grid_source.js index 766ba3e26d91..ff2891fcc327 100644 --- a/x-pack/plugins/maps/public/shared/layers/sources/es_geo_grid_source/es_geo_grid_source.js +++ b/x-pack/plugins/maps/public/shared/layers/sources/es_geo_grid_source/es_geo_grid_source.js @@ -113,6 +113,10 @@ export class ESGeoGridSource extends AbstractESSource { return true; } + isJoinable() { + return false; + } + getGridResolution() { return this._descriptor.resolution; } diff --git a/x-pack/plugins/maps/public/shared/layers/sources/source.js b/x-pack/plugins/maps/public/shared/layers/sources/source.js index 576d867ae7bc..d163a8dcca8c 100644 --- a/x-pack/plugins/maps/public/shared/layers/sources/source.js +++ b/x-pack/plugins/maps/public/shared/layers/sources/source.js @@ -89,6 +89,10 @@ export class AbstractSource { getGeoGridPrecision() { return 0; } + + isJoinable() { + return false; + } } diff --git a/x-pack/plugins/maps/public/shared/layers/sources/vector_source.js b/x-pack/plugins/maps/public/shared/layers/sources/vector_source.js index c1a8f94411a1..f8213280f23b 100644 --- a/x-pack/plugins/maps/public/shared/layers/sources/vector_source.js +++ b/x-pack/plugins/maps/public/shared/layers/sources/vector_source.js @@ -102,4 +102,7 @@ export class AbstractVectorSource extends AbstractSource { return false; } + isJoinable() { + return true; + } } diff --git a/x-pack/plugins/maps/public/shared/layers/vector_layer.js b/x-pack/plugins/maps/public/shared/layers/vector_layer.js index f8f019956f6a..27b70b3fd8b2 100644 --- a/x-pack/plugins/maps/public/shared/layers/vector_layer.js +++ b/x-pack/plugins/maps/public/shared/layers/vector_layer.js @@ -67,10 +67,6 @@ export class VectorLayer extends AbstractLayer { }); } - isJoinable() { - return true; - } - getJoins() { return this._joins.slice(); }