Commit graph

13585 commits

Author SHA1 Message Date
Frank Hassanabad 2e28683c12
Change DELETE to POST for _bulk_delete to avoid incompatibility issues (#87914)
## Summary

Changes `DELETE` to `POST` for _bulk_delete on the client only for a variety of reasons.

According to the RFC, not all servers and proxies need to honor DELETE having a body. From: https://tools.ietf.org/html/rfc7231

```
A payload within a DELETE request message has no defined semantics;
sending a payload body on a DELETE request might cause some existing
implementations to reject the request.
```

Within at least one proxy, h2o2, we have found that it does indeed change request headers which will cause NodeJS to not attach the body of a `DELETE`:
https://github.com/hapijs/h2o2/issues/124

Also from other communities such as OpenAPI where they debated this, they allow it but discourage it for reasons outlined there that I will not repeat here:
https://github.com/OAI/OpenAPI-Specification/pull/1937

Elastic Search API's and other Kibana API's use `POST` rather than `DELETE` for their bodies that are attached to `DELETE`:
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html

We still support bodies in `DELETE` and `POST` but are just changing the web client to utilize `POST` moving forward.


### Checklist

Reviewed and we already have unit tests and end to end tests for these use cases so we are good with just updating them. 

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
2021-01-15 11:45:04 -07:00
Chris Roberson 68288ebfdb
[Monitoring] Change cloud messaging on no data page (#88375)
* WIP

* Update tests

* Update copy

* Fix translations and update copy

* Fix tests and update copy
2021-01-15 13:43:27 -05:00
Dominique Clarke 73cd1a088c
[Uptime] clear ping state when PingList component in unmounted (#88321)
* clear ping state when PingList component in unmounted

* update ping list content

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-15 13:37:30 -05:00
Søren Louv-Jansen 9eb993aaef
[APM] Consistent terminology for latency and throughput (#88452)
Co-authored-by: Casper Hübertz <casper@formgeist.com>
2021-01-15 19:33:38 +01:00
Jonathan Budzenski 51ba94d3e5
[dev] Replace sass-lint with stylelint (#86177)
Co-authored-by: Tyler Smalley <tylersmalley@me.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dave Snider <dave.snider@gmail.com>
2021-01-15 11:52:29 -06:00
Constance d2de5d0383
[Enterprise Search] Small test helper for expected async errors (#88422)
* Add small helper to reduce boilerplate on async tests expected to throw

- Also hopefully a bit more descriptive on what's happening

* Update all test files using the previous try/catch do nothing blocks to use new helper
2021-01-15 09:26:07 -08:00
Pete Harverson c0a833d8ea
[ML] Adds a11y tests for ML plugin (#88323)
* [ML] Adds a11y tests for ML plugin

* [ML] Edits to a11y tests following review
2021-01-15 16:59:31 +00:00
Robert Oskamp b36273693a
Functional tests - stabilize reporting API network policy test for cloud (#88456)
This PR fixes a reporting API network policy test failure that occurred during cloud execution.
2021-01-15 17:58:33 +01:00
Jason Stoltzfus 329a5a3f21
[App Search] Add configurable Filter and Sort modal to Documents View (#88066) 2021-01-15 11:45:24 -05:00
Cauê Marcondes e2fc156bc5
[APM] Extracting custom link flaky test. (#88455)
* extracting the flaky test to another file

* extracting the flaky test to another file
2021-01-15 17:03:56 +01:00
Justin Kambic fc370b74eb
[Uptime] Unskip "Observer location" test block (#87571)
* Unskip "Observer location" test block.

* Commit temp "describe.only" to make flaky test runner go faster.

* Add optional chain for some potentially-null props.

* Make overview filters type partial.

* Repair broken types.

* Remove \`only\` call from test.
2021-01-15 10:25:06 -05:00
Maja Grubic 9b22789c3c
[Discover] Use fields API to retrieve fields (#83891)
* Add search source to example plugin.

* Add uiSetting for fields API.

* Update SearchSource to support fields API.

* [PoC] reading from the fields API in Discover

* Add N fields as a default column

* Make fields column non-removeable

* Do not add 'fields' to state

* Remove fields from app state and read from source when needed

* Remove fields column if a new column is added

* Add search source to example plugin.

* Add uiSetting for fields API.

* Update SearchSource to support fields API.

* Improve error handling in search examples plugin.

* Add unit tests for legacy behavior.

* Remove uiSettings feature flag; add fieldsFromSource config.

* Rewrite flatten() based on final API design.

* Update example app based on final API design.

* Update maps app to use legacy fieldsFromSource.

* Update Discover to use legacy fieldsFromSource.

* Rename source filters to field filters.

* Address feedback.

* Update generated docs.

* Update maps functional test.

* Formatting fields column similar to _source

* Moving logic for using search API to updating search source

* Fix small merge error

* Move useSource switch to Discover section of advanced settings

* Do not use fields and source at the same time

* Remove unmapped fields switch

* Add basic support for grouping multifields

* Remove output.txt

* Fix some merge leftovers

* Fix some merge leftovers

* Fix merge errors

* Fix typescript errors and update nested fields logic

* Add a unit test

* Fixing field formats

* Fix multifield selection logic

* Request all fields from source

* Fix eslint

* Fix default columns when switching between _source and fields

* More unit tests

* Update API changes

* Add unit test for discover field details footer

* Remove unused file

* Remove fields formatting from index pattern

* Remove unnecessary check

* Addressing design comments

* Fixing fields column display and renaming it to Document

* Adding more unit tests

* Adding a missing check for useNewFieldsAPI; minor fixes

* Fixing typescript error

* Remove unnecessary console statement

* Add missing prop

* Fixing import order

* Adding functional test to test fields API

* [Functional test] Clean up in after

* Fixing context app

* Addressing PR comments

* Updating failed snapshot

* Addressing PR comments

* Fixing i18n translations, updating type

* Addressing PR comments

* Updating a functional test

* Add a separate functional test for fields API

* Read fields from source in a functional test

* Skip buggy test

* Use default behavior in functional tests

* Fixing remaining failing tests

* Fixing date-nanos test

* Updating FLS test

* Fixing yet another functional test

* Skipping non-relevant tests

* Fixing more tests

* Update stub import in test

* Fix import

* Fix invalid import

Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-15 14:47:35 +00:00
Nathan L Smith 31a481a9dd
Remove dependency between alerts and infra (#88342)
The alerts plugin was importing `JsonObject` from the infra plugin. The infra plugin imported `JsonObject`, `JsonValue`, and `JsonArray` from kibanaUtils and then re-exported them.

Remove the re-export from the infra plugin and instead always import these types from kibanaUtils.
2021-01-15 08:44:28 -06:00
John Schulz 11d4457d97
Don't retry if icon isn't in initial response (#88403) 2021-01-15 09:33:19 -05:00
Aleh Zasypkin 1bd4086032
Move Spaces, Security and EncryptedSavedObjects plugins to separate TS projects (#88365) 2021-01-15 14:55:53 +01:00
Mike Côté a0b787c39a
Fix flaky test for legacy authorization (#87642)
* Unskip test

* Increase attempts to 2 for retryIfConflicts

* Cleanup authorization for updateApiKey
2021-01-15 08:13:15 -05:00
James Gowdy 686ece9aea
[ML] Improving existing job check in anomaly detection wizard (#87674)
* [ML] Improving existing job check in anomaly detection wizard

* fixing job id validation

* allow group ids to be reused

* updating module exists endpoint

* fixing issuse with job without group list

* fixing test and translation ids

* fixing validator when model plot is disabled

* changes based on review

* adding group id check to edit job flyout

* small refactor and fixing edit job issue

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-15 12:57:41 +00:00
Jean-Louis Leysens 3dcb98ec67
[ILM] Absolute to relative time conversion (#87822)
* cleaning up unused types and legacy logic

* added new relative age logic with unit tests

* export the calculate relative timing function that returns millisecond values

* added exports to index.ts file

* copy update and test update

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-15 13:32:16 +01:00
Aleh Zasypkin abfd8bb9d3
Use documentation links service provided by the core directly. (#88158) 2021-01-15 13:31:51 +01:00
MadameSheema 91a23b7df0
[Security Solution] Fixes and unskips cypress tests (#87972)
* waits for the timeline modal before doing validations

* unskips search bar test

* unskips URL compatibility tests

* unksips attach timeline to a case tests

* unksips sourcerer test

* unskips pagination

* unskips inspect tests

* unskips fields browsers tests

* unskips toogle column in timeline tests

* unskips persistent timeline test

* removes comment

* fixes drag and drop test

* fixes adds a field to the timeline when the user drags and drops a field test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-15 12:27:38 +01:00
James Gowdy df8f9c6f34
[ML] Fixing cloning of anomaly detection job with sparse data (#88322)
* [ML] Fixing cloming of anomaly detection job with sparse data

* removing from population wizard
2021-01-15 09:47:39 +00:00
Aleh Zasypkin 951aa66fe4
Expose AnonymousAccess service through Security OSS plugin. (#87091) 2021-01-15 10:18:58 +01:00
Cauê Marcondes 6beef61f93
[APM] Add license check for significant terms (#88209)
* only shows significant terms under platinum license

* addressing PR comments

* addressing PR comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-15 09:48:57 +01:00
Dario Gieselaar a0da8bda04
[APM] Optimize anomaly data loading strategy (#87522)
* [APM] Optimize anomaly data loading strategy

Closes #86423.

* Fix tests/types

* Review feedback

* Optimize ML calls for latency chart

* Optimize ML loading for latency chart

* Remove unused optimization

* Update snapshots for E2E tests

* Make sure area is stacked in correct order

* Review feedback + log warning if more than one ML job was found

* Review feedback
2021-01-15 09:35:41 +01:00
Scotty Bollinger 86218a46af
[Workplace Search] Remove user icon from source details (#88218)
* [Workplace Search] Remove user icon from source details

Removes user icons from source details group list, since the users don't exist in Kibana.

* Refactor to remove entire GroupAvatars component

* Remove unused interface

* Remove flex group

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-14 21:04:08 -06:00
Constance ca42e9a59f
[App Search] New log retention components + major i18n refactors (#88237)
* Add remaining log retention components

- Will shortly be used by Analytics view

* [i18n] Change log retention date from moment to react-intl FormattedDate

- this correctly localizes the dates when Kibana is in different languages, e.g. zh-CN, ja-JP

* Refactor log_retention/messaging

- Convert to all JSX/React vs plain strings (makes it easier to deal with FormattedDate/FormattedMessages)

- Consolidate to single component that takes various log types (e.g. analytics, api)

- This is important for adding future switches & toggles - there is *significantly* less complex strings to localize this way (2 short strings vs 5+ long sentences)

* Update existing instances to use new LogRetentionMessage

* Update translation strings
- to account for new i18n logs type values & IDs

* Attempt to fix test timezone shenanigans

* [PR feedback] Types

* [PR feedback] i18n pluralization

* Update LogRetentionTooltip and LogRetentionCallout to manage fetching log retention

+ change ILM to LogRetention per PR feedback

* Update LogRetentionLogic to prevent duplicate fetches

- e.g. if both LogRetentionTooltip and LogRetentionCallout are on the same page (which they will be)
2021-01-14 16:01:24 -08:00
Nathan L Smith 0325014b66
Fix links to upgrade assistant (#88393)
We had fixed the link in the header menu a while back, but there were a couple other places where the link had not beed updated.

Replace `KibanaLink` component with a function to get the href for the upgrade assistant and use that everywhere.

Fixes #87647.
2021-01-14 17:36:28 -06:00
Liza Katz d4c31ff096
[Search Sessions] Replace search session constants with kibana.yml configs (#88023)
* Replace search session constants with kibana.yml configs

* fix test

* jest

* rename feature flag

* @lukasolson code review

* Code review - config retreival

* jest fix
2021-01-15 01:14:02 +02:00
Jen Huang d8678ded03
[Fleet] Prevent long names from breaking agent details page (#88383)
* Fix long policy name breaking agent details page

* Fix long agent host name breaking agent details page
2021-01-14 13:39:05 -08:00
Oliver Gupte bc50f66657
[APM] Fixes mixed units in service overview latencies (#88277)
* Closes #87726. Uses ms as the unit for latencies in service overview.

* removes optional chaining in those cases where it is not needed

* updates test snapshot with correct value

* Revert "updates test snapshot with correct value"

This reverts commit 9a1bdd7b44.

* update param name from time -> value

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-14 13:19:26 -08:00
Constance 53efccbc3b
[App Search] Analytics - initial logic file & server API routes (#88250)
* Set up server API routes

* Set up very basic AnalyticsLogic file

- mostly just contains API call & basic loading/error state for now - actual usable vars will be defined in a future PR

* [PR feedback] Unnecessary exports

* [PR feedback] Clean up analyticsAvailable reducer

* [PR feedback] Types order

* [PR feedback] Unnecessary API validation
2021-01-14 13:15:39 -08:00
Oliver Gupte e4293a85fc
[APM] Fixes incorrect throughput tpm values in service overview (#88273)
* Closes #88268. Divides the throughput count of the selected range by deltaAsMinutes

* update old test snapshot

* update values in test snapshot

* update values in test snapshot

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-14 11:47:15 -08:00
Mike Côté a77f0a63c3
Change some UI copy to reflect guidelines and feedback (#88215)
* Change some labels to reflect copy feedback

* Fix test failures
2021-01-14 14:13:03 -05:00
Anton Dosov f33225d34d
Fix "data-title" attribute in map embeddable (#88337) 2021-01-14 18:46:47 +01:00
Larry Gregory d080128cde
Allow custom index privileges for role management (#88076)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-14 12:17:00 -05:00
Sonja Krause-Harder d37852a343
[EPM] Install Lens assets from packages if present. (#88189)
* Install Lens assets from packages if present.

* Add integration tests for Lens assets.
2021-01-14 18:01:00 +01:00
Liza Katz 20bf774d10
[Search] Add cancel function to pollSearch (#85787)
* Add cancel functionality to pollSearch
Makes sure that DELETE requests are properly sent even if consumer unsubscribes.

* Update poll_search.test.ts

* cancel on abort

* fix jest

* ADded jest test

* Cancel to be called once

* Only cancel internally on abort

* ts + addd defer

* ts

* make cancel code prettier

* Cancel even after unsubscribe

* Throw abort error if already aborted

* Only delete once

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
2021-01-14 09:36:39 -07:00
Paul Tavares 9f578445db
[Security Solution][Endpoint] Fix server start to ensure it does not prevent Kibana from starting if optional plugin dependencies are not available (#88291)
* Ensure that services that depend on fleet are only initialized if fleet dependency is available
* rename "Ingest manager" to "Fleet" in UI strings/code comments
2021-01-14 11:19:29 -05:00
MadameSheema b7516ce034
[Security Solution] Fixes rules persistency problem (#88198)
* deletes existing rules

* fixes threshold rule test

* unskips ml rule test

* improves rule deletion

* unskips and fixes rules tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-14 16:58:27 +01:00
Nicolas Chaulet 2bde8aa5fb
[Fleet]Fix updaing package policy without input (#88326) 2021-01-14 11:54:41 -04:00
Joe Portner a62d6939bd
Fixes incomplete client cert chain when using PKI authentication with the login selector (#88229) 2021-01-14 09:15:41 -05:00
Alison Goryachev 8678954122
[Watcher] Update skipped jest tests (#88225) 2021-01-14 09:00:18 -05:00
John Schulz ca87bc495d
Fix broken icon key for Maps (#88093)
## PR Summary
Show [`emsApp` icon from EUI](https://eui.elastic.co/#/display/icons#apps) if integration includes map assets.

<img width="229" alt="Screen Shot 2021-01-12 at 3 14 14 PM" src="https://user-images.githubusercontent.com/57655/104367878-65628280-54e9-11eb-8d9c-fa838e2c15ae.png">

Looking at https://github.com/elastic/kibana/pull/62059#discussion_r401211966, I believe it landed with the incorrect key at a time when that part of the page wasn't visible. When we enabled that section, we likely didn't notice the missing key since most integrations don't have Maps assets

## Bug: `master` doesn't have an icon for Map assets
 1. Visit an integration with map assets, like AWS http://localhost:5601/app/fleet#/integrations/detail/aws-0.3.16
 2. Observe missing icon for Map in right column summary & HTTP request for `/app/mapApp`
    <img width="1013" alt="Screen Shot 2021-01-12 at 3 10 44 PM" src="https://user-images.githubusercontent.com/57655/104367875-64c9ec00-54e9-11eb-81d8-982bec862f5f.png">

## This PR adds one
 1. Visit an integration with map assets, like AWS http://localhost:5601/app/fleet#/integrations/detail/aws-0.3.16
 2. Observe EMS icon is present in right column summary
    <img width="1087" alt="Screen Shot 2021-01-12 at 3 11 39 PM" src="https://user-images.githubusercontent.com/57655/104367877-65628280-54e9-11eb-91da-578fec6ff769.png">
2021-01-14 08:53:16 -05:00
Gil Raphaelli c7b963e6fc
Add agent logos (#88128) 2021-01-14 08:06:24 -05:00
Shahzad c2fc58310a
[Uptime] simple monitor status alert fix for page duty and other connectors (#87460)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-14 12:00:56 +01:00
Shahzad 6ec868b54e
[Uptime] keep filters state between tabs (#87997)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-14 11:51:01 +01:00
Cauê Marcondes 75891b78ea
[APM] Blank page when selecting a future time range (#87298)
* fixing blank page

* fixing blank page

* addressing PR comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-14 09:55:16 +01:00
spalger 850242cd42 skip suites failing es promotion (#88302) 2021-01-13 22:03:44 -07:00
Andrew Wilkins 0eb5c7bf0e
[Fleet] add "traces" type to data stream list (#87985)
Update the index pattern uysed for populating
the list of data streams to include traces-*-*.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-14 09:29:31 +08:00
Mikhail Shustov bc06280451
[DX] SavedObjectsManagement to TS project (#88240)
* som to ts project

* global_search_providers to ts projecvt
2021-01-13 22:23:06 +01:00