Commit graph

3843 commits

Author SHA1 Message Date
Mikhail Shustov 78ebb6250a
remove top-nav. it is not rendered in KP (#69488)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-24 13:24:53 +02:00
Joe Reuter d1a6fa26b8
Properly redirect legacy URLs (#68284) 2020-06-24 11:26:19 +02:00
Josh Dover 200957bb63
Add plugin API for customizing the logging configuration (#68704) 2020-06-23 14:45:47 -06:00
Matthias Wilhelm cc893f3da4
[Discover] Unskip context navigation functional test (#68771) 2020-06-23 16:02:22 +02:00
Spencer 051c93a6be
[ftr] add support for docker servers (#68173)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-06-18 15:24:16 -07:00
Aaron Caldwell 55a73616ab
[Maps] Migrate maps client router to react (#65079)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-18 12:56:51 -06:00
Mikhail Shustov c8c20e4ca8
Add functional test for Kibana embedded in iframe (#68544)
* convert kbn test config into TS

* add test  for Kibana embedded in iframe

* run embedded tests in functional suite

* ignore tls errors in functional tests by default

* switch test to https

* remove env vars mutation

* allow to pass ssl config to Kibana

* pass ssl config to axios

* adopt KbnClient interfaces

* adopt KibanaServer

* use KbnRequester in security service

* set sameSiteCookies:None in test

* acceptInsecureCerts in chrome

* remove leftovers

* fix type error

* remove unnecessary field

* address comments

* refactor plugin

* refactor test

* make acceptInsecureCerts configurable

* run firefox tests on ci

* up TS version

* fix firefox.sh script

* fix path

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-18 12:02:56 +02:00
Pierre Gayvallet d2006ea8a0
savedObjects: add score to repository.find results (#68894)
* add `score` to repository.find results

* update generated doc

* fix FTR result set

* remove score from exports

* fix FTR for find API

* fix label

* fix tsdoc
2020-06-18 11:39:25 +02:00
spalger 789851eb1a skip flaky suite (#52854) 2020-06-17 16:46:16 -07:00
Michail Yasonik bb03b75416
Removing flaky axe rule (#69418) 2020-06-17 13:00:52 -05:00
Stratoula Kalafateli ab1270e566
Replaces the Custom Color Picker on TSVB with the EuiColorPicker (#68888)
* Replace the Custom Color Picker on TSVB with the EuiColorPicker

* Remove the custom picker sass

* Remove private modules of eui and the custom color swatches

* Clear the color

* changes in test implementation

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-17 14:27:05 +03:00
Vadim Dalecky 3ee0bf2132
Explore underlying data (#68496)
* feat: 🎸 stub discover_enhanced plugin

* feat: 🎸 improve view in discover action

* feat: 🎸 add URL generator to "View in Discover" action

* feat: 🎸 implement navigation and getHref in view raw logs actio

* fix: 🐛 disable action in "edit" mode

* refactor: 💡 renamce context menu view in discover action

* feat: 🎸 rename action to "explore data"

* fix: 🐛 correctly generate action path

* feat: 🎸 add internationalization to "explore action"

* fix: 🐛 correctly parse generated Discover URL path

* test: 💍 setup basic functional tests

* refactor: 💡 modularize url generation logic

* feat: 🎸 export CommonlyUsed type

* test: 💍 add test subjects to panel custom time range modal

* test: 💍 add index patterna and time range functional tests

* refactor: 💡 rename action file

* refactor: 💡 use URL generator from Discover plugin's contract

* test: 💍 add "Explore raw data" action unit tests

* fix: 🐛 import share plugin to check if it is enabled

* Update x-pack/plugins/discover_enhanced/public/actions/view_in_discover/explore_data_context_menu_action.ts

Co-authored-by: Matthias Wilhelm <ankertal@gmail.com>

* chore: 🤖 add discover_enhanced to KibanaApp codeowners

* test: 💍 improve "Explore underlying data" functional tests

* test: 💍 improve <a> link assertion

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Matthias Wilhelm <ankertal@gmail.com>
2020-06-17 10:31:16 +02:00
Lukas Olson ade4c8dded
[Search service] Refactor the way server-side search strategies are registered (#68452)
* [search] Refactor the way search strategies are registered/retrieved on the server

* Fix types and tests and update docs

* Fix failing test

* Fix build of example plugin

* Fix functional test

* Make server strategies sync

Co-authored-by: Liza K <liza.katz@elastic.co>
2020-06-16 23:20:52 +03:00
Dmitry Lemeshko 9f7620b84d
[QA] Code coverage: fix flaky tests (#69272)
* skip test

* [page_objects/common_page] update closing toast
2020-06-16 20:15:01 +02:00
Alexey Antonov c98845c7c7
Update vega version (#68639)
* update vega version

* a11y skip test

* a11y skip test attempt 2

* adding back all a11y tests

* fix failed karma test

* remove extra  0BSD license

* coalesce yarn.lock versions a little

* update kbn/pm dist

* fix CI

* fix Vega View for ML

Co-authored-by: Michail Yasonik <michail.yasonik@elastic.co>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-16 12:35:34 +03:00
Anton Dosov 721125772f
stabilize flaky embeddables/adding_children take 2 (#68873)
* wait for loading indicator to be deleted

* improve with retry

* Update test/examples/embeddables/adding_children.ts

Co-authored-by: Spencer <email@spalger.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-16 10:42:37 +02:00
Spencer 7e328417ab
[kbn/optimizer] share all plugin bundles (#68986)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-15 22:15:31 -07:00
Steph Milovic f7398f086b
[Security] siem to securitySolution SO migration (#68776) 2020-06-15 16:18:03 -06:00
Anton Dosov 3d0552e03c
Embed dashboard by value example & some embeddable clean up (#67783)
Added example for using dashboard container by value
1.1 Refactored embeddable explorer e2e test to use new example, removed not needed kbn_tp_embeddable_explorer plugin.
For embeddable explorer examples went away from using getFactoryById() to improve type checks
There is new component a replacement for EmbeddableFactoryRenderer with slightly more flexible api: EmbeddableRenderer.
3.1 We can improve it going forward to support more use case
2020-06-15 17:13:31 +02:00
Mikhail Shustov 2a9fc23673
Type safe browser.executeAsync (#69018)
* make browserAsync type safe

* adopt tests

* prefer unknown over any

* simplify signature
2020-06-15 15:32:08 +02:00
Pierre Gayvallet b7057b7b22
add RedirectAppLinks component in kibana_react (#67595)
* implements RedirectCrossAppLinks component

* update doc

* review comments

* use `RedirectCrossAppLinks` in SOM SO table page

* update snapshots due to merge

* do not filter current app

* rename component

* fix snapshots

* add FTR tests

* review comments

* remove the `parseAppUrl` unused core API

* fix snapshots

* fix test plugin ts version

* add newline
2020-06-12 13:02:01 +02:00
Matthias Wilhelm 679118bcbc
[Discover] Unskip context navigation test (#68490) 2020-06-12 06:54:34 +02:00
Mikhail Shustov f593455a62
Bump TypeScript to v3.9 (#67666)
* add babel support for export type

* bump ts version to 3.9.3

* rebuild kbn-pm

* bump typescript-eslint

* fix error in security plugin UI

* check export as works

* fix app migration type

* use correct test subj attribute

* fix errors from the old PR

* embeddable is already passed in props

* explicitly define type of fetch

* add some types for viz

* fix fetch type p.2

* add null to allow spreading without type errors due to override

* add type guard to fix type error

* cast to any, since cannot assign unknown

* add timestamp to known types

* fix type error in fetch

* fix type error. id is always defined in attibutes

* declare a type

* move ts-ignore to the lines with errors

* declare tuple type explicitly

* mute type error. cannot assign unknown

* fix errors. id is always defined

* fix error type

* fix override errors. id is always defined

* fix error. extends any doesn't work anymore

* fix type error. type is always defined

* env doesn't always contain values

* fix type error

* cast to string

* add: logs is already declared in getNodeLogsUrl

* state is already  passed in props

* fix some errors in timelion

* number of fragments is always defined

* 'absolute' is not just string, but value

* TEMP: option is always defined

* always true if cast to promise manually

* both props are always defined

* explicitly define returned SO type

* workaround type

* bump tslib to be compatible with ts v3.9

* test private property

* rebuild kbn-pm

* Fix ts errors for beats management

* Fix type inference broken by the TS 3.9 upgrade

* Fix ingest manager saved object attributes typings

* Fix TS errors in cross_cluster_replication and index_management.

* Fix TS error in Watcher.

* roll back colorRange wrong type

* fix security plugin types

* TypeScript 3.9 fixes for APM

* Fix ColorRange types.

* fix actions & alerts errors. ByGidi

* fix lists error

* More APM fixes

* Remove paramaterization from `removeEmpty in agent config SettingsPage component (it's only used there and doesn't need to be parameterized.)
* Add option chain for case in registerTransactionDurationAlertType
* Cast `overallValue` in transform_metrics_chart
* Use more specific type for custom link filters
* Add more option chaining for local UI filters buckets response
* Remove unused parameters from routes
* Fix getProjection type parameter
* Use destructuring in serviceNodesLocalFiltersRoute to hide `never` error
* Revert `UnionToIntersection` change in `AggregationResponseMap`

Fixes #67804.

* fix platform type error

* Fix visualizations types.

* Fix data plugin types.

* bump TS version to 3.9.5

* Fix telemetry TS errors

* Fix dashboard code

* Adding Canvas Fixes for TS 3.9

* Fix case and security_solution types

* roll back to the old export syntax. new one might cause problems in api-extractor

* update docs

* Fix timelion code

* Fix meta

* Fix types

* fix type errors om ingest_manager

* bump babel deps

* enable private props & methods syntax

* update kbn-pm dist

* whitelist 0BSD license

* use @babel/plugin-proposal-private-methods in default set as well

* disable new babel plugins

* Revert "disable new babel plugins"

This reverts commit 04d959431d.

* cleanup security_solution types

* Fixes type error for newer TypeScript

* update docs

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
Co-authored-by: Nathan L Smith <smith@nlsmith.com>
Co-authored-by: Walter Rafelsberger <walter@elastic.co>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Tim Roes <tim.roes@elastic.co>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: FrankHassanabad <frank.hassanabad@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-11 10:04:09 +02:00
Greg Thompson 0306c7a8cf
Upgrade EUI to v24.1.0 (#68141)
* eui to 24.1.0

* src snapshot updates

* x-pack snapshot updates

* euiPaletteColorBlind param updates

* euiPaletteColorBlind ts-ignore

* fix collapsibleNav close button click for functional testing

* await focus

* increase legacy sass build timeout value

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-09 15:07:40 -06:00
Spencer 45c81ce1ab
run page_load_metrics tests in visual regresssion jobs (#68570)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-06-09 10:41:41 -07:00
Stacey Gammon f89e911f64
Kibana developer examples landing page (#67049)
* Kibana developer examples

* Batch explorer tests should be run in examples config

* Fix tests

* add codeowner for new developer examples plugin & readme cleanup

* Try to frame embeddable wording based on what a developer's goals are.

* Add noopener noreferer, fix bad merge

* Remove bfetch.png

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-08 09:47:51 -04:00
Peter Pisljar de4eaf9ae7
fix #66185 (#66186) 2020-06-08 15:31:14 +02:00
Anton Dosov 49171516d7
Unskip embeddables/adding_children suite (#68111)
Giving it another chance *cross fingers* 
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-08 15:01:55 +02:00
Alex Wild 38b9a8db8a
Add embed mode options in the Share UI (#58435) 2020-06-08 14:12:03 +02:00
Robert Oskamp fd1ad4c293
Make welcome screen disabling first action in loginIfPrompted (#68238)
This PR moves the welcome screen disabling in loginIfPrompted to the first position.
2020-06-05 17:39:03 +02:00
Dmitry Lemeshko 5064ae4a4c
[QA] Code coverage: unskip tests, collect tests results, exclude bundles from report (#64477)
* custom nyc configs, run all tests

* copy tests results back to original folder
2020-06-05 09:34:25 -06:00
Dmitry Lemeshko 6f57fa0b2d
Report page load asset size (#66224)
* performance_tests: draft version

* update cli runner and script

* ingest metrics

* save asset type for plugins

* Update src/dev/performance/ingest_metrics.ts

Co-authored-by: Spencer <email@spalger.com>

* follow review comments

* fix size calc, add FTR config, move src to kbn/test

* fix import, remove unused interface

* Update packages/kbn-test/src/page_load_metrics/capture_page_load_metrics.ts

Co-authored-by: Spencer <email@spalger.com>

* start chromium with no-sandbox

* add logging

* check page contains expected element, cut apps to 5

* fix locator & typo

* Update packages/kbn-test/src/page_load_metrics/navigation.ts

Co-authored-by: Spencer <email@spalger.com>

* Update navigation.ts

* Update navigation.ts

* bump puppeteer version

* fix typo

* update navigation script

* update config file

* update yarn.lock

* fix

* take screenshot on failure

* update screenshot title

* fix screenshot saving and error

* invalid locator

* Revert "invalid locator"

This reverts commit 3007539a69.

* run script in a loop 10 times

* Revert "run script in a loop 10 times"

This reverts commit 6cfa219140.

* path config value directly

* fix screenshots directory setup

* update maps locator, common for landing and new map

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Mikhail Shustov <restrry@gmail.com>
2020-06-05 16:42:55 +02:00
Matthias Wilhelm a6e9caefe4
[Discover] Unskip context size tests (#68213) 2020-06-05 14:45:59 +02:00
Uladzislau Lasitsa b87eefc753
[uiSettings]: Migrate items owned by app arch to new platform (#66040)
* Migrated uiSettings items to new platform

* API changes

* Fixed translations

* Fixed comment and i18n

* Fixed tests

* Fixed internalization

* Fix karma tests

* made code more explicit

* Fixed plugin

* Added consts for ui settings ids.

* Added id for another settings

* Fixed tests.

* Improved imports

* Fix imports to public which were happening from the server.

* Fixed paths

* Moved styles to plugin.ts

* Moved styles

* Fixed docs

* Fix ci

* Fix ci

* fix documentation

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
2020-06-05 10:55:42 +03:00
Liza Katz 537d2f2de1
[FIX] Allow filters without index (#68225)
* Allow filters without index

* Explicitly return true from isFilterApplicable id no index patterns were provided

* Adjust test result
2020-06-04 20:42:52 +03:00
Pierre Gayvallet c5546f4a39
Add globalSearch x-pack plugin (#66293)
* add skeleton for global_search plugin

* base implementation of the server-side service

* add utils tests

* add server-side mocks

* move take_in_array to common folder

* implements base of client-side plugin

* add tests for server-side service

* fix server plugin tests

* implement `navigateToUrl` core API

* extract processResults for the client-side

* fetch server results from the client side

* factorize process_results

* fix plugin start params

* move things around

* move all server types to single file

* fix types imports

* add basic FTR tests

* add client-side service tests

* add tests for addNavigate

* add getDefaultPreference & tests

* use optional for RequestHandlerContext

* add registerRoutes test

* add base test for context

* resolve TODO

* common nits/doc

* common nits/doc on public

* update CODEOWNERS

* add import for declare statement

* add license check on the server-side

* add license check on the client-side

* eslint

* address some review comments

* use properly typed errors for obs

* add integration tests for the find endpoint

* fix unit tests

* use licensing start contract

* translate the error message

* fix eslint rule for test_utils

* fix test_utils imports

* remove NavigableGlobalSearchResult, use `application.navigateToUrl` instead.

* use coreProvider plugin in FTR tests

* nits

* fix service start params

* fix service start params, bis

* I really need to fix this typecheck oom error

* add README, update missing jsdoc

* nits on doc
2020-06-04 16:18:02 +02:00
Matthias Wilhelm fa8187ba2a
[Discover] Fix renaming of saved search not displayed in breadcrumb (#67577) 2020-06-04 11:45:08 +02:00
Xavier Mouligneau 1216b0f7cd
[SECURITY] Rename siem plugin to security_solution (#67902)
* rename siem to security_solution

* rename siem to security solution inside of code

* rename translation keys

* fix snapshot

* replace siem for security solution in tutorial

* missing translation to be renamed

* fix types for api test integration

* updates runner file to match the new path

* change category for kibana settings

* miss renaming in advance settings

* fixes cypress tests

* fix api integration test

* fix new translation

* fix unit test

* update translation i18n

* update translation i18n II

Co-authored-by: Gloria Hornero <snootchie.boochies@gmail.com>
2020-06-04 05:35:13 -04:00
Alexey Antonov d661d66faa
[New Platform Migration]: Management - Implement NP API (#66781)
* [New Platform Migration]: Management - Implement NP API

Part of #47432

* partial progress on a number of management sections

* fix passing history

* Fixed types

* Fixed routing for Ingest Node Pipelines

* introduce and use react router wrapped eui components

* react router utils

* work in progress => hashRouter to router

* more partial progress

* remove console.log

* use reactRouterNavigate for management_sidebar

* Breadcrumbs will need to make use of the reactRouterNavigate function

* [triggersActions] app. Hash Router -> Router

* Replace /app/kibana#/management urls to /app/management

* remove ui/public/management

* fix some links to management apps

* fix management url for functional tests

* add data-test-subj for EuiSideNavItem

* partial progress

* fix some of ts issues

* Fixed breadcrumbs for data index management

* [kibana/spaces] section

* fix functional test

* [role_management] fix Breadcrumbs

* [api_keys] fix Breadcrumbs and Navigation

* Fixed routing for remote cluster

* [role_mapping] Partial progress

* [users] partial progress

* [watcher] partial progress

* fix eslint issues

* [snapshot_restore] partial progress

* [rollup_jobs] partial progress

* Fixed routing for cross cluster replications (partial progress). Enhanced reactRouterNavigate

* Perf optimization: fix extra re-rendering

* fix TS errors

* x-pack fix config for functional tests

* Fixed routing for index lifecycle management

* fix some broken CI tests

* fix PR comment

* [snapshot_restore] move onClick into reactRouterNavigate

* fix some jest

* fix some functional tests

* fix functiona test: management  scripted fields testing regression for issue

* fix some functional tests

* [licence_management] partial progress

* Fixed x-pack jest tests

* [saved_object_management] partial progress

* Fixed some tests

* fix functional test: should add new role myroleEast

* Reverted part of changes for ml

* [transforms] partial progress

* fix TS errors

* fix functional:  redirects to Kibana home

* add support of Backward compatibility

* fix functional: Saved objects management feature controls saved objects management global visualize all privileges listing redirects to Kibana home

* fix PR comment

* fix TS issues

* Fixed x-pack jest tests

* fix oss JEST

* Fixed functional test

* fix functional test

* fix PR comment

* Fixed i18n

* fix typo

* fix Styles

* Fixed paths for cross_cluster_replication

* fix wrong link

* Fixed jest

* Fixed some comments

* fix sorting

* fix type check

* fixed x-pack jest

* fixed x-pack jest

* reverted using of parentHistory

* Add debugging toasts to CCR.

* Comment out non-CCR functional tests.

* Fix typo.

* Uncomment non-CCR functional tests.

* Enable CCR.

* fix CI

* Add comment to explain why CCR is enabled by default and move config variable back to original location in CCR plugin.

* revert some changes in APM

* add space between index pattern name and tags

* fix function test

* Update x-pack/plugins/security/public/management/management_urls.ts

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

* Update x-pack/plugins/security/public/management/api_keys/api_keys_management_app.tsx

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

* Update x-pack/plugins/spaces/public/management/spaces_management_app.tsx

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

* Update x-pack/plugins/security/public/management/roles/roles_management_app.tsx

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

* Update x-pack/plugins/security/public/management/users/users_management_app.tsx

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

* Update x-pack/plugins/security/public/management/management_urls.ts

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

* Update x-pack/plugins/security/public/management/management_urls.ts

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

* [security] getUrlForApp -> navigateToApp

* [mp] fix Uncaught (in promise) undefined

Co-authored-by: Matt Kime <matt@mattki.me>
Co-authored-by: Uladzislau Lasitsa <Uladzislau_Lasitsa@epam.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
2020-06-03 18:55:06 +03:00
Liza Katz fbcb74ce28
Add error if filter index pattern is missing (#66979)
* add error if filter index pattern is gone

* docs change - why?

* Fix i18n

* Added a functional test for broken filters (field + index pattern)

* Clarify readme

* Moved readme

* New warning status

* Remove getAll

* git pull upstream master

* Fix translation files

* Fix merge

* added filterbar texts

* disabled correction

* Disable check in maps test until #64861 is resolved

* Fix tests, warning state is not disabled.

* Adjust warning filter - ignore filters from "foreign" index pattern, that are still applicable

* Add an additional unrelaeted filter test

* Update src/plugins/data/public/ui/filter_bar/_global_filter_item.scss

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Update src/plugins/data/public/ui/filter_bar/_global_filter_item.scss

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Fixed test data

* Revert mapping

* Update data with missing test

* Update test to match data

* Code review

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-03 09:35:44 +03:00
Matthias Wilhelm 36c6cd9415
[Discover] Fix missing histogram time range update when query is refreshed (#67582) 2020-06-03 06:41:18 +02:00
Dmitry Lemeshko 5e2a78bb52
[test/functional/services] convert dashboard and pie-chart to ts (#66703)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-02 23:24:06 +02:00
Matthias Wilhelm b9d1cec7fd
[Discover] Improve a11y test when switching to context (#67363) 2020-05-29 06:33:17 +02:00
Frank Hassanabad 957915b7e5
[SIEM][Lists] Adds circular dependency checker for lists plugin
## Summary

* Added dependency checker for the public and common folders for lists
2020-05-28 16:45:29 -06:00
Mikhail Shustov 4040c3090b
Mark elasticsearch client exposed via request context as deprecated (#67319)
* add legacy prefix for es client exposed via request handler context

* update src/plugins

* update core mocks and tests

* update test plugins

* update xpack plugins

* include x-pack/mocks.ts

* update after master merge

* update docs

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-27 19:00:16 +02:00
Brian Seeders 2c86a22582
[CI] Remove --detectOpenHandles to parallelize Jest tests again (#67413) 2020-05-27 12:44:41 -04:00
Anton Dosov 13138c05c4
Fix "Could not locate that index-pattern" recreate link is not working (#67280)
added a functional test, because we've recently fixed this link and it regressed again
2020-05-27 14:56:45 +02:00
Robert Oskamp dbbd09058c
Add welcome screen disabling to common page (#66713)
This PR adds logic to disable the welcome screen to the common_page which is already used in the x-pack security_page.
2020-05-27 13:11:17 +02:00
spalger a2451c9842 skip flaky suite (#62497) 2020-05-26 11:04:40 -07:00
Matthias Wilhelm 0aac0a3a28
Improve indexpattern without timefield functional test (#67031) 2020-05-25 14:15:26 +02:00
restrry bf04235dae apply prettier styles 2020-05-22 09:08:58 +02:00
spalger fd7a9a7e13 fix visual regression suite 2020-05-21 20:51:12 -07:00
Greg Thompson 204fd5b5a2
Upgrade EUI to v23.3.1 (#65877)
* eui to 23.2.0

* nav drawer ts updates

* eui to 23.3.0

* src snapshot updates

* makeId -> htmlIdGenerator mocks

* EuiCodeBlock testenv element lookup

* x-pack snapshot updates

* remove obsolete EuiCode and EuiCodeBlock mocks

* eui to 23.3.1

* patch updates

* searchbar type update

* docViewer tabs use valid DOMString id

* docViewer snapshot

* header updates

* cert_search field wrapper update
2020-05-21 14:31:26 -05:00
spalger 35db3704d1 fix visual baseline tests 2020-05-21 02:34:37 -07:00
Stratoula Kalafateli 42d21bcdcb
[Discover] Deangularize timechart header (#66532)
* Deangularize timechart header

* Add label attr to options

* Watch the interval prop change

* Tweaking the UI

Mainly moved interval notice to an `append` and copy updates

* Remove outdated i18n tokens

* fix functional test

* Change functional test due to dom changes

* fix functional test

* remove unecessary translation

* remove watcher as it is not necessary anymore

* change interval options copies

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
2020-05-20 10:28:53 +03:00
Matthias Wilhelm 3ce0b5755e
[Discover] Improve and unskip a11y context view test (#66959) 2020-05-20 09:28:01 +02:00
Tim Roes 3350bffe49
Allow histogram fields in average and sum aggregations (#66891)
* Allow histogram fields in average and sum aggs

* Fix PR review
2020-05-19 18:47:22 +02:00
Joe Reuter 1b89dddde5
move role reset into the top level after clause (#66971) 2020-05-19 17:51:33 +02:00
Daniil Suleiman b70955b436
[Visualize] Bar chart: Show missing values on chart setting (#66375)
* Show missing switch button

* Add functional tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-19 17:47:29 +03:00
Matthias Wilhelm eda439a112
[Discover] Reload route when Reset Search is clicked (#66288)
* Reload route when resetQuery function is triggered

* Add functional test
2020-05-19 15:45:28 +02:00
Matthias Wilhelm 0d71ed2ba2
[Discover] Unskip doc link functional test (#66884)
Co-authored-by: Spencer Alger <email@spalger.com>
2020-05-19 06:45:58 +02:00
Matthew Kime f7181a95dc
Index pattern management to Kibana platform (#65026)
* index pattern management to kibana platform
2020-05-18 22:25:20 -05:00
Dmitry Lemeshko 45cad35222
[services/testSubjects] reduce retry usage, add waitForEnabled (#66538)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-19 00:41:27 +02:00
Joe Reuter 404743a9ae
stabilize listing page object (#66564) 2020-05-18 13:29:26 +02:00
Daniil Suleiman 828108729a
Prevent further failures if timezone was not set (#66529)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-18 12:53:00 +03:00
Pierre Gayvallet 61936a1870
[SOM] Preserve saved object references when saving the object (#66584)
* create field for references and add comments

* add FTR test

* remove comments

* address comments

* use real reference in dataset and assert against it.
2020-05-16 09:08:45 +02:00
CJ Cenizal bfdeb10c15
Reorganize Management apps into Ingest, Data, Alerts and Insights, Security, Kibana, and Stack groups (#65796) 2020-05-15 16:11:27 -07:00
Dmitry Lemeshko f575913850
FTR: move basic services under common folder (#66563)
* [CODEOWNERS] set kibana-qa to own test/functional/services

* [functional/services] move low-level services to common folder

* update codeowners

* update imports

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-15 18:28:28 +02:00
Joe Reuter cdb59c7662
unskip newsfeed tests (#66562) 2020-05-15 16:05:29 +02:00
Aleh Zasypkin aff7f909a9
Add Login Selector functional tests. (#65705) 2020-05-15 12:33:45 +02:00
spalger bf796b295b skip flaky suite (#43150) 2020-05-14 11:22:53 -07:00
Spencer f318c5bfa0
[ftr/service/appsMenu] add missing await (#66498) 2020-05-13 17:52:37 -07:00
Lee Drengenberg 28196558c3
make sure remove sample data button is displayed and enabled before clicking (#66322) 2020-05-13 18:12:47 -05:00
Tre 4853f24705
Ingest code coverage (#62336) 2020-05-13 15:09:42 -06:00
Alejandro Fernández Haro 9ab73efd18
Remove Newsfeed leftovers from the Legacy codebase (#66084) 2020-05-13 16:35:22 +01:00
Matthias Wilhelm e6254f1f7c
[Discover] Encode context link filter part (#63831)
* Encode filter part of the URI for context

* Add functional test agent filter with whitespace
2020-05-13 11:48:56 +02:00
Joe Reuter b7e87c2c8b
Switch to core application service (#63443) 2020-05-13 09:19:24 +02:00
Josh Dover fd4074f2cd
Remove slapshot contract tests (#66277) 2020-05-12 14:30:47 -06:00
spalger 78aa89b818 skip flaky suite (#62866) 2020-05-12 12:22:14 -07:00
Dmitry Lemeshko 69a61d4ee7
[functional/services] import By/until from module (#66015)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-12 11:53:20 +03:00
Tim Sullivan f4d27b2838
[Reporting/Test] Add Functional test for download CSV (#65401)
* [Reporting/Test] Add Functional test for download CSV

* add todo

* add fs.existsSync check to find download

* debug

* handle timeout

* validate toast

* different way of getting repo_root
2020-05-11 12:49:19 -07:00
Bhavya RM 7526db98e8
Addressing test failures with a11y tests on management (#65758)
fixing test failure #60470
2020-05-11 10:30:50 -04:00
Matthew Kime 97561d6751
restore index pattern management data-test-subj's (#64697)
* restore index pattern management data-test-subj's
2020-05-08 11:53:42 -05:00
Anton Dosov 7cf7c261b9
fix fetchSoon delay in case of 0ms. Add async_dashboard test (#65083)
* forwardport #64999

* Add additional verifications on dashboard

I hope you don't mind me updating the test directly.
I *thought* the other dashboard tests required a consistent set of exact documents so that the count would always be the same.  Since the test uses sample data, I added a new timepicker:quickRanges so that the test can just select it.  Test FTR isn't set up to do relative time ranges right now.
But it looks like the dashboard checks aren't that specific to the data.  The dashboard seems to have `Last 24 hours` saved in it.  And when I don't change it to the whole sample data time range the test still passes.

* fix eslint error

* [page_objects/time_picker] allow any string in setCommonlyUsedTime

Co-authored-by: Lee Drengenberg <lee.drengenberg@elastic.co>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2020-05-08 12:03:42 +02:00
Rudolf Meijering 1baf0b0e47
SavedObjects bulkCreate API should return migrationVersion and strip the type & namespace from the id (#65150)
* Deserialize bulkCreate response to remove namespace type from id

* Index operations don't return _source in response

* Fix integration tests

* repository: make id generation and seq_no/primary_term spreading more explicit

* API Integration test for bulk create without ids

* Fix copy_to_space snapshot

* Revert "Fix copy_to_space snapshot"

This reverts commit 9c2b7433e3.

* Move test into returns block

* repository.test.js stricter regexp matching
2020-05-08 10:07:59 +02:00
Aaron Caldwell 7d0ac59bc9
Migrate Region Maps to NP (#64272) 2020-05-07 11:22:00 -06:00
Lee Drengenberg e029e35a5b
remove navigate from createIndexPattern and pass insertTimstamp to browser.get() (#65507) 2020-05-07 12:14:26 -05:00
Frank Hassanabad 0d3ddbe9d0
Fixes the client to setup SSL with the CA certificates for testing (#65598)
## Summary

Fixes the non-legacy ES test client to work with SSL.

Without this if you try to migrate `siem rules` or `alerting` or `CASE` or anything else that is using SSL based tests you get this error when trying to use the non-legacy:

```ts
// pull in non-legacy service for functional tests
const es = getService('es');
```

```ts
// use it somewhere where your config.ts is utilizing SSL in a functional test
// ...
```

In your console you get this error:

```ts
    ConnectionError: self signed certificate in certificate chain
          at onResponse (node_modules/@elastic/elasticsearch/lib/Transport.js:205:13)
          at ClientRequest.request.on.err (node_modules/@elastic/elasticsearch/lib/Connection.js:98:9)
          at TLSSocket.socketErrorListener (_http_client.js:401:9)
          at emitErrorNT (internal/streams/destroy.js:91:8)
          at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
          at process._tickCallback (internal/process/next_tick.js:63:19)
```

This fixes that by adding the CA certs from test to the ES test client.
2020-05-07 07:57:34 -06:00
Uladzislau Lasitsa 6ef45e17d4
Migrate test plugins ⇒ NP (kbn_tp_embeddable_explorer) (#64756)
* Migrated kbn_tp_embeddable_explorer to the new platform.

* Added discover as a dependency

* fixed types

* Updated typescript task

* revert previous commit

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-07 14:15:37 +03:00
Uladzislau Lasitsa c5d4d9e68a
Migrate test plugins ⇒ NP (kbn_tp_run_pipeline) (#64780)
* Migrated kbn_tp_run_pipeline to the new Platform

* Updated config.

* Added tsconfig.

* Updated index.ts for tests

* updated tsconfig

* Updated typescript task

* fixed tests

* Fixed tests

* updated comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-07 10:12:46 +03:00
Mikhail Shustov 4a6ecc84a6
move core provier to NP. allows to run tests on every page (#64929)
* move core provier to NP. allows to run tests on every page

* remove no-base-path

* pass whole KbnTestServer config

* fix build path

* another id

* np

* build kibana tests plugins. it is used in xpack tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-07 08:26:11 +02:00
Spencer 4a440427a6
[functional tests] add some missing awaits (#65566) 2020-05-06 16:45:15 -07:00
Dmitry Lemeshko 38c26ff337
[services/remote] set download folder with auto-saving (#65476)
* [services/remote] set download folder with auto-saving

* Update test/functional/services/remote/webdriver.ts

* use REPO_ROOT per review suggestion
2020-05-06 22:41:47 +03:00
spalger eef220e0c6 skip flaky suite (#65423) 2020-05-06 12:09:49 -07:00
Dmitry Lemeshko ced64f43f7
add tsvb tests to Firefox suite (#65425) 2020-05-06 14:13:52 +03:00
Gidi Meir Morris 94127d803a
[Alerting] migrates acceptance and functional test fixtures to KP (#64888)
This PR migrates the vast majority of Alerting legacy code to the Kibana Platform.

This includes:

1. Removed legacy Task Manager
2. Migrates Fixture plugins in Alerting, Triggers UI and Task Manager Perf

This does not includes:

1. The PagerDuty simulator due to a lack of support for custom responses in the platform. issue opened. https://github.com/elastic/kibana/issues/65045
2. The Webhooks simulator due to a lack of support for custom authorisation. Requires investigation.
2020-05-06 09:57:26 +01:00
Ryan Keairns a108b23c27
Additional branding updates (#64712)
* branding updates

* update snapshots

* update loginPage snapshot

* removed unused EuiText imports

* update button label for exiting full screen

* remove unused translations

* update loading_news snapshot

* update functional baseline screenshots
2020-05-06 01:39:29 -05:00
Matthias Wilhelm 9dc5c7debe
Remove redundant formatting of percentage column (#64948)
* Remove redundant formatting of percentage column

* Fix functional test

* Fix browser test
2020-05-06 08:31:03 +02:00
Michail Yasonik 35e10273d3
New nav (#64018)
Notably, also removes aria-hidden from many visualizations
2020-05-05 23:14:14 -05:00
Corey Robertson b8bea5b8b2
[Canvas] move files from legacy/plugins to plugins (#65283)
* Moves the files

* Rename legacy/plugins/canvas paths

* Correct paths

* Fix shareable_runtime and storybook

* ESLint Fixes

* Fix jest test and paths
2020-05-05 20:52:56 -04:00
Devon Thomson 5bad855e4b
Return to dashboard after editing embeddable (#62865)
Changed the process for saving visualizations and lens visualizations when the user has been redirected there from another application.
2020-05-05 16:58:36 -04:00
Dmitry Lemeshko ce06d37ce0
[test/functional] page objects cleanup (#64891)
* move point series functions to POs

* remove unused monitoring_page

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-05 19:08:25 +03:00
Dmitry Lemeshko 7cca2dacf0
[test/functional] Tsfy page objects (#64887)
* [test/functional/page_objects] tsfy console, context, header, timepicker & timelion

* [test/functional/page_objects] tsfy shield & error

* fix ts-check issue

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-05 16:24:04 +03:00
Tiago Costa 122450a4c8
chore(NA): skip functional test for visualize axis scalling preventing es snapshot promotion (#65100) 2020-05-04 18:04:42 +01:00
Josh Dover 306a5fe55e
Use brotli compression for some KP assets (#64367) 2020-05-04 10:53:06 -06:00
Vadim Dalecky 360b9c1200
Drilldowns (#61219)
* Add drilldown wizard components

* Dynamic actions (#58216)

* feat: 🎸 add DynamicAction and FactoryAction types

* feat: 🎸 add Mutable<T> type to @kbn/utility-types

* feat: 🎸 add ActionInternal and ActionContract

* chore: 🤖 remove unused file

* feat: 🎸 improve action interfaces

* docs: ✏️ add JSDocs

* feat: 🎸 simplify ui_actions interfaces

* fix: 🐛 fix TypeScript types

* feat: 🎸 add AbstractPresentable interface

* feat: 🎸 add AbstractConfigurable interface

* feat: 🎸 use AbstractPresentable in ActionInternal

* test: 💍 fix ui_actions Jest tests

* feat: 🎸 add state container to action

* perf: ️ convert MenuItem to React component on Action instance

* refactor: 💡 rename AbsractPresentable -> Presentable

* refactor: 💡 rename AbstractConfigurable -> Configurable

* feat: 🎸 add Storybook to ui_actions

* feat: 🎸 add <ErrorConfigureAction> component

* feat: 🎸 improve <ConfigureAction> component

* chore: 🤖 use .story file extension prefix for Storybook

* feat: 🎸 improve <ErrorConfigureAction> component

* feat: 🎸 show error if dynamic action has CollectConfig missing

* feat: 🎸 render sample action configuration component

* feat: 🎸 connect action config to <ConfigureAction>

* feat: 🎸 improve <ConfigureAction> stories

* test: 💍 add ActionInternal serialize/deserialize tests

* feat: 🎸 add ActionContract

* feat: 🎸 split action Context into Execution and Presentation

* fix: 🐛 fix TypeScript error

* refactor: 💡 extract state container hooks to module scope

* docs: ✏️ fix typos

* chore: 🤖 remove Mutable<t> type

* test: 💍 don't cast to any getActions() function

* style: 💄 avoid using unnecessary types

* chore: 🤖 address PR review comments

* chore: 🤖 rename ActionContext generic

* chore: 🤖 remove order from state container

* chore: 🤖 remove deprecation notice on getHref

* test: 💍 fix tests after order field change

* remove comments

Co-authored-by: Matt Kime <matt@mattki.me>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* Drilldown context menu (#59638)

* fix: 🐛 fix TypeScript error

* feat: 🎸 add CONTEXT_MENU_DRILLDOWNS_TRIGGER trigger

* fix: 🐛 correctly order context menu items

* fix: 🐛 set correct order on drilldown flyout actions

* fix: 🐛 clean up context menu building functions

* feat: 🎸 add context menu separator action

* Add basic ActionFactoryService. Pass data from it into components instead of mocks

* Dashboard x pack (#59653)

* feat: 🎸 add dashboard_enhanced plugin to x-pack

* feat: 🎸 improve context menu separator

* feat: 🎸 move drilldown flyout actions to dashboard_enhanced

* fix: 🐛 fix exports from ui_actions plugin

* feat: 🎸 "implement" registerDrilldown() method

* fix ConfigurableBaseConfig type

* Implement connected flyout_manage_drilldowns component

* Simplify connected flyout manage drilldowns component. Remove intermediate component

* clean up data-testid workaround in new components

* Connect welcome message to storage

Not sure, but use LocalStorage. Didn’t find a way to persist user settings. looks like uiSettings are not user scoped.

* require `context` in Presentable. drill context down through wizard components

* Drilldown factory (#59823)

* refactor: 💡 import storage interface from ui_actions plugin

* refactor: 💡 make actions not-dynamic

* feat: 🎸 fix TypeScript errors, reshuffle types and code

* fix: 🐛 fix more TypeScript errors

* fix: 🐛 fix TypeScript import error

* Drilldown registration (#59834)

* feat: 🎸 improve drilldown registration method

* fix: 🐛 set up translations for dashboard_enhanced plugin

* Drilldown events 3 (#59854)

* feat: 🎸 add serialize/unserialize to action

* feat: 🎸 pass in uiActions service into Embeddable

* feat: 🎸 merge ui_actions oss and basic plugins

* refactor: 💡 move action factory registry to OSS

* fix: 🐛 fix TypeScript errors

* Drilldown events 4 (#59876)

* feat: 🎸 mock sample drilldown execute methods

* feat: 🎸 add .dynamicActions manager to Embeddable

* feat: 🎸 add first version of dynamic action manager

* Drilldown events 5 (#59885)

* feat: 🎸 display drilldowns in context menu only on one embed

* feat: 🎸 clear dynamic actions from registry when embed unloads

* fix: 🐛 fix OSS TypeScript errors

* basic integration of components with dynamicActionManager

* fix: 🐛 don't overwrite explicitInput with combined input (#59938)

* display drilldown count in embeddable edit mode

* display drilldown count in embeddable edit mode

* improve wizard components. more tests.

* partial progress, dashboard drilldowns (#59977)

* partial progress, dashboard drilldowns

* partial progress, dashboard drilldowns

* feat: 🎸 improve dashboard drilldown setup

* feat: 🎸 wire in services into dashboard drilldown

* chore: 🤖 add Storybook to dashboard_enhanced

* feat: 🎸 create presentational <DashboardDrilldownConfig>

* test: 💍 add <DashboardDrilldownConfig> stories

* test: 💍 use presentation dashboar config component

* feat: 🎸 wire in services into React component

* docs: ✏️ add README to /components folder

* feat: 🎸 increase importance of Dashboard drilldown

* feat: 🎸 improve icon definition in drilldowns

* chore: 🤖 remove unnecessary comment

* chore: 🤖 add todos

Co-authored-by: streamich <streamich@gmail.com>

* Manage drilldowns toasts. Add basic error handling.

* support order in action factory selector

* fix column order in manage drilldowns list

* remove accidental debug info

* bunch of nit ui fixes

* Drilldowns reactive action manager (#60099)

* feat: 🎸 improve isConfigValid return type

* feat: 🎸 make DynamicActionManager reactive

* docs: ✏️ add JSDocs to public mehtods of DynamicActionManager

* feat: 🎸 make panel top-right corner number badge reactive

* fix: 🐛 correctly await for .deleteEvents()

* Drilldowns various 2 (#60103)

* chore: 🤖 address review comments

* test: 💍 fix embeddable_panel.test.tsx tests

* chore: 🤖 clean up ActionInternal

* chore: 🤖 make isConfigValid a simple predicate

* chore: 🤖 fix TypeScript type errors

* test: 💍 stub DynamicActionManager tests (#60104)

* Drilldowns review 1 (#60139)

* refactor: 💡 improve generic types

* fix: 🐛 don't overwrite icon

* fix: 🐛 fix x-pack TypeScript errors

* fix: 🐛 fix TypeScript error

* fix: 🐛 correct merge

* Drilldowns various 4 (#60264)

* feat: 🎸 hide "Create drilldown" from context menu when needed

* style: 💄 remove AnyDrilldown type

* feat: 🎸 add drilldown factory context

* chore: 🤖 remove sample drilldown

* fix: 🐛 increase spacing between action factory picker

* workaround issue with closing flyout when navigating away

Adds overlay just like other flyouts which makes this defect harder to bump in

* fix react key issue in action_wizard

* don’t open 2 flyouts

* fix action order

https://github.com/elastic/kibana/issues/60138

* Drilldowns reload stored (#60336)

* style: 💄 don't use double equals __

* feat: 🎸 add reload$ to ActionStorage interface

* feat: 🎸 add reload$ to embeddable event storage

* feat: 🎸 add storage syncing to DynamicActionManager

* refactor: 💡 use state from DynamicActionManager in React

* fix: 🐛 add check for manager being stopped

* Drilldowns triggers (#60339)

* feat: 🎸 make use of supportedTriggers()

* feat: 🎸 pass in context to configuration component

* feat: 🎸 augment factory context

* fix: 🐛 stop infinite re-rendering

* Drilldowns multitrigger (#60357)

* feat: 🎸 add support for multiple triggers

* feat: 🎸 enable Drilldowns for TSVB

Although TSVB brushing event is now broken on master, KibanaApp plans to
fix it in 7.7

* "Create drilldown" flyout - design cleanup (#60309)

* create drilldown flyout cleanup

* remove border from selectedActionFactoryContainer

* adjust callout in DrilldownHello

* update form labels

* remove unused file

* fix type error

Co-authored-by: Anton Dosov <anton.dosov@elastic.co>

* basic unit tests for flyout_create_drildown action

* Drilldowns finalize (#60371)

* fix: 🐛 align flyout content to left side

* fix: 🐛 move context menu item number 1px lower

* fix: 🐛 move flyout back nav chevron up

* fix: 🐛 fix type check after refactor

* basic unit tests for drilldown actions

* Drilldowns finalize 2 (#60510)

* test: 💍 fix test mock

* chore: 🤖 remove unused UiActionsService methods

* refactor: 💡 cleanup UiActionsService action registration

* fix: 🐛 add missing functionality after refactor

* test: 💍 add action factory tests

* test: 💍 add DynamicActionManager tests

* feat: 🎸 capture error if it happens during initial load

* fix: 🐛 register correctly CSV action

* feat: 🎸 don't show "OPTIONS" title on drilldown context menus

* feat: 🎸 add server-side for x-pack dashboard plugin

* feat: 🎸 disable Drilldowns for TSVB

* feat: 🎸 enable drilldowns on kibana.yml feature flag

* feat: 🎸 add feature flag comment to kibana.yml

* feat: 🎸 remove places from drilldown interface

* refactor: 💡 remove place in factory context

* chore: 🤖 remove doExecute

* remove not needed now error_configure_action component

* remove workaround for storybook

* feat: 🎸 improve DrilldownDefinition interface

* style: 💄 replace any by unknown

* chore: 🤖 remove any

* chore: 🤖 make isConfigValid return type a boolean

* refactor: 💡 move getDisplayName to factory, remove deprecated

* style: 💄 remove any

* feat: 🎸 improve ActionFactoryDefinition

* refactor: 💡 change visualize_embeddable params

* feat: 🎸 add dashboard dependency to dashboard_enhanced

* style: 💄 rename drilldown plugin life-cycle contracts

* refactor: 💡 do naming adjustments for dashboard drilldown

* fix: 🐛 fix Type error

* fix: 🐛 fix TypeScript type errors

* test: 💍 fix test after refactor

* refactor: 💡 rename context -> placeContext in React component

* chore: 🤖 remove setting from kibana.yml

* refactor: 💡 change return type of getAction as per review

* remove custom css per review

* refactor: 💡 rename drilldownCount to eventCount

* style: 💄 remove any

* refactor: 💡 change how uiActions are passed to vis embeddable

* style: 💄 remove unused import

* fix: 🐛 pass in uiActions to visualize_embeddable

* fix: 🐛 correctly register action

* fix: 🐛 fix type error

* chore: 🤖 remove unused translations

* Dynamic actions to xpack (#62647)

* feat: 🎸 set up sample action factory provider

* feat: 🎸 create dashboard_enhanced plugin

* feat: 🎸 add EnhancedEmbeddable interface

* refactor: 💡 move DynamicActionManager to x-pack

* feat: 🎸 connect dynamic action manager to embeddable life-cycle

* test: 💍 fix Jest tests after refactor

* fix: 🐛 fix type error

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* refactor: 💡 move action factories to x-pack (#63190)

* refactor: 💡 move action factories to x-pack

* fix: 🐛 use correct plugin embeddable deps

* test: 💍 fix Jest test after refactor

* chore: 🤖 remove kibana.yml flag (#62441)

* Panel top right (#63466)

* feat: 🎸 add PANEL_NOTIFICATION_TRIGGER

* feat: 🎸 add PanelNotificationsAction action

* test: 💍 add PanelNotificationsAction unit tests

* refactor: 💡 revert addTriggerAction() change

* style: 💄 remove unused import

* fix: 🐛 fix typecheck errors after merge

* support getHref in drilldowns (#63727)

* chore: 🤖 remove ui_actions storybook config

* update docs

* fix ts

* fix: 🐛 fix broken merge

* [Drilldowns] Dashboard to dashboard drilldown (#63108)

* partial progress on async loading / searching of dashboard titles

* feat: 🎸 make combobox full width

* filtering combobox polish

* storybook fix

* implement navigating to dashboard, seems like a type problem

* try navToApp

* filter out current dashboard

* rough draft linking to a dashboard

* remove note

* typefix

* fix navigation from dashboard to dashboard

except for back button - that would be addressed separatly

* partial progress getting filters from action data

* fix issue with getIndexPatterns undefined

we can’t import those functions as static functions, instead we have to expose them on plugin contract because they are statefull

* fix filter / time passing into url

* typefix

* dashboard to dashboard drilldown functional test and back button fix

* documentation update

* chore clean-ups

fix type

* basic unit test for dashboard drilldown

* remove test todos

decided to skip those tests because not clear how to test due to EuiCombobox is using react-virtualized and options list is not rendered in jsdom env

* remove config

* improve back button with filter comparison tweak

* dashboard filters/date option off by default

* revert change to config/kibana.yml

* remove unneeded comments

* use default time range as appropriate

* fix type, add filter icon, add text

* fix test

* change how time range is restored and improve back button for drilldowns

* resolve conflicts

* fix async compile issue

* remove redundant test

* wip

* wip

* fix

* temp skip tests

* fix

* handle missing dashboard edge case

* fix api

* refactor action filter creation utils

* updating

* updating docs

* improve

* fix storybook

* post merge fixes

* fix payload emitted in brush event

* properly export createRange action

* improve tests

* add test

* post merge fixes

* improve

* fix

* improve

* fix build

* wip getHref support

* implement getHref()

* give proper name to a story

* use sync start services

* update text

* fix types

* fix ts

* fix docs

* move clone below drilldowns (near replace)

* remove redundant comments

* refactor action filter creation utils

* updating

* updating docs

* fix payload emitted in brush event

* properly export createRange action

* some more updates

* fixing types

* ...

* inline EventData

* fix typescript in lens and update docs

* improve filters types

* docs

* merge

* @mdefazio review

* adjust actions order

* docs

* @stacey-gammon review

Co-authored-by: Matt Kime <matt@mattki.me>
Co-authored-by: streamich <streamich@gmail.com>
Co-authored-by: ppisljar <peter.pisljar@gmail.com>

* fix docs

* nit fixes

* chore: 🤖 remove uiActions from Embeddable dependencies

* chore: 🤖 don't export ActionInternal from ui_actions

* test: 💍 remove uiActions deps in x-pack test mocks

* chore: 🤖 cleanup ui_actions types

* docs: ✏️ add JSDoc comment to addTriggerAction()

* docs: ✏️ regenerate docs

* Drilldown demo 2 (#64300)

* chore: 🤖 add example of Discover drilldown to sample plugin

* fix: 🐛 show drilldowns with higher "order" first

* feat: 🎸 add createStartServicesGetter() to /public  kibana_util

* feat: 🎸 load index patterns in Discover drilldown

* feat: 🎸 add toggle for index pattern selection

* feat: 🎸 add spacer to separate unrelated config fields

* fix: 🐛 correctly configre setup core

* feat: 🎸 navigate to correct index pattern

* chore: 🤖 fix type check errors

* fix: 🐛 make index pattern select full width

* fix: 🐛 add getHref support

* feat: 🎸 add example plugin ability to X-Pack

* refactor: 💡 move Discover drilldown example to X-Pack

* feat: 🎸 add dashboard-to-url drilldown example

* feat: 🎸 add new tab support for URL drilldown

* feat: 🎸 add "hello world" drilldown example

* docs: ✏️ add README

* feat: 🎸 add getHref support

* chore: 🤖 cleanup after moving examples to X-Pack

* docs: ✏️ add to README.md info on how to find drilldowns

* feat: 🎸 store events in .enhancements field

* docs: ✏️ add comment to range trigger title

* refactor: 💡 move Configurable interface into kibana_utils

* chore: 🤖 simplify internal component types

* refactor: 💡 move registerDrilldwon() to advanced_ui_actions

* test: 💍 update functional test data

* merge

* docs: ✏️ make drilldown enhancement comment more general

* fix: 🐛 return public type from registerAction() call

* docs: ✏️ add comment to value click trigger title field

* docs: ✏️ improve comment

* fix: 🐛 use second argument of CollectConfigProps interface

* fix: 🐛 add workaround for Firefox rendering issue

See:
https://github.com/elastic/kibana/pull/61219/#pullrequestreview-402903330

* chore: 🤖 delete unused file

* fix: 🐛 import type from new location

* style: 💄 make generic type variable name sconsistent

* fix: 🐛 show "Create drilldown" only on dashboard

* test: 💍 add extra unit test for root embeddable type

* docs: ✏️ update generated docs

* chore: 🤖 add example warnings to sample drilldowns

* docs: ✏️ add links to example warnings

* feat: 🎸 add URL drilldown validation and https:// prefixing

* fix: 🐛 disable drilldowns for lens

* refactor: 💡 remove PlaceContext from DrilldownDefinition

* fix: 🐛 fix type check error

* feat: 🎸 show warning message if embeddable not provided

Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
Co-authored-by: Matt Kime <matt@mattki.me>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
Co-authored-by: ppisljar <peter.pisljar@gmail.com>
2020-05-04 16:11:20 +02:00
Lee Drengenberg 0efd02b49d
change createIndexPattern to do what it takes to make the indexPatternName* (#64646) 2020-04-30 12:30:06 -05:00
Pierre Gayvallet aa8cb620bb
Allow to define and update a defaultPath for applications (#64498)
* add defaultPath to `AppBase` and use it in `navigateToApp`

* add removeSlashes util

* adapt `toNavLink` to handle defaultPath

* update generated doc

* codestyle

* add FTR test

* address comments

* add tests
2020-04-30 08:05:16 +02:00
Tim Roes 9b65cbd92b
[Lens] Bind all time fields to the time picker (#63874)
* Bind non primary time fields to timepicker

* Fix typescript argument types

* Allow auto interval on all fields

* Remove lens_auto_date function

* Fix existing jest tests and add test todos

* Remove lens_auto_date from esarchives

* Add TimeBuckets jest tests

* Fix typo in esarchiver

* Address review feedback

* Make code a bit better readable

* Fix default time field retrieval

* Fix TS errors

* Add esaggs interpreter tests

* Change public API doc of data plugin

* Add toExpression tests for index pattern datasource

* Add migration stub

* Add full migration

* Fix naming inconsistency in esaggs

* Fix naming issue

* Revert archives to un-migrated version

* Ignore expressions that are already migrated

* test: remove extra spaces and  timeField=\\"products.created_on\\"} to timeField=\"products.created_on\"}

* Rename all timeField -> timeFields

* Combine duplicate functions

* Fix boolean error and add test for it

* Commit API changes

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Marta Bondyra <marta.bondyra@elastic.co>
2020-04-29 20:10:14 -04:00
Lee Drengenberg f5a8d8e6c2
make inserting timestamp with navigate methods optional with default true (#64655) 2020-04-29 14:05:45 -05:00
Christiane (Tina) Heiligers 1512859e56
[Telemetry] oss api tests (#64602)
* Adds telemetry API tests for oss

* Modifies test expectations to match that within oss

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-29 10:54:19 -07:00
Dmitry Lemeshko bac638a37e
Update jest config for coverage (#64648)
* set files to track for coverage collection

* increase timeout to 4h

* trying to add detectOpenHandles to avoid worker stuck

* update config

* make config paths more common

* update configs

* update jest oss config

* exclude 'tests' folder for coverage
2020-04-29 20:00:14 +03:00
Dmitry Lemeshko c0bf910a70
Re-enable Firefox functional testing on CI (#64159)
* bring testing on Firefox back

* disable some tests

* skip more tests

* cut more suites for Firefox

* skip more tests for Firefox

* replace smoke tag with includeFirefox

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-24 23:59:14 +03:00
Uladzislau Lasitsa 66074f9042
Index pattern management UI -> TypeScript and New Platform Ready (edit_index_pattern) (#64184)
* draft

* Converted edit_index_pattern to React. Created 'tab' component.

* Some fixes

* returned state_container

* Fixed tests and translation

* Some refactoring

* Fixed tests

* rermove unused translations

* update snapshots

* Some refactoring

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Matt Kime <matt@mattki.me>
2020-04-24 14:56:59 +03:00
spalger a4e740ed3d skip flaky suite (#62497) 2020-04-23 17:06:06 -07:00
Chandler Prall 126d187429
Upgrade to EUI v22.3.0 (#62963)
* snapshot updates

* bump to eui 22.3.0

* snapshots

* Fix css selector in test to match EUI internal DOM change

* Updated snapshots

* Insert react-beautiful-dnd@10 into top-level kibana to force siem's node_modules to hold its correct version

* More snapshot updates, resolved a typescript issue

* Move react-beautiful-dnd dependency around to make things happy again

* Use SearchFilterConfig from the top-level eui export

* Swallow 'ResizeObserver error does not have an err object' error in canvas

* Swallow ResizeObserver error cross-browser
2020-04-22 11:01:49 -06:00
Maja Grubic ffc8741da2
[Dashboard] Deangularize navbar, attempt nr. 2 (#61611)
* Attempt at deangularization, nr.2

* Remove padding in fullscreen

* Fixing failing functional test

* Fixing remaining functional test

* Fixing typescript errors

* Fixing filter bar not being visible in fullscreen

* Fixing filter bar not being visible in fullscreen

* Rebasing against master

* Fixing a small leftover

* Fix order of functions

* Fixing linting error

* Changing noPadding to a custom class

* Use filterManagers to handle filters

* Rename class

* Attempt at deangularization, nr.2

* Remove padding in fullscreen

* Fixing failing functional test

* Fixing remaining functional test

* Fixing typescript errors

* Fixing filter bar not being visible in fullscreen

* Fixing filter bar not being visible in fullscreen

* Rebasing against master

* Fixing a small leftover

* Fix order of functions

* Fixing linting error

* [APM] Agent config select box doesn't work on IE (#63236)

* adding value property to select options

* fixing test

* Use globe icon for "ext" span type on service map (#63205)

Both "external" and "ext" can be returned and should have the same icon.

* Move shared vislib components into Charts plugin (#62957)

* Closes #56310

Move shared vislib components into Charts plugin

* Fixed imports in tests

* Changed i18n IDs to match charts namespace

* Renamed ColorSchemaVislibParams to ColorSchemaParams, added enums and got rid of useValidation function

* Renamed ColorSchemaVislibParams to ColorSchemaParams and got rid of useValidation function

* Fixed merge conflict

* Replaced enums with objects again

* Make uptime alert flyout test a little more resilient (#62702)

* [SIEM] [Cases] Unit tests for case UI components (#63005)

* Endpoint: Remove unused `lib` module (#63248)

* [Lens] Fix error in query from generated suggestion (#63018)

* [Lens] Fix error in query from generated suggestion

* Update from review comments

* Fix test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* Resolver/node svg 2 html (#62958)

* Remove some SVG in Resolver nodes and replace with HTML

* [Reporting] convert all server unit tests to TypeScript (#62873)

* [Reporting] convert all server unit tests to TypeScript

* fix ts

* revert unrelated change

* [SIEM] Link ML Rule card CTA to license_management (#63210)

* Link ML Rule card CTA to license_management

Taking the user directly to the license management page within kibana
(where they could immediately start a trial subscription) is much more
actionable than taking them to the subscriptions marketing page.

* Revert translation key change

Neither of these is totally accurate, and there've already been
translations written for the old one.

* Correctly type ILM's optional dependencies as optional (#63255)

And guard against their absence.

* [Telemetry] use prod keys (#63263)

* update chromedriver dependency to 81.0.0 (#63266)

* task/mac-eventing-form (#62999)

adds mac events form for endpoint policy details
Co-authored-by: oatkiller <robert.austin@elastic.co>

* bc6 rule import april 9 (#63152)

* bc6 rule import april 9

Increased the lookback of the ML rules

* re-import

with LF chars

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* Added UI for pre-configured connectors. (#63074)

* Added UI for pre-configured connectors.

* fixed due to comments

* Fixed jest tests

* Fixed due to comments and added some functional tests

* test fix

* Fixed failed checks

* Fixed functional tests failing

* TaskManager tasks scheduled without attempting to run (#62078)

* TaskManager tasks scheduled without attempting to run

* Removing unused import

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* Changed alerting wrong param name for help xpack.encrypted_saved_objects.encryptionKey to xpack.encryptedSavedObjects.encryptionKey (#63307)

* fix ScopedHistory.createHref to prepend location with scoped history basePath (#62407)

* fix createHref to prepend with scoped history basePath + add option to exclude it.

* fix prependBasePath behavior

* fix test plugins urls

* add pathname to endpoint url builder methods

* Revert "add pathname to endpoint url builder methods"

This reverts commit 7604932b

* adapt createHref instead of prependBasePath

* use object options for createHref

* update generated doc

* fixing custom link popover size and hiding scroll (#63240)

* Changing noPadding to a custom class

* Use filterManagers to handle filters

* Rename class

* Applying some changes

* Reverting search_bar code changes

* Removing some stuff that was causing functional tests to fail

* Removing refresh dashboard container which was causing errors during navigation

* Do not destroy dashboardContainer

* Adding updateSavedQueryId method

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
Co-authored-by: DianaDerevyankina <54894989+DianaDerevyankina@users.noreply.github.com>
Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
Co-authored-by: Robert Austin <robert.austin@elastic.co>
Co-authored-by: Wylie Conlon <william.conlon@elastic.co>
Co-authored-by: Brent Kimmel <bkimmel@users.noreply.github.com>
Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Ahmad Bamieh <ahmadbamieh@gmail.com>
Co-authored-by: Dmitry Lemeshko <dzmitry.lemechko@elastic.co>
Co-authored-by: Candace Park <56409205+parkiino@users.noreply.github.com>
Co-authored-by: The SpaceCake Project <randomuserid@users.noreply.github.com>
Co-authored-by: Yuliia Naumenko <jo.naumenko@gmail.com>
Co-authored-by: Brandon Kobel <brandon.kobel@elastic.co>
Co-authored-by: Pierre Gayvallet <pierre.gayvallet@elastic.co>
2020-04-22 09:59:43 +01:00
Joe Reuter 2f794e6c42
Refresh index pattern list before redirecting (#63329) 2020-04-22 09:29:51 +02:00
Anton Dosov 3b1d0e0c6b
[State Management] ScopedHistory support for state syncing utils (#62761)
The needed change is to rely on history as source of truth for location instead of window.location.

btw, This makes possible to test state syncing utils integration using createMemoryHistory()

One issue was discovered after this change:
When switching from context to discover url was incorrect. history.location inside state syncing utils didn't get the last update. This happened, because history instance created in discover wasn't used in context app and when all listeners unsubscribed from it - it stopped receiving location updates. To fix this I just reused one history instance in discover, context and their kbnUrlTracker
2020-04-21 13:53:17 +02:00
Wylie Conlon 7e3de56303
[TSVB] Use default Kibana palette for split series (#62241)
* [TSVB] Rainbow palette shares colors with dashboard

* Add migration

* Add charts as NP dependency

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-20 12:43:21 -04:00
spalger fe6b13b83c skip flaky suite (#58692) 2020-04-18 12:35:04 -07:00
Anton Dosov 73548bd473
[Drilldowns] Fix back button by removing panels from url in dashboard in view mode (#62415)
* remove panels from url

* review nits

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-18 10:34:17 +02:00
Ryland Herrick 40f82229f0
[SIEM] Server cutover to New Platform (#63430)
* Move server code into NP folder

* NP config is not yet used
* Relative imports are somewhat broken

* Move common folder into NP

* Move cypress folder into NP

* Move scripts folder into NP

* Move misc. config into NP folder

A few of these were moved into the cypress folder as they're
cypress-specific.

I tried to update all the relative paths but some are likely broken. I'm
not going to know until other stuff is fixed, though.

* Move value for siem index pattern into common/constants

The other default values live in there, this is no different.

* Update paths following file move

If this was referencing the full project, it now references both paths
(legacy for UI, and NP for server).

* Fix typescript errors related to module resolution

These are mostly updating imports to the common/ folder on the UI side
(since things changed relative to those files).

* Replace Legacy Config with NP Config

* Updates plugin to use NP config
  * defines new config previously coming from savedObjects config
* cleans up legacy types

 Conflicts:
	x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts
	x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts
	x-pack/plugins/siem/server/lib/detection_engine/rules/types.ts
	x-pack/plugins/siem/server/plugin.ts
	x-pack/plugins/siem/server/routes/index.ts
	x-pack/plugins/siem/server/types.ts

* Remove local SIEM tsconfig

This was originally added to address an issue with tsserver, but that
issue is no longer relevant. The presence of this file confuses
typescript into thinking that siem is a separate TS project.

* Update kibana.json to declare our dependencies

These are not necessarily correct in terms of what's required/optional,
but this is what's declared in our types.

* Remove legacy plugin instantiation

* Removes legacy instantiation of server plugin, which is now handled by
NP
* Loosens legacy config spec so we no longer have to duplicate config
types

* Update tests with NP config

These were written against the old Hapi config function; now, we just
have a POJO.

* Update es_archiver helpers' paths

I'm not quite sure if these are working yet, but they're no longer
throwing errors.

* Ignore restricted path on script

This was cribbed from infra, who has made a similar change.

* Ignore restricted path on temporary savedObject mappings import

This will be changed subsequently when we switch to the NP form of
savedObject type registration.

* Add symlink to lockfile

* Fix paths on circular deps script

* Add separate config for Rule and Timeline saved objects

We had previously used the savedObjects' config, but those are not
currently exposed to us on New Platform. For now, we're going to split
this into two sets of values for the SOs we deal with
importing/exporting within the SIEM app, with the same defaults as
savedObjects.

* Fixing relative paths within cypress

These are strings that wouldn't be caught by typescript.
2020-04-17 12:31:54 -05:00
Devon Thomson 3f98f0f849
Duplicate panel feature (#61367)
Added a new cloning feature for panels on a dashboard.
2020-04-17 11:35:27 -04:00
Joe Reuter 4e56419ca4
Migrate timelion vis (#62819) 2020-04-17 10:42:27 +02:00
Joe Portner d72de0ea16
Refactor saved object types to use namespaceType (#63217)
Remove `namespaceAgnostic` field that was deprecated in #54605,
use `namespaceType` instead.
2020-04-16 14:37:55 -04:00
Dmitry Lemeshko 50228df498
Code coverage: run more configs with functional tests (#63680)
* run endpoint tests with coverage

* add more configs

* add plugin_functional config
2020-04-16 20:40:55 +03:00
Dmitry Lemeshko 464a3c23ba
[FTR]: add chromium-based Edge browser support (#63566) 2020-04-16 19:06:33 +03:00
Daniil Suleiman 6bbcabcf1f
[NP] Visualize (#62294)
* Move visualize plugin to np

* Refactor plugin services

* Clean up

* Remove legacy style usage

* Fix style imports

* Fix timelion_options context provider

* Fix translations

* Change codeowners for visualize

* Import styles in legacy for BWC in Browser tests

* Get rid of embeddable dependency

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-16 18:32:46 +03:00
Mikhail Shustov af09fedaf2
[NP] add http resources sub-service (#61797)
* add HttpResources basic implementation

* expose http resources to plugins

* add mocks

* move http resources to a separate service

* hide rendering service

* adopt internal types

* expose HttpResources service to plugins

* update platform mocks

* plugins start using HttpResources API

* remove RenderingServiceSetup export

* RenderingServiceSetup --> InternalRenderingServiceSetup

* improve types

* remove httpRespources leftovers from http service

* remove rendering types from RequestHanlderContext

* fix security plugin tests

* add unit tests for httpResources service

* add unit tests

* remove outdated cache-control header

* restructure http resources service

* merge getUiPlugins and discover

* static route declaration shouldnt require auth & validate

* update docs

* use HttpResources service instad of rendering

* address comments

* update docs

* roll back unnecessary changes

* use getVars for rendering

* dont pass app. it is not public API

* remove static registers

* update migration guide
2020-04-16 16:09:39 +02:00
Anton Dosov c57297c95b
Bugfix clear saved query crashes kibana on Discover in some cases (#63554)
* actual hotfix

* clean up redundant code

* add functional test
2020-04-15 19:55:43 +02:00
Stacey Gammon d0404487f6
Add embeddable via saved object example (#61692)
* Add embeddable via saved object example

* give todoRefEmbed a different name from the by value one

* fix types

* fix order of unmounting

Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
2020-04-15 11:10:20 -04:00
Anton Dosov 3b64a65ed6
[Drilldowns] improve action.getHref() for drilldowns (#63228)
getHref on Action interfaces in uiActions plugin is now async. getHref is now used only to support right click behaviour. execute() takes control on regular click.
2020-04-15 15:41:42 +02:00
Matthias Wilhelm 8264352bbe
[Discover] Fix broken setting of bucketInterval (#62939)
* Fix broken setting of bucketInterval, remove $watch

* Fix and adapt functional tests
2020-04-15 08:33:10 +02:00
Chris Cowan c2f2a79acb
[Metrics UI] Refactor With* containers to hooks (#59503)
* [Metrics UI] Refactor containers to hooks

* clean up depends; move useInterval out of useWaffleTime;

* converting WithWaffleFilters to useWaffleFilters

* Removing WithWaffleOptions

* Refactor WithWaffleViewState to useWaffleViewState

* Removing obsolete files

* Fixing race condition with complext state

* Adding undefined to RisonValue; unwinding changes trying to work around bad type

* Switching to context

* Change assertion to ignore the length of the current URL

* Fixing test frameork to accept urls longer then 230 characters

* Fixes #59395; Refactor WithMetricsTime to hook; Fixes brushing on metric detail page; fixes refresh button on metric detail page

* Fixing tests with adding timeRange

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-14 09:01:41 -07:00
Dmitry Lemeshko 637a9e11a2
Revert FTR: add chromium-based Edge browser support (#61684) (#63448) 2020-04-14 13:25:26 +02:00
Ahmad Bamieh 5bc233f3c7
[Telemetry] force staging urls in tests (#63356)
* specify telemetry url configs

* opt out by default except where we are testing telemetry
2020-04-13 23:45:13 +03:00
Anton Dosov 1199c8c8b0
Bugfix dashboard unpins filters (#62301)
Fixes following cases:

Saving dashboard with pinned filter unpins it. Do not save pinned filters with dashboard see #62301 (comment)
When navigating with global filter to dashboard with same saved filter, filter becomes unpinned
When navigating from listing to dashboard with saved filter, back button didn't work

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-12 17:06:03 +02:00
Pierre Gayvallet bd159c7d59
fix ScopedHistory.createHref to prepend location with scoped history basePath (#62407)
* fix createHref to prepend with scoped history basePath + add option to exclude it.

* fix prependBasePath behavior

* fix test plugins urls

* add pathname to endpoint url builder methods

* Revert "add pathname to endpoint url builder methods"

This reverts commit 7604932b

* adapt createHref instead of prependBasePath

* use object options for createHref

* update generated doc
2020-04-11 09:27:45 +02:00
Joe Portner 97d1685c3d
Sharing saved-objects phase 1 (#54605)
Co-authored-by: kobelb <brandon.kobel@elastic.co>
2020-04-09 23:18:18 -04:00
Brian Seeders b8738b0eeb
Ensure that discover data exists for home/_navigation test so that the test suite can run in isolation (#62516) 2020-04-09 15:05:09 -04:00
Matthias Wilhelm 2a1c8d8de4
[Discover] Hide time picker when an indexpattern without timefield is selected (#62134)
* Assign valid value whether the timepicker should be displayed

* Add functional tests
2020-04-09 14:30:21 +02:00
Dmitry Lemeshko 578e443bdd
FTR: add chromium-based Edge browser support (#61684)
* bump dependency, add edge support in ftr services

* add config files

* fix browser version for msedge

* use npm ms-chromium-edge-driver

* download edge driver aside from session creation

* move dependency to dev

* update dist/index file

* bump edge-driver version

* change type to msedge to match w3c spec

* fix discover tests for Edge

* Revert "fix discover tests for Edge"

This reverts commit 87e7fdd256.

* bump driver version up

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-09 00:08:21 +03:00
Lee Drengenberg fdb4a37a60
restore empty_kibana after saved objects test (#62951) 2020-04-08 15:33:21 -05:00
Daniil Suleiman 314c4f782f
[NP] Vis Default Editor plugin (#62475)
* Move the default_editor to NP

* Fix paths

* Import styles through the visualize

* Other fixes

* Fix ip_ranges exhaustive-deps array

* Fix filters and extend bounds

* Other fixes

* Fix date_ranges tests

* Use useMount on first render

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-08 12:00:13 +03:00
Dmitry Lemeshko 898504dc8f
FTR: Enable w3c for chromedriver (#62542)
* enable w3c for chrome

* update maps tests

* update maps tests

* update common_page

* Revert "update maps tests"

This reverts commit 31f43fd678.

* revert changes to maps tests

* undo after removal

* update expect range to pass on Windows, unskip tests for Firefox

* print out value for discover brushing test

* log first timestamp

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-07 17:40:27 +03:00
liza-mae 29c1aad2bb
Fix visual tests (#62660) 2020-04-06 16:48:37 -06:00
Stacey Gammon dfa083dc60
Prep for embed saved object refactor + helper (#62486) 2020-04-06 13:45:46 -04:00
Gidi Meir Morris e7a4ca261b
[Event Log] adds query support to the Event Log (#62015)
* added Start api on Event Log plugin

* added empty skeleton for Event Log FTs

* added functional test to public find events api

* added test for pagination

* fixed unit tests

* added support for date ranges

* removed unused code

* replaces valdiation typing

* Revert "replaces valdiation typing"

This reverts commit 711c098e9b.

* replaces match with term

* added sorting

* fixed saved objects nested query

* updated plugin FTs path

* Update x-pack/plugins/encrypted_saved_objects/README.md

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

* Update x-pack/plugins/encrypted_saved_objects/README.md

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

* remofed validation from tests

* fixed typos

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
2020-04-06 18:02:58 +01:00
Lee Drengenberg 0abd7aa43f
simplify new index pattern button click method (#62451)
* simplify new index pattern button click method

* replace method name to match previous commit

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-06 11:18:38 -05:00
Larry Gregory 5003179da3
Update cache-control header (#62014)
* update cache-control header

* update tests

* update test run config

* remove custom cache-control header for authentication resources

* address test flakiness

* address PR feedback

* revert changes to endpoint test

* revert changes for real this time

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-06 10:19:42 -04:00
Joe Reuter 2b32160a65
Vislib: Fix position calculation of ticks in non-horizontal axes (#62309) 2020-04-06 15:03:19 +02:00
Daniil Suleiman 104b49015e
[NP] Dashboard (#61895)
* Remove absoluteToParsedUrl reference in dashboard

* Remove KibanaParsedUrl from visualize

* Fix tests

* Add tests

* Fix saved dashboard

* Fix empty line after resolving conflicts

* Move dashboard to np

* Move migrations back to legacy

* Make it works

* Other fixes

* Move into application folder

* FIx translations

* Make share & home plugins otional

* FIx kbn url tracking, jest tests

* Import from dashboard_constants in FT

* Fix translations order

* Use getStartServices for start plugin deps

* Path fixes

* i18n fix

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-06 12:11:48 +03:00
Liza Katz ddc90247c2
[BUG] Back navigation from surrounding documents doesn't work properly (#62350)
* replace state for load more documents

* simpler solution

* simpler solution + functional test

* fix test

* disable flaky test
2020-04-06 10:41:05 +03:00
spalger 3d154a389e skip flaky suite (#60470) 2020-04-04 07:08:17 -07:00
Daniil Suleiman 5696f6285c
[Discover] Fix flaky FT in field visualize (#62418)
* Unskip

* Set only suite

* Add field search

* Use alternative flaky fix

* Remove extra actions

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-04 17:05:00 +03:00
spalger b0523d5eb0 skip flaky suite (#62281) 2020-04-03 13:01:09 -07:00
Bhavya RM 29dd518859
a11y for xpack home (#62342)
a11y test xpack home
2020-04-03 14:29:32 -04:00
Anton Dosov ea7a81dfc2
[Drilldowns] Dashboard state fixes for drilldowns (#61457)
1. Change logic around deciding wether to use time from url or from saved object. Previously code looked only into if _g is present in the url at all. And didn't consider edge case if time or refreshInterval is missing in _g

2. Fix initial syncing of time from savedobject causing redundant history record. _This changed caused order of _a and g params in url change. One test was affected by it because it relied on the order. I don't think it should be considered breaking as order app puts it's query params shouldn't matter.

3. Fix another race condition between state syncing with url and angular controller $destroy. Similar fix was done before in #57795, but this on covers case when we stay within dashboard app, but change dashboard

4. Fix initial panel state migration causing redundant browser history records

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-03 12:22:43 +02:00
Stacey Gammon bb747abdaf
Switch to embeddable factory interface with optional override (#61165)
* wip

* typescript map embeddable

* More updates

* Address code review comments and update some usages in SIEM and uptime to the new types

* More clean up - carry over some of the SIEM types to maps for render tool tip

* fixes

* fixes

* Address more review comments

* fixes

* fixes

* fix jest test

* Fix visualize embeddable

* fixes after master merge

* Fixes

* Prefix variable with name "custom" to make it more obvious

* Remove layerList from input state

* fixes

* Update src/plugins/dashboard/public/embeddable/dashboard_container_factory.tsx

Co-Authored-By: Vadim Dalecky <streamich@users.noreply.github.com>

* review updates

* fixes

* update maps readme

Co-authored-by: Vadim Dalecky <streamich@users.noreply.github.com>
2020-04-02 14:27:51 -04:00
Joe Reuter 61f2626d0a
Make d3 place nicely with object values (#62004) 2020-04-02 18:12:22 +02:00
Rashmi Kulkarni 07be066040
accessibility tests for dashboard panel ( OSS) (#62055)
* accessibility tests for dashboard panel

* added back the skipped test as it is still required to pass through the a11ySnapshot

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-01 15:20:47 -07:00
Uladzislau Lasitsa 5d5c012f3b
Migrate test plugins ⇒ NP (kbn_tp_sample_panel_action) (#60749)
* Migrated sample_action to NP. Panel action tests returned to the test flow.

* fixed names

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-01 17:11:33 +03:00
spalger aab5a0ce6d skip flaky suite (#53308) 2020-03-31 19:49:32 -07:00
spalger 5d8c65a10b skip flaky suite (#61714) 2020-03-31 16:30:15 -07:00
Spencer 84cb048020
[ci/es] always pull snapshots, break early when they're not av… (#62040)
* [ci/es] always pull snapshots, break early when they're not available

* move to setup.sh after deps are installed

Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-03-31 13:25:14 -07:00
Matthias Wilhelm 0082ca7ad8
[Discover] Deangularize and euificate sidebar (#47559)
* Split angular templates into React components

* Add tooltip for field label

* Adapt SCSS

* Cleanup angular directives

* Extract helper functions

* Improve tests + docs

* Move css to _sidebar.scss

* Exclude _id field from displaying the Visualize button to prevent an ES error

* A11y improvements
2020-03-31 17:01:44 +02:00
DziyanaDzeraviankina f29a5dd05b
Auto interval on date histogram is getting displayed as timestamp per… (#59171)
* Auto interval on date histogram is getting displayed as timestamp per 0 milliseconds when x-axis bucket is collapsed

Closes #57822

* Fixed incorrect interval label displaying while scaling the chart.

* Updated agg.test.tsx snapshot

* Got rid of context and refactored agg hooks

* Fixed agg.type.name check

* Added functional tests to cover the date histogram interval editing

* Fixed some expected values in tests

* Updated some test cases

* Added a new visualization to visualize archive

* Added testSubjects service to replace find where possible

* Updated tests to match updated behavior

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-31 17:17:09 +03:00
Uladzislau Lasitsa e058f472df
Migrate test plugins ⇒ NP (kbn_tp_custom_visualizations) (#61606)
* Migrated kbn_tp_custom_visualizations to the new platform

* skip test instead of deleting

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-30 18:24:02 +03:00
Uladzislau Lasitsa affd8e59b7
Migrate test plugins ⇒ NP (kbn_tp_top_nav) (#60092)
* Migrated top nav plugin test to the new platform

* Removed old plugin. Some refactoring.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-30 18:08:44 +03:00
Uladzislau Lasitsa 5605b4691d
Removed kbn_tp_sample_app_plugin (#61427)
* Removed sample app test plugin

* Deleted old tests

* removed path

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-30 16:33:59 +03:00
Mikhail Shustov ab39ceba8f
Serve static assets from NP (#60490)
* add hapi.inert plugin to NP

* update tests

* move serving static assets

* update tests

* add functional tests

* fix type errors. Hapi.Request doesn't support typings for payload

* update docs

* remove comment

* move assets to NP

* update all assets references

* address Spencer's comments

* move ui settings migration to migration examples

* document legacy plugin spec

* move platform assets test to integration_tests

* address Spencer's comment p.2

* try to fix type errors

* fix merge commit

* update tests
2020-03-27 14:24:28 +01:00
Peter Pisljar 7b0c66f7f1
move visualizations plugin to new platform (#60403) 2020-03-27 13:02:06 +01:00
Daniil Suleiman eedf64b091
[Discover] Fix filters passing down to visualize (#61392)
* Fix visualize a discover search

* Move deep clone into vis.ts

* Add functional tests

* Fix passing filters to visualize

* Add functional tests
2020-03-27 11:02:29 +03:00
Matthias Wilhelm 041dcc06af
[Discover] Fix ignoring uiSetting discover:searchOnPageLoad (#61393)
* Add checks for changed query and update in $scope.updateQuery

* Add functional test by counting fetches
2020-03-27 06:42:51 +01:00
Maryia Lapata 45a5ad55bc
[Default editor] Catch invalid calendar exception (#60494)
* Catch invalid calendar exception

* Use isValidEsInterval directly

* Show field error message right away

* Fix for the case 2w

* Update time_interval.tsx

* Restructure validation

* Rename fn to isValidCalendarInterval

* Refactoring

* Update time_interval.tsx

* Add functional tests

* Add functional tests for interval

* Update _area_chart.js

* Don't show error when value is empty

* Use error message from InvalidEsCalendarIntervalError

* Update _area_chart.js

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-26 18:24:03 +03:00
Pierre Gayvallet a7508b8f20
Migrate SO management routes to new plugin (#59734)
* unexpose SavedObjectsManagement from legacy server

* migrate saved object management routes to new plugin

* fix endpoint methods

* adapt code due to rebase

* extract types

* improve findAll params

* adapt existing api integration tests and migrate to TS

* update generated doc

* add API integration tests for /scroll/count

* add unit tests for plugin and routes

* add injectMetaAttributes tests

* extract relation type

* add find_relationships tests

* add find_all tests

* do not complete migrator$ to avoid unhandled promise rejection

* fix data for search endpoint integration tests

* remove falsy comment

* rename plugin folder to match plugin id

* address review comments

* update CODEOWNERS
2020-03-26 12:43:54 +01:00
Dmitry Lemeshko 3fe48fe8b3
Fix empty coverage folder, collect coverage when some tests fail (#61349)
* create coverage folder only if json file being saved

* skip some tests

* unskip test

* do not fail coverage run if some tests fail

* unskip fixed test
2020-03-26 13:50:58 +03:00
Daniil Suleiman 1d278d4494
[Discover][Visualize] Fix visualizing a selected field in discover search (#61226)
* Fix visualize a discover search

* Move deep clone into vis.ts

* Add functional tests

* Fix passing filters to visualize

* Revert fixing filters
2020-03-26 10:52:57 +03:00
Tyler Smalley 30a512d831 Temporarily disable tests caused by possible ES regression
https://github.com/elastic/kibana/issues/61366

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-03-25 15:35:33 -07:00
Matthew Kime 498abb4152
Revert "Drilldowns (#59632)" (#61136)
This reverts commit 5abb2c8c7d.
2020-03-24 16:22:11 -05:00
Lee Drengenberg e19ab1ef4b
streamline indexPatternTitle usage (#60999)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-24 20:24:37 +00:00
Vadim Dalecky 5abb2c8c7d
Drilldowns (#59632)
* Add drilldown wizard components

* Dynamic actions (#58216)

* feat: 🎸 add DynamicAction and FactoryAction types

* feat: 🎸 add Mutable<T> type to @kbn/utility-types

* feat: 🎸 add ActionInternal and ActionContract

* chore: 🤖 remove unused file

* feat: 🎸 improve action interfaces

* docs: ✏️ add JSDocs

* feat: 🎸 simplify ui_actions interfaces

* fix: 🐛 fix TypeScript types

* feat: 🎸 add AbstractPresentable interface

* feat: 🎸 add AbstractConfigurable interface

* feat: 🎸 use AbstractPresentable in ActionInternal

* test: 💍 fix ui_actions Jest tests

* feat: 🎸 add state container to action

* perf: ️ convert MenuItem to React component on Action instance

* refactor: 💡 rename AbsractPresentable -> Presentable

* refactor: 💡 rename AbstractConfigurable -> Configurable

* feat: 🎸 add Storybook to ui_actions

* feat: 🎸 add <ErrorConfigureAction> component

* feat: 🎸 improve <ConfigureAction> component

* chore: 🤖 use .story file extension prefix for Storybook

* feat: 🎸 improve <ErrorConfigureAction> component

* feat: 🎸 show error if dynamic action has CollectConfig missing

* feat: 🎸 render sample action configuration component

* feat: 🎸 connect action config to <ConfigureAction>

* feat: 🎸 improve <ConfigureAction> stories

* test: 💍 add ActionInternal serialize/deserialize tests

* feat: 🎸 add ActionContract

* feat: 🎸 split action Context into Execution and Presentation

* fix: 🐛 fix TypeScript error

* refactor: 💡 extract state container hooks to module scope

* docs: ✏️ fix typos

* chore: 🤖 remove Mutable<t> type

* test: 💍 don't cast to any getActions() function

* style: 💄 avoid using unnecessary types

* chore: 🤖 address PR review comments

* chore: 🤖 rename ActionContext generic

* chore: 🤖 remove order from state container

* chore: 🤖 remove deprecation notice on getHref

* test: 💍 fix tests after order field change

* remove comments

Co-authored-by: Matt Kime <matt@mattki.me>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* Drilldown context menu (#59638)

* fix: 🐛 fix TypeScript error

* feat: 🎸 add CONTEXT_MENU_DRILLDOWNS_TRIGGER trigger

* fix: 🐛 correctly order context menu items

* fix: 🐛 set correct order on drilldown flyout actions

* fix: 🐛 clean up context menu building functions

* feat: 🎸 add context menu separator action

* Add basic ActionFactoryService. Pass data from it into components instead of mocks

* Dashboard x pack (#59653)

* feat: 🎸 add dashboard_enhanced plugin to x-pack

* feat: 🎸 improve context menu separator

* feat: 🎸 move drilldown flyout actions to dashboard_enhanced

* fix: 🐛 fix exports from ui_actions plugin

* feat: 🎸 "implement" registerDrilldown() method

* fix ConfigurableBaseConfig type

* Implement connected flyout_manage_drilldowns component

* Simplify connected flyout manage drilldowns component. Remove intermediate component

* clean up data-testid workaround in new components

* Connect welcome message to storage

Not sure, but use LocalStorage. Didn’t find a way to persist user settings. looks like uiSettings are not user scoped.

* require `context` in Presentable. drill context down through wizard components

* Drilldown factory (#59823)

* refactor: 💡 import storage interface from ui_actions plugin

* refactor: 💡 make actions not-dynamic

* feat: 🎸 fix TypeScript errors, reshuffle types and code

* fix: 🐛 fix more TypeScript errors

* fix: 🐛 fix TypeScript import error

* Drilldown registration (#59834)

* feat: 🎸 improve drilldown registration method

* fix: 🐛 set up translations for dashboard_enhanced plugin

* Drilldown events 3 (#59854)

* feat: 🎸 add serialize/unserialize to action

* feat: 🎸 pass in uiActions service into Embeddable

* feat: 🎸 merge ui_actions oss and basic plugins

* refactor: 💡 move action factory registry to OSS

* fix: 🐛 fix TypeScript errors

* Drilldown events 4 (#59876)

* feat: 🎸 mock sample drilldown execute methods

* feat: 🎸 add .dynamicActions manager to Embeddable

* feat: 🎸 add first version of dynamic action manager

* Drilldown events 5 (#59885)

* feat: 🎸 display drilldowns in context menu only on one embed

* feat: 🎸 clear dynamic actions from registry when embed unloads

* fix: 🐛 fix OSS TypeScript errors

* basic integration of components with dynamicActionManager

* fix: 🐛 don't overwrite explicitInput with combined input (#59938)

* display drilldown count in embeddable edit mode

* display drilldown count in embeddable edit mode

* improve wizard components. more tests.

* partial progress, dashboard drilldowns (#59977)

* partial progress, dashboard drilldowns

* partial progress, dashboard drilldowns

* feat: 🎸 improve dashboard drilldown setup

* feat: 🎸 wire in services into dashboard drilldown

* chore: 🤖 add Storybook to dashboard_enhanced

* feat: 🎸 create presentational <DashboardDrilldownConfig>

* test: 💍 add <DashboardDrilldownConfig> stories

* test: 💍 use presentation dashboar config component

* feat: 🎸 wire in services into React component

* docs: ✏️ add README to /components folder

* feat: 🎸 increase importance of Dashboard drilldown

* feat: 🎸 improve icon definition in drilldowns

* chore: 🤖 remove unnecessary comment

* chore: 🤖 add todos

Co-authored-by: streamich <streamich@gmail.com>

* Manage drilldowns toasts. Add basic error handling.

* support order in action factory selector

* fix column order in manage drilldowns list

* remove accidental debug info

* bunch of nit ui fixes

* Drilldowns reactive action manager (#60099)

* feat: 🎸 improve isConfigValid return type

* feat: 🎸 make DynamicActionManager reactive

* docs: ✏️ add JSDocs to public mehtods of DynamicActionManager

* feat: 🎸 make panel top-right corner number badge reactive

* fix: 🐛 correctly await for .deleteEvents()

* Drilldowns various 2 (#60103)

* chore: 🤖 address review comments

* test: 💍 fix embeddable_panel.test.tsx tests

* chore: 🤖 clean up ActionInternal

* chore: 🤖 make isConfigValid a simple predicate

* chore: 🤖 fix TypeScript type errors

* test: 💍 stub DynamicActionManager tests (#60104)

* Drilldowns review 1 (#60139)

* refactor: 💡 improve generic types

* fix: 🐛 don't overwrite icon

* fix: 🐛 fix x-pack TypeScript errors

* fix: 🐛 fix TypeScript error

* fix: 🐛 correct merge

* Drilldowns various 4 (#60264)

* feat: 🎸 hide "Create drilldown" from context menu when needed

* style: 💄 remove AnyDrilldown type

* feat: 🎸 add drilldown factory context

* chore: 🤖 remove sample drilldown

* fix: 🐛 increase spacing between action factory picker

* workaround issue with closing flyout when navigating away

Adds overlay just like other flyouts which makes this defect harder to bump in

* fix react key issue in action_wizard

* don’t open 2 flyouts

* fix action order

https://github.com/elastic/kibana/issues/60138

* Drilldowns reload stored (#60336)

* style: 💄 don't use double equals __

* feat: 🎸 add reload$ to ActionStorage interface

* feat: 🎸 add reload$ to embeddable event storage

* feat: 🎸 add storage syncing to DynamicActionManager

* refactor: 💡 use state from DynamicActionManager in React

* fix: 🐛 add check for manager being stopped

* Drilldowns triggers (#60339)

* feat: 🎸 make use of supportedTriggers()

* feat: 🎸 pass in context to configuration component

* feat: 🎸 augment factory context

* fix: 🐛 stop infinite re-rendering

* Drilldowns multitrigger (#60357)

* feat: 🎸 add support for multiple triggers

* feat: 🎸 enable Drilldowns for TSVB

Although TSVB brushing event is now broken on master, KibanaApp plans to
fix it in 7.7

* "Create drilldown" flyout - design cleanup (#60309)

* create drilldown flyout cleanup

* remove border from selectedActionFactoryContainer

* adjust callout in DrilldownHello

* update form labels

* remove unused file

* fix type error

Co-authored-by: Anton Dosov <anton.dosov@elastic.co>

* basic unit tests for flyout_create_drildown action

* Drilldowns finalize (#60371)

* fix: 🐛 align flyout content to left side

* fix: 🐛 move context menu item number 1px lower

* fix: 🐛 move flyout back nav chevron up

* fix: 🐛 fix type check after refactor

* basic unit tests for drilldown actions

* Drilldowns finalize 2 (#60510)

* test: 💍 fix test mock

* chore: 🤖 remove unused UiActionsService methods

* refactor: 💡 cleanup UiActionsService action registration

* fix: 🐛 add missing functionality after refactor

* test: 💍 add action factory tests

* test: 💍 add DynamicActionManager tests

* feat: 🎸 capture error if it happens during initial load

* fix: 🐛 register correctly CSV action

* feat: 🎸 don't show "OPTIONS" title on drilldown context menus

* feat: 🎸 add server-side for x-pack dashboard plugin

* feat: 🎸 disable Drilldowns for TSVB

* feat: 🎸 enable drilldowns on kibana.yml feature flag

* feat: 🎸 add feature flag comment to kibana.yml

* feat: 🎸 remove places from drilldown interface

* refactor: 💡 remove place in factory context

* chore: 🤖 remove doExecute

* remove not needed now error_configure_action component

* remove workaround for storybook

* feat: 🎸 improve DrilldownDefinition interface

* style: 💄 replace any by unknown

* chore: 🤖 remove any

* chore: 🤖 make isConfigValid return type a boolean

* refactor: 💡 move getDisplayName to factory, remove deprecated

* style: 💄 remove any

* feat: 🎸 improve ActionFactoryDefinition

* refactor: 💡 change visualize_embeddable params

* feat: 🎸 add dashboard dependency to dashboard_enhanced

* style: 💄 rename drilldown plugin life-cycle contracts

* refactor: 💡 do naming adjustments for dashboard drilldown

* fix: 🐛 fix Type error

* fix: 🐛 fix TypeScript type errors

* test: 💍 fix test after refactor

* refactor: 💡 rename context -> placeContext in React component

* chore: 🤖 remove setting from kibana.yml

* refactor: 💡 change return type of getAction as per review

* remove custom css per review

* refactor: 💡 rename drilldownCount to eventCount

* style: 💄 remove any

* refactor: 💡 change how uiActions are passed to vis embeddable

* style: 💄 remove unused import

Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
Co-authored-by: Matt Kime <matt@mattki.me>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
2020-03-24 08:31:29 +01:00
Joe Reuter 3e26777965
Migrate doc view part of discover (#58094) 2020-03-24 07:27:15 +01: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
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
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
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
Chandler Prall 0bf62cbf3e
Upgrade EUI to 21.0.1 (#60282)
* update to eui 21.0.1

* most changes needed for search bar ts changes

* Passing types

* snapshots

* jest tests

* Removed IQuery placeholder types

* Updated functional test to only look at table headers with content

* Moved 'filters' definition around in api docs

* Update types

* update snapshot

* typo

* Move DATA_FRAME_TASK_STATE enum to its own file to fix x-pack functional test config imports

* merge public api 'changes'

Co-authored-by: patrykkopycinski <patryk.kopycinski@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
2020-03-20 14:07:04 -06:00
Marco Vettorello 88612743a9
Update dependency @elastic/charts to v18.1.0 (#60578) 2020-03-20 17:37:11 +01:00
Dmitry Lemeshko 992c502cf5
WebElementWrapper: add findByTestSubject/findAllByTestSubject to search with data-test-subj (#60568)
* [web_element_wrapper] add find/findAll to search with data-test-subj

* fixes

* fix wrong function call

* review fixes

* simplify test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-20 17:18:35 +03:00
Pierre Gayvallet c638cc2a11
fix test description (#60638) 2020-03-20 07:17:00 +01:00
Pierre Gayvallet 395d621249
migrate saved objects management edition view to react/typescript/eui (#59490)
* migrate so management edition view to react

* fix bundle name + add forgotten data-test-subj

* add FTR tests for edition page

* EUIfy react components

* wrap form with EuiPanel + caps btns labels

* Wrapping whole view in page content panel and removing legacy classes

* improve delete confirmation modal

* update translations

* improve delete popin

* add unit test on view components

* remove kui classes & address comments

* extract createFieldList and add tests

* disable form submit during submition

Co-authored-by: cchaos <caroline.horn@elastic.co>
2020-03-19 14:09:44 +01:00
Gidi Meir Morris 8fd317c55a
[Alerting] Adds navigation by consumer and alert type to alerting (#58997)
Adds Navigation APIs to Alerting.

Parts to this PR:

Adds a client side (Public) plugin to Alerting, including two APIs: registerNavigation & registerDefaultNavigation. These allow a plugin to register navigation handlers for any alerts which it is the consumer of- one for specific AlertTypes and one for a default handler for all AlertTypes created by the plugin.
The Alert Details page now uses these navigation handlers for the View In App button. If there's an AlertType specific handler it uses that, otherwise it uses a default one and if the consumer has not registered a handler - it remains disabled.
A generic Alerting Example plugin that demonstrates usage of these APIs including two AlertTypes - one that always fires, and another that checks how many people are in Outer Space and allows you to trigger based on that. 😉 To enable the plugin run yarn start --ssl --run-examples
2020-03-19 09:49:05 +00:00
Robert Oskamp 836b3d00ef
[ML] Add functional tests for file data visualizer (#60413)
This PR adds basic functional tests for the file data visualizer, covering a file import and error messages for non-log files. It also moves the file input path handling to a common location in order to avoid code duplication.
2020-03-19 09:08:43 +01:00
Dave Snider 52dd5e0f7a
Branding fixes for dashboard, loader and space selector (#60073) 2020-03-18 10:15:47 -07:00
Rashmi Kulkarni 89f9260da2
FTR configurable test users (#52431)
* initial implementation of configurable test users

* user superuser by default to match master

* referenced the configs in reporting and api integration

* setting the minimum number of default roles

* looking for x-pack tests with users and roles

* add testUserService in dashboard mode tests

* running only ciGroup7

* uncommenting - addign visualization

* re-enabling all CI groups to run on CI

* reinstating Jenkinsfile

* disable Test user for OIDC config

* improved logging and added Roles for OSS tests to get better info on the runs.

* disable test_user for auth tests

* don't fetch enabledPlugins when testuser disabled

* fix es-lint

* running oss tests with x-pack enabled

* [revertme] build default dist for oss tests

* updating NOTICE.txt file as it complained in the kibana intake tests

* changed to pick OSS builds

* trying a license change to trial

* switch back to xpack builds

* created a new sample data role and used it in homepage tests

* revert test/scripts/jenkins_ci_group.sh

* only refresh browser and wait for chrome if we are already on Kibana page

* fix large_string test to use minimum set of roles and privileges

* fix for date nanos custom timestamp with a configured role

* changes to the files with addition of new roles for the test_user

* reverting to OSS changes and few additions to the time_zone test to run as a test_user

* changes to security

* changes to the x-pack test to use elastic superuser

* fix for chart_types test

* fixes to area chart , input control test

* fix for dashboard filtering test and a new config role

* changes to handle the x-pack tests

* additional role for date nanos mixed

* added the logstash role to the accessibility tests

* removed telemetry setting

* docs+few changes to the tests

* removed Page navigation

* removed pageNavigation which was unused

* test/accessibility/apps/management.ts

* update management.ts

* aria label, and other changes

* accidentally checked in a piped file with results.

* accidentally checked in a piped file with results.

* accidentally checked in a piped file with results.

* accidentally checked in a piped file with results.

* accidentally checked in a piped file with results.

* accidentally checked in a piped file with results.

* accidentally checked in a piped file with results.

* accidentally checked in a piped file with results.

* reverted

* unloading of logstash data, fixing aria label

* aria-label

* added the required role

* fix for tsvb chart

* fix for sample data test reverted home_page pageobject file

* changes to sample data test and visualize index file to incorporate OSS changes

* changes to describe() and some more changes to incorporate in settings_page

* re-adding the after()

* removed unwanted roles

* replaced kibana_user with kibana_admin

* added the check of deprecated kibana_user

* testing with kibana_admin  role

* fix for discover test

* incorporated the review comments

* incorporated the review comments

* incorporate review comments and added restoreDefaults()

* removed describe.only

* reverted the OSS logic change I had here- pulled into seperate PR

* incorporated the review comments

* incorporated review changes

* adding hidden=true to find hidden kibanaChrome

* change field.test.tsx to be same as that of master branch

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-17 10:41:23 -07:00
Larry Gregory 9318862f19
Allow kbn-config-schema to ignore unknown keys (#59560)
* allow kbn-config-schema to ignore unknown keys

* Consolidate unknown key configuration

* updates following merge

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-17 12:30:17 -04:00
Stacey Gammon dccfa593dc
Embeddable API cleanup (#60207)
* wip

* Remove test in legacy functional plugin
2020-03-16 15:37:42 -04:00
Mikhail Shustov dd7531deb4
Add UiSettings validation & Kibana default route redirection (#59694)
* add schema to ui settings params

* add validation for defaults and overrides

* validate in ui settings client

* ui settings routes validation

* clean up tests

* use schema for defaultRoutes

* move URL redirection to NP

* fix spaces test

* update docs

* update kbn pm

* fix karma test

* fix tests

* address comments

* get rid of getDEfaultRoute

* regen docs

* fix tests

* fix enter-spaces test

* validate on relative url format

* update i18n

* fix enter-spoace test

* move relative url validation to utils

* add CoreApp containing application logic

* extract public uiSettings params in a separate type

* make schema required

* update docs
2020-03-16 14:30:20 +01:00