From b490e81b3615680a084180cb966ace6ee115a268 Mon Sep 17 00:00:00 2001 From: Thomas Neirynck Date: Tue, 24 Jul 2018 11:14:50 -0400 Subject: [PATCH 1/3] add EMS hot link --- .../region_map/public/region_map_vis.js | 3 ++- .../region_map/public/region_map_vis_params.html | 6 ++++++ .../region_map/public/region_map_vis_params.js | 15 ++++++++++++++- src/core_plugins/region_map/public/util.js | 3 ++- src/server/config/schema.js | 1 + src/ui/public/vis/map/service_settings.js | 5 +++++ 6 files changed, 30 insertions(+), 3 deletions(-) diff --git a/src/core_plugins/region_map/public/region_map_vis.js b/src/core_plugins/region_map/public/region_map_vis.js index d29fb6eaae893..ed97e2403c8c8 100644 --- a/src/core_plugins/region_map/public/region_map_vis.js +++ b/src/core_plugins/region_map/public/region_map_vis.js @@ -33,7 +33,7 @@ VisTypesRegistryProvider.register(function RegionMapProvider(Private, regionmaps const VisFactory = Private(VisFactoryProvider); const RegionMapsVisualization = Private(RegionMapsVisualizationProvider); - const vectorLayers = regionmapsConfig.layers.map(mapToLayerWithId.bind(null, 'self_hosted')); + const vectorLayers = regionmapsConfig.layers.map(mapToLayerWithId.bind(null, 'self_hosted', false)); const selectedLayer = vectorLayers[0]; const selectedJoinField = selectedLayer ? vectorLayers[0].fields[0] : null; @@ -50,6 +50,7 @@ VisTypesRegistryProvider.register(function RegionMapProvider(Private, regionmaps addTooltip: true, colorSchema: 'Yellow to Red', selectedLayer: selectedLayer, + emsHotLink: '', selectedJoinField: selectedJoinField, isDisplayWarning: true, wms: config.get('visualization:tileMap:WMSdefaults'), diff --git a/src/core_plugins/region_map/public/region_map_vis_params.html b/src/core_plugins/region_map/public/region_map_vis_params.html index 678412959550a..dec499e78cdb1 100644 --- a/src/core_plugins/region_map/public/region_map_vis_params.html +++ b/src/core_plugins/region_map/public/region_map_vis_params.html @@ -21,6 +21,12 @@ +
+ +
+
- + Preview {{editorState.params.selectedLayer.name}} on the Elastic Maps Service +
From 5d76d1f53be1751a3c6804a1efe182706b22e120 Mon Sep 17 00:00:00 2001 From: Thomas Neirynck Date: Thu, 26 Jul 2018 12:14:46 -0400 Subject: [PATCH 3/3] design tweaks --- .../kibana/public/visualize/editor/styles/_editor.less | 7 +++++-- .../region_map/public/region_map_vis_params.html | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/core_plugins/kibana/public/visualize/editor/styles/_editor.less b/src/core_plugins/kibana/public/visualize/editor/styles/_editor.less index 84e7dbbce7b38..6991ae34d6cb1 100644 --- a/src/core_plugins/kibana/public/visualize/editor/styles/_editor.less +++ b/src/core_plugins/kibana/public/visualize/editor/styles/_editor.less @@ -444,6 +444,10 @@ vis-editor-vis-options > * { .flex-parent(); } +.vis-editor-config .ems-hotlink { + font-size: 12px; +} + /** * 1. TODO: Override bootstrap styles. Remove !important once we're rid of bootstrap. */ @@ -486,5 +490,4 @@ vis-editor-vis-options > * { float: right; } -.ems-hotlink { -} + diff --git a/src/core_plugins/region_map/public/region_map_vis_params.html b/src/core_plugins/region_map/public/region_map_vis_params.html index 5d5f18b5da759..c846a0cfc6a29 100644 --- a/src/core_plugins/region_map/public/region_map_vis_params.html +++ b/src/core_plugins/region_map/public/region_map_vis_params.html @@ -27,7 +27,9 @@ target="_blank" rel="noopener noreferrer" ng-href="{{editorState.params.emsHotLink}}" - target="_blank">Preview {{editorState.params.selectedLayer.name}} on the Elastic Maps Service + target="_blank" + title="Preview {{editorState.params.selectedLayer.name}} on the Elastic Maps Service" + >Preview on EMS