Commit graph

39874 commits

Author SHA1 Message Date
Brandon Morelli
491f6735ce
docs: add more info on http transactions/span (#95598) (#95669) 2021-03-29 11:47:50 -04:00
Kibana Machine
b205abf2bc
[Event Log] Extend ECS event schema with fields needed for Detection Engine (#95067) (#95654)
**Related to:** https://github.com/elastic/kibana/pull/94143

## Summary

This PR adds new fields to the schema (`EventSchema`, `IEvent`):

- standard ECS fields: `error.*`, `event.*`, `log.level`, `log.logger`, `rule.*`
- custom field set `kibana.detection_engine`

We need these fields on the Detections side to implement detection rule execution log. See the related proposal (https://github.com/elastic/kibana/pull/94143) for more details.

Also, this PR bumps ECS used in Event Log from `1.6.0` to the current `1.8.0` version. They are 100% same in terms of fields used in Event Log, so no changes in the schema were caused by this version increment.

Co-authored-by: Georgii Gorbachev <georgii.gorbachev@elastic.co>
2021-03-29 11:16:17 -04:00
Larry Gregory
a542d12b78
[7.x] Move production dependencies out of devDependencies (#93997) (#95581)
* Move production dependencies out of devDependencies (#93997)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	package.json

* update lockfile
2021-03-29 10:40:51 -04:00
Marta Bondyra
408527809a
[Lens] remove warnings when running tests (#95637) (#95648) 2021-03-29 10:35:58 -04:00
Marta Bondyra
9393be0618
[Lens] Multiple drop targets (#93616) (#95646) 2021-03-29 10:18:57 -04:00
Tiago Costa
a056e47edc
skip flaky suite (#94532) 2021-03-29 13:21:08 +01:00
Tiago Costa
7977d493ce
skip flaky suite (#91450) 2021-03-29 13:06:25 +01:00
Alexey Antonov
7bf2d4c1ba
[TSVB] Enable dual mode, support index patterns and strings (#92812) (#95631)
* [TSVB] Enable `dual mode`, support index patterns and strings

* modify UI

* add migration script

* refactoring

* fix CI

* prefill the index pattern name

* modify UI

* modify UI

* update UI

* fix functional test

* some work

* remove callouts

* fix rollup test

* update UI

* fix typo

* add some unit tests

* add functional test

* fix CI

* correct labels

* fix ci group 12

* cleanup interface

* fix CI

* cleanup API

* fix some of PR comments

* move index patterns into so references

* remove wrong logic

* fix JEST

* fix some ui issues

* update sample data

* indexPatternObject -> indexPatternValue

* fix comments

* I have a dashboard with two TSVB viz. One with the default (haven't applied it to the combobox) and one with the logs. The filter contains fields only from the logs index pattern

* When I am on the string mode and try to write my index, sometimes some of the chars are not added or they are deleted while typing, something with the denounce maybe?

* fix merge conflicts

* Does this PR also supports runtime fields? I created one from the editor and I see that I can select it

* fix UI issue

* If I create a viz with the string mode and a wildcard e.g. kibana_sample*, the index patterns are not communicated correctly to the dashboard.

* fix import/export refs for dashboard

* remove MigrationPopover

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-29 07:43:17 -04:00
Kibana Machine
ecedd6b8bb
[APM] Add elasticsearch queries to api response (#95146) (#95625)
Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com>
2021-03-29 03:59:17 -04:00
Oliver Gupte
fcb57c3e58
[APM] Fix for correlations inconsistent loading errors in Errors tab (#93443) (#95437) (#95588)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-29 00:21:06 -07:00
Kibana Machine
e56eb3846f
[Security Solution] Split rule executor by rule type and validate type specific rule params (#94857) (#95607)
* Split rule executors into different files

* Pass type-specific rule SOs to rule executor functions

* Genericize function to narrow ruleSO type

* Remove undefined return type from getExceptions

* Remove unintentional change to SIGNALS_TEMPLATE_VERSION

* Remove extra validation now covered by schemas

* Remove extra validation from ML rule executor

* Fix types

* syncs schemas

* Revert "syncs schemas"

This reverts commit b1dd59e3f0.

* Fix api test and move threshold executor test

* kinda adds eql test

* Refactor and fix unit tests

* fixes marshalls mistake

Co-authored-by: Davis Plumlee <davis.plumlee@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Marshall Main <55718608+marshallmain@users.noreply.github.com>
Co-authored-by: Davis Plumlee <davis.plumlee@elastic.co>
2021-03-27 01:02:18 -04:00
Yuliia Naumenko
f3715abd2e
[Alerts][Actions] Added missing telemetry mapping for a new alert and action types: geo-containment, es-query, teams (#95464) (#95606)
* [Alerts][Actions] Added missing telemtry mapping for a new alert and action types: geo-containment, es-query, teams

* fixed mappings

* fixed ML alert type telemetry mappings

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-27 00:53:25 -04:00
Yara Tercero
3c57b175a4
[Security Solution][Exceptions][Builder] -Move exception builder entry item exceptions ui over to lists (#94515) (#95585)
## Summary

Beginning to move the exceptions UI out of the security solution plugin and into the lists plugin. In order to keep PRs (relatively) small, I plan to move single components at a time. This should also then help more easily pinpoint the source of any issues that come up along the way.

The next couple PRs will focus on the exception builder. This one in particular is focused on moving over the `BuilderEntryItem` which deals with rendering the individual exception item entries. An entry can be of type `match`, `match_any`, `list`, `exists`, or `nested`. The component makes use of the autocomplete fields which use the index patterns to display possible fields and field values. 

One of the decisions made in this PR was to have consumers of the `BuilderEntryItem` pass through the autocomplete service as opposed to the `lists` plugin adding it as a dependency. The reason being that it is likely that plugins using the lists plugin will already be consuming either the data plugin or if alerting takes exceptions in, then they'll be consuming alerting. In an effort to avoid some possible icky circular dependency issues, though it best to make the service passed in, as we had already been doing with the hooks in the `lists` plugin.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-26 23:56:45 -04:00
Brian Seeders
0cc11ae67e skip flaky suite (#95590) 2021-03-26 20:37:33 -04:00
Kibana Machine
544e562275
[Fleet] /bulk_unenroll response matches other bulk action APIs (#95571) (#95593)
## Summary
`/agents/bulk_unenroll` should return a response with a result for each agent given; including invalid or missing ids. It currently returns an empty object. https://github.com/elastic/kibana/issues/90437


[TS type diff for response](dd34e4c5ef/x-pack/plugins/fleet/common/types/rest_spec/agent.ts (L124-L130))

```diff
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
- export interface PostBulkAgentUnenrollResponse {}
+ export type PostBulkAgentUnenrollResponse = Record<
+   Agent['id'],
+   {
+     success: boolean;
+     error?: string;
+   }
+ >;
```

### 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

Co-authored-by: John Schulz <john.schulz@elastic.co>
2021-03-26 19:53:26 -04:00
Brian Seeders
898475e57b skip flaky suite (#95594) 2021-03-26 17:46:23 -04:00
Brian Seeders
f03bed650f skip failing suite blocking ES promotion (#95592) 2021-03-26 17:40:20 -04:00
Kibana Machine
3c14e0bb1b
[Workplace Search] Design polish: overview page (#95363) (#95578)
* Rework panels to subdued style

* Fix button when source has been onboarded

* Update content_section test for EuiSpacer

* Update content_section test for EuiSpacer Length

* Lint fix for onboarding_card

* Remove spacer size due to default

Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>

* Remove test line for Spacer now that size=default

Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: John Barrier Wilson <johnbarrierwilson@gmail.com>
Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
2021-03-26 17:23:16 -04:00
Kibana Machine
be804cd4d9
Add policy_output_permissions_hash field to .fleet-agents mapping (#95410) (#95579)
Co-authored-by: Aleksandr Maus <aleksandr.maus@elastic.co>
2021-03-26 17:20:27 -04:00
Kibana Machine
cb38b0b6aa
[Fleet] add support for fleet server urls (#94364) (#95574)
Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
2021-03-26 17:05:02 -04:00
Lisa Cawley
dcc8d306f3
Use documentation link service for runtime fields (#95256) (#95570) 2021-03-26 16:46:06 -04:00
Yuliia Naumenko
6ba5352a1a
[Alerts UI] Fixed significant delay during disabling/enabling alerts (#95373) (#95559)
* [Alerts UI] Fixed significant delay during disabling/enabling alerts

* fixed test
2021-03-26 16:43:21 -04:00
Aaron Caldwell
bd5753fb42
[Maps] Add drawing index data endpoint (#94728) (#95568) 2021-03-26 16:38:22 -04:00
Kibana Machine
756131135a
[App Search] Refactor EuiPageHeader components to use new props instead of children (#95454) (#95566)
* Update EuiPageHeaders with basic titles

* Update engine creation views

- meta engine - move to description
+ misc fix - non-heading EuiTitles that do not match the standalone UI

* Update EuiPageHeaders with simpler actions

* Update Documents page header

+ test reorg - move DocumentCreationButton tests to its own test block

* Update EnginesOverviewHeader (+ refactors)

- Switch from FormattedMessage to i18n to match rest of repo
- Switch to eslint-disbable instead of doing a buttonProps workaround (this will get deleted anyway post-migration)

* whoops

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
2021-03-26 16:30:23 -04:00
Marco Vettorello
7d3ce76ad1
Update dependency @elastic/charts to v26 (master) (#95184) (#95564)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-26 16:11:02 -04:00
Kibana Machine
71820cd9cf
Migrate away from legacyEs service in tests. (#95402) (#95561)
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
2021-03-26 20:03:47 +00:00
Yuliia Naumenko
5d4b282488
[Task Manager] Fixed the behavior of the claiming tasks function failing, when inline scripts are disabled. (#94870) (#95560)
* [Task Manager] Fixed the behavior of the claiming tasks funtion failing, when inline scripts are disabled.

* added docs

* fixed test

* added tests

* fixed due to comments

* Fixed docs due to comments

* extended TM configuration changes message with the possible errors description
2021-03-26 16:02:31 -04:00
Anton Dosov
a49c55c433
[Search Sessions] Rename search sessions functional tests. Remove wip mention (#95330) (#95554)
# Conflicts:
#	.github/CODEOWNERS
#	x-pack/scripts/functional_tests.js
2021-03-26 15:24:23 -04:00
Kibana Machine
003697b49b
Changes to the connector API doc URLs (#95515) (#95575)
* Initial commit

* Remove 'API' from title abbreviations

* Merge deprecated warning w/ alternative solution

Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
2021-03-26 15:06:56 -04:00
Kibana Machine
0ae48b1de2
Add button on non-MVP pages to link to personal dashboard (#95441) (#95548)
Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
2021-03-26 18:59:59 +00:00
Anton Dosov
f4cd483737
[Data] Unify autocomplete plugin (#95405) (#95549)
Move KQL suggestions to data plugin
2021-03-26 14:58:24 -04:00
Kibana Machine
70f0dfed10
[Fleet] Bulk upgrade api response change (#95236) (#95547)
## Summary
`/agents/bulk_upgrade` should return a response with a result for each agent given; including invalid or missing ids. It currently returns an empty object.

This PR includes commits from open PR https://github.com/elastic/kibana/pull/95024. The additions from this PR are https://github.com/jfsiii/kibana/compare/bulk-reassign-response-should-include-all-given-agents..871ebcb

[TS type diff for response](https://github.com/jfsiii/kibana/compare/bulk-reassign-response-should-include-all-given-agents..871ebcb#diff-7006a6c170a608c8c7211fc218c0a6f4bc8ff642c170ea264db4b1b5545fb728)

```diff
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
- export interface PostBulkAgentUpgradeResponse {}

+ export type PostBulkAgentUpgradeResponse = Record<
+   Agent['id'],
+   {
+     success: boolean;
+     error?: string;
+   }
+ >;
```

### 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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: John Schulz <john.schulz@elastic.co>
2021-03-26 14:51:43 -04:00
Kibana Machine
394d674eab
change layout of top values function (#95412) (#95546)
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
2021-03-26 14:26:58 -04:00
Kibana Machine
30abcf5b4c
Add error.stack_trace to the default log formatter (#94906) (#95544)
Co-authored-by: Felix Barnsteiner <felixbarny@users.noreply.github.com>
2021-03-26 14:24:43 -04:00
Kibana Machine
01f17e9640
[ML] Replace legacy es client in Transform API service for functional tests (#95545)
Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
2021-03-26 14:24:23 -04:00
Kibana Machine
974b1f738a
[Uptime] Update query for ping histogram (#95495) (#95541)
Co-authored-by: Shahzad <shahzad.muhammad@elastic.co>
2021-03-26 14:04:11 -04:00
David Sánchez
8a6f549673
[Security Solution] Put Artifacts by Policy feature behind a feature flag (#95284) (#95497)
* Added sync_master file for tracking/triggering PRs for merging master into feature branch

* removed unnecessary (temporary) markdown file

* Trusted apps by policy api (#88025)

* Initial version of API for trusted apps per policy.

* Fixed compilation errors because of missing new property.

* Mapping from tags to policies and back. (No testing)

* Fixed compilation error after pulling in main.

* Fixed failing tests.

* Separated out the prefix in tag for policy reference into constant.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

* [SECURITY_SOLUTION][ENDPOINT] Ability to create a Trusted App as either Global or Policy Specific (#88707)

* Create form supports selecting policies or making Trusted app global
* New component `EffectedPolicySelect` - for selecting policies
* Enhanced `waitForAction()` test utility to provide a `validate()` option

* [SECURITY SOLUTION][ENDPOINT] UI for editing Trusted Application items (#89479)

* Add Edit button to TA card UI
* Support additional url params (`show`, `id`)
* Refactor TrustedAppForm to support Editing of an existing entry

* [SECURITY SOLUTION][ENDPOINT] API (`PUT`) for Trusted Apps Edit flow (#90333)

* New API route for Update (`PUT`)
* Connect UI to Update (PUT) API
* Add `version` to TrustedApp type and return it on the API responses
* Refactor - moved some public/server shared modules to top-level `common/*`

* [SECURITY SOLUTION][ENDPOINT] Trusted Apps API to retrieve a single Trusted App item (#90842)

* Get One Trusted App API - route, service, handler
* Adjust UI to call GET api to retrieve trusted app for edit
* Deleted ununsed trusted app types file
* Add UI handling of non-existing TA for edit or when id is missing in url

* [Security Solution][Endpoint] Multiple misc. updates/fixes for Edit Trusted Apps (#91656)

* correct trusted app schema to ensure `version` is not exposed on TS type for POST
* Added updated_by, updated_on properties to TrustedApp
* Refactored TA List view to fix bug where card was not updated on a successful edit
* Test cases for card interaction from the TA List view
* Change title of policy selection to `Assignment`
* Selectable Policy CSS adjustments based on UX feedback

* Fix failing server tests

* [Security Solution][Endpoint] Trusted Apps list API KQL filtering support (#92611)

* Fix bad merge from master
* Fix trusted apps generator
* Add `kuery` to the GET (list) Trusted Apps api

* Refactor schema with Put method after merging changes with master

* WIP: allow effectScope only when feature flag is enabled

* Fixes errors with non declared logger

* Uses experimental features module to allow or not effectScope on create/update trusted app schema

* Set default value for effectScope when feature flag is disabled

* Adds experimentals into redux store. Also creates hook to retrieve a feature flag value from state

* Hides effectPolicy when feature flag is not enabled

* Fixes unit test mocking hook and adds new test case

* Changes file extension for custom hook

* Adds new unit test for custom hook

* Hides horizontal bar with feature flag

* Compress text area depending on feature flag

* Fixes failing test because feature flag

* Fixes wrong import and unit test

* Thwrows error if invalid feature flag check

* Adds snapshoot checks with feature flag enabled/disabled

* Test snapshots

* Changes type name

* Add experimentalFeatures in app context

* Fixes type checks due AppContext changes

* Fixes test due changes on custom hook

Co-authored-by: Paul Tavares <paul.tavares@elastic.co>
Co-authored-by: Bohdan Tsymbala <bohdan.tsymbala@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Paul Tavares <56442535+paul-tavares@users.noreply.github.com>

Co-authored-by: Paul Tavares <paul.tavares@elastic.co>
Co-authored-by: Bohdan Tsymbala <bohdan.tsymbala@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Paul Tavares <56442535+paul-tavares@users.noreply.github.com>
2021-03-26 13:49:10 -04:00
Kibana Machine
7c3a7823d3
[Workplace Search] Update global state when org nane changes (#95448) (#95534)
Currently we instantiate the Workplace Search app with server props passed in from the server on initial page load. This data includes the organization name. In our settings section, we poll the server to get update information, but once the data is change, the global state does not get updated on a route change. This is only a problem in the case where a user has changed their org name and returns to the overview page before reloading the page. When this happens, the onboarding step asking the user to change thier org name is still visible.

Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
2021-03-26 17:39:45 +00:00
Kibana Machine
0abdd0c90c
[Lens] Allow modifying curve type for line/area series charts (#94675) (#95536)
Co-authored-by: Shahzad <shahzad.muhammad@elastic.co>
2021-03-26 17:38:10 +00:00
Kibana Machine
570bfa674d
[ML] Fix Transform runtime mappings retain original definition when cloning (#95436) (#95537)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Quynh Nguyen <43350163+qn895@users.noreply.github.com>
2021-03-26 13:36:49 -04:00
Kibana Machine
a0da4c99a5
[Lens] Prepare Lens for jest-environment-jsdom migration (#95327) (#95530)
* 🐛 Fix activeElement issue with Jest

* 🏷️ Fix type issue

* 👌 Removed expect-errors directives

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2021-03-26 13:15:26 -04:00
Kibana Machine
fe3a6e0e5b
Unskip flaky spaces tests (#95207) (#95527)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
2021-03-26 12:38:29 -04:00
Matthew Kime
d8c01e6cc6
Index pattern field editor - Add warning and type 'confirm' on delete or save (#95237) (#95526)
* add runtime field change/delete confirm dialog
2021-03-26 12:32:40 -04:00
Kibana Machine
030f7a6e4d
[Observability] Update plugin start/setup types naming (#95301) (#95525)
Co-authored-by: Shahzad <shahzad.muhammad@elastic.co>
2021-03-26 16:02:06 +00:00
Thomas Neirynck
10c251a31b
[Maps] Remove invisible layers from querybar (#94943) (#95524) 2021-03-26 12:01:16 -04:00
Cauê Marcondes
810b7c8bc4
[APM] Split All instances API adding a new API to return comparison statistics (#94767) (#95522)
* adding comparison to instances table

* fixing tests

* adding api tests

* removing unnecessary files

* fixing ts issue

* fixing ts issue

* refactoring

* refactoring

* refactoring

* refactoring

* refactoring

* addressing PR comments

* addressing PR comments
2021-03-26 11:33:20 -04:00
Jonathan Buttner
c841686fba
[Cases] Fix _find API total bug (#95235) (#95517)
* Cherry-picking 7.12 find total fix

* Starting fix for total bug in master with new field

* Adding feature flag for sub cases

* Disabling case as a connector in security solution

* Adding additional tests for pagination

* Removing other api integration tests

* Fixing up problems from merge

* Fixing sub case tests and type errors

* Renaming comment tag for case connector
2021-03-26 11:09:40 -04:00
Kerry Gallagher
5bba03b17b
[Logs / Metrics UI] Separate logs / metrics source configuration awareness (#95334) (#95504)
* Remove metrics awareness of logs fields
2021-03-26 09:56:02 -04:00
Alexey Antonov
7bdbd51e38
[Timelion] Allow import/export of timelion-sheet saved object (#95048) (#95496)
* [Timelion] Allow import/export of timelion-sheet saved  object

Closes: #9107

* visualize.show -> timelion.show

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-26 09:43:29 -04:00
Kibana Machine
4e985c38c8
[Lens] Rename operations to map exposed names for Formula (#94710) (#95500)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2021-03-26 09:12:40 -04:00