Commit graph

13873 commits

Author SHA1 Message Date
Aleh Zasypkin c7267b63df
Reject authentication requests if license is not available. (#88850) 2021-01-21 07:59:00 +01:00
spalger d28fa36e8a skip flaky suite (#88928) 2021-01-20 21:01:57 -07:00
spalger 97c7f5c8a1 skip flaky suite (#88926) (#88927) (#88929) 2021-01-20 20:51:18 -07:00
Scotty Bollinger 8008261060
[Workplace Search] Add tests for Custom Source Schema (#88785)
* Add tests for Schema components

* Convert components to use clearFlashMessages helper

* Remove unused action types

These aren’t actually used anymore

* Fix type

This is actually a string from the server

* Move mock to shared mocks

* Add tests for logic file

* Fix App Search tests

Server actually sends back a string for `activeReindexJobId`

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-20 21:15:47 -06:00
Nicolas Chaulet 3b728b73cf
[Fleet] Use fleet server indices for enrollment keys and to list agents with a feature flag (#86179) 2021-01-20 19:29:04 -05:00
Joe Portner 25f16db4d9
Sharing saved objects, phase 2 (#80945) 2021-01-20 17:39:21 -05:00
Nathan Reese da8abdaf75
[Maps] fix tags changed in Maps Save dialog don't refresh until the map is reopened (#88849)
* [Maps] fix tags changed in Maps Save dialog don't refresh until the map is reopened

* only set tags if newTags are provided
2021-01-20 14:29:47 -07:00
Dominique Clarke 954c887006
[Uptime] waterfall add fallback support for uncommon mime types (#88691)
* uptime waterfall add fallback support for uncommon mime types

* update data_formatting test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-20 15:25:45 -05:00
Jason Stoltzfus 15f05b51ff
[App Search] Wired up configurable Sort and Facets in Documents View (#88764) 2021-01-20 14:57:37 -05:00
Constance f4f6cb687c
[App Search] Add new encodePathParams helper (fixes unencoded document IDs) (#88648)
* Add encodePathParams helper to EnterpriseSearchRequestHandler

This helper accomplishes two things:

- Fixes 404s from the Enterprise Search server for user-generated IDs with special characters (e.g. ? char)

- Allows us to simplify some of our createRequest calls - no longer will we have to grab request.params to create paths, this helper will do so for us

* Update AS document route to use new helper

- This was the primary view/API I was testing to fix this bug

* Update remaining AS routes to use new helper

- shorter, saves us a few lines
+ remove unnecessary payload: params that doesn't actually validate params

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-20 11:07:32 -08:00
Yuliia Naumenko 8b1a228c29
[Alerting] Migrate Actions, Alerts, Stack Alerts and TriggersActionsUI plugins to TS project references (#88556)
* [Alerting] Migrate Actions plugin to TS project references

* alerts plugin ts migration

* triggers_actions_ui plugin ts migration

* fixed build

* fixed build
2021-01-20 10:53:01 -08:00
Chris Roberson c9002a25c5
[Monitoring] Convert Elasticsearch-related server files that read from _source to typescript (#88212)
* A good chunk of server-side ES changes

* CCR files

* More areas where we just pass down the source to the client

* Some more

* Fix tests

* Fix tests and types
2021-01-20 13:43:53 -05:00
Nathan Reese f0f192c654
[Maps] fix Maps should display better error message instead of EsError when there is no data for tracks data source (#88847) 2021-01-20 11:25:48 -07:00
Pierre Gayvallet edb338a8ad
Add SO import hook / warnings API (#87996)
* initial commit

* adapt client-side signatures

* more type fixes

* adapt api IT asserts

* fix some unit tests

* fix more test usages

* fix integration tests

* fix FT test assertions

* fix FT test assertions

* add FTR API integ test suite

* create the plugin_api_integration test suite

* adapt and fix flyout tests

* update documentation

* update generated doc

* add unit tests for `executeImportHooks`

* wire resolve_import_errors and add unit tests

* move hooks registration to SO type API

* update generated doc

* design integration

* update generated doc

* Add FTR tests for import warnings

* deletes plugins api integ tests

* self review

* move onImport to management definition

* update license header

* rename actionUrl to actionPath
2021-01-20 19:25:32 +01:00
Gidi Meir Morris e21defa448
[Task Manager] Reject invalid Timeout values in Task Type Definitions (#88602)
This PR adds the following:
1. We now validate the interval passed to `timeout` when a task type definition is registered.
2. replaces usage of `Joi` with `schema-type`
2021-01-20 17:23:02 +00:00
Gidi Meir Morris 4878554cc9
[Task Manager] cancel expired tasks as part of the available workers check (#88483)
When a task expires it continues to reside in the queue until `TaskPool.cancelExpiredTasks()` is called. We call this in `TaskPool.run()`, but `run` won't get called if there is no capacity, as we gate the poller on `TaskPool.availableWorkers()` and that means that if you have as many expired tasks as you have workers - your poller will continually restart but the queue will remain full and that Task Manager is then in capable of taking on any more work. This is what caused `[Task Poller Monitor]: Observable Monitor: Hung Observable...`
2021-01-20 17:22:16 +00:00
Dan Panzarella fd9697c813
Rename test spec file (#88842) 2021-01-20 12:20:24 -05:00
Quynh Nguyen 27c77adf60
[ML] Redesign file-based Data Visualizer (#87598) 2021-01-20 10:52:03 -06:00
Marco Liberati 86789dabb5
[Lens] Add more in-editor Advanced documentation (#86821)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: Michael Marcialis <michael.marcialis@elastic.co>
2021-01-20 17:49:21 +01:00
Tim Sullivan ef40806805
[Data/Search Sessions] Management UI (#81707)
* logging and error handling in session client routes

* [Data] Background Search Session Management UI

* functional tests

* fix ci

* new functional tests

* fix fn tests

* cleanups

* cleanup

* restore test

* configurable refresh and fetch timeout

* more tests

* feedback items

* take expiresSoon field out of the interface

* move helper to common

* remove bg sessions w/find and delete

* add storybook

* fix tests

* storybook actions

* refactor expiration status calculation

* isViewable as calculated field

* refreshInterval 10s default

* list newest first

* "Type" => "App"

* remove inline view action

* in-progress status tooltip shows expire date

* move date_string to public

* fix tests

* Adds management to tsconfig refs

* removes preemptive script fix

* view action was removed

* rename the feature to Search Sessions

* Update x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/status.tsx

Co-authored-by: Liza Katz <lizka.k@gmail.com>

* Update x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/status.tsx

Co-authored-by: Liza Katz <lizka.k@gmail.com>

* add TODO

* use RedirectAppLinks

* code review and react improvements

* config

* fix test

* Fix merge

* Fix management test

* @Dosant code review

* code review

* Deleteed story

* some more code review stuffs

* fix ts

* Code review and cleanup

* Added functional tests for restoring, reloading and canceling a dashboard
Renamed search session test service

* Don't show expiration time for canceled, expired or errored sessions

* fix jest

* Moved UISession to public

* @tsullivan code review

* Fixed import

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Christiane Heiligers <christiane.heiligers@elastic.co>
Co-authored-by: Liza Katz <lizka.k@gmail.com>
Co-authored-by: Liza K <liza.katz@elastic.co>
2021-01-20 18:32:42 +02:00
Robert Oskamp c702b5cfe8
Skip snapshot_restore API integration tests in cloud (#88841)
This PR disables the snapshot restore API integration tests in cloud.
2021-01-20 17:30:39 +01:00
Shahzad 48cb37945a
[UX] fix impacted page load errors (#88597)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-20 17:24:31 +01:00
Marta Bondyra 0cd8c90a7c
[Lens] (Accessibility) Added button to execute drag and drop to workspace (#85960) 2021-01-20 17:11:37 +01:00
Nathan L Smith 5b315858a3
Instances latency distribution chart (#88546)
* Instances latency distribution chart

Create an instances row component that does the data fetching for the
instances table and the distribution chart. Use the same data for both the chart and the table.

Tooltips and selection are disabled on the chart.

* import fix

* rename ServiceOverviewInstancesRow to ServiceOverviewInstancesChartAndTable

* Updates based on feedback

* remove stuff

* hasdata
2021-01-20 10:07:13 -06:00
Marco Liberati 7297cc3b1d
[Lens] Add a11y test suite (#88623)
*  Add a11y test suite for Lens + some fixes

* 🔧 Removed unused ids

* 🐛 Fix component duplication via key prop

* :white_mark_check: Add more a11y tests

* ♻️ Restored back reorder id + fix multi layer duplicate ids

* 🐛 Fix #88806

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-20 16:44:59 +01:00
Pierre Gayvallet c0438ad25c
[DX] migrate core xpack plugins to tsproject ref (#88676)
* migrate cloud, beatsManagement and savedObjectTagging to TS project ref

* migrates globalSearchBar

* fix beatsManagement config

* fix beatsManagement ts

* fix beatsManagement config again

* indent.
2021-01-20 16:40:13 +01:00
Alejandro Fernández Haro ee5f560dd7
[FTR] Use new ES client instead of legacyEs service (#88720) 2021-01-20 15:30:35 +00:00
Tiago Costa 69182a8628
chore(NA): create new x-pack cigroups and rebalancing them all (#88366)
* chore(NA): create new x-pack cigroups and rebalancing them all

* chore(NA): better cigroups balancing

* chore(NA): push rollup tests back into ciGroup1

* chore(NA): move some functional ml tests from cigroup3 into cigroup13

* chore(NA): move some more tests into ciGroup13

* chore(NA): use a single top level describe at x-pack/test/functional/apps/ml

* chore(NA): move settings into ciGroup13

* temporary test for es snapshots env

* Revert "temporary test for es snapshots env"

This reverts commit 789ebe7b9c.

* docs(NA): add missing documentation on the function tests describe split

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-20 13:47:08 +00:00
Tiago Costa 55d4331a2b
skip flaky suite (#88796) 2021-01-20 13:27:37 +00:00
Joe Reuter af3ea4d211
add test to switch layer from regular index to rollup index (#88651) 2021-01-20 13:37:37 +01:00
MadameSheema dd9e367ce2
[Security Solution] Cypress reorganization (#88687)
* moves tests to different folders

* cases test files renaming

* renames detection alerts test files

* renames detection rules test files

* renames exceptions test files

* splits inspect test files

* renames timeline templates file tests

* renames timelines file tests

* renames url file tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-20 13:25:24 +01:00
Dmitry 841655c1f7
[FTR] add custom runner and config to run load tests (#88409)
* add custom runner and config for load testing

* add full maven command

* add jenkins script

* run tests against build

* run kibana with no-base-path flag

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-20 13:23:10 +01:00
Walter Rafelsberger 2ec6f6c6b2
[ML] Column Charts Unit/Functional Tests (#88176)
- Unit and functional tests for the data grid mini histograms.
- canvasElement service.
2021-01-20 13:01:33 +01:00
Cauê Marcondes 7e1549d889
[APM] FTR with Cypress (#88142)
* usgin esarchive to load e2e

* using esarchive to load e2e

* using esarchive to load e2e

* using esarchive to load e2e

* using esarchive to load e2e

* chaning archiver script to copy file to both e2e and api tests

* chaning archiver script to copy file to both e2e and api tests

* removing task folder

* running e2e through script

* using cy.clock to set now

* adding basic test

* adding cypress run script

* adding cypress run script

* fixing some stuff

* excluding new e2e dir

* adding new project for new e2e dir

* adding new project for new e2e dir

* unformatting file

* adding unit tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-20 12:54:12 +01:00
Shahzad 37cc7af49d
[User Experience] UX use replace history instead of push on first load (#88586)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-20 11:29:44 +01:00
Yara Tercero f718e90a81
[Security Solution][Exceptions] - Remove exceptions table search #88784 (#88784)
## Summary

Temporarily addresses https://github.com/elastic/kibana/issues/88450

A follow PR will address full fix.

### Issue
Exceptions table search not functioning as expected.

### Diagnostic
The exception list SO properties are mapped as keywords, meaning ES does not tokenize them. Need to add a `text` mapping for fields we want to search on in order for search to work as expected. Expectations for exceptions table search being:
- I can search `Endpoint Security` and get results that match `Endpoint` or `Security`
- I can search `"Endpoint Security"` and it will conduct an exact match search

It's too late in the release cycle for mappings updates - a follow up PR will properly fix search.

### Without Search
<img width="1766" alt="Screen Shot 2021-01-19 at 7 52 01 PM" src="https://user-images.githubusercontent.com/10927944/105112279-aed64300-5a90-11eb-95fc-1922eb2055e9.png">

 
### Checklist

- [ ] [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-19 23:04:52 -07:00
Devin W. Hurley 4435006217
don't do a full failure because cross cluster search could be giving us a false negative, also update the text to better reflect this (#88763)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-19 22:58:11 -07:00
Brandon Kobel 170a2956c8
Updating the License (#88343)
* Updating the Licenses, except for applying eslint, building

* Applying ESLint rules,building @kbn/pm, regenerating api docs
2021-01-19 17:52:56 -08:00
Constance 3168b7d851
[App Search] Analytics - add reusable Layout & Header + basic subroute view components (#88552)
* Add AnalyticsUnavailable component

* Add AnalyticsHeader component

+ update AnalyticsLogic to store allTags prop passed by API

+ convertTagsToSelectOptions util helper

* Add AnalyticsLayout that all subroutes will utilize

- Handles shared concerns of:
  - Loading state & unavailable state
  - Flash messages & log retention callout
  - Reusing the header component
  - Fetching data
  - Reloading data based on filter updates

* Add very basic subroute views that utilize AnalyticsLayout

* Update QueryDetail pages to set breadcrumbs

* Fix QueryDetail breadcrumbs to not 404 on the 'Query' crumb

Redirect to the /analytics overview since we don't actually have a /query_details overview

* [PR feedback] Enforce date range defaults on the client side

- instead of using coincidence to sync our client side default range & server default range

- tags remain ''/undefined as default

* [PR feedback] Add explicit query vs analytics view prop

- to help devs more quickly distinguish at a glance whether a view will fetch analytics data or query data

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-19 15:20:01 -08:00
ymao1 6d1c010607
[Alerting] Fixing broken Alerts view when no Global All Kibana privilege (#88727)
* Making kibanaFeatures an optional parameter and catching error on plugin start

* Gracefully handle 404 errors when no access to features endpoint

* Adding functional test
2021-01-19 18:14:56 -05:00
Justin Kambic 4af5c117fa
[Uptime] [Overview Page] Only render up/down drawer badges when items > 1 (#88524)
* Only render location status badge when there are actually locations to display.

* Add aria-label to describe location section.

* Update test data to reflect real-world data better. Refactor enzyme tests.

* Refactor component test.

* Fix test names.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-19 17:51:10 -05:00
Yara Tercero 5f53b649c6
[Security Solution][Endpoint Exceptions] - Fix bug where endpoint exceptions list not created when expected (#88232)
## Summary

Addresses issue issue 87110

**Issue**
When prepackaged rules were created during the Endpoint Security enrollment flow, the endpoint exceptions list was failing to be created. As a result, when a user navigated to the `Endpoint Security` rule to add an exception it would display errors and not allow a user to add exceptions.
2021-01-19 17:36:05 -05:00
Lisa Cawley 1db32352b2
Use doc link service for Maps help (#88631) 2021-01-19 13:52:42 -08:00
Thomas Neirynck 66c0cc22c5
[Maps] EMS baselayer should load cleanly (#88531) 2021-01-19 16:50:07 -05:00
Marshall Main 90f2abd361
[Security Solution][Detections] Await promises to ensure promise rejection does not crash kibana (#88564)
* Await promises to ensure promise rejection does not crash kibana

* Fix test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-19 16:11:25 -05:00
Devin W. Hurley a75909eecb
[Security Solution] [Detections] Fixes messaging for when an index is missing a timestamp field to sort on (#87489)
* partial failure if unmapped timestamp override field or unmapped @timestamp field

* fixes unit tests

* fix threat match rules integration tests

* unskip integration test for partial failure when not all indices have timestamp override field

* replace ts-expect-error in test with a partial type

* use destructured param and != null for ternary

* fix typo in utils.test.ts

* remove unnecessary optional chaining

* replace logger.debug with logger.error and update test case for threat match integration test to search auditbeat-* instead of empty index causing it to search wrong indicies like .kibana, etc..

* adds unit test to write a success when all shard failure messages are no mapping found for a timestamp field, moves privilege check and timestamp field cap check into utility functions and updates code to be more functional

* need to write an error, not a partial failure, if the rule cannot read ANY of the indices provided

* use isEmpty for checking timestamp override field param and remove let from hasReadIndexPrivileges util function

* replace references to helpers/toPromise | toError to use common/fp_utils, remove unnecessary flow wrappers, no need for checking if timestampField is null since it is typed as string and we do the checking beforehand, add a const bool to clean up logic for getting timestampFieldOverride

* replace usage of flow with pipe to make arguments explicit
2021-01-19 15:54:05 -05:00
Nathan Reese 07849ce42e
Remove circular depencency between maps_legacy and region_map and tile_map plugins (#88265)
* Remove circular depencency between maps_legacy and region_map and tile_map plugins

* update imports in maps plugin

* tslint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-19 13:40:24 -07:00
Michael Olorunnisola 7ba1d91770
[Security_Solution][Resolver] Fix Text Overflow (#88679) 2021-01-19 15:26:28 -05:00
Michael Olorunnisola 0a1af80631
[Security_Solution][Resolver] Fix full screen graph (#88513)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-19 15:19:57 -05:00
Thomas Neirynck 55d1065c93
[Maps] Always show solution layers (#86053) 2021-01-19 14:07:48 -05:00
Thomas Neirynck dc30e94556
[Maps] Always check license at plugin startup (#87873) 2021-01-19 14:07:30 -05:00
Nathan Reese c272d35b65
[Maps] scale control (#88031)
* set width

* cleanup

* add show scale toggle in map settings

* tslint

* remove unmapped css comment

* move scale for full screen mode so they do not collide

* change default and add unit test for scale_control

* simplify scale

* add tilda to label

* update jest expects

* eslint

* eslint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-19 11:50:55 -07:00
ymao1 60f8b24529
[Actions] Removed double parsing when passing action url for validation (#87928)
* Removed double parsing when passing action url for validation

* Fixing functional test

* PR fixes

* PR fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-19 13:40:49 -05:00
Marco Liberati 74fac0c009
[Lens] Fix Median operation visibility in Dimension panel (#88474)
Co-authored-by: Elizabet Oliveira <elizabet.oliveira@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-19 19:03:51 +01:00
Shahzad 211312d6a6
[APM UI] Remove unnecessary package usage (#88646) 2021-01-19 18:20:13 +01:00
Shahzad 7d14229519
[Uptime] Scale waterfall chart to handle large number of requests (#88338) 2021-01-19 17:18:26 +01:00
Constance eb4cb3d1dc
[Enterprise Search] Miscellaneous test cleanups (#88525)
* Update older tests mocking useValues to setMockValues

* Update older logic tests to use newer LogicMounter helper

- NOTE: shared logic files are still using resetContext however, in order to not accidentally override/mock kea + since they should be testing their own mount helpers

* Merge/DRY kea.mock helpers into a single import

* Remove unnecessary kea.mock file imports

- the automock already happens when you import something from the kea.mock file
- in some cases in WS the mock just wasn't needed

* Newline linting

- Do I need a hobby? yes
- Is this my hobby? ...maybe

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-19 07:49:10 -08:00
Jean-Louis Leysens fbf600d7fc
[ILM] Searchable snapshot default "enabled" on cloud (#88582)
* default searchable snapshot to enabled on cloud when creating a new policy

* added test for searchable snapshot on new policy on cloud
2021-01-19 16:24:40 +01:00
Alejandro Fernández Haro 7c9b11476d
[Application Usage] Functional test to validate the full list of appIds in the schema (#88080)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-19 14:44:08 +00:00
Tiago Costa 659c157cba
skip flaky suite (#85208) 2021-01-19 13:02:13 +00:00
John Schulz c52339e606
[Fleet][EPM] If proxy url has username & password, add to Node's Agent options (#86807)
## Summary

A user received a `407` response when using a `registryProxyUrl` format like `http://user:pass@host:port`

I believe the issue is we're not including the [`auth` property as described in this issue](https://github.com/TooTallNate/node-https-proxy-agent/issues/12#issuecomment-216098644). 

Add tests to ensure it only adds `auth` if username & password are given.

### Checklist
Delete any items that are not applicable to this PR.
- [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

```
  getProxyAgentOptions
    auth property
      present & correct if given username and password
        ✓ proxy url is http (1 ms)
        ✓ proxy url is https
      missing if not given username and password
        ✓ proxy url is http
        ✓ proxy url is https
```
2021-01-19 07:24:11 -05:00
James Gowdy b00fe2a4e7
[ML] Fix rare page crash when deleting anomaly detection job (#88622) 2021-01-19 11:27:19 +00:00
Marco Liberati 1f4ee91908
[Lens] Use first decimal when required for data summaries (#88463)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-19 12:20:12 +01:00
MadameSheema df99216bae
improves timeline creation cypress test (#88628) 2021-01-19 10:07:29 +01:00
Cauê Marcondes f7d9212c34
[APM] Query for service metadata always uses transaction documents (#87622)
* using metrics over transaction index

* addressing PR comments

* addressing PR comments

* addressing PR comments

* removing uiFilters from metadata apis

* addressing PR comments

* addressing PR comments

* removing terminateAfter

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-19 09:24:54 +01:00
Joe Portner a43d609b09
Fix changing password in Cloud (#88544) 2021-01-18 19:00:22 -05:00
Mikhail Shustov 6e4c70848d
[Core] Remove public context (#88448)
* remove client side context

* update docs

* fix tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-18 21:47:53 +01:00
Scotty Bollinger 5f0e9f4248
[Workplace Search] Migrates Org Settings tree (#88092)
* Initial copy/paste of component tree

Only does linting changes and lodash import

* Replace withRouter HOC with hooks

Use useLocation and no longer pass around history, using the KibanaLogic navigateToUrl method instead

* Migrate LicenseCallout component

* Update paths

Also change name of component to OauthApplication as the default import was named that before

* Remove conditional and passed in flash messages

This is no longer needed with the Kibana syntax. Flash messages are set globally and only render when present.

* Replace removed ConfirmModal

In Kibana, we use the Eui components directly

* Use internal tools for determining license

* Fix a bunch of type issues

* Remove telemetry settings section

We no longer control telemetry in Workplace Search. It is handled by Kibana itself

* Add SettingsSubNav component

* Add route and update nav

* Remove legacy AppView and sidenav

* Clear flash messages globally

* Remove global name change method call

The global org name is not used anywhere outside of this section so we no longer need to update the global organization object as it is re-fetched when this section is entered.

Previously, we displayed the org name in the sidebar but that has been removed in Kibana

* Refactor saveUpdatedConfig

We recently split out the logic from SourceLogic to the new AddSourceLogic and in settings, we were calling the saveSourceConfig method from the SourceLogic (now in AddSourceLogic) file and passing a callback that set the flash messages from that component’s state.

Now, we set the flash messages globally and no longer need to have a saveUpdatedConfig method in the logic file, but can call it directly in the component and the flash messages will be set globally.

* Update logic file to use global flash messages

* Update server routes

* Replace Rails http with kibana http

* Fix subnav

* Update routes to use consistent syntax

We use this method across both Enterprise Search products in Kibana

* Shorten nav item copy

This would be the only place in the sidebar with a nav item breaking to a second line.

* Fix some random typos

* Replace React Router Link with helper

* Add i18n

* Remove redundant clearing of flash messages

This happens automatically now in the global flash messages logic; route changes trigger clearing of messages

* Add unit tests for components

* Add tests for router

* Store oauthApplication in mock for reuse

* Add tests for SettingsLogic

* Fix typo

* Remove unncessary imports

Copied from this PR:
https://github.com/elastic/kibana/pull/88525

* Refactor to use new helpers when mocking

See https://github.com/elastic/kibana/pull/88494

* Update logic test to use error helper

See https://github.com/elastic/kibana/pull/88422

* Fix type issue

* Fix whitespace lint issue

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-18 14:14:42 -06:00
Vadim Dalecky 89dc4f2e00
test: 💍 enable URL drilldown test (#88580) 2021-01-18 21:05:29 +01:00
Devon Thomson af7a577b09
[Time to Visualize] Enable by Default (#88390)
* Enable Time to Visualize by Default
2021-01-18 13:51:32 -05:00
Scotty Bollinger 33084df3ad
[Workplace Search] Add tests for Custom Source Display Settings (#88547)
* Add type

Our code allows for an array but the type did not.

* Add exampleResult mock

* Add test-subj attrs

* Remove FIXMEs for linter errors

The linter was complaining when these were initially migrated, stating that a11y required all mouse events to have focus and blur events. This commit uses the hover events for those. EuiColorPicker was added in error and removing them does not disrupt the linter.

* Add tests for components

* Add test for router

Also updates routes to use consistent syntax and remove the render prop

* Use helper instead of history.push

* Remove redundant resetDisplaySettingsState method

Since all this does is wrap the clearFlashMessages function, we can just call it directly. Also use the new clearFlashMessages helper instead of using FlashMessageLogic directly insideof toggleFieldEditorModal

* Add tests for DisplaySettings container

* Fix a typo and associated tests

Also adds ‘subtitleField’ that is needed in a future test

* Add constants from PR to test

https://github.com/elastic/kibana/pull/88477

* Add tests for DisplaySettingsLogic

* Remove unused imports and use new mocks

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-18 11:28:37 -06:00
Marco Liberati 898385c2e2
[Lens] Clean full reference operation error state when switching to other operation (#87064)
* 🐛 Make sure to check incomplete columns before saved ones

* ⚗️ Try a different approach

* 🐛 Isolate the fullRef to field transition and trigger the removal + tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-18 16:58:23 +01:00
Kerry Gallagher 53f4b21a81
[Logs UI] Add sorting capabilities to categories page (#88051)
* Add sorting capabilities to categories page

Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
2021-01-18 14:12:29 +00:00
Anton Dosov b8d43139f3
[Search Sessions] fix flaky relative time range test (#88359) 2021-01-18 15:05:47 +01:00
Robert Oskamp f0d20097a1 [ML] Disable a11y tests 2021-01-18 13:53:27 +01:00
Christos Nasikas f7fdda5db7
[Security Solution][Case] Fix patch cases integration test with alerts (#88311)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-18 09:59:26 +02:00
Frank Hassanabad 2abbd808c7
[Security Solutions][Detection Engine] Removes duplicate API calls (#88420)
## Summary

This removes some duplicate API calls to reduce pressure on the backend and speed up querying times within the application for the front end. This fixes some of the issues of https://github.com/elastic/kibana/issues/82327, but there are several performance improvements that are going to be needed to help reduce the slowness when you have a system under a lot of pressure.

So far this removes duplication for these API calls when you are on the manage detection rules page:

```ts
api/detection_engine/rules/_find
api/detection_engine/rules/_find_statuses
api/detection_engine/tags
```

<img width="2465" alt="Screen Shot 2021-01-14 at 3 53 21 PM" src="https://user-images.githubusercontent.com/1151048/104662295-c031e080-5687-11eb-92d7-18b9ad355646.png">

* This hides the tags and searches while the page is loading to avoid duplicate calls when the pre-packaged rules counts come back
* This untangles the refetchRules from the refetchPrePackagedRulesStatus as two separate calls to avoid issues we have with re-rendering and re-calling the backend.
 
### Checklist

- [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-17 09:18:34 -07:00
Liza Katz 7a87c33afc
Fix log msg (#88370)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-17 00:05:06 +02:00
Tim Sullivan abffb19889
[Test] Add tag cloud visualization to dashboard in functional test for reporting (#87600)
* add tag cloud to dashboard in kibana archive

* add pdf snapshot testing to downloaded pdfs

* update png baseline image

* remove pdf snapshot testing

* rename mislabeled variable

* fix test comparison

* remove unnecessary pdf utf8 checks

* Update screenshots.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-15 22:05:14 -07:00
Yuliia Naumenko 5c112b8b5a
[Alerting] Migrate Event Log plugin to TS project references (#81557)
* [Alerting] Migrate Event Log plugin to TS project references

* fixed faling typechecks

* fixed path to spaces plugin ts file

* fixed missing include

* added fix for mapping.json

* replaced package.json get version with kibanaVersion from plugin initial context

* fixed build

* fixed typechecks

* fixed tests
2021-01-15 19:07:45 -08:00
Nathan Reese c66c9424d9
[Maps] fix zooming while drawing shape filter logs errors in console (#88413)
* [Maps] fix zooming while drawing shape filter logs errors in console

* add unit test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-15 19:05:45 -07:00
Vadim Yakhin fbb8238f57
Porting fixes 1 (#88477)
* Remove Manage button from Source overview page

* Replace empty select option with "Leave unassigned"

* Replace content source key with id

* Update Google icons

* Replace anchor with EuiLink

* Add Folders as one of the synced items for Box

* Add DLP feature UI to Jira and Confluence cloud pages

* Fix the "Fix" link path

Also updated TS types to match ent-search

* Fix copy and button color on "Content source is disabled" callout

* Remove incorrect copy from Private sources empty state

* Move constants from logic file to a separate file, rename a constant

* Fix i18n path to not include file name

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-15 16:04:45 -06:00
Dario Gieselaar f5ec1dc352
[APM] Explicitly set environment for cross-service links (#87481)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-15 22:34:54 +01:00
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
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
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
Mikhail Shustov 5814ca6e05
[DX] move some ES UI plugins to TS project (#88050)
* es_ui_shared to ts project

* console to ts project

* console_extensions to ts project

* searchprofiler to ts project

* update includes
2021-01-13 21:58:34 +01:00
Nicolas Chaulet 28d61bf5fa
[Fleet] Fix agent status updating count, and mitigate performance issue (#88019) 2021-01-13 16:29:32 -04:00
Madison Caldwell 66129efc15
Fix timeline query for threshold rules (#88217) 2021-01-13 15:29:14 -05:00
Oliver Gupte 5ed91585a8
[APM] Fixes inconsistent labels for throughput & latency (#88101)
* Closes #87483. Updates several labels to be consistent accross views.

* Updates integration tests/snapshots with new term

* Changes "traffic" => "throughput" in the labels

* addresses feedback from PR

* includes tpm unit in Observability overview page and updates test
2021-01-13 12:09:03 -08:00
Søren Louv-Jansen d1b348e621
[APM] Fix incorrect table column header (95th instead of avg) (#88188) 2021-01-13 21:01:44 +01:00
Søren Louv-Jansen de5a97e1f1
[APM] Hide recording setting from from RUM agents (#88152) 2021-01-13 20:53:44 +01:00
Alison Goryachev d9bd7b4fd6
[ILM] Surface linked hidden indices for policies (#87960) 2021-01-13 14:50:01 -05:00
Anton Dosov febe1f5900
[Search Session] Fix integration in vega, timelion and TSVB (#87862) 2021-01-13 20:45:14 +01:00
Thom Heymann 3d749ad444
Bumped axios to 0.21.1 (#87776)
* Bumped axios to 0.21.1

* Update dist

* Consolidated dependencies

* Added missing mime-type types

* Rebuild dist

* Consolidated octokit/auth-token

* Fix axios wrapper ensuring non-200 throws error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-13 19:41:31 +00:00
Constance c1e21deac6
[App Search] Set up Analytics router (#88095)
* [Setup] Analytics routes & page title consts

* Add AnalyticsRouter
- with TODO views

* Update EngineRouter to use AnalyticsRouter

+ minor rearranging of import order

+ update EngineNav to show active flag for subroutes

* [Polish] Add 404 fallback to Analytics subroutes

+ add custom breadcrumb trail prop to NotFound component

* [PR feedback] DRY out typing
2021-01-13 11:08:20 -08:00
Nathan L Smith e07c541036
Reset time range if either value changes (#88186)
Previously we had `getStart` and `getEnd` methods used in `useUrlParams` that would give a new value if the respective `rangeFrom`/`rangeTo` had change.

This had the effect of sometimes making the end time sooner than the start time, causing errors on the page.

`getStart` and `getEnd` have been replaced with a `getDateRange` method that checks if *either* value has changed and recaluates the start/end, but leaves them the same if both values have not changed.

Fixes #85238.
2021-01-13 13:07:00 -06:00
Constance 0e118c2099
[App Search] EnginesLogic + minor UX fix (#87561)
* [Misc cleanup] DRY out type def

EnginesTableData was made before we started importing more types over from ent-search; we should reuse the more complete EngineDetails instead of re-declaring our own

* Add EnginesLogic file + tests
- based on current state inside EnginesOverview

- Not a 1:1 translation from ent-search's EnginesLogic b/c the table component/view is different
- also missing engine creation which will be a separate PR

* Update EnginesOverview to use EnginesLogic

- should be significantly simpler
- tests no longer need mountAsync

* [Extra] Make up for lost icon.tsx coverage

- because we no longer use mount() in the engines overview tests, I'm adding an extra set of quick shallow render tests to cover the icon .tsx lines

* [Misc] Rename fetchX to loadY (copying Kea)
2021-01-13 10:24:04 -08:00
Quynh Nguyen 6e3a06b4aa
[ML] Fix Anomaly Explorer & Single Metric Viewer not plotting correctly for detectors with non zero count function (#87903) 2021-01-13 12:19:01 -06:00
Søren Louv-Jansen badd2b35f2
[APM] Hide “Create configuration” for users without write access (#88149)
* [APM] Hide “Create configuration” for read-only user

* also hide description

* disable create button

* fix ts error for EuiButton
2021-01-13 19:00:01 +01:00
Nathan Reese e2dc9464fa
[Maps] create Elasticsearch search source layer descriptor (#87855)
* [Maps] create Elasticsearch search source layer descriptor

* tslint

* tslint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-13 10:56:18 -07:00
Justin Kambic eb2018b642
[Uptime] Unskip jest tests for ExecutedStep component (#88105)
* Revise skipped tests to use RTL.

* Rename a test.

* Add a test covering default status badge text.

* Refactor a test to remove redundant code.
2021-01-13 12:24:52 -05:00
Constance 64275cd11a
[App Search] Minor log retention refactors (#88140)
* Move reused log retention components to own folder

- e.g., logic file, helpers used by other views & not just settings

* Update settings-specific views to reference top-level folder

- I'm leaving the panel and the confirmation modal within settings as that isn't used anywhere outside the settings page, but we can revisit this if needed or if people think it makes more sense to keep everything log related together

* [bug] Fix nested <p> error in log retention confirmation modal
2021-01-13 08:23:56 -08:00
Joe Reuter 94ca8ab1c3
Migrate most kibana app plugins to TS projects (#87636) 2021-01-13 17:15:41 +01:00
spalger f4a348f762 skip flaky test (#75106) 2021-01-13 09:14:39 -07:00
spalger 05f5192d1d skipping flaky suite (#87988) 2021-01-13 08:51:30 -07:00
spalger 3953f9647e skip flaky suite (#88177) 2021-01-13 08:38:41 -07:00
Sonja Krause-Harder 6a55d46b2e
[EPM] Include both kibana and elasticsearch assets in package information (#88036)
* Return both kibana and elasticsearch assets.

* Fix type complaints.
2021-01-13 16:32:55 +01:00
Joe Reuter 40b65630be
set aria-pressed for function buttons (#87825) 2021-01-13 16:05:52 +01:00
Matthew Kime 109bed0768
revert runtime fields editor plugin (#88132) 2021-01-13 08:34:30 -06:00
Christiane (Tina) Heiligers 2eca6aa11e
Converts Telemetry Management Section to TS project refs (#88073) 2021-01-13 07:09:32 -07:00
Robert Oskamp e274a60927
[ML] Functional tests - stabilize AD job delete test (#88148)
This PR stabilizes the AD job delete tests by waiting for the job to not exist anymore before checking the job list.
2021-01-13 15:04:38 +01:00
Nicolas Chaulet 4c5d8be8da
[Fleet] Remove misleading information from enrollment token revoke modal (#88094) 2021-01-13 10:00:26 -04:00
ymao1 7334b96516
CSS fix for connector list (#87831) 2021-01-13 08:12:58 -05:00
ymao1 2c8b518f69
Fixes Failing test: Chrome X-Pack UI Functional Tests.x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list·ts - Actions and Triggers app alerts list should display total alerts by status and error banner only when exists alerts with status error (#88119)
* Unskipping test

* Adding refresh before checking status
2021-01-13 08:01:08 -05:00
Joe Reuter ed9479738d
make sure filter object is persistable (#87828) 2021-01-13 13:32:14 +01:00
Joe Reuter cea39d90b7
close popover on repeated button click (#87834) 2021-01-13 13:31:24 +01:00
Nicolas Chaulet 156fb3d33c
[Fleet] Only display logs UI for agent >= 7.11 (#87926) 2021-01-13 07:30:21 -04:00
Dominique Clarke ff17581f45
[Uptime] update synthentics screenshot preview images (#87602)
* update PingTimestamp caption and add spinner for loading images

* use FETCH_STATUS to determine render state for PingTimestamp

* add tests for ping timestamp

* adjust ping timestamp caption

* update screenshot to use EuiImage

* remove deprecated translations

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-13 04:48:37 -05:00
Madison Caldwell af02f3d83f
[Security Solution][Threshold Rules] Fixes for 7.11 (#88120)
* Use OR for threshold timeline query (not AND)

* Speed up aggregatable fields filter with mutation
2021-01-13 04:44:08 -05:00
Marius Dragomir a98052bc72
dismiss telemetry banner for ems_test (#88096)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-13 10:29:16 +01:00
Dima Arnautov 1f131b250f
[Transform] Functional tests for latest method (#86966)
* [ML] create latest transform from index pattern

* [Transform] refactor, tests for saved search

* [Transform] cloning tests for latest transform

* [Transform] fix cloning test, add editing tests

* [Transform] fix typo

* [Transform] disable cloning tests

* [Transform] add assertion for selected tranform function

* [Transform] disable editing tests

* [Transform] disable editing and cloning tests for latest function
2021-01-13 10:05:05 +01:00
Shahzad ba05b7b007
fix waterfall scroll color for dark theme (#87833) 2021-01-13 09:18:45 +01:00
Tyler Smalley d306c85d03 skip flaky suite (#88130) 2021-01-12 21:18:29 -08:00
Oliver Gupte ed531bb4c2
Closes #85328. Adds 'repositionOnScroll' prop to expression popovers (#88085) 2021-01-12 21:15:27 -08:00
Devin W. Hurley e339018285
[Security Solution] [Detections] Fix bug to allow lower privileged users to close alerts (#87761)
* remove canUserCRUD from signal actions and remove refresh param from open_close_signals route. 'refresh' requires maintenance / manage / all privileges for signals index

* adds 'maintenance' to privileges route

* fix unit teset typing

* update tests, updated lists e2e tests since it relies on the readPrivileges function of SIEM so any changes to the expected response from there must also be changed in the lists privileges route

* update scripts roles to include maintenance for roles that do not have privileges higher than 'maintenance'

* fix open-close signals integration test
2021-01-12 21:16:06 -05:00
Patryk Kopyciński 500edba975
[Security Solution] Fix Investigate in Timeline Threshold rule signal… (#87907)
* [Security Solution] Fix Investigate in Timeline Threshold rule signals logic

* fix tests

* PR comments

* Fix positioning of FieldsBrowser

* update cypress tests
2021-01-12 20:56:08 -05:00
Yuliia Naumenko fb67443e6d
[EventLog] Added event log API to get events for multiple saved objects. (#87596)
* Added alerting API to get all active instances

* modofied event log findEventsBySavedObject to support bulk ids, renamed to findEventsBySavedObjectIds

* fixed faling typechecks

* fixed crash on zpd/api/event_log/alert/84c00970-5130-11eb-9fa7/_find for non existing id

* fixed faling typechecks

* fixed faling typechecks

* fixed due to comments

* fixed due to comments

* fixed failing test

* fixed due to comments
2021-01-12 16:25:23 -08:00
Gidi Meir Morris 5e4402c374
[Alerting] Shift polling interval by random amount when Task Manager experiences consistent claim version conflicts (#88020)
This PR Introduces a `pollingDelay` which is applied to the polling interval whenever the average percentage of tasks experiencing a version conflict is higher than a preconfigured threshold (default to 80%).
2021-01-12 23:34:07 +00:00
Thomas Neirynck 14d96da750
[Maps] Show plus sign for term join metrics (#88049) 2021-01-12 17:01:55 -05:00
Nathan L Smith d53f832f16
TS project references for translations plugin (#88022)
Observability has this as a dependency, so adding TS project references in service of that.
2021-01-12 15:07:27 -06:00
Justin Kambic 1094274556
[Uptime] Remove prototype overwrite in unit test (#73709)
* Remove prototype overwrite in unit test.

* Wrap calls to prototype functions with jest.spyOn.

* add additional component test helpers

* add test examples

* uptime testing utils remove custom prefix from props and parameter options

* skip executed step tests

* adjust MlJobLink test

* add testing util interfaces

* Move updated test files to correct locations.

* Move other test file to correct location.

* Revert unintended changes from merge.

* Revert unintended changes from merge.

* update mock core

* combine wrappers into one custom render function

* Move mock helpers to helper file. Update snapshots.

* Refactor tests to use RTL over enzyme.

* Refactor \`PingHistogram\` component tests to prefer RTL to Enzyme.

* Drop obsolete snapshot file.

* Remove obsolete file leftover from merge error.

* Fix outdated import path.

* Prefer custom render to vanilla.

* Fix formatting issue uncovered by unit test, and update test assertion.

* Add test for single location.

Co-authored-by: Dominique Clarke <dominique.clarke@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-12 15:08:10 -05:00
Melissa Alvarez 1ab46afef1
disable actions if no permissions (#88034) 2021-01-12 15:02:32 -05:00
Oliver Gupte 440123e958
Closes #86989. Disable caching for fetched custom links (#87932) 2021-01-12 12:02:18 -08:00
Constance 04739d851c
[App Search] Add AnalyticsChart component to EnginesOverview (#87752)
* Set up Kibana charts plugin dependency

- required for using shared colors/themes/etc.
- see https://github.com/elastic/kibana/tree/master/src/plugins/charts

* Add reusable AnalyticsChart component

+ util for converting data from our server API to data that Elastic Charts can use

* Update EngineOverview to use AnalyticsChart

+ remove now-unnecessary endDate value (we don't really need it just IMO)

* [PR feedback] Return type

* [Self feedback] naming - remove pluralization
2021-01-12 11:43:01 -08:00
Quynh Nguyen a1c2422261
[ML] Fix inconsistent padding for long top_values in Data Visualizer & hover color of expanded row (#87937) 2021-01-12 12:57:21 -06:00
Thomas Neirynck d321950b93
[Maps] Support geometry-collection (#87867) 2021-01-12 13:49:59 -05:00
Chris Roberson 33603e749d
[Monitoring] Cloud property not properly passed when no monitoring data found (#87649)
* Fix parameter usage

* Fix up incorrect usage again

* Add another check

* Fix tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-12 13:15:08 -05:00
Joe Portner 07a3756a62
Create Spaces OSS plugin (#87585) 2021-01-12 12:26:40 -05:00
Tiago Costa 5fb5605ffa
chore(NA): move missing monitoring plugin tests out of __tests__ folder (#88016) 2021-01-12 17:23:11 +00:00
Tiago Costa 47cac6c401
chore(NA): move missing canvas plugin tests out of __tests__ folder (#87898) 2021-01-12 17:21:16 +00:00
Jen Huang 44ccf285e5
Move creation of state container to render-time in order to initialize state from URL correctly (#87955) 2021-01-12 09:15:07 -08:00
Patrick Mueller 8fe204fcab
[actions] fixes action proxies to set the right agent based on target url (#86415)
Previously, the http and https proxy agents used by actions were created based
on the protocol of the proxy URL itself - if the proxy was an http URL, both
the generated http and https agents supplied to axios were actually both
http proxy agents; if the proxy was an https URL, both the generated http and
https agents supplied to axios were both https proxy agents.

This PR changes so that both an http and https proxy agent are created and
assigned as the appropriate agents for axios.  Similar changes were made to
the slack action, which does not directly use axios.
2021-01-12 11:54:40 -05:00
Chris Roberson a21ad0d126
[Monitoring] Remove deprecated watcher-based cluster alerts (#85047)
* First draft

* Update to use actual API

* Remove this file

* Update translation key

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-12 11:48:18 -05:00
Chris Roberson fc994dfe97
Update logstash files to ts where we read from source (#86787)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-12 11:47:49 -05:00
Chris Roberson 04d4d8523d
Use fetchClustersRange (#87882)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-12 11:47:30 -05:00
Anton Dosov 86d53b683e
[Search Sessions][Discover] Send to background integration improvements and fixes (#87311) 2021-01-12 17:45:37 +01:00
Lisa Cawley 78dea4f03f
Use documentation link service for security links (#87409) 2021-01-12 08:40:10 -08:00
Alejandro Fernández Gómez 1a9836b296
[Logs UI] Add <LogStream/> documentation to the infra Storybook (#87169)
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
2021-01-12 17:33:50 +01:00
Joe Reuter 807e8bdeb2
Kibana app and presentation ts projects (#87639) 2021-01-12 17:33:07 +01:00
Alexey Antonov 0b7e83f736
[TSVB] Allow custom label for fields via index pattern field management (#84612)
* [TSVB] Allow custom label for fields via index pattern field management

Closes: #84336

* replace saveObject, elasticsearch client to new one

* fix CI

* update schema

* fix Top Hit

* some changes

* partially move getting fields into client side

* fix PR comments

* fix issue with getting fields

* move SanitizedFieldType to common types

* fix issue on changing index pattern

* fix issue

* fix regression

* some work

* remove extractFieldName, createCustomLabelSelectHandler

* request/response processors should be async

* some work

* remove tests for createCustomLabelSelectHandler

* fix table

* fix placeholder

* some work

* fix jest

* fix CI

* fix label for table view

* test: visualize app visual builder switch index patterns should be able to switch between index patterns

* fix functional tests

* fix sorting

* fix labels for entire timerange mode

* add createFieldsFetcher method

* table view - fix pivot label

* fix PR comments

* fix issue with selecting buckets scripts

* fix types

* Update create_select_handler.test.ts

* fix PR comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-12 19:28:45 +03:00
igoristic ef441cca24
Alerts Status on clusters listing page (#87969) 2021-01-12 11:06:48 -05:00
Davis Plumlee 25bac19321
[Security Solution][Detection Rules] Fixes Threshold rule schema validator (#87946) 2021-01-12 08:57:06 -07:00
Bohdan Tsymbala 752a2bd943
Extracted some parts of server side validation from schema into shared space. Changed the schema structure a bit to avoid casting inside validation code. (#87523) 2021-01-12 16:31:35 +01:00
Anton Dosov d3303f28bb
[Search] Search Sessions with relative time range (#84405) 2021-01-12 14:51:04 +01:00
Paul Tavares 02695ef5ad
[Fleet] Show Count of Agent Policies on Integration Details (#86916)
* component to show count of agent policies for integration
* API route and service to return stats of package usage
2021-01-12 07:56:05 -05:00
Aleh Zasypkin 31e66979b9
Do not embedd credentials into ES URL and enable anonymous tests. (#87987) 2021-01-12 13:51:54 +01:00
Dima Arnautov 83e8fe8ef0
[Transform] Show destination index mapping warning for the latest transform (#87858)
* [Transform] show callout for the latest transform

* [Transform] fix flex styles

* [Transform] change to vertical layout, update warning message

* [Transform] fix messages
2021-01-12 13:03:47 +01:00
Joe Reuter 94b02d97ed
[Lens] Implement deep linking and embedding (#84416) 2021-01-12 10:45:53 +01:00
Andrew Goldstein 46083c0973
[Security Solution] Accessibility (a11y) fixes (#87783)
## [Security Solution] Accessibility (a11y) fixes

This PR fixes the following accessibility (a11y) issues:

- Fixes an issue that prevented tabbing through all elements on pages with embedded Timelines
- Fixes an issue where the Timeline data providers popover menu was not displayed when Enter is pressed
- Fixes an issue where duplicate draggable IDs caused errors when re-arranging Timeline columns
- Fixes an issue where Timeline columns could not be removed or sorted via keyboard
- Fixes an issue where focus is not restored to the `Customize Columns` button when the `Reset` button is pressed
- Fixes an issue where filtering the `Customize Event Renderers` view via the input cleared selected entries
- Fixes an issue where the active timeline button wasn't focused when Timeline is closed
- Fixes an issue where the `(+)` Create / Open Timeline button's hover panel didn't own focus
2021-01-12 01:02:53 -07:00
Tiago Costa 5dca937c01
chore(NA): move reporting plugin test fixtures out of __tests__ folder (#87888)
* chore(NA): move reporting plugin test fixtures out of __tests__ folder

* fix(NA): fix a test import
2021-01-12 02:44:07 +00:00
Tiago Costa e8285668a7
chore(NA): move missing apm plugin tests out of __tests__ folder (#87894) 2021-01-12 02:43:03 +00:00
Dominique Clarke ca31bd80b6
[Uptime] Tests/uptime testing utils (#87650)
* add additional component test helpers

* add test examples

* uptime testing utils remove custom prefix from props and parameter options

* skip executed step tests

* adjust MlJobLink test

* add testing util interfaces

* update mock core

* combine wrappers into one custom render function

* split enzyme helpers and rtl helpers into different files and adjust types

* adjust types

* spread core on render function

* remove unnecessary items from MLJobLink test

* update use_monitor_breadcrumbs test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-11 20:02:23 -05:00
Phillip Burch f54f155305
[Metrics UI] Add APM, uptime and create alert links to overlay (#87883)
* Add APM, uptime and create alert links to overlay

* Remove unused i18n
2021-01-11 18:36:39 -06:00
Nathan Reese ddf1b67559
[Maps] move map embeddable display properties to map settings (#86395)
* [Maps] move map embeddable display properties to map settings

* update uptime EmbeddedMap

* tslint

* more cleanup

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-11 16:18:01 -07:00
Patryk Kopyciński 1e7c3f88ec
[Security Solution] Fix sorting on unmapped fields in Timeline Events… (#87241)
* [Security Solution] Fix sorting on unmapped fields in Timeline Events table

* set unmapped_type to the column type

* add missing types

* Update saved_object_mappings.ts

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
2021-01-11 18:09:38 -05:00
Søren Louv-Jansen 7cd1fa3167
[APM] Cleanup: Remove isValidCoordinateValue and getResponseTimeTooltipFormatter (#87836) 2021-01-11 23:43:42 +01:00
Constance cf086b678b
[App Search] Minor const cleanup (#87885)
* DRY out repeated DOCUMENTS_TITLE

* Move temporary title const's in engine folder to their own respective folders

- might as well get it set up early + prevents us from forgetting to clean this up later

* Update engine nav & engine router files
2021-01-11 13:52:24 -08:00
Dominique Clarke 02f7956db3
[Uptime] Waterfall Chart - enable timings for local files by leveraging total time (#87424)
* uptime waterfall enable timings for static files by leveraging total time

* update cases for when their is no waterfall timing available

* add showTooltip propertier to WaterfallDataSeriesConfigProperties

* remove content downloading from the legend

* add mime type to content downloading label

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-11 16:35:02 -05:00
ymao1 666af32be4
[Alerting] Showing confirmation modal on Alert Add/Edit when flyout closed without saving and changes made. (#86370)
* Adding hasChanged check and showing confirmation modal if something has changed

* Showing confirmation always on close

* Adding functional test

* Setting name and tags for APM alerts using initial values instead of setAlertProperty

* Checking for alert param changes separately

* Checking for alert param changes separately

* Fixing functional test

* Resetting initial alert params on alert type change

* Fixing duplicate import

* Cloning edited alert

* PR fixes

* PR fixes

* Updating modal wording

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-11 16:16:10 -05:00
Rudolf Meijering f8b1cdd81d
Prevent kibana crashing when multiple processes start APM telemetry task in parallel (#87645)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-11 21:38:54 +01:00
Lisa Cawley a9797999a1
[ML] Use documentation link service in more ML pages (#87389) 2021-01-11 11:39:04 -08:00
Chris Roberson ff8d30bc6c
[Monitoring] Stop using constructor.name for logstash pipelines (#87386)
* Use typeString instead

* Used wrong type string

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-11 14:32:19 -05:00
Nathan Reese 89e7cd6808
[maps] abort sync data if any data request fails (#87381)
* [maps] abort sync data if any data request fails

* review feedback

* fix broken rename of e to error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-11 12:28:24 -07:00
Kevin Logan 379f9c9646
[Security Solution] ensure that license is preserved when loading policy details (#87780) 2021-01-11 13:55:15 -05:00
Gidi Meir Morris f384c484b7
[Task Manager] adds additional polling stats to Task Manager monitoring (#87766)
Adds additional polling stats to Task Manager monitoring:

- **duration**: Running average of polling duration measuring the time from the scheduled polling cycle start until all claimed tasks are marked as running
- **claim_conflicts**: Running average of number of version clashes caused by the markAvailableTasksAsClaimed stage of the polling cycle
- **claim_mismatches**: Running average of mismatch between the number of tasks updated by the markAvailableTasksAsClaimed stage of the polling cycle and the number of docs found by the sweepForClaimedTasks stage
- **load** - Running average of the percentage of workers in use at the end of each polling cycle.
2021-01-11 18:32:24 +00:00
Chris Roberson d4b3ea9c3d
Ensure we use the right duration for messaging on this alert (#87579)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-11 13:27:32 -05:00
Justin Ibarra f12228e635
[Detection Rules] Add 7.11 rules (#87422)
* [Detection Rules] Add 7.11 rules
* add empty array for missing technique
2021-01-11 08:54:38 -09:00
Sandra Gonzales 61987df922
[Fleet] use package storage when getting a package (#85337)
* getPackageFromSource to use package storage

* fix type

* use bulkGet

* add data streams and policy templates to package info from storage

* fix merge conflict

* comment out policy_templates for now

* add policy_templates to package info, remove required inputs from parseAndVerifyPolicyTemplates

* add storage assets to cache

* tidy up

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-11 12:35:11 -05:00
Cauê Marcondes e3455ce35b
[APM] latencyAggregationType is not persisted when navigation to Transaction overview to detail (#87046)
* persisting latency aggregation type

* addressing PR comments

* removing useLatencyAggregationType hook

* addressing PR comments

* addressing PR comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-11 18:31:16 +01: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
Marco Liberati 132e85144b
[Lens] Add specific IP and Range/Interval sorting to datatable (#87006)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-11 16:51:00 +01:00
Christos Nasikas a1931acdc5
[Security Solution][Case] Attach alerts to cases: Tests (#86305)
Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-11 17:44:35 +02:00
Shahzad 8d385a4ebd
[Uptime] Fix kuery bar dark theme (#87827) 2021-01-11 16:30:01 +01:00
Liza Katz 3eeec0f571
[Search] Search Sessions Monitoring Task (#85253)
* Monitor ids

* import fix

* solve circular dep

* eslint

* mock circular dep

* max retries test

* mock circular dep

* test

* jest <(-:C

* jestttttt

* [data.search] Move search method inside session service and add tests

* merge

* Move background session service to data_enhanced plugin

* Better logs
Save IDs only in monitoring loop

* Fix types

* Space aware session service

* ts

* initial

* initial

* Fix session service saving

* merge fix

* stable stringify

* INMEM_MAX_SESSIONS

* INMEM_MAX_SESSIONS

* use the status API

* Move task scheduling behind a feature flag

* Update x-pack/plugins/data_enhanced/server/search/session/session_service.ts

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

* Add unit tests

* Update x-pack/plugins/data_enhanced/server/search/session/session_service.ts

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

* Use setTimeout to schedule monitoring steps

* Update request_utils.ts

* settimeout

* tiny cleanup

* Core review + use client.asyncSearch.status

* update ts

* fix unit test

* code review fixes

* Save individual search errors on SO

* Don't re-fetch completed or errored searches

* Rename Background Sessions to Search Sessions (with a send to background action)

* doc

* doc

* jest fun

* rename rfc

* translations

* merge fix

* merge fix

* code review

* update so name in features

* Move deleteTaskIfItExists to task manager

* task_manager to ts project

* Move deleteTaskIfItExists to public contract

* mock

* use task store

* ts

* code review

* code review + jest

* Alerting code review

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Anton Dosov <dosantappdev@gmail.com>
Co-authored-by: restrry <restrry@gmail.com>
2021-01-11 16:36:38 +02:00
Christiane (Tina) Heiligers 0549f94332
[DX] Management to TS projects (#87660)
* Adds management to tsconfig refs

* removes preemptive script fix
2021-01-11 07:14:22 -07:00
Jean-Louis Leysens 8a21b64007
prettify json (#87612)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-11 13:26:46 +01:00
Robert Oskamp 55fe83d4d1
[ML] API integration tests - fix sorting in saved object status test (#87800)
This PR fixes the sorting of response body jobs in the saved object status test.
2021-01-11 12:26:55 +01:00
Casper Hübertz c545b32755
[APM] Define placement “Right” to offset tooltip (#87729) 2021-01-11 10:58:06 +01:00
Pierre Gayvallet a0d33dc3a9
Fix UI glitch on SOM delete confirmation modal (#87623)
* extract delete confirm modal

* extract the export modal

* add data-test-subj to confirm modal

* add comment on why we can't use EuiConfirmModal
2021-01-11 10:26:02 +01:00
Dominique Clarke 0ff6965cb3
[Uptime] Fix/details page tabs (#86296)
* Remove tabs from details page

* update

* fix monitord id

* var name

* add Uptime PageHeader tests to test for the presences of tabs or header

* add Uptime MonitorPageTitle test

* Uptime adjust auto generated monitor id regex

* Uptime add tests for MonitorPageTitle to test behavior for missing monitor names and auto generated monitor ids

* remove history from MonitorPageTitle test

* adjust uptime tabs tests

* adjust MonitorPageTitle tests to mock useSelector

* adjust uptime PageHeader tests

* adjust import order in page_header.test

* add props to Uptime PageHeader to determine render, rather than route context

* alphabetize props in Uptime PageHeader

* remove header from individual pages

* add indepdent page header route that matches all paths

* adjust monitor tests to use mockReduxHooks helper, and add mockReactRouterDomHooks

* update tests

* adjust header spacing

Co-authored-by: Shahzad <shahzad31comp@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-10 20:55:43 -05:00
Quynh Nguyen db022a3550
[ML] Fix earliest and latest texts for date fields (#87482)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-08 13:23:54 -06:00
Tiago Costa e20817e57c
chore(NA): move grokdebugger plugin test fixtures out of __tests__ folder (#87765) 2021-01-08 16:23:55 +00:00
Patryk Kopyciński 5c4e23045c
[Security Solution] Refactor Cypress scenarios to use internal contex… (#86609) 2021-01-08 11:10:37 +01:00
Angela Chuang 4986bea8b6
[Security Solution] Unskip cypress tests (#86653)
* unskip data provider cypress test

* remove extra whitespace for filter classes

* remove cy.wait

* update functional test

* fix cypress and add tabType to dataTestSubj

* fix cypress test

* revert createNewTimeline task

* fix dependency

* fix line error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-08 06:59:05 +00:00
Tyler Smalley 91d73cf981 skip flaky suite (#87105) 2021-01-07 15:32:01 -08:00
Davis Plumlee 285809e6b5
[Security Solution][Detections] Alert table status update bug (#87243) 2021-01-07 15:14:30 -07:00
Tiago Costa 354a79a280
chore(NA): move watcher plugin tests out of __tests__ folder (#87599)
* chore(NA): move watcher plugin tests out of __tests__ folder

* chore(NA): renaming client_integration into tests_client_integration

* chore(NA): rename test helper config file

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-07 21:44:26 +00:00