Commit graph

35792 commits

Author SHA1 Message Date
DeDe Morton 471b114089
[DOCS] Update links to Beats documentation (#70380)
* Update links to Beats documentation

* Update snapshot files

* Fix lint errors
2020-08-21 09:08:07 -07:00
Constance 172c464b14
[Enterprise Search] Convert our public_url route to config_data and collect initialAppData (#75616)
* [Setup] DRY out stripTrailingSlash helper

- DRYs out repeated code
- This will be used by an upcoming server/ endpoint change, hence why it's in common

* [Setup] DRY out initial app data types to common/types

- In preparation for upcoming server logic that will need to reuse these types
+ DRY out and clean up workplace_search types
  - remove unused supportEligible
  - remove currentUser - unneeded in Kibana

* Update callEnterpriseSearchConfigAPI to parse and fetch new expected data

* Remove /public_url API for /config_data

* Remove getPublicUrl in favor of directly calling the new /config_data API from public/plugin

+ set returned initialData in this.data

* Set up product apps to be passed initial data as props

* Fix for Kea/redux state not resetting between AS<->WS nav

- resetContext at the top level only gets called once total on first plugin load and never after, causing navigating between WS and AS to crash when both have Kea - this fixes the issue

- moves redux Provider to top level app as well

* Add very basic Kea logic file to App Search

* Finish AppSearchConfigured tests & set up kea+useEffect mocks

* [Cleanup] DRY out repeated mock initialAppData to a reusable defaults constant
2020-08-21 09:02:15 -07:00
Alejandro Fernández Haro 338b61ce6c
[Usage Collection Schemas] Remove Legacy entries (#75652) 2020-08-21 07:23:39 -07:00
Devon Thomson 6b3ce3f91e
[Dashboard First] Lens Originating App Breadcrumb (#75470)
Changed lens breadcrumbs to reflect the Originating App
2020-08-21 10:18:14 -04:00
Aleh Zasypkin c68363995b
Improve login UI error message. (#75642) 2020-08-21 16:15:12 +02:00
Robert Austin da0da4ca75
[Security Solution] modify circular deps checker to output images of circular deps graphs (#75579) 2020-08-21 09:43:42 -04:00
Alejandro Fernández Haro ee75e571ad
[Data Telemetry] Add index pattern to identify "meow" attacks (#75163)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-21 13:47:01 +01:00
Pierre Gayvallet fd459dea5d
Migrate CSP usage collector to kibana_usage_collection plugin (#75536)
* move csp usage collector from legacy kibana plugin to kibana_usage_collection

* make scripts/telemetry_check happy.

* remove assertion on legacy kibana plugin

* remove test on legacy kibana plugin

* update README
2020-08-21 14:35:31 +02:00
Jean-Louis Leysens 7376e4ca3d
[Console] Get ES Config from core (#75406)
* Server side changes

- removed console_legacy plugin!
- added new es_config endpoint that returns server side es config
  at the moment this is just the first value in hosts
- Slight refactor to how routes are registered to bring them more
  in line with other ES UI plugins

* Client side update

- Updated the client to not get es host from injected metadata.
  Instead use the new endpoint created server side that returns
  this value
- Added a small README.md regarding the hooks lib and need to
  refactor use of jQuery in console
- Write code to init the es host value on the client once at start
  up in a non-blocking way. If this fails we just use the default
  value of http://localhost:9200 as this powers non-essential
  console functionality (i.e., copy as cURL).

* fix type issue and jest tests

* fix another type issue

* simplify proxy assignment in proxy handler mock

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-21 12:20:46 +02:00
Shahzad 506bf6c764
[Uptime] Add delay in telemetry test (#75162)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-21 12:10:50 +02:00
Marta Bondyra 23f46c9d85
[Lens] Use index pattern service instead saved object client (#74654) 2020-08-21 11:33:42 +02:00
Vadim Dalecky 74ab9897b5
Embeddable input (#73033)
* refactor: 💡 move timeRange, filters and query to base embeddabl

* refactor: 💡 use new base embeddable input in explore data

* feat: 🎸 import types as types
2020-08-21 11:28:37 +02:00
Peter Pisljar 3ddc2acd66
adding markdown vis renderer (#75532) 2020-08-21 11:16:52 +02:00
Pete Harverson 659890cc91
[ML] Transforms: Unset doc title when app unmounts (#75539)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-21 09:25:17 +01:00
Stratoula Kalafateli ec44ee0dc9
[TSVB] Disable enableHistogramMode prop when user selects non-stacked bar (#74930)
* Remove enableHistogramMode prop from TSVB as it causes bugs with non-stacked bars

* Disable enableHistogramMode property to false only when thr user selects the nobn-stacked option

* small change to be more human readbale

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-21 10:33:07 +03:00
Spencer 7b23e7cd8b
[kbn/plugin-generator] remove sao, modernize (#75465)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-08-20 18:50:36 -07:00
Quynh Nguyen 958296c5c2
[ML] Update broken job config callout error (#75481)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-20 18:14:58 -05:00
Jen Huang 3201efe797
[Ingest Manager] Add namespace validation (#75381)
* Add namespace validation on APIs and UI

* Add test coverage

* Fix imports

* Fix schema

* Rename to policy

* Fix typo
2020-08-20 15:29:56 -07:00
Gidi Meir Morris 5308cc7100
[Task Manager] Monitors the Task Manager Poller and automatically recovers from failure (#75420)
Introduces a monitor around the Task Manager poller which pips through all values emitted by the poller and recovers from poller failures or stalls.
This monitor does the following:
1. Catches the poller thrown errors and recovers by proxying the error to a handler and continues listening to the poller.
2. Reacts to the poller `error` (caused by uncaught errors) and `completion` events, by starting a new poller and piping its event through to any previous subscribers (in our case, Task Manager itself).
3. Tracks the rate at which the poller emits events (this can be both work events, and `No Task` events, so polling and finding no work, still counts as an emitted event) and times out when this rate gets too long (suggesting the poller  has hung) and replaces the Poller with a new one.

We're not aware of any clear cases where Task Manager should actually get restarted by the monitor - this is definitely an error case and we have addressed all known cases.
The goal of introducing this monitor is as an insurance policy in case an unexpected error case breaks the poller in a long running production environment.
2020-08-20 21:26:56 +01:00
Zacqary Adam Xeper bcca9331b5
[Metrics UI] Get custom metrics working in inventory alerts with limited UI (#75073) 2020-08-20 13:28:10 -05:00
Zacqary Adam Xeper 0d8a4613e4
[Metrics UI] Support percentage format in threshold alerts (#72701)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-20 13:22:04 -05:00
Jean-Louis Leysens 644e9c25d7
[Ingest Pipelines] Processor forms for processors E-J (#75054)
* Added the enrich processor form (big one)

* added fail processor form

* Added foreach processor form

* Added geoip processor form and refactored some deserialization

* added grok processor form and updated comments and some i18n ids

* updated existing gsub processor form to be in line with other forms

* added html_strip processor form

* refactored some serialize and deserialize functions and added inference processor form

* fix copy-pasta mistake in inference form and add join processor form

* Added JSON processor field

- Also factored out target_field field to common field (still have
  to update the all instances)
- Built out special logic for handling add_to_root and
  target_field combo on JSON processor form
- Created another serializer, for default boolean -> undefined.

* remove unused variable

* Refactor to use new shared target_field component, and fix JSON serializer bug

* fix i18n

* address pr feedback

* Fix enrich max fields help text copy

* add link to enrich policy docs in help text

* fix error validation message in enrich policy form and replace space with horizontal rule

* address copy feedback

* fix i18n id typo

* fix i18n

* address additional round of feedback and fix json form help text

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-20 19:04:42 +02:00
Devon Thomson eba482743a
[Dashboard First] Use App Title for Display Instead of App Id (#75457)
Created app title fetch method in embeddable_state_transfer. Used it instead of the raw app id in a number of places.
2020-08-20 13:01:25 -04:00
Constance 7699f1c29a
[Enterprise Search][bug/tech debt] Fix route navigation (#75369)
* Set up navigateToUrl context

* Update RR link helpers to use navigateToUrl

* Update breadcrumbs to use navigateToUrl + refactor

generate_breadcrumbs:
- Change base breadcrumb generator to a custom React useHook instead of passing history/context around
- Change use{Product}Breadcrumbs helpers to mainly involve merging arrays
- Update + simplify tests accordingly (test link behavior in main useBreadcrumb suite, not in subsequent helpers)

set_chrome:
- Update to use new breadcrumb hooks (requires pulling out of useEffect, hooks can't be used inside another hook)
- Clean up/refactor tests

* Update route redirects now that navigation works correctly
2020-08-20 09:41:43 -07:00
Bhavya RM 6376bab559
adding additional tests for the awesome new nav by core ui team and checking off a flaky test' (#75494) 2020-08-20 12:40:18 -04:00
Luke Elmers 94beed1b79
[expressions] Remove legacy APIs. (#75517) 2020-08-20 10:08:31 -06:00
Davis Plumlee afd90b04df
Fixes viewer overflow bug (#75489) 2020-08-20 12:00:41 -04:00
Alison Goryachev 3a66bb5851
[Ingest pipelines] Test pipeline enhancements (#74964) 2020-08-20 11:52:58 -04:00
Joe Reuter 8e8f8d6e57
Fixing functional test user roles (#75547) 2020-08-20 17:16:41 +02:00
John Schulz caf3bac6d6
[Ingest Manager] Don't retain POST /setup results. fixes #74587 (#75372)
* add retries for registry requests.

works, afaict. no tests. one TS issue.

* Fix TS issue. Add link to node-fetch error docs

* Restore some accidentally deleted code.

* Add more comments. Remove logging.

* Add tests for plugin setup service & handlers

* Add tests for Registry retry logic

* Extract setup retry logic to separate function/file

* Add tests for setup retry logic

```
  firstSuccessOrTryAgain
    ✓ reject/throws is called again & its value returned (18ms)
    ✓ the first success value is cached (2ms)
```

* More straightforward(?) tests for setup caching

* Revert cached setup. Still limit 1 call at a time

Terrible tests. Committing & pushing to see if it fixes failures like https://github.com/elastic/kibana/pull/74507/checks?check_run_id=980178887

https://kibana-ci.elastic.co/job/elastic+kibana+pipeline-pull-request/67892/execution/node/663/log/

```
07:36:56               └-> "before all" hook
07:36:56               └-> should not allow to enroll an agent with a invalid enrollment
07:36:56                 └-> "before each" hook: global before each
07:36:56                 └-> "before each" hook: beforeSetupWithDockerRegistry
07:36:56                 │ proc [kibana]  error  [11:36:56.369]  Error: Internal Server Error
07:36:56                 │ proc [kibana]     at HapiResponseAdapter.toError (/dev/shm/workspace/parallel/5/kibana/build/kibana-build-xpack/src/core/server/http/router/response_adapter.js:132:19)
07:36:56                 │ proc [kibana]     at HapiResponseAdapter.toHapiResponse (/dev/shm/workspace/parallel/5/kibana/build/kibana-build-xpack/src/core/server/http/router/response_adapter.js:86:19)
07:36:56                 │ proc [kibana]     at HapiResponseAdapter.handle (/dev/shm/workspace/parallel/5/kibana/build/kibana-build-xpack/src/core/server/http/router/response_adapter.js:81:17)
07:36:56                 │ proc [kibana]     at Router.handle (/dev/shm/workspace/parallel/5/kibana/build/kibana-build-xpack/src/core/server/http/router/router.js:164:34)
07:36:56                 │ proc [kibana]     at process._tickCallback (internal/process/next_tick.js:68:7)
07:36:56                 │ proc [kibana]   log   [11:36:56.581] [info][authentication][plugins][security] Authentication attempt failed: [security_exception] missing authentication credentials for REST request [/_security/_authenticate], with { header={ WWW-Authenticate={ 0="ApiKey" & 1="Basic realm=\"security\" charset=\"UTF-8\"" } } }
07:36:56                 └- ✓ pass  (60ms) "Ingest Manager Endpoints Fleet Endpoints fleet_agents_enroll should not allow to enroll an agent with a invalid enrollment"
07:36:56               └-> should not allow to enroll an agent with a shared id if it already exists
07:36:56                 └-> "before each" hook: global before each
07:36:56                 └-> "before each" hook: beforeSetupWithDockerRegistry
07:36:56                 └- ✓ pass  (111ms) "Ingest Manager Endpoints Fleet Endpoints fleet_agents_enroll should not allow to enroll an agent with a shared id if it already exists "
07:36:56               └-> should not allow to enroll an agent with a version > kibana
07:36:56                 └-> "before each" hook: global before each
07:36:56                 └-> "before each" hook: beforeSetupWithDockerRegistry
07:36:56                 └- ✓ pass  (58ms) "Ingest Manager Endpoints Fleet Endpoints fleet_agents_enroll should not allow to enroll an agent with a version > kibana"
07:36:56               └-> should allow to enroll an agent with a valid enrollment token
07:36:56                 └-> "before each" hook: global before each
07:36:56                 └-> "before each" hook: beforeSetupWithDockerRegistry
07:36:56                 └- ✖ fail: Ingest Manager Endpoints Fleet Endpoints fleet_agents_enroll should allow to enroll an agent with a valid enrollment token
07:36:56                 │      Error: expected 200 "OK", got 500 "Internal Server Error"
07:36:56                 │       at Test._assertStatus (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:268:12)
07:36:56                 │       at Test._assertFunction (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:283:11)
07:36:56                 │       at Test.assert (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:173:18)
07:36:56                 │       at assert (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:131:12)
07:36:56                 │       at /dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:128:5
07:36:56                 │       at Test.Request.callback (/dev/shm/workspace/kibana/node_modules/superagent/lib/node/index.js:718:3)
07:36:56                 │       at parser (/dev/shm/workspace/kibana/node_modules/superagent/lib/node/index.js:906:18)
07:36:56                 │       at IncomingMessage.res.on (/dev/shm/workspace/kibana/node_modules/superagent/lib/node/parsers/json.js:19:7)
07:36:56                 │       at endReadableNT (_stream_readable.js:1145:12)
07:36:56                 │       at process._tickCallback (internal/process/next_tick.js:63:19)
07:36:56                 │
07:36:56                 │
```

* New name & tests for one-at-a-time /setup behavior

`firstPromiseBlocksAndFufills` for "the first promise created blocks others from being created, then fufills all with that first result"

* More (better?) renaming

* Fix name in test description

* Fix spelling typo.

* Remove registry retry code & tests

* Use async fn's .catch to avoid unhandled rejection

Add explicit `isPending` value instead of overloading role of `status`. Could probably do without it, but it makes the intent more clear.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-20 11:09:09 -04:00
John Schulz 0f494f420f
Retry network errors on registry requests (#74507) 2020-08-20 11:07:54 -04:00
Jean-Louis Leysens 6d8d802b3f
[Console] Update extract string literal logic (#72628)
* initial version of string extraction by parser

* refine comments and add function description

* - Added parser specific test
- Added 5 megabyte limit to string size for expansion

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-20 16:55:08 +02:00
Devon Thomson 056038caa9
[Dashboard First] Add to Library Action (#75098)
* created an add to library action that turns 'by value' embeddables into 'by reference' embeddables
2020-08-20 10:26:53 -04:00
Thomas Neirynck 954b5b5224
[Maps] Move elasticsearch_geo_utils to common (#75508) 2020-08-20 09:28:19 -04:00
Chris Roberson 3fb639f986
[Monitoring] Fix bug where kibana crashes with collection disabled (#75335)
* Fix bug where kibana crashes with collection disabled

* Do not set this to an empty object by default

* Always create the bulk uploader, and fix this misplaced license check

* Fix type issue

* Add a couple basic tests

* Fix type issue
2020-08-20 09:23:20 -04:00
Luke Elmers 020a76bd3a
[data.search.SearchSource] Extract dependencies and pass them in from the service definition. (#75368)
* Remove injectedMetadata dependency from SearchSource.

* Create common GetConfigFn interface.

* Removed unused service getters.

* Switch all usages of uiSettings to use getConfig.

* Fix circular dependencies.

* Update generated docs.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-20 06:38:44 -06:00
Joe Portner 4dd5d63484
Change response for Saved Objects share/unshare operations (#74995) 2020-08-20 08:35:33 -04:00
Vadim Dalecky cd36188c40
Modularize render complete (#74504)
* chore: 🤖 remove unused render-complete logic

* feat: 🎸 add render-complete observables to IEmbeddable

* Revert "chore: 🤖 remove unused render-complete logic"

This reverts commit 0049c01fbd.

* refactor: 💡 rename render complete "helper" to "listener"

* feat: 🎸 add render complete dispatcher to embeddable

* refactor: 💡 move data-title setup to Embeddable

* refactor: 💡 move embeddable data-title setting to render-compl

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-20 14:31:35 +02:00
Shahzad bb8e5dc3a7
Upgrade APM RUM packages from 5.4.0 to 5.5.0 (#75530) 2020-08-20 14:27:06 +02:00
Robert Oskamp 77a434b2f7
[ML] Functional tests - fix imports in results API tests (#75533)
This PR fixes the broken COMMON_REQUEST_HEADERS in the recently added results API tests.
2020-08-20 12:38:20 +02:00
Alexey Antonov d158692bf5
Vega is now GA (#75157)
* Bringing Vega out of experimental

Closes: #21721

* fix CI group 12

* remove experimental flag from doc

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-20 12:19:21 +03:00
Robert Oskamp c88c73298c
[ML] Functional tests - refactor structure of ML and Transform test files (#75307)
This PR refactors the structure of ML and Transform functional UI test files.
2020-08-20 10:07:21 +02:00
MadameSheema eba85ef50a
fixes 're-orders columns via drag and drop' test (#75126)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-20 09:39:38 +02:00
MadameSheema 4a0a79f9c3
fixes timeline local storage test (#75123)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-20 09:39:09 +02:00
Maja Grubic be0724dd91
[Time to Visualize] Unifying feature flag config for visualize editor and dashboard (#75408)
* Unifying feature flag config for visualize/dashboard

* Removing unused import

* Adding missing comma
2020-08-20 08:02:05 +01:00
spalger f1248072d3 skip flaky suite (#75522) 2020-08-19 23:00:53 -07:00
Peter Pisljar 28df9266a0
adds metric_vis_renderer (#57694) 2020-08-20 06:40:08 +02:00
DeDe Morton 4b46316395
Edit text strings for Ingest Manager Overview and Add data pages (#74818)
* Edit Ingest Manager text strings in Overview and Add Data pages

* Add fixes from review

* remove blank line

* Change configurations to policies

* Remove "configuration" from text

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-19 18:02:34 -07:00
Kevin Logan f286f8f6e1
[SECURITY_SOLUTION] Task/add auto refresh to endpoint list (#74856) 2020-08-19 19:52:56 -04:00
Josh Dover 51a80c61a0
Add support for reading request ID from X-Opaque-Id header (#71019)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-19 15:41:12 -06:00