Commit graph

31673 commits

Author SHA1 Message Date
spalger 6de7f2a62b Revert "[APM] Collect telemetry about data/API performance (#51612)"
This reverts commit 13baa51561.
2020-03-23 22:26:15 -07:00
Tiago Costa 35b222a840
fix(NA): log rotation watchers usage (#60956)
* fix(NA): log rotation watchers usage

* docs(NA): add old value to the example

* chore(NA): change warning messages
2020-03-24 02:56:04 +00:00
Xavier Mouligneau 81b3723633
[SIEM] [CASES] Build lego blocks case details view (#60864)
* modify API to get the total comments in _find + Add user action to track what user are doing + create _pushed api to know when case have been pushed

* fix rebase

* add connector name in case configuration saved object

* fix total comment in all cases

* totalComment bug on the API

* integrate user action API with UI

* fix merged issue

* integration APi to push to services with UI

* Fix bugs

* wip to show pushed service in ui

* finish the full flow with pushing to service now

* review about client discrepency

* clean up + review

* merge issue

* update error msgs to info

* add aria label + fix but on add/remove tags

* fix i18n

Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
2020-03-23 19:26:49 -04:00
CJ Cenizal f32a8483bc
Create Painless Lab app (#57538)
* Create Painless Playground app (#54578)

* Replace heart script with smiley face script. (#57755)

* Rename Painless Playground -> Painless Lab. (#57545)

* Fix i18n namespace.

* Improve smiley face proportions.
- Add def keyword to Painless spec.
- Temporarily fix broken highlighting.
- Add small padding to main controls.

* [Painless Lab] Minor Fixes (#58135)

* Code restructure, improve types, add plugin id, introduced hook

Moved the code execution hook to a custom hook outside of main,
also chaining off promise to avoid lower level handling of
sequencing.

* Re-instated formatting code

To improve DX the execution error response from the painless API
was massaged to a more reader friendly state, only giving non-repeating
information.

Currently it is hard to determine the line and character information from
the painless endpoint. If the user wishes to see this raw information it
will be available in the API response flyout.

* Remove leading new line in default script

* Remove registration of feature flag

* Fix types

* Restore previous auto-submit request behaviour

* Remove use of null and remove old comment

Stick with "undefined" as the designation for something not existing.

* [Painless Lab] NP migration (#59794)

* Fix sample document editor.

* [Painless Lab] Fix float -> integer coercion bug (#60201)

* Clarify data and persistence flow. Fix floating point precision bug.
* Send a string to API and ES client instead of an object.

* Rename helpers lib to format. Add tests for formatRequestPayload.

* Add query parameter to score context (#60414)

* Fix typo and i18n

* Make state init lazy

Otherwise we are needlessly reading and JSON.parse'ing on every
state update

* Support the query parameter in requests to Painless

* Fix borked i18n

* Fix i18n

* Another i18n issue

* [Painless] Minor state update model refactor (#60532)

* Fix typo and i18n

* Make state init lazy

Otherwise we are needlessly reading and JSON.parse'ing on every
state update

* Support the query parameter in requests to Painless

* WiP on state refactor

* Some cleanup after manual testing

* Fix types and i18n

* Fix i18n in context_tab

* i18n

* [Painless] Language Service (#60612)

* Added language service

* Use the correct monaco instance and add wordwise operations

* Remove plugin context initializer for now

* [Painless] Replace hard-coded links (#60603)

* Replace hard-coded links

Also remove all props from Main component

* Pass the new links object to the request flyout too

* Link directly to painless execute API's contexts

* Remove responsive stacking from tabs with icons in them.

* Resize Painless Lab bottom bar to accommodate nav drawer width (#60833)

* Validate Painless Lab index field (#60841)

* Make JSON format of parameters field more prominent. Set default parameters to provide an example to users.
* Set default document to provide an example to users.
* Simplify context's updateState interface.
* Refactor store and context file organization.
  - Remove common directory, move constants and types files to root.
  - Move initialState into context file, where it's being used.
* Add validation for index input.
* Create context directory.

* Fix bottom bar z-index.

* Position flyout help link so it's bottom-aligned with the title and farther from the close button.

Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alison.goryachev@elastic.co>
2020-03-23 16:10:12 -07:00
Ryland Herrick e3431752f3
[SIEM] Move Timeline Template field to first step of rule creation (#60840)
* Move timeline template to Define step of Rule creation

This required a refactor/simplification of the step_define_rule logic to
make things work. In retrospect I think that the issue was we were not
handling incoming `defaultValues` props well, which was causing local
component state to be lost.

Now that we're doing a merge and removed a few unneeded local useStates,
things are a) working and b) cleaner

* Fix Rule details/edit view with updated data

We need to fix the other side of the equation to get these to work: the
timeline data was moved to a different step during creation, but when
viewing on the frontend we split the rule data back into the separate
"steps."

* Remove unused import

* Fix bug in formatDefineStepData

I neglected to pass through index in a previous commit.

* Update tests now that timeline has movied to a different step

* Fix more tests

* Update StepRuleDescription snapshots

* Fix cypress Rule Creation test

Timeline template moved, and so tests broke.

* Add unit tests for filterRuleFieldsForType
2020-03-23 18:09:30 -05:00
Tim Sullivan 5755b2ac52
[Reporting/New Platform Migration] Use a new config service on server-side (#55882)
* [Reporting/New Platform Migration] Use a new config service on server-side

* unit test for createConfig

* use promise.all and remove outdated comment

* design feedback to avoid handling the entire config getter

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 16:02:44 -07:00
Patrick Mueller 72bc0eae32
[Alerting] allow email action to not require auth (#60839)
resolves https://github.com/elastic/kibana/issues/57143

Currently, the built-in email action requires user/password properties to be
set in it's secrets parameters.  This PR changes that requirement, so they
are no longer required.
2020-03-23 19:02:28 -04:00
Nathan Reese dc31736dd2
[Maps] Default ES document layer scaling type to clusters and show scaling UI in the create wizard (#60668)
* [Maps] show scaling panel in ES documents create wizard

* minor fix

* remove unused async state

* update create editor to use ScalingForm

* default geo field

* ts lint errors

* remove old dynamic filter behavior

* update jest tests

* eslint

* remove indexCount route

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 16:40:43 -06:00
Dario Gieselaar 13baa51561
[APM] Collect telemetry about data/API performance (#51612)
* [APM] Collect telemetry about data/API performance

Closes #50757.

* Ignore apm scripts package.json

* Config flag for enabling/disabling telemetry collection
2020-03-23 23:08:44 +01:00
Aleh Zasypkin fa69765e4b
Implement Kibana Login Selector (#53010) 2020-03-23 22:45:26 +01:00
Brent Kimmel dd93a14fef
Resolver/nodedesign 25 (#60630)
* PR base

* adds designed resolver nodes

* adjust distance between nodes

* WIP remove stroke

* WIP changes to meet mocks

* new boxes

* remove animation

* new box assets

* baby resolver running nodes complete

* cleanup defs, add running trigger cube

* added 2 more defs for process cubes

* adding switched for assets on node component

* vacuuming defs file

* adjusting types and references to new event model

* switch background to full shade for contrast

* switch background to full shade for contrast

* cube, animation and a11y changes to 25% nodes

* PR base

* adds designed resolver nodes

* adjust distance between nodes

* WIP remove stroke

* WIP changes to meet mocks

* new boxes

* remove animation

* new box assets

* baby resolver running nodes complete

* cleanup defs, add running trigger cube

* added 2 more defs for process cubes

* adding switched for assets on node component

* vacuuming defs file

* adjusting types and references to new event model

* switch background to full shade for contrast

* cube, animation and a11y changes to 25% nodes

* merge upstream

* change from Legacy to new Resolver event

* cleaning up unused styles

* fix adjacency map issues

* fix process type to cube mapping

* fix typing on selctor

* set viewport to strict

* remove unused types

* fixes ci / testing issues

* feedback from Jon Buttner

* fix index from Jon Buttner comment

* reset focus state on nodes

* Robert review: changing adjacency map property names for better semantics

* Robert Austin review: changing var name

* Robert Austin review: rearrange code for readability

* Robert Austin review: change const name

* Robert Austin review: rearranging code for readability

* Robert Austin review: adjustments to process_event_dot

* Robert Austin review: replace level getter

* Robert Austin review: removing unnecessary casting

* Robert Austin review: adjust selector

* Robert Austin review: fix setting parent map

* Robert Austin review: replace function with consts

* K Qualters review: change return type of function

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 17:17:52 -04:00
Nathan L Smith a0a85dbb90
Simplify service map layout (#60949)
Clean up the cytoscape component and event handlers to simplify the layout logic.

Make all centering animations animated.

Add logging of cytoscape events when we're in debug mode.

Add Elasticsearch icon.
2020-03-23 16:13:56 -05:00
Dario Gieselaar d5c13c043b
[APM] use span.destination.service.resource (#60908)
* [APM] use span.destination.service.resource

Closes #60405.

* update snapshots

Co-authored-by: Nathan L Smith <smith@nlsmith.com>
2020-03-23 16:13:32 -05:00
Wylie Conlon f7a3049843
[Lens] Improve suggestions when dragging field for the second time (#60687)
* [Lens] Improve suggestions when dragging into an existing visualization

* Include 0 metrics case

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 17:11:09 -04:00
Devon Thomson ec2972c224
Dashboard/add panel flow (#59918)
Added an emphasize prop to the top nav menu item and used it for a new 'Create new' button which redirects to the 'new visualization' modal.

Co-authored-by: Ryan Keairns <rkeairns@chef.io>
2020-03-23 17:03:01 -04:00
Wylie Conlon 3c924d9f87
[Lens] Use new charts APIs to simplify series naming (#60708)
* build: update @elastic/charts to v18.1.0

* tests: fix breaking-change on legendItem className

* fix: type changes and ml custom tooltip data

* tests: fix snapshot test

* [Lens] Use new charts APIs to simplify series naming

* Fix types

* Fix naming

* Remove accidental file

* Update snapshots

Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 16:44:57 -04:00
Nicolas Chaulet 3eeb8df172
[Fleet] add Agent config details yaml view (#60943) 2020-03-23 16:40:33 -04:00
Thomas Neirynck 88d41fa352
[Maps] Remove client-side scaling of ordinal values (#58528)
This removes the rescaling of ordinal values to the [0,1] domain, and modifies the creation of the mapbox-style rules to use the actual RangeStyleMeta-data. This is an important prerequisite for Maps handling tile vector sources. For these sources, Maps does not have access to the raw underlying GeoJson and needs to use the stylemeta directly.
2020-03-23 16:09:09 -04:00
Nathan Reese d32c4c8390
[Maps] fix point to point source regression (#60930)
* [Maps] fix pew pew regression

* add functional test for pew pew source
2020-03-23 13:40:24 -06:00
Jen Huang 73deba16cc
Ensure that the default datasources use the default config's namespace (#60823)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 12:22:26 -07:00
Lee Drengenberg afca33b520
add relationship test on Saved Objects (#59968)
* just a demo of function to return saved object table elements

* fix esArchive data, extend import objects test case for relationships

* improved data-test-subjs

* update snapshot for jest test

* unskip other half of the tests

* removed commented-out code

* use new findByTestSubject methods

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 14:18:35 -05:00
Justin Kambic ef48205f15
[Uptime] Add configurable page size to monitor list (#60573)
* Add configurable page size to monitor list.

* Add functional tests for new feature.

* Update outdated snapshots.

* Extract UI concerns for size select component to dedicated function.

* Add missing props to resolve type check errors.

* Add unit test for new UI functionality.

* Refresh snapshots after additional changes.

* Introduce new parameter to API test function.

* Update flex behavior for new UI component.

* Clean up code in functional page object file.

* Refresh snapshots that were broken by previous feedback implementation.

* Fix async error introduced to test framework by other patch.
2020-03-23 15:18:11 -04:00
Søren Louv-Jansen 65359856a0
[APM] Remote Agent Config: Add additional (java) options (#59860) 2020-03-23 20:14:26 +01:00
Poff Poffenberger 2da5d635bf
Re-enable a CSS fix for the Monaco Editor's focus behavior (#60803)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 14:09:05 -05:00
Alejandro Fernández Haro 452193fdba
[Telemetry] Server-side Migration to NP (#60485)
* [Telemetry] Migration to NP

* Telemetry management advanced settings section + fix import paths + dropped support for injectVars

* Fix i18nrc paths for telemetry

* Move ui_metric mappings to NP registerType

* Fixed minor test tweaks

* Add README docs (#60443)

* Add missing translation

* Update the telemetryService config only when authenticated

* start method is not a promise anymore

* Fix mocha tests

* No need to JSON.stringify the API responses

* Catch handleOldSettings as we used to do

* Deal with the forbidden use case in the optIn API

* No need to provide the plugin name in the logger.get(). It is automatically scoped + one missing CallCluster vs. APICaller type replacement

* Add empty start method in README.md to show differences with the other approach

* Telemetry collection with X-Pack README

* Docs update

* Allow monitoring collector to send its own ES client

* All collections should provide their own ES client

* PR feedback

* i18n NITs from kibana-platform feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 18:49:38 +00:00
Gidi Meir Morris d8d06e7343
[Alerting] Fixes flaky test in Alert Instances Details page (#60893)
Fixes flaky test in Alert Instances Details page
2020-03-23 18:23:26 +00:00
Peter Pisljar ed55531207
cleanup visualizations api (#59958) 2020-03-23 19:19:39 +01:00
Matthias Wilhelm c537d453e6
Inline timezoneProvider function, remove ui/vis/lib/timezone (#60475)
* Inline getTimezone in discover, vis_type_timeseries,  timelion app & vis_type_timelion
2020-03-23 19:14:14 +01:00
MadameSheema 10afcf4be8
[SIEM] Adds 'Open one signal' Cypress test (#60484)
* adds data for having closed signals

* adds 'Open one signal when more than one closed signals are selected' test'

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 18:46:35 +01:00
Alison Goryachev 85481a7017
[UA] Upgrade assistant migration meta data can become stale (#60789) 2020-03-23 13:35:27 -04:00
Zacqary Adam Xeper 3c66662630
[Metrics Alerts] Remove metric field from doc count on backend (#60679)
* Remove metric field from doc count on backend

* Fix tests

* Type fix

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 12:33:00 -05:00
Andrew Cholakian 8143c078b6
[Uptime] Skip failing location test temporarily (#60938) 2020-03-23 12:54:49 -04:00
James Gowdy de7151e204
[ML] Disabling datafeed editing when job is running (#60751)
* [ML] Disabling datafeed editing when job is running

* changing variable

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 16:40:56 +00:00
Mike Côté 91e8e3e883
Adding authc.invalidateAPIKeyAsInternalUser (#60717)
* Initial work

* Fix type check issues

* Fix test failures

* Fix ESLint issues

* Add back comment

* PR feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 12:39:55 -04:00
Ryland Herrick 21e8cea183
[SIEM] Add license check to ML Rule form (#60691)
* Gate ML Rules behind a license check

If they don't have a Platinum or Trial license, then we disable the ML
Card and provide them a link to the subscriptions marketing page.

* Add aria-describedby for new ML input fields

* Add data-test-subj to new ML input fields

* Remove unused prop

This is already passed as isLoading

* Fix capitalization on translation id

* Declare defaulted props as optional

* Gray out entire ML card when ML Rules are disabled

If we're editing an existing rule, or if the user has an insufficient
license, we disable both the card and its selectability. This is more
visually striking, and a more obvious CTA.
2020-03-23 11:10:40 -05:00
Brandon Kobel cca23c26fc
Adding authc.grantAPIKeyAsInternalUser (#60423)
* Parsing the Authorization HTTP header to grant API keys

* Using HTTPAuthorizationHeader and BasicHTTPAuthorizationHeaderCredentials

* Adding tests for grantAPIKey

* Adding http_authentication/ folder

* Removing test route

* Using new classes to create the headers we pass to ES

* No longer .toLowerCase() when parsing the scheme from the request

* Updating snapshots

* Update x-pack/plugins/security/server/authentication/http_authentication/http_authorization_header.ts

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

* Updating another inline snapshot

* Adding JSDoc

* Renaming `grant` to `grantAsInternalUser`

* Adding forgotten test. Fixing snapshot

* Fixing mock

* Apply suggestions from code review

Co-Authored-By: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-Authored-By: Mike Côté <mikecote@users.noreply.github.com>

* Using new classes for changing password

* Removing unneeded asScoped call

Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
2020-03-23 09:03:13 -07:00
Devon Thomson 05c995a939
Support Histogram Data Type (#59387)
Added the histogram field type to Kibana, to be used in the percentiles, percentiles ranks, and median aggregations.
2020-03-23 11:53:51 -04:00
Jean-Louis Leysens 938ad37640
[Upgrade Assistant] Fix edge case where reindex op can falsely be seen as stale (#60770)
* Fix edge case where reindex op is can falsely be seen as stale

This is for multiple Kibana workers, to ensure that an item just
coming off the queue is seen as "new" we set a "startedAt" field
which will update the reindex op and give it the full timeout
window.

* Update tests to use new api too

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 16:47:49 +01:00
Steph Milovic 969811eb20
[SIEM] [Cases] Update case icons (#60812) 2020-03-23 09:42:35 -06:00
Daniil Suleiman 1b583a2e27
[TSVB] Fix percentiles band mode (#60741)
* Fix percentiles band mode

* Add support of bar chart, fix tests

* Use accessor formatters

* Fix tests
2020-03-23 18:42:04 +03:00
Wylie Conlon 85615bdb3f
Fix formatter on range aggregation (#58651)
* Fix formatter on range aggregation

* Fix test that was using unformatted byte ranges

* Fix test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 11:32:07 -04:00
Luke Elmers 3401ae42e0
Goodbye, legacy data plugin 👋 (#60449) 2020-03-23 09:17:27 -06:00
Phillip Burch a790877694
[Metrics UI] Alerting for metrics explorer and inventory (#58779)
* Add flyout with expressions

* Integrate frontend with backend

* Extended AlertContextValue with metadata optional property

* Progress

* Pre-fill criteria with current page filters

* Better validation. Naming for clarity

* Fix types for flyout

* Respect the groupby property in metric explorer

* Fix lint errors

* Fix text, add toast notifications

* Fix tests. Make sure update handles predefined expressions

* Dynamically load source from alert flyout

* Remove unused import

* Simplify and add group by functionality

* Remove unecessary useEffect

* disable exhastive deps

* Remove unecessary useEffect

* change language

* Implement design feedback

* Add alert dropdown to the header and snapshot screen

* Remove icon

* Remove unused props. Code cleanup

* Remove unused values

* Fix formatted message id

* Remove create alert option for now.

* Fix type issue

* Add rate, card and count as aggs

* Fix types

Co-authored-by: Yuliia Naumenko <yuliia.naumenko@elastic.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Henry Harding <henry.harding@elastic.co>
2020-03-23 10:02:11 -05:00
Alison Goryachev 8572e3f18f
[Remote clustersadopt changes to remote info API (#60795) 2020-03-23 10:42:40 -04:00
Brian Seeders 42539a56eb
Only run xpack siem cypress in PRs when there are siem changes (#60661) 2020-03-23 10:30:14 -04:00
Brian Seeders c22dbb1764
[CI] Add error steps and help links to PR comments (#60772) 2020-03-23 10:29:33 -04:00
Dmitry Lemeshko c7b0ade01d
skip flaky functional test (#60898) 2020-03-23 17:06:19 +03:00
Gidi Meir Morris a5aafc039d
[Alerting] Fixes mistake in empty list assertion (#60896) 2020-03-23 13:56:26 +00:00
Bhavya RM e235321903
a11y tests for login and logout (#60799)
a11y login screen
2020-03-23 09:45:19 -04:00
Gidi Meir Morris 7dc45f5441
removed boom errors from AlertNavigationRegistry (#60887) 2020-03-23 13:12:53 +00:00