Commit graph

18922 commits

Author SHA1 Message Date
Josh Dover
033dfb3c22
Use kibana_system user for Fleet setup and package operations (#112808)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-15 12:30:52 +02:00
Pierre Gayvallet
81ba068853
Add deprecation.skip_deprecated_settings config setting (#114751)
* Add `deprecation.skip_deprecated_settings` config setting

* fix deprecation from service

* fix existing config deprecations

* fix kbn-config unit tests

* adapt deprecation types

* fix more deprecations

* add filtering and adapt unit tests

* add service unit tests

* update generated doc

* fix telemetry unit tests

* address review comments

* add missing deprecation titles
2021-10-15 12:11:21 +02:00
Matthew Kime
a935f6b723
[data views] DataViewBase now requires a title (#115082)
* dataViewBase now requires a title
2021-10-15 05:06:47 -05:00
Ahmad Bamieh
d19510535a
[i18n] remove angular i18n and move the remains to monitoring plugin (#115003) 2021-10-15 12:09:19 +03:00
mgiota
c11b38de7b
[RAC] create functional tests for add to case (#114075)
* [RAC] create functional tests for add to case

* use observability test helpers for user creation

* basic tests for add to case options

* add two more cases

* test case for clicking on add to new case button

* remove unused expect statement

* clicking on add to existing case should open a modal

* move add to case functionality in a separate file

* address comments in the PR review

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-15 05:07:47 -04:00
Giorgos Bamparopoulos
402550c165
Update APM Plugin Routing and Linking (#115008)
* Update client-side and server-side routing function names and files
2021-10-15 09:16:56 +01:00
Dario Gieselaar
008421f170
[APM] Revert multi-metric ML job. (#114961) 2021-10-15 09:33:06 +02:00
David Sánchez
8aeaa5a2ff
[Security Solution][Endpoint] Remove refresh button from policy trusted apps flyout (#114974)
* Hide refresh button by prop and refactor unit test

* Add test cases for policies selector when enable/disable license

* Remove unused code when adding mock
2021-10-15 09:25:30 +02:00
Jonathan Budzenski
97848ca62a skip flaky suite. #115100 2021-10-14 22:06:43 -05:00
Frank Hassanabad
ed9859ac14
[Security solutions] Adds linter rule to forbid usage of no-non-null-assertion (TypeScript ! bang operator) (#114375)
## Summary

Fixes: https://github.com/elastic/kibana/issues/114535

**What this linter rule does:**
* Sets the [@typescript-eslint/no-non-null-assertion](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-non-null-assertion.md) linter rule to become an error if seen.

If you try to use the `!` operator you get an error and nice helper message that tries to encourage better practices such as this one:

<img width="1635" alt="Screen Shot 2021-10-07 at 11 26 14 AM" src="https://user-images.githubusercontent.com/1151048/136474207-f38d3461-0af9-4cdc-885b-632cb49d8a24.png">

**Why are we deciding to set this linter rule?**
* Recommended from Kibana [styleguide](https://github.com/elastic/kibana/blob/master/STYLEGUIDE.mdx#avoid-non-null-assertions) for ~2 years now and still recommended.
* A lot of TypeScript has evolved and has operators such as `?` which can replace the `!` in most cases. Other cases can use a throw explicitly or other ways to manage this.
* Some types can change instead of using this operator and we should just change the types.
* TypeScript flows have improved and when we upgrade the linter will cause errors where we can remove the `!` operator which is 👍 better than leaving them when they're not needed anymore.
* Newer programmers and team members sometimes mistake it for the `?` when it is not the same thing.
* We have had past bugs and bugs recently because of these.
* It's easier to use the linter to find bugs than to rely on manual tests. 

**How did Frank fix all the 403 areas in which the linter goes off?**
* Anywhere I could remove the `!` operator without side effects or type script errors I just removed the `!` operator.
* Anywhere in test code where I could replace the code with a `?` or a `throw` I went through that route.
* Within the code areas (non test code) where I saw what looks like a simple bug that I could fix using a `?? []` or `?` operator or `String(value)` or fixing a simple type I would choose that route first. These areas I marked in the code review with the words `NOTE:` for anyone to look at.
* Within all other areas of the code and tests where anything looked more involved I just disabled the linter for that particular line. When in doubt I chose this route.

### 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-10-14 20:24:01 -06:00
Mat Schaffer
45f02d3c9b
[Stack Monitoring] Enable react stack monitoring by default (#114436)
* Enable react stack monitoring by default

* Also update test snapshot

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-14 18:46:06 -05:00
Vadim Yakhin
8db36d9f4a
[Fleet, Workplace Search] Add Workplace Search connectors as non-Fleet integrations (#114919)
* Add icons

* Add new categories

* Add Workplace Search connectors to the unified integrations view

* Add a new enterprise_search shipper

* Update number of custom integrations in test

* Change customIntegrations type to optional

* Revert "Update number of custom integrations in test"

This reverts commit 30214b2c7c.

The reason is that while this test passes with 2 separate commands for
functional test runner, it fails when it is run with a single command.

Reverting to make the CI pass. We will look into this test separately.
I will link the investigation issue in the PR.
2021-10-14 18:36:56 -04:00
Kevin Lacabane
e49ec25fae
[Stack Monitoring] Fix monitoring func test (#115013)
* add noDataContainer test-subj

* remove unnecessary test step

* Fix test subjects for overview page

* remove unused service

* update NoData component snapshots

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-14 22:47:57 +02:00
Scotty Bollinger
91d48ff475
[Workplace Search] Fix loading state bug and update button (#115068)
* Change source deletion to set entire page loading

Do this instead of having the button loading

* Replace text button with icon button for blocked windows
2021-10-14 16:01:42 -04:00
ymao1
5657f80feb
[Alerting] Show execution duration on Rule Details view (#114719)
* Adding execution duration to get alert instance summary

* Showing execution duration on rule details view

* Fixing unit tests

* Updating to match new mockup

* Fixing types

* Fixing functional test

* Removing unneeded max and min and adding tests

* Removing unneeded max and min and adding tests

* Fixing functional test

* Adding left axis

* PR feedback

* Reducing chart height

* PR feedback

* PR feedback

* PR feedback
2021-10-14 15:52:23 -04:00
Nicolas Chaulet
065b42b661
[Fleet] Remove escaping numeric value in agent template (#114123) 2021-10-14 15:28:43 -04:00
Kyle Pollich
e22974a85f
Validate package policy immediately after dry run data is available (#115060) 2021-10-14 15:16:58 -04:00
Cauê Marcondes
d7e7dbfe53
[APM] Remove rate aggregations (#114187)
* fixing throughput chart api

* change backends

* adding intervalString to the observability callback functions

* fixing transaction group detailed stats

* fixing tests

* fixing test

* fixing obs tests

* fixing tests

* adding tests

* fixing ci

* using data generator

* changing name

* fixing i18n

* updating opbs test to use data generator

* fixing api tests

* fixing tests

* using data generator to run the tests

* fixing tests

* fixing test
2021-10-14 20:48:15 +02:00
Dominique Clarke
7fb99fbe06
[Uptime] [Synthetics integration] browser monitors - Zip Url - add TLS Options and Proxy Url (#112554)
* add tls options to browser monitors when zip url is selected

* adjust types

* add tests

* refactor tls fields and zip url tls fields

* adjust types

* adjust i18n

* add proxy url

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-14 14:31:45 -04:00
Joey F. Poon
7d8d85e1c8
[Security Solution] unskip endpoint functional tests (#114922)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-14 13:21:55 -05:00
Khristinin Nikita
1929f88ce0
Update CTI ECS 1.11 fields (#113404)
* Update threatintel to threat

* Remove CTI mappings

* Update CTI_DATASET_KEY_MAP

* Update default threat index

* Change mapping to dataset

* Fix tests

* Fix tests

* Fix test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-14 20:21:39 +02:00
Quynh Nguyen
35da323313
[ML] Display advanced mode toggle for the APM failed transactions table (#114363)
* Add new toggle

* [ML] Add tooltip for p value

* [ML] Add tooltip for p value

* Update tooltip

* Add callback, revert i18n, compressed

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-14 13:17:55 -05:00
Aleh Zasypkin
025861c189
Add API integration tests for Interactive Setup. (#111879) 2021-10-14 20:14:01 +02:00
Josh Dover
ebb9e24b61
Fix bug in handling preconfiguration input overrides (#115030) 2021-10-14 14:13:24 -04:00
Thomas Neirynck
dafd9d4e60
[Fleet] Add File upload (#114934) 2021-10-14 13:16:28 -04:00
Tim Sullivan
57e3af77f0
[Reporting] Forward-port config deprecation fixes from 7.x (#114950)
* [Reporting] Forward-port config deprecation fixes from 7.x

* remove index deprecation

* fix test
2021-10-14 09:57:54 -07:00
Marco Liberati
d0e19e4960
[Lens][Inspector] Close the inspector on Lens unmount (#114317)
* 🐛 First attempt to close the inspector automatically on app unmount

* 👌 Integrate feedback

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-14 18:45:31 +02:00
Dominique Clarke
e4e7a1ced1
[Observability] [Exploratory view] remove the filter buttons from the exploratory view legend (#114908) 2021-10-14 12:43:39 -04:00
Patryk Kopyciński
dfbb397696
[Osquery] Fix sql query parser logic (#114932) 2021-10-14 18:43:14 +02:00
Paul Tavares
81a84a863b
[Security Solution][Endpoint] Unit tests for Policy Details Remove Modal (#115005)
* test: refactor trusted apps http mocks to top-level `mocks` directory
* Completed tests for Remove modal
* improvements to UT code
2021-10-14 12:39:40 -04:00
Chris Cowan
b204a20b45
[Stack Monitoring] Convert Access Denied page to React (#114887)
* [Stack Monitoring] Convert Access Denied page to React

* Adding data-test-subj
2021-10-14 10:35:25 -06:00
Zacqary Adam Xeper
03fe419dd4
[Stack Monitoring] Remove deprecation warning for Internal Monitoring (#114856)
* [Stack Monitoring] Remove deprecation warning for Internal Monitoring

* Fix i18n
2021-10-14 11:21:55 -05:00
Chenhui Wang
1155640779
Add comments in the GitHub content source UI (#114766) 2021-10-14 23:44:47 +08:00
Georgii Gorbachev
b304c1ca0b
[Security Solution][Detections] Truncate lastFailureMessage for siem-detection-engine-rule-status documents (#112257)
**Ticket:** https://github.com/elastic/kibana/issues/109815

## Summary

**Background:** `siem-detection-engine-rule-status` documents stores the `lastFailureMessage` a string which is indexed as `type: "text"` but some failure messages are so large that these documents are up to 26MB. These large documents cause migrations to fail because a batch of 1000 documents easily exceed Elasticsearch's `http.max_content_length` which defaults to 100mb.

This PR truncates `lastFailureMessage` and `lastSuccessMessage` in the following cases:

1. When we write new or update existing status SOs:
    - The lists of errors/warnings are deduped -> truncated to max `20` items -> joined to a string
    - The resulting strings are truncated to max `10240` characters
2. When we migrate `siem-detection-engine-rule-status` SOs to 7.15.2:
    - The two message fields are truncated to max `10240` characters

### Checklist

Delete any items that are not applicable to this PR.

- [ ] [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-10-14 17:40:23 +02:00
ymao1
0b2012a908
Setting displayname for alerting sos (#114916) 2021-10-14 11:34:52 -04:00
Jonathan Budzenski
3899046313 skip flaky suite. #113890 2021-10-14 09:51:46 -05:00
Tim Sullivan
c5e23b6a5b
[Reporting] Functional test structure & improvements (#114298)
* [Reporting] Functional test structure & improvements

* show the error of the report generation failure in the test failure

* update snapshot

* remove import to non-existent functional app test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-14 07:37:15 -07:00
David Sánchez
55a444b17a
Small adjustments in policy page (#114957) 2021-10-14 16:25:17 +02:00
Clint Andrew Hall
864e6f1a74
[fleet] Adjust unified integration view to have better UI controls (#114692)
* [fleet] Adjust Package Cards to horizontal layout

* Fix responsive shifting

* Addressing feedback

* cleanup layout for integrations view

* i18n

* Fix type errors

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dave Snider <dave.snider@gmail.com>
Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>
2021-10-14 10:18:01 -04:00
Angela Chuang
56a2e788ca
[Security Solution] tgrid cellActions enhancement (#113419)
* Alerts cellAction enhancement

* styling

* fix types

* expandable topN

* fix types

* styling for filters

* styling

* rm getDefaultCellActions

* styling

* globalFilters for topN

* rm unused i18n keys

* unit test

* add i18n

* rename component

* fix types

* update i18n keys

* unit tests

* styling for reason row renderer

* rename file

* fix Circular Dependencies

* update wording/icons for show top N

* cell value text overflow

* reason in grid-view

* unit test

* default selected option for topN

* lint error

* configurable paddingSize and showLegend for topN

* update snapshot

* rename reason title

* fix cypress

* fix cypress

* fix unit tests

* fix default cell actions

* fix page crashing

* unit test

* add unit tests

* code review

* fix missing props

* fix expand ip button

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-14 15:17:28 +01:00
Ester Martí Vilaseca
cdce98c8a3
[Stack monitoring] Fix clusters functional tests when react is enabled (#114982)
* Fix test subjects for overview page

* fix pathname matching
2021-10-14 15:57:27 +02:00
Marco Liberati
4db2437036
[Lens] Thresholds: when computing default static value take into account all layer metrics (#113647)
*  compute the default threshold based on data bounds

* 🐛 Fix multi layer types issue

*  Fix test

*  Fix other test

* 🐛 Fix computation bug for the initial static value

*  Add new suite of test for static value computation

* 🐛 Fix extents bug and refactor in a single function + tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-14 15:28:40 +02:00
Tim Roes
b21e1ebf38
Deprecate DataView.flattenHit in favor of data plugin flattenHit (#114517)
* WIP replacing indexPattern.flattenHit by tabify

* Fix jest tests

* Read metaFields from index pattern

* Remove old test code

* remove unnecessary changes

* Remove flattenHitWrapper APIs

* Fix imports

* Fix missing metaFields

* Add all meta fields to allowlist

* Improve inline comments

* Move flattenHit test to new implementation

* Add deprecation comment to implementation

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-14 14:43:06 +02:00
Kevin Lacabane
29d750a8c1
[Stack Monitoring] fix feature controls functional test (#114781)
* fix feature controls functional test

* target test-subj attr instead of class
2021-10-14 14:33:07 +02:00
Kyle Pollich
187d949685
[Fleet] Improve Functionality around Managed Package Policies (#114526)
* Enabled auto policy upgrades for APM and Synthetics

* fixup! Enabled auto policy upgrades for APM and Synthetics

* Rework preconfiguration policy upgrade flow + report errors

* Fix type error in test

* Fix type errors + tests

* wip

* Remove keep policies up to date checks

* Remove references to KEEP_POLICIES_UP_TO_DATE_PACKAGES

* Move package policy upgrade results to nonFatalErrors

* Fix types

* Fix type error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-14 07:19:50 -04:00
Gloria Hornero
06e469394a
cleanup (#114902)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-14 13:15:02 +02:00
Mark Hopkin
5ee779c3c2
remove stray semicolon (#114969) 2021-10-14 12:42:14 +02:00
Esteban Beltran
1d3c8b7dc7
[Security Solution] Edit host isolation exception IP UI (#114279)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-14 11:26:49 +02:00
Walter Rafelsberger
b0daf935cf
[ML] APM Correlations: Round duration values to be used in range aggregations. (#114833)
A change in the ES range agg no longer accepts numbers with decimals if the underlying field is typed as long. This fixes the issue by rounding the values we pass on to the range agg.
2021-10-14 11:07:26 +02:00
Yulia Čech
f2f6bb5295
[Index Management] Added data-test-subj values to the index context menu buttons (#114900) 2021-10-14 10:50:26 +02:00