Commit graph

32711 commits

Author SHA1 Message Date
Dmitry Lemeshko
bac638a37e
Update jest config for coverage (#64648)
* set files to track for coverage collection

* increase timeout to 4h

* trying to add detectOpenHandles to avoid worker stuck

* update config

* make config paths more common

* update configs

* update jest oss config

* exclude 'tests' folder for coverage
2020-04-29 20:00:14 +03:00
Ryland Herrick
f8e01bd3a1
[SIEM][NP] Fixes bug in ML signals promotion (#64720)
* Add set-value as an explicit dependency

This is a more robust solution than lodash's set().

* Replace lodash.set() with set-value's equivalent

* Rebuild renovate config

We added set-value to our dependencies.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-29 11:58:46 -05:00
Spencer
0d4cfba4b4
share single data plugin bundle (#64549) 2020-04-29 09:44:56 -07:00
Mikhail Shustov
5082ff3252
use cache busting for KP bundles (#64414)
* convert into TS

* load plugin scripts in html body

* use buildNum as a unique Id for cache busting

* add tests for caching

* fix tests

* remove the last TODO. url should be inlined with assetss server

* this logic handled by publicPathMap on the client

* cache kbn-shared-deps as well

* attempt to fix karma tests

* always run file through replace stream

* place buildHash at begining of path, include all static files

* update bundles_route tests to inject buildNum everywhere

* fix karma config to point to right prefix

* use isDist naming throughout

* explain magic number with variables

* restore replacePublicPath option from #64226

* replace one more instance of replacePublicPath

* use promisify instead of bluebird + non-null assertions

* remove one more magic number

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-29 09:43:15 -07:00
Aleh Zasypkin
5ee6dcd14d
Lazy load Security plugin management apps. (#64511) 2020-04-29 18:15:57 +02:00
Tiago Costa
7354ff6676
Revert "chore(NA): add async import into infra plugin to reduce apm bundle size (#63292)" (#64764)
This reverts commit 30439f6df0.
2020-04-29 16:38:41 +01:00
Nicolas Chaulet
f8dc041b85
[Ingest] Use agent template embeded in the pkg registry response (#64705) 2020-04-29 11:31:35 -04:00
Wylie Conlon
af2e86f949
[Lens] Fix flaky test by closing options after use (#64714)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-29 10:50:03 -04:00
Gidi Meir Morris
9fe7229357
[Alerting] migrates all remaining plugins to new platform (#64335)
Completes the migration of all Alerting Services plugins onto the Kibana Platform

It includes:

1. Actions plugin
2. Alerting plugin
3. Task Manager plugin
4. Triggers UI plugin

And touches the Uptime and Siem plugins as their use of the Task Manager relied on some of the legacy lifecycle to work (registering AlertTypes and Telemetry tasks after the Start stage has already began). The fix was simply to moves these registrations to the Setup stage.
2020-04-29 15:46:54 +01:00
Frank Hassanabad
30e41c5d8f
Update codeowners for endpoint and siem
## Summary

* Update codeowners for endpoint and SIEM
* Remove legacy stuff
2020-04-29 08:25:12 -06:00
Corey Robertson
ac61783a2d
[CANVAS] Adds Canvas Platform Service (#64453)
* Adds Canvas Platform Service

* Fix type check

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-29 09:49:25 -04:00
Sonja Krause-Harder
2c7741bba3
[EPM] Handle object type fields with properties in mappings (#64745)
* Generate correct mapping for object type field with properties

* Add test for fields definition in reverse order
2020-04-29 15:36:39 +02:00
Larry Gregory
f1d72ad127
Expose security license on setup (#64651) 2020-04-29 08:52:33 -04:00
Marta Bondyra
da4c33b022
[Lens] Don't use auto interval to get interval for single bar (#64502)
* feat: don't use auto interval to get interval for single bar

* fix: fixing non auto intervals

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-29 14:47:45 +02:00
István Zoltán Szabó
a38c11cd10
[ML] Changes Machine learning overview UI text (#64625)
Co-Authored-By: Lisa Cawley <lcawley@elastic.co>
2020-04-29 13:58:27 +02:00
Justin Kambic
05f0d0ac8a
[Uptime] Migrate client to New Platform (#55086)
* Move uptime legacy server to plugins directory.

* Re-add feature registration code.

* Move uptime legacy server to plugins directory.

* Re-add feature registration code.

* Move all files.

* WIP fixing things.

* WIP fixing things.

* WIP fixing things.

* Finished fixing server.

* Fix alert type registration glitch.

* Remove obsolete file.

* Fix unwanted revisions, uncomment previously un-migrated code, delete accidentally-merged files.

* More cleanup.

* Fix all non-maps unit tests.

* Get functional tests working.

* Delete misplaced file.

* Add uptime CODEOWNERS entry.

* Get map working in Uptime app on NP.

* Update CODEOWNERS to remove legacy entry.

* Update server imports.

* Delete and clean up unused or redundant code/comments.

* Move new files from legacy to NP to fix merge error.

* Fix broken import.

* Delete obsolete test snapshots.

* Clean up imports and types, delete obsolete code.

* Clean up redundant common imports.

* Delete obsolete translation keys.

* Add additional explicit typing to plugin class.

* Combine redundant common imports.

* Delete unneeded optionalPlugin entry.

* Revert "Combine redundant common imports."

This reverts commit 159e66c349.

* Update a translation description.

* Revert "Clean up redundant common imports."

This reverts commit 8794013fbe.

* Remove new common index file and revert imports from only common to more specific paths.

* Fix broken imports in `~/x-pack/test`.

* Move new file from legacy to NP location.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-29 07:28:03 -04:00
Mikhail Shustov
8bb67f2c62
Slim vis type timeseries (#64631)
* load visualizations code lazily

* load VisEditor lazily
2020-04-29 12:00:18 +02:00
Alejandro Fernández Haro
fc79c06fc0
[Telemetry] Fix inconsistent search behaviour in Advanced Settings (#64510) 2020-04-29 10:40:45 +01:00
Angela Chuang
a42c2026e2
[SIEM] Create template timeline (#63136)
* init routes for template timeline

* create template timeline

* add create/update timelines route

* update api entry point

* fix types

* add template type

* fix types

* add types and template timeline id

* fix types

* update import timeline to handle template timeline

* unit test

* sudo code

* remove class for savedobject

* add template timeline version

* clean up arguments

* fix types for framework request

* show filter in find

* fix create template timeline

* update mock data

* handle missing timeline when exporting

* update the order for timeline routes

* update schemas

* move type to common folder so we can re-use them on UI and server side

* fix types + integrate persist with epic timeline

* update all timeline when persit timeline

* add timeline api readme

* fix validation error

* fix unit test

* display error if unexpected format is given

* fix issue with reftech all timeline query

* fix flashing timeline while refetch

* fix types

* fix types

* fix dependency

* fix timeline deletion

* remove redundant dependency

* add i18n message

* fix unit test

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-29 09:39:12 +01:00
Mikhail Shustov
ad89b1e67f
load react component lazily in so management section (#64285)
* load react component lazily in so management section

* remove unused imports

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-29 08:50:54 +02:00
Tyler Smalley
beb07c28fc
Cleanup .eslingignore and add target (#64617)
* Cleanup .eslingignore and add target

Since adding the new platform plugins target directories, we need to
update the eslintignore to reflect that.

Did a bit of organizing of the file for some sanity.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-04-28 20:01:16 -07:00
Nicolas Chaulet
129cf4fdd0
[Ingest] Support yaml variables in datasource (#64459) 2020-04-28 21:43:12 -04:00
Spencer
408ad6f389
typescript-ify portions of src/optimize (#64688) 2020-04-28 18:14:34 -07:00
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