Commit graph

30102 commits

Author SHA1 Message Date
Catherine Liu
70aa7b3c5c
Migrates ES Fields Route to NP (#54398)
* Migrated es fields route to NP and added tests

* Removed extraneous import

* Removed check for index query

* Fixed broken test
2020-01-13 10:50:00 -07:00
Maja Grubic
7543b0c7b2
[Lens][Dashboard] Adding Lens to Dashboard (#53110)
* First version of adding Lens to dashboard

* Fix failing unit test

* Replacing explicit Lens query param with a more generic one

* Fixing failing unit test

* Adding a unit test for redirect

* Do not show Save New if adding from Dashboard

* Adding functional test

* Adding functional test

* Fixing type issues

* Renaming query params

* Fixing failing unit test

* Removing unused constants

* Fixing erroneous imports

* Fixing erroneous import

* Fixing import

* Fix failing typecheck

* Removing timefilter from Dashboard URL

* Fixing type error

* Replacing time parsing with rison

* Replacing URL regex parsing with legacy URLs

* Fixing failing test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 17:38:47 +00:00
Gidi Meir Morris
e8b2b28aef
[alerting] gracefully handle error in initialization of Alert TaskRunner (#54335)
Prevents an edge cases where Alerts can end up in a zombie state.

1. Decrypting attributes throws an error
2. Fetching an Api Key throws an error
3. Getting Services with user permissions throws an error
2020-01-13 17:16:25 +00:00
Poff Poffenberger
71dfdea7ae
[Canvas] Fix expression updating bug (#54297)
* Fix expression updating bug

* Add functional test for expression editor

* Add page object helper to open expression editor

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 17:16:12 +00:00
Gidi Meir Morris
e54a7175da
pass previousStartedAt as Date into Alert executor (#54576)
Corrects how we pass previousStartedAt into Alert executor
2020-01-13 17:15:08 +00:00
Walter Rafelsberger
6826ece3b0
[ML] Fix appState/globalState (#52987)
Replaces appState/globalState with a custom hook useUrlState().
2020-01-13 18:14:36 +01:00
Brandon Kobel
8e7ea11657
Adding tests to ensure src/core/utils/merge doesn't pollute prototypes (#54511)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 08:56:01 -08:00
Corey Robertson
3ce2025c75
[CANVAS] Relax workpad schema to allow existing templates to work (#54019)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 11:53:47 -05:00
Tre' Seymour
321cbfce78 Merge branch 'master' of github.com:elastic/kibana 2020-01-13 09:52:24 -07:00
Bhavya RM
f3cdbf20ce
Discover a11y tests (#54209)
Comprehensive discover a11y tests
2020-01-13 11:14:37 -05:00
Brandon Kobel
ea4a1ac12c
Fixing the spaces header aria-controls a11y issue (#54512)
* Fixing the spaces header aria-controls a11y issue

* Updating snapshots

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 07:21:24 -08:00
Frank Hassanabad
641c67091f
[SEIM][Detection Engine] Time gap detection and logging
## Summary

This adds utilities and logging of time gap detection. Gaps happen whenever rules begin to fall behind their interval. This isn't a perfect works for all inputs and if it detects unexpected input that is not of an interval format (but could be valid date time math) it will just return null and ignore it.

This also fixes a bug with interval where we were using the object instead of the primitive since alerting team changed their structure.

For testing, fire up any rule and shutdown Kibana for more than 6 minutes and then when restarting you should see the warning message. 



### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~

~~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~~

~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~

- [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

~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

### For maintainers

~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~

- [x] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
2020-01-13 08:09:55 -07:00
Liza Katz
ebd2c2190b
Management advanced settings telemetry (#54369)
* management telemetry

* Use getUserProvided
2020-01-13 16:26:33 +02:00
Mikhail Shustov
2d62ff2cbf
[NP] Remove observables from es internal contract (#54556)
* request context always uses the latest es client

* update integration tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 15:04:06 +01:00
cachedout
05c48cf153
Display APM server memory in bytes (#54275)
* Display APM server memory in bytes

* Add tests for helpers
2020-01-13 13:42:33 +00:00
Nathan Reese
14df4c096c
[Maps] refactor isPointsOnly, isLinesOnly, and isPolygonsOnly to make synchronous (#54067)
* [Maps] refactor isPointsOnly, isLinesOnly, and isPolygonsOnly to make synchronous

* fix jest test

* review feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 07:28:39 -05:00
Jaime Soriano Pastor
e7472e2f00
Fix icon path in tutorial introduction (#49684)
Some icons are included as SVG files with relative paths to their
location. Add the base path so these files are correctly displayed when
Kibana is not running from the root path.
2020-01-13 13:25:48 +01:00
Anton Dosov
a899df3f3d
[State Management] State containers improvements (#54436)
Some maintenance and minor fixes to state containers based on experience while working with them in #53582

Patch unit tests to use current "terminology" (e.g. "transition" vs "mutation")
Fix docs where "store" was used instead of "state container"
Allow to create state container without transition.
Fix freeze function to deeply freeze objects.
Restrict State to BaseState with extends object.
in set() function, make sure the flow goes through dispatch to make sure middleware see this update
Improve type inference for useTransition()
Improve type inference for createStateContainer().

Other issues noticed, but didn't fix in reasonable time:
Can't use addMiddleware without explicit type casting #54438
Transitions and Selectors allow any state, not bind to container's state #54439
2020-01-13 13:57:26 +03:00
Jean-Louis Leysens
ccd36b3d57
Fix floating tools rendering logic (#54505)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 11:43:59 +01:00
Jean-Louis Leysens
37e3f63d0d
Handle another double quote special case (#54474)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 11:43:05 +01:00
Chris Mark
fb9907e4f0
[Home][Tutorial] Add data UI for IBM MQ Filebeat module (#54238) 2020-01-13 12:40:46 +02:00
Thomas Watson
a04048b1bb
fix(package): upgrade transitive dependency elliptic to v6.5.2 (#54476) 2020-01-13 11:35:57 +01:00
Joe Reuter
204155b4e2
[Graph] Fix various a11y issues (#54097) 2020-01-13 10:26:57 +01:00
Pierre Gayvallet
aeebedfa4d
Add ApplicationService app status management (#50223)
* add unimplemented registerAppStatusUpdater & remove observers for apps and legacyApps

* adapt NavLinksService to use new application observables

* merge availableApps$ and availableLegacyApps$

* updating core docs

* adapt the navLink updating methods

* filters the inaccessible apps from availableApps$

* restrict access to navigateToApp depending on app status

* fixes due to merge

* add statusUpdater$ to AppBase

* export new types

* disable navlink depending on app status

* update generated doc

* update snapshots for disabled prop

* Address josh review

* Address review comments

* fix merge conflicts

* adapt changes due to merge

* update generated doc

* add comment and fix navlink url for custom url apps

* add AppNavLinkStatus type to split app/navlink states

* fix typo

* review comments and improvements

* add functional tests

* update generated docs and migration guide

* fix wrong type cast on AppsMenuProvider.readLinks

* properly type return of navigateToApp
2020-01-12 22:37:42 +01:00
MadameSheema
794bb02249
logs in one time (#54447) 2020-01-12 12:25:19 +01:00
Joe Portner
80b6dd8e15
Deprecate using elasticsearch.ssl.certificate without elasticsearch.ssl.key and vice versa (#54392) 2020-01-11 15:05:28 -05:00
Chris Davies
8ef560902b
[Optimizer] Fix a stack overflow with watch_cache when it attempts to delete very large folders. (#54457) 2020-01-11 14:37:24 -05:00
Larry Gregory
e6e1373db2
Security - Role Mappings UI (#53620)
* Initial role mappings UI

* apply design edits

* address PR feedback

* fix type cast for number field

* Update x-pack/legacy/plugins/security/public/views/management/role_mappings/edit_role_mapping/components/mapping_info_panel/mapping_info_panel.tsx

Co-Authored-By: Joe Portner <5295965+jportner@users.noreply.github.com>

* Cleanup FTR configuration, and handle role mapping 404 errors properly

* align naming of role mappings feature check

* Apply suggestions from code review

Co-Authored-By: Brandon Kobel <brandon.kobel@gmail.com>

* add missing test assertions

* inlining feature check logic

* switch to using snapshot

* use href instead of onClick

* adding delete unit test

* consolidate href building

* unify page load error handling

* simplify initial loading state

* documenting unconditional catch blocks

* use nodes.info instead of transport.request

* Apply suggestions from code review

Co-Authored-By: Brandon Kobel <brandon.kobel@gmail.com>

* move model out of LP into NP

* convert except_field_rule to except_any_rule

* docs, take 1

* update gif

Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-11 13:26:31 -05:00
Xavier Mouligneau
b057f18d16
[SIEM] [Detection engine] Permission II (#54292)
* allow read only user with no CRUD

* use ../../lib/kibana

* fix timeline-template

* add re-routing on page

* bug

* cleanup

* review I

* review II

* a pretty shameful bug I will live thanks Frank

* bug select rule

* only activate deactivate if user has the manage permission

* add permissions rule with manage api key

* bug on batch action for rules

* add permissions to write status on signal
2020-01-11 08:19:01 -05:00
John Dorlus
10733b5415
Allow User to Cleanup Repository from UI (#53047)
* Added repository cleanup button. Added logic for spinner while loading, added new repository request, type and telemetry metric.

* Added additional bindings for server side to hit the cleanup endpoint.

* fix cleanup request

* Added data test subject to the code editors to differentiate them and fixed a broken inport of RepositoryCleanup.

* Added files for a component integration test. The tests are failing right now so we need to get those green. Added a functional test. Need to set up kbn-es to be able to set up a file repository before being able to run the functional tests.

* Added change to the way data-test-subjects were created for the repository list table so that columns can be individually identified. Added functional test to allow checking the details of repositories.

* Removed the jest tests for repository details until we get jest fixed.

* Fixed jest test to reflect updated test subjects.

* Made changes per feedback in PR comments.

* Fixed i10n issues using <FormattedMessage>. Removed reference to blueBird and used Promise.all(). Fixed all nits in PR comments.

* Added i10n fixes for header.

* Added i10n fixes for header.

* Added name parameter for i18n strings.

* Removed i18n string from JSON.stringify call since it's already a string.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
2020-01-11 02:51:35 -05:00
Xavier Mouligneau
51e51ca434
[Detection engine] Some UX for rule creation (#54471)
* wip

* update timelien select to design

* Rename label to design
Timeline Select match design with favorite
Now, you are able to add mutiple items for url and false positive
Add tm for Mitre Att&ck (tnaks Frank)
And match mitre selection to design

* cleanup with michael

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-10 17:37:38 -05:00
Spencer
357be5970d
share specific instances of some ui packages (#54079)
* share specific instances of some ui packages

* remove unnecessary eslint changes, every package will define deps anyway

* remove mentions of moment webpackShims in eslint resolver

* remove use of lodash

* list angular as dep for x-pack

* add operations as codeowner of shared-deps pkg
2020-01-10 15:22:18 -07:00
Dima Arnautov
51c1a8f805
[ML] APM modules configs for RUM Javascript and NodeJS (#53792)
* [ML] apm modules

* [ML] apm modules

* [ML] update mocha test

* [ML] fix config

* [ML] single line JSON formatting for queries

* [ML] remove an empty path component with a trailing slash

* [ML] change detector descriptions, remove scroll size

* [ML] remove chunking_config from datafeeds

* [ML] fix configs

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-10 23:19:26 +01:00
Dario Gieselaar
c87ba85141
[APM] Delay rendering invalid license notification (#53924)
* [APM] Delay rendering invalid license notification

Don't render an invalid license notification if the license information has not been loaded. (Don't render any UI either).

* Show UI if license has not loaded
2020-01-10 22:07:55 +01:00
Joe Reuter
d459270be2
[Graph] Improve error message on graph requests (#54230) 2020-01-10 22:00:49 +01:00
Jimmy Kuang
63d0bf84c8 [ILM] Kibana should allow a min_age setting of 0ms in ILM policy phases (#53719) 2020-01-10 15:22:13 -05:00
Tim Schnell
c9e4304770
Unit Tests for common/lib (#53736)
* converting mocha tests to jest

* adding a few lib tests

* adding more lib tests

* moving test files and adding autocomplete tests

* updating test definition

* fixing import and test definitions
2020-01-10 14:02:11 -06:00
Joe Reuter
51e07f27f2
[Graph] Only show explorable fields (#54101) 2020-01-10 20:34:15 +01:00
Joe Reuter
07278aba37
remove linting rule exception for markdown (#54232) 2020-01-10 20:30:03 +01:00
Chris Roberson
bf7c25332e
[Monitoring] Fetch shard data more efficiently (#54028)
* For the nodes listing page, do not fetch shard data for indices

* Optimize our shard queries for the index and node listing pages

* This change isn't necessary

* Rename file and function

* Use optimized query for ml jobs and es overview

* Apply to node/index detail page, and more renaming

* Unnecessary change

* Fix tests

* Add basic tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-10 14:06:54 -05:00
Corey Robertson
934d6b3eeb
[Maps] Add hiddenLayers option to embeddable map input (#54355)
* Add hiddenLayers option to embeddable map input

* Move hiddenLayers logic to actions and reducers. Adds Documentation

* Address code review suggestions
2020-01-10 12:58:37 -05:00
CJ Cenizal
2e3ce5c0f8
Pass termOrder and hasTermsAgg properties to serializeThresholdWatch function (#54391)
* Fix Watcher regression in which a threshold watch's termOrder and hasTermsAgg properties weren't being passed to the serializeThresholdWatch function.
* Remove unused upstreamJson getter method from server models.
2020-01-10 09:53:06 -08:00
Josh Dover
9decc43c5a
Add support for workspaces in NP x-pack plugins (#53825) 2020-01-10 11:31:36 -06:00
Josh Dover
0951faa0c7
Add testing document [skip-ci] (#53514) 2020-01-10 10:49:06 -06:00
James Gowdy
1a3aef0d21
[ML] Job validation loading spinner (#54450)
* [ML] Job validation loading spinner

* adding to modal version

* updating snapshots
2020-01-10 16:26:23 +00:00
Justin Kambic
aa9126ec04
[Uptime] Add tags dropdown to Overview filters group (#50837)
* Finish implementing snapshot count redux code.

* Replace GQL-powered Snapshot export with Redux/Rest-powered version.

* Add tests for Snapshot API call.

* Rename new test file from tsx to ts, it has no JSX.

* Rename outdated snapshot file.

* Update filter groups to use redux and add tags dropdown.

* Delete obsolete graphql filter bar query.

* Add fetch effect factory.

* Use generic fetch effect factory to avoid code redundancy.

* Infer isDisabled status from data for filter group buttons and disable when there are no items.

* Fix removal of overview filter from previous rebase.

* Rename generator-related functions from *saga to *effect.

* WIP trying to make filters filterable.

* WIP cleaning up.

* Delete obsolete API test.

* Add API test for filters endpoint.

* Remove obsolete fields from overview filters.

* Add functional testing attributes and delete a comment for filter popover.

* Update obsolete unit test snapshots and test props for filter popover.

* Fix broken types and delete obsolete test snapshots for filters api call.

* Modify filters endpoint to adhere to np routing contracts.

* Add functional test and associated helper functions for filters API.

* Remove obsolete resolver function for filter bar.

* Remove obsolete FilterBar type from graphql schema.

* Delete static types generated for obsolete GQL schema types.

* Delete obsolete fields from default filters state.

* Delete obsolete method from graphql schema.

* Add default values to unit test that requires complete app state mock.

* Extract helper logic to dedicated module.

* Finish working on adapter/helper tests.

* Add state field for overview page search query.

* Apply search kuery to filters.

* Simplify creation of overview filter fetch actions and API call.

* Add tests for overview filter action creators.

* Simplify api query parameterizaton.

* Improve a variable name.

* Update formatting of file.

* Improve a variable name.

* Improve a variable name.

* Simplify API endpoint typing.

* Clean up helper code and rename some functions/vars.

* Clean up parameterization of filter values.

* Move function from dedicated file back to calling file.

* Clean up naming in a function.

* Move function from dedicated file to caller's file.

* Modify interface of function return value.

* Have function throw error when it receives invalid input instead of returning empty object.

* Extract constant value to dedicated function value and remove parameter from function.

* Clean up object declarations.

* Rename a property.

* Fix issue where function was not handling empty input.

* Delete unnecessary snapshots.

* Add message to internal server error response.

* Fix broken type.

* Delete type that was added as a result of a merge error.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-10 11:15:20 -05:00
nnamdifrankie
1d4c2f6ca1
EMT-65:always return accurate endpoint count (#54423)
EMT-65:always return accurate endpoint count, independent of paging properties
2020-01-10 11:08:11 -05:00
John Trengrove
487c096c41 [DOCS] Clarify TSVB support rollups (#54417) 2020-01-10 08:02:55 -08:00
Joe Reuter
6cbfa8ee3e
Improve kql error message handling and avoid fetcihng twice (#54239) 2020-01-10 16:53:24 +01:00
Pierre Gayvallet
d8f94b1792
fix request validation to accept arrays or primitives (#54331) 2020-01-10 15:48:23 +01:00