Commit graph

42 commits

Author SHA1 Message Date
Nathan Reese
b22dd68d39
[maps] replace duplicated elasticsearch geo types with types from elasticsearch-specification (#161011)
https://github.com/elastic/elasticsearch-specification/blob/main/output/typescript/types.ts
defines elasticsearch API types. This PR removes types defined in maps
plugins and replaces them with types from elasticsearch-specification.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-06 10:29:01 -06:00
Nathan Reese
94d4574b58
[maps] move routes from /api/maps to /internal/maps and add route versioning (#158328)
Fixes https://github.com/elastic/kibana/issues/157104 and
https://github.com/elastic/kibana/issues/156323

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-30 07:51:12 -06:00
Nathan Reese
556ba07452
[maps] fix double encoding MVT request body (#157788)
Fixes https://github.com/elastic/kibana/issues/157219

On the client, `URLSearchParams.set` encodes strings. On the server,
`query` values are passed to the route decoded. Therefore, there is no
need for special encoding or decoding of requestBody, other then rison
encoding.

PR creates `getTileUrlParams` to standardize vector tile URL creation
across sources. `getTileUrlParams` is placed in a package so it can be
used in integration tests. This greatly increases the maintainability of
integration tests as it makes them ore readable and creates tileUrls
just like the client does to ensure testing is as close to the real
thing as possible.

PR also updates getTileUrl generation to only pick requestBody keys used
by vector tile routes to avoid sending unnecessary data to the server.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-16 14:45:40 -06:00
Nathan Reese
6907882bcb
[maps] fix Maps embeddables in a dashboard not capturing map id in execution context (#153616)
https://github.com/elastic/kibana/issues/153218

Existing execution context implementation spread results from
`executionContextServiceStart().get()` to add map `id`. This
implementation did not work when map was embedded in another
application. When embedded, `executionContextServiceStart().get()`
returned the `id` of the parent application and not the `id` for the
map.

This PR resolves the issue by building executionContext directly in
MapEmbeddable and MapApp. MapApp uses `savedObjectId` for
`executionContext.id`. MapEmbeddable uses `embeddableId` for
`executionContext.id`.

The PR also updates the MVT routes to include executionContextId for the
execution context with `_mvt` calls.

#### Testing
To view execution context in kibana logs, add below to kibana.dev.yml.
For more information
https://www.elastic.co/guide/en/kibana/8.7/kibana-troubleshooting-trace-query.html
```
logging:
  loggers:
    - name: execution_context
      level: debug
      appenders: [console]
```

#### Execution context for lens and maps panels in dashboard
There is not a lot of consistency for what `type` and `name` should be
across Kibana. I found [this
comment](https://github.com/elastic/kibana/pull/105206/files#r671174649)
for when lens added execution context for lens embeddable that stated
`type:feature` and `name:sub_feature`. Therefore, I followed the lens
example and made `type:maps` and `name:maps` since maps does not have
sub_features.
 ```
[2023-03-23T18:29:12.750-06:00][DEBUG][execution_context]
{"type":"application","name":"dashboards","url":"/mth/app/dashboards","page":"app","id":"d98e6530-c9a8-11ed-9340-d743c2c88db8","child":{"type":"maps","name":"maps","id":"91f17723-367d-460e-ad90-dbac1fc072cb","url":"/map/de71f4f0-1902-11e9-919b-ffe5949a18d2","description":"es_geo_grid_source:cluster"}}
[2023-03-23T18:29:12.750-06:00][DEBUG][execution_context]
{"type":"application","name":"dashboards","url":"/mth/app/dashboards","page":"app","id":"d98e6530-c9a8-11ed-9340-d743c2c88db8","child":{"type":"maps","name":"maps","id":"91f17723-367d-460e-ad90-dbac1fc072cb","url":"/map/de71f4f0-1902-11e9-919b-ffe5949a18d2","description":"es_term_source:terms"}}
[2023-03-23T18:29:13.241-06:00][DEBUG][execution_context]
{"type":"dashboard","name":"dashboards","url":"/mth/app/dashboards","page":"app","id":"d98e6530-c9a8-11ed-9340-d743c2c88db8","description":"single
map","child":{"type":"lens","name":"lnsXY","id":"b9e44118-9e67-4c1c-9159-597d8a9f80d1","description":"lens","url":"/mth/app/lens#/edit/32e87880-c9ab-11ed-9340-d743c2c88db8"}}
```

#### Execution context for maps
There is not a lot of consistency across kibana for `type` and `name` in applications. [ExecutionContextService.getDefaultContext](https://github.com/elastic/kibana/blob/main/packages/core/execution-context/core-execution-context-browser-internal/src/execution_context_service.ts#L99) returns the below so I stuck with `application` for type in client and `server` for type in server. Here is [one more link](https://github.com/elastic/kibana/pull/124996) that provides some context value of `name` property.
```
return {
      type: 'application',
      name: this.appId,
      url: window.location.pathname,
    };
```

```
[2023-03-23T18:30:39.886-06:00][DEBUG][execution_context]
{"type":"application","name":"maps","url":"/mth/app/maps/map/de71f4f0-1902-11e9-919b-ffe5949a18d2","id":"de71f4f0-1902-11e9-919b-ffe5949a18d2","page":"editor","description":"es_geo_grid_source:cluster"}
[2023-03-23T18:30:39.886-06:00][DEBUG][execution_context]
{"type":"application","name":"maps","url":"/mth/app/maps/map/de71f4f0-1902-11e9-919b-ffe5949a18d2","id":"de71f4f0-1902-11e9-919b-ffe5949a18d2","page":"editor","description":"es_term_source:terms"}
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-03-28 13:37:27 -06:00
Nathan Reese
f439bdc2b3
[Maps] fixes Kibana maps shows MVT borders if the geometry border style is greater than 1 (#150497)
Fixes https://github.com/elastic/kibana/issues/150187

PR passes buffer to kibana MVT route which passes buffer to
Elasticsearch vector tile API. Buffer is set based on line width style
property.

<img width="600" alt="Screen Shot 2023-02-07 at 2 43 15 PM"
src="https://user-images.githubusercontent.com/373691/217373279-4d72e210-31ae-48cc-997f-dc05d330028b.png">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-02-09 11:07:54 -07:00
Nathan Reese
0958c59f0b
[Maps] fix Kibana maps should not override the sort field if not provided by the user (#150400)
Fixes https://github.com/elastic/kibana/issues/150184

PR updates vector tile search request body generation to only populate
`sort` property when its provided. PR also cleans up some `any` types
with types from elasticsearch client.
2023-02-07 07:31:21 -07:00
Nathan Reese
d34408876a
[maps] Use label features from ES vector tile search API to fix multiple labels (#132080)
* [maps] mvt labels

* eslint

* only request labels when needed

* update vector tile integration tests for hasLabels parameter

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* fix tests

* fix test

* only add _mvt_label_position filter when vector tiles are from ES vector tile search API

* review feedback

* include hasLabels in source data

* fix jest test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-05-20 08:06:25 -06:00
Nathan Reese
72ec630f91
[maps] vector tile inspector (#131565)
* [maps] Vector tile inspector adapter

* empty prompt

* add layer select

* tile request view

* show gridTile es path and body

* show error message

* hits request

* tab with editor

* clean up

* open in console

* do not track same tile multiple times

* remove layer from vector tile inspector when layer is removed

* refactor tile request generation

* show path in inspector

* requests view callout

* remove duplicated server side code

* remove unused files

* fix map_actions test

* open requests view when getting requests from inspector

* only show view when adapter is present

* fix open in console link not matching tile request

* tslint

* fix search sessions functional test

* update trouble shooting docs

* use bold in docs

* fix tiles at zoom level 0

* revert changes to mb_map

* include path when copying to clipboard

* clear inspector when layer type changes

* tslint fix

* clean-up

* update callout copy

* empty prompt copy

* copy updates

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-05-11 15:04:33 -06:00
Pierre Gayvallet
a02c00b8a3
Change ContextContainer to lazily initialize providers (#129896)
* Change ContextContainer to lazily initialize providers

* Introduce CustomRequestHandlerContext, start adapting usages

* adapt IContextProvider's return type

* start fixing violations

* fixing violations - 2

* adapt home routes

* fix remaining core violation

* fix violations on core tests

* fixing more violations

* fixing more violations

* update generated doc...

* fix more violations

* adapt remaining RequestHandlerContext

* fix more violations

* fix non-async method

* more fixes

* fix another await in non async method

* add yet another missing async

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* add yet yet another missing async

* update fleet's endpoints

* fix telemetry endpoints

* fix event_log endpoints

* fix some security unit tests

* adapt canvas routes

* adapt alerting routes

* adapt more so_tagging routes

* fix data_enhanced routes

* fix license_management routes

* fix file_upload routes

* fix index_management routes

* fix lists routes

* fix snapshot_restore routes

* fix rule_registry routes

* fix ingest_pipelines routes

* fix remote_clusters routes

* fix index_lifecycle_management routes

* improve and fix the lazy implementation

* fix triggers_actions_ui endpoints

* start fixing unit tests

* fix cases routes

* fix transform routes

* fix upgrade_assistant routes

* fix uptime route wrapper

* fix uptime route wrapper bis

* update osquery routes

* update cross_cluster_replication routes

* fix some ML routes / wrappers

* adapt maps routes

* adapt rollup routes

* fix some canvas unit tests

* fix more canvas unit tests

* fix observability wrapper

* fix (?) infra type hell

* start fixing monitoring

* fix a few test plugins

* woups

* fix yet more violations

* fixing UA  tests

* fix logstash handlers

* fix fleet unit tests

* lint?

* one more batch

* update security_solution endpoints

* start fixing security_solution mocks

* start fixing security_solution tests

* fix more security_solution tests

* fix more security_solution tests

* just one more

* fix last (?) security_solution tests

* fix timelion javascript file

* fix more test plugins

* fix transforms context type

* fix ml context type

* fix context tests

* fix securitySolution withEndpointAuthz tests

* fix features unit tests

* fix actions unit tests

* fix imports

* fix duplicate import

* fix some merge problems

* fix new usage

* fix new test

* introduces context.resolve

* down the rabbit hole again

* start fixing test type failures

* more test type failures fixes

* move import comment back to correct place

* more test type failures fixes, bis

* use context.resolve for security solution rules routes

* fix new violations due to master merge

* remove comment

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-04-22 13:15:58 +02:00
Nathan Reese
fa89c459ac
[Maps] fix vector tile load errors not displayed in legend (#130395)
* [Maps] fix vector tile load errors not displayed in legend

* revert unneeded change

* update API docs

* add error integration test

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* eslint and fix jest test

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* cleanup

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-04-18 16:20:55 -06:00
Nick Peihl
ac5aca44e8
[Maps] Use content-encoding header from ES for mvt response (#130417)
* Use content-encoding header from ES for mvt

We can't always assume the content-encoding will be gzip. When SSL is enabled in Elasticsearch, the http.compression is disabled by default. We can use the headers from the Elasticsearch response to form the Kibana response.

You should have HTTPS enabled to test this PR. Use `yarn es snapshot --ssl` and `yarn start --ssl`.
2022-04-16 05:51:54 -07:00
spalger
3730dd0779 fix all violations 2022-04-16 01:37:30 -05:00
Nathan Reese
75f8ac424e
[Maps] Add support for geohex_grid aggregation (#127170)
* [Maps] hex bin gridding

* remove console.log

* disable hexbins for license and geo_shape

* fix jest tests

* copy cleanup

* label

* update clusters SVG with hexbins

* show as tooltip

* documenation updates

* copy updates

* add API test for hex

* test cleanup

* eslint

* eslint and functional test fixes

* eslint, copy updates, and more doc updates

* fix i18n error

* consolidate isMvt logic

* copy review feedback

* use 3 stop scale for hexs

* jest snapshot updates

* Update x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/es_geo_grid_source.tsx

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nick Peihl <nickpeihl@gmail.com>
2022-03-23 08:20:10 -06:00
Liza Katz
d5416ed4ae
APM execution context - app, page, entitiy id (#124996)
* Client side execution app level context propagation

* context$ + apm rum integration

* invert the context parent \ child relationship (cc @mikhail)
move more things to top level context

* Pass down context to apm on server

* types

* eslint

* parent <> child

* docs + eslint + jest

* execution context mock

* eslint

* jest

* jest

* server jest

* check

* jest

* storybook

* jest

* report the current space

* fix server side context container

* Remove spaces for now

* docssss

* jest

* lint

* test

* docs

* revert file

* doc

* all context params are optional

* clear on page change

* lint

* ts

* skipped test again

* testing fixes

* oops

* code review #1

* code review #2

* getAsLabels

* maps inherit dashboard context

* docs

* ts

* Give common context to all vis editors

* fix test

* ts \ es \ tests

* labels

* missing types

* docsy docs

* cr #3

* improve jest

* Use editor name

* Update src/plugins/visualizations/public/visualize_app/components/visualize_editor.tsx

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>

* fix maps context

* jest tests for maps

* cr

* docs

* Update execution_context.test.ts

* docs

* lint

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2022-03-03 10:57:38 +02:00
Nathan Reese
548edcaf06
[Maps] fix vector tile URL not properly encoded (#126208)
* [Maps] fix vector tile URL not properly encoded

* clean up variable name

* tslint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-23 14:00:59 -07:00
Pierre Gayvallet
6627bd8b3a
Elasticsearch client: no longer default to using meta: true (#124488)
* Use `Client` interface instead of `KibanaClient`

* get rid of getKibanaEsClient and convertToKibanaClient

* get rid of last KibanaClient usages

* update usages and types in @kbn/securitysolution-es-utils

* fix some violations

* add sugar method around client mock

* update SO repository calls

* adapt more core usages

* export mock types

* batch 1

* batch 2

* batch 3

* batch 4

* batch 5

* batch 6

* batch 7

* batch 8

* batch 9

* security - batch 1

* security - batch 2

* security - batch 3

* last batch of initial violations

* fix resolve_time_pattern

* update generated doc

* fix /internal/index-pattern-management/preview_scripted_field endpoint

* fix monitoring's getLegacyClusterShim

* fix /api/snapshot_restore/privileges route

* fix UptimeESClient

* fix transforms/_nodes endpoint

* lint

* unit test fix - batch 1

* unit test fix - batch 2

* unit test fix - batch 3

* integration test fix - batch 1

* lint

* adapt ML client

* unit test fix - batch 4

* fix uptime test helper

* fix /api/transform/transforms/{transformId}/_update route

* fix ES client FTR test

* fix uptime unit test

* fix type errors on last unit tests

* fix RollupSearchStrategy call

* fix /internal/security/fields/{query} route

* fix GET /api/index_lifecycle_management/policies route

* fix mlClient.getDataFrameAnalytics

* fix APMEventClient

* fix security solution getBootstrapIndexExists

* fix data_enhanced's getSearchStatus

* remove unused @ts-expect-error

* fix unit tests due to latest code changes

* fix more calls in security_solution routes

* fix more calls in ml routes

* fix POST /api/index_management/component_templates route

* fix unit tests due to latest changes

* fix rule_registry's ResourceInstaller.createOrUpdateIndexTemplate

* fix more fleet client calls

* fix UA's GET cloud_backup_status route

* fix createLifecycleExecutorApiTest

* fix hasFleetServers

* fix unit tests due to latest changes

* changes due to last merge

* fix ml modelProvider.getModelsPipelines

* fix security_solution LifecycleQuery.search

* fix new CoreUsageDataService usage

* fix security solution's StatsQuery.search

* improve ml FTR assertions

* fix security_solution's EventsQuery.search

* fix EsClient type as we're keeping transport

* NITs

* clean RepositoryEsClient type

* update generated doc

* review comments

* adapt mlClient.anomalySearch signature

* remove unnecessary .then((body) => body)

* nit

* add unit tests for the client mocking functions

* fix new upgrade assistant /remote_clusters endpoint
2022-02-12 09:19:44 +01:00
Nathan Reese
cd7618eeca
[maps] fix Can not style by date time with vector tiles (#124530)
* [maps] fix Can not style by date time with vector tiles

* eslint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-04 10:17:11 -07:00
Thomas Neirynck
14d6f7c871
[Maps] Add execution context (#123651) 2022-01-27 13:43:12 -05:00
Thomas Neirynck
2cb2bd49c6
[Maps] gzip _mvt requests 2022-01-04 13:13:44 -05:00
Nathan Reese
6c710ffedf
[Maps] Convert HeatmapLayer to vector tiles and add support for high resolution grids (#119070)
* use interpolate instead of modifing geojson

* update mbMap._queryForMeta to support HeatmapLayer

* syncMvtSourceData

* vector source

* gridPrecision

* allow seleting super fine

* removeStaleMbSourcesAndLayers

* clean up

* fix tests

* linter

* i18n fixes and update jest snapshots

* move mtv sync source tests from mvt_vector_layer to sync_source_data test suite

* clean up test

* eslint

* review feedback

* update test expects

* properly fix test expects

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-22 14:19:09 -07:00
Thomas Neirynck
00cbc6324a
[Maps] Propagate http abort requests to Elasticsearch for mvt endpoints (#119043) 2021-11-18 14:57:29 -05:00
Thomas Neirynck
d8af33a226
[Maps] Use maximum grid_precision for super fine grid-resolution (#118625) 2021-11-17 09:12:17 -05:00
Thomas Neirynck
33fd1bdff0
[Maps] Use ES mvt (#114553)
* tmp

* tmp

* tmp

* tmp

* tmp

* use es naming

* typo

* organize files for clarity

* plugin for hits

* tmp

* initial styling

* more boilerplate

* tmp

* temp

* add size support

* remove junk

* tooltip

* edits

* too many features

* rename for clarity

* typing

* tooltip improvements

* icon

* callouts

* align count handling

* typechecks

* i18n

* tmp

* type fixes

* linting

* convert to ts and disable option

* readd test dependencies

* typescheck

* update yarn lock

* fix typecheck

* update snapshot

* fix snapshot

* fix snapshot

* fix snapshot

* fix snapshot

* fix test

* fix tests

* fix test

* add key

* fix integration test

* move test

* use centroid placement

* more text fixes

* more test fixes

* Remove top terms aggregations when switching to super fine resolution (#114667)

* [Maps] MVT metrics

* remove js file

* updateSourceProps

* i18n cleanup

* mvt labels

* remove isPointsOnly from IVectorSource interface

* move get_centroid_featues to vector_layer since its no longer used in server

* labels

* warn users when selecting scaling type that does not support term joins

* clean up scaling_form

* remove IField.isCountable method

* move pluck code from common to dynamic_style_property

* move convert_to_geojson to es_geo_grid_source folder

* remove getMbFeatureIdPropertyName from IVectorLayer

* clean up cleanTooltipStateForLayer

* use euiWarningColor for too many features outline

* update jest snapshots and eslint fixes

* update docs for incomplete data changes

* move tooManyFeatures MB layer definition from VectorLayer to TiledVectorLayer, clean up VectorSource interface

* remove commented out filter in tooltip_control add api docs for getMbLayerIds and getMbTooltipLayerIds

* revert changing getSourceTooltipContent to getSourceTooltipConfigFromGeoJson

* replace DEFAULT_MAX_RESULT_WINDOW with loading maxResultWindow as data request

* clean up

* eslint

* remove unused constants from Kibana MVT implemenation and tooManyFeaturesImage

* add better should method for tiled_vector_layer.getCustomIconAndTooltipContent jest test

* fix tooltips not being displayed for super-fine clusters and grids

* fix check in getFeatureId for es_Search_sources only

* eslint, remove __kbn_metadata_feature__ filter from mapbox style expects

* remove geoFieldType paramter for tile API

* remove searchSessionId from MVT url since its no longer used

* tslint

* vector tile scaling option copy update

* fix getTile and getGridTile API integration tests

* remove size from _mvt request body, size provided in query

* eslint, fix test expect

* stablize jest test

* track total hits for _mvt request

* track total hits take 2

* align vector tile copy

* eslint

* revert change to EsSearchSource._loadTooltipProperties with regards to handling undefined _index. MVT now provides _index

* clean up

* only send metric aggregations to mvt/getGridTile endpoint

* update snapshot, update getGridTile URLs in tests

* update request URL for getGridTile

* eslint

Co-authored-by: Nathan Reese <reese.nathan@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-25 10:41:04 -06:00
Tyler Smalley
4681a80317
[DX] Upgrade prettier to v2.4.0 (#112359)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-09-19 22:34:30 -07:00
Thomas Neirynck
9134bc07d8
[Maps] Auto generate legends and styles from mvt data (#94811) 2021-07-08 12:45:14 +02:00
Nathan Reese
35714526c0
[Maps] Handle indices without geoip schema defined in mapping (#100487)
* ensure sourceGeoField and destGeoField for docs included in pew pew source

* tslint
2021-06-15 06:04:07 -06:00
Mikhail Shustov
d920682e4e
Update @elastic/elasticsearch to 8.0.0-canary13 (#98266)
* bump @elastic/elasticsearch to canary.7

* address errors in core

* address errors in data plugin

* address errors in Alerting team plugins

* remove outdated messages in Lens

* remove unnecessary comments in ML

* address errors in Observability plugin

* address errors in reporting plugin

* address errors in Rule registry plugin

* fix errors in Security plugins

* fix errors in ES-UI plugin

* remove unnecessary union.

* update core tests

* fix kbn-es-archiver

* update to canary 8

* bump to v9

* use new typings

* fix new errors in core

* fix errors in core typeings

* fix type errors in data plugin

* fix type errors in telemetray plugin

* fix data plugin tests

* fix search examples type error

* fix errors in discover plugin

* fix errors in index_pattern_management

* fix type errors in vis_type_*

* fix errors in typings/elasticsearch

* fix type errors in actions plugin

* fix type errors in alerting and apm plugins

* fix type errors in canvas and cases

* fix errors in event_log

* fix type errors in ILM and ingest_pipelines

* fix errors in lens plugin

* fix errors in lists plugin

* fix errors in logstash

* fix errors in metrics_entities

* fix errors in o11y

* fix errors in watcher

* fix errors in uptime

* fix errors in upgrade_assistant

* fix errors in task_manager

* fix errors in stack_alerts

* fix errors in security_solution

* fix errors in rule_registry

* fix errors in snapshot_restore

* fix remaining errors

* fix search intergration tests

* adjust assetion

* bump version to canary.10

* adapt code to new naming schema

* use mapping types provided by the client library

* Revert "adjust assetion"

This reverts commit 19b8fe0464.

* fix so intergration tests

* fix http integration tests

* bump version to canary 11

* fix login test

* fix http integration test

* fix apm test

* update docs

* fixing some ml types

* fix new errors in data plugin

* fix new errors in alerting plugin

* fix new errors in lists plugin

* fix new errors in reporting

* fix or mute errors in rule_registry plugin

* more ML type fixes

* bump to canary 12

* fix errors after merge conflict

* additional ML fixes

* bump to canary 13

* fix errors in apm plugin

* fix errors in fleet plugin

* fix errors in infra plugin

* fix errors in monitoring plugin

* fix errors in osquery plugin

* fix errors in security solution plugins

* fix errors in transform plugin

* Update type imports for ES

* fix errors in x-pack plugins

* fix errors in tests

* update docs

* fix errors in x-pack/test

* update error description

* fix errors after master merge

* update comment in infra plugin

* fix new errors on xpack tests/

Co-authored-by: James Gowdy <jgowdy@elastic.co>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
2021-06-08 15:06:06 +02:00
Thomas Neirynck
e38a3dabf7
[Maps] Add cache control to mvt endpoints (#94861) 2021-04-15 09:07:34 -04:00
Nathan Reese
c5e3e78de8
[Maps] do not track total hits for elasticsearch search requests (#91754)
* [Maps] do not track total hits for elasticsearch search requests

* set track_total_hits for es_search_source tooltip fetch

* tslint

* searchSource doc updates, set track_total_hits in MVT requests

* revert changes made to searchsourcefields docs

* tslint

* review feedback

* tslint

* remove Hits (Total) from functional tests

* remove sleep in functional test

* tslint

* fix method name

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-25 13:00:16 -06:00
Tomas Della Vedova
238791b942
ES client : use the new type definitions (#83808)
* Use client from branch

* Get type checking working in core

* Fix types in other plugins

* Update client types + remove type errors from core

* migrate Task Manager Elasticsearch typing from legacy library to client library

* use SortOrder instead o string in alerts

* Update client types + fix core type issues

* fix maps ts errors

* Update Lens types

* Convert Search Profiler body from a string to an object to conform to SearchRequest type.

* Fix SOT types

* Fix/mute Security/Spaces plugins type errors.

* Fix bootstrap types

* Fix painless_lab

* corrected es typing in Event Log

* Use new types from client for inferred search responses

* Latest type defs

* Integrate latest type defs for APM/UX

* fix core errors

* fix telemetry errors

* fix canvas errors

* fix data_enhanced errors

* fix event_log errors

* mute lens errors

* fix or mute maps errors

* fix reporting errors

* fix security errors

* mute errors in task_manager

* fix errors in telemetry_collection_xpack

* fix errors in data plugins

* fix errors in alerts

* mute errors in index_management

* fix task_manager errors

* mute or fix lens errors

* fix upgrade_assistant errors

* fix or mute errors in index_lifecycle_management

* fix discover errors

* fix core tests

* ML changes

* fix core type errors

* mute error in kbn-es-archiver

* fix error in data plugin

* fix error in telemetry plugin

* fix error in discover

* fix discover errors

* fix errors in task_manager

* fix security errors

* fix wrong conflict resolution

* address errors with upstream code

* update deps to the last commit

* remove outdated comments

* fix core errors

* fix errors after update

* adding more expect errors to ML

* pull the lastest changes

* fix core errors

* fix errors in infra plugin

* fix errors in uptime plugin

* fix errors in ml

* fix errors in xpack telemetry

* fix or mute errors in transform

* fix errors in upgrade assistant

* fix or mute fleet errors

* start fixing apm errors

* fix errors in osquery

* fix telemetry tests

* core cleanup

* fix asMutableArray imports

* cleanup

* data_enhanced cleanup

* cleanup events_log

* cleaup

* fix error in kbn-es-archiver

* fix errors in kbn-es-archiver

* fix errors in kbn-es-archiver

* fix ES typings for Hit

* fix SO

* fix actions plugin

* fix fleet

* fix maps

* fix stack_alerts

* fix eslint problems

* fix event_log unit tests

* fix failures in data_enhanced tests

* fix test failure in kbn-es-archiver

* fix test failures in index_pattern_management

* fixing ML test

* remove outdated comment in kbn-es-archiver

* fix error type in ml

* fix eslint errors in osquery plugin

* fix runtime error in infra plugin

* revert changes to event_log cluser exist check

* fix eslint error in osquery

* fixing ML endpoint argument types

* fx types

* Update api-extractor docs

* attempt fix for ese test

* Fix lint error

* Fix types for ts refs

* Fix data_enhanced unit test

* fix lens types

* generate docs

* Fix a number of type issues in monitoring and ml

* fix triggers_actions_ui

* Fix ILM functional test

* Put search.d.ts typings back

* fix data plugin

* Update typings in typings/elasticsearch

* Update snapshots

* mute errors in task_manager

* mute fleet errors

* lens. remove unnecessary ts-expect-errors

* fix errors in stack_alerts

* mute errors in osquery

* fix errors in security_solution

* fix errors in lists

* fix errors in cases

* mute errors in search_examples

* use KibanaClient to enforce promise-based API

* fix errors in test/ folder

* update comment

* fix errors in x-pack/test folder

* fix errors in ml plugin

* fix optional fields in ml api_integartoon tests

* fix another casting problem in ml tests

* fix another ml test failure

* fix fleet problem after conflict resolution

* rollback changes in security_solution. trying to fix test

* Update type for discover rows

* uncomment runtime_mappings as its outdated

* address comments from Wylie

* remove eslint error due to any

* mute error due to incompatibility

* Apply suggestions from code review

Co-authored-by: John Schulz <github.com@jfsiii.org>

* fix type error in lens tests

* Update x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* Update x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* update deps

* fix errors in core types

* fix errors for the new elastic/elasticsearch version

* remove unused type

* remove unnecessary manual type cast and put optional chaining back

* ML: mute Datafeed is missing indices_options

* Apply suggestions from code review

Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>

* use canary pacakge instead of git commit

Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>
Co-authored-by: Gidi Meir Morris <github@gidi.io>
Co-authored-by: Nathan Reese <reese.nathan@gmail.com>
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
Co-authored-by: restrry <restrry@gmail.com>
Co-authored-by: James Gowdy <jgowdy@elastic.co>
Co-authored-by: John Schulz <github.com@jfsiii.org>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
2021-03-25 04:47:16 -04:00
Nathan Reese
6264c563d1
[Maps] convert elasticsearch_utils to TS (#93984)
* [Maps] convert elasticsearch_utils to TS

* tslint

* clean up

* i18n cleanup

* update elasticsearch_geo_utils tests

* fix unit test

* review feedback

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-10 13:23:42 -07:00
Thomas Neirynck
33010bebf9
[Maps] Abort ES-search when tile request is cancelled (#92069) 2021-03-02 16:46:09 -05:00
Nathan Reese
3722bea42f
[Maps] clamp MVT too many features polygon to tile boundary (#90444)
* [Maps] clamp MVT too many features polygon to tile boundary

* add mapbox_styles to index.js

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-08 12:53:54 -07:00
Brandon Kobel
4584a8b570
Elastic License 2.0 (#90099)
* Updating everything except the license headers themselves

* Applying ESLint rules

* Manually replacing the stragglers
2021-02-03 18:12:39 -08:00
Lukas Olson
a9273ca001
[data.search] Add search session methods to search service contract (#87966)
* [data.search] Add search session methods to search service contract

* Fix types

* Fix tests and switch to cancel

* Update docs

* Fix types/tests

* Fix tests

* Update status of SO before cancelling search requests

* Add API integration test

* Fix types

* Update expiration route to use config defaultExpiration

* Fix test

* Update docs

* New logic for extend

* Remove declare module

* Review feedback

* fix ts

* Remove test that is no longer valid

* Fix undefined bug

* Use DataRequestHandlerContext in maps

* ts

Co-authored-by: Liza K <liza.katz@elastic.co>
2021-02-03 08:08:54 -07:00
Nathan Reese
980112de1e
[Maps] migrate mvt routes to use data.search service instead of directly calling elasticsearch (#89904)
* [Maps] migrate mvt routes to use data.search service instead of directly calling elasticsearch

* pass search session id to mvt requests

* move grid tile tests to integration tests

* replace getTile unit test with integration test

* add comment about request param

* revert total meta change

* tslint fixes

* update jest tests
2021-02-02 15:51:00 -07:00
Tiago Costa
183cf56fcd
chore(NA): move maps plugin test fixtures out of __tests__ folder (#87764)
* chore(NA): move maps plugin test fixtures out of __tests__ folder

* chore(NA): last missing __tests__ folders renamed

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-11 17:14:46 +00:00
Nathan Reese
0ac6e6223e
[Maps] labels for polygons and lines (#86191)
* [Maps] labels for polygons and lines

* remove x-pack yarn.lock

* add labels to choropleth map wizard

* clean up comment

* add mvt tile support

* only add centroids if there may be lines or polygons

* tslint

* tslint

* do not add centroid to too many features polygon

* update get_tile expect statements

* move turf dependencies from devDependencies to dependencies

* update jest snapshot and functional test expects

* fix functional test expect

* another functional test expect update

* functional test updates

* expect

* pew pew source expect updates

* update joins expect

* update mapbox style expects

* update join visibility expects for geocentroids

* update join visibility expects for geocentroids

* another functional test expect update

* review feedback

* update yarn.lock

* tslint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-07 11:10:20 -07:00
Thomas Neirynck
5493e8eace
[Maps] Use Json for mvt-tests (#86492) 2020-12-18 19:53:41 -05:00
Thomas Neirynck
fd4eacd29f
[Maps] Enable geo-point for mvt scaling type (#79733) 2020-10-06 17:17:47 -04:00
Thomas Neirynck
3c6f242981
[Maps] Add super-fine option to grid/cluster layer (#78201)
Adds a super-fine option for grids and cluster layers. This uses the .mvt tile format to deliver the data.
2020-09-23 11:49:51 -04:00
Thomas Neirynck
d7869dee6e
[Maps] Add mvt support for ES doc sources (#75698) 2020-09-01 14:17:52 -04:00