Commit graph

31018 commits

Author SHA1 Message Date
patrykkopycinski
320e292ea8
[SIEM] apollo@3 (#51926) 2020-02-27 09:25:37 +01:00
Maryia Lapata
92840fe218
[NP] Import saved objects styles directly (#58208)
* Import styles for saved objects

* Rename index.scss

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-27 10:35:44 +03:00
Matthias Wilhelm
4bc6aa6f87
[Discover] Add hover title on sidebar fieldname (#58384)
* Convert tooltip to use EuiToolTip

* Update tests
2020-02-27 08:26:40 +01:00
Alexey Antonov
7fdff345a4
[Step 1] ui/persisted_state 👉 src/plugins/visualizations (#58324)
* ui/persisted_state 👉 src/plugins/visualizations

Part of #46926

* fix JEST

* remove sinon from tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-27 10:19:17 +03:00
Liza Katz
6ecba58138
Typescript es-query functions (#57473)
* TS Functions

* Rename index.ts

* tsing

* JSON Value

* ts ignore

* TS adjustments

* context?.nested?.path

* Code review

* Import LiteralTypeBuildNode

* Fix jest tests

* revert test

* TS fix IFieldType

* Remvoe unnecessary casting

* range types

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-27 06:41:07 +00:00
Matthias Wilhelm
90cb7a9be9
[Discover] Move discover/saved_searches to Kibana platform (#58476) 2020-02-27 06:17:54 +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
Devin W. Hurley
47ce54c431
add back the null check to convertToSnakeCase function (#58675) 2020-02-26 20:31:13 -05:00
Alex Holmansky
a25ba4e37f
Changing the token used by project-assigner workflows (#57127)
* Use diagnostics-enable action in the workflow. Issue: #56526

* Update workflow to use v1.0.2 of the action

* Adding a new test workflow that uses a personal access token

* Remove an extra coma

* Updated project-assigner action version and access key

* Deleted the test workflow

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 18:36:47 -05: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
Nathan L Smith
5fa2d80e12
Service map style tweaks (#56084)
Address all of the requests in #54182.

Also add a story for the Cytoscape component that shows most of these changes.

Fixes #54182.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 16:50:46 -06:00
Frank Hassanabad
d5eb17528c
[SIEM][Detection Engine] Output schema validations (#58317)
## Summary

* Adds an exact function which allows us to do exact validation rather than allowing arbitrary keys to go through
* Adds a type dependency for parts of validation (gives us feature parity with joi.when())
* Adds several hand spun validations/codecs
* Adds several utilities such as a printer for error validations

### 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-02-26 13:57:37 -07:00
Spencer
4122705bc2
[kbn/test/ftr] add support for custom runners (#58610)
* [kbn/test/ftr] add support for custom runners

* remove irrelevant tests
2020-02-26 13:32:51 -07:00
Vadim Dalecky
71982069ee
ci: 🎡 add sample PR labler script config (#58321)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 21:32:26 +01:00
Nik Richers
e48483d246
Switch to standard ESS trial attribute (#58309)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 11:45:22 -08:00
Josh Dover
abb2c0fd4a
Use more permissive validation in request mock (#58557) 2020-02-26 12:45:09 -07:00
Josh Dover
4cb9bc4472
Add ScopedHistory to AppMountParams (#56705) 2020-02-26 12:43:12 -07:00
Thomas Neirynck
68624da3d5
[Maps] Add XYZTMSSource and TileLayer unit test suites (#58567) 2020-02-26 14:34:44 -05:00
Wylie Conlon
07fec2f725
Documentation for numeral pattern formatting (#57616)
* Documentation for Elastic Numeral formatting

* Tweaks from feedback

* Updates from feedback

* Fix and update examples

* Add TODOs

* Fix typo

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 14:17:59 -05:00
Manuel de la Peña
d27b6c05d3
Migrate existing Cypress tests to Cypress + Cucumber (#57299)
* chore: move gitignore to the cypress directory

* chore: ignore more test files

* fix: do not check the Loading Message

It seems not relevant to the main purpose of these tests

* chore: use cypres + webpack + cucumber scaffolding

See https://github.com/TheBrainFamily/cypress-cucumber-webpack-typescript-example

* chore: add eslint and prettier for code linting

* feat: convert existing Cypress test into BDD style

* feat: add support for using proper Node version in MacOSX

* chore: use tslint

* chore: use old layout

We are keeping cypress as rootDir to follow project's structure. On the other hand,
having a second cypress directory at the 2nd level is the default structure, as shown
in the examples:
- https://github.com/TheBrainFamily/cypress-cucumber-webpack-typescript-example
- a240054d7f/examples/preprocessors__typescript-webpack

* chore: remove prelint script meanwhile we fix TS lint

* chore: move test results to a specific directory

* chore: rename variable following old code

* chore: remove non-needed lints, as we are going to use kibana build

* chore: import snapshot function from cypress

* chore: add readFile utils back from a bad removal

* chore: change format of JSON spec file

It was automatically changed by tests

* chore: move CI directory to the proper layout in order for Jenkins to work

* chore: store test-results from proper dir on Jenkins

* chore: store artifacts properly on Jenkins

* Fix type issues

* chore: rename test application to e2e (end-to-end)

We are keeping the build system within the test application, isolating dependencies

* docs: reorganise docs for APM UI e2e tests

* fix: Use proper cypress support file

* chore: use existing NPM script for running cypress on CI

* chore: update paths in CI scripts

* docs: document how the CI runs the tests

* chore: use Node 10 for tests

* chore: Use kibana's Node version for tests

* chore: run yarn install

* docs: update docs

* fix: path was wrong

* docs: fix paths and flags used to load data

* docs: elasticsearch fix flag

* docs: Bootstrap kibana before running it

* docs: remove outdated info

* chore: move background steps to the scenario

This would avoid not reading the background when the number of scenarios grows

Co-authored-by: Dario Gieselaar <d.gieselaar@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 11:00:54 -08:00
Elizabet Oliveira
fa5400f606
[Maps] Improve Layer Style UI (#58406)
* Improving Layer Style UI

* Removing unnecessary method

* Updating snapshot

* Changing width value to make use of sass variable

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 18:20:03 +00:00
Michail Yasonik
8511fe3780
Fixing Newsfeed Cloud test bug (#58566) 2020-02-26 12:17:00 -05:00
Maryia Lapata
55fb05c09f
[NP] Move ui/kbn_top_nav/kbn_top_nav to kibana_legacy (#58221)
* Migrate kbn_top_nav.js to kibana_legacy

* Wrap TopNavMenu into i18nContext

* Move the kbnTopNav directive definition to kibana_legacy and remove ui/kbn_top_nav

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 20:12:23 +03:00
Chris Cowan
0764380ffd
[Metrics UI / Logs UI] Remove field filtering in Source API call (#58553)
* [Metrics UI / Logs UI] Remove field filtering in Source API call.

* Fixing type_check issues
2020-02-26 09:51:47 -07:00
Angela Chuang
e97b451cc1
[SIEM] add custom reputation link (#57814)
* add custom reputation link

* fix unit test

* add number of limitation to reputation links

* fix dependency

* apply defaultFieldRendererOverflow to reputation link

* fix unit test

* fix url template

* fix display links

* fix types

* fix for review

* update test case

* update snapshot

* add icons and tooltips

* fix style

* update test

* add external link component

* update test

* fix types

* fix style

* update snapshot

* remove useMemo

* update description

* code review

* review II

* code review

* update description

* fix unit test

* fix unit test

* fix unit test

* fix unit test

* fix types

* fix styles

* fix style

* fix style

* fix review

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 16:42:15 +00:00
Chris Cowan
8021fd887a
[Metrics UI] Custom Metrics for Inventory View (#58072)
* [Metrics UI] Add custom metrics interface to Inventory View

* WIP

* Adding workflows for editing custom metrics

* Polishing visual design

* Removing extra text

* Fixing types and return values

* fixing i18n

* Adding aria labels for clearity

* Changing custom group by to match same width as custom metric

* updating integration test for custom metrics

* Fixing type def
2020-02-26 09:36:43 -07:00
Wylie Conlon
613e4b9b15
Median label shows "Median" instead of "50th percentile of" (#58521)
* Median label shows "Median" instead of "50th percentile of"

* Update test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 11:33:42 -05:00
Pete Harverson
32fb5c1532
[ML] Fixes creation of a watch for an anomaly detection job (#58597) 2020-02-26 16:30:10 +00:00
Justin Juno
4b8b9a4218
[DOCS] Add Homebrew start + stop instructions for Kibana (#58495)
* add brew start and stop instructions to docs

* add float to start-stop doc

* Update start-stop.asciidoc

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 08:13:53 -08:00
Spencer
457783e839
[kbn/ui-shared-deps] load base css file (#58520)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 08:25:03 -07:00
Pierre Gayvallet
8524303b6e
Allow savedObjects types registration from NP (#57430)
* expose `registerType` API

* expose `getTypeRegistry` API

* change SavedObjectMigrationFn signature to add context

* fix exported types

* update generated doc

* update migration documentation

* fix legacy service test

* fix typings

* update service setup description

* add saved_objects server folder convention

* fix unit test

* documentation NITs

* add typeRegistry to SavedObjectClientWrapperOptions
2020-02-26 16:22:35 +01:00
Joe Reuter
47aa5b46df
Saved query management: Discard pending listing requests (#58433)
* discard pending listing requests

* consolidate requests
2020-02-26 15:59:22 +01:00
Nathan Reese
3212754e62
[Maps] add Top term aggregation (#57875)
* [Maps] add Top term aggregation

* update pew-pew source to handle terms agg

* make helper function for pulling values from bucket

* update terms source

* better join labels

* categoricla meta

* remove unused constant

* remove unused changes

* remove unused constant METRIC_SCHEMA_CONFIG

* update jest expect

* fix auto complete suggestions for top term

* get category autocomplete working with style props from joins

* pluck categorical style meta with real field name

* mock MetricsEditor to fix jest test

* review feedback

* es_agg_utils.js to es_agg_utils.ts

* typing updates

* use composit agg to avoid search.buckets limit

* i18n update and functional test fix

* stop paging through results when request is aborted

* remove unused file

* do not use composite agg when no terms sub-aggregations

* clean up

* pass indexPattern to getValueAggsDsl

* review feedback

* more review feedback

* ts-ignore for untyped imports in tests

* more review feedback

* add bucket.hasOwnProperty check

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 07:50:11 -07:00
Nathan L Smith
2ea4bdfe0d
Server-side license check for APM service map (#58547)
* Factor our the license checking logic and messaging to common
* Add licensing plugin as a dependency of the APM plugin
* Throw a forbidden error on the server if trying to access the service map routes
2020-02-26 07:14:08 -06:00
Uladzislau Lasitsa
342e50183d
Converted brush event to TS. Migrated tests to "jest" way and optimiz… (#58206)
* Converted brush event to TS. Migrated tests to "jest" way and optimiz

* Removed unused definition in interface. Revert changes related to import deserializeAggConfig.

Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 16:04:58 +03:00
Joe Reuter
3b1921163c
satisfy proptype check (#58538) 2020-02-26 12:05:47 +01:00
Joe Reuter
08e27d08e9
refresh once to make sure everything is fetched (#58225) 2020-02-26 11:34:53 +01:00
Joe Reuter
dfcd4d1e93
Functional tests: Fix saved object management button click retry (#58218) 2020-02-26 11:34:11 +01:00
Maryia Lapata
39f6eaf5f4
Fix TS for vis_type_table (#58347)
* Remove eslint overrides for vis_type_table

* Fix TS for vis_type_table

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 13:20:24 +03:00
Pierre Gayvallet
a4e82c4e6d
Adapt es-archiver to call _migrate endpoint instead of creating a migrator (#56971)
* es-archiver call _migrate endpoint instead of creating a migrator

* fix crlf....

* use promise instead of callback accessor

* attempt with disabled authent

* enable security again

* set mapping to dynamic before calling migration endpoint

* rename space data from non-spaced tests

* add documentation on the `rerun` flag

* create router with the `/api/saved_objects` prefix

* add unit test about strict mapping

* add integration test on migrate endpoint

* wrap route handler with handleLegacyErrors

* add remark about limitations of the rerun flag

* Apply suggestions from code review

Co-Authored-By: Aleh Zasypkin <aleh.zasypkin@gmail.com>

* do not return detailed index result

* add access tag to migrate route

* use /internal prefix for migrate endpoint

* fix integ tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
2020-02-26 10:39:16 +01:00
James Gowdy
71254de3c2
[ML] Adding get records endpoint wrapper (#58500) 2020-02-26 09:21:32 +00:00
Søren Louv-Jansen
0e0f114d03
[APM] Improve debug output (#58467) 2020-02-26 07:40:06 +01:00
Xavier Mouligneau
b56eead4ac
[SIEM] [Detections] Refactor the all rules page (#58428)
* Refactor the all rules page to be easier to test

* review with Garrett

* bring back utility bar under condition

* fix bugs tags and allow switch to show loading when enable/disable rule

* fix rules selection when trigerring new rules

* fix imports/exports can only use rule_id as learned today

* review I
2020-02-25 21:59:44 -05:00
Mike Côté
24b8ecf74d
Add localization to missing action types (#58554) 2020-02-25 21:47:53 -05:00
Mike Côté
29439789ab
Add migration support to the event log (#58010)
* Initial work

* Add missing file

* Add tests where missing

* Add kibana version to esNames

* Share ILM policy across versions
2020-02-25 18:18:27 -05:00
Lukas Olson
ef80ebf1bb
[Search service] Add async search strategy (#53057)
* 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 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

* 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

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-25 15:57:40 -07:00
Andrew Cholakian
87f6cd1152
[Uptime] Show only total in snapshot heading (#58376)
This fixes a number of design issues. Fixes https://github.com/elastic/kibana/issues/58372
2020-02-25 16:40:06 -06:00
Ryland Herrick
2501919a8a
Remove support of HEAD request in signals index route (#58489)
Until these are officially supported in new platform, it's best to not
rely on this behavior. We can achieve roughly the same functionality
with a GET request. Modifies the existing script accordingly, in case
anyone's still using it.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-25 15:33:49 -06:00
Spencer
0e2363615d
Fix flaky jest test (#58402)
* Revert "Temporarily removes kbn-optimizer cache key tests (#58318)"

This reverts commit e64eff0a3d.

* [kbn-optmizer] avoid mocking fs exports

* overwrite ciGroup script to support jest in flaky testing job

* limit jest workers to 3 so that concurrent runners have space to operate

* Revert "limit jest workers to 3 so that concurrent runners have space to operate"

This reverts commit 1a2f882f6d.

* Revert "overwrite ciGroup script to support jest in flaky testing job"

This reverts commit 548db61722.
2020-02-25 13:59:04 -07:00
Larry Gregory
ca5fb7fb01
Use links instead of click handlers when switching spaces (#57730)
* use links instead of click handlers when switching spaces

* remove unused imports

* remove use of deprecated injectedMetadata service

* simplify SpacesManager constructor

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-25 15:56:28 -05:00