Commit graph

32529 commits

Author SHA1 Message Date
Kaarina Tungseth aa560353f8
[DOCS] Adds dashboard controls options (#64079) 2020-04-22 08:38:53 -05:00
Kerry Gallagher 9a47926b90
[Logs / Metrics UI] Switch to scopedHistory and enhance useLinkProps hook (#61667) 2020-04-22 14:25:39 +01:00
Thomas Neirynck 939bf2a6ec
[Maps] Convert AbstractSource and AbstractLayer to TS (#63533) 2020-04-22 09:19:18 -04:00
Tiago Costa 5e2dbdaa69
refact(NA): remove set loop from upgrade assistant usage collector (#63977)
* refact(NA): use default telemetry obj in the set loop

* chore(NA): fix typecheck

* fix(NA): test run with lodash has

* chore(NA): fix older lodash has

* chore(NA): remove lodash has usage
2020-04-22 14:11:17 +01:00
Sandra Gonzales db642f0b96
[EPM] handle unremovable packages (#64096)
* remove endpoint handles unremovable packages

* adjust UI to disallow removing of unremovable packages
2020-04-22 09:08:50 -04:00
Joe Reuter ed3c94bc76
fix leftover timelion paths (#64041) 2020-04-22 15:07:12 +02:00
Chris Roberson 989245793e
[Monitoring] Fix monitoring 7.7 deprecations (#63738)
* Fix monitoring 7.7 deprecations

* Switch order

* Add comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-22 09:06:40 -04:00
MadameSheema e17755ecef
[SIEM] Adds 'Create new case' Cypress test (#63971)
* adds timeline data

* adds 'cases' spec

* adds test

* implements test

* refactor

* prepares test to be executed with the new platform

* finishes refactor

* fixes typo

* renames case interface
2020-04-22 15:04:00 +02:00
Anton Dosov 2f75810f16
fix dashboard memory leak (#64154) 2020-04-22 14:29:48 +02:00
Vadim Dalecky c6125fc795
Filter action icons (#64073)
* feat: 🎸 add filter icons to filter actions

* test: 💍 add unit test for icon type for createFilterAction()

* test: 💍 fix TypeScript error
2020-04-22 14:06:02 +02:00
Maja Grubic ffc8741da2
[Dashboard] Deangularize navbar, attempt nr. 2 (#61611)
* Attempt at deangularization, nr.2

* Remove padding in fullscreen

* Fixing failing functional test

* Fixing remaining functional test

* Fixing typescript errors

* Fixing filter bar not being visible in fullscreen

* Fixing filter bar not being visible in fullscreen

* Rebasing against master

* Fixing a small leftover

* Fix order of functions

* Fixing linting error

* Changing noPadding to a custom class

* Use filterManagers to handle filters

* Rename class

* Attempt at deangularization, nr.2

* Remove padding in fullscreen

* Fixing failing functional test

* Fixing remaining functional test

* Fixing typescript errors

* Fixing filter bar not being visible in fullscreen

* Fixing filter bar not being visible in fullscreen

* Rebasing against master

* Fixing a small leftover

* Fix order of functions

* Fixing linting error

* [APM] Agent config select box doesn't work on IE (#63236)

* adding value property to select options

* fixing test

* Use globe icon for "ext" span type on service map (#63205)

Both "external" and "ext" can be returned and should have the same icon.

* Move shared vislib components into Charts plugin (#62957)

* Closes #56310

Move shared vislib components into Charts plugin

* Fixed imports in tests

* Changed i18n IDs to match charts namespace

* Renamed ColorSchemaVislibParams to ColorSchemaParams, added enums and got rid of useValidation function

* Renamed ColorSchemaVislibParams to ColorSchemaParams and got rid of useValidation function

* Fixed merge conflict

* Replaced enums with objects again

* Make uptime alert flyout test a little more resilient (#62702)

* [SIEM] [Cases] Unit tests for case UI components (#63005)

* Endpoint: Remove unused `lib` module (#63248)

* [Lens] Fix error in query from generated suggestion (#63018)

* [Lens] Fix error in query from generated suggestion

* Update from review comments

* Fix test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* Resolver/node svg 2 html (#62958)

* Remove some SVG in Resolver nodes and replace with HTML

* [Reporting] convert all server unit tests to TypeScript (#62873)

* [Reporting] convert all server unit tests to TypeScript

* fix ts

* revert unrelated change

* [SIEM] Link ML Rule card CTA to license_management (#63210)

* Link ML Rule card CTA to license_management

Taking the user directly to the license management page within kibana
(where they could immediately start a trial subscription) is much more
actionable than taking them to the subscriptions marketing page.

* Revert translation key change

Neither of these is totally accurate, and there've already been
translations written for the old one.

* Correctly type ILM's optional dependencies as optional (#63255)

And guard against their absence.

* [Telemetry] use prod keys (#63263)

* update chromedriver dependency to 81.0.0 (#63266)

* task/mac-eventing-form (#62999)

adds mac events form for endpoint policy details
Co-authored-by: oatkiller <robert.austin@elastic.co>

* bc6 rule import april 9 (#63152)

* bc6 rule import april 9

Increased the lookback of the ML rules

* re-import

with LF chars

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* Added UI for pre-configured connectors. (#63074)

* Added UI for pre-configured connectors.

* fixed due to comments

* Fixed jest tests

* Fixed due to comments and added some functional tests

* test fix

* Fixed failed checks

* Fixed functional tests failing

* TaskManager tasks scheduled without attempting to run (#62078)

* TaskManager tasks scheduled without attempting to run

* Removing unused import

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* Changed alerting wrong param name for help xpack.encrypted_saved_objects.encryptionKey to xpack.encryptedSavedObjects.encryptionKey (#63307)

* fix ScopedHistory.createHref to prepend location with scoped history basePath (#62407)

* fix createHref to prepend with scoped history basePath + add option to exclude it.

* fix prependBasePath behavior

* fix test plugins urls

* add pathname to endpoint url builder methods

* Revert "add pathname to endpoint url builder methods"

This reverts commit 7604932b

* adapt createHref instead of prependBasePath

* use object options for createHref

* update generated doc

* fixing custom link popover size and hiding scroll (#63240)

* Changing noPadding to a custom class

* Use filterManagers to handle filters

* Rename class

* Applying some changes

* Reverting search_bar code changes

* Removing some stuff that was causing functional tests to fail

* Removing refresh dashboard container which was causing errors during navigation

* Do not destroy dashboardContainer

* Adding updateSavedQueryId method

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
Co-authored-by: DianaDerevyankina <54894989+DianaDerevyankina@users.noreply.github.com>
Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
Co-authored-by: Robert Austin <robert.austin@elastic.co>
Co-authored-by: Wylie Conlon <william.conlon@elastic.co>
Co-authored-by: Brent Kimmel <bkimmel@users.noreply.github.com>
Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Ahmad Bamieh <ahmadbamieh@gmail.com>
Co-authored-by: Dmitry Lemeshko <dzmitry.lemechko@elastic.co>
Co-authored-by: Candace Park <56409205+parkiino@users.noreply.github.com>
Co-authored-by: The SpaceCake Project <randomuserid@users.noreply.github.com>
Co-authored-by: Yuliia Naumenko <jo.naumenko@gmail.com>
Co-authored-by: Brandon Kobel <brandon.kobel@elastic.co>
Co-authored-by: Pierre Gayvallet <pierre.gayvallet@elastic.co>
2020-04-22 09:59:43 +01:00
Peter Pisljar 222fdc5029
refactor action filter creation utils (#62969) 2020-04-22 10:41:58 +02:00
Joe Reuter 2f794e6c42
Refresh index pattern list before redirecting (#63329) 2020-04-22 09:29:51 +02:00
Cauê Marcondes aecd00f3d8
[APM]fixing custom link unit tests (#64045) 2020-04-22 07:34:40 +02:00
John Schulz edac6669f7
[Ingest] EPM & Fleet are enabled when Ingest is enabled (#64103) 2020-04-21 20:41:13 -04:00
Yuliia Naumenko 28313c4890
[Alerting] Fixed bug with no possibility to edit the index name after adding (#64033)
* Fixed bug with no possibility to edit the index name after adding

* fixed test

* fixed test

* fixed selector

* Move the testing to unit tests
2020-04-21 17:00:55 -07:00
Nathan Reese ea4eb3385b
[Maps] Map settings: min and max zoom (#63714)
* [Maps] Map settings: min and max zoom

* eslint

* header and footer

* zoom range UI

* save session state in mapStateJSON

* disable button when flyout is open

* tslint

* update layer_control jest test

* tslint

* move settings button to top map chrome

* move map_settings_panel to NP

* remove merge conflict artifact

* fix import for NP migration

* remove unused CSS class

* fix path from NP move

* review feedback

* load map settings in embeddable
2020-04-21 16:27:00 -06:00
Nathan L Smith f254ee682c
[kbn-storybook] Use raw loader for text files (#64108)
Starting Storybook (with `yarn storybook apm`) was failing to start because it was having trouble loading Angular .html templates.

Use the raw loader in the webpack config for storybook, same as the Webpack config in kbn-optimizer.
2020-04-21 17:12:36 -05:00
Sandra Gonzales adc9b0d757
[EPM] /packages/{package} endpoint to support upgrades (#63629)
* install template after pipeline creation

* return installed pkg if this pkg version is already installed

* remove pipelines after templates are updated

* remove kibana saved objects assets before installing

* update current write indices

* add back removal of merging previous references lost in rebase

* improve some typing names, consolidate, fix bad merges

* update query to use aggregate on _index

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-21 16:39:32 -04:00
Ryland Herrick 592a0ff224
[SIEM] New Platform Saved Objects Registration (#64029)
* WIP: Register saved objects types in NP

This works, but responsibilities are spread around. Refactor incoming.

* Moves new SO definitions into corresponding folders

This way our top-level file still acts as the index, but these are
more/less unconnected if/when we split these out into separate
applications.

* Replace raw SO updates with our ruleStatusSavedObjectsClient

This mainly consolidates the SO type name and the attributes type to a single
file so that we don't have to import both any time we want to work with
RuleStatus SavedObjects.
2020-04-21 15:33:27 -05:00
Paul Tavares ed912751c1
[Endpoint] Hook to handle events needing navigation via Router (#63863)
* new hook providing generic event handler for use with react router
* Refactor of Header Naviagtion to use useNavigateByRouterEventHandler
* Policy list refactor to use useNavigateByRouterEventHandler hook
* Policy list Policy name link to use useNavigateByRouterEventHandler hook
* Host list use of useNavigateByRouteEventHandler
2020-04-21 16:30:09 -04:00
Devon Thomson 5501fb4e5d
Fixed small issue in clone functionality (#64085) 2020-04-21 15:57:50 -04:00
nnamdifrankie 4ca86103b3
[Endpoint]EMT-146: use ingest agent for status info (#63921)
[Endpoint]EMT-146: use ingest agent for status info
2020-04-21 15:51:51 -04:00
Ryland Herrick ff5971ac17
[SIEM] Server NP Followup (#64010)
* Remove unused file

This was moved to a constant in common/constants.

* Remove unused types

Omit is now part of Typescript, and Pick3 is unused.

* Define and export SIEM's plugin contracts

They're empty for now.

* Import config type from config file

Instead of our plugin index, which could only cause circular
dependencies.

* SiemClient API uses getter function instead of direct property access

* Add public mock for SiemClient

* Fix typo in extract-mitre-attacks script

We were backgrounding the process (&) instead of ANDing it with the
linting. Whoops!

* Remove missed instance of old siemClient API

I missed this one when grepping, but typescript and CI saved me.

* Use our client mock in our test suite

This was causing some test failures as I forgot to update the client mock

* Update script following updates to the output's usage

This was changed in https://github.com/elastic/kibana/pull/55883 but the
script was not updated accordingly.
2020-04-21 14:27:10 -05:00
Ryland Herrick 5a55c9a8f6
Register uiSettings on New Platform (#64015)
This now requires us to define a schema for each setting, which is a
little redundant given that we also have to type the useUiSetting calls;
this might be an issue between kibana-react and new UiSettings changes.
2020-04-21 12:47:25 -05:00
Tim Sullivan 0266a5c447
[Reporting] Integration polling config with client code (#63754)
* source new platform for reporting ui config

* fix test types

* fix type check

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-21 10:46:08 -07:00
Ben Skelker b7aab690f4
[Docs]7.7 SIEM doc updates (#63951)
* SIEM section doc updates

* corrections

* more corrections
2020-04-21 20:14:25 +03:00
Steph Milovic 0c14424321
[SIEM] [Cases] Tags suggestions (#63878) 2020-04-21 10:55:42 -06:00
Jen Huang 840808c942
Include datasource UUID in agent config yaml, adjust overflow height of yaml view (#64027) 2020-04-21 09:43:17 -07:00
Lisa Cawley 1a6338a314
[DOCS] Add file size setting for Data Visualizer (#64006) 2020-04-21 09:35:19 -07:00
Devon Thomson b7f2a010c8
[DOCS] Add documentation for clone feature (#64019)
* Added documentation for the clone feature
Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
2020-04-21 11:26:53 -04:00
Yara Tercero dbb7923e9b
[SIEM][Detections Engine] - minor updates to monitoring table with unit tests (#64020)
### Summary

Minor updates to the All Rules monitoring table. Includes front end and backend changes:

- Displays dashes in the monitoring table when no values are present
- Displays `lastLookBackDate` only if the rule indexes events into the signals index, otherwise `lastLookBackDate` is set to null
2020-04-21 10:42:43 -04:00
Josh Dover f43d555f14
Migrate logstash frontend to KP (#63417) 2020-04-21 07:39:59 -06:00
Alexey Antonov 2b9c99bd01
Index pattern management - field list - localization functions returning empty strings (#64055)
Closes: #63649
2020-04-21 15:50:38 +03:00
Mikhail Shustov 6ecba2c732
Run local prettier script (#63959)
* convert eslint scripts into TS

* update settings for BWC

* add script updating styles to pretter v2

* use default prettier config

* run npx once, point to the correct head branch, do not add to git

* throw if run script not on a clear branch

* run in a batch, add logging
2020-04-21 14:22:58 +02:00
Christos Nasikas 698717173d
[SIEM][CASE] Server common constants (#63952) 2020-04-21 15:09:42 +03:00
Anton Dosov 3b1d0e0c6b
[State Management] ScopedHistory support for state syncing utils (#62761)
The needed change is to rely on history as source of truth for location instead of window.location.

btw, This makes possible to test state syncing utils integration using createMemoryHistory()

One issue was discovered after this change:
When switching from context to discover url was incorrect. history.location inside state syncing utils didn't get the last update. This happened, because history instance created in discover wasn't used in context app and when all listeners unsubscribed from it - it stopped receiving location updates. To fix this I just reused one history instance in discover, context and their kbnUrlTracker
2020-04-21 13:53:17 +02:00
Gidi Meir Morris 02d55db6cd
[Alerting] Improve validation and errors handling in PagerDuty action (#63954)
Improves the messaging when the Pager Duty action has trouble parsing the timestamp field and adds trimming on the timestamp's field to make us more flexible in handling the parsing and hence more likely to be forgiving of the input by the user.

As the timestamp relies on context variables provided via mustcahe templates, we can't reliably validate this field at alert creation time.
We address by:
1. Trimming the edges, which is required when parsing a date, should help prevent accidental spaces from breaking the parsing.
2. Checking for a mustache template on the client side and if there are none - we validate for a valid timestamp when the action is created.
2020-04-21 12:32:14 +01:00
Jean-Louis Leysens 1deb5d63eb
Move authz lib out of snapshot restore (#63947)
Created the first entry for the new __packages_do_no_import__
folder that will house ESUIs private packages.
2020-04-21 12:31:05 +02:00
Matthias Wilhelm 2f363ba144
Migrate vis_type_table to kibana/new platform (#63105)
* Move vis_type_table to Kibana Platform

* Adapt mocha tests
* Adapt CODEOWNERS

* Adapt SCSS
2020-04-21 09:49:48 +02:00
Diana Derevyankina 46f6f8779e
Enable include/exclude in Terms agg for numeric fields (#59425)
* Enable include/exclude in Terms agg for numeric fields

Closes #4576

* Added a new component that allows adding multiple values

* Added some validation to include/exclude fields

* Removed unnecessary comments and accepted API changes

* Fixed i18n ID issue

* Refactored some code and fixed discard button issue

* Added SimpleNumberList component and value parsing in include_exclude.tsx

* Fixed merge conflict

* Fixed merge conflict

* Refactored some code

* Got rid of lodash isArray, added Number.isFinite where needed and changed symbol of string join and array split

* Added some more test cases to cover migrate_include_exclude_format write method

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-21 09:55:06 +03:00
Joe Reuter 5adccd005b
follow conventions for saved object definitions (#63571) 2020-04-21 08:37:02 +02:00
Ben Skelker d6fdb689e8
[Docs]Adds saved object key setting to load balancing kib instances (#63935)
* adds saved object key setting to load balancing kib instances

* SIEM section doc updates

* Revert "SIEM section doc updates" - wrong PR

This reverts commit fc55d90a6d.

* corrections
2020-04-21 09:26:06 +03:00
Pierre Gayvallet f6f610db47
kbn/config-schema: Consider maybe properties as optional keys in ObjectType (#63838)
* consider optional properties as optional keys in ObjectType

* fix type on security config

* fix ObjectTypeOptions
2020-04-21 07:43:35 +02:00
Jen Huang f76669b17a
Fix page layouts, clean up unused code (#63992) 2020-04-20 16:52:02 -07:00
Frank Hassanabad 2caed9b7be
[SIEM] Adds recursive exact key checks for validation and formatter
## Summary

* Adds exact check to cause failures whenever a schema is using t.exact({}) and that schema has extra keys at any level of the schema hierarchy.
* Fixes the exact check to work with unknown in a safe way and only do recursive checks for keys only when the unknown is an Object.
* Changes the output to use a format error mechanism which pushes all the errors onto one line to be consistent with the response errors. We can change this as a team to whatever we want I just put it to a comma separator as that is what the responses type checks were using downstream.
* Moves the downstream code up higher to be used within SIEM for timeline and detection engine.
* Adds tests in TDD/red light/green light fashion where I fail the extra key checks first and then pass them second.  

### Checklist

Delete any items that are not applicable to this PR.

- [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
2020-04-20 17:43:48 -06:00
Aaron Caldwell 2af0c6d47e
[Maps] Migrate remaining maps client files to NP (except routi… (#63859)
* Move actions over

* Move connected components over

* Move components over

* Move selectors over

* Move embeddables over. Set up legacy presence to keep legacy maps embeddables working

* Move angular and services over. Some additional top-level files

* Some file moves. Move styles over to NP

* Handle feature catalogue entry in NP. Add plugin deps to kibana.json

* Move vis registration to NP

* Clean up linting comments. Add linting comments to route controller. Move common to NP

* Add back in i18n context for embeddable

* Fix jest test paths. Fix TS lint errors

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-20 16:58:33 -06:00
Nathan Reese 35dab183ab
[Maps] Do not fetch geo_shape from docvalues (#63997) 2020-04-20 15:38:10 -06:00
Kaarina Tungseth e302fd8486
Vega doc changes (#63889)
* Vega doc changes

* Final changes

* Review comments
2020-04-20 15:56:41 -05:00
Chris Cowan e32fd2617a
[Metrics UI] Reorganize file layout for Metrics UI (#60049)
* [Metrics UI] Reorganize pages specific files under pages

- Restructuring pages folder
- Renaming metrics_ui to metrics
- Fixing paths in jest mocks
- Fixing AlertsFlyout path
- Fixing bad file paths from the merge

* Fixing typo compontents to components

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-20 13:44:19 -07:00