Commit graph

1067 commits

Author SHA1 Message Date
Nathan Reese
29a3f55985
[Maps] clean up icon category UI (#61116)
* [Maps] clean up icon category UI

* fix jest tests

* add unit test for getFirstUnusedSymbol

* remove duplicate icon stop values

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-24 21:24:37 -06:00
Nathan Reese
dc31736dd2
[Maps] Default ES document layer scaling type to clusters and show scaling UI in the create wizard (#60668)
* [Maps] show scaling panel in ES documents create wizard

* minor fix

* remove unused async state

* update create editor to use ScalingForm

* default geo field

* ts lint errors

* remove old dynamic filter behavior

* update jest tests

* eslint

* remove indexCount route

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 16:40:43 -06:00
Nathan Reese
103f217964
[Maps] convert Vector style descriptor to typescript (#60526)
* vector style descriptor TS

* revert color_utils TS conversion

* clean up TS errors

* updated blended layer to use vector style descriptor type

* fix eslint error

* use FIELD_ORIGIN.SOURCE instead of SOURCE_DATA_ID_ORIGIN

* fix other incorrect uses of SOURCE_DATA_ID_ORIGIN

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-20 11:29:31 -06:00
Nathan Reese
7e085eabf5
[Maps] Blended layer that switches between documents and clusters (#57879)
* [Maps] Blended layer that switches between documents and clusters

* change layer type when scalingType changes

* getSource

* use cluster source when count exceeds value

* ensure doc source stays in editor

* start creating cluster style

* pass all parts of style descriptor

* get toggling between sources working

* derive cluster style from document style

* remove references to METRIC_TYPE

* fix import

* start typescripting blended_vector_layer

* more typescript work

* last of the TS errors

* add migration to convert useTopTerm to scalingType

* clean up

* remove MapSavedObject work since its in a seperate PR now

* fix EsSearchSource update editor jest test

* fix map_selector jest test

* move mutable state out of BlendedVectorLayer

* one more change for removing mutable BlendedVectorLayer state

* integrate newly merged MapSavedObjectAttributes type

* review feedback

* use data request for fetching feature count

* add functional test

* fix functional test

* review feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-18 12:06:54 -06:00
Nick Peihl
928454afa4
Update the ems-client dependency to 7.7.0 (#59936)
* Update the ems-client dependency

This PR adds the `appName` and `appVersion` parameters used by ems-client. The `appVersion` parameter replaces the now deprecated `kbnVersion` parameter in ems-client.

* Review feedback

* Fix borked merge

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-17 11:51:17 -07:00
Nathan Reese
ef3261132a
[Maps] move MapSavedObject type out of telemetry (#60127)
* [Maps] move MapSavedObject type out of telemetry

* move SavedObject from server to core/types

* review feedback

* results from check_published_api_changes
2020-03-16 15:40:52 -06:00
Nathan Reese
6cbfa274cf
[Maps] add draw control to create distance filter (#58163)
* [Maps] add distance filter to draw controls

* create distance filter

* update jest snapshot

* remove duplicated code

* reset circle draw when user hits escape

* i18n cleanup

* ts MultiIndexGeoFieldSelect

* ts DistanceFilterForm

* remove unused prop

* make interface a type

* move geo_field_with_index to components folder

* convert draw_circle to TS

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-16 13:33:40 -06:00
Aaron Caldwell
5cab334248
[Maps] Move redux reducers and store logic to NP (#58294)
* Plugin file and services in place. Some redux logic ported

* Port and update index pattern util

* Move reducers over to NP. Update refs in legacy

* Port inspector to NP

* Move some kibana services init to NP. Some cleaning

* Clean up work not related to reducers/store

* Ignore temp imports from NP. Clean up of changes unrelated to this PR

* More cleanup. Check injected vars avab. before calling to handle dashboard case

* Bind embeddables services the same way Maps app services bound. Create function for eventual init in NP

* Call binding from constructor. Fix npStart plugins arg

* Adapt changes from master

* Register inspector views for embeddable. Add NP folder to i18n

* Clean up. Add comments. Move inspector map view registration to NP

* Remove unused inspector files in legacy

* Move full screen action to legacy

* Add in missing tooltip updates

* Review feedback. Update constants and i18n_getters to latest in NP

* Review feedback. Add redundancy comments to common files redundant in legacy and NP

* Remove unneeded copy of parse xml string test in legacy

* Review feedback. Remove redundant portions. Export from NP where possible. General clean up

* Remove remaining refernce and case for 'TOUCH_LAYER'. It's never used
2020-03-12 10:27:27 -06:00
Court Ewing
7ac8e4d9cc Move x-pack plugins/server/common to x-pack/legacy 2019-06-20 13:34:48 -04:00
Nathan Reese
7b5b6e4e02
[Maps] Move set view to toolbar control, show zoom level in view control (#38925)
* break out ToolsControl from ToolbarOverlay component

* move set view control to toolbar overlay component

* fix i18n

* use cchaos approved top calculation in scss

* fix functional tests by updating lat,lon, and zoom state when props change

* do not set state from props in constructor, only set state from props in getDerivedStateFromProps

* provide default value for isSetViewOpen in store

* just pass needed params to connect
2019-06-19 10:53:25 -06:00
Matthew Kime
80eb1e1583
d13n docTitle (#39162)
* refactor doc title so it can be used outside of angular service
2019-06-19 09:31:42 -05:00
Aaron Caldwell
b1911e9269
[File upload] New plugin: file upload (#36404)
* Add file upload x-pack plugin

* Clean up

* Remove unneeded cluster config

* Remove unneeded test

* First pass basic telemetry (not connected).

* Basic telemetry connected

* Review feedback

* Revise telemetry to use savedObjectRepository. Capture metrics on app and file types

* Lots of cleanup, consolidation of logic

* Clean up, reorg

* Update telem tests and telem functions

* Add back import data model

* Clean up and update telemetry tests

* Fix telemetry test issues and update corresponding code

* Up chunk limit to 30 MB

* Add file upload telemetry to saved objects management builder

* Missing space

* Add descriptive comments to dynamic keys in telemetry fields

* [Maps] [File upload] Geojson upload (#36410)

* Client side basics

* File added and default named correctly

* Connect transient layer removal to file import component

* Simplify transient layer removal

* Move file import ui over to new file upload plugin and make more generic

* Add post-processing option to file upload. Make component json-specific

* Add flag for source indexing

* Revise import layer workflow to be separate from add layer workflow

* Differentiate between normal sources and import sources. Add back layer add/next button

* Update indexing boolean in component after file upload & parse

* First pass rough indexing from maps working on specific use cases

* Update parsing logic to handle geojson formats

* Index pattern added following index creation

* Pass onsuccess callback to file_upload to add layer to maps app

* Handle mulltipolygon type in es geo utils

* Add functionality to make es layer permanent and switch to edit panel

* Add to index if exists or create new

* Make plugin API more intuitive. Set up to handle remove action

* Pass transient removal call through to file import

* Clean up layer viewing logic for temp and perm layers

* Remove change source from import screen

* Add option to provide mappings array and pass geo_point and geo_shape to array

* Add support for multiple mappings select and index naming

* Match style of import file button to add layer for now

* Remove duplicate case handling resulting from merge

* Move geo processing logic over to file upload plugin for reuse

* Remove old geo_shape formatting from geo_point code

* Set default index data type. Remove unneeded stringify request logic

* Check for custom processor object which contains function

* Move file picker to separate component

* Some cleaning. Add geojson clean & validate code

* Catch file parsing errors and notify user

* Disable index type if valid file not referenced

* Set error messaging on invalid index name used

* Add index pattern checking logic and error handling

* Dynamically populate geo index options

* Set index data type earlier in the workflow. Don't duplicate requests

* Pass back index ready status from plugin and connect to layer next button

* Increase max bytes to ~50MB

* Don't parse files over max size & warn user. Also, remove toasts and warn similarly to other components

* Uploaded file default label: 'fileToImport' -> 'Import File'

* Expand out feature properties for mapping

* Pass through telemetry data to plugin back-end

* Clean up indexing flow. Separate creation of index patterns. Add new index pattern create callbacks

* Pass back info for indexing failures but don't connect to UI yet

* Fix telemetry test issues and update corresponding code

# Conflicts:
#	x-pack/plugins/file_upload/server/telemetry/telemetry.test.ts

* Add file upload telemetry to saved objects management builder

* Missing space

* Add descriptive comments to dynamic keys in telemetry fields

* Divide up the import layer add workflow on the maps side and tweak to avoid layer color change

* Fix bug affecting file preview replacement not updating coordinate index type

* Remove index pattern. Organize effects. General clean up

* preIndexTransform -> transformDetails

* Update proptypes

* Cleaning, organizing

* Add index name guidelines. Show conditionally

* Add file size, type guidance. Filter on file size, not chunk size. Small tweaks to file/index tips

* Zoom to layer extent on preview of imported data

* Revert "Revise import layer workflow to be separate from add layer workflow"

This reverts commit 3b35f5371d.

* Handle import file determination to accomodate add layer flow. Update card wording

* Decompose addLayer component into smaller pieces. Add placeholder import progress component

* Dynamically change footer button text for context

* Move import card to top of sources

* Get basic progress tracking in place

* Allow second layer (indexed layer) to get removed. Reconnect file remove. Small UI tweaks

* Add link to management for further index mods

* Fix i18n failures

* Add file parsing progress indicator & text

* Reset importView on source reset

* Add dynamic chunking to handle fluctuating data sizes common to geo features

* Don't duplicate index request if request in flight

* Modify json upload and import to use JS classes & react class component state

* Transition remaining file_upload components over to class/component structure with state

* Move functions into index_settings class

* Review feedback

* Add fetch with timeout

* Split out import editor into separate component and clean up logic

* Clean up add layer panel/button title logic

* More cleanup

* Tweaks to success and error handling flow

* Handle success/error handling on add/view indexed data

* Jump to indexing complete on error. Handle nothing returned to client app

* Update name/location of source select css file

* Update import source card border color and icon

* Suggest name for index based upon file name

* Add validation to auto-suggested index name/pattern

* Use constants for geo_point and geo_shape in mappings

* Update geojson upload card/description

* Catch-all review feedback

* Fix internationalization syntax errors

* Review feedback

* Get index names and patterns only when needed

* Make addLayer async again to fix zoom to extent issue, waits on just the async syncDataForLayer function (which is async)

* Remove panel description as derived state and shift to function

* Remove geojson fit to extent for now

* Remove unused class selector

* Remove unneeded i18 wrapper for what's already passed in as an i18 element

* Revise import state to be handle via redux. Some json upload args changes

* Review feedback. Some cleanup and bug fixes

* Roll back store actions changes and layer_addpanel changes related to color change

* Follow scss file naming conventions for source_select

* Review feedback

* Restore clobbered layer_control view to master state. Add source_select css

* Update import to use plugin local indexPatternService, not maps'

* Review feedback, mostly i18n. Also add index to scss path

* i18n translation updates

* Assign error message to values rather than error object

* Update getMapColors to filter out transient layer

* Wrap Feature as FeatureCollection in Maps

* Add jest tests for geo processing functions. Add fixes for single feature handling

* i18n

* Review feedback. Test cleanup/fixes

* Update layer add panel footer logic to still show when source not selected

* Fix issue of not recognizing MultiPoint type. Remove throw logic for now

* Update telemetry with newly required placeholder function

* Prevent external modification of nested geojson objects

* i18n translation updates

* Revert "Fix issue of not recognizing MultiPoint type. Remove throw logic for now"

This reverts commit d692f913f8.

* Revert "Prevent external modification of nested geojson objects"

This reverts commit 0ea9fd3336.

* yarn.lock update

* [File upload] Remove dynamic fields from mappings, code and telemetry test (#38902)

* Remove dynamic fields from mappings, code and telemetry test

* Add file-upload-telemetry to spaces and es archiver test mappings

* Don't create telemetry saved object if none exists, create on first update instead

* Back out es archiver mappings update
2019-06-18 18:32:31 -06:00
Nathan Reese
20bbb9c164
[Maps] add Symbol orientation style property (#39129)
* add UI for symbol orientation styling

* set icon-rotate layout property

* fix jest test with new default style property value

* remove some references to scaled and use styling instead
2019-06-18 18:09:33 -06:00
Nathan Reese
a3a1e0c18d
[Maps] use coalesce to ensure number always passed to interpolate for data driven size styling (#38427)
* [Maps] use coalesce to ensure number always passed to interpolate for data driven size styling

* update docs with behavior when feature property is not defined

* Update docs/maps/vector-style.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/maps/vector-style.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* move first note into description paragraph

* add coalesce wrapper around icon-size extraction expression
2019-06-17 15:14:53 -06:00
Nathan Reese
151d2e1413
[Maps] add functional test for tooltip filter actions (#38988) 2019-06-17 12:13:59 -06:00
Greg Thompson
c22b706b25
Upgrade EUI to 11.3.2 (#38262)
* eui 11.3.1

* EuiSuperSelect TS updates

* EuiColorPicker updates

* EuiBadge updates

* a11y updates

* i18n service updates

* remove unused translations

* move valueOfSelected logic to private method

* update EuiColorPicker class name

* Updated canvas storyshots

* i18n fixes; maps color selection position

* i18n snapshot updates

* update canvas storyshots

* snapshot updates

* 11.3.2

* maps colorpicker

* space avatar colorpicker
2019-06-14 15:45:35 -05:00
Nathan Reese
8ddb5b70c0
[Maps] symbolize points with maki icons (#37822)
* [Maps] sybmolize points with maki icons

* add from for selecting symbol

* add from for selecting symbol

* get icons working for static colors

* static icon sizing

* refacto symbol_utils

* timing issue

* use SDF icons

* dynamic iconSize

* set icon-anchor

* display symbol icon in map legend

* add unit tests for VectorIcon

* set icon fill based on dark mode

* remove unused file

* fix jest tests

* set icon-opacity

* use size style to configure icon-image small or large

* fix queryRadius error by just hiding other point layer instead of removing

* remove console statement on error

* use maki icon size constants

* add retry around opening set view popover for flaky test
2019-06-14 05:56:30 -06:00
Liza Katz
4a39c7a33e
Separate class\type definitions from plugin instance setup (#38894)
* Separate class\type defenitions from plugin instance setup in shim plugin definition
This helps avoiding circular dependency issues that were obsereved in filter-manager branch (due to code starting to use the data plugin).

* typescript fun
2019-06-14 11:45:26 +03:00
Peter Pisljar
5baf958adf
removing angular from indexPatterns (#34418) 2019-06-14 10:39:50 +02:00
Stacey Gammon
cde4fb6ed5
Small step to consolidating refresh interval types. Stop exporting from all embeddable apis. Conform to time filter one. (#38681) 2019-06-12 08:08:19 -04:00
Nathan Reese
230959cfe1
[Maps] add support for Top Hits to Documents source (#38052)
* top hits

* fetch top hits

* trigger load if top hits configuration changes

* text clean-up

* add functional tests for top hits

* add functional test verify configuration updates re-fetch data

* show entity source tooltip message for top hits

* include entities cound in results trimmed message

* pass fields needed for data driven styling and joins

* fix i18n problem

* more i18n changes

* reverse hits list so most recent events are drawn on top

* review feedback

* set meta to null when no sourceDataRequest
2019-06-11 16:12:54 -06:00
Matthew Kime
02ad1cfed4
remove unused injected dependencies (3rd in a series) (#37947)
* remove unused injected dependencies
2019-06-09 08:35:09 -05:00
Nathan Reese
76f686bf7d
[Maps] ensure labels extracted from WMS capabilities are unique (#38311)
* [Maps] ensure labels extracted from WMS capabilities are unique

* clean up

* clean up
2019-06-06 20:31:36 -06:00
Nick Peihl
1ef0c0995d
Add link to 7.2 ems landing page (#38284) 2019-06-06 16:12:26 -07:00
Nathan Reese
348f10eeaa
[Maps] fix tooltip text overlap and text overflow (#38271)
* [Maps] Use table to display tooltip properties

* Design cleanup

- Added dropshadow
- Cleaned SASS
- Removed unnecessary wrappers around close button and centered it
- Change loading state to be centered
- Fixed z-index so tooltip is on top of controls
- Condensed padding/spacing

* Fix overlays in IE

* revert yarn.lock changes
2019-06-06 13:57:52 -06:00
Nathan Reese
99994fb864
[Maps] replace FormattedText with FormattedMessage (#38016)
* [Maps] replace FormattedText with FormattedMessage

* fix Capitalization
2019-06-05 13:13:48 -06:00
Nathan Reese
983f3a25a8
[Maps] fix defaulting to dark tiles when kibana is in dark mode (#37792)
* [Maps] fix defaulting to dark tiles when kibana is in dark mode

* remove unused functions
2019-06-03 17:18:50 -06:00
Aaron Caldwell
e16842393f
[Maps] Change tooltip to use description list for ie compat (#37396)
* Change tooltip to use description list for ie compat

* Remove commented out styles

* Test fixes and review feedback

* Remove unneeded wrapper div on button icon and update tests to reflect class changes

* Add comment explaining why we're setting html explicitly
2019-05-31 15:26:39 -06:00
Peter Pisljar
29bc941e73
fixing issue with infinite reload (#37615) 2019-05-31 14:23:56 +02:00
Peter Pisljar
e2ae24df10
fixing typo (#37472) 2019-05-30 14:36:32 +02:00
Nathan Reese
6f715f72a3
[Maps] updated scaled property values when there are no results (#37121) 2019-05-30 05:51:54 -06:00
Nathan Reese
a3f5e9f83d
[Maps] only sync layer list state to mapbox once (#37133)
* [Maps] only sync layer list state to mapbox once

* clean up getDerivedStateFromProps logic
2019-05-29 17:38:50 -06:00
Nathan Reese
c8177e07cb
[Maps] heatmap color ramp select and legend details (#37187)
* [Maps] heatmap color ramp select and legend details

* heatmap style editor

* add tests for color_utils

* add snapshot test for HeatmapStyleEditor

* change label to Color range

* update jest snapshot for label text change
2019-05-29 17:36:19 -06:00
Liza Katz
bc37f86afa
Moved query filter and push filter into filter manager (#36764)
* Moved query filter and push filter from filter bar to filter manager
2019-05-28 17:55:46 +03:00
Thomas Neirynck
5d79b9d081
[Maps] Use mapbox feature-state for dynamic properties and upgrade mapbox-gl to 0.54 (#36466) 2019-05-21 23:51:42 -04:00
Nick Peihl
a9deee9c5c
[Maps] Support multiple basemap styles (#36074) 2019-05-21 18:37:35 -07:00
Caroline Horn
24879920ef
[Maps] Fix some overlays designs (#36837)
* Better text as overlay

* Make “Go to” button an icon button

* Fix layout with scrolling and overflow shadow of right side

* Show full stroke of fillable circle

* Moved mapbox styles to a hack file, increased text shadow for better visibility
2019-05-21 21:24:11 -04:00
Nathan Reese
29cef695f0
[Maps] ESSearchSource getSupportedShapeTypes wait for getGeoField (#36834) 2019-05-21 17:08:23 -06:00
Thomas Neirynck
e2e5fed76f
[Maps] add ability to load EMS resources with CORS (#34503)
- breaking change: by default, the Maps app now connects with CORS to EMS. This is optional
- no longer include the kbn-version header when requesting files over CORS in region maps
2019-05-21 12:36:57 -04:00
Nathan Reese
1fad462ca8
[maps] bump saved object reference migration version to 7.2.0 (#36772) 2019-05-21 10:24:01 -06:00
Matthew Kime
140978d28c
Remove angular i18n service calls (#36329)
* Remove angular i18n service calls
2019-05-21 09:00:52 -05:00
Nathan Reese
08a4463fcf
[Maps] lazy load tooltip properties for Elasticsearch documents (#36059)
* lazy load tooltip properties for Elasticsearch documents

* return with loadProps exception

* fix errors

* fix feature_tooltip tests

* return empty array instead of throw when target layer or feature can not be found
2019-05-20 15:56:52 -06:00
Chris Roberson
c87e8811cb
[Monitoring/Telemetry] Force collectors to indicate when they are ready (#36153)
* Initial code to force collectors to indicate when they are ready

* Add and fix tests

* Remove debug

* Add ready check in api call

* Fix prettier complaints

* Return 503 if not all collectors are ready

* PR feedback

* Add retry logic for  usage collection in the reporting tests

* Fix incorrect boomify usage

* Fix more issues with the tests

* Just add debug I guess

* More debug

* Try and handle this exception

* Try and make the tests more defensive and remove console logs

* Retry logic here too

* Debug for the reporting tests failure

* I don't like this, but lets see if it works

* Move the retry logic into the collector set directly

* Add support for this new collector

* Localize this

* This shouldn't be static on the class, but rather static for the entire runtime
2019-05-20 13:03:24 -04:00
Tyler Smalley
54f53d1348
Use mapbox-gl-draw/dist for IE11 support (#36505)
This package publishes it's transpiled code in a dist directory without updating
the package.json's main to point to this file. Since we do not transpile node
modules we are updating the require statement to explicitly point to this
file.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2019-05-20 09:25:17 -07:00
Nathan Reese
8202a1da61
[Maps] Only show vector style properties used by source in editor and show line icon in legend (#36280)
* supported features POC

* render point, line and polygon properties

* cleanup from merge with master

* line icon

* display button group for feature type styling

* fix vector_style tests

* remove unused function

* rename getSupportedFeatures to getSupportedShapeTypes and VECTOR_FEATURE_TYPE to VECTOR_SHAPE_TYPES

* review feedback

* display feature styles when user selects feature type

* create constants for geo_json types

* change line icon to line instead of rect

* add help function to avoid duplicate logic for isPointsOnly, isLineOnly, and isPolygonOnly

* add unit tests for _checkIfOnlyFeatureType
2019-05-18 12:19:32 -06:00
Thomas Neirynck
3a3bcfb498
[Maps] add WKT and geohash string support (#34472) 2019-05-15 14:31:53 -04:00
Nathan Reese
2791becd27
[Maps] Show minusInCircle icon when layer has no data (#36457)
* [Maps] Show minusInCircle icon when layer has no data

* rename getTooltipContent so its less ambigiuos

* Update x-pack/plugins/maps/public/shared/layers/layer.js

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* review feedback
2019-05-15 11:10:40 -06:00
Nathan Reese
7bb10baff5
[Maps] show eye closed icon when layer is not visible in TOC (#36250)
* [Maps] show eye closed icon when layer is not visible in TOC

* use minusInCircle icon when layer is outside visible zoom level

* use expand icon to signal layer is out of visible zoom range

* review feedback
2019-05-09 15:14:25 -06:00
Nathan Reese
5349f673d3
Allow embeddable to specify edit label (#36296)
* Allow embeddable to specify edit label

* update test plugins

* pass getDisplayName in options parameter to ContextMenuAction constructor in plugin example

* more typescript clean-up magic

* some more typescript error fun

* change maps embeddable edit label i18n prefix

* clean-up localization
2019-05-09 14:26:49 -06:00
Nathan Reese
c57d7c5892
[Maps] show maps webgl error in generated reports (#36133)
* [Maps] show maps webgl error in generated reports

* add data-shared-item prop
2019-05-09 11:20:42 -06:00