Commit graph

797 commits

Author SHA1 Message Date
Nathan Reese
14a8192f0a
[Maps] add migration to switch tile layers with EMS_TMS source to vector tile layer (#43777)
* [Maps] add migration to switch tile layers with EMS_TMS source to vector tile layers

* update migration on sample data saved objects since they have already been migrated

* update jest test expect
2019-08-24 07:15:54 -06:00
Alison Goryachev
bd686f3a2d
[IM] Index templates form wizard (#42457) 2019-08-23 16:03:56 -04:00
Gidi Meir Morris
e8c50c0cfb
[Alerting] Adds a builtin action for triggering webhooks (#43538)
Adds the ability to trigger webhooks using an action.

This feature is currently locked off while we figure out the right privileges model.
2019-08-23 19:42:25 +01:00
Larry Gregory
6a9844c223
Spaces - Copy Saved Objects to Spaces UI (#39002) 2019-08-23 14:24:53 -04:00
Spencer
69755e0d2f
[ftr/services/pipelineEditor] use retry.waitFor() (#43704)
* [ftr/services/pipelineEditor] use retry.waitFor()

* run x-pack-firefoxSmoke 40 times
2019-08-22 12:45:25 -07:00
Dario Gieselaar
0c754e3d89
[APM] parse _debug query parameter from JSON before validating (#43744) 2019-08-22 21:25:44 +02:00
Mengwei Ding
c4f483a394
[Code]: exclude from getting write privilege when choosing all (#43700)
* [Code]: exclude from getting write privilege when choosing all

* adjust api integration test

* minor change of the role name
2019-08-21 20:00:10 -07:00
Larry Gregory
608e2391d0
Copy Saved Objects to Spaces API (#38014) 2019-08-21 17:27:55 -04:00
Matt Bargar
e233e419cf
Implement saved queries and filters (#39140)
Introduces "saved queries". Saved queries are a new saved object type similar to saved searches but more limited in scope. They allow users to store the the query string in the query bar and optionally the set of filters and timefilter in order to reload them anywhere a query is expected: Discover, Visualize, Dashboard, anywhere that uses our full SearchBar component.
2019-08-21 16:53:19 -04:00
Josh Dover
5071c74945
Replace CSP 'nonce-<base64>' directive with 'self' directive (#43553) 2019-08-21 14:11:38 -05:00
Mike Côté
90532673fd
Add spaces only tests for alerting and actions (#43616)
* Add spaces only tests

* Rename some tests to make more sense in spaces only context

* Modify test suite titles

* Apply changes from master

* Loop only one scenario for now

* Reduce amount of tests spaces_only runs

* Fix failing test

* Remove looping in spaces only tests
2019-08-21 13:23:06 -04:00
spalger
e4a72e4aa8 skip flaky test suite (#43557) 2019-08-21 08:47:47 -07:00
spalger
10c4b3e609 skip flaky test (#39163) 2019-08-21 08:45:42 -07:00
Dario Gieselaar
4d54b5fa5e
[APM] migrate to io-ts (#42961)
* [APM] migrate to io-ts

* Migrate remaining routes to io-ts

* Infer response type for useFetcher()

* Review feedback

* Use createRangeType util

* Extract & test runtime types

* Simplify runtime types

* Tests for createApi and callApmApi

* Use more readable variable names in runtime types

* Remove UIFilters query param for API endpoints where it is not supported

* Fix issues w/ default parameters in create_api
2019-08-21 15:51:41 +02:00
Gidi Meir Morris
21c4430d0e
[Alerting] Refactored External Service Simulators (#43570) 2019-08-21 10:01:28 +01:00
Mengwei Ding
ec6d067a32
[Code] fix functional test (#43599) 2019-08-20 14:55:16 -07:00
Mike Côté
bb6aa330e8
Disable security plugin in spaces only test suite (#43608) 2019-08-20 17:00:31 -04:00
Aaron Caldwell
f3cbaf322b
[Maps] Change border color to be darker version of fill color (#43211)
* Change border color to be darker version of fill color. Pass default colors to color picker swatches

* Fix bug preventing last color from ever being used

* Update line/stroke colors in functional tests

* Fill out default colors with eui vis palette colors. Add black & white to border colors

* Move default colors to color utils and use eui color palette per feedback

* Remove old defaults and update imports

* Update join test to omit color from test since it will change
2019-08-20 13:33:03 -06:00
Mike Côté
5734f1c1be
Add security support for alerts and actions (#41389)
* Initial work

* Cleanup add createAPIKey fn pt1

* Change getServices function to take request as parameter

* Use API key when executing alerts

* Revert task manager using encrypted saved objects

* Store fired actions within a saved object to encrypt API keys

* Fix fireActionId

* Cleanup code, fix type check error

* Add a type for getScopedSavedObjectsClient

* Fix getBasePath and spaceIdToNamespace functions

* Add safety check for API key and action

* Fix integration tests

* Fix broken jest tests

* Cleanup

* Rename generatedApiKey to apiKeyValue

* Ensure access to action record

* Cleanup

* Add unit tests

* Fix variable conflict

* Revert task manager specific code (no longer needed)

* Remove fire terminology

* Move tests to spaces and security folder

* Use ES Archiver to remove spaces (empty_kibana)

* Fix missing pieces

* Convert action tests to run per user

* Convert alerting tests to run per user

* Fix type check issue

* Fix failing test

* Add callCluster and savedObjectsClient authorization tests

* Make savedObjectsClient return 403 for authorization tests

* Cleanup

* Fix test failure

* Common function to get data from test index

* Create ObjectRemover

* Cleanup

* useApiKey now provided to functions instead of relying on condition of two strings

* Fix typo

* Make tests it(...) start with should

* Rename useApiKey to isSecurityEnabled

* Merge apiKeyId and apiKeyValue into one

* Update docs

* Use feature controls for list alert / action types API

* Remove need to add ! in TypeScript for required plugins

* Fix ESLint issue

* Include actions and alertTypeParams into AAD and genereate new API key on update

* Generate random id for API key name attribute

* Include interval in AAD

* Send pre-encoded string

* Fix ExecutorError

* Fix apiKey snapshot

* Fix 'default' typo

* De-compose apiKey

* Refresh API key when enabling / disabling an alert

* Add updatedBy

* Make unauthorized APIs return 404
2019-08-20 11:42:15 -04:00
Dario Gieselaar
53063d532c
[APM] Make aggregations optional in ES response type definition (#43451)
* [APM] Make aggregations optional in ES response type definition

Closes #43436.

Our type definition for ElasticSearch aggregations suggests that the aggregations key will always be defined if we request aggregations. However, that is not the case, as there is an edge case where if no matching indices were found, the aggregations key will be undefined.

* Review feedback

* Support undefined values in number formatters

* Expect 200s for all API requests even without matching indices

* Bail early for asDynamicBytes as well
2019-08-20 08:32:11 +02:00
spalger
9056dc41ad disable flaky test (#43492) 2019-08-18 22:48:58 -07:00
spalger
ae855534ef disable flaky test (#37859) 2019-08-16 14:20:07 -07:00
Aleh Zasypkin
36b1760481
Properly validate current user password during password change. (#43447) 2019-08-16 20:58:55 +02:00
Larry Gregory
b8303e4cb1
Spaces - allow for hex color codes that include uppercase characters (#43470)
* allow for mixed case hex codes

* remove stray newline

* lint and style improvements
2019-08-16 14:36:46 -04:00
WangQianliang
750b446149
[Code] fix flaky functional test (#42906)
* fix(code/frontend): fix flaky functional test
2019-08-16 11:34:47 +08:00
WangQianliang
c3d421fcc4
[Code] run test on both chrome and firefox (#42663)
* fix(code/frontend): run test on both chrome and firefox
2019-08-16 11:30:41 +08:00
Nathan Reese
c6335656d1
[Maps] custom color ramp (#41603)
* [Maps] custom color ramp

* round value down to find center color

* do not update redux state with invalide color stops

* rename EuiColorStop to ColorStop

* remove untracked file

* fix jest tests

* review feedback

* use steps instead of interpolate

* add percy functional test to verify rendering of interpolate and step color expressions

* add padding to color stop row so add/remove icons do not overlap color select
2019-08-15 12:21:28 -06:00
Spencer
b2515c780d
[watcher] add missing await (#41351)
* [watcher] add missing await

* run x-pack-firefoxSmoke ciGroup 40 times, run watcher tests 20 times per job

* Fix failing watcher test

* Revert "run x-pack-firefoxSmoke ciGroup 40 times, run watcher tests 20 times per job"

This reverts commit c5d891d44d.

* Clean up watches via api

* fix linting errors

* don't swallow errors, wait for completion

* strip trailing numbers in suite tags

* run x-pack-firefoxSmoke group 40 times

* Revert "run x-pack-firefoxSmoke group 40 times"

This reverts commit cc4eb6ce54.

* run x-pack-firefoxSmoke group 40 times

# Conflicts:
#	.ci/jobs.yml

* run tests 80 times

* Revert "run tests 80 times"

This reverts commit 4320c9488a.

* Revert "run x-pack-firefoxSmoke group 40 times"

This reverts commit cf0d4056d7.
2019-08-15 10:49:36 -07:00
Chris Roberson
cb2dd9f006
[Monitoring] Metricbeat migration improvements (#42600)
* Support for logstash

* Beats support

* Fix cherry-pick api issue

* Support for logstash

* Updates for beats and logstash

* APM migration working

* Tweaks for beats migration

* Update copy for setup new button

* If on cloud, disable setup mode

* Handle new beat flow better

* Better phrasing for APM

* Add beat type to disable step

* Fix i18n issue

* Fix jest tests

* Fix api tests

* PR feedback

* Update copy

* Remove unnecessary code

* Support shortcut to finish ES migration if we are on the connected cluster

* Undo changes that are now in a separate PR

* Share code better by exposing a single route with an optional parameter

* Disable more links

* Fix overview link for logstash

* PR feedback

* Fix tests

* PR feedback

* Fix tests

* We still need this route

* Updates

* Only show if there are instances too

* Change how we set the newly discovered cluster uuid

* Move this to support beats/apm weirdness

* Fix tests

* Remove out of date translations

* PR feedback

* Detect products a different way, to detect empty indices

* Look against the production cluster instead of the monitoring one

* When disabling ES internal collection, only disable ES - do not disable all internal collection
2019-08-15 12:14:22 -04:00
spalger
c65b9752cb disable flaky tests (#43017) 2019-08-14 11:12:47 -07:00
Chris Cowan
4a1f41ece6
[Infra UI] Add APM to Metadata Endpoint (#42197)
* [Infra UI] Add APM to Metadata Endpoint

- Adds APM feature to metadata
- Closes #42167
- Based on #41836

* migrating to new http api
2019-08-14 08:16:44 -07:00
Tim Sullivan
94a35cdb9d
[Reporting/API Testing] Simplify config (#43216)
- Remove injection of `x-pack/test/functional/config.js`
- No more starting the optimizer when running thees tests
2019-08-13 17:42:12 -07:00
Patrick Mueller
65b83409d6
Changes references of "fire" to "execute" in actions (#43140)
In the actions plugin, references to "fire" have been changed to "execute".  A few changes were also required in alerting.
2019-08-13 11:48:37 -04:00
Spencer
c29a17ce3c
[ftr] enable visualRegression jobs (#42989)
* enable visualRegression jobs

* skip the console and login visual tests
2019-08-12 10:50:22 -07:00
Mike Côté
d113d4c0c1
Move alerting tests into own folder (#43061)
* Move alerting tests into own folder

* Use ciGroup8

* Fix test failures
2019-08-12 09:28:10 -04:00
Vadim Dalecky
ece2c35de1
Embeddables 👉 NP-ready (#41272)
* refactor: 💡 create registries file

* docs: ✏️ add testing command to docs

* chore: 🤖 create state folder

* chore: 🤖 WIP

* refactor: 💡 remove static imports of stateful things

Make Embeddables ./triggers tests pass

* test: 💍 add await-of for testing

* refactor: 💡 move stateless code into shim's lib/ folder

* test: 💍 add registry tests

* feat: 🎸 add Embeddable plugin public "setup" API

* feat: 🎸 create Embeddable plugin shim

* refactor: 💡 minor improvements for new plugin structure

* refactor: 💡 move test helpers into shim

* feat: 🎸 add Embeddable setup.getTrigger() method

* feat: 🎸 inject setup API into pure setup functions

* refactor: 💡 generate Embeddable setup API in a loop

* feat: 🎸 add getTriggerActions() Embeddable setup function

* feat: 🎸 add getTriggerCompatibleActions() to Embeddable shim

* chore: 🤖 uninstall await-of package

* chore: 🤖 simplify imports/exports

* test: 💍 improve testing utilities

* feat: 🎸 add executeTriggerActions() Embeddables setup method

* fix: 🐛 remove non-existing import

* chore: 🤖 cleanup actions

* refactor: 💡 move errors into dedicated errors.ts file, add test

* test: 💍 add unit test for ApplyFilterAction class

* test: 💍 import helpers correctly after refactoring

* test: 💍 fix actions tests

* feat: 🎸 clean up /lib/embeddables

* test: 💍 fix /lib/containers tests

* test: 💍 make embeddable_panel.test.tsx tests pass

* refactor: 💡 work on briging EditPanelAction action to /actions

* test: 💍 make /containers tests pass

* test: 💍 make /actions and /embeddables tests pass

* test: 💍 clean up tests from legacy platform static imports

* feat: 🎸 add getEmbeddableFactories API method

* test: 💍 add tests for factory list method

* feat: 🎸 add start life-cycle API

* feat: 🎸 unify Embeddables API

* refactor: 💡 create /css folder, move all CSS there

* feat: 🎸 improve dashboard container shim

* feat: 🎸 progress on dashboard container shim

* feat: 🎸 implement getEmbeddableFactory Embeddable API method

* feat: 🎸 improve embeddable container shim

* test: 💍 fix dashboard container expand panel tests

* test: 💍 fix dashboard grid tests

* test: 💍 fix createPanel tests

* test: 💍 fix dashboard viewport tests

* test: 💍 fix dashboard container tests

* test: 💍 add Embeddable plugin mock

* test: 💍 improve tests after merge

* refactor: 💡 move new platform code into np_ready folders

* chore: 🤖 fix some TS errors after merge

* chore: 🤖 fix more TS errors after merge

* fix: 🐛 fix TypeScript errors in kbn_tp_sample_panel_action

* fix: 🐛 fix more TypeScript errors

* fix: 🐛 fix TypeScript in functional tests

* fix: 🐛 fix more TypeScript errors

* fix: 🐛 fix more TS errors

* refactor: 💡 pass deps through constructors

* refactor: 💡 improve dependency injection and fix tests

* test: 💍 fix container integration tests

* test: 💍 fix customize_panel_modal tests after refactor

* test: 💍 fix all tests in embeddable_api

* chore: 🤖 fix linter error

* test: 💍 fix dashboard_embeddable_container tests after merge

* test: 💍 fix /src TypeScript errors

* fix: 🐛 fix Jest tests and add global typings in demo plugin

* fix: 🐛 fix build errors

* fix: 🐛 make build start without errors

* fix: 🐛 in dashboard container don't import types from ui/*

* chore: 🤖 fix linter errors

* refactor: 💡 remove getUserData, remove another ui/new_platform

* chore: 🤖 fix linter errors

* refactor: 💡 remove ui/new_platform from HelloWorldAction

* refactor: 💡 remove ui/new_platform from SendMessageAction

* refactor: 💡 remove ui/new_platform from ContactCardEmbeddableF*

* chore: 🤖 fix ESLint errors

* feat: 🎸 throw if action or trigger with given ID already exists

* feat: 🎸 throw if embeddable factory already registered

* docs: ✏️ fix tsdoc

* chore: 🤖 remove unused @ts-ignore

* refactor: 💡 remove createEmbeddables() function

* refactor: 💡 use new NP inspector plugin

* fix: 🐛 fix TypeScript errors

* chore: 🤖 improve plugin manifests

* feat: 🎸 cherry pick exported API from Embeddable plugin

* refactor: 💡 do not import constants from Kibana App

* fix: 🐛 remove unnecessary any

* chore: 🤖 uncomment SASS files

* refactor: 💡 remove IndexPattern logic out of dashboard panel

* refactor: 💡 move RefreshInterval and TimeRange to New Platform

* fix: 🐛 revert back notifications usage

* chore: 🤖 export test samples from index.ts files

* test: 💍 re-enable ApplyFilterAction integration tests

* chore: 🤖 remove unused translation

* refactor: 💡 rename variable to something less React specific

* fix: 🐛 improve CSS imports, remove unused hack, remove any type

* fix: 🐛 fix Embeddables demo plugin

* fix: 🐛 fix missing SASS variable

* fix: 🐛 re-enable translation

* fix: 🐛 uncomment saved object flyout panel logic

* refactor: 💡 pass in <SavedObjectFinder> from top level

* test: 💍 re-enable add_panel_flyout tests

* refactor: 💡 pass in <ExitFullScreenButton> through args

* fix: 🐛 import specific constants to fix functional tests

* fix: 🐛 fix CI type_check error

* test: 💍 change import paths to fix functional tests on CI

* test: 💍 fix exit button test after refactoring

* refactor: 💡 make do not change page on grid error

* test: 💍 fix functional test

* refactor: 💡 move CSS next to components

* fix: 🐛 remove missing props

* test: 💍 try fixing functional test on CI

These tests pass locally, but fail on CI. This is a stab to fix it on
CI.

* refactor: 💡 move variables.scss one folder up

* test: 💍 disable Embeddable Explorer functional tests

* chore: 🤖 remove onCoreReady in functional tests

* test: 💍 disable maps functional test for embeddables

* chore: 🤖 remove comment, export types explicitly

* refactor: 💡 remove unused `firstName`, add link to issue

* refactor: 💡 remove double underscore __ in test registry names

* refactor: 💡 remove utils folder, move bootstrap() fn to top lvl

* test: 💍 uncomment edit_panel_action tests

* test: 💍 uncomment inspect_panel_action tests
2019-08-12 12:41:18 +02:00
Brandon Kobel
2ce2bfbca7
Adding "style-src 'unsafe-inline' 'self'" to default CSP rules (#41305)
* Adding "style-src 'unsafe-inline' 'self'" to default CSP rules

* Updating jest snapshot

* Fixing api integration smoke test

* Verifying all CSP responses

* Fixing OIDC implicit flow test
2019-08-09 15:15:40 -07:00
Bill McConaghy
5e76040369
fixing issue with dashboard csv download (#42964)
* fixing issue with dashboard csv download

* fixing test fixture to match new sort storage format for saved searches

* fixing sort in additional fixtures
2019-08-09 15:20:19 -04:00
Mike Côté
f41147020a
Expose task manager as plugin instead of server argument (#42966)
* Expose task manager as plugin instead of server attribute

* Cleanup

* Fix typo
2019-08-09 15:17:32 -04:00
Kerry Gallagher
abe56c2182
[Logs UI] Show highlighted log entries in the minimap (#40745)
* Commit to allow opening the PR

* Add start of the highlights menu

* Add terms input

* Add a container for highlights state

* Start to hook up highlights state effects, and Bridge with Redux

* Move highlighted logs to a separate graphql field

* Add highlights argument to unit tests

* Add initial draft of a log highlights hook

* Finish hooking up hook state ready for GraphQL query

* Take startKey and endKey from overall collection of log entries

* Add sourceVersion

* Fetch the data

* Use columns ids instead of column indices

* merge highlights into stream WIP

* Add highlighting for the message column type

* Use the serialized filter query

* UX / Performance improvements

* Show a highlight is active
* Focus input when menu is opened
* Icon for highlights menu
* Debounce onChange handler
* Loading state for highlights menu
* Neaten up Provider

* Tweaks

* Breathing room for icon
* Better debounce time for typing

* Menu changes

* Ensure width of popover stays consistent
* Add a button to clear highlights

* Add highlighting for field columns

* Use phrase query for highlighting

While a `phrase_prefix` query feels more natural, it doesn't work on
`keyword` type fields. Using just a `phrase` query keeps the
highlighting consistent between text and keyword type fields.

* Factor out commonly used visibility state

* Fix debounce to support changing onChange prop

* Move clear highlight button inline

* Translate labels

* Rely on popover ownfocus prop to focus the input

* Rename function to avoid i18n checker false positive

* Rough and ready WIP next / previous

* Add `countBefore` and `countAfter` highlight args

* Fix value used

* Add a check for entry

* Rearrange icons

* 0 falsey blurgh

* Organise into separate sub-hooks for clarity

* Add comment

* Use filter and highlight queries also beyond interval

* Refine behaviour of next / previous

* Stops wrapping
* Ensures that when scrolling next / previous takes off where it was left
* Ensures the first highlight is scrolled to when changing highlight term

* Add log highlights api tests

* Fix a few runtime and compiler errors and linter warnings

* Refactor prev/next jumping to avoid index errors

* Use nearest index for initial jump

* Include element type in translation id

* Disable clear button when nothing to clear

* Initial summary highlights state

* Amend component usage

* Comment out load call until query exists

* Add graphql api for summary highlights

* Add the client-side log summary highlight query

* Directly use log view configuration without a bridge

* Rename log entry highlight hook to maintain symmetry

* Re-enable highlight rendering in the minimap

* Keep the time cursor from intercepting clicks

* tweak minimap highlighting colors and interaction

* Clean up after merge

* Remove commented-out code

* Change cursor to hint at minimap highlighting interaction

* Restrict highlight query filter to relevant fields

* Add explanatory error message
2019-08-09 16:29:48 +01:00
Aleh Zasypkin
0d31f52bb8
Add support for OpenID Connect implicit authentication flow. (#42069) 2019-08-08 15:39:15 +02:00
spalger
492ade3d77 skip flaky test (#42696) 2019-08-08 06:31:04 -07:00
Felix Stürmer
b306d76a96
[Logs UI] Add ML job results APIs (#42356)
This PR adds a route that can be used to fetch the log entry rate anomaly job results when a corresponding job has been set up.
2019-08-08 14:38:41 +02:00
Nathan Reese
80f72b5d22
[Maps] add filter bar to maps application (#42756)
* [Maps] add filter bar to maps application

* map and merge filters

* add functional test for loading maps with filters

* use filterManager instead of internals

* remove data.filter.filterManager reassignment
2019-08-07 17:48:41 -06:00
Chris Roberson
36f0d41133
[Monitoring] Only fetch a single cluster data instead of all clusters when possible (#42469)
* Fetch a single cluster if it's in the global state

* Potential solution

* PR feedback

* Fix tests
2019-08-07 16:05:03 -04:00
Aaron Caldwell
d64c682c75
Re-enable previously skipped geo_shape antimeridian test since upstream issue has been resolved (#42625) 2019-08-07 07:55:31 -06:00
Robert Oskamp
c9e6a2c344
[ML] Add single metric job wizard test (#42709)
This PR adds functional UI tests to create a machine learning job using the single metric wizard.
2019-08-07 12:29:55 +02:00
Mike Côté
3362572547
Scope task manager api integration tests (#42806) 2019-08-06 21:05:23 -04:00
Dmitry Lemeshko
077ae4dc65
add await for browser calls (#42515) 2019-08-06 21:58:03 +02:00
Mike Côté
b94c16da75
Fix task manager flaky middleware test (#42418)
* Fix flaky test

* Cleanup beforeEach code
2019-08-06 14:53:29 -04:00