From 16bc4f2ed15166cfc9e0d8f62d067d249042f1ca Mon Sep 17 00:00:00 2001 From: Thomas Neirynck Date: Fri, 22 Nov 2019 16:24:17 -0500 Subject: [PATCH] [Maps] [Telemetry] Count indices with geo-fields (#51221) (#51381) --- .../server/maps_telemetry/maps_telemetry.js | 42 +++--- .../maps_telemetry/maps_telemetry.test.js | 12 +- .../sample_index_pattern_saved_objects.json | 45 ++++++ .../sample_map_saved_objects.json | 128 +++++++++++++++++ .../test_resources/sample_saved_objects.json | 136 ------------------ 5 files changed, 205 insertions(+), 158 deletions(-) create mode 100644 x-pack/legacy/plugins/maps/server/maps_telemetry/test_resources/sample_index_pattern_saved_objects.json create mode 100644 x-pack/legacy/plugins/maps/server/maps_telemetry/test_resources/sample_map_saved_objects.json delete mode 100644 x-pack/legacy/plugins/maps/server/maps_telemetry/test_resources/sample_saved_objects.json diff --git a/x-pack/legacy/plugins/maps/server/maps_telemetry/maps_telemetry.js b/x-pack/legacy/plugins/maps/server/maps_telemetry/maps_telemetry.js index 0d318c41a7fd1..1c875322f2343 100644 --- a/x-pack/legacy/plugins/maps/server/maps_telemetry/maps_telemetry.js +++ b/x-pack/legacy/plugins/maps/server/maps_telemetry/maps_telemetry.js @@ -5,7 +5,7 @@ */ import _ from 'lodash'; -import { EMS_FILE, MAP_SAVED_OBJECT_TYPE } from '../../common/constants'; +import { EMS_FILE, ES_GEO_FIELD_TYPE, MAP_SAVED_OBJECT_TYPE } from '../../common/constants'; function getSavedObjectsClient(server, callCluster) { const { SavedObjectsClient, getSavedObjectsRepository } = server.savedObjects; @@ -32,8 +32,16 @@ function getUniqueLayerCounts(layerCountsList, mapsCount) { }, {}); } -export function buildMapsTelemetry(savedObjects, settings) { - const layerLists = savedObjects +function getIndexPatternsWithGeoFieldCount(indexPatterns) { + const fieldLists = indexPatterns.map(indexPattern => JSON.parse(indexPattern.attributes.fields)); + const fieldListsWithGeoFields = fieldLists.filter(fields => { + return fields.some(field => (field.type === ES_GEO_FIELD_TYPE.GEO_POINT || field.type === ES_GEO_FIELD_TYPE.GEO_SHAPE)); + }); + return fieldListsWithGeoFields.length; +} + +export function buildMapsTelemetry({ mapSavedObjects, indexPatternSavedObjects, settings }) { + const layerLists = mapSavedObjects .map(savedMapObject => JSON.parse(savedMapObject.attributes.layerListJSON)); const mapsCount = layerLists.length; @@ -57,8 +65,11 @@ export function buildMapsTelemetry(savedObjects, settings) { const dataSourcesCountSum = _.sum(dataSourcesCount); const layersCountSum = _.sum(layersCount); + + const indexPatternsWithGeoFieldCount = getIndexPatternsWithGeoFieldCount(indexPatternSavedObjects); return { settings, + indexPatternsWithGeoFieldCount, // Total count of maps mapsTotalCount: mapsCount, // Time of capture @@ -88,24 +99,23 @@ export function buildMapsTelemetry(savedObjects, settings) { }; } -async function getSavedObjects(savedObjectsClient) { - const gisMapsSavedObject = await savedObjectsClient.find({ - type: MAP_SAVED_OBJECT_TYPE - }); - return _.get(gisMapsSavedObject, 'saved_objects'); +async function getMapSavedObjects(savedObjectsClient) { + const mapsSavedObjects = await savedObjectsClient.find({ type: MAP_SAVED_OBJECT_TYPE }); + return _.get(mapsSavedObjects, 'saved_objects', []); +} + +async function getIndexPatternSavedObjects(savedObjectsClient) { + const indexPatternSavedObjects = await savedObjectsClient.find({ type: 'index-pattern' }); + return _.get(indexPatternSavedObjects, 'saved_objects', []); } export async function getMapsTelemetry(server, callCluster) { const savedObjectsClient = getSavedObjectsClient(server, callCluster); - const savedObjects = await getSavedObjects(savedObjectsClient); + const mapSavedObjects = await getMapSavedObjects(savedObjectsClient); + const indexPatternSavedObjects = await getIndexPatternSavedObjects(savedObjectsClient); const settings = { showMapVisualizationTypes: server.config().get('xpack.maps.showMapVisualizationTypes') }; - const mapsTelemetry = buildMapsTelemetry(savedObjects, settings); - - return await savedObjectsClient.create('maps-telemetry', - mapsTelemetry, { - id: 'maps-telemetry', - overwrite: true, - }); + const mapsTelemetry = buildMapsTelemetry({ mapSavedObjects, indexPatternSavedObjects, settings }); + return await savedObjectsClient.create('maps-telemetry', mapsTelemetry, { id: 'maps-telemetry', overwrite: true }); } diff --git a/x-pack/legacy/plugins/maps/server/maps_telemetry/maps_telemetry.test.js b/x-pack/legacy/plugins/maps/server/maps_telemetry/maps_telemetry.test.js index 4f2b983a54028..c5b976e54865e 100644 --- a/x-pack/legacy/plugins/maps/server/maps_telemetry/maps_telemetry.test.js +++ b/x-pack/legacy/plugins/maps/server/maps_telemetry/maps_telemetry.test.js @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import * as savedObjectsPayload from - './test_resources/sample_saved_objects.json'; +import mapSavedObjects from './test_resources/sample_map_saved_objects.json'; +import indexPatternSavedObjects from './test_resources/sample_index_pattern_saved_objects'; import { buildMapsTelemetry } from './maps_telemetry'; describe('buildMapsTelemetry', () => { @@ -15,10 +15,10 @@ describe('buildMapsTelemetry', () => { test('returns zeroed telemetry data when there are no saved objects', async () => { - const gisMaps = []; - const result = buildMapsTelemetry(gisMaps, settings); + const result = buildMapsTelemetry({ mapSavedObjects: [], indexPatternSavedObjects: [], settings }); expect(result).toMatchObject({ + indexPatternsWithGeoFieldCount: 0, attributesPerMap: { dataSourcesCount: { avg: 0, @@ -42,10 +42,10 @@ describe('buildMapsTelemetry', () => { test('returns expected telemetry data from saved objects', async () => { - const gisMaps = savedObjectsPayload.saved_objects; - const result = buildMapsTelemetry(gisMaps, settings); + const result = buildMapsTelemetry({ mapSavedObjects, indexPatternSavedObjects, settings }); expect(result).toMatchObject({ + indexPatternsWithGeoFieldCount: 2, attributesPerMap: { dataSourcesCount: { avg: 2.6666666666666665, diff --git a/x-pack/legacy/plugins/maps/server/maps_telemetry/test_resources/sample_index_pattern_saved_objects.json b/x-pack/legacy/plugins/maps/server/maps_telemetry/test_resources/sample_index_pattern_saved_objects.json new file mode 100644 index 0000000000000..bb30a60f6d69f --- /dev/null +++ b/x-pack/legacy/plugins/maps/server/maps_telemetry/test_resources/sample_index_pattern_saved_objects.json @@ -0,0 +1,45 @@ +[ + { + "attributes": { + "fields": "[{\"name\":\"geometry\",\"type\":\"geo_shape\",\"esTypes\":[\"geo_shape\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false}]", + "timeFieldName": "ORIG_DATE", + "title": "indexpattern-with-geoshape" + }, + "id": "4a7f6010-0aed-11ea-9dd2-95afd7ad44d4", + "migrationVersion": { + "index-pattern": "7.6.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2019-11-19T16:54:46.405Z", + "version": "Wzg0LDFd" + }, + { + "attributes": { + "fields": "[{\"name\":\"geometry\",\"type\":\"geo_point\",\"esTypes\":[\"geo_point\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "title": "indexpattern-with-geopoint" + }, + "id": "55d572f0-0b07-11ea-9dd2-95afd7ad44d4", + "migrationVersion": { + "index-pattern": "7.6.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2019-11-19T20:05:37.607Z", + "version": "WzExMSwxXQ==" + }, + { + "attributes": { + "fields": "[{\"name\":\"assessment_date\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"date_exterior_condition\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"recording_date\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"sale_date\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "title": "indexpattern-without-geo" + }, + "id": "55d572f0-0b07-11ea-9dd2-95afd7ad44d4", + "migrationVersion": { + "index-pattern": "7.6.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2019-11-19T20:05:37.607Z", + "version": "WzExMSwxXQ==" + } +] diff --git a/x-pack/legacy/plugins/maps/server/maps_telemetry/test_resources/sample_map_saved_objects.json b/x-pack/legacy/plugins/maps/server/maps_telemetry/test_resources/sample_map_saved_objects.json new file mode 100644 index 0000000000000..5bfe8ae38cac9 --- /dev/null +++ b/x-pack/legacy/plugins/maps/server/maps_telemetry/test_resources/sample_map_saved_objects.json @@ -0,0 +1,128 @@ +[ + { + "type": "gis-map", + "id": "37b08d60-25b0-11e9-9858-0f3a1e60d007", + "attributes": { + "title": "Italy Map", + "description": "", + "mapStateJSON": "{\"zoom\":4.82,\"center\":{\"lon\":11.41545,\"lat\":42.0865},\"timeFilters\":{\"from\":\"now-15w\",\"to\":\"now\"},\"refreshConfig\":{\"isPaused\":false,\"interval\":0},\"query\":{\"language\":\"lucene\",\"query\":\"\"}}", + "layerListJSON": "[{\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"id\":\"road_map\"},\"id\":\"csq5v\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.65,\"visible\":true,\"style\":{\"type\":\"TILE\",\"properties\":{}},\"type\":\"TILE\"},{\"sourceDescriptor\":{\"type\":\"EMS_FILE\",\"id\":\"italy_provinces\"},\"id\":\"0oye8\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.75,\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#0c1f70\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":10}}}},\"type\":\"VECTOR\"},{\"sourceDescriptor\":{\"type\":\"ES_GEO_GRID\",\"id\":\"053fe296-f5ae-4cb0-9e73-a5752cb9ba74\",\"indexPatternId\":\"d3d7af60-4c81-11e8-b3d7-01146121b73d\",\"geoField\":\"DestLocation\",\"requestType\":\"point\",\"resolution\":\"COARSE\"},\"id\":\"1gx22\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.75,\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"label\":\"Count\",\"name\":\"doc_count\",\"origin\":\"source\"},\"color\":\"Greens\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"label\":\"Count\",\"name\":\"doc_count\",\"origin\":\"source\"},\"minSize\":4,\"maxSize\":32}}}},\"type\":\"VECTOR\"}]", + "uiStateJSON": "{}", + "bounds": { + "type": "polygon", + "coordinates": [ + [ + [ + -5.29778, + 51.54155 + ], + [ + -5.29778, + 30.98066 + ], + [ + 28.12868, + 30.98066 + ], + [ + 28.12868, + 51.54155 + ], + [ + -5.29778, + 51.54155 + ] + ] + ] + } + }, + "references": [ + ], + "updated_at": "2019-01-31T23:30:39.030Z", + "version": 1 + }, + { + "type": "gis-map", + "id": "5c061dc0-25af-11e9-9858-0f3a1e60d007", + "attributes": { + "title": "France Map", + "description": "", + "mapStateJSON": "{\"zoom\":3.43,\"center\":{\"lon\":-16.30411,\"lat\":42.88411},\"timeFilters\":{\"from\":\"now-15w\",\"to\":\"now\"},\"refreshConfig\":{\"isPaused\":false,\"interval\":0},\"query\":{\"query\":\"\",\"language\":\"lucene\"}}", + "layerListJSON": "[{\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"id\":\"road_map\"},\"id\":\"csq5v\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.65,\"visible\":true,\"style\":{\"type\":\"TILE\",\"properties\":{}},\"type\":\"TILE\"},{\"sourceDescriptor\":{\"type\":\"EMS_FILE\",\"id\":\"france_departments\"},\"id\":\"65xbw\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.25,\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#19c1e6\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":10}}}},\"type\":\"VECTOR\"},{\"sourceDescriptor\":{\"id\":\"240125db-e612-4001-b853-50107e55d984\",\"type\":\"ES_SEARCH\",\"indexPatternId\":\"ff959d40-b880-11e8-a6d9-e546fe2bba5f\",\"geoField\":\"geoip.location\",\"limit\":2048,\"filterByMapBounds\":true,\"tooltipProperties\":[]},\"id\":\"mdae9\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.75,\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#1ce619\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":10}}}},\"type\":\"VECTOR\"}]", + "uiStateJSON": "{}", + "bounds": { + "type": "polygon", + "coordinates": [ + [ + [ + -59.97005, + 63.9123 + ], + [ + -59.97005, + 11.25616 + ], + [ + 27.36184, + 11.25616 + ], + [ + 27.36184, + 63.9123 + ], + [ + -59.97005, + 63.9123 + ] + ] + ] + } + }, + "references": [ + ], + "updated_at": "2019-01-31T23:24:30.492Z", + "version": 1 + }, + { + "type": "gis-map", + "id": "b853d5f0-25ae-11e9-9858-0f3a1e60d007", + "attributes": { + "title": "Canada Map", + "description": "", + "mapStateJSON": "{\"zoom\":2.12,\"center\":{\"lon\":-88.67592,\"lat\":34.23257},\"timeFilters\":{\"from\":\"now-15m\",\"to\":\"now\",\"mode\":\"quick\"},\"refreshConfig\":{\"isPaused\":false,\"interval\":0},\"query\":{\"query\":\"\",\"language\":\"lucene\"}}", + "layerListJSON": "[{\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"id\":\"road_map\"},\"id\":\"csq5v\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.65,\"visible\":true,\"style\":{\"type\":\"TILE\",\"properties\":{}},\"type\":\"TILE\"},{\"sourceDescriptor\":{\"type\":\"EMS_FILE\",\"id\":\"canada_provinces\"},\"id\":\"kt086\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.75,\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#60895e\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":10}}}},\"type\":\"VECTOR\"}]", + "uiStateJSON": "{}", + "bounds": { + "type": "polygon", + "coordinates": [ + [ + [ + 163.37506, + 77.35215 + ], + [ + 163.37506, + -46.80667 + ], + [ + 19.2731, + -46.80667 + ], + [ + 19.2731, + 77.35215 + ], + [ + 163.37506, + 77.35215 + ] + ] + ] + } + }, + "references": [ + ], + "updated_at": "2019-01-31T23:19:55.855Z", + "version": 1 + } +] diff --git a/x-pack/legacy/plugins/maps/server/maps_telemetry/test_resources/sample_saved_objects.json b/x-pack/legacy/plugins/maps/server/maps_telemetry/test_resources/sample_saved_objects.json deleted file mode 100644 index f5693027f585d..0000000000000 --- a/x-pack/legacy/plugins/maps/server/maps_telemetry/test_resources/sample_saved_objects.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "page":1, - "per_page":20, - "total":3, - "saved_objects":[ - { - "type":"gis-map", - "id":"37b08d60-25b0-11e9-9858-0f3a1e60d007", - "attributes":{ - "title":"Italy Map", - "description":"", - "mapStateJSON":"{\"zoom\":4.82,\"center\":{\"lon\":11.41545,\"lat\":42.0865},\"timeFilters\":{\"from\":\"now-15w\",\"to\":\"now\"},\"refreshConfig\":{\"isPaused\":false,\"interval\":0},\"query\":{\"language\":\"lucene\",\"query\":\"\"}}", - "layerListJSON":"[{\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"id\":\"road_map\"},\"id\":\"csq5v\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.65,\"visible\":true,\"style\":{\"type\":\"TILE\",\"properties\":{}},\"type\":\"TILE\"},{\"sourceDescriptor\":{\"type\":\"EMS_FILE\",\"id\":\"italy_provinces\"},\"id\":\"0oye8\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.75,\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#0c1f70\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":10}}}},\"type\":\"VECTOR\"},{\"sourceDescriptor\":{\"type\":\"ES_GEO_GRID\",\"id\":\"053fe296-f5ae-4cb0-9e73-a5752cb9ba74\",\"indexPatternId\":\"d3d7af60-4c81-11e8-b3d7-01146121b73d\",\"geoField\":\"DestLocation\",\"requestType\":\"point\",\"resolution\":\"COARSE\"},\"id\":\"1gx22\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.75,\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"label\":\"Count\",\"name\":\"doc_count\",\"origin\":\"source\"},\"color\":\"Greens\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"label\":\"Count\",\"name\":\"doc_count\",\"origin\":\"source\"},\"minSize\":4,\"maxSize\":32}}}},\"type\":\"VECTOR\"}]", - "uiStateJSON":"{}", - "bounds":{ - "type":"polygon", - "coordinates":[ - [ - [ - -5.29778, - 51.54155 - ], - [ - -5.29778, - 30.98066 - ], - [ - 28.12868, - 30.98066 - ], - [ - 28.12868, - 51.54155 - ], - [ - -5.29778, - 51.54155 - ] - ] - ] - } - }, - "references":[ - - ], - "updated_at":"2019-01-31T23:30:39.030Z", - "version":1 - }, - { - "type":"gis-map", - "id":"5c061dc0-25af-11e9-9858-0f3a1e60d007", - "attributes":{ - "title":"France Map", - "description":"", - "mapStateJSON":"{\"zoom\":3.43,\"center\":{\"lon\":-16.30411,\"lat\":42.88411},\"timeFilters\":{\"from\":\"now-15w\",\"to\":\"now\"},\"refreshConfig\":{\"isPaused\":false,\"interval\":0},\"query\":{\"query\":\"\",\"language\":\"lucene\"}}", - "layerListJSON":"[{\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"id\":\"road_map\"},\"id\":\"csq5v\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.65,\"visible\":true,\"style\":{\"type\":\"TILE\",\"properties\":{}},\"type\":\"TILE\"},{\"sourceDescriptor\":{\"type\":\"EMS_FILE\",\"id\":\"france_departments\"},\"id\":\"65xbw\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.25,\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#19c1e6\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":10}}}},\"type\":\"VECTOR\"},{\"sourceDescriptor\":{\"id\":\"240125db-e612-4001-b853-50107e55d984\",\"type\":\"ES_SEARCH\",\"indexPatternId\":\"ff959d40-b880-11e8-a6d9-e546fe2bba5f\",\"geoField\":\"geoip.location\",\"limit\":2048,\"filterByMapBounds\":true,\"tooltipProperties\":[]},\"id\":\"mdae9\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.75,\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#1ce619\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":10}}}},\"type\":\"VECTOR\"}]", - "uiStateJSON":"{}", - "bounds":{ - "type":"polygon", - "coordinates":[ - [ - [ - -59.97005, - 63.9123 - ], - [ - -59.97005, - 11.25616 - ], - [ - 27.36184, - 11.25616 - ], - [ - 27.36184, - 63.9123 - ], - [ - -59.97005, - 63.9123 - ] - ] - ] - } - }, - "references":[ - - ], - "updated_at":"2019-01-31T23:24:30.492Z", - "version":1 - }, - { - "type":"gis-map", - "id":"b853d5f0-25ae-11e9-9858-0f3a1e60d007", - "attributes":{ - "title":"Canada Map", - "description":"", - "mapStateJSON":"{\"zoom\":2.12,\"center\":{\"lon\":-88.67592,\"lat\":34.23257},\"timeFilters\":{\"from\":\"now-15m\",\"to\":\"now\",\"mode\":\"quick\"},\"refreshConfig\":{\"isPaused\":false,\"interval\":0},\"query\":{\"query\":\"\",\"language\":\"lucene\"}}", - "layerListJSON":"[{\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"id\":\"road_map\"},\"id\":\"csq5v\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.65,\"visible\":true,\"style\":{\"type\":\"TILE\",\"properties\":{}},\"type\":\"TILE\"},{\"sourceDescriptor\":{\"type\":\"EMS_FILE\",\"id\":\"canada_provinces\"},\"id\":\"kt086\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.75,\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#60895e\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":10}}}},\"type\":\"VECTOR\"}]", - "uiStateJSON":"{}", - "bounds":{ - "type":"polygon", - "coordinates":[ - [ - [ - 163.37506, - 77.35215 - ], - [ - 163.37506, - -46.80667 - ], - [ - 19.2731, - -46.80667 - ], - [ - 19.2731, - 77.35215 - ], - [ - 163.37506, - 77.35215 - ] - ] - ] - } - }, - "references":[ - - ], - "updated_at":"2019-01-31T23:19:55.855Z", - "version":1 - } - ] -}