Commit graph

32788 commits

Author SHA1 Message Date
Spencer 6986c73cd9
[ngSanitize] add explicit dependencies to all uses of ngSanitize angular module (#64546) 2020-04-28 18:10:19 -07:00
Spencer 12362d8aa0
Consolidate downloading plugin bundles to bootstrap script (#64685) 2020-04-28 17:53:48 -07:00
Nathan Reese 4a18894fc3
[Maps] disable edit layer button when flyout is open for add layer or map settings (#64230)
* [Maps] disable edit layer button to avoid user data loss

* remove layer_toc_actions

* fix tslint errors

* update jest snapshots

* review feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-28 18:34:10 -06:00
Tiago Costa 30439f6df0
chore(NA): add async import into infra plugin to reduce apm bundle size (#63292)
* chore(NA): async import on infra plugin in order to avoid infra plugin on apm

* chore(NA): add async import into infra plugin to reduce apm bundle size

* docs(NA): including small note

* fix(NA): pass pluginsSetup as an argument

* chore(NA): fix missing type

* chore(NA): split register in two functions

* chore(NA): only register once

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-29 01:29:38 +01:00
Nathan Reese 7dc3972576
[Maps] fix edit filter (#64586) 2020-04-28 16:02:52 -06:00
Frank Hassanabad 1282341020
[SIEM][Detections] Adds large list support using REST endpoints
## Summary
* Adds large list support using REST endpoints.

Status: 
---

* Currently ready to be merged behind the feature flag of it being disabled with ongoing work happening after it is merged. 
* REST Endpoints shouldn't have large refactoring at this point
* Team meeting occurred where the pieces were discussed in person.

What is left?
---

- [ ] Add other data types. At the moment `ip` and `keyword` are the two types of lists. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html
- [x] Unit tests
- [x] Lots of misc TODO's in the code base still
- [ ] Import loads everything into memory first when it should attempt streaming
- [ ] Add end to end backend tests
- [x] Add transform and io-ts validation for returns 

Testing
---

Ensure you set this in your ENV before starting Kibana:
```ts
export ELASTIC_XPACK_SIEM_LISTS_FEATURE=true
```

Download or create a large list file such as this one filled with IP's:
https://cinsscore.com/list/ci-badguys.txt

Go to your REST endpoint folder of scripts:
```ts
cd kibana/x-pack/plugins/lists/server/scripts
```

Do a hard reset:
```ts
./hard_reset
```

Then import it as either a data type of `ip`:
```ts
./import_list_items_by_filename.sh ip ~/Downloads/ci-badguys-smaller.txt
```

Or as a `keyword`
```ts
./import_list_items_by_filename.sh keyword ~/Downloads/ci-badguys-smaller.txt
```

Then you can export it through:
```ts
./export_list_items.sh ci-badgusy-smaller.txt
```

For all the other endpoints and testing of the CRUD operations you have access to:

```ts
delete_all_lists.sh
delete_list.sh
delete_list_index.sh
delete_list_item.sh
delete_list_item_by_id.sh
delete_list_item_by_value.sh
export_list_items.sh
export_list_items_to_file.sh
get_list.sh
get_list_item_by_id.sh
get_list_item_by_value.sh
import_list_items.sh
import_list_items_by_filename.sh
lists_index_exists.sh
patch_list.sh
patch_list_item.sh
post_list.sh
post_list_index.sh
post_list_item.sh
```

### Checklist

Delete any items that are not applicable to this PR.

- [ ] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
2020-04-28 16:00:22 -06:00
Chandler Prall 9610dfb781
Replace a number of any-ed styled(eui*) with accurate types (#64555) 2020-04-28 14:53:01 -06:00
kqualters-elastic 8d880ffb77
[Endpoint] Recursive resolver children (#61914) 2020-04-28 16:11:01 -04:00
James Gowdy b5fb78bfce
[ML] Fix new job wizard with multiple indices (#64567)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-28 20:45:57 +01:00
Josh Dover dfb4c331a0
Use short URLs for legacy plugin deprecation warning (#64540) 2020-04-28 11:54:25 -06:00
Shahzad d5c1812d00
[Uptime] Update uptime ml job id to limit to 64 char (#64394) 2020-04-28 19:48:34 +02:00
Nicolas Chaulet cd4980a72b
[Ingest] Fix GET /enrollment-api-keys/null error (#64595) 2020-04-28 13:42:46 -04:00
Aaron Caldwell 02cbd9c374
Consolidate cross-cutting concerns between region & coordinate maps in new maps_legacy plugin (#64123) 2020-04-28 10:41:36 -06:00
CJ Cenizal 3b753ec514
ES UI new platform cleanup (#64332) 2020-04-28 09:41:02 -07:00
Patrick Mueller 4e0c11ea40
[Event Log] use @timestamp field for queries (#64391)
resolves https://github.com/elastic/kibana/issues/64275

Changes the fields used to query the event log by time range to use the
`@timestamp` field.

Also allow `@timestamp` as a sort option, and make it the default sort option.
2020-04-28 12:37:25 -04:00
Robert Austin 296855f8be
[Endpoint] housekeeping (#64237)
Reorganizing, renaming, and generally cleaning up common code in Endpoint.

* Cleaning up `common/types`
* Renaming things
* Adding comments
* Removing `export` when it's not needed
2020-04-28 12:22:13 -04:00
Aleh Zasypkin 36b4864b66
Introduce Access Agreement UI. (#63563)
Co-authored-by: Ryan Keairns <contactryank@gmail.com>
2020-04-28 18:00:31 +02:00
Chris Cowan 4a04adf812
[Metrics UI] Fixes for editing alerts in alert management (#64597)
* [Metrics UI] Fixes for editing alerts in alert management

* Change EuiFieldSearch to use onChange instead of onSearch

* Fixing groupBy

* Fixing the correct groupBy
2020-04-28 08:33:32 -07:00
Paul Tavares f7f245f4bc
[Endpoint] Bug fixes to Policy List and Details views (#64568)
* Fix Datasource API calls to use correct object type in kuery
* Fix policy details showing toaster multiple times
* Fix taking last url param value (instead of first)
2020-04-28 11:31:06 -04:00
Vadim Dalecky fa219bc2d8
fix: 🐛 subsribe to "abort" event in abort controller (#63199)
* fix: 🐛 subsribe to "abort" event in abort controller

* test: 💍 add test for execution cancellation after completion

* feat: 🎸 use a more meaningful sentinel

* refactor: 💡 use toPromise() from data plugin

* chore: 🤖 disable most new tests

* test: 💍 remove fake timers from abort tests

* test: 💍 remove new tests completely

There seems to be some async race condition in Jest test runner not
related to this PR, but for some reason Jest fails. Removing these tests
temporarily to check if this file cases Jest to fail.

* chore: 🤖 try adding .catch clause to abortion promise

* chore: 🤖 revert tests back and add .catch() comment
2020-04-28 16:40:46 +02:00
Mike Côté e09e6a2b0b
Fix flaky test in alert details page (#64572) 2020-04-28 09:58:12 -04:00
Sonja Krause-Harder 512e09761b
[EPM] Use index templates v2 (#64305)
* Install prebuilt index templates as v2

* Correctly handle pre-build v1 index templates

* Generate index templates v2 during package install

* Update unit tests for index template v2

* Fix imports.

* Fix types.

* Use index template v2 API for template deletion

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-28 15:31:21 +02:00
Daniil Suleiman da89856503
[NP] Move visTypeVislib into NP (#63963) 2020-04-28 14:44:17 +02:00
Liza Katz c2e464325e
add test for #64132 (#64307)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-28 15:03:04 +03:00
Aleh Zasypkin e7971fa08e
Improve Login Selector UX (#64142)
Co-authored-by: Dave Snider <dave.snider@gmail.com>
2020-04-28 12:55:11 +02:00
Felix Stürmer 2fba7ed9f7
[Logs UI] Reimplement log source configuration routes in plain HTTP+JSON (#64021) 2020-04-28 11:12:50 +02:00
James Gowdy f9c81a30cb
[ML] Add kibana setting for file data visualizer max file size (#64427)
* [ML] Add kibana setting for file data visualizers max file size

* adding failsafe for setting

* fixing id

* [DOCS] Updates Data Visualizer setting

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: lcawl <lcawley@elastic.co>
2020-04-28 09:22:46 +01:00
Pierre Gayvallet 2b3fadebf9
add licensed feature usage API (#63549)
* add licensed feature usage API

* add FTR test and plugin

* jsdoc

* fix FTR test suite name

* remove clear API

* accept Date for notifyUsage
2020-04-28 09:39:57 +02:00
Casper Hübertz 99c382fdac
[APM] Service maps: Improve the selected node style (#64279)
* [APM] Set the text color of the selected state

* [APM] Show label background on selected state
2020-04-28 09:33:55 +02:00
Patrick Mueller 5457a62fdb
[Event Log] add event.outcome to relevant event log documents (#64389)
resolves https://github.com/elastic/kibana/issues/61891

Adds a relatively new ECS field `event.outcome`. Value of `success`, `failure`,
or `unknown`. This is nice, as the only way we have currently of determining an
error for an alert or action execution in the log is the existence of an
`error.message` field.  It is added to to the documents for those events.

see: https://www.elastic.co/guide/en/ecs/current/ecs-event.html
2020-04-27 23:11:43 -04:00
Spencer 23665133d7
[kbn clean] delete plugin target directories (#64016) 2020-04-27 17:56:44 -07:00
Spencer 7a4d97cec8
[kbn/pm] use mtime of untracked files in bootstrap cache key (#64293) 2020-04-27 16:43:18 -07:00
Ryland Herrick 4cc5b3a4d3
[SIEM] Client NP Cutover (#64251)
* Move SIEM public/ folder to NP plugin

This is solely renames; fixes come next.

* Update relative imports in our API tests

* Fix linter errors following move to NP folder

These paths got a little shorter, so some lines could be collapsed.

* Move client dependencies to NP package.json

I'm removing the @types/js-yaml for now because I'm not sure we need it;
I'll add it back later if we do.

* Fix relative imports to other plugins

* Fix errant uses of ui/chrome

* Remove legacy plugin shim

* Move feature registration into plugin

This previously had to be part of legacy bootstrapping due to an order
of operations issue.

* Disconnect legacy plugin

The index file should now be redundant with what's in the plugin:

* app registration
* feature registration

* Move public gitattributes

* Remove references to legacy embeddables

We can now use the NP API. Maps embeddable will not work here until
their work is merged, but this should prevent us from importing legacy
code and thus breaking the build.

* Add our frontend dependencies to kibana.json

These are all required for now, because that's how they're typed. If
they _should_ be optional (and I think several should), we need to
update the type and handle the null case within the app.

* Replace use of ui/new_platform mocks in embeddable utils

* Fix remaining jest tests

* Replace build-breaking ui/new_platform mocks with equivalents in core
proper
* Remove unnecessary mocks of ui/new_platform

* Remove references to legacy SIEM folder

* I left the reference in CODEOWNERS in case someone tries to sneak
something back
* I left the .gitignore reference for the same reason

* Fix mocks of relative paths

These were not caught by typescript and were causing test failures.

* Export our client plugin contracts

They're empty for now.

* Move from deprecated appmount API

The new one dropped a param we weren't using.

* Add missing mock causing test failures

* Don't re-export core types from our plugin

Import them from core where we need them, instead

* Move Actions UI registry outside of mount

This is already imported, there's no benefit (and potential timing
issues) with doing this inside the mount.

* Add security's setup contract to our StartServices

This doesn't change what's used, only how we're typing it. The types are now a
little more truthful as:

* our StartPlugins don't include setup contracts
* our StartServices includes everything we use at Start time, including
the one setup plugin.

* Add order and icon back to the sidebar link

* Replace plugin class properties with constants

These are shared, and should be consistent.

* Enable our UI on NP

* Add missed plugin dependencies

We're not using their contracts, but we are importing code from them.

* Revert use of constant in translation

Can't do that, whoops

* i18n our feature catalogue entry

* Remove unnecessary array from single element

* Remove unused keys

These were the legacy translations used... well, I don't know where they
were used.

* Ignore circular dependencies in external plugins

* Normalize exclusions

* Add undeclared dependencies to kibana.json

We import our maps embeddable from maps, and we pass inspector to the
embeddable. I just missed these in my audit. This was causing errors in
the map embeddable.

* Await our call to setLayerList

This is an async call that we need to complete before we can render.

* Reduce siem plugin size

When we load our initial plugin (before our app is loaded), were were
implicitly importing all of kibana_react with this import. While a
global module prevents this from affecting our bundle size currently,
that could change in the future. Since we only need a reference to our
class, we just import that instead.
2020-04-27 17:59:21 -05:00
Tim Sullivan 54dc148226
[Reporting] Remove boilerplate needed to get thegetScreenshots function (#64269)
* expose reportingCore in ReportingSetup for apps

* improve tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-27 14:25:26 -07:00
Tim Sullivan 4c460b8c42
[Reporting/Test] move functional tests to apps (#64368)
* Squashed commit of the following:

commit 5953089c03bea6b2d091f7723fea25bb1c210ee8
Author: Timothy Sullivan <tsullivan@elastic.co>
Date:   Thu Apr 9 18:29:55 2020 -0700

    move tests to apps

commit 39adeaae6d3502d2c6da4e6111c2a396f2a7aedb
Author: Timothy Sullivan <tsullivan@elastic.co>
Date:   Thu Apr 9 17:49:20 2020 -0700

    update archive with better dashboard

commit 55b600748356c1adc5e75669b0c5588a812e401d
Author: Timothy Sullivan <tsullivan@elastic.co>
Date:   Thu Apr 9 17:16:53 2020 -0700

    fix the refactoring bugs

commit 11aff10cd8009aeb9bb78aa5ce0b37a72d47776e
Author: Timothy Sullivan <tsullivan@elastic.co>
Date:   Thu Apr 9 17:16:28 2020 -0700

    remove unused fixtuers

commit 05c33817c8eb67c461ac012cf2f71a9c01f1a91e
Author: Timothy Sullivan <tsullivan@elastic.co>
Date:   Thu Apr 9 16:37:36 2020 -0700

    Start of refactoring

commit b63c182b5f32b19dc3ca715efdbc5f18fcc02f67
Author: Timothy Sullivan <tsullivan@elastic.co>
Date:   Thu Apr 9 16:32:50 2020 -0700

    Todo comments

commit 1e0105e673
Author: Timothy Sullivan <tsullivan@elastic.co>
Date:   Thu Apr 9 14:31:58 2020 -0700

    revert unrelated change

commit 206fd14b77
Merge: 0d4c2ad29a 834306458a
Author: Timothy Sullivan <tsullivan@elastic.co>
Date:   Thu Apr 9 14:28:45 2020 -0700

    Merge branch 'master' into reporting/test-better

commit 0d4c2ad29a
Author: Timothy Sullivan <tsullivan@elastic.co>
Date:   Wed Apr 8 10:41:19 2020 -0700

    fix ts

commit 890128c47d
Merge: d9ce4024ec 3598b8c44c
Author: Timothy Sullivan <tsullivan@elastic.co>
Date:   Wed Apr 8 10:31:09 2020 -0700

    Merge branch 'master' into reporting/test-better

commit d9ce4024ec
Author: Timothy Sullivan <tsullivan@elastic.co>
Date:   Tue Apr 7 08:31:58 2020 -0700

    [Reporting] convert all server unit tests to TypeScript

* fix imports and readmes

* remove not-needed readme

* remove extra info from readme

* correct some comments

* log the error that was caught

* fix config path in readme

* fix readme instructions to point to updated paths

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-27 14:24:55 -07:00
Catherine Liu 4e714c2523
[Canvas] Fixes embed flyout (#64468) 2020-04-27 14:15:58 -07:00
Nicolas Chaulet 9bfdebd0f1
[Ingest] Datasource make difference between config and variables use to build agent stream (#64361) 2020-04-27 17:15:40 -04:00
Tiago Costa 17b23db643
chore(NA): exclude target folder from being watched by cluster manager (#64446)
* chore(NA): exclude target folder from being watched by cluster manager

* chore(NA): fix watcher regex

* chore(NA): re-add separators to regex

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-27 21:59:42 +01:00
Spencer 00ec971b6e
Implement basic CI metric reporting (#64263) 2020-04-27 13:24:52 -07:00
Paul Tavares 97d7620fcc
[Endpoint] Show Host Status on List view (#64455)
* show host status on list

* Adjust type for HostStatus-to-HealthColor

* Fixed unit tests

* Tests

* removed unused translation keys

* clarify test case description

* remove `ts-ignore`
2020-04-27 16:19:44 -04:00
Matthew Kime 231de27026
Typescript index pattern field editor (#63495)
* Typescript index pattern field editor
2020-04-27 15:19:02 -05:00
Nathan Reese 1252b832f4
[Maps] geo_shape fit to bounds (#64303)
* [Maps] geo_shape fit to bounds

* handle results that cross dateline

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-27 14:03:47 -06:00
Brian Seeders 4d3e60be39
[Docs] Add ES Snapshot docs (#64437) 2020-04-27 15:46:48 -04:00
CJ Cenizal 84aef3995e
Add CCR client integration test that asserts that the UI consumes the expected API when editing a follower index (#64440) 2020-04-27 12:20:19 -07:00
Ryland Herrick 9e8809b117
Disable mappings for rule_actions params (#64350)
These are most analagous to alerting params, which use the same terminal
mapping.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-27 14:14:24 -05:00
Tim Sullivan 6b5a96557f
[Reporting/telemetry] Add 'statuses' object to usage to show status counts by jobType & appType (#63922)
* [Reporting] Additional status by app data for usage

* --wip-- [skip ci]

* clean up types

* add a prettier-ignore

* fix types

* --wip-- [skip ci]

* fix typo

* more tests

* Tweak the data model

* fix the comments and type keys to reflect the data model

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-27 11:49:51 -07:00
Yuliia Naumenko 75fa843652
[Alerting] Implemented ability to edit an alert from the alert details page (#64273)
* Implemented ability to edit an alert from the alert details page

* Fixed refresh and tests

* fixed jest tests
2020-04-27 11:07:29 -07:00
Steph Milovic 60cb9367a6
[SIEM] [Cases] Use configure refactor (#64309) 2020-04-27 12:01:22 -06:00
Mike Côté db374fc950
Ability to get scoped call cluster from alerting and action executors (#64432)
* Initial work

* Rename to getScopedCallCluster

* Fix typecheck

* Fix more type check issues

* Add tests

* Add docs

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-27 13:46:04 -04:00
Joe Reuter a32d7b1344
Add editApp and editPath to embeddable (#64297) 2020-04-27 18:07:10 +02:00