Commit graph

13873 commits

Author SHA1 Message Date
spalger 541637993f move skip to higher level (#86952) 2021-02-01 17:52:53 -07:00
spalger f97958043f Revert "Migrations v2: don't auto-create indices + FTR/esArchiver support (#85778)"
This reverts commit 03636a07fe.
2021-02-01 17:46:45 -07:00
Lukas Olson 29e3886bcd
[data.search] Allow search response to follow new hits format (#88115)
* [data.search] Allow search response to follow new hits format

* Update docs

* Fix types

* Fix types

* Doc updates

* Remove declare module

* Remove declare module

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-01 17:06:32 -07:00
spalger af6ed3f556 skip flaky suite (#86952) 2021-02-01 16:49:27 -07:00
Angela Chuang 69752fab37
[Security Solution] Remove focustrap (#89905)
* remove focustrap

* remove focustrap

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-01 23:09:53 +00:00
Scotty Bollinger 0d5554591f
[Workplace Search] Add remaining i18n support for the Content Sources tree (#89910)
* Add i18n for Org Sources

Refactored a bit as well.
- Removed unnecessary variable declarations for constants.
- Removed empty strings for optional props passed to ContentSection

* Add i18n for private sources

* Add router i18n

* Add i18n to SourcesView

* Fix duplicate IDd

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-01 16:55:00 -06:00
Kevin Qualters 3c0d30cbfd
Add --ssl flag to make resolver generator use ssl with kbn and elasticsearch clients (#89873) 2021-02-01 17:34:57 -05:00
Christiane (Tina) Heiligers da28bd214c
TS project refs: Migrates grokdebugger (#89652) 2021-02-01 15:05:42 -07:00
Dmitry 2498f5719f
[load testing] add env vars to pass simulations and repo rootPath (#89544)
* [load testing] add env vars to pass simulations and repo rootPath

* pass simulation to sript as argument

* export GATLING_SIMULATIONS

* fix export

* add validation
2021-02-01 22:33:50 +01:00
Alison Goryachev bae179eb32
[Upgrade Assistant] Fix getFlatSettings() request (#89616) 2021-02-01 15:36:25 -05:00
Larry Gregory 7b06c13087
Prevent autocompleting the username field (#88682)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-01 15:31:21 -05:00
Bhavya RM d981391410
Addressing skipped a11y test on home with new data test subjects and redesign (#86531)
a11y tests for home page under default distribution
2021-02-01 15:21:54 -05:00
Nathan L Smith 5884daeba5
Remove circular dependecy between apm and infra (#89739)
* Move `getTraceUrl` in the APM plugin to `getApmTraceUrl` in the observability plugin and use that instead in infra.
* Remove unused APM plugin depenency in infra.
* Use `pathname` instead of `hash` in infra to apm link to avoid unnecessary redirect.
2021-02-01 14:09:33 -06:00
Oliver Gupte 07f8e48692
[APM] Consolidate various throughput calculations to a utility function (#89486) (#89578) 2021-02-01 12:05:56 -08:00
Alison Goryachev 6ea5889687
[Upgrade Assistant] Use kibana version value from core context (#89774) 2021-02-01 14:47:43 -05:00
Christiane (Tina) Heiligers 5c96da1e20
Migrate indexPatternManagement to TS project ref (#89759) 2021-02-01 12:24:07 -07:00
Quynh Nguyen 2f54078aed
[ML] Update cloning for jobs to use exclude_generated (#88898) 2021-02-01 13:06:37 -06:00
Mike Côté 51cfa90dc5
Add support for custom alert ids (#89814)
* Add support for custom alert ids

* UUID v4 also supported

* Change ESO custom id error message

* Update api integration test

* Use errors.createBadRequestError
2021-02-01 14:00:33 -05:00
Mikhail Shustov 4380c49d38
remove type dependency between index_management and fleet (#89699)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-01 19:32:55 +01:00
Thomas Neirynck 391ab72be1
[Maps] Add table source for choropleth mapping (#89263) 2021-02-01 12:43:03 -05:00
Sandra Gonzales 16500d89c2
[Metrics UI] remove middle number in legend and adjust calculation of max number (#89020)
* get midpoint of max and min instead of half of max number

* remove middle tick from stepped gradient legend

* use value instead of max values to calculate bounds

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-01 12:27:36 -05:00
Christiane (Tina) Heiligers 9787911c5f
Migrates ingest_pipelines to a TS project ref (#89505)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-01 10:26:33 -07:00
Jen Huang cb16a5c042
[Fleet] Update data streams mappings directly instead of against backing indices (#89660)
* Update data streams mappings directly instead of querying for backing indices, update integration tests to test with multiple namespaces

* Add flag to only update mappings of the current write index

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-01 09:24:12 -08:00
Patrick Mueller e4c344ada6
[data] change KQL node builder to not generate recursive and/or clauses (#89345)
resolves https://github.com/elastic/kibana/issues/88367

Prior to this PR, the KQL node_builder code was using recursion to generate
"and" & "or" expressions.  Eg, `and(foo1=bar1, foo2=bar2, foo3=bar3)` would
be generated as if was specified as `and(foo1=bar1, and(foo2=bar2, foo3=bar3))`.

Calls to the builder with long lists of expressions would generate nested JSON
as deep as the lists are long.  This is problematic, as Elasticsearch is
changing the default limit on nested bools to 20 levels, and alerting already
generates nested bools greater than that limit.
See: https://github.com/elastic/elasticsearch/issues/55303

This PR changes the generated shape of above, so that all the nodes are at the
same level, instead of the previous "recursive" treatment.
2021-02-01 12:22:29 -05:00
Tim Sullivan 8701ac85d3
Deprecate CSV job type (#89794)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-01 09:36:49 -07:00
Angela Chuang 9f4dae82c5
[Security Solution] Push new case to the connector when created (#89131)
* init push case

* fix connectorToUpdate

* add unit test

* revert change

* remove useEffect after case created

* add unit test

* add cancel flag

* update unit test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-01 16:35:37 +00:00
James Gowdy 178637ce29
[ML] Fixing saved object authorization check when security is disabled (#89850)
* [ML] Fixing saved object authorization check when security is disabled

* updating to use mode.useRbacForRequest for check
2021-02-01 16:19:56 +00:00
Josh Dover 19332c097a
Deprecate and remove usages of elasticsearch.logQueries (#89296)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-01 08:40:25 -07:00
ymao1 57453f1709
Some fixes from backport (#89746)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-01 10:17:59 -05:00
Pierre Gayvallet 688b918888
migrate legacy_export plugin to tsproject ref (#89858) 2021-02-01 16:00:48 +01:00
Rudolf Meijering 03636a07fe
Migrations v2: don't auto-create indices + FTR/esArchiver support (#85778)
* Migrations V2 on by default

* esArchiver delete migrations v2 indices

* Fix saved_objects_management api_integration tests

* Try to fix v2 migrations for pre-release builds

* esArchiver delete auto-created v2 migration indices like .kibana_8.0.0

* Try to fix v2 migrations for pre-release builds

* Use require_alias to prevent auto-created saved objects index

* Wrap SO routes until core logs all internal errors

* Fix api_integration tests requiring an empty kibana index

* Delete corrupt saved object from lens archives

* Update docs

* Fix ui_settings tests

* Fix core jest tests

* Fix type errors

* Fix accessibility tests

* Fix plugin functional tests

* Fix api_integration tests after merging in master

* Fix plugin functional tests #2

* EsArchiver: Don't reset ui settings after the .kibana index was deleted

* Fix functional management/visualize tests

* Fix oss security functional tests

* EsArchiver clean task manager indices to fix alerting api integration tests

* migrationsv2 correctly handle unknown saved object type mappings

* Revert "Try to fix v2 migrations for pre-release builds"

This reverts commit a1a1567501.

* Revert "Try to fix v2 migrations for pre-release builds"

This reverts commit a9a935558c.

* Re-enable v2 migrations in tests after merging in master

* Try to fix async dashboard functional test

* Restore UiSettings defaults after emptyKibanaIndex()

* Review feedback: rename test to match behaviour
2021-02-01 15:46:16 +01:00
Marco Liberati c66124e170
[Lens] Make Lens intervals default value adapt to histogram:maxBars Advanced Setting changes (#89305)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-01 15:25:16 +01:00
Dario Gieselaar 3255f905c0
[APM] Remove value_count aggregations (#89408)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-01 15:14:17 +01:00
Alejandro Fernández Gómez 53637d0158
[Logs UI] <LogStream /> as a kibana embeddable (#88618)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-01 14:48:30 +01:00
Walter Rafelsberger fb19aab307
[ML] Data Frame Analytics: Adds scatterplot matrix to regression/classification results pages. (#88353)
- Adds support for scatterplot matrices to regression/classification results pages
- Lazy loads the scatterplot matrix including Vega code using Suspense. The approach is taken from the Kibana Vega plugin, creating this separate bundle means you'll load the 600kb+ Vega code only on pages where actually needed and not e.g. already on the analytics job list. Note for reviews: The file scatterplot_matrix_view.tsx did not change besides the default export, it just shows up as a new file because of the refactoring to support lazy loading.
- Adds support for analytics configuration that use the excludes instead of includes field list.
- Adds the field used for color legends to tooltips.
2021-02-01 12:30:58 +01:00
Marta Bondyra 1b8c3c1dcc
[Lens] Refactor reorder drag and drop (#88578) 2021-02-01 11:54:16 +01:00
Joe Reuter e31b6a8c91
[Lens] Add smoke test for lens in canvas (#88657) 2021-02-01 11:52:57 +01:00
Jean-Louis Leysens 61a51b5684
[ILM] New copy for rollover and small refactor for timeline (#89422)
* refactor timeline and relative ms calculation logic for easier use outside of edit_policy section

* further refactor, move child component to own file in timeline, and clean up public API for relative timing calculation

* added copy to call out variation in timing (slop) introduced by rollover

* use separate copy for timeline

* remove unused import

* fix unresolved merge

* implement copy feedback

* added component integration for showing/hiding hot phase icon on timeline

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-01 11:14:46 +01:00
Casper Hübertz f0717a0a79
[Observability] ActionMenu style fixes (#89547)
* [Observability] Reduced space between title and subtitle

* [Observability] Reduce margin between sections

* [Observability] Reduce list item font size

* [Observability] Remove spacer

* [APM] Changes button style and label

* [Logs] Changes the actions button label and style

* [Logs] Fixes the overlap of actions button and close

* Updated test and snapshot

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-01 10:54:08 +01:00
Anton Dosov c2f53a96eb
[Search Sessions][Dashboard] Clear search session when navigating from dashboard route (#89749) 2021-02-01 10:40:38 +01:00
Nicolas Ruflin 4f43096c64
[Fleet] Remove comments around experimental registry (#89830)
The experimental registry was used for the 7.8 release but since then was not touched anymore. Because of this it should not show up in the code anymore even if it is commented out.
2021-02-01 10:28:49 +01:00
Clint Andrew Hall af337ce4ed
[Presentation Team] Migrate to Typescript Project References (#86019)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-31 08:37:58 -06:00
Liza Katz 841ab704b8
[Search Sessions] Improve search session errors (#88613)
* Detect ESError correctly
Fix bfetch error (was recognized as unknown error)
Make sure handleSearchError always returns an error object.

* fix tests and improve types

* type

* normalize search error response format for search and bsearch

* type

* Added es search exception examples

* Normalize and validate errors thrown from oss es_search_strategy
Validate abort

* Added tests for search service error handling

* Update msearch tests to test for errors

* Moved bsearch route to routes folder
Adjusted bsearch response format
Added verification of error's root cause

* Align painless error object

* eslint

* Add to seach interceptor tests

* add json to tsconfig

* docs

* updated xpack search strategy tests

* oops

* license header

* Add test for xpack painless error format

* doc

* Fix bsearch test potential flakiness

* code review

* fix

* code review 2

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-31 12:16:46 +02:00
Devin W. Hurley 52f54030c3
[Security Solution] [Detections] rename gap column and delete "last lookback date" column from monitoring table (#89801) 2021-01-30 08:25:45 -05:00
Frank Hassanabad 2f80e44d3b
[Security Solution][Detection Engine] Fixes indicator matches mapping UI where invalid list values can cause overwrites of other values (#89066)
## Summary

This fixes the ReactJS keys to not use array indexes for the ReactJS keys which fixes  https://github.com/elastic/kibana/issues/84893 as well as a few other bugs that I will show below. The fix for the ReactJS keys is to add a unique id version 4 `uuid.v4()` to the incoming threat_mapping and the entities. On save out to elastic I remove the id. This is considered [better practices for ReactJS keys](https://reactjs.org/docs/lists-and-keys.html)

Down the road we might augment the arrays to have that id information but for now I add them when we get the data and then remove them as we save the data.

This PR also:
* Fixes tech debt around the hooks to remove the disabling of the `react-hooks/exhaustive-deps` in a few areas
* Fixes one React Hook misnamed that would not have triggered React linter rules (_useRuleAsyn)
* Adds 23 new Cypress e2e tests
* Adds a new pattern of dealing with on button clicks for the Cypress tests that are make it less flakey
```ts
cy.get(`button[title="${indexField}"]`)
      .should('be.visible')
      .then(([e]) => e.click());
```
* Adds several new utilities to Cypress for testing rows for indicator matches and other Cypress utils to improve velocity and ergonomics
```ts
fillIndicatorMatchRow
getDefineContinueButton
getIndicatorInvalidationText
getIndicatorIndexComboField
getIndicatorDeleteButton
getIndicatorOrButton
getIndicatorAndButton
``` 

## Bug 1
Deleting row 1 can cause row 2 to be cleared out or only partial data to stick around.

Before:
![im_bug_1](https://user-images.githubusercontent.com/1151048/105916137-c57b1d80-5fed-11eb-95b7-ad25b71cf4b8.gif)

After:
![im_fix_1_1](https://user-images.githubusercontent.com/1151048/105917509-9fef1380-5fef-11eb-98eb-025c226f79fe.gif)

## Bug 2 
Deleting row 2 in the middle of 3 rows did not shift the value up correctly

Before:
![im_bug_2](https://user-images.githubusercontent.com/1151048/105917584-c01ed280-5fef-11eb-8c5b-fefb36f81008.gif)

After: 
![im_fix_2](https://user-images.githubusercontent.com/1151048/105917650-e0e72800-5fef-11eb-9fd3-020d52e4e3b1.gif)

## Bug 3
When using OR with values it does not shift up correctly similar to AND

Before:
![im_bug_3](https://user-images.githubusercontent.com/1151048/105917691-f2303480-5fef-11eb-9368-b11d23159606.gif)

After: 
![im_fix_3](https://user-images.githubusercontent.com/1151048/105917714-f9574280-5fef-11eb-9be4-1f56c207525a.gif)

### 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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
2021-01-29 19:16:19 -07:00
Frank Hassanabad 2a913e4eb1
Skips flake tests and tests with what looks like bugs (#89777)
## Summary

Skips tests that have flake or in-determinism.
* The sourcer code/tests are being rewritten and then those will come back by other team members.
* The timeline open dialog looks to have some click and indeterminism bugs that are being investigated. Skipping for now.
2021-01-29 15:53:29 -07:00
Tim Sullivan df913b47be
Update build_chromium README (#89762)
* Update build_chromium README

* more edits

* Update init.py
2021-01-29 14:06:14 -07:00
Vadim Yakhin e866db7de0
Migrate security page (#89720)
* Add server routes for Workplace Search Security page

* Initial copy/paste of component tree

Also update lodash imports and fix default exports

* Update paths

* 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

* Remove legacy AppView and sidenav

* Clear flash messages globally

* Update server routes

* Replace Rails http with kibana http

* Add setSourceRestriction action to app_logic

It is used in security_logic

* Add missing typings

* Add route and update nav

* Use internal tools for determining license

* Remove Prompt as it doesn't work in Kibana

There is an error that recommends using AppMountParameters.onAppLeave
instead, but it doesn't cover the case where a user navigates
within the app. We'll revisit this problem later.

* Add i18n

Also refactor PrivateSourcesTable to use static i18n strings.

Before we were using 'remote' and 'standard' as both enums and parts of copy, i.e. "Enable {sourceType} private sources".

But with i18n we can no longer do this. So I made a refactoring to separate these concerns. Now 'remote' and 'standard' are only used as enums. What i18n string to show is defined based on isRemote variable.

* Add components unit tests

* Add logic unit tests

* Remove redundant imports

* Use nextTick instead of awaiting for promises

* Update logic tests to use new mockHelpers
2021-01-29 16:31:06 -04:00
Dominique Clarke 4e18fd8a51
uptime adjust useBarCharts logic (#89628)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-29 15:15:49 -05:00
Melissa Alvarez f53bc9825b
[ML] Data Frame Analytics creation: improve existing job check (#89627)
* use jobsExist endpoint instead of preloaded job list

* remove unused translation

* memoize jobCheck so cancel call works correctly
2021-01-29 14:48:55 -05:00