Commit graph

42139 commits

Author SHA1 Message Date
CJ Cenizal 681bd642fb
Fix typo in license_api_guard README name and import http server mocks from public interface (#97334)
* Reject basic minimum licenses.
2021-04-18 20:28:13 -07:00
Pierre Gayvallet 787b493403
Avoid mutating KQL query when validating it (#97081) 2021-04-18 23:07:36 +02:00
Pierre Gayvallet cb2cf67609
Add description as title on tag badge (#97109) 2021-04-18 20:49:35 +02:00
Pierre Gayvallet f8838e3b89
Remove legacy ES client usages in home and xpack_legacy (#97359)
* Home plugin: remove usages of the legacy ES client

* remove legacy es client usage in xpack_legacy
2021-04-18 20:42:07 +02:00
Sonja Krause-Harder 05bd1c0cdb
[Fleet] Finer-grained error information from install/upgrade API (#95649)
* Intercept installation errors and add meta info.

* Adjust mock.

* Catch errors in all steps of install/upgrade.

* Adjust handler for direct package upload.

* Don't throw not-found errors on assets during rollback.

* Correctly catch errors from _installPackage()

* Propagate error from installResult in bulk install case.

* Add tests for rollback.

* Remove unused code.

* Skipping test that doesn't test what it says.

* Fix and reenable test.
2021-04-18 16:47:24 +02:00
Dario Gieselaar fed17c2b6e
Rule registry bundle size (#97251) 2021-04-18 16:40:54 +02:00
Liza Katz 1a3e033c90
[Partial Results] Move other bucket into Search Source (#96384)
* Move inspector adapter integration into search source

* docs and ts

* Move other bucket to search source

* test ts + delete unused tabilfy function

* hierarchical param in aggconfig.
ts improvements
more inspector tests

* fix jest

* separate inspect
more tests

* jest

* inspector

* Error handling and more tests

* put the fun in functional tests

* code review

* Add functional test for other bucket in search example app

* test

* test

* ts

* test

* test

* ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-18 12:50:02 +03:00
Catherine Liu 3b31d81196
[Dashboard] Makes lens default editor for creating new panels (#96181)
* Makes lens default editor in dashboard

Added all editors menu to dashboard panel toolbar

Fixed toggle on editor menu

Removed unnecessary comments

Added data test subjects to editor menu buttons

Populated editor menu with vis types

Removed unused imports

Fixed imports

Adds showCreateNewMenu prop to AddPanelFlyout

Rearranged order of editor menu options

Fixed ts errors

Added groupnig to embeddable factory

Use embeddable state transfer service to redirect to editors

Added showGroups to TypeSelectionState

Fixed add panel flyout test

Fixed data test subjects

Fixed factory groupings

Removed unused import

Fixed page object

Added telemtry to dashboard toolbar

Added telemtry to editor menu

Fix ml embeddable functional tests

Fix lens dashboard test

Fix empty dashboard test

Fixed ts errors

Fixed time to visualize security test

Fixed empty dashboard test

Fixed clickAddNewEmbeddableLink in dashboardAddPanel service

Fixed agg based vis functional tests

Revert test changes

Fixed typo

Fix tests

Fix more tests

Fix ts errors

Fixed more tests

Fixed toolbar sizes and margins to align with lens

Fix tests

Fixed callbacks

Fixed button prop type

New vis modal copy updates

Added savedObjectMetaData to log stream embeddable factory

Addressed feedback

Fixed ts error

Fix more tests

Fixed ts errors

Updated dashboard empty prompt copy

Adds tooltip to log stream embeddable factory saved object meta data

Made icons monochrome in toolbar

Fixed icon colors in dark mode

Cleaned up css

Fixed ts errors

Updated snapshot

Fixed map icon color

* Added tooltips for ML embeddables

* Restored test

* Added empty dashboard panel test

* Fixed i18n id

* Fix dashboard_embedding test

* Removed unused service

* Fixed i18n error

* Added icon and description properties to embeddable factory definition

* Fixed ts errors

* Fixed expected value

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-17 22:29:27 -07:00
Tiago Costa a89b756710
skip flaky suite (#97387) 2021-04-17 15:52:32 +01:00
Bryan Clement e0da8b2e96
[Asset Management] Agent picker follow up (#97357) 2021-04-17 06:42:49 -04:00
spalger e321f57f64 skip flaky suite (#97382) 2021-04-16 22:28:19 -07:00
Frank Hassanabad 721f4b55f5
[Security Solutions] Fixes flake with cypress tests (#97329)
## Summary

Fixes some recent flakeyness with Cypress tests
* Adds cypress.pipe() on button clicks around the area of flakes
* Adds an alerting threshold to the utilities so we can wait for when an exact number of alerts are available on a page
* Changes the alerts to not run again with 10 seconds, because if a test takes longer than 10 seconds, the rule can run a second time which can invalidate some of the text when running checks when timeline or other components update on their button clicks.

### 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-04-16 13:52:35 -06:00
spalger 1cbdb26cea skip flaky suite (#97355) 2021-04-16 12:11:12 -07:00
Tyler Smalley 194355fdd3 Skip test to try and stabilize master
https://github.com/elastic/kibana/issues/97378

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-04-16 10:57:29 -07:00
Mikhail Shustov 6c7d776fc1
minimize number of so fild asserted in tests. it creates flakines when implementation details change (#97374) 2021-04-16 13:55:16 -04:00
Liza Katz c187270b5e
[Search Sessions] Client side search cache (#92439)
* dev docs

* sessions tutorial

* title

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update dev_docs/tutorials/data/search.mdx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Code review

* client cache

* mock utils

* improve code

* Use cacheOnClient in Lens

* mock

* docs and types

* unit tests!

* Search response cache + tests

* remove cacheOnClient
evict cache on error

* test ts

* shouldCacheOnClient + improve tests

* remove unused

* clear subs

* dont unsubscribe on setItem

* caching mess

* t

* fix jest

* add size to bfetch response @ppisljar
use it to reduce the # of stringify in response cache

* ts

* ts

* docs

* simplify abort controller logic and extract it into a class

* docs

* delete unused tests

* use addAbortSignal

* code review

* Use shareReplay, fix tests

* code review

* bfetch test

* code review

* Leave the bfetch changes out

* docs + isRestore

* make sure to clean up properly

* Make sure that aborting in cache works correctly
Clearer restructuring of code

* fix test

* import

* code review round 1

* ts

* Added functional test for search request caching

* test

* skip before codefreeze

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-16 19:59:23 +03:00
Pierre Gayvallet 106afd41b6
[SavedObjects] Add aggregations support (#96292)
* step 1 to add aggs in the find function of saved object

* setp 2 - add specific unit test to aggs + fix bug found during integrations

* step 3 - add security api_integration arounds aggs

* fix types

* unit test added for aggs_utils

* add documentation

* fix docs

* review I

* doc

* try to fix test

* add the new property to the saved object globaltype

* fix types

* delete old files

* fix types + test api integration

* type fix + test

* Update src/core/server/saved_objects/types.ts

Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>

* review I

* change our validation to match discussion with Pierre and Rudolph

* Validate multiple items nested filter query through KueryNode

* remove unused import

* review + put back test

* migrate added tests to new TS file

* fix documentation

* fix license header

* move stuff

* duplicating test mappings

* rename some stuff

* move ALL the things

* cast to aggregation container

* update generated doc

* add deep nested validation

* rewrite the whole validation mechanism

* some cleanup

* minor cleanup

* update generated doc

* adapt telemetry client

* fix API integ tests

* fix doc

* TOTO-less

* remove xpack tests

* list supported / unsupported aggregations

* typo fix

* extract some validation function

* fix indent

* add some unit tests

* adapt FTR assertions

* update doc

* fix doc

* doc again

* cleanup test names

* improve tsdoc on validation functions

* perf nit

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-16 10:40:30 +02:00
Michael Dokolin 15e8ca1161
[Reporting] Remove legacy elasticsearch client usage from the reporting plugin (#97184) 2021-04-16 10:09:34 +02:00
Spencer 9987e3d73b
[kbnClient] fix basePath handling and export reponse type (#97277)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-15 22:12:23 -07:00
Tyler Smalley 347882f01a skip flaky suite (#91360) 2021-04-15 22:05:14 -07:00
Ryland Herrick b5ae056ac4
[Security Solution][Detections] ML Rules accept multiple ML Job IDs (#97073)
* Adds helper to normalize legacy ML rule field to an array

This will be used on read of rules, to normalize legacy rules while
avoiding an explicit migration.

* Fix our detection-specific ML search function

Luckily this was just a translation layer to our anomaly call, and the
underlying functions already accepted an array of strings.

* WIP: Run rules against multiple ML Job IDs

We don't yet support creation of rules with multiple job ids, either on
the API or the UI, but when we do they will work.

Note: the logic was previously to generate an error if the underlying
job was not running, but to still query and generate alerts. Extending
that logic to multiple jobs: if any are not running, we generate an
error but continue querying and generating alerts.

* WIP: updating ml rule schemas to support multiple job IDs

* Simplify normalization method

We don't care about null or empty string values here; those were
holdovers from copying the logic of normalizeThreshold and don't apply
to this situation.

* Move normalized types to separate file to fix circular dependency

Our use of NonEmptyArray within common/schemas seemed to be causing the
above; this fixes it for now.

* Normalize ML job_ids param at the API layer

Previous changes to the base types already covered the majority of
routes; this updates the miscellaneous helpers that don't leverage those
shared utilities.

At the DB level, the forthcoming migration will ensure that we always
have "normalized" job IDs as an array.

* Count stopped ML Jobs as partial failure during ML Rule execution

Since we continue to query anomalies and potentially generate alerts, a
"failure" status is no longer the most accurate for this situation.

* Update 7.13 alerts migration to allow multi-job ML Rules

This ensures that we can assume string[] for this field during rule
execution.

* Display N job statuses on rule details

* WIP: converts MLJobSelect to a multiselect

Unfortunately, the SuperSelect does not allow multiselect so we need to
convert this to a combobox. Luckily we can reuse most of the code here
and remain relatively clean.

Since all combobox options must be the same (fixed) height, we're
somewhat more limited than before for displaying the rows. The
truncation appears fine, but I need to figure out a way to display the
full description as well.

* Update client-side logic to handle an array of ML job_ids

* Marginally more legible error message

* Conditionally call our normalize helper only if we have a value

This fixes a type error where TS could not infer that the return value
would not be undefined despite knowing that the argument was never
undefined. I tried some fancy conditional generic types, but that didn't
work.

This is more analogous to normalizeThresholdObject now, anyway.

* Fix remaining type error

* Clean up our ML executor tests with existing contract mocks

* Update ML Executor tests with new logic

We now record a partial failure instead of an error.

* Add and update tests for new ML normalization logic

* Add and update integration tests for ML Rules

Ensures that dealing with legacy job formats continues to work in the
API.

* Fix a type error

These params can no longer be strings.

* Update ML cypress test to create a rule with 2 ML jobs

If we can create a rule with 2 jobs, we should also be able to create a
rule with 1 job.

* Remove unused constant

* Persist a partial failure message written by a rule executor

We added the result.warning field as a way to indicate that a partial
failure was written to the rule, but neglected to account for that in the
main rule execution code, which caused a success status to immediately
overwrite the partial failure if the rule execution did not otherwise
fail/short-circuit.
2021-04-15 21:27:43 -05:00
Ryland Herrick 540924b5be
[Security Solution][Detections] Adds Nested CTI row renderer (#96275)
* Move alert-specific mocks to more declarative mock file

* Add placeholder interface for ECS threat fields

* Test and implement CTI row renderer

The display details are not yet implemented, but those will be fleshed
out in the ThreatMatchRow component.

* Pass full fields data to our row renderers

This data is not used by any existing row renderers and so this commit
is mostly just plumbing that data through.

This is necessary, however, for our new threat match row renderer as it
requires nested fields, which cannot be retrieved through the mechanism
that retrieves the existing row renderer data. However, these nested
fields are available, if requested, through this other data structure,
hence this plumbing.

For now to minimize changes I'm marking this as an optional field;
however in reality a value will always be present.

* Rewrite existing row renderer in terms of flattened data

Updates logic, tests and mocks accordingly.

* Moving logic into discrete files

* helpers
* explicit fields file, which will hopefully be part of the renderer API
  at some point
* parent component to split data into "rows" as defined by our renderer
* row component for stateless presentation of a single match

* Register threat match row rendere

Adds tentative copy, example row, and accompanying mock data.

* WIP: Rendering draggable fields but hit the data loss issue with nested fields being flattened

* WIP: implementing row renderer against new data format

I haven't yet deleted the old (new?) unused path yet. Cleanup to come.

* Updating based on new data

* Rewrites isInstance logic for new data as helper, hasThreatMatchValue
* Updating types and tests
  * Adds to the previously empty ThreatEcs

* Revert "Pass full fields data to our row renderers"

This reverts commit 19c93ee0732166747b5472433cd5fc813638e21b.

We ended up extending the existing data (albeit from the fields
response!).

* Fix draggables

* adds contextId and eventId to pass to draggable
* We don't have a order-independent key for each individual
  ThreatMatchRow, due to matched.id not being mapped/returned in the
  fields response
* Fixes up a few things related to using the new data format

* Move indicator field strings to constants

* Fix example data for CTI row renderer

* Adds missing Threat ECS types

* Move CTI field constants to common folder

In order to use these in both the row renderer and the server request,
we need to move them to common/

* Remove redundant CTI fields from client request

These are currently hardcoded on the backend of the events/all query
(via TIMELINE_EVENTS_FIELDS); declaring them on both ends is arguably
confusing, and we're going with YAGNI for now.

* Add missing graphQL type

This was causing type errors as this enum exists both here and in
common/, and I had only updated one of them.

* Updates tests

One is still failing due to an outdated test subject, but I expect this
to change after an upcoming meeting so leaving it for now.

* Split ThreatMatchRow into subcomponents

One for displaying match details, and another for indicator details

The indicator details will be sparse, so there's going to be some
conditional rendering in there.

* Make CTI row renderer look nice

* Adds translations for copy
* Fixes most of our layout woes with more flexbox!
* Conditional rendering of indicator details based on data
* tests

* Make indicator reference field an external link

Leverages the existing FormattedFieldValue component, with one minor
tweak to add this field to the URL allowlist.

* Back to consistent horizontal spacing, here

The draggable badges are a little odd in that their full box isn't
indicated until hover, making the visual weight a little off.

* Add hr as a visual separator between each match "row" of the row renderer

* Fix tests broken due to addition of a new row renderer

These tests are all implicitly testing the list of row renderers.

* Full-width hr

At certain container widths, a half-width hr is not sufficient.

* More descriptive constant

Obviates the need for the accompanying comments.

* More realistic data

Also ensures less traffic to urlhaus ;)

* Remove useless comment

* Add threat_match row renderer type to GQL client

Gennin' beanz

* Ensure contextId is unique for each CTI subrow

We need to add the row index to our contextId to ensure that our
draggables work correctly for multiple rows, since each row will
necessarily have the same eventId and timelineId.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-15 21:28:18 -04:00
John Schulz 6e5c9278ba
[Fleet] Use 'hosted agent policy' naming in UI & API messages (#97287)
## Summary

### What this PR _does_ change
 - [x] Replace all UI & API instances of "managed policy" with "hosted agent policy" #93504
 - [x] Replace all UI & API instances of "unmanaged policy" with "regular agent policy" #93504
 - [x] Update most variable names containing `managed` to `hosted`

<details><summary>screenshots</summary>

<img width="489" alt="Screen Shot 2021-04-15 at 10 54 01 AM" src="https://user-images.githubusercontent.com/57655/114898051-cac35980-9ddf-11eb-9c55-3fb5c0211c63.png">
<img width="339" alt="Screen Shot 2021-04-15 at 11 40 47 AM" src="https://user-images.githubusercontent.com/57655/114898053-cac35980-9ddf-11eb-8c60-3459aed3db6c.png">
<img width="714" alt="Screen Shot 2021-04-15 at 11 40 59 AM" src="https://user-images.githubusercontent.com/57655/114898054-cac35980-9ddf-11eb-912a-623eba9c3860.png">
</details>

### What this PR _does not_ change
  - [ ] The `is_managed` property of the agent policy saved object*
  - [ ] The updated error messages in https://github.com/elastic/kibana/issues/92591

<details><summary>*why not change the <code>is_managed</code> property?</summary>

<p>Changing the property will require a migration from 7.12. That's not a problem, but we haven't decided on <a href="https://github.com/elastic/kibana/issues/93504#issuecomment-790060997">a new name/approach</a> yet. Rather than update to <code>is_hosted: boolean</code> now and potentially something like <code>managed_by: enum</code> later, we'll update it when we have a decision.

<p><strong>TL;DR:</strong> It's a trivial update to make later and a minuscule amount of debt to pay until then. Less than cost of doing it twice.
 
</details>

### Checklist

- [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)
- [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-04-15 21:01:28 -04:00
Spencer 9d0b495a30
[ci] ship Jest unit test junit with runbld in jest worker (#97197)
Co-authored-by: Brian Seeders <seeders@gmail.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-04-15 17:13:38 -07:00
Spencer 689c4d40cd
[ci/baseline] check public API doc count to populate baseline metrics (#97320)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-04-15 17:12:52 -07:00
Xavier Mouligneau 875c475936
happy it is fix (#97313) 2021-04-15 17:58:51 -04:00
CJ Cenizal 35214416f8
Extract License service from CCR and Watcher into license_api_guard plugin in x-pack (#95973)
* Localize error messages.
2021-04-15 14:54:49 -07:00
Zacqary Adam Xeper 6faf07d0c0
[Fleet] Add latest package flag and remove force flag (#97289)
* [Fleet] Add latest package flag and remove force flag

* Fix installing latest package when old package is still installed
2021-04-15 17:29:09 -04:00
Nicolas Chaulet 78937e3bb4
[Fleet] Remove fleet agent routes and related services (#97206) 2021-04-15 17:15:43 -04:00
Nathan Reese f972174867
[Maps][File upload] fix layer in preview mode shows different results after uploading geojson file when feature-count exceeds ES-search limit (#97157)
* [Maps][File upload] fix layer in preview mode shows different results after uploading geojson file when feature-count exceeds ES-search limit

* i18n clean up

* review feedback

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-15 15:14:18 -06:00
Tiago Costa dcb69e12f0
chore(NA): upgrade lmdb-store to 1.2.4 (#97275)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-15 21:57:35 +01:00
renovate[bot] ad25fb3f12
Update dependency @elastic/charts to v28.2.0 (master) (#97005)
* Update dependency @elastic/charts to v28.2.0

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: nickofthyme <nick.ryan.partridge@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
2021-04-15 22:34:01 +02:00
Scotty Bollinger 3a32817a7a
[Workplace Search] Add ErrorReasons fix from ent-search (#97299)
Ports https://github.com/elastic/ent-search/pull/3393 to Kibana
2021-04-15 16:23:59 -04:00
Nathan Reese fdb7be3d11
Remove field type filtering from IndexPatternSelect (#97035)
* Remove field type filtering from IndexPatternSelect

* remove unused import

* api doc updates

* update jest snapshots

* another fix for jest test

* review feedback

* tslint

* update jest snapshot for changes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-15 12:26:25 -06:00
ymao1 b09e418e51
[Actions][Telemetry] Counting number of alert history connectors in use (#97063)
* Counting number of alert history connectors in use

* Telemetry for preconfigured alert history config enabled

* Updating telemetry mappings

* Updating tests

* Adding descriptions to new telemetry fields

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-15 14:13:19 -04:00
Alejandro Fernández Haro b7067dea16
[Usage Collection/Cloud Provider] Fix isReady bug (#97279) 2021-04-15 14:04:52 -04:00
Matthias Wilhelm f4e7941e7d
[Discover] Unskip doc navigation functional test (#96948) 2021-04-15 19:58:19 +02:00
Ashokaditya d47ee56e93
[Security Solution] Breaks very long hostnames so they are readable (#97253)
* Breaks very long hostnames so they are readable

fixes elastic/kibana/issues/96282

* use utility class instead

review change
2021-04-15 19:16:56 +02:00
Justin Ibarra 069b04bed6
[Detection Rules] Remove empty values in threshold.field array for threshold rules (#97111)
## Issues
related to https://github.com/elastic/detection-rules/issues/1097
related to https://github.com/elastic/detection-rules/pull/1099

## Summary

`threshold.field` is an array that currently requires at least one value. An empty string `""` was required if no value was supplied. Instead, this needs to be replaced with no string and just an empty array.
### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)
2021-04-15 11:08:45 -06:00
Marco Liberati 83831ce990
[Graph] Fix fields clearing within the Editor (#96767)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-15 18:56:33 +02:00
Melissa Alvarez 53e2d5d725
[ML] Data Frame Analytics: Ensure creation and results views display nested fields correctly (#96905)
* create analytics field service

* remove unnecessary field filter. update types

* create common base class for newJobCapabilites classes for AD and DFA

* fix column schema for histogram

* update endpoint to be consistent with AD job caps

* add unit test for removeNestedFieldChildren helper function

* removes obsolete const
2021-04-15 12:52:09 -04:00
Phillip Burch e11ac98b3a
[Metrics UI] Add anomalies tab to enhanced node details (#96967)
* Adapt the anomalies table to work in overlay

* Wire up the onClose function

* Make "show in inventory" filter waffle map

* Remove unused variable

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-15 11:37:47 -05:00
Dario Gieselaar 5bb9eecd26
[RAC] Populate Observability alerts table with data from alerts indices (#96692)
* Set up Observability rule APIs

* Populate alerts table with data from API

* Move field map types/utils to common

* Format reason/link in alert type

* Format reason/link in alert type

* Fix issues with tsconfigs

* Storybook cleanup for example alerts

* Use `MemoryRouter` in the stories and `useHistory` in the component to get the history
* Replace examples with ones from "real" data
* Use `() => {}` instead of `jest.fn()` in mock registry data

* Store/display evaluations, add active/recovered badge

* Some more story fixes

* Decode rule data with type from owning registry

* Use transaction type/environment in link to app

* Fix type issues

* Fix API tests

* Undo changes in task_runner.ts

* Remove Mutable<> wrappers for field map

* Remove logger.debug calls in alerting es client

* Add API test for recovery of alerts

* Revert changes to src/core/server/http/router

* Use type imports where possible

* Update limits

* Set limit to 100kb

Co-authored-by: Nathan L Smith <smith@nlsmith.com>
2021-04-15 18:25:50 +02:00
Jean-Louis Leysens 5ecf09843e
[ILM] Support max primary shard size rollover field (#96545)
* added max primary shard size rollover field

* large-ish refactor of the hot phase component to move the rollover fields to their own components

* added comment

* address i18n issue

* - fixed jest tests
- fixed behaviour to show missing value for rollover
- updated jest snapshots

* added field deprecation component

* added test for whether deprecation icon is visible

* remove unused import, remove type generic from FormSchema

* fixed getting "getFields" from incorrect object

* wip!!!

* - removed FieldDeprecationWarning component and associated tests
- implmented always showing the warning icon and updated the color
- cleaned up test helpers

* - more tightly grouped the numeric inputs with their unit selects
  by reducing the gutter size before defazios feedback
- fixed alignment issue between numeric rollover inputs and their
  unit select field by adding flex-end styling to the groups

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-15 18:02:18 +02:00
Joe Reuter 6c07eb2382
fix test leak (#97082) 2021-04-15 17:57:44 +02:00
Joe Portner e675429b98
Harden saved object deserialization (#94842) 2021-04-15 11:57:24 -04:00
Stacey Gammon 503cfcf8c9
Track API stats as part of ci (#95733)
* Track stats and add extra output information

* Update api docs output

* Clean up id names

* update api docs

* Consolidate error messages and fix a bug

* Update docs

* Update get_declaration_nodes_for_plugin.ts

* Fix bug with removeBrokenLinks not being recursive

* Update docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-15 11:36:10 -04:00
Frank Hassanabad ede8ed3f95
[Security Solutions ] Fixes failed to query DNS data - too_many_buckets_exception (#97069)
## Summary

Fixes a bug where on the DNS tab of networks you can get a `too_many_buckets_exception`. Worked through the query with @angorayc and together I think we figured out that the query could be re-written with aggregations in a way to get the same results without having to query a large amount of terms which causes the buckets exception.

Added a e2e test and one way of being able to call bsearch in the e2e when it returns the search is still in progress so we don't have the large query test cause flakiness 🤞 .

### 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-04-15 09:22:56 -06:00
Kerry Gallagher 9b456ac0fe
[Logs UI] Provide support for Kibana Index Patterns in the logs source configuration (#96454)
* Provide support for Kibana Index Patterns in the logs source configuration

Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
2021-04-15 16:15:11 +01:00
Alejandro Fernández Haro c710cb9bbd
[DocLinks] Update outdated docs (#97217) 2021-04-15 16:01:36 +01:00