Commit graph

3665 commits

Author SHA1 Message Date
Kibana Machine
2173fc4bda
[Task Manager] Fixing typo in field name (#103948) (#104112)
* Fixing typo

* Fixing typo

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

Co-authored-by: ymao1 <ying.mao@elastic.co>
2021-07-01 12:42:36 -04:00
Kibana Machine
33f0c31340
[Lens] Move editorFrame state to redux (#100858) (#104057)
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: dej611 <dej611@gmail.com>

Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: dej611 <dej611@gmail.com>
2021-07-01 07:07:37 -04:00
Kibana Machine
88b9d3899a
[Lens] Add functional test for example integration (#103460) (#104054)
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
2021-07-01 06:55:09 -04:00
Kibana Machine
15abbfff20
[Cases] Adding migration tests for owner field added in 7.14 (#102577) (#104050)
* Adding migration tests for 7.13 to 7.14

* Adding test for connector mapping

* Comments

Co-authored-by: Jonathan Buttner <56361221+jonathan-buttner@users.noreply.github.com>
2021-07-01 06:26:41 -04:00
Alison Goryachev
3956257d26
[Snapshot + Restore] Re-enable functional test (#103977) 2021-06-30 19:57:55 -04:00
Kibana Machine
96a5d2ba6b
[RAC] Fix rule registry write flag and turn it off by default (#103646) (#103991)
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
2021-06-30 17:49:49 -04:00
Dave Snider
5a4a08d80e
[Page layouts] Some light fixes (#103197) (#103885)
* [Solution Toolbar] Fixing button border on non-text color versions

* [Alerts] Removed extra wrappers and use EuiPageHeader

* [Logstash] Basic conversion to template

* [Reporting] Adding bottomBorder to page header

* [ML] Fix display of main navigation tabs

* [Stack Management] Fix side nav not updating when going back to landing page

* [Tags] Add spacing after page header

* [License Management] Full width on file uploader

* [Page Template] Fixed `emptyState` default template for pages with side nav

* [Infra] Removing some page header displays in empty states

* [Enterprise Search] Fix some error layouts

* [Index Patterns] Quick fix for empty state

* snaps

* [Page Template] Remove forced padding when `centeredBody`

* small hack for tab padding for ml

* scroll ML page to fix test

* fix test method type signature

Co-authored-by: Dave Snider <dave.snider@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Michail Yasonik <michail.yasonik@elastic.co>

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Michail Yasonik <michail.yasonik@elastic.co>
2021-06-30 16:05:20 -04:00
Kibana Machine
a3bd18e8db
[APM] Return operationName as part of _inspect response (#103616) (#103887)
Closes #103448.

Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
2021-06-30 11:53:52 -04:00
Kibana Machine
eca77cd25d
[Lens] Formula can be colored by value (#103572) (#103886)
* [Lens] Formula can be colored by value

* Fix mapColumn test

* Fix tests

Co-authored-by: Wylie Conlon <william.conlon@elastic.co>
2021-06-30 11:51:56 -04:00
Yuliia Naumenko
fe30b1bec8
[Alerting] Fixed search results are not updated when search term is removed on Rules and Connectors page (#103663) (#103849) 2021-06-30 07:17:57 -04:00
Kibana Machine
ee2bfa541d
[APM] Filter on defined environment for latency charts (#103621) (#103757)
Closes #102047.

Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
2021-06-30 06:38:48 -04:00
Ryland Herrick
199d4c683d
[Security Solution][CTI] Investigation time enrichment UI (#103383) (#103829)
* Add pure fn and consuming hook to fetch event enrichment

It's not being invoked yet, but I've added a placeholder where it's
going.

* Move existing enrichment tests to new spec file

This is a rough copy/paste, I'll clean up as I flesh out the new tests.

* Move test constants into tests that use them

* style: declare FC function as an FC

* Extract some inline parsing logic into a helper function

And test it!

* Solidifying enrichment types on the backend

* Declares an enum for our types
* Sets type during indicator match rule enrichment
* Sets type during investigation-time enrichment

* WIP: Enrichment rows are rendered on the alerts summary

There are lots of TODOs here, but this implements the following:

* Fetching investigation-time enrichments from the backend
* Parsing existing enrichments from timeline data
* Merging the two enrichment types together, and rendering them in rows
  as specified

Much of the data-fetching is hardcoded, and this broke the existing
pattern with SummaryView/SummaryRow so that got a little messy; I may
end up just using my own EuiTable but we'll see.

Threat Intel tab is currently broken; that's up next.

* Updates ThreatDetailsView to accept an array of enrichments

The investigation-time enrichments are a little messy because they
contain all the non-ECS fields that indicators contain; other than that,
this is looking good.

Still need to add the new header, and potentially sort the fields.

* Sort our details fields

This promotes sanity for the user.

* Add "view threat intel data" button

This simply opens the threat intel tab.

* Implement header for threat details sections

* Add a basic jest "unit" test around ThreatSummaryView

* Fix remaining tests for components we modified

This also addresses a bug where we were not properly sorting new
enrichments by first_seen; this is covered under the tests that were
fixed.

* Filter out duplicate investigation-time enrichments

Because the enrichment endpoint is dumb and doesn't know about the
existing event or its enrichments, we need to merge these together on
the client to reduce noise and redundant data.

* Add inspect button to investigation enrichments

* Massages the response into the format that the inspect component uses
* Moves stateful fetching of query and persisting in redux to new, more
  specialized hook
* Moves existing enrichment hook to a more suitable location in
  containers/

* Fix failing unit tests

* indicator match rule now specifies `matched.type` as coming from the
  rule
* Inspecting the enrichment query requires use of the redux store, which
  was not previously mocked

* Fix existing CTI cypress tests

This covers the basics of the Alert Summary and Threat Intel tabs; the
investigation-time enrichment functionality is up next.

* Adds a cypress test exercising investigation time enrichment

* Loads more indicators (filebeat data, `threat_indicator2` archive)
  AFTER the rule has executed
* Asserts that those indicators are also found on the alert summary.

* Populate event enrichment call with actual alert fields

This was previously hardcoded during development.

* Add a new field to our suspicious event to trigger enrichment

The existing myhash field will generate an alert due to the way the rule
is written, but the alert had no other fields that would match the
investigation time enrichment. This gives it a source.ip, and updates
the indicator to match.

* Only fetch enrichments data if there are valid event fields

If none of the alert's fields would be relevant to the enrichment query,
then we don't make the request at all.

* Update enrichments matched.typed in integration tests

This field was updated to reflect the source of the match, in this case:
indicator match rules.

* Ensure draggable fields are unique in a multi-match scenario

If a given field matched multiple indicators, then the previous
contextId was not unique as it was based on field/value that matched.
Adding provider to the mix would fix it, except that we're not
guaranteed to have a provider.

I've added both provider (if present) and an index value to the key to
ensure that it's unique.

* Simplify types

This field can never be null, as we always set it in our response.

* Move helper functioons out of shared location and into consuming component

These are unlikely to be used elsewhere.

* Clean up data parsing logic using reduce

This obviates the need for our filter/guard function and the extra loop
that it entails. We have to specify the return value of our reduce fn,
however, but that's mostly equivalent to our type guard.

* Move our general function into a general location

* Extract the concept of "enrichment identifiers"

This was already partially codified with 'buildEnrichmentId,' which is
used to dedup enrichments; this extends the idea to all fields that
could uniquely identify a given indicator.

* Use existing constant as the source of our enrichments query

This is now used by both the overview card and the enrichment query.

* Codify our default enrichment lookback as constants

* Remove unnecessary flexbox

The generic SummaryView component previously had to deal with
multi-valued CTI fields, representing the multiple values coming from
the multiple nested objects with that field.

However, with the new UI we no longer have that constraint, and so the
default columnar style, and the corresponding overriding styles, are no
longer necessary.

* Filter out partial responses in the event enrichment observable

The UI does not currently handle these. We need to test the behavior of
long-running queries with this filter, but this should simplify the
behavior to complete/error until we handle partial responses.

* Display placeholders while event enrichment is loading

Displays a loading spinner in the Threat Intel tab title, and some
loading lines where the enrichments summary is.

* Update our indicator data to be within the last 30 days

This fixes our cypress test, but it's going to start failing again in 30
days. However, by that time I'll have implemented the absolute data
picker, which will allow for a more comprehensive test in addition to us
sidestepping this issue.

* Fix type error with our details tabs

The name prop on a Tab will be rendered as a node, so both strings and
elements are acceptable. This relaxes the types to inherit from the
component itself.

* Fix failing jest tests

The addition of our filtering of the search observable broke this test,
since we now need to implement the search observable.

Rather than do that, we'll instead mock our local hook as that's more
likely to change.
# Conflicts:
#	x-pack/plugins/security_solution/public/common/components/event_details/event_details.test.tsx
2021-06-30 03:34:21 -04:00
Lukas Olson
38295a74b1
Use new terms enum API for autocomplete value suggestions (#100174) (#103798)
* Migrate kibana.autocomplete config to data plugin

* Fix CI

* Fix tests

* Use new terms enum API for autocomplete value suggestions

* Add tiers to config

* Re-introduce terms agg and add config/tests for swapping algorithms

* Add data_content and data_cold tiers by default

* Fix types

* Fix maps test

* Update tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	src/plugins/data/server/autocomplete/value_suggestions_route.ts
2021-06-29 21:54:46 -04:00
Alison Goryachev
969de562e3
[7.x] [Snapshot + Restore] Set snapshots response size limit (#103331) (#103693)
* [Snapshot + Restore] Set snapshots response size limit (#103331)

# Conflicts:
#	x-pack/plugins/snapshot_restore/server/routes/api/repositories.test.ts
#	x-pack/plugins/snapshot_restore/server/routes/api/repositories.ts
#	x-pack/plugins/snapshot_restore/server/routes/api/snapshots.test.ts
#	x-pack/plugins/snapshot_restore/server/routes/api/snapshots.ts

* fix merge conflict

* skip test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 21:54:35 -04:00
Steph Milovic
ac8fa7e8df
[RAC] [Cases] All cases table column design updates (#103544) (#103760) 2021-06-29 21:03:18 -04:00
Kibana Machine
761e19f8e7
[7.x] [Monitoring] Enable out of the box alerts modal (#101565) (#103694)
* [Monitoring] Enable out of the box alerts modal (#101565)

* Remove api call to create alerts

* Add enable alerts modal

* Update modal title

* Add simple alerts dropdown

* change alerts modal design

* refactor alerts modal provider

* Add alerts dropdown

* Show toast after alert creation and add error handling

* Do not show alerts modal if alerts already exist

* Fix stack monitoring test

* Fix more stack monitoring tests and types

* Fix tests after merge

* Attempt to fix stack monitoring tests

* remove console.log

* Change text

* Remove commented comment

* Update docs for stack monitoring alerts

* Fix docs

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

* Removed strangely re-appearing test

This test was removed a long time ago in this commit: 5feb376aac -- we are not sure why it reappeared.

Co-authored-by: Ester Martí Vilaseca <ester.martivilaseca@elastic.co>
Co-authored-by: Jason Rhodes <jason.rhodes@elastic.co>
2021-06-29 15:23:27 -04:00
Sandra Gonzales
81f6f31ac6
[Stack Monitoring] create alert per node instead of per cluster (#102544) (#103719)
* create alert per node instead of per cluster

* add comment

* fix test, replace alert state with empty array with no node is firing

* update cpu usage action messaging

* fix internationalization

* update disk usage rule action messaging

* update memory usage rule action messaging

* update other action messaging

* update missing monitoring data alert action messaging

* remove comment

* fix bug where threadpool alerts were not firing

* fix bug with threadpool rejections and update alert action messaging to be per node

* update comments

* unit test for thread pool write rejections alert

* update messaging for CCR read rejection

* fix cluster level alerts to use the cluster id when its not node level

* add more tests to nodes changed alert

* update default message

* update alert messaging for large shard size

* update default messaging

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 15:12:08 -04:00
Yulia Čech
b45a561fa6
[ILM] Add missing a11y tests (#102887) (#103641)
* [ILM] Added missing a11y tests

* Fixed ILM functional tests, added after tests cleanup

* Added review suggestions

* Fixed section header renaming

* Fixed section header renaming

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 09:06:49 -04:00
Kibana Machine
0fd977acc8
[Alerting] Enable rule import/export and allow rule types to exclude themselves from export (#102999) (#103598)
* Removing feature flag changes

* Adding isExportable flag to rule type definition

* Adding isExportable flag to rule type definition

* Adding isExportable flag to rule type definition

* Filtering rule on export by rule type isExportable flag

* Fixing types

* Adding docs

* Fix condition when exportCount is 0

* Unit test for fix condition when exportCount is 0

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

Co-authored-by: ymao1 <ying.mao@elastic.co>
2021-06-28 22:41:08 -04:00
Aaron Caldwell
8210865d81
[Maps] Move edit tools to beta and remove experimental config flags (#103556) (#103591) 2021-06-28 22:15:51 -04:00
Kibana Machine
f1c38023a4
[Security Solutions][Detection Engine] Implements best effort merging of constant_keyword, runtime fields, aliases, and copy_to fields (#102280) (#103590)
## Summary

This adds utilities and two strategies for merging using the [fields API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html) and the `_source` document during signal generation. This gives us the ability to support `constant_keyword`, field alias value support, some runtime fields support, and `copy_to` support. Previously we did not copy any of these values and only generated signals based on the `_source` record values. This changes the behavior to allow us to copy some of the mentioned values above.

The folder of `source_fields_merging` contains a `strategy` folder and a `utils` folder which contains both the strategies and the utilities for this implementation. The two strategies are `merge_all_fields_with_source` and `merge_missing_fields_with_source`. The defaulted choice for this PR is we use `merge_missing_fields_with_source` and not the `merge_all_fields_with_source`. The reasoning is that this is much lower risk and lower behavior changes to the signals detection engine.

The main driving force behind this PR is that ECS has introduced `constant_keyword` and that field has the possibility of only showing up in the fields section of a document and not `_source` when index authors do not push the `constant_keyword` into the `_source` section. The secondary driving forces behind this behavioral change is that some users have been expecting their runtime fields, `copy_to` fields, and field alias values of their indexes to be copied into the signals index.

Both strategies of `merge_missing_fields_with_source` and  `merge_all_fields_with_source` are considered Best Effort meaning that both strategies will not always merge as expected when they encounter ambiguous use cases as outlined in the `README.md` text at the top of `source_fields_merging` in detail.

The default used strategy of `merge_missing_fields_with_source` which has the simplest behavior will work in most common use cases. This is simply if the `_source` document is missing a value that is present in the `fields`, and the `fields` value is a primitive concrete value such as a `string` or `number` or `boolean` and the `_source` document does not contain an existing object or ambiguous array, then the value will be merged into `_source` and a new reference is returned. If you call the strategy twice it should be idempotent meaning that the second call will detect a value is now present in `_source` and not re-merge a second time.

* 301 unit tests were added
* Extensive README.md docs are added
* e2e tests are updated to test scenarios and ambiguity and conflicts from previously to support this effort.
* Other e2e tests were updated
* One bug with EQL and fields was found with a workaround implemented. See https://github.com/elastic/elasticsearch/issues/74582
* SearchTypes adjusted to use recursive TypeScript types
* Changed deprecated for `@deprecated` in a few spots
* Removed some `ts-expect-error` in favor of `??` in a few areas
* Added a new handling of epoch strings and tests to `detection_engine/signals/utils.ts` since fields returns `epoch_millis` as a string instead of as a number. 
* Uses lodash safer set to reduce changes of prototype pollution

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

### Risk Matrix


| Risk                      | Probability | Severity | Mitigation/Notes        |
|---------------------------|-------------|----------|-------------------------|
| Prototype pollution | Low | High | Used lodash safer set |
| Users which have existing rules that work, upgrade and now we do not generate signals due to bad merging of fields and _source | Mid | High | We use the safer strategy method, `merge_missing_fields_with_source `, that is lighter weight to start with. We might add a follow up PR which enables a key in Kibana to turn off merging of fields with source. We added extensive unit tests and e2e tests. However, unexpected unknowns and behaviors from runtime fields and fields API such as geo-points looking like nested fields or `epoch_milliseconds` being a string value or runtime fields allowing invalid values were uncovered and tests and utilities around that have been added which makes this PR risky |
| Found a bug with using fields and EQL which caused EQL rules to not run. | Low | High | Implemented workaround for tests to pass and created an Elastic ticket and communicated the bug to EQL developers. |

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-06-28 22:15:09 -04:00
Bhavya RM
6f005a1e81
Unskip the reporting screenshots.ts by fixing unable to update UI settings error. (#103184) (#103583) 2021-06-28 21:37:04 -04:00
Kibana Machine
06313f3b94
Sharing saved objects phase 3.5 (#100424) (#103575)
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
2021-06-28 20:33:16 -04:00
Kibana Machine
f6bd243406
[Search Sessions] Split tasks (#99967) (#103212)
* cancel the previous session

* split to 3 tasks

* fixes

* cancellation

* updated tests

* split out and improve jest tests

* cleanup previous session properly

* don't fail delete and cancel if item was already cleaned up

* test

* test

* ignore resource_not_found_exception when deleting an already cleared \ expired async search

* jest

* update jest

* api int

* fix jest

* testssss

* Code review @dosant

* types

* remove any

* Fix merge

* type

* test

* jest

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

Co-authored-by: Liza Katz <lizka.k@gmail.com>
Co-authored-by: Liza K <liza.katz@elastic.co>
2021-06-28 20:26:15 +00:00
Tiago Costa
0b288bf84d
skip flaky suite (#100968) 2021-06-28 20:56:47 +01:00
Tiago Costa
bbdf550972
skip flaky suite (#103538) 2021-06-28 20:49:16 +01:00
Larry Gregory
5a84eb57ef
[7.x] Role Management: improve editing experience for DLS queries (#99977) (#103513)
* Role Management: improve editing experience for DLS queries (#99977)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/security/public/management/roles/roles_management_app.tsx

* fix eslint error
2021-06-28 15:29:34 -04:00
Alison Goryachev
69fd3a3701
[ILM] Update API integration test (#103495) (#103515) 2021-06-28 15:09:52 -04:00
Kibana Machine
c13c32af4b
[Detections] Adds automatic updating for Prebuilt Security Detection Rules package (#101846) (#103366)
* Automatically install and update the security_detection_engine package
* Remove security_detection_engine from required Fleet packages
* Update fleet package-registry image
* Add sha256: to the distribution package
* Use distribution from https://beats-ci.elastic.co/job/Ingest-manager/job/release-distribution/152
* Change fleet required packag
* Fix bad merge
* Update rules to 0.13.1 package
* Fix NOTICE.txt

Co-authored-by: Ross Wolf <31489089+rw-access@users.noreply.github.com>
2021-06-28 17:13:25 +00:00
Ece Özalp
a526dcb62a
[Security Solution] adds wrapSequences method (RAC) (#102106) (#103490)
adds wrapSequences method
2021-06-28 12:36:42 -04:00
Kibana Machine
8a92b0fe62
[Lens] Escape field names in formula (#102588) (#103153)
* [Lens] Escape field names in formula

* Fix handling of partially typed fields with invalid chars

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

Co-authored-by: Wylie Conlon <william.conlon@elastic.co>
2021-06-25 21:24:28 +00:00
Aaron Caldwell
f827815147
[Maps] Add capability to delete features from layer & index (#103145) (#103381) 2021-06-25 00:26:30 -04:00
Jonathan Budzenski
ca36d0ce80 skip suite failing es promotion. #103364 2021-06-24 16:19:49 -05:00
Kibana Machine
3f7e1eb94f
Add telemetry for Elastic Cloud (#102390) (#103344)
Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>
2021-06-24 16:53:56 -04:00
Tim Sullivan
0f4e99949a
Reporting: Task Manager integration for 7.x (#101339)
* Reporting: Task Manager integration for 7.x

* update test assertions, use more explicit types

* update comment

* Update x-pack/plugins/reporting/server/lib/store/store.ts

Co-authored-by: Vadim Dalecky <streamich@gmail.com>

* fix field mapping

* Update x-pack/plugins/reporting/server/lib/store/store.ts

Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>

* Report also implements ReportDocumentHead

* the actual ID of the task is prefixed with `task:`

* remove pointless update to the report instance after failing

* comment clarification

* sync with 8.0

Co-authored-by: Vadim Dalecky <streamich@gmail.com>
Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-24 12:14:40 -07:00
Kibana Machine
5d0ff2ea41
[Alerting] Using new es client in alerting functional tests (#102349) (#103318)
* Switching to new es client in alerting tests

* Fixing types

* Updating functional test

* Updating functional test

* Updating functional test

* Fixing error handling

* Fixing types

* Fixing error handling

* Fixing functional tests

* Fixing functional tests

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

Co-authored-by: ymao1 <ying.mao@elastic.co>
2021-06-24 14:26:02 -04:00
Patrick Mueller
850597503f
[alerting][actions] add task scheduled date and delay to event log - 2 (#103172) (#103296)
resolves #98634

This adds a new object property to the event log kibana object named
task, with two properties to track the time the task was scheduled to
run, and the delay between when it was supposed to run and when it
actually started. This task property is only added to the appropriate
events.

	task: schema.maybe(
	  schema.object({
	    scheduled: ecsDate(),
	    schedule_delay: ecsNumber(),
	  })
	),

Note that these changes were previously merged to master in https://github.com/elastic/kibana/pull/102252 which had to be reverted - this PR contains the same commits, plus some additional ones to resolve the tests that were broken during the bad merge.
2021-06-24 12:09:29 -04:00
Christos Nasikas
0a19c416a3
[Cases] Fix push to external service error when connector's mapping does not exists (#102894) (#103291)
Co-authored-by: Jonathan Buttner <jonathan.buttner@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Jonathan Buttner <jonathan.buttner@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-24 12:05:12 -04:00
Joe Reuter
243e01a67a
[Lens] Move empty string handling into field formatter (#102877) (#103223)
# Conflicts:
#	x-pack/test/functional/apps/discover/__snapshots__/reporting.snap
2021-06-24 07:47:41 -04:00
Stratoula Kalafateli
74cd25d7a0
[VisTypePie] Use a different advanced setting for pie charts (#103049) (#103222)
* Different switch for pie

* Remove unused translations

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-24 07:40:58 -04:00
Kibana Machine
bb552721a8
[ML] Functional tests - fix and re-enable close_jobs API tests (#103114) (#103218)
This PR fixes and re-enables the close_jobs API tests after a backend change.

Co-authored-by: Robert Oskamp <robert.oskamp@elastic.co>
2021-06-24 07:03:57 -04:00
Kibana Machine
ad1dd21a2c
[Lens] Do not reset columns on incomplete switch before closing flyout (#102876) (#103211)
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
2021-06-24 05:40:29 -04:00
Greg Thompson
e4c7b099e9
[7.x] Upgrade EUI to v34.3.0 (#101334) (#103175)
* Upgrade EUI to v34.3.0 (#101334)

* eui to v34.1.0

* styled-components types

* src snapshot updates

* x-pack snapshot updates

* eui to v34.2.0

* styled-components todo

* src snapshot updates

* x-pack snapshot updates

* jest test updates

* collapsible_nav

* Hard-code global nav width for bottom bar’s (for now)

* Update to eui v34.3.0

* flyout unmock

* src flyout snapshots

* remove duplicate euioverlaymask

* xpack flyout snapshots

* remove unused import

* sidenavprops

* attr updates

* trial: flyout ownfocus

* remove unused

* graph selector

* jest

* jest

* flyout ownFocus

* saved objects flyout

* console welcome flyout

* timeline flyout

* clean up

* visible

* colorpicker data-test-subj

* selectors

* selector

* ts

* selector

* snapshot

* Fix `use_security_solution_navigation` TS error

* cypress

Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Chandler Prall <chandler.prall@gmail.com>

* fix bad merge resolution

* fix bad merge resolution

Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
2021-06-24 01:30:59 -04:00
Xavier Mouligneau
3dc053f348
[RAC] T-Grid is moving to a new home (#100265) (#103178)
* wip

* First pass at standalone and embedded redux stores and usage

* wip

* First pass at standalone and embedded redux stores and usage

* wip

* clean up

* wip

* refact(NA): remove extra pkg_npm target and add specific target folders on @kbn/i18n

* cleanup

* - fixes type errors in tests

* WIP remove use_manage_timeline

* wip add query + selector

* finishing integrating timeline manage context from redux

* integrating t-grid in security solution

* fix RowRender type

* WIP begin to move components from package to plugin

* integration of t-grid inside of security solution

* wip to make redux work

* little trick to make  it render

* - fixes a few type errors

* better integration betwen tgrid and security solutions

* bringing back tsconfig on timeline

* wip integration t-grid in observability

* fix types

* fix type in security solutions

* add type to import + trie dto get the bundle size as small as possible

* fix type in integration test

* fix type in integration test

* - fix tests

* clean up to use technical fields

* - fixes unit tests

* - mocks the `useDateFormat` function of the `useKibana` service to fix unit tests

* fix t-grid settings vs create timeline + fix inspect button

* fix last suites test

* Update unit tests, snapshots and lint

* Fix bad merge

* fix plugin export

* Fix some failing tests

* fix unit tets in timelines plugins

* fix latest test

* fix i18n

* free obs from t-grid

* Fix timeline functional plugin types

* fix store provider

* Update failing defaultHeader test

* Fix i18n usage in security solution

* Fix remaining i18n errors in timelines plugin

* Dedupe common shared types

* move drag and drop utils in package to avoid duplication

* More shared type cleanup

* add feature flag

* review I

* fix merge  with master

* fix i18n translation

* More type deduping

* Use @kbn/common-utils, fix remaining types

* fix types

* fix tests

* missing type

* fix cypress tests

Co-authored-by: Kevin Qualters <kevin.qualters@elastic.co>
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
Co-authored-by: Andrew Goldstein <andrew.goldstein@elastic.co>

Co-authored-by: Kevin Qualters <kevin.qualters@elastic.co>
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
Co-authored-by: Andrew Goldstein <andrew.goldstein@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-24 00:46:39 -04:00
Christos Nasikas
c6e6462e2f
[Security Solution] [Cases] Swimlane Connector for Cases (#100086) (#103165)
Co-authored-by: Josh <josh.rickard@swimlane.com>
Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
Co-authored-by: Jonathan Buttner <jonathan.buttner@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
Co-authored-by: Josh <josh.rickard@swimlane.com>
Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
Co-authored-by: Jonathan Buttner <jonathan.buttner@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-23 17:25:31 -04:00
Kibana Machine
dbfb32bbfd
[Fleet] Add UI and mappings for agent policy unenroll_timeout (#102970) (#103161)
## Summary

closes https://github.com/elastic/kibana/issues/100617

UI and mappings related to ephemeral agents

- [x] Adds mapping/type/schema definition for the new field in agent policy saved object
- [x] Shows input field labelled `Unenrollment timeout` in agent policy settings that reads/writes to the new field
- [x] Same input in `Advanced options` section of create agent flyout
- [x] `unenroll_timeout` can be set using preconfigured agent policies defined in `kibana.yml`
- [x] `unenroll_timeout` can be populated if the user has a preconfigured policy that _does not_ have this field initially, but then updates their `kibana.yml` later to include it

<details><summary>Screenshot - editing an existing agent policy</summary>

<img width="1251" alt="Screen Shot 2021-06-22 at 1 42 50 PM" src="https://user-images.githubusercontent.com/57655/122974924-d479b800-d360-11eb-8d37-306a6860f140.png">

</details>


<details><summary>Screenshots - adding a new agent policy</summary>
<img width="1258" alt="Screen Shot 2021-06-22 at 1 45 01 PM" src="https://user-images.githubusercontent.com/57655/122975141-0be86480-d361-11eb-9ccb-dde0cc44e438.png">
<img width="1257" alt="Screen Shot 2021-06-22 at 1 45 35 PM" src="https://user-images.githubusercontent.com/57655/122975139-0be86480-d361-11eb-90ae-3541dbbd68e6.png">
<img width="1258" alt="Screen Shot 2021-06-22 at 1 45 44 PM" src="https://user-images.githubusercontent.com/57655/122975138-0b4fce00-d361-11eb-8347-d6f0cb43ab91.png">
<img width="1254" alt="Screen Shot 2021-06-22 at 1 45 56 PM" src="https://user-images.githubusercontent.com/57655/122975136-0b4fce00-d361-11eb-9c51-ec7a9e52ea2b.png">
</details>

<details><summary>Using <code>kibana.dev.yml</code></summary>

<h3>No <code>unenroll_timeout</code></h3>

```yml
xpack.fleet.agentPolicies:
  - name: Preconfigured Policy From Config
    description: From kibana.dev.yml (no timeout given)
    id: 1
    namespace: test
    package_policies:
      - package:
          name: system
        name: System Integration
        inputs:
          - type: system/metrics
            enabled: true
            vars:
              - name: system.hostfs
                value: home/test
            streams:
              - data_stream:
                  dataset: system.core
                enabled: true
                vars:
                  - name: period
                    value: 20s
          - type: winlog
            enabled: false
```

<h4>UI (saved object)</h4>
<img width="1072" alt="Screen Shot 2021-06-23 at 10 28 03 AM" src="https://user-images.githubusercontent.com/57655/123117442-bf0f9700-d40f-11eb-8e8f-685fee3ccb4b.png">

<h4><code>fleet-policies</code>index</h4>
<img width="1690" alt="Screen Shot 2021-06-23 at 10 52 39 AM" src="https://user-images.githubusercontent.com/57655/123119430-883a8080-d411-11eb-990f-4953845a76b5.png">


<h4>Updated <code>kibana.dev.yml</code> to include <code>unenroll_timeout</code></h4>

```yml
xpack.fleet.agentPolicies:
  - name: Preconfigured Policy From Config
    description: From kibana.dev.yml (updated with timeout)
    id: 1
    namespace: test
    unenroll_timeout: 234
    package_policies:
      - package:
          name: system
        name: System Integration
        inputs:
          - type: system/metrics
            enabled: true
            vars:
              - name: system.hostfs
                value: home/test
            streams:
              - data_stream:
                  dataset: system.core
                enabled: true
                vars:
                  - name: period
                    value: 20s
          - type: winlog
            enabled: false
```

<h4>UI (saved object)</h4>
<img width="1073" alt="Screen Shot 2021-06-23 at 10 35 17 AM" src="https://user-images.githubusercontent.com/57655/123117444-bfa82d80-d40f-11eb-94a9-99d4ca4bed2a.png">

<h4><code>fleet-policies</code>index</h4>
<img width="1690" alt="Screen Shot 2021-06-23 at 10 35 41 AM" src="https://user-images.githubusercontent.com/57655/123117446-bfa82d80-d40f-11eb-9563-1add80f43f0e.png">

</details>

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

Co-authored-by: John Schulz <john.schulz@elastic.co>
2021-06-23 21:17:28 +00:00
Nicolas Chaulet
c6daf4ad18
[Fleet] Add global component template to all fleet index templates (#102225) (#103158) 2021-06-23 16:44:56 -04:00
Kibana Machine
1fc00c025a
[ML] Add Index Pattern Management to Index Data Visualizer (#101316) (#103156)
* [ML] Add index pattern editor flyout

* [ML] Add indexPatternField editor plugin as opt dependency

* [ML] Remove lens from ML's dependency

* [ML] Fix custom display name cause field to be missing

* [ML] Add delete option

* [ML] Fix aggregatableFields logic

* [ML] Add functional tests

* [ML] Fix labels & consolidate addRuntimeFields

* [ML] Add tooltip to show or hide distributions

* Consolidate refreshPage

* [ML] Fix tests

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

Co-authored-by: Quynh Nguyen <43350163+qn895@users.noreply.github.com>
2021-06-23 16:43:47 -04:00
Kibana Machine
2b242d452e
[Actions] Rename tls.* configs to ssl.* (#102902) (#103157)
* Changing tls to ssl

* Changing tls to ssl

* Updating docs

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

Co-authored-by: ymao1 <ying.mao@elastic.co>
2021-06-23 16:42:55 -04:00
Kibana Machine
081ba7f572
[Lens] Fix formula functional test (#102749) (#102779)
Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2021-06-23 19:36:28 +00:00