Commit graph

1363 commits

Author SHA1 Message Date
Patrick Mueller
7db4196164
[Alerting] add more alert properties to action parameter templating (#59718)
This is a pre-cursor to https://github.com/elastic/kibana/issues/58529

I realized a bit ago that we weren't making quite enough info available
in the action parameter templating that happens when alerts schedule
actions to execute.  Missing were alert name, tags, and spaceId.

For the index threshold alert, I had added them to it's context, but
then every other action would have to do the same if they also
wanted those values.

So I added these as additional top-level variables that can be
used in templates, along with the alert id, alert instance id,
context, and state.  The other bits in RawAlert didn't seem
that interesting, to be used as an action parameter.
2020-03-10 16:50:19 -04:00
MadameSheema
0f71886f83
[SIEM] Adds 'Create new rule' Cypress test (#59790)
* adds 'Creates and activates new rule'

* loads data using es_archive

* refactor test
2020-03-10 21:03:48 +01:00
Robert Oskamp
8bc051ac49
[ML] Functional tests - stabilize saved search tests (#59652)
This PR stabilizes the saved search functional UI tests by adding a retry to navigateToApp('ml')
2020-03-10 18:10:59 +01:00
Walter Rafelsberger
ec1f46bdbd
[ML] Transforms: Data grid fixes. (#59538)
- Fixes data grid schemas to avoid crashing the page.
- Fixes date formatting.
- Uses data grid for preview table in transform list.
2020-03-10 15:52:17 +01:00
Robert Oskamp
848188e517
[ML] Functional tests - re-activate date_nanos test (#59649)
This PR re-activates the date_nanos functional UI test.
2020-03-10 14:15:20 +01:00
Pierre Gayvallet
f1272b5ffe
Add SavedObject management section registration in core (#59291)
* add management section to SavedObjectsType

* adapt import/export routes to get types accessor

* add documentation

* update generated doc

* update migration guide

* use request context to access exportable types

* update generated doc

* adapt SavedObjectsManagement to use the registry

* stop magical tricks about the config type, register it as any other so type.

* fix FTR assertions

* fix so_mixin tests

* register the `config` type from the uiSettings service

* nits and comments

* update generated doc

* remove true from dynamic property definition, use force-cast back for config type

* remove obsolete test comment
2020-03-10 11:13:45 +01:00
Patrick Mueller
3f365a82f8
[Alerting] replace watcher http APIs used by index threshold Alerting (#59475)
Prior to this PR, the alerting UI used two HTTP endpoints provided by the
Kibana watcher plugin, to list index and field names.  There are now two HTTP
endpoints in the alerting_builtins plugin which will be used instead.

The code for the new endpoints was largely copied from the existing watcher
endpoints, and the HTTP request/response bodies kept pretty much the same.

resolves https://github.com/elastic/kibana/issues/53041
2020-03-09 19:30:20 -04:00
Robert Oskamp
4bd7b36431
[ML] Functional API tests - bucket span estimation with custom search.max_buckets (#59665)
This PR adds functional API tests for the bucket span estimation endpoint with a transient or persistent `search.max_buckets` setting.
2020-03-09 18:03:47 +01:00
James Gowdy
92cc04c7df
[ML] Refactoring anomaly detector job types (#59556)
* [ML] Refactoring anomaly detector job types

* removing calendar type

* update validateCardinality

* fixing test

* updating  types in functional tests

* using state constants
2020-03-09 13:51:07 +00:00
Jean-Louis Leysens
492a97e288
[Upgrade Assistant] Better handling of closed indices (#58890)
* Exclude disallowed, private setting at index creation

* Remove intl from tabs component

* Added logic for checking the current index status

* Added ES contract integration test

Using _cluster/state is considered internal. This adds an integration
test for checking the contract in CI.

* Add the client side notification for closed indices

* First version of end-to-end functionality working

* Clean up unused, incorrect type information

* Fix type issues and added a comment about the new reindex options

* Fixed server side tests, added comments and logic updates

Updated the handling of reindexOptions to make it more
backwards compatible (treat it as if it could be undefined).

Also update the logic for checking for open or closed indices.
No optional chaining! It should break if the response does not
exactly match.

* Clean up unused code

* Improved idempotency of test and check explicitly for "close".

Rather check for the specific value we want, as this is what is
also gauranteed by the tests. In this way, the information we
send back to the client is also more accurate regarding the index
status. If, in future, more index states are introduced this will
need to be revisited if it affects the ability for an index to be
re-indexed.

* Update client-side tests

* Fix types

* Handle a case where the index name provided may be an alias

* Fix types

* merge-conflict: finish merge conflict resolution

* Update x-pack/plugins/upgrade_assistant/public/application/components/tabs/checkup/deprecations/reindex/closed_warning_icon.tsx

Co-Authored-By: Alison Goryachev <alisonmllr20@gmail.com>

* merge-conflict: Remove duplicate import

VSCode does not auto-save as expected :sigh:

* ui: Revisit the UI

Moved the warning icon to inside of the button and tooltip to
on the button.

Added a callout to the reindex flyout for when an index is closed.

* logic: slight update to when the index closed callout is shown

We only show the index closed callout in the flyout when the
reindex operation is not considered "completed"

* tests: fix jest tests

* refactor: remove "openAndClose" from reindex endpoints

"openAndClose" should just happen automatically. The user should
not have to pass the flag in, that would be a weird API. We just
need to warn the user about that reindexing a closed index will
take more resources

* test: update upgrade assistant integration test

* fix: types

* copy: use sentence case

* refactor: use the in scope declaration of reindex op

* test: Clean up tests

Reindexing test was generating index name, could just get it from
server response. Also removed openAndClose from all integration
tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
2020-03-09 14:11:31 +01:00
MadameSheema
9ab4aa027c
[SIEM] Adds 'Load prebuilt rules' Cypress test (#59529)
* adds 'load prebuilt rules'

* fixes typecheck issue

* updates jest snapshot
2020-03-06 22:41:05 +01:00
Brian Seeders
dd9999bf5d
Check for alert dialog when doing a force logout (#59329) 2020-03-06 16:03:41 -05:00
Brian Seeders
8fa9962641
Ensure logged out starting state for tests that need it (#59322) 2020-03-06 12:16:06 -05:00
Pierre Gayvallet
45fb6f38b8
Hide input value from kbn-config-schema error messages (#58843)
* use inline snapshots instead of snapshots

* hide input value from error messages

* update core snapshots

* update xpack snapshots

* fix ftr assertions

* fix new snapshots

* hide values for byte_size and duration

* update new snapshots

* remove another byte_size value reference

* fix yet another value references in error messages

* update xpack snapshots

* update xpack ftr assertions
2020-03-06 17:47:28 +01:00
Walter Rafelsberger
f4f956dfeb
[ML] Transforms: Migrate client plugin to NP. (#59443)
Migrates the client side plugin of transforms to NP.
- Gets rid of the last parts of the shim (http, documentation links)
- Moves the plugin from x-pack/legacy/plugins/transform/public to x-pack/plugins/transform
- Creates a custom mock for appDependencies based on NP services
- Fixes jest tests to get rid of all act() related warnings
2020-03-06 17:44:35 +01:00
Robert Oskamp
708d92a00e [ML] Disable failing functional tests 2020-03-06 16:55:57 +01:00
Jonathan Buttner
2e41a27c46
[Endpoint] Unifying the test index name for resolver and alerts (#59073)
* Unifying the test index name for resolver and alerts

* Endpoint isn't sending the agent field so check for it

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-06 09:43:52 -05:00
Jean-Louis Leysens
651d0a9739
[Upgrade Assistant] Server-side batch reindexing (#58598)
* Added server side logic for handling batch reindex

* Remove literal string interpolation from translation

* Refactor return value of batch endpoint

"sucesses" does not communicate accurately what has happened.
"started" more closely reflects what has happened.

* First iteration of batch queues

* Single queue

Changed the batchqueues implementation to only using a single queue
 - since there is only one ES that it is interacting with.

Before continuing with this work, just making sure that these pre-
cautions are necessary!

* Clean up old batch queue implementation

* Slight refactor

* Revert batch queues implementation

* Introduction of QueueSettings

Queue settings can be set on a reindex operation and set a
timemstamp value on the reindex operation for the scheduler
to use down the line for ordering operations and running them
in series

* Updated worker logic to handle items in queue in series

* Refactor /batch endpoint response to "enqueued" not "started"

* Fixed jest tests

* Refactor worker refresh operations for readability

Created a new file op_utils where logic repsonsible for sorting
and ordering reindex operation saved objects is.

* Add batch API integration test

Also assert that reindexing is happening in the expected order

* Added a new endpoint: GET batch/queue

This allows users of the API to see what the current queue state
is for visibility. Using the queue endpoint int he API integration
tests for batch too.

* Reset the queuedAt timestamp on resume

If a reindexOperation is being resumed and put in a queue we
also need to reset the queuedAt timestamp to respect the new
batch queue ordering.

* Fix jest test

Added 'undefined' as the second optional param to
resumeIndexOperation call.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-06 10:18:21 +01: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
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
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
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
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
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
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
spalger
d9a05af27a skip flaky suite (#59229) 2020-03-03 16:34:27 -07: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
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
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
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
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
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
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
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
Spencer
a3e68a1830
Revert "[SIEM] apollo@3 (#51926)" and "[SIEM][CASE] Init Confi… (#58806)
* Revert "[SIEM] apollo@3 (#51926)"

This reverts commit 320e292ea8.

* Revert "[SIEM][CASE] Init Configure Case Page (#58121)"

This reverts commit 967bef7b38.

* update a snapshot...
2020-02-28 11:42:34 -07:00
Brandon Kobel
c5d17acab6
Fix privileges flaky test because the order in arrays matters for equality (#58790)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-28 08:58:24 -08:00
Patrick Mueller
5b7270541c
[alerting] initial index threshold alertType and supporting APIs (#57030)
Adds the first built-in alertType for Kibana alerting, an index threshold alert, and associated HTTP endpoint to generate preview data for it.

addresses the server-side requirements for issue  https://github.com/elastic/kibana/issues/53041
2020-02-28 11:48:28 -05:00
Aleh Zasypkin
bd92b7d56f
Implement HTTP Authentication provider and allow ApiKey authentication by default. (#58126) 2020-02-28 10:09:41 +01:00
Spencer
4fd3b45b44
fix some missing awaits in functional tests (#58807) 2020-02-27 20:22:42 -07:00
spalger
07c22f13b7 skip flaky suite (#58785) 2020-02-27 15:23:54 -07:00
Yuliia Naumenko
a896515195
Add beta badge to alert and actions UI components (#58691)
* Added Beta badge to Alerts and Actions UI components

* Fixed failing test

* Fixed FT

* Fixed labels
2020-02-27 12:43:23 -08:00
Chris Cowan
43be649f50
[Metrics UI] Ensure inventory view buckets never drop below 60 seconds (#58503)
* [Metrics UI] Ensure inventory view buckets never drop below 60 seconds

* Fixing tests

* Fixing tests... again

* Fixing tests... rounding issue?

* Trying to fix the tests... again

* updating test for custom metric

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-27 09:32:44 -07:00
patrykkopycinski
320e292ea8
[SIEM] apollo@3 (#51926) 2020-02-27 09:25:37 +01:00
Andrew Cholakian
460d39772b
[Uptime] Fix flakey test by await-ing refreshes in tests (#58656)
Fixes https://github.com/elastic/kibana/issues/58541
2020-02-26 20:13:56 -06:00
Madison Caldwell
e31f8a3504
[Endpoint] ERT-82 Alert sorting/filtering and cursor-based pagination (#57266)
* Add KQL filtering

* Schema updates

* Cursor-based pagination

* Add alert detail GET api

* A little refactoring ;)

* Add KQL filtering

* Render SearchBar that provides suggestions and executes search

* Schema updates

* Cursor-based pagination

* Bug fix with search_after type

* hook up filters, trying date range

* Multi-filter support

* Add rison encoding/decoding on the backend

* Wire up front-end for new GET request

* tiny bug fix

* use redux for state, disable saved queries

* Remove SearchBar UI code

* Remove Search Bar UI Part 2

* test 1

* test 2

* Finish integrating refactor work

* Fix fromIndex calculation

* Address feedback

* More tweaks

* Add some tests, round 1

* Add Direction enum

* Add next and prev urls for alert details

* refactor

* fixes

* No more AlertDataWrapper, less Maybe types

* change @timestamp to type number, redefine AlertListState

* moved pagination classes, moved types to alerts top level

* remove fake data mappings file

* Fix data location

* remove Maybe type, prev and next have type 'string | null'

* fix functional tests

* Create immutable AlertEvent type and an AlertMetadata type

* test updates

* make tests werk

* Address PR feedback

* No Date Immutable

* Fix test params

* Fix test type-check

Co-authored-by: Pedro Jaramillo <peluja1012@gmail.com>
2020-02-26 18:25:15 -05:00