Commit graph

36720 commits

Author SHA1 Message Date
Alejandro Fernández Haro
66866d0af1
[Usage Collection] [schema] reporting + add MappedType support (#78591) 2020-09-29 19:00:09 +01:00
MadameSheema
8282dd7066
unskips events viewer spec (#78797) 2020-09-29 19:59:30 +02:00
gchaps
823ccb82ea
[DOCS] Updates KQL doc (#77817)
* [DOCS] Updates KQL doc

* [DOCS] Edits to KQL doc

* Update docs/discover/kuery.asciidoc

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

* Update docs/discover/kuery.asciidoc

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

* Update docs/discover/kuery.asciidoc

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

* Update docs/discover/kuery.asciidoc

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

* Update docs/discover/kuery.asciidoc

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

* Update docs/discover/kuery.asciidoc

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

* Update docs/discover/kuery.asciidoc

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

* Update docs/discover/kuery.asciidoc

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

* Update docs/discover/kuery.asciidoc

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

* Update docs/discover/kuery.asciidoc

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

* Update docs/discover/kuery.asciidoc

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

* Update docs/discover/kuery.asciidoc

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

* Update docs/discover/kuery.asciidoc

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

* Update docs/discover/kuery.asciidoc

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

* Apply suggestions from code review

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

* [DOCS] Adds image of autocomplete and other edits

* [DOCS] Minor edit to KQL doc

* [DOCS] Minor edit

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
2020-09-29 10:57:30 -07:00
Devon Thomson
33f8ebd335
[Dashboard] Store Expanded Panel Id in URL (#78684)
* Added expandedPanelId to dashboard app state
2020-09-29 13:50:13 -04:00
Alexey Antonov
65cafcd9c9
[Vega] Add vega maps statistics to usage collector (#78546)
* telemetry

* [Vega] Add vega maps statistics to usage collector

Closes: #78269

* add tests

* ignore sample data visualizations

* fix PR comment

* get default vega vis from home plugin

* match_phrase doesn't work for full text search

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 20:29:53 +03:00
Devon Thomson
ef5702bb8e
[Dashboard] Maximize Panel Title Copy (#78690)
* Changed copy for expand panel action -> maximize panel.
2020-09-29 13:28:02 -04:00
Joe Reuter
dbef60d3f1
[Lens] Reduce initial bundle size (#78142) 2020-09-29 19:00:29 +02:00
Sushrut Kasture
5cdd93285e
Prevent multiple calls to backend from UI (#77970)
* Prevent multiple call to backend from UI

- Prevent multiple calls to backend from UI on updating the filters

* Committing the fix

- Watch only for the combined change in typesFilter and actionTypesFilter

* UseEffect on string of typeFilter and actionTypeFilter

- We are only concerned about the values of the two
props and not whether the object references change.
In other words, two separate empty arrays should be
same for us.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 09:56:01 -07:00
Robert Austin
d37e6f50d3
[Resolver] Fetch related events from the server. (#78780)
* When the user views related events for a node, fetch them from the server.
* In code related to showing event, filtered by category, for a given node: changed variable and function names from  `eventType` to `eventCategory` to better present the actual behavior.
* In the query string value that holds the panel parameters: changed `eventType` to `eventCategory` to better represent the value.
2020-09-29 12:50:41 -04:00
Lukas Olson
75e09bf56e
[Search] Add shard delay aggregation (#77423)
* [Search] [WIP] Add shard delay aggregation

* Add expression functions

* Register function

* Fix test

* Add comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 09:44:43 -07:00
Jen Huang
c5cacfe508
[Ingest Manager] Add namespace max length limit (#78522)
* Add namespace limit validation rule

* Fix tests

* Revise error message

* Remove console.log
2020-09-29 09:28:43 -07:00
gchaps
dffd631217
[DOCS] Edits copy in Reporting Diagnostics tool (#77833)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 09:12:13 -07:00
Tim Sullivan
aa9131f641
[Reporting] Add Refresh parameter to Delete query (#78516)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 09:10:33 -07:00
MadameSheema
ca2fef3cab
unskips events tests (#78753)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 17:56:49 +02:00
Michail Yasonik
7b07fa53ef
Use more specific rule skipping for a11y tests (#77647) 2020-09-29 10:56:25 -05:00
Jen Huang
b412b68aed
[Fleet] Rename CONFIG_CHANGE action to POLICY_CHANGE (#78221)
* Initial pass at config->policy change action

* Make policy change action BWC with agent <= 7.9

* Fix test

* Add agent action SO migration for policy change actions

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 08:20:02 -07:00
Constance
e873848cc1
[Enterprise Search] DRY out createHref helper for navigateToUrl calls (#78717)
* DRY out createHref helper
- that navigateToUrl will shortly also use

+ fix mockHistory type complaint

* KibanaLogic: Update navigateToUrl to use createHref helper

+ add param.history value, since we're technically supposed to be using Kibana's passed history over anything from useHistory

* Update breadcrumbs & eui link helpers w/ new KibanaLogic changes

- navigateToUrl is now double-dipping createHref, so we update it to not do so
- remove useHistory in favor of grabbing history from KibanaLogic

* [Optional?] Update FlashMessages to grab history from KibanaLogic

- since we're now storing it there, we might as well grab it as well instead of passing in props?

* [Misc] Fix failing tests due to react router mock
2020-09-29 08:18:58 -07:00
Spencer
66ad3b4ad2
[dev/watching] upgrade chokidar and remove missing source dirs (#78723)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-09-29 08:14:20 -07:00
Brent Kimmel
f19cc7790c
[Security Solution][Resolver]Add test subj to crumb (#78683)
* [Security Solution][Resolver]Add test subj to crumb

* J Buttner review: camel case name

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 11:11:55 -04:00
Shahzad
8375c02465
[UX]Remove duplicate legend string (#78763) 2020-09-29 16:55:09 +02:00
Andrew Wilkins
9ea4984016
update apm index pattern (#78732) 2020-09-29 22:38:31 +08:00
nnamdifrankie
9e9a48be62
78024: move transform out of dataset (#78216)
* 78024: move transform out of dataset

* Change index prefix

* 78024: fix tests, remove vestiges

* 78024: remove index defined in the transform when transform is removed.

* 78024: clean up

* 78024: fix build

* 78024: add comment

* 78024: remove test I added

* 78024: more removal, will add in next PR

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 10:30:04 -04:00
Tre
f73bc48b3b
[QA][Code Coverage] Upload the coverage static site before ingestion (#78695) 2020-09-29 08:29:22 -06:00
Wylie Conlon
e66d8ff35d
[Discover] Make _source field not clickable (#78698) 2020-09-29 10:24:21 -04:00
Nicolas Chaulet
cfa50747e7
[Fleet] Rename Ingest Manager => Fleet, Fleet => Agents in the UI (#78685) 2020-09-29 10:06:20 -04:00
Dario Gieselaar
cd8d512617
[APM] Review feedback from distribution + transaction metrics (#78752) 2020-09-29 16:00:38 +02:00
Alison Goryachev
6f3301232c
[Ingest pipelines] Add ability to stop pipeline simulation (#78183) 2020-09-29 09:29:07 -04:00
Shahzad
fdee5e59a7
[CSM] Fix core vital legend background (#78273)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 13:54:43 +02:00
Alejandro Fernández Haro
406c47af46
[Usage Collection] [schema] Support spreads + canvas definition (#78481) 2020-09-29 12:42:13 +01:00
Mikhail Shustov
a3b3a4d2f3
fix lodash imports (#78456) 2020-09-29 13:22:55 +02:00
Elizabet Oliveira
895eb09c92
[Maps] Add layer type preview icons (#78650)
* Added layer type preview icons

* Added margin tops
2020-09-29 12:05:24 +01:00
Dario Gieselaar
87ad564b59
[APM] Use transaction metrics for distribution charts (#78484)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 13:00:32 +02:00
Shahzad
2fbf9b947a
[Uptime] Ml anomaly alert edit (#76909)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 12:23:39 +02:00
Walter Rafelsberger
61aac716b3
[ML] Limit exposing shared static code through ml/public/index.ts. (#77745)
- Clean up lodash imports.
- Import types only where applicable.
- Reduce page load bundle size by fetching more code asynchronously.
2020-09-29 11:57:53 +02:00
Peter Pisljar
bddf8ed64a
making expression debug info serializable (#78727) 2020-09-29 11:42:21 +02:00
Anton Dosov
69ac94c4bd
fix lodahs imports in app-arch code (#78582)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 11:01:02 +02:00
Tim Roes
119da5903c
Make Field a React.lazy export (#78483)
* Make Field a React.lazy export

* Fix broken types

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 10:57:24 +02:00
MadameSheema
728502646e
[Security Solution] Improves detections tests (#77295)
* improves 'Creates and activates a new custom rule' test

* fixes constant problem

* improves 'Creates and activates a new custom rule with override option' test

* improves 'Creates and activates a new threshold rule' test

* refactor

* fixes type check issue

* improves assertions

* removes unused code

* changes variables for constants

* improves 'waitForTheRuleToBeExecuted' test

* improves readability

* fixes jenkins error

* refactor

* refactor

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 10:35:06 +02:00
Diana Derevyankina
6f2fd54c67
[TSVB] Different field format on different series is ignored (#78138)
* [TSVB] Different field format on different series is ignored

Closes #74951

* Replace formatter of Y axis with simple value instead of formatter of the first series

* Add a condition to Y-axis tickFormatter to display formatted value if there's only one series

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 11:07:06 +03:00
Rudolf Meijering
d7d96d9864
RFC: Improve saved object migrations (#66056)
* RFC: Improve saved object migrations

* Added rolling upgrades as alternative

* Clarify advantage of re-using index for avoiding max shards open errors

* Add more detail about how dry run migrations and invalid document exports will be exposed to users

* Add separate section to highlight assumptions and tradeoffs

* Apply nits from code review

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

* Move 'Single node migrations coordinated through a lease/lock' under alternatives

* Fix 5.2.2 document lock algorithm step 3.2

* Minor clarificiations

* Minimizing data loss with mixed Kibana versions: move 7.x algorithm into alternatives and clarify 8.x algorithm

* Adds impact idempotent restrictions have on upcoming/requested migration features

* nit: clarify 4.3.1.2.3

Clarify that if documents already exist, they aren't overwritten.

Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>

* Update 4.5.2: we need only one version-specific alias, not separate read/write aliases

* Add 4.0.4 the assumption that a saved object type will only ever be registered by one plugin

* Updates 4.3.1.2: Adds mappings compatibility check, adds soft deletes to prevent lost deletes, add note about data loss with mixed plugins on the same kibana version

* Don't try to minimize data loss for unsupported configurations, update index mappings during 8.x migration

 - Move "4.5.2 Minimizing data loss with mixed Kibana versions (9.0)" to
 alternatives section. Expand this section with a more detailed algorithm as
 well as enumerating some data loss scenarios that could still occur.
 - Add the supported upgrade procedure which guarantees no undetected data loss.
 - Update "4.5.1 Migration algorithm (8.0)"
   - Added a step to update index mappings
   - If there's update version mismatch errors, complete all batches before
     restarting the migration to improve performance.

* Flesh out upgrade and rollback procedure with gracefull shutdown

* New migration algorithm, upgrade procedure based on index cloning and new ES features

* Minor: clarify that index cloning algorithm solves (2.6) but (2.7) is out of scope

* Move 'Tag objects as invalid if their transformation fails' to the alternatives section

* Don't migrate when there's orphan documents so that rollback is always possible. Updates: 4.2.1.2 Migration algorithm: Cloned index per version & 4.2.1.4 Handling documents that belong to a disabled plugin

* Link to new Elasticsearch features required for the implementation

* 4.2.1.2 Clarify the purpose of the target index postfix

* Add open questions around mappings growing over time. Fix rollback index example

* minor: fix formatting

* Update assumptions and tradeoffs to match latest algorithm

* Review feedback
 - Remove 4.0.2 since the latest algorithm resolves the tradeoff
 - 4.2.1.2 should handle v6 `.kibana` indexes

* More alternatives for 4.2.1.4 Handling documents that belong to a disabled plugin. Don't introduce breaking changes in 7.x

* Handle new ES cluster without any indices. Fix clone API parameters

* Update 4.2.1.2: transform outdated documents on every startup, only fail for unknown types in 8.x

Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
2020-09-29 09:34:54 +02:00
MadameSheema
19a8fa4d10
[Security Solution] Fixes url timeline flaky test (#78556)
* fixes url timeline flaky test

* fixes type check issue

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 08:58:40 +02:00
MadameSheema
87b25d5a8f
adds retryability feature (#78611) 2020-09-29 08:58:20 +02:00
Tyler Smalley
da134f3a8f
Aligns several module versions across the repository (#78327)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-28 16:08:22 -07:00
Nathan L Smith
a740f7d502
Empty prompt and loading spinner for service map (#78382)
* Empty prompt for service map

To be shown when fetching returns no elements. Match the style of the license prompt.

* Add loading spinner
2020-09-28 17:09:44 -05:00
Ryan Keairns
3094ca1409
Change progress bar to spinner (#78460)
* Change progress bar to spinner

* Add progress bar option for full screen mode

* Update snapshots for router test

* Update snapshots for loading indicator test

* Update header snapshot

* Change progress bar position to fix full screen
2020-09-28 16:27:15 -05:00
Tre
3a73e0b2ac
[QA][Code Coverage] Coverage teams lookup w/o Additional Config (#77111)
* [QA][Code Coverage] Coverage teams lookup

* Fix test per cr.

* Drop unused fn's.

* Add integration test to prove that the sys does indeed
strip the CC prefix and still walks the fs.

* Cleanup "todo" list.

* Use import, like Dima's previous suggestion.

* Add coverage teams only definitions to CODEOWNERS per Lee.

* Add coverage teams for logstash, reporting and security.

* Update description.

* Update names per Lee.

* Drop mutation.

* Fix dupes.

* Add the file check, per Dima

* Add more teams

* Update regex to only match on "build/" and add test.

* More teams

* More teams

* Add print statement of the canonical timestamp,
so we can lookup stuff in gcp during errors.

* CR fixups
2020-09-28 15:27:02 -06:00
Josh Dover
085cac13f2
Slim down core bundle (#75912)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-28 15:24:23 -06:00
Patrick Mueller
feab3e3b02
[Alerting] retry internal OCC calls within alertsClient (#77838)
During development of https://github.com/elastic/kibana/pull/75553,
some issues came up with the optimistic concurrency control (OCC) we
were using internally within the alertsClient, via the `version`
option/property of the saved object. The referenced PR updates new
fields in the alert from the taskManager task after the alertType
executor runs. In some alertsClient methods, OCC is used to update
the alert which are requested via user requests. And so in some
cases, version conflict errors were coming up when the alert was
updated by task manager, in the middle of one of these methods. Note:
the SIEM function test cases stress test this REALLY well.

In this PR, we wrap all the methods using OCC with a function that
will retry them, a short number of times, with a short delay in
between. If the original method STILL has a conflict error, it
will get thrown after the retry limit.  In practice, this eliminated
the version conflict calls that were occurring with the SIEM tests,
once we started updating the saved object in the executor.

For cases where we know only attributes not contributing to AAD are
being updated, a new function is provided that does a partial update
on just those attributes, making partial updates for those attributes
a bit safer. That will be also used by PR #75553.
2020-09-28 16:42:13 -04:00
Spencer
f5ca7d82d5
[kbn/optimizer] only build xpack examples when building xpack plugins (#78656)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-09-28 13:25:15 -07:00
Jonathan Buttner
e75b36a68d
[Ingest Manager] Ingest setup upgrade (#78081)
* Adding bulk upgrade api

* Addressing comments

* Removing todo

* Changing body field

* Adding helper for getting the bulk install route

* Adding request spec

* Pulling in Johns changes

* Removing test for same package upgraded multiple times

* Adding upgrade to setup route

* Adding setup integration test

* Clean up error handling

* Beginning to add tests

* Failing jest mock tests

* Break up tests & modules for easier testing.

Deal with issue described in https://github.com/facebook/jest/issues/1075#issuecomment-221771095

epm/packages/install has functions a, b, c which are independent but a can also call b and c

function a() {
  b();
  c();
}

The linked FB issue describes the cause and rationale (Jest works on "module" boundary) but TL;DR: it's easier if you split up your files

Some related links I found during this journey

 * https://medium.com/@qjli/how-to-mock-specific-module-function-in-jest-715e39a391f4
  * https://stackoverflow.com/questions/52650367/jestjs-how-to-test-function-being-called-inside-another-function
   * https://stackoverflow.com/questions/50854440/spying-on-an-imported-function-that-calls-another-function-in-jest/50855968#50855968

* Add test confirming update error result will throw

* Keep orig error. Add status code in http handler

* Leave error as-is

* Removing accidental code changes. File rename.

* Missed a function when moving to a new file

* Add missing type imports

* Lift .map lambda into named outer function

* Adding additional test

* Fixing type error

Co-authored-by: John Schulz <john.schulz@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-28 16:12:34 -04:00