Commit graph

39646 commits

Author SHA1 Message Date
Tiago Costa 9139ab15fd
chore(NA): remove mocha junit ci integrations (#88129)
* chore(NA): remove mocha junit ci integrations

* chore(NA): remove mocha script from xpack

* chore(NA): single rule exclusion on eslint config for mocha

* chore(NA): remove unused custom mocha integration code from kbn/test

* chore(NA): rewording packages readme

* docs(NA): remoe mocha mention from development-unit-tests
2021-01-15 21:17:25 +00:00
Oliver Gupte bb70c6a82a
[APM] Only display relevant sections for rum agent in service overview (#88410)
* [APM] Only display relevent sections for rum agent in service overview (#85546)

* call `isRumAgentName` once

* User experience callout links to the selected service
2021-01-15 12:41:16 -08:00
Constance 5b38816a97
[Enterprise Search] Automatically mock shared logic files (#88494)
* Update shared logic mocks to automatically mock their exports

* Update FlashMessages to also mock its helper fns

* Fix tests that were relying on component exports from shared logic files

* Fix broken flash_messages tests

- Caused by leaking auto mocks - work around this by importing from files directly and not from index.ts

- Also clean up / use new auto mocks (e.g. for kibana)

- Convert old instances of useValues mock to setMockValues

* [AS] Update AnalyticsLogic test to use new auto mockers

+ move LogicMounter and destructured mock values to top of describe block

* [AS] Update CredentialsLogic

+ udpate to use new clearFlashMessages helper

* [AS] Update documents logic tests

* [AS] Update engines logic tests

* [AS] Update log retention logic test

* [Shared] Update IndexingStatus tests

+ update to use LogicMounter

* [Shared] Update telemetry logic test

* [WS] Update AddSourceLogic

+ update to use new clearFlashMessages helper

* [WS] Update groups logic files

+ update to use new flash message helpers

* [WS] Update OverviewLogic test

* [WS] Update AddSource component test

+ consolidate mocks imports

* [Shared] Clean up KibanaLogic imports

- all jest.mocks come along from the ride when the __mocks__ folder is imported, so HttpLogic is now automatically already mocked

* [AS] Update EngineRouter test
2021-01-15 12:39:26 -08:00
Cauê Marcondes b9106282ec
[APM] Disable Create custom link button on Transaction details page for read-only users 2021-01-15 21:01:53 +01:00
Nathan Reese 039b2ff052
[Docs] clean-up vega map reference documenation (#88487)
* [Docs] clean-up vega map reference documenation

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-01-15 12:45:51 -07:00
Patryk Kopyciński 208c76889d
[Security Solution] Fix Timeline event details layout (#88377) 2021-01-15 20:00:32 +01:00
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
Devon Thomson 7845e61438
fix copy (#88481) 2021-01-15 12:55:45 -05: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
Uladzislau Lasitsa 5fd0027ba2
use the same defaults as Lens (#87991)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-15 16:45:26 +03: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
Søren Louv-Jansen 701bd0998d
Bump backport to 5.6.4 (#88428) 2021-01-15 13:39:31 +01: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
Alexey Antonov bc0368f44a
Vega Maps Referencing from kibana.yml (#88316)
* Vega Maps Referencing from kibana.yml

Closes: #87853

* update translations

* fix PR comments
2021-01-15 12:10:56 +03: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
Tim Roes f2699f9505
[Discover] Add icon for nested fields in sidebar (#85147)
* [WIP] nested field icon

* only import type

* use named lodash import
2021-01-15 09:16:05 +01:00
Matthias Wilhelm 82c30a3d03
[Discover] Deangularize uiCapabilities (#88057) 2021-01-15 09:01:17 +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
Yuliia Naumenko 26e3851aa5
Added missing configuration options for the alerting related plugins to the kibana-docker. (#88297)
* Added missing configuration options for the alerting related plugins to the kibana-docker

* added missing option for alerts

* extended PR template checklist with changes in configureation keys

* fixed text due to comments
2021-01-14 13:55:36 -08: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
Tiago Costa be1eb4cca8
chore(NA): assure puppeteer_skip_chromium_download is applied across every yarn install situation (#88346) 2021-01-14 18:00:23 +00: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