Commit graph

1821 commits

Author SHA1 Message Date
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
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
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
Gidi Meir Morris 9698a0720d
[Saved objects] Add support for version on create & bulkCreate when overwriting a document (#75172)
Adds support for `version` one the SavedObjectsClient's create api.
This sallows us to retain Optimistic concurrency control when using create to overwrite an existing document.
2020-08-19 16:10:33 +01:00
Tim Sullivan 47d41437d9
[Reporting] Increase capture.timeouts.openUrl to 1 minute (#75207)
* [Reporting] Increase capture.timeouts.openUrl to 1 minute

* update the docs
2020-08-18 13:26:31 -07:00
Brandon Kobel 83bc5004e3
Allow routes to specify the idle socket timeout in addition to the payload timeout (#73730)
* Route options timeout -> timeout.payload

* timeout.idleSocket can now be specified per route

* Removing nested ternary

* Fixing integration tests

* Trying to actually fix the integration tests. Existing tests are hitting
idle socket timeout, not the payload timeout

* Fixing payload post timeout integration test

* Fixing PUT and DELETE payload sending too long tests

* Fixing type-script errors

* GET routes can't specify the payload timeout, they can't accept payloads

* Removing some redundancy in the tests

* Adding 'Transfer-Encoding: chunked' to the POST test

* Fixing POST/GET/PUT quick tests

* Adding idleSocket timeout test

* Removing unnecessary `isSafeMethod` call

* Updating documentation

* Removing PUT/DELETE integration tests

* Working around the HapiJS bug

* Deleting unused type import

* The socket can be undefined...

This occurs when using @hapi/shot directly or indirectly via
Server.inject. In these scenarios, there isn't a socket. This can also
occur when a "fake request" is used by the hacky background jobs:
Reporting and Alerting...

* Update src/core/server/http/http_server.ts

Co-authored-by: Josh Dover <me@joshdover.com>

* Adding payload timeout functional tests

* Adding idle socket timeout functional tests

* Adding better comments, using ?? instead of ||

* Fixing the plugin fixture TS

* Fixing some typescript errors

* Fixing plugin fixture tsconfig.json

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Josh Dover <me@joshdover.com>
2020-08-18 10:46:08 -07:00
Pierre Gayvallet 890fc31dff
Beats Management plugin: migrate server-side code (#70930)
* move all the legacy codebase to KP plugin

* fix imports

* add empty handler context & rename routes folder

* start migrating routes

* migrate rest of the routes

* migrate adapters

* remove beats from legacy xpack plugin

* use nullable + replace response.custom

* fix wrapRouteWithSecurity, remove incorrect header validation

* remove comment

* updating generated plugin list

* fix typos in doc

* adapt readme too.

* remove old commented routes from route files

* remove eslint disabling

* use camel case for plugin id

* update generated doc

Co-authored-by: Josh Dover <me@joshdover.com>
2020-08-18 12:00:39 +02:00
Stratoula Kalafateli 198806baef
Timelion app deprecation warning (#74660)
* wip deprecation notice on timelion app

* Add a deprecation notice on timelion app

* Minor, add visualize and timelion on the docLinks

* Chage the layout a bit

* Change the deprecation notice message

* Change the deprecation notice message

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-18 11:18:41 +03:00
Aleh Zasypkin e46e66210f
Implement Server-Side sessions (#68117) 2020-08-18 08:38:23 +02:00
Ben Skelker 843c2383ea
[Docs]Security docs 7.9 updates (#75156)
* security docs 7.9 updates

* terminology

* updates advanced settings

* terminology

* corrections
2020-08-18 08:25:06 +03:00
Pierre Gayvallet 57a802c43f
expose es config on es setup contract (#73055)
* expose es config on es setup contract

* move config$ back to legacy
2020-08-17 21:08:27 +02:00
Peter Pisljar 22f0641ec3
esdsl (#69254) 2020-08-17 20:21:48 +02:00
Luke Elmers fe017f52dd
Make data.search.aggs available on the server. (#74472) 2020-08-13 13:38:16 -06:00
Spencer 4c810be335
Remove legacy optimizer (#73154)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-13 09:08:44 -07:00
Liza Katz 290f9bfde2
Data plugin: Suggested enhance pattern (#74505)
* improve test stability

* Enhance pattern

* fix tests

* fix test

* Rename enhance to __enhance

* Deleted unnecessary attribute

* ISearchInterceptor interface

* docs

* Clean up internal docs

* jest

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-13 11:28:39 +03:00
Caroline Horn 5b64a4cdfe
Empty index patterns page re-design (#68819)
Empty index patterns page re-design
2020-08-12 15:58:16 -05:00
Kaarina Tungseth 8f54198434
[DOCS] Canvas docs 7.9 refresh (#74000)
* [DOCS] Canvas docs refresh

* Reformatting

* Image descriptions

* Adds workpad redirect

* Link fix pt 2

* Link fix part 3

* Link fix part 4

* Comments from Poff

* Corrected file name

* Review comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-12 11:13:04 -05:00
Liza Katz 506e9537bf
[Search] Server strategy example (#71679)
* Server strategy example

* Add tsconfig
Renamed is_partial to isPartial
Added isPartial and isRunning to OSS response type

* Docs + remove unused sample code

* Fix test naming of arguments

* ts

* ts fix

* Add filters and query input selector

* Update examples/search_examples/public/components/app.tsx

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Use new service

* exapmle plugin ts

* unsubscribe + use timefilter

* typo

* docs

* Add comments and use agg config

* Added agg configs
Added field selector
Added a custom input param

* Adding getEsQuery to query service (??)

* Add server side example

* docs

* caps

* list plugin in examples page

* fix typo

* Update examples/search_examples/public/application.tsx

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Update examples/search_examples/public/application.tsx

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Update examples/search_examples/public/components/app.tsx

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Update examples/search_examples/public/components/app.tsx

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Update examples/search_examples/public/components/app.tsx

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* eslint

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 23:28:43 +03:00
Stratoula Kalafateli 7b5df7ce3b
Timelion deprecation doc (#74508)
* timelion deprecation doc wip

* Create Timelion Deprecation section to Visualize

* Code review changes

* minor changes

* Make some changes in order to give priotization on how to replace an existing timelion worksheet to a dashboard

* Syntax related improvements

* Final touch

* Remove extra lines and some minor changes
2020-08-11 20:22:46 +03:00
Luke Elmers d84777f053
[data.search.SearchSource] Move some SearchSource dependencies to the server. (#74607) 2020-08-11 09:53:42 -06:00
Matthew Kime 6c63b0d40b
Index pattern field list - transition away from extending array - introduce and use getAll() (#74718)
- Introduce `indexPattern.fields.getAll()` and use where possible
- Rename `index_patterns/fields/fields.mocks.ts.ts => index_patterns/fields/fields.mocks.ts`
- FieldSpec - make `count` and `scripted` fields optional
- use `indexPattern.fields.getByName` instead of filter where possible
2020-08-11 07:54:58 -05:00
Matthew Kime cccf15a3f4
Index pattern field class refactor (#73180)
- Better distinction and relationship between IndexPatternField and its spec
- IndexPatternField class is no longer defined via object mutation
- Reduction of dependencies
- UI code moved into Index Pattern class (will be removed in next ticket)
- IndexPattern field list was previously composed of IndexPatternFields or specs, now only IndexPatternFields
- IndexPattern field list was previously redefined when loading fields, now only its contents are replaced.
2020-08-10 07:35:12 -05:00
spalger ad8502c8d9 update code-exploration docs 2020-08-10 01:25:29 -07:00
Lisa Cawley 0600f000be
[DOCS] Add Kibana privileges to glossary (#74410) 2020-08-06 08:58:06 -07:00
Anton Dosov 3064c6eceb
Improve state sync error handling (#74264)
Fixes #71461 regression since 7.7

New state syncing utils didn't properly handle errors,
Errors happening during URL parsing or writing wasn't handled, so state syncing could stop or in worth case blow out. (see #71461)

There are not much scenarios where missing proper error handling could really impact users, except the one described in #71461:

Kibana users state:storeInSessionStorage
Users often intuitively share hashed dashboard urls directly
When someone opens those urls - there is a blank screen with warning
In 7.6 - dashboard would still load with default state.
Since 7.7 these still could be achieved by removing query params for URL, but it is not obvious for regular users.

This PR makes sure that behaviour is similar to one we had before 7.7.


Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-06 15:34:32 +02:00
Vadim Dalecky bbfc4922d2
Disable in-chart "Explore underlying data" by default (#74332)
* fix: 🐛 disable in-chart "Explore underlying data" by default

* test: 💍 disable in-chart action functional test suite

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-06 15:07:14 +02:00
Lisa Cawley 4b3326d6fb
[DOCS] Add Kibana alerts to Stack Monitoring (#73762)
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2020-08-05 15:08:38 -07:00
Mikhail Shustov 88c0631344
Update @typescript-eslint to ensure compatibility with TypeScript v3.9 (#74091)
* bump @typescript-eslint deps

* update rules

* fix errors in pacakges

* fix src/

* fix x-pack

* fix test

* fix typings

* fix examples

* allow _ as prefix and suffix

* roll back prefix and suffix changes

* add eslint-plugin-eslint-comments

* report unused rules

* remove unused eslint comments from tests

* remove unused eslint comments 2nd pass

* remove unused eslint comments from src/

* remove unused comments in x-pack

* use no-script-url and no-unsanitized/property for ts files

* remove unused eslint comments

* eui/href-or-on-click removed when not complained

* no import/* rules for ts files

* cleanup

* remove the unused eslint-disable

* rollback unnecessary changes

* allow underscore prefix & sufix in type name

* update docs

* fix type error in enterprise search plugin mocks

* rename platform hack __coreProvider --> _coreProvider

* rollback space removal in src/core/public/legacy/legacy_service.test.ts

* fix naming convention in APM
2020-08-05 17:32:19 +02:00
Mikhail Shustov 8759646576
update docs (#74364) 2020-08-05 15:28:03 +02:00
EamonnTP f97641c84a
[DOCS] Add Observability topic (#73041)
* Add observability content

* Remove xpack from file name

* Updates following review

* Review edits

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-05 09:28:20 +01:00
Lukas Olson 584804047a
[Search] Send ID in path, rather than body (#62889)
* [Search] Send ID in path, rather than body

* Fix typo in merge

* Update docs

* Revert to using POST instead of GET

* Revert accidental change

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-03 15:13:27 -07:00
debadair 60494255e8
[DOCS] Remove the ILM tutorial, which is now in the ES Ref (#73580) 2020-08-03 14:29:47 -07:00
Lukas Olson 4758cb1b4d
[Search] Fix telemetry collection to not send extra requests (#73382)
* [Search] Fix telemetry collection to not send extra requests

* Update tracker to collect duration from ES response

* Fix type check

* Update docs and types

* Fix typescript

Co-authored-by: Liza K <liza.katz@elastic.co>
2020-08-03 12:17:38 -07:00
Brandon Morelli 17e8d18a40
[APM] docs: Update machine learning integration (#73597) 2020-07-31 12:03:09 -07:00
Josh Dover 10cc600d5c
Fix aborted$ event and add completed$ event to KibanaRequest (#73898) 2020-07-31 09:19:43 -06:00
Lisa Cawley 83fab293bc
[DOCS] Fixes typo in Alerting actions (#73756) 2020-07-30 13:20:07 -07:00
Mikhail Shustov 585d58c202
[KP] Expose new es client (#73651)
* mark legacy ES client types as deprecated

* expose es client to plugins and update mocks

* ElasticSearchClientMock --> ElasticsearchClientMock

* expose es client mocks

* expose es client via RequestHandlerContext

* convert test/plugin_functional/config into ts

* convert top_nav test into ts

* add an integration test for the es client

* update comments to refer to the new es client

* fix import paths. do not use extensions

temp

* update docs

* fix other refs

* add test for a custom client

* fix context

* add test for scoped client

* update docs
2020-07-30 19:12:37 +02:00
Alexey Antonov 774c4f46fc
[Vega][Inspect panel] Write tutorials and reference (#73262)
* [Vega][Inspect panel] Write tutorials and reference

* update screens

* Update docs/visualize/vega.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/visualize/vega.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/visualize/vega.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/visualize/vega.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/visualize/vega.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/visualize/vega.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/visualize/vega.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/visualize/vega.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/visualize/vega.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/visualize/vega.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/visualize/vega.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/visualize/vega.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/visualize/vega.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/visualize/vega.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/visualize/vega.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
2020-07-30 11:19:26 +03:00
Lisa Cawley 30f469c59b
[DOCS] Changes level offset of monitoring pages (#73573) 2020-07-29 13:03:35 -07:00
Brandon Morelli b4aa750957
[APM] docs: remove watcher documentation (#73485) 2020-07-29 10:01:21 -07:00
Kaarina Tungseth 71badc67de
[DOCS] [Lens] 7.9 docs refresh (#72301)
* [DOCS] Lens refresh for 7.9

* Clean up

* Review comments from Wylie
2020-07-29 10:40:53 -05:00
Liza Katz 14144156f6
[Data] Query Input String manager (#72093)
* improve test stability

* query string input manager (needed for search demo)

* docs

* dashboard

* Fix jest

* mock fix

* Allow restoring a saved query

* sync url

* Luke's fix to test

* cleanup

* lens jest tests

* docs

* use queryStringManager.getDefaultQuery
Don't sync query to global state

* Update app.test.tsx

lens mock

* jest fix

* jest

* use new api in the example

* Rename state param to query to match url state

* Apply changes to discover

* Update src/plugins/data/public/query/query_string/index.ts

Co-authored-by: Anton Dosov <dosantappdev@gmail.com>

* Improve query string state manager

* Cleanup dashboard code

* Handle refresh button

* Set initial dashboard state

* visualize state

* remove unused

* docs

* fix example

* fix jest

* fix filter app state in discover

* fix maps test

* jest

Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
Co-authored-by: Anton Dosov <dosantappdev@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-29 10:48:23 +03:00
Jonathan Budzenski 7059270ce9
[deb/rpm] fix config folder path (#73001)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-07-28 20:09:04 -07:00
Frank Hassanabad b399fb03d1
[SIEM][Detection Engine][Lists] Adds the ability to change the timeout limits from 10 seconds for loads for imports (#73103)
## Summary

By default the upload time limit for payloads is 10 seconds. This is really too short and we were getting internal QA bug reports that uploads are timing out on large value list importing. This PR adds the plumbing and unit tests to make the timeout configurable for routes.

* Adds a single timeout option for routes and then normalizes that through Hapi for the socket, payload, and server timeouts.
* Adds unit tests which test the various options
* Adds integration tests which test the various options
* Adds some NOTES about where there are odd behaviors/bugs within Hapi around validations and the timeouts
* Adds a configurable 5 minute timeout to the large value lists route

**Manual testing of the feature**

You can manually test this by adding a configurable option to your chrome network throttle like so below where you throttle upload by some configurable amount. I chose to use 300 kbs/s upload
<img width="556" alt="Screen Shot 2020-07-23 at 11 26 01 AM" src="https://user-images.githubusercontent.com/1151048/88318015-5ab3f700-ccd7-11ea-9d9b-7e3649ec65de.png">

And then run an import of large value lists using a large enough file that it will exceed 5 minutes:
![screen-shot-upload](https://user-images.githubusercontent.com/1151048/88318584-28ef6000-ccd8-11ea-90a1-8ca4aafabcb4.png)

After 5 minutes you should see this message within your server side messages if you have configured your kibana.dev.yml to allow for these messages:

```ts
server  respons [10:52:31.377] [access:lists-all] POST /api/lists/items/_import?type=keyword 408 318292ms - 9.0B
``` 

Note that it should show you that it is trying to return a `408` after `318292ms` the timeout period. Sometimes you will get the 408 in the browser and sometimes the browser actually will not respect the 408 and continue staying in a pending state forever. This seems to be browser side issue and not a client/user land issue. If you get the browser message it will be this error toaster

![timeout-message](https://user-images.githubusercontent.com/1151048/88318760-74a20980-ccd8-11ea-9b7b-0d27f8eb6bce.png)

### Checklist

- [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)
- [x] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials
- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios

### For maintainers

- [x] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
2020-07-28 17:47:41 -06:00
Mikhail Shustov 4ede075681
[KP] fix doc generation for platform code (#73407)
* fix doc generation for platform code

* terminate process if type build failed

* update types
2020-07-28 16:51:23 +02:00
Toby Sutor 56609049cb
32 characters requirement for xpack.reporting.encryptionKey (#72594)
Similar to https://github.com/elastic/kibana/pull/72593 document that the string needs to be at least 32 characters long.
2020-07-28 09:35:08 -05:00
Toby Sutor f87d97b629
32 characters requirement for xpack.reporting.encryptionKey (#72593)
Similar to https://www.elastic.co/guide/en/kibana/current/alert-action-settings-kb.html#general-alert-action-settings is a 32 character minimum length required for xpack.reporting.encryptionKey
2020-07-28 09:35:00 -05:00
Anton Dosov abfda1f792
Use "Apply_filter_trigger" in dashboard drilldown (#71468)
* attach dashboard drilldown to apply filter trigger

* fix types

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 09:57:04 +02:00
Jonathan Buttner 867a672c7a
[Security Solution] Use docker for endpoint tests (#73092)
* Copying api integration tests into their own directory

* Removing api integration tests and using ingest docker image

* Fixing typo

* Fixing type errors and empty string and reenabling tests

* Rebuilding docs

* Renaming url override variable

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-27 14:13:50 -04:00