Commit graph

30821 commits

Author SHA1 Message Date
Jonathan Budzenski
76d475a64c
Refactor test entry by runner (#44679)
Over the last few years we've increased the number of test runners.
Entry points by test type have become too lage of a category for unique
names, so this moves top level test scripts under yarn and replaces test
types with the runner name.

e.g. `yarn test:browser` -> `yarn test:karma`

Closes #41133

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-18 16:21:36 -06:00
Matthew Kime
911981d8b5
Index pattern management - typescript components (#56987)
* Index pattern management - typescript components
2020-02-18 15:41:10 -06:00
Davis Plumlee
f6dc67470d
Alert list frontend pagination (#57142) 2020-02-18 15:21:10 -05:00
gchaps
5c2e6d9382
[DOCS] Removes IRC from Contributing.md (#57397)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-18 12:19:44 -08:00
Vadim Dalecky
6436862dc5
Types (#57801)
* feat: 🎸 add Values<T>

* feat: 🎸 add UnionToIntersection<T> type

* refactor: 💡 use UnionToIntersection<T> in Canvas from @kbn/

* feat: 🎸 add PublicKeys<T> and PublicContract<T> types

* style: 💄 fix ESLint errors
2020-02-18 20:52:03 +01:00
Brandon Kobel
7763a6055a
Handling a 404 when the space's telemetry collector runs (#55921)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-18 11:47:01 -08:00
Spencer
7cf33c14dd
[@kbn/optimizer] rewrite url(ui/*) in legacy scss files (#57869)
* [@kbn/optimizer] rewrite url(ui/*) in legacy scss files

* update kbn/pm dist
2020-02-18 12:43:55 -07:00
Kerry Gallagher
0a6c748cc8
[Logs / Metrics] New Platform migration (full cutover) (#54583)
* Fully migrates metrics and logs to the NP

Co-authored-by: Jason Rhodes <jason.matthew.rhodes@gmail.com>
Co-authored-by: John Schulz <github.com@jfsiii.org>
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
2020-02-18 19:22:27 +00:00
Jonathan Buttner
4f27e1927a
[Endpoint] EDVT-72 EDVT-25 Initial Resolver Backend Refactored (#57593)
* Stubbed route, static tree
Changing commit author to me

* Starting the queries

* Built out children api

* using agent id instead of labels and implementing the get node route

* Adding pagination, need to write tests

* Removing track_total_hits because it defaults to 10k

* Allowing null for origin information

* Building out tests

* Adding more response tests

* Adding test for children route

* Forgot to save

* Reverting first commit and keeping my changes to resolver route

* Working search handler tests

* Adding api test

* Trying to figure out the query issue

* Working api tests

* A little refactoring of common types

* Fixing tests

* Some clean up and fixing bad merge

* Working api

* Changing phse0 names

* Refactoring duplicate code in route

* Adding test for count query and fixing api test

* Renaming phase 1 to elastic endpoint

* Removing test files without tests

* Restructuring things

* Building events for process handler

* Working unit tests

* Working integration tests

* Pagination test is failing

* More refactoring

* Add alternative fields to support other datasources

* Working refactored routes

* Strip out 'synthetic id' stuff

* allow ppid to be undefined

* Some clean up and fixing typescript lint errors

* Removing changes to alerts

* Remove the additional query with the _id cursor

* Use Buffer.from instead of new Buffer

* Fixing import

* Fix decoding

* Fix Promise return type

* Fixing linter used before assigned problem

* Removing unused import

* gzipping the test file

* Addressing feedback, more clean next cursor

* Fixing cast for search_after

* Fixing test failure and adding comments

* Fixing timestamp string type failure

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Andrew Stucki <andrew.stucki@gmail.com>
2020-02-18 14:22:14 -05:00
Yuliia Naumenko
1b15872ab8
Guide for creating alert / action types in the UI (#55963)
* Guide for creating alert type UI

* Type fixed

* Extended documentation for alert type and expression components usage

* fixed merge issues

* Added info for embedding create alert flyout

* Added alert type registration details

* Fixed table definition

* Fixed the rest of the tables styles

* Added builtin action types description

* Added example for action type

* Extended action create description

* Fixed some parts

* Fixed review comments

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Fixed review comments

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2020-02-18 11:12:07 -08:00
Xavier Mouligneau
fbf75e3391
[SIEM] fix circular dependency (#57729)
* fix Timeline url dependency

* fix circular dependency

* rename ColumnHeader to ColumnHeaderOptions
2020-02-18 13:45:20 -05:00
Vadim Dalecky
3f4e16c08f
Isomorphic kibana_context (#57552)
* refactor: 💡 make kibana_context receive deps through args

* feat: 🎸 make kibana_context available on server and browser

* refactor: 💡 improve browser plugin setup method

* feat: 🎸 improve kibna_context missing getSavedObject error msg

* docs: ✏️ fix JSDOc typo

* style: 💄 remove unused import

* style: 💄 remove unused function
2020-02-18 19:41:05 +01:00
Spencer
05730f9145
[ts/projects] support disabling typecheck (#57882) 2020-02-18 11:30:47 -07:00
Lukas Olson
f2478100ab
Revert switching abort controller libraries (#57216)
* Revert switching abort controller libraries

* Revert package.json in lib

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-18 11:19:07 -07:00
MadameSheema
bca0d1c2be
refactors 'toggle-column' tests (#57845) 2020-02-18 19:03:01 +01:00
Spencer
a838e6392a
[@kbn/optimizer] prevent error when all bundles are cached (#57871) 2020-02-18 10:57:15 -07:00
Yuliia Naumenko
c07ff7174e
Alerting plugin migrate to Kibana platform (#57635)
* Moved alerting plugin to new platform

* Fixed type checks

* Fixed failing tests

* Fixed functional tests

* Fixed plugin context initialization

* small typo

* Fixed type checks

* Fixed create alert schema

* Moved alerting files to Kibana platform folder

* Fixed duration validation

* Fixed find page size

* Fixed type check

* Fixed due to comments

* Fixed merge issues

* Added missing

* Fixed alerting functional tests

* Fixed tests

* Fixed update schema validation

* Added throttle update

* Fixed failing tests

* test

* fixed setup alerting dependencies for siem and monitoring plugins

* Fixed siem setup dependancies
2020-02-18 09:05:56 -08:00
nnamdifrankie
b5090fae3b
[Endpoint] EMT-128: add os variant and agent name (#57618)
[Endpoint] EMT-128: add os variant and agent name
2020-02-18 11:59:24 -05:00
Frank Hassanabad
7c6e6bf08a
[SIEM][Detection Engine] Removes internal tags when copying signals from rules
## Summary

Removes internal tags when copying tags from rules to the signals

Before where you can see internal tags going in:
<img width="1565" alt="Screen Shot 2020-02-14 at 5 17 36 PM" src="https://user-images.githubusercontent.com/1151048/74578011-6d1f4d00-4f4f-11ea-9057-e89896944af8.png">

After where you can see internal tags not being pushed in:
<img width="1555" alt="Screen Shot 2020-02-14 at 5 22 52 PM" src="https://user-images.githubusercontent.com/1151048/74578023-81fbe080-4f4f-11ea-8f37-86f7e5fe29f5.png">

Notice that these two internal tags should no longer be there:
```
__internal_immutable:false
__internal_rule_id:3b1bcf8a-7826-43b8-833b-6485aa700c41
```

### Checklist

Delete any items that are not applicable to this PR.

~~- [ ] 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)~~

~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~

- [x] [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

~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

~~- [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)~~

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~

### 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-02-18 09:45:18 -07:00
Kaarina Tungseth
6fe508448b
[DOCS] Fixed typo in dashboard import API (#57862) 2020-02-18 10:31:51 -06:00
Melissa Alvarez
6685bd000c
[ML] New Platform server shim: update job validation routes (#57644)
* wip: convert jobValidation routes to NP

* fix typo in np migration docs

* replace legacy es plugin with callAsInternalUser from context

* add schema info for job validation routes

* update types and schema for job + cardinality validation

* update bucketSpanEstimator test

* update job validation schema
2020-02-18 11:25:33 -05:00
Nathan Reese
c5ab9828b4
[Maps] only request field in docvalue_fields when the field supports doc values (#57372)
* [Maps] only request field in docvalue_fields when the field supports doc values

* do not include scripted fields in sourceOnlyFields

* review feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-18 09:24:41 -07:00
Shahzad
326a162b42
[Uptime] Fix/filter group autocomplete (#57686)
* added autocomplete

* snaps

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-18 16:54:29 +01:00
Walter Rafelsberger
60f7081e08
[ML] Transform: Fix transform wizard query autocomplete. (#57833)
Fixes a regression introduced by #56358. We're reusing the KqlFilterBar from the ML plugin in the transform plugin and missed updating the dependency management. Note this PR is only about fixing that regression. Future work on NP migration should take care of cleaning up the dependency management in the transforms plugin in general.
2020-02-18 16:03:31 +01:00
Daniil Suleiman
c06649917e
Get features inside the rendering phase (#57829) 2020-02-18 17:49:16 +03:00
Pierre Gayvallet
055c61110f
migrate savedObjects routes to core (#56734)
* migrate `get` route

* migrate `create` route

* migrate `delete` route

* migrate `find` route

* migrate `update` route

* migrate `bulk_get` route

* migrate `bulk_create` route

* remove route-related mixin tests

* migrate `bulk_update` route

* fix expectTypeRequired assertion

* migrate `log_legacy_imports` route

* migrate `export` route

* fix karma tests

* array is better than object in some situations.

* remove prototype pollution tests

* adapt ftr assertions

* adapt ftr assertions

* adapt yet more ftr assertions

* migrate `import` route

* fix test tests

* fix getSortedObjectsForExport usages

* fix snapshots

* fix so ui exports usages due to merge

* create router with prefix

* creates `savedObjects` namespace config in addition to `migrations`

* migrate `resolve_import_errors` route

* remove old types file

* fix FTR assertion

* remove types parameter from copy_to_space

* move route tests to integration_tests

* use byteSize instead of number

* fix unit tests

* add has_reference query parameter

Co-authored-by: Mikhail Shustov <restrry@gmail.com>
2020-02-18 15:40:21 +01:00
MadameSheema
c8f9fca8da
'search or filter' test refactor (#57826) 2020-02-18 15:37:21 +01:00
Vadim Dalecky
6aec465208
Expression forks (#57491)
* feat: 🎸 add .fork() methods to ExpressionsService

* feat: 🎸 expose .fork() method in plugin contract
2020-02-18 14:56:20 +01:00
patrykkopycinski
ad5daba2ea
[SIEM] Replace AutoSizer with use-resize-observer (#56588) 2020-02-18 14:53:31 +01:00
Matthias Wilhelm
23306d8097
[Discover] Migrate context AppState / GlobalState to use new app state helpers (#57078)
* Remove globalState, migrate to the new helpers

* Remove appState, migrate to the new helpers

* Add tests
2020-02-18 14:24:22 +01:00
Anton Dosov
8bc3fa4042
Bugfix: Navigation from unsaved dashboard to recently used fails (#57795)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-18 13:45:25 +01:00
Maryia Lapata
5b7734cd4d
Apply sub url tracking utils to visualize and discover (#57307)
* Apply sub url tracking utils to visualize and discover

* Update query karma mock

* Remove unnecessary chrome legacy calls

* Fix typo

* Add setActiveUrl

* Add unit test for setActiveUrl

* Refactoring

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-18 12:54:30 +03:00
MadameSheema
66e685b4a8
refactors 'flyout-button' tests (#57572)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-18 10:03:43 +01:00
Victor Martinez
446fda62f2
[jenkins] Notify GH Checks for the apm-ui e2e pipeline (#52900) 2020-02-18 08:25:14 +00:00
James Gowdy
3c51fb0314
[ML] File data viz fix index pattern warning after index change (#57807) 2020-02-18 07:16:40 +00:00
James Gowdy
c31c7ee4c7
[ML] Adding get buckets endpoint wrapper (#57752)
* [ML] Adding results buckets endpoint wrapper

* removing unnecessary spread operator

* correcting timstamp format in api doc

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-17 15:06:42 +00:00
Vadim Dalecky
d21d33d0b6
fix: 🐛 don't cast to any (#57799)
EUI 19.0 was merged into Kibana which supports React elements as context
menu items, so we don't need to cast to any here anymore.
2020-02-17 15:25:17 +01:00
Vadim Dalecky
85d737c401
ExecutionContract (#57559)
* feat: 🎸 add ExecutionContract class

* test: 💍 add Execution and Executor tests

* feat: 🎸 add .execute() method to ExpressionsService

* refactor: 💡 replace ExpressionDataHandler by ExecutionContract

* fix: 🐛 fix TypeScript typecheck errors

* docs: ✏️ add JSDocs to ExecutionContract

* refactor: 💡 make .ast and .expresions both optional

* test: 💍 fix test

* test: 💍 fix a test

* test: 💍 fix interpreter functional tests
2020-02-17 15:02:21 +01:00
Vadim Dalecky
ca5e25c139
Local actions (#57451)
* feat: 🎸 create UiActionsService

* feat: 🎸 add UiActionsServvice.fork() method

* feat: 🎸 instantiate UiActionsService in plugin

* feat: 🎸 add UiActionsService.registerTrigger(), remove old

* feat: 🎸 move attach/detachAction() methods to UiActionsService

* refactor: 💡 move remaining actions API to UiActionsService

* chore: 🤖 clean up /trigger folder

* test: 💍 move registry tests into UiActiosnService tests

* fix: 🐛 fix TypeScript typecheck errors

* test: 💍 add .fork() trigger tests

* feat: 🎸 remove actionIds from ui_actions Trigger interface

* fix: 🐛 remove usage of actionIds

* fix: 🐛 attach hello world action to trigger in plugin lifecycle

* feat: 🎸 fork also trigger to action attachments

* fix: 🐛 clear mapping registry in .clear(), improve type
2020-02-17 14:59:47 +01:00
Joe Reuter
9388ff7b43
Fix auto refresh in visualizations and lens (#57667) 2020-02-17 13:52:53 +01:00
Cauê Marcondes
f49581ce34
[APM] Divide "Actions menu" into sections to improve readability (#56623)
* transaction actions menu

* transaction actions menu

* fixing pr comments

* fixing pr comments

* fixing pr comments

* fixing pr comments

* fixing unit test

* fixing unit test

* using moment to calculate the timestamp

* renaming labels

* Changing section subtitle

* fixing unit tests

* replacing div for react fragment

* refactoring

* removing marginbottom property

* div is needed to remove the margin from the correct element
2020-02-17 12:05:46 +00:00
Alejandro Fernández Haro
5c7af8656f
[Telemetry] Fix bug introduced in #55859 (#57441)
* [Telemetry] Refactor to TS Monitoring telemetry_collection files

* [Telemetry] Fetch side documents generated by monitoring to build up the Kibana plugins stats

* Update x-pack/legacy/plugins/monitoring/server/telemetry_collection/get_beats_stats.ts

Co-Authored-By: Ahmad Bamieh <ahmadbamieh@gmail.com>

* Fix import in test file

* Move mocha tests to Jest + TS

* Fix extended telemetry in functional tests

* Fix types

* [Telemetry] Fix bug in usage_collector wrong function override

* Revert integration tests (change not needed)

Co-authored-by: Ahmad Bamieh <ahmadbamieh@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-17 11:21:01 +00:00
Walter Rafelsberger
54f5cc1ce3
[ML] Anomaly Detection: Fixes hiding date picker for settings pages. (#57544)
- Fixes hiding the global date picker on anomaly detection settings pages.
- Consolidates various timefilter usages for enabling/disabling the date picker into a useTimefilter() hook.
2020-02-17 11:53:42 +01:00
James Gowdy
545240065a
[ML] Categorization examples privilege check (#57375)
* [ML] Categorization examples privilege check

* adding privileges check to endpoint

* fixing typo

* moving privilege check to router

* removing unused variable

* rebasing master

* removing comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-17 10:47:50 +00:00
Jean-Louis Leysens
3d7bae4ed2
Move Ace XJSON lexer-rules, worker and utils to es_ui_shared (#57563)
* Move mode and lexer rules to shared space

* Update searchprofiler mode rules

* Moved x-json worker out of searchprofiler and into es_ui_shared (for use in Watcher)
Renamed ace/mode -> ace/modes

* Moved collapse and expand literal string functions to es_ui_shared

* Fix some imports
Enable Watcher editor to parse XJson using XJsonMode

* Fix imports

Import JSON highlight rules in XJSONHighlight rules

* Move console_lang, fix Jest tests

Exporting console_lang through the es_ui_shared/public barrel caused the XJsonMode to imported to a index_management too and any other plugin that may
import something from that directory. console_lang was moved to it's own top level directory es_ui_shared/console_lang.

We also included a mock for tests using XJsonMode to import from console_lang.

* Fixed OSS Jest tests

Console Jest tests were still failing because they did not mock out the raw-loader imported worker file

* Expand triple quotes in editor

Upon entering the advanced watcher creation view, the JSON should be scanned for triple quote expansion

* Bring all editors themes in line

Editors had github theme, which diverged from the textmate theme used in Console and SearchProfiler

* Added XJSON mode to simulate alternative input editor

Slight refactor to the logic for using XJSON mode. Created an adhoc hook for wrapping the
logic of useState and moved lanugage util imports there too to reduce the number of imports
in both the watcher form and simulate tabs in advanced creation.

* Moved x-json worker to x-pack

x-json worker is currently only used inside of x-pack. Also testing
for if this will fix the CI/prod build

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-17 11:06:20 +01:00
Jean-Louis Leysens
26fdc4a6b3
[Upgrade Assistant] Fix filter deprecations search filter (#57541)
* Made eui search field not a controlled component
Added validateRegExpString util

* Update error message display. Use EuiCallOut and i18n to replicate other search filter behaviour, e.g. index management.

* Remove unused variable

* Update Jest snapshot

* Updated layout for callout

The previous callout layout looked off-center next to the controls in the table.

* Update copy and remove intl

Update "Filter Invalid:" to sentence case
Remove inject intl wrapper from CheckupControls component
Remove unnecessary grow={true}

* Updated Jest component snapshot

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-17 11:03:57 +01:00
Dima Arnautov
84be262075
[ML] New Platform server shim: update indices routes (#57685)
* [ML] NP indices routes

* [ML] fix error function

* [ML] fix createAndOpenUrl function
2020-02-17 10:59:07 +01:00
patrykkopycinski
f4d29abf1c
Bump redux dependencies (#53348) 2020-02-17 09:58:54 +01:00
Sébastien Loix
8e17fdabd4
[Index management] Client-side NP ready (#57295) 2020-02-17 14:22:07 +05:30
Patrick Mueller
5d3797ee0b
change id of x-pack event_log plugin to eventLog (#57612)
change id of x-pack event_log plugin to eventLog
2020-02-16 20:10:35 -05:00