Commit graph

7381 commits

Author SHA1 Message Date
MadameSheema 8220999c12
completes navigation test (#59141)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-06 08:42:18 +01:00
Andrew Goldstein 4db7f49608
[SIEM] Fixes dragging entries to the Timeline while data is loading may trigger a partial page reload (#59476)
## [SIEM] Fixes dragging entries to the Timeline while data is loading may trigger a partial page reload

The `react-beautiful-dnd` library, upgraded during the `7.6` stack release from
`10.0.1` to `12.2.0`, includes a breaking change to the way [errors are handled](https://github.com/atlassian/react-beautiful-dnd/blob/v12.0.0/docs/guides/setup-problem-detection-and-error-recovery.md)
and recovered. As a result of this change, an uncaught error may trigger a
an effect that feels (from the perspective of a user) like a partial page
reload.

The most common condition where this can occur is when dragging entries to the
Timeline while data is loading, per the animated gif below:

![refresh-error](https://user-images.githubusercontent.com/4459398/76016029-59755f80-5ed9-11ea-858d-cb1189d22ea9.gif)

## Reproduction steps

1. Navigate to the Hosts page
2. Open the Timeline
3. Drag a host to the Timeline
4. While data is still loading, drag a different host to the Timeline to create an `or` query

**Expected Results**
* The page does not appear to reload
* In development mode, a single error is logged to the JS console

**Actual Results**
* The page appears to reload
* In development mode, two errors are logged to the JS console

**Error 1**
```
react-beautiful-dnd
Invariant failed: Cannot find droppable entry with id [droppableId.content.event-details-value-default-draggable-plain-column-renderer-formatted-field-value-timeline-1-kLGooXABOOUskGlPiQw5-@timestamp-1583260131000]👷<200d> This is a development only message. It will be removed in production builds.
    in Draggable (created by ConnectFunction)
    in ConnectFunction (created by PrivateDraggable)
    in PrivateDraggable (created by PublicDraggable)
    in PublicDraggable (created by Droppable)
    in Droppable (created by ConnectFunction)
    in ConnectFunction
```

**Error 2**
```
react-beautiful-dnd
Invariant failed: Cannot find droppable entry with id [droppableId.content.event-details-value-default-draggable-plain-column-renderer-formatted-field-value-timeline-1-kLGooXABOOUskGlPiQw5-@timestamp-1583260131000]👷<200d> This is a development only message. It will be removed in production builds.
    in ErrorBoundary (created by DragDropContext)
    in DragDropContext (created by Anonymous)
    in Anonymous
```

### Desk testing

Tested locally in:
* Chrome `80.0.3987.122`
* Firefox `73.0.1`
* Safari `13.0.5`

Fixes https://github.com/elastic/kibana/issues/59466
2020-03-05 23:08:56 -07:00
Tim Sullivan 893d8da1d8
[Reporting/Screenshots] Handle page setup errors and capture the page, don't fail the job (#58683)
* [Reporting] Handle error if intercepted request could not be continued

* [Reporting/Screenshots] Handle page setup errors and capture the page with errors shown

* show warnings in UI

* i18n todos

* Cleanup an old troubleshooting task

* set the default for all new timeout settings to 30 seconds

* fix some tests

* update error strings

* Cleanup 2

* fix tests 2

* polish the job info map status items

* More error message updating

* Log the error that was caught

* Oops fix ts

* add documentation

* fix i18n

* fix mocha test

* use the openUrl timeout as the default for navigation

* fix comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-05 22:26:36 -07:00
Xavier Mouligneau c29ef14656
[SIEM] [CASES] API with io-ts validation (#59265)
* refactor to use io-ts, to be able to have ressource with sub, add total comments via comment_ids, be able to delete multiple cases/comments

* fix test

* adapt UI to refactor of the API

* put it back the way it was

* clean up to get cases

* review I

* review II - bring back url  parameter

* fix merge

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-05 23:29:55 -05:00
Lukas Olson f511afa729
Use camelCase rather than snakeCase for plugin name (#59461) 2020-03-05 20:46:45 -07:00
Nathan Reese 578137fb20
[Maps] top term percentage field property (#59386)
* [Maps] top term percentage property

* populate percentage in feature properties

* TS work

* clean up TS

* fix all type errors

* unit test for esAggFieldsFactory

* clean up

* i18n cleanup

* do not show decimal place for perentage

* fix jest expects

* fix eslint errors

* tslint errors

* handle empty top bucket aggregation

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-05 19:58:22 -07:00
Yuliia Naumenko 5ff13ada6b
Add custom action to registry and show actions list in siem (#58395)
* Add custom action to registry and show actions list in siem

* Exposed action form as reusable component

* Fixed few small bugs

* Fixed red ci

* Fixed type checks

* Fixed failed tests

* Fixed due to comments

* Fixed type check errors

* Fixed plugin check

* Rebalancing CI groups according to #58930

* Fixed merge issues
2020-03-05 17:47:08 -08:00
Lukas Olson c4b385dfd5
[Search service] Add enhanced ES search strategy (#59224)
* Add async search strategy

* Add async search

* Fix async strategy and add tests

* Move types to separate file

* Revert changes to demo search

* Update demo search strategy to use async

* Add async es search strategy

* Return response as rawResponse

* Poll after initial request

* Add cancellation to search strategies

* Add tests

* Simplify async search strategy

* Move loadingCount to search strategy

* Update abort controller library

* Bootstrap

* Abort when the request is aborted

* Add utility and update value suggestions route

* Fix bad merge conflict

* Update tests

* Move to data_enhanced plugin

* Remove bad merge

* Revert switching abort controller libraries

* Revert package.json in lib

* Move to previous abort controller

* Add support for frozen indices

* Fix test to use fake timers to run debounced handlers

* Revert changes to example plugin

* Fix loading bar not going away when cancelling

* Call getSearchStrategy instead of passing  directly

* Add async demo search strategy

* Fix error with setting state

* Update how aborting works

* Fix type checks

* Add test for loading count

* Attempt to fix broken example test

* Revert changes to test

* Fix test

* Update name to camelCase

* Fix failing test

* Don't require data_enhanced in example plugin

* Actually send DELETE request

* Use waitForCompletion parameter

* Use default search params

* Add support for rollups

* Only make changes needed for frozen indices/rollups

* Fix tests/types

* Don't include skipped in loaded/total

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-05 16:47:45 -07:00
Felix Stürmer 1a548a1e42
[Logs UI] Speed up stream rendering using memoization (#59163)
This aims to be a quick performance improvement by memoizing the LogEntryRow component.
2020-03-06 00:19:32 +01:00
Yuliia Naumenko e869695d73
Added possibility to embed connectors create and edit flyouts (#58514)
* Added possibility to embed connectors flyout

* Fixed type checks and removed example from siem start page

* Fixed jest tests

* Fixed failing tests

* fixed type check

* Added config for siem tests

* Fixed failing tests

* Fixed due to comments

* Added missing documentation
2020-03-05 14:57:32 -08:00
marshallmain d5497d99b2
[Endpoint] Fix alert list functional test error (#59357)
* fix the functional test error

* fix linting

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-05 16:35:54 -05:00
Spencer 4bc9e8b4a8
Fix visual baseline job (#59348)
* Establish Percy baselines

* move Jenkinsfile changed back to `.ci` directory

* rename xpack workers

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-05 13:01:42 -07:00
Yuliia Naumenko 26aed8dc30
Extended AlertContextValue with metadata optional property (#59391)
* Extended AlertContextValue with metadata optional property

* Made metadata generic
2020-03-05 11:55:30 -08:00
Chandler Prall 096dda6f34
Upgrade EUI to v20.0.2 (#59199)
* Updated EUI to 20.0.1; updated typescript usage

* snapshots

* Upgrade to eui 20.0.2, fix one more type

* PR feedback

* Update EUI icon usage to the correct types

* Updated with master
2020-03-05 12:27:52 -07:00
Steph Milovic 91a5b17cfd
[SIEM] [Case] All cases page design updates (#59248) 2020-03-05 11:29:44 -07:00
Thomas Neirynck 46738cfa0a
[Maps] Add field and style-meta types (#58766) 2020-03-05 12:26:28 -05:00
Luke Elmers 87a3d02d44
Remove schemas from agg configs (#58462) 2020-03-05 10:18:12 -07:00
Yuliia Naumenko 4883d4bb2a
Fixed ci type check errors for alerting and actions properties for SIEM RouteHandlerContext (#59400)
* Fixed ci type check errors for alerting and actions optional properties on RouteHandlerContext

* Reverted git revert b83f81458c
2020-03-05 07:52:24 -08:00
Melissa Alvarez d55524c338
[ML] NP Server: make security and spaces plugins optional (#59156)
* make security and spaces plugins optional

* update spacesPlugin name. update current user check
2020-03-05 10:06:36 -05:00
James Gowdy 4371b1ca7d
[ML] Fix advanced wizard datafeed form labels (#59413) 2020-03-05 14:59:58 +00:00
Walter Rafelsberger ce9e887644
[ML] Transforms: Fixed custom KibanaContext deprecation. (#59410)
- Deprecates the custom KibanaContext.
- Where applicable dependencies provided via KibanaContext are now passed on via AppDependencies.
- The main feature of KibanaContext was to populate index pattern and saved search information for the transform wizard. This is now provided via the useSearchItems() custom hook.
2020-03-05 14:52:44 +01:00
Shahzad edfbe03ffa
[Uptime] Improve duration chart (#58404)
* use differential colors for duration chart

* remove duration chart gql

* update type

* type fix

* fix tyoe

* update translation

* update test

* update conflicts

* type checking

* update snaps

* PR feedback

* PR feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-05 10:43:55 +01:00
Sébastien Loix a05c3211b9
[Snapshot & Restore] NP migration (#59109) 2020-03-05 15:07:23 +05:30
Pete Harverson b104980b88
[ML] Add support for date_nanos time field in anomaly job wizard (#59017)
* [ML] Add support for date_nanos time field in anomaly job wizard

* [ML] Edits following review

* [ML] Add functional test for creating job off date_nanos data
2020-03-05 09:28:31 +00:00
spalger b83f81458c Revert "Makes alerting and actions optional properties for interface RequestH… (#59264)"
This reverts commit 755439d5e7.
2020-03-04 22:13:11 -07:00
CJ Cenizal bb86bf2ebb
Change remote_clusters ID to remoteClusters (#59246) 2020-03-04 19:53:15 -08:00
Yuliia Naumenko 755439d5e7
Makes alerting and actions optional properties for interface RequestH… (#59264)
* Makes alerting and actions optional properties for interface RequestHandlerContext

* Added an error response result if context for actions and alerting is not registered
2020-03-04 17:30:15 -08:00
Luke Elmers ba5784ac57
Clean up date histogram agg type. (#58805) 2020-03-04 17:03:23 -07:00
Melissa Alvarez 44921e6110
[ML] Management: fix license unsubscribe (#59365)
* check for undefined before unsubscribe.remove skip from test

* use take for observable
2020-03-04 19:00:34 -05:00
Yuliia Naumenko daf622687e
Edit alert flyout (#58964)
* Implemented edit alert functionality

* Added unit tests

* Added functional test for edit alert

* Fixed failed tests

* Fixed edit api

* Fixed due to comments

* Fixed functional test

* Fixed tests

* Fixed add alert

* Small type fix

* Fixed jest test

* Fixed type check

* Fixed bugs with interval and throttle + index threshold expression
2020-03-04 12:56:34 -08:00
patrykkopycinski ac4f8f4ef5
[SIEM] Fix rule delete/duplicate actions (#59306) 2020-03-04 21:31:43 +01:00
spalger ef38287551 Revert "[ML] Transforms: Deprecate custom KibanaContext. (#59133)"
This reverts commit 29975fa614.
2020-03-04 12:50:04 -07:00
Stacey Gammon 543481ba53
Add direct access link registry and dashboard impl and use in ML (#57496)
* Add direct access link registry and dashboard impl and use in ML

* Add example plugin with migration example

* address code review comments

* Fixes, more code review updates

* Readme clean up

* add tests

* remove else

* Rename everything from DirectAccessLinkGenerator to the much short UrlGenerator. also fix the ml # thing and return a relative link from dashboard genrator

* add important text in bold

* Move url generators into share plugin

* add correct i18n prefix

* Fix timeRange url name

* make share plugin optional for dashboard

* fix code owners

* Use base UrlGeneratorState type, add comments

* Fix hash bug and add test that would have caught it
2020-03-04 12:43:09 -05:00
James Gowdy a6d2b57777
[ML] Fixing records and buckets results endpoints (#59313) 2020-03-04 17:04:47 +00:00
Candace Park c58b49c0bf
task/management-details (#58308)
Adds basic details flyout for host management page
2020-03-04 12:02:19 -05:00
Aaron Caldwell 76e3f82754
[Maps] Add missing license to requests in maps embeddables (#59207)
* Pull core service init out into separate function

* Call bind function from embeddable factory constructor

* Move inspector init back to start method. Remove old license check file

* Add TS types
2020-03-04 10:00:01 -07:00
Walter Rafelsberger 29975fa614
[ML] Transforms: Deprecate custom KibanaContext. (#59133)
- Deprecates the custom KibanaContext.
- Where applicable dependencies provided via KibanaContext are now passed on via AppDependencies.
- The main feature of KibanaContext was to populate index pattern and saved search information for the transform wizard. This is now provided via the useSearchItems() custom hook.
2020-03-04 16:56:01 +01:00
Stacey Gammon d2cbc59ad4
Further improve type checking for actions and triggers (#58765)
* wip

* review follow up

* make ACTION a prefix, not SUFFIX

* fix path

* add warnings about casting to ActionType

* Make context  an object in examples, not a string

* require object context, which seems to fix the partial requirement in type and thus the type issue

* mistake

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-04 10:27:14 -05:00
Christos Nasikas aea4811750
[SIEM][CASE] Configure cases: Closure Options & Field Mappings UI (#59062)
* Create closure options radio group

* Create closure options component

* Refactor structure

* Create field mapping row

* Create field component

* Show closure options

* Show field mapping

* Translate editUpdate options

* Add more siem fields

* Remove unnecessary export

* Leave spaces between sections

* Fix callbacks

* Better return

* Fix callback

* Move thirdPartyFields to parent component

* Rename constant

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-04 17:06:33 +02:00
Chris Roberson 9a1b4b9a6b
[Monitoring] Ensure we use the monitoring cluster for retrieving xpack info (#59075)
* Ensure we use the monitoring cluster for retrieving xpack info

* Remove unnecessary code
2020-03-04 09:27:23 -05:00
Aaron Caldwell c4458ca1b4
[File upload] Move File Upload to New Platform (#58550)
* Move file upload to np. Some additional mods & removals

* Consume file upload from NP in maps and pass to kibana services

* Register telemetry mappings

* Init indexPatternService in start method

* Fix type check issues. Add missing prop to telemetry

* Update i18n path

* Review feedback
2020-03-04 06:44:44 -07:00
patrykkopycinski 7ad083f332
Restores [SIEM] Fix Timeline registerProvider to be called only when it's needed (#59003)
* [SIEM] Fix Timeline registerProvider to be called only when it's needed

* cleanup

* add unit tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-04 03:31:10 -08:00
Anton Dosov be43518ee3
visualizations plugin np_ready (#59149) 2020-03-04 11:30:45 +01:00
Dario Gieselaar 114c4cb85e
[APM] Make typescript optimization process compatible with NP (#58984)
* [APM] Make typescript optimization process compatible with NP

Rather than creating an extra tsconfig.json file in the APM folder, simply change the one in x-pack root, and include APM files from both legacy + NP.

* Update dev_docs/typescript.md

* Use spread op instead of assign

* Use console.error instead of console.log
2020-03-04 11:25:39 +01:00
James Gowdy eb40046b93
[ML] Fixing licensing after server NP cutover (#59275) 2020-03-04 10:14:11 +00:00
Dima Arnautov 4ce66c6893
[ML] Validate manual model memory input (#59056)
* [ML] validate mml based on estimated value

* [ML] better memoize

* [ML] memoryInputValidator unit tests

* [ML] cache mml errors

* [ML] prevent override

* [ML] fix validators, add unit tests

* [ML] ignore typing issue with numeral

* [ML] fix validateMinMML

* [ML] fix useCreateAnalyticsForm test

* [ML] setEstimatedModelMemoryLimit to the fallback value in case of an error
2020-03-04 11:02:49 +01:00
Aleh Zasypkin 18c3e8caf8
Migrate security chromeless views to Kibana Platform plugin (#54021)
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
2020-03-04 09:35:52 +01:00
Joe Reuter cba4f34674
Migrate home app (#58030) 2020-03-04 08:24:42 +01:00
Ryland Herrick 875e2a525e
[SIEM] Migrate DE Routes to NP (#58292)
* Define a very basic SiemClient

We're going to add our client to the route handler context. Currently,
it's sole purpose is to provide us with the signalsIndex to use for the
request.

This will allow us to stop passing around most uses of config and
getSpaceId, as they were used for this same purpose.

* WIP: Convert first DE route to NP

This is one of the more comprehensive routes, so I think we're good to
convert the rest.

* Abstract joi/NP validator to helper

We're gonna need this all over the place. Until our schema can generate
an NP-compatible type, we can use this helper to generate an equivalent
validator.

* Second route down

* Another one

* updateRulesRoute

* Fix exports

* patchRulesRoute

* Normalize request param type names

* findRulesRoute

* addPrepackagedRulesRoute

* getPrepackagedRulesStatusRoute

* createRulesBulkRoute

* updateRulesBulkRoute

* patchRulesBulkRoute

* deleteRulesBulkRoute

* importRulesRoute

* exportRulesRoute

* findRulesStatusesRoute

* setSignalsStatusRoute

* querySignalsRoute

* Remove unused type

* createIndexRoute

* Convert readIndexRoute

Removes support for a HEAD request here, becuase it was only used by the
signal_index_exists script (which is now gone). A GET request will have
the same semantics, with a few more bytes in the response.

* deleteIndexRoute

* readTagsRoute

* readPrivilegesRoute

We're incorrectly accessing request.auth in here still, fixing that
next.

* We are always authenticated until we support optional auth

* Clean up our route initialization

* Remove our now-unused ClientsService
* Remove unused getIndex helper and references
* Remove legacy route initialization (partial application)

All our routing tests are still totally broken. Coming up!

* Reference name property in context registration

This should be replaced with a reference to the constant, but at least
this doesn't add a third way it's being referenced.

* Convert our first route tests to NP

The API for our test utils isn't final, but this at least gets some
tests passing. We'll see how it handles a more complex example.

* Create Rules tests

* Update addPrepackagedRules tests

There were a lot of incorrect tests in here due to some incorrect route
registration: we were asserting a 404 but receiving a false positive
because the route we wanted didn't exist.

* Read Privileges Route tests

* Delete Rules route tests

* Use more permissive validation in request mock

* createRulesBulkRoute tests

* deleteRulesBulkRoute tests

* More explicit result mock

It was very unclear in the tests what this mock represented.

* findRulesRoute tests

* getPrepackagedRulesRoute tests

* PatchRulesBulkRoute tests

* Convert migrated tests to newest interface

* PatchRulesRoute tests

Also fixes a potential false positive in our patch_rule_bulk_route
validation tests by providing a more realistic payload with a single key
missing.

* Rename file for consistency

* UpdateRulesBulkRoute tests

* deleteRulesBulkRoute tests

* findRulesStatusRoute tests

* updateRulesRoute tests

* setSignalStatusRoute tests

* querySignalsRoute tests

This actually caught a bug where we were not resolving our response  before returning

* Update schema tests following rename of type

* Converts Import Rules route tests to NP form

Most of these tests are failing due to our request not being parsed by
Hapi as it previously was. Once we figure out how to generate a
post-middleware request with a file stream, these should be easily
fixed.

* Remove unused import

This was the last remaining reference to hapi in our server plugin. yay!

* Remove unnecessary tests

We're already covering our error paths here.

* Hit success branch of bulk patch route test

* Add test around error path in our route

* Update our router to validate requests by default

This gives us two important behaviors:

1. Requests to inject() will be populated with default values
2. We can test request validation independent of a handler call
  * This allows more straightforward assertions as we don't have to
  disambiguate between a schema rejection and a data rejection.

* Update route validation tests with new interface

We don't need to reach into our route in the test, nor ts-ignore it.

* Update ImportRules route tests for NP testing

Gets rid of the multipart-form processing that Hapi would convert for us
into a Readable stream. Instead, we generate our own post-middleware
requst that's got a stream on it.

* Remove unnecessary router method

A bug in an initial implementation of inject() lead me to believe that
validations were removing the stream from our requests; this turned out
to be false! YAGNI

* Add an adapter for our route responses

This provides a uniform interface of { body, status, calls }, where body
and status come from the highest-status call (in the case of many). In a
case where we build multiple responses, the preference is to return the
most problematic one first. If there's an issue, one can look into the
other calls and see what's going on.

This breaks the tests and is not fully implemented, but this will allow
us to change how we build responses without affecting our tests.

* Fix remaining assertions in one test file

Helped flesh out our adapter a bit more.

* Update our response adapter to represent how NP transforms our errors

Most importantly, we return a statusCode but not a status_code.

* Update tests to interface with our Response type

This makes them robust to framework/implementation changes.

* Generate our error responses with our siemResponse wrapper

This adds the status_code key that we desire in our error responses.

Tests were updated as well, and they're currently failing because they
expect statusCode, not status_code.

* Update test assertions to look for status_code

* Remove unused import

* Return a meaningful error if an invalid request was injected

This ensures we a) mimic platform behavior so that b) we don't risk a
false positive if our invalid request were to somehow succeed.

* Return a useful error when no route has been registered

* Add back POST variant of delete_rules_bulk_route

Some browsers do not support a request body for DELETE requests.

* Allow headers to be passed to our error response

This is used by Apollo to set some cache/allow headers in the case of
specific bad requests.

* Add back our header-passing from Apollo errors

I also inverted the logic here to handle the special case first.

* Add some tests around our error response helper

* Fix types of our error wrapper

* Move router logic into separate function

This could be decomposed further but getRoute becomes more verbose, so
meh.

* Convert our mock server to a class

It makes the shared state (mocks) of these functions more explicit, and also
does away with some dumb tuple-returns I had (a consequence of trying to
make everything pure).

* Remove need for a route spy

Instead of mocking certain router methods with the same spy and then
retrieving its calls, we can simply iterate over the calls of the router
methods we care about. This is a little less logic and a little more
straightforward.

* Update test with updated copy

We're consolidating on "signals index" when referring to the data index
where signals are stored.

* Remove unneeded type assertion from our route validation factory

We implicitly cast our return value here when we provide the generic
type parameter, so there's no reason for the explicit cast.

* Use exact message assertions

* Export our SiemRequestContext type for consumers

This will move to server/index in NP.

* Make our SiemClient properties readonly

We don't want consumers mutating our state.

* Throw error if SiemClientFactory has not been properly set up

* Remove unnecessary spread

* Use reduce's type argument instead of an explicit assertion

* Remove unnecessary optional chaining

This was a holdover from when we captured calls that had no body, but is
now unnecessary.

* Remove unnecessary headers on mock requests

* Remove non-null assertion in favor of constructor assignment

* Prefer type annotations to explicit casting

If we annotate that both incoming pieces of our headers are of the
correct type, then we can spread them into an object of the same type
and avoid the index signature issue.

* Skip test failure do to handling of authentication

We need to thread through the utility that provides us this same
functionality.

* Mock our cluster calls with realistic data

* Remove TODO as this is addressed in a later PR

Co-authored-by: Josh Dover <me@joshdover.com>
2020-03-03 21:47:07 -06:00
Oliver Gupte 5539d6955f
[APM] Service Map Layout (#59020)
* Addresses #55544.
- uses the core breadthfirst cytoscape layout
- rotates elements by -90degrees
- selects rum nodes as roots
- implements hover styles to show connected nodes
- fixes flash of unstyled cytoscape elements on initial load

* PR review feedback

* adds canned response for testing cytoscape layout in storybook

* update dep snapshot for removing cytoscape-dagre
2020-03-03 18:26:28 -08:00
Caroline Horn b12ef02cc4
[Lens] Changing the callout message when there are no fields to list (#59063)
* [Lens] Changing the callout message when there are no fields to list
* Using the same token for filter button label and removing old translations
2020-03-03 20:26:40 -05:00
Jonathan Budzenski 1676421f00
skip test sets isLoading when userNavigatedToPage (#59253) 2020-03-03 19:10:33 -06:00
spalger d9a05af27a skip flaky suite (#59229) 2020-03-03 16:34:27 -07:00
Jonathan Budzenski ff23fa3849
Revert "[ML] Fixing licensing after server NP cutover (#58853)" (#59244)
This reverts commit fd5c6c16cd.
2020-03-03 17:09:29 -06:00
Jonathan Budzenski a5e5122e8e
skip isLoading when userPaginatedPolicyListTable (#59231) 2020-03-03 16:07:56 -06:00
Nathan Reese 1fd343b61f
[Maps] source descriptor types (#58791)
* [Maps] source descriptor types

* make SORT_ORDER an enum

* fix type error

* finish defining descriptors for all sources

* fill out layer descriptor

* fix type

* make some properties optional to avoid type explosions

* make type optional

* nest types a bit more so they better match class structor

* in progress work from pairing with Thomas

* one more thing

* add unit test (#35)

* add functions removed from fields typescript converstion

* move joins from VectorTileLayer constructor to VectorLayer constructor, add mock to fix map_selectors test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Thomas Neirynck <thomas@elastic.co>
2020-03-03 15:03:05 -07:00
Yuliia Naumenko 5cdb0153dc
Fixed test (#59208) 2020-03-03 13:40:51 -08:00
Steph Milovic 30c9b02045
[SIEM] [Case] Fix flexbox issue in Case View (#59195) 2020-03-03 14:38:06 -07:00
igoristic 5555a6c3d6
[Monitoring] Optimizes pipeline pagination and max buckets errors (#58205)
* Optimized pipelines

* Fixed tests

* Addressed feedback

* Withhold LS stats until there is at least one pipeline

* Fixed logstash stats

* Addressed feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-03 15:14:58 -05:00
Dima Arnautov cbf410281a
[ML] Support multi-line JSON notation (#58870)
* [ML] multi-line json support for analytics job editor

* [ML] advanced editor with xjson

* [ML] add jest mock for XJsonMode

* [ML] add xJson mode to the json tab

* [ML] fix mocks
2020-03-03 20:31:13 +01:00
Nathan Reese ea43dcede0
[Maps] add functional test to ensure visualize create menu only shows Maps app (#58746)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-03 12:23:43 -07:00
Yara Tercero 4c2aa0ab3f
[SIEM][Detections Engine] Fixed minor UI bug on all rules table pagination (#59094)
* Fixed minor UI bug on all rules table pagination
2020-03-03 14:00:43 -05:00
James Gowdy fd5c6c16cd
[ML] Fixing licensing after server NP cutover (#58853)
* [ML] Fixing licensing after server NP cutover

* client side refactor

* management refactor

* moving management license check

* adding server side license class

* added common license class

* client sides using license class

* updating server api guards

* fix privileges tests

* updating translations

* fixing disabled tabs on basic license

* refactoring client side license checks

* setting license initialized flag

* fixing license check on index data viz

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-03 18:57:40 +00:00
Tyler Smalley 2dcd3cc4c6
[test] Comment out Jest hooks in skipped blocks (#59086)
* [test] Comment out Jest hooks in skipped blocks

Jest will run the hooks regardless of if they are skipped.

Tests skipped in 61c9dc4022
and 420ded8eb2 were still resulting in build failures due to the beforeEach failing.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Additional variables/imports no longer needed

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Skip additional flaky ingest tests

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Comment out file

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Must have one test

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-03-03 10:51:20 -08:00
spalger b95abbae45 skip flaky suite (#58970) 2020-03-03 11:49:27 -07:00
Larry Gregory 74030c97a9
Add support for deprecated roles (#57209)
* Add support for deprecated roles

* address PR feedback

* remove unused import

* copy edits

* fix snapshots

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-03 13:23:53 -05:00
Dmitry Lemeshko 464f9071e9
Code coverage: skip failing tests for coverage run (#59121)
* filter out failing tests

* more skipped tests

* fix tests

* move json files to save space
2020-03-03 20:05:13 +03:00
MadameSheema 02f89f04cc
[SIEM] Cypress preparation for Jenkins (#59013)
* updates events viewer test

* updates login tasks

* updates ml conditional links

* updates url state

* updates timeline screen

* updates timeline tasks

* updates test files

* adds jenkins needed files

* ignoring isAttached lines due to a known error in Cypress (https://github.com/cypress-io/cypress/issues/4408)

* updates loop script

* updates readme with new cypress command explanation

* removes skip

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-03 17:51:35 +01:00
Marta Bondyra 39a431a247
[Lens] Display field name instead of 'dragging' text when a fi… (#59053) 2020-03-03 17:48:54 +01:00
Walter Rafelsberger 63cb9ff7be
[ML] Use EuiDataGrid for transform wizard. (#52510)
Replaces the custom EuiInMemoryTable component with EuiDataGrid for the transforms wizard.
2020-03-03 17:43:38 +01:00
Justin Juno 417f796693
[Rollups] Fix broken link in Rollup Jobs (#58802) (#58929) 2020-03-03 11:25:59 -05:00
Andrew Cholakian 1995a05c16
[Uptime] Refactor header (#58836)
Cleanup implementation of the header to let pages embed the header rather than the weird sort of control the header works with today. Also uses kibana context in a way that makes more sense, and provide a path forward for #53550 since that will need to add a new header type (and some buttons next to the picker).

Fixes #58835
2020-03-03 08:04:35 -06:00
Patrick Mueller 388705509f
[Alerting]: get type-checking, tests, and ui working for index threshold (#59064)
This is a follow-on to https://github.com/elastic/kibana/pull/57030 ,
"[alerting] initial index threshold alertType and supporting APIs",
to get it working with the existing alerting UI.  The parameter shape
was different between the two, so the alertType was changed to fix
the existing UI shapes expected.
2020-03-03 08:28:31 -05:00
Justin Kambic bfca202c4f
[Uptime] Add default chart empty state (#57725)
* Add default chart empty state.

* Delete obsolete translations.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-03 07:52:57 -05:00
James Gowdy 4ef594c208
[ML] Adding indices_options to datafeed (#59119)
* [ML] Adding indices_options to datafeed

* adding extra checks to the schema

* updating expand_wildcards
2020-03-03 11:59:35 +00:00
Maryia Lapata e5362d36a3
[NP] Remove visualize reference in saved object save modal (#59016)
* Remove visualize reference in saved object save modal

* Rename attribute

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-03 13:58:05 +03:00
Walter Rafelsberger f7dd5fe4d4
[ML] Transforms: Remove beta badges. (#59060)
Transforms will be GA in 7.7. This PR removes the beta related UI elements.
2020-03-03 11:05:57 +01:00
Daniil Suleiman 166716a405
[Visualize] Move linked search to react component (#58590)
* Move linked_search to react

* Use i18n from start contract

* Move linked search to the editor

* Updating layout and fixing truncation

* Fix functional test, add a tooltip

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
2020-03-03 12:39:52 +03:00
Walter Rafelsberger bb55e8a21c
[ML] Transforms: Migrate server plugin to NP. (#58714)
Migrate transform legacy server to NP.
- Create server plugin/index for transform in x-pack/plugins.
- Move all legacy/server files to plugins/transform
2020-03-03 09:01:45 +01:00
Walter Rafelsberger ecbcceb74d
[ML] Transform: Fix advanced editor initialization. (#59006)
Fixes regression introduced by #58015 to correctly initialize the transform wizard advanced editor with the current configuration.
2020-03-03 08:59:00 +01:00
Davis Plumlee ffab68d01b
[Endpoint] Alert Details Overview (#58412) 2020-03-02 19:32:04 -05:00
Nathan L Smith 2378d8a0fd
Service map language icons (#58633)
Add icons as described in #56235.

Also:

* Add double-border and ghost "shadow" on nodes
* Add framework name capability to popover metrics
2020-03-02 17:36:43 -06:00
Steph Milovic 90b3678dff
[SIEM] [Case] Comments to case view (#58315) 2020-03-02 16:04:29 -07:00
Joe Reuter 17b3d80369
improve graph missing workspace error message (#58876) 2020-03-02 20:14:24 +01:00
Nathan Reese 2998ec06fe
[Maps] direct Discover "visualize" to open Maps application (#58549)
* [Maps] direct Discover visualize to Maps application

* pass initial layers to maps app

* add functional test

* fix parentheses messed up by lint fix

* fix i18n expression

* move logic into lib

* fix typescript errors

* use constant for geo_point and geo_shape, more TS noise

* use encode_array in an attempt to make TS happy

* another round of TS changes

* one more thing

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-02 11:47:35 -07:00
Peter Pisljar c81e0da584
removing references to visTypes uiExports (#58337) 2020-03-02 12:01:00 -05:00
Andrew Goldstein e9abe735f2
[SIEM] Default the Timeline events filter to show All events (#58953)
## [SIEM] Default the Timeline events filter to show All events

The Timeline events filter introduced in `7.6` to support the [detection engine](https://www.elastic.co/guide/en/siem/guide/current/detection-engine-overview.html) defaulted to filtering by `Raw events`, and thus required manually selecting `All events` or `Signal events` from the dropdown to view signals.

The new default is `All events`, per the screenshots below:

### Before
![event-filter-before](https://user-images.githubusercontent.com/4459398/75593223-ecc61500-5a41-11ea-8d7d-8db5eccb1eb4.png)

### After
![event-filter-after](https://user-images.githubusercontent.com/4459398/75593238-f5b6e680-5a41-11ea-9e12-2fc1232f58d1.png)
2020-03-02 09:36:14 -07:00
Alison Goryachev 323bb21df3
[Remote clusters] Add indexManagement as required plugin (#58915) 2020-03-02 11:27:15 -05:00
Charlie Pichette 74d0e9297f
[Endpoint] [Tests] fixes #57946 flaky endpoint policy list test (#58348)
* endpoint-161-refactor-management-list-test

* fix location of es archive file

* issue 57946 fix flaky endpoint policy list test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-02 10:46:20 -05:00
kqualters-elastic a3be4e2222
[Endpoint] add resolver middleware (#58288)
* Add resolver middleware

* Update types to match events, use sample events in useCamera tests

* add predicate to convert alertdata to legacy endpoint event

* Use mock event generator in tests

* Guard against events not having agent or endpoint fields

Co-authored-by: Robert Austin <robert.austin@elastic.co>
2020-03-02 09:20:21 -05:00
Jean-Louis Leysens ac5e7aa81e
[Upgrade Assistant] Remove "boom" from reindex service (#58715)
* Removed Boom from reindex-service

The reindex service had logic inside it for mapping errors
to HTTP. This has been moved to the route handlers and also
removed Boom.

There is one more instance of Boom use inside of reindex-actions
but that comes from Saved Objects which should probably be removed
at a later stage.

* Fix import path

Specify the full relative import path to the kibana's core
server folder

* Remove unnecessary if statement

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-02 11:08:19 +01:00
Nic 45f804c43c
[SIEM] Detection Fix typo in Adobe Hijack Persistence rule (#58804)
Fixes https://github.com/elastic/kibana/issues/58803
2020-03-01 15:30:44 -07:00
Christos Nasikas 5b532ff50f
Restores [SIEM][CASE] Init Configure Case Page (#58121) (#58924)
* [SIEM][CASE] Init configure cases

* [SIEM][CASE] Translate header title

* [SIEM][CASE] Add back link

* [SIEM][CASE] Add default options to header page

* [SIEM][CASE] Create configure cases page redirections and links

* [SIEM][CASE] Add configure cases button

* [SIEM][CASE] Change translation variable

* [SIEM][CASE] Create wrappers

* [SIEM][CASE] Create section wrapper

* [SIEM][CASE] Switch to new wrapper

* [SIEM][CASE] Add translations

* [SIEM][CASE] Add connectors dropdown component

* [SIEM][CASE] Add connectors component

* [SIEM][CASE] Show connectors

* [SIEM][CASE] Create add new connector button

* [SIEM][CASE] Change values

* [SIEM][CASE] Use state for connectors dropdown

* [SIEM][CASE] Remove unnecessary attribute

* [SIEM][CASE] Remove timeline in configuration page

* [SIEM][CASE] Remove text from gear button

* [SIEM][CASE] make show timeline more generic so we can re-use if need it

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-01 13:29:18 +02:00
Tyler Smalley 420ded8eb2 Skips additional failing Ingest Manager integration tests
https://github.com/elastic/kibana/issues/58969
https://github.com/elastic/kibana/issues/58968
https://github.com/elastic/kibana/issues/58967
https://github.com/elastic/kibana/issues/58966

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-02-29 16:39:47 -08:00
Tyler Smalley 61c9dc4022 Skips failing Ingest Manager integration tests
https://github.com/elastic/kibana/issues/58969
https://github.com/elastic/kibana/issues/58968
https://github.com/elastic/kibana/issues/58967
https://github.com/elastic/kibana/issues/58966
https://github.com/elastic/kibana/issues/58961
https://github.com/elastic/kibana/issues/58960
https://github.com/elastic/kibana/issues/58959
https://github.com/elastic/kibana/issues/58958
https://github.com/elastic/kibana/issues/58958
https://github.com/elastic/kibana/issues/58957
https://github.com/elastic/kibana/issues/58956
https://github.com/elastic/kibana/issues/58955
https://github.com/elastic/kibana/issues/58954

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-02-29 16:34:54 -08:00
spalger d55ddd23a1 disable failing suite (#58942) 2020-02-28 14:58:32 -07:00
Kevin Logan b46a335f2b
[Endpoint] Task/add nav bar (#58604)
* Add tabs to the Endpoint app.  Uses EuiTabs and browser history for integration with react-router

Co-authored-by: Paul Tavares <56442535+paul-tavares@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-28 11:25:36 -08:00
Zacqary Adam Xeper 06ebbb3fe0
[Metric Alerts] Add backend support for multiple expressions per alert (#58672)
* Add support for multiple alert expressions

* Rename expressions to criteria

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-28 13:11:50 -06:00
Zacqary Adam Xeper b658baf012
[Metrics Alerts] Fix alerting on a rate aggregation (#58789)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-28 13:11:34 -06:00
spalger 0f329f564b disable flaky suite (#55953) 2020-02-28 11:45:25 -07:00