Commit graph

3843 commits

Author SHA1 Message Date
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
Rashmi Kulkarni 4b2231dc62
OSS logic added to test environment (#60134)
* OSS logic added

* reverting the logic of isOSS()

TileMap and RegionMap are on OSS but not on x-pack because it has Maps.
2020-03-13 14:39:14 -07:00
Stacey Gammon b9e9311d1f
rename dashboard_embeddable_container to dashboard (#59898)
* rename dashboard_embeddable_container to dashboard

* codeowners & typo

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-13 12:55:21 -04:00
Bhavya RM 526972e631
More a11y tests on index pattern page (#59575)
more a11y tests on index pattern page!
2020-03-13 12:21:05 -04:00
Alexey Antonov 9d00427aef
Downgrade to query-string v5.1.1 (#59633)
* Downgrade to query-string v5.1.1

* update lib version for x-pack

* fix JEST

* fix functional tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-13 17:27:09 +03:00
Dmitry Lemeshko dcabe3a256
unskip tests for code coverage (#59725)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-12 19:01:51 -05:00
Rudolf Meijering 80e6ff729a
Make context.core required argument to context providers (#59996)
* Make context.core required argument to context providers

* Refactor plugins: context.core isn't optional anymore

* Update docs
2020-03-12 20:39:29 +01:00
spalger 25c33fcb15 skip flaky suite (#59717) 2020-03-12 09:50:20 -07:00
Bhavya RM 078ff55865
a11y tests on adding columns to discover table (#59375)
* a11y tests on adding columns
2020-03-12 08:31:59 -04:00
Spencer c874df1847
update typescript version in all packages to avoid warnings (#59787)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-03-10 11:37:02 -07:00
Brian Seeders 1b0d1f1c51
Add a retry to dashboard test for a sometimes slow async operation (#59600) 2020-03-10 12:45:49 -04:00
Pierre Gayvallet f1272b5ffe
Add SavedObject management section registration in core (#59291)
* add management section to SavedObjectsType

* adapt import/export routes to get types accessor

* add documentation

* update generated doc

* update migration guide

* use request context to access exportable types

* update generated doc

* adapt SavedObjectsManagement to use the registry

* stop magical tricks about the config type, register it as any other so type.

* fix FTR assertions

* fix so_mixin tests

* register the `config` type from the uiSettings service

* nits and comments

* update generated doc

* remove true from dynamic property definition, use force-cast back for config type

* remove obsolete test comment
2020-03-10 11:13:45 +01:00
Thomas Watson a663f65bcc
Harden creation of child processes (#55697)
Add general protection against RCE vulnerabilities similar to the one
described in CVE-2019-7609.

Closes #49605
2020-03-10 07:51:57 +01:00
Matthias Wilhelm e630950a3d
[Discover] Migrate AppState/GlobalState to new app state helpers (#57175)
* Replace AppState

* Replace GlobalState

* Adapt functional test

* Sync initial app state to URL

* Add jest tests

* Refactoring to use use-default-behaviors="true" in kbn-top-nav

* Cleanup code remove unnecessary imports and variables

* Refactor to use syncQueryStateWithUrl & stopSyncingQueryAppStateWithStateContainer

* Remove discoverPersistedState

* Allow indexPattern switch without $route.reload()

* Remove timeRangeObj because it's not needed

* Create new getDefaultQuery in data plugin

* Simplify check for null in sync_state_with_url.ts

* Remove unused stateMonitorFactory

Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
2020-03-09 18:45:14 +01:00
Peter Pisljar a6489aa70e
additional visualizations plugin cleanup before moving to NP (#59318) 2020-03-09 13:11:05 +01:00
Brian Seeders ac9c192234
Navigate back to discover app during test, because the saved search from the preceding test has major performance problems when used with this test (#59571) 2020-03-06 16:04:11 -05:00
Pierre Gayvallet 45fb6f38b8
Hide input value from kbn-config-schema error messages (#58843)
* use inline snapshots instead of snapshots

* hide input value from error messages

* update core snapshots

* update xpack snapshots

* fix ftr assertions

* fix new snapshots

* hide values for byte_size and duration

* update new snapshots

* remove another byte_size value reference

* fix yet another value references in error messages

* update xpack snapshots

* update xpack ftr assertions
2020-03-06 17:47:28 +01:00
Spencer 5408f45b52
expand max-old-space-size for xpack jest tests (#59455)
* expand max-old-space-size for xpack jest tests

* turns out we are already at 4GB

* limit to 6GB for now
2020-03-05 15:59:33 -07:00
Spencer 4bc9e8b4a8
Fix visual baseline job (#59348)
* Establish Percy baselines

* move Jenkinsfile changed back to `.ci` directory

* rename xpack workers

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-05 13:01:42 -07:00
Chandler Prall 096dda6f34
Upgrade EUI to v20.0.2 (#59199)
* Updated EUI to 20.0.1; updated typescript usage

* snapshots

* Upgrade to eui 20.0.2, fix one more type

* PR feedback

* Update EUI icon usage to the correct types

* Updated with master
2020-03-05 12:27:52 -07:00
Lee Drengenberg e0022be6d3
wait for any text in dialog (#59352)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-05 13:08:29 -06:00
Dmitry Lemeshko c42bd33e1e
Convert discover_page to ts, remove redundunt methods (#59312)
* convert discover_page to ts

* remove deuplicated methods, improve tests
2020-03-05 15:56:25 +03:00
Lee Drengenberg 754e6f1e77
move mouse to close obstructing tooltip (#59214)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-04 14:03:57 -06:00
Lee Drengenberg 07edafdfa7
fixes 'management scripted fields preview should display additional fields' when run with a HEAD (#59213)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-04 12:23:58 -06:00
Lee Drengenberg 455b2f5047
Have to click save after resetting advanced setting to default (#59216)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-04 11:28:59 -06:00
Stacey Gammon d2cbc59ad4
Further improve type checking for actions and triggers (#58765)
* wip

* review follow up

* make ACTION a prefix, not SUFFIX

* fix path

* add warnings about casting to ActionType

* Make context  an object in examples, not a string

* require object context, which seems to fix the partial requirement in type and thus the type issue

* mistake

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-04 10:27:14 -05:00
Bhavya RM 2361fe62cd
calling exitFullScreenMode in test (#59238)
exitFullScreenMode in fullscreen dashboard test
2020-03-04 09:41:32 -05:00
Aleh Zasypkin 18c3e8caf8
Migrate security chromeless views to Kibana Platform plugin (#54021)
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
2020-03-04 09:35:52 +01:00
Joe Reuter e4f4ac7cfa
stabilize dashboard snapshot toast closing (#58709) 2020-03-03 21:39:22 +01:00
Nathan Reese ea43dcede0
[Maps] add functional test to ensure visualize create menu only shows Maps app (#58746)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-03 12:23:43 -07:00
Dmitry Lemeshko 464f9071e9
Code coverage: skip failing tests for coverage run (#59121)
* filter out failing tests

* more skipped tests

* fix tests

* move json files to save space
2020-03-03 20:05:13 +03:00
MadameSheema 02f89f04cc
[SIEM] Cypress preparation for Jenkins (#59013)
* updates events viewer test

* updates login tasks

* updates ml conditional links

* updates url state

* updates timeline screen

* updates timeline tasks

* updates test files

* adds jenkins needed files

* ignoring isAttached lines due to a known error in Cypress (https://github.com/cypress-io/cypress/issues/4408)

* updates loop script

* updates readme with new cypress command explanation

* removes skip

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-03 17:51:35 +01:00
Daniil Suleiman 166716a405
[Visualize] Move linked search to react component (#58590)
* Move linked_search to react

* Use i18n from start contract

* Move linked search to the editor

* Updating layout and fixing truncation

* Fix functional test, add a tooltip

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
2020-03-03 12:39:52 +03:00
Maja Grubic b7c8e3a252
Dashboard a11y tests (#58122)
* adding comprehensive dashboard tests

* fixing delete and adding dima changes

* Fixing some of the a11y test failures

* Fixing i18n issue

* Extracting exit fullscreen logic in a separate function

* Fixing typo

* Upgrading axe

* Fixing failing jest tests

* Removing main tag as it was causing a test to fail

* Adding focusable=false to a range control as well

* Update test/accessibility/apps/dashboard.ts

Co-Authored-By: Michail Yasonik <michail.yasonik@elastic.co>

* Fixing linting error

* Update src/legacy/core_plugins/input_control_vis/public/components/vis/list_control.tsx

Co-Authored-By: Michail Yasonik <michail.yasonik@elastic.co>

* Add comments

Co-authored-by: Bhavya RM <bhavya@elastic.co>
Co-authored-by: Michail Yasonik <michail@yasonik.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-02 20:56:07 +00:00
Brian Seeders c90cfe208d
[CI] Pipeline refactoring (#56447) 2020-03-02 15:04:27 -05:00
Nathan Reese 2998ec06fe
[Maps] direct Discover "visualize" to open Maps application (#58549)
* [Maps] direct Discover visualize to Maps application

* pass initial layers to maps app

* add functional test

* fix parentheses messed up by lint fix

* fix i18n expression

* move logic into lib

* fix typescript errors

* use constant for geo_point and geo_shape, more TS noise

* use encode_array in an attempt to make TS happy

* another round of TS changes

* one more thing

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-02 11:47:35 -07:00
Peter Pisljar c81e0da584
removing references to visTypes uiExports (#58337) 2020-03-02 12:01:00 -05:00
Patrick Mueller 100c570219
change to have kibana --ssl cli option use more recent certs (#57933)
* change to have --ssl cli option use more recent certs
* also configure 'server.ssl.certificateAuthorities' per PR review
* delete theoretically now-unused ssl creds
2020-02-28 17:23:56 -05:00
Stacey Gammon ad0aa12296
Improve action and trigger types (#58657)
* Improve types so emitting the wrong context shape complains, as does using a trigger id that has not been added to the trigger context mapping.

* remove unneccessary code
2020-02-28 12:12:03 -05:00
Spencer 4fd3b45b44
fix some missing awaits in functional tests (#58807) 2020-02-27 20:22:42 -07:00
spalger facae44f5b skip flaky suite (#53888) 2020-02-27 18:03:04 -07:00
Spencer 841e64e0c1
run jest with --detectOpenHandles on CI to figure out what i… (#58543)
* run jest with `--detectOpenHandles` on CI to figure out what is happening with pauses

* focus tests on jest integration

* force kill child processes in config reload test

* skip flaky suite

* increase timeout for looking for installed packages

* run all tests again
2020-02-27 14:19:24 -07:00
Matthias Wilhelm a8380cf52b
[Discover] Fix incorrect filter generated by "Filter for field present" (#58586)
* Fix _exists_ filter handling 

* Add functional test
2020-02-27 16:08:37 +01:00
Josh Dover 4cb9bc4472
Add ScopedHistory to AppMountParams (#56705) 2020-02-26 12:43:12 -07:00
Michail Yasonik 8511fe3780
Fixing Newsfeed Cloud test bug (#58566) 2020-02-26 12:17:00 -05:00
Wylie Conlon 613e4b9b15
Median label shows "Median" instead of "50th percentile of" (#58521)
* Median label shows "Median" instead of "50th percentile of"

* Update test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 11:33:42 -05:00
Joe Reuter 08e27d08e9
refresh once to make sure everything is fetched (#58225) 2020-02-26 11:34:53 +01:00
Joe Reuter dfcd4d1e93
Functional tests: Fix saved object management button click retry (#58218) 2020-02-26 11:34:11 +01:00
Matthias Wilhelm fac57c1cca
[Visualize] Improve linked saved search functional test (#58339)
* Remove redundant sleep 
* convert to TypeScript
2020-02-25 18:25:11 +01:00
liza-mae c1dede78fb
Add a way to disable certificate verification for FTR. (#58386)
* Add a way to disable certificate verification for FTR.

* Remove other options

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-25 09:21:30 -07:00
Marta Bondyra c6f5fdd061
Advanced settings UI change to centralize save state (#53693) 2020-02-24 17:42:34 +01:00
Michail Yasonik 5cfc5ef9ff
Reverting grouped nav UI (#57724)
* reverting grouped nav ui

* removing Management name change
2020-02-20 09:14:11 -05:00
Dmitry Lemeshko d6aff77485
remove NODE_ENV=test (#58037)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-20 13:12:04 +01:00
Daniil Suleiman 0b644117b8
[Visualize] Remove legacy appState in visualize (#57330)
* Remove legacy appState in visualize

* Read query and linked prop from scope

* Fix persisted state instance

* Fix functional tests

* Bound url updates with an editor

* Some improvements

* Fix comments
2020-02-20 13:40:34 +03:00
Stacey Gammon 63cfffbe11
Embeddable add panel examples (#57319)
* Embeddable add panel examples

* add tests

* Fix type error after merge

* address code review comments

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-19 15:16:58 -05:00
Dmitry Lemeshko faac5be34c
replace Promise.all with for loop for clicks (#57909)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-19 13:54:56 +01:00
Matthias Wilhelm 02e0903766
[Discover] Add check for the open perma link for cloud testing (#57884)
- fixes a functional test failure in cloud
2020-02-19 08:39:33 +01:00
Spencer 8f37f6e10c
Unskip flaky tests (#57715)
* Revert "Skip flaky test (#57675)"

This reverts commit c965a9efa8.

* Revert "disable firefox smoke tests so we can fix flakiness out of band"

This reverts commit fe3864282a.

* Revert "skip flaky tests (#57643)"

This reverts commit b22045433e.

* Revert "skip flaky suite (#50018)"

This reverts commit b058dc2fe7.

* Revert "skip settings tests (#57608)"

This reverts commit 64625b282c.

* Revert "skip failing suite (#44631)"

This reverts commit 8aa718d11e.

* Revert "skip flaky suite (#44631)"

This reverts commit 6e4efdfa7c.

* Revert "skip flaky test (#57377)"

This reverts commit 59672ab5da.

* Revert "Skip save query tests (#57589)"

This reverts commit 431a1e9c89.

* remove hard coded timeouts

* Revert "Revert "disable firefox smoke tests so we can fix flakiness out of band""

This reverts commit 271f8814d5.

* Revert "remove hard coded timeouts"

This reverts commit 8b843d0aa6.

* wait for managementHome to exist, don't bail early if it's missing

* Revert "skip flaky suite (#45244)"

This reverts commit 0cee1a4adb.

* extend timeouts for common existsOrFail() calls

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-18 19:11:05 -07:00
Michail Yasonik 0160aa4211
Fixing console a11y failures (#57520) 2020-02-18 17:44:25 -05:00
Jonathan Budzenski 76d475a64c
Refactor test entry by runner (#44679)
Over the last few years we've increased the number of test runners.
Entry points by test type have become too lage of a category for unique
names, so this moves top level test scripts under yarn and replaces test
types with the runner name.

e.g. `yarn test:browser` -> `yarn test:karma`

Closes #41133

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-18 16:21:36 -06:00
Kerry Gallagher 0a6c748cc8
[Logs / Metrics] New Platform migration (full cutover) (#54583)
* Fully migrates metrics and logs to the NP

Co-authored-by: Jason Rhodes <jason.matthew.rhodes@gmail.com>
Co-authored-by: John Schulz <github.com@jfsiii.org>
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
2020-02-18 19:22:27 +00:00
Pierre Gayvallet 055c61110f
migrate savedObjects routes to core (#56734)
* migrate `get` route

* migrate `create` route

* migrate `delete` route

* migrate `find` route

* migrate `update` route

* migrate `bulk_get` route

* migrate `bulk_create` route

* remove route-related mixin tests

* migrate `bulk_update` route

* fix expectTypeRequired assertion

* migrate `log_legacy_imports` route

* migrate `export` route

* fix karma tests

* array is better than object in some situations.

* remove prototype pollution tests

* adapt ftr assertions

* adapt ftr assertions

* adapt yet more ftr assertions

* migrate `import` route

* fix test tests

* fix getSortedObjectsForExport usages

* fix snapshots

* fix so ui exports usages due to merge

* create router with prefix

* creates `savedObjects` namespace config in addition to `migrations`

* migrate `resolve_import_errors` route

* remove old types file

* fix FTR assertion

* remove types parameter from copy_to_space

* move route tests to integration_tests

* use byteSize instead of number

* fix unit tests

* add has_reference query parameter

Co-authored-by: Mikhail Shustov <restrry@gmail.com>
2020-02-18 15:40:21 +01:00
Vadim Dalecky 85d737c401
ExecutionContract (#57559)
* feat: 🎸 add ExecutionContract class

* test: 💍 add Execution and Executor tests

* feat: 🎸 add .execute() method to ExpressionsService

* refactor: 💡 replace ExpressionDataHandler by ExecutionContract

* fix: 🐛 fix TypeScript typecheck errors

* docs: ✏️ add JSDocs to ExecutionContract

* refactor: 💡 make .ast and .expresions both optional

* test: 💍 fix test

* test: 💍 fix a test

* test: 💍 fix interpreter functional tests
2020-02-17 15:02:21 +01:00
Greg Thompson 0abfd3c72f
Upgrade EUI to v19.0.0 (#57284)
* eui to v19.0.0

* typescript updates; idAria removal

* src snapshot updates

* mock euicode and euicodeblock for jest

* x-pack snapshot updates

* mock euicode for jest

* more euicode snapshots

* mock euicode in storyshots

* types/enzyme yarn.lock

* sidenav type update
2020-02-14 13:06:31 -06:00
Anton Dosov 098a55a83c
unskip replace flyout test (#57093)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-14 14:07:00 +01:00
Matthias Wilhelm 009d350351
[Discover] Improve functional test of context (#57575)
By converting adding filters to a sequential mode, the test of clicking on a context link in the discover table should no longer be flaky
2020-02-14 09:28:35 +01:00
Lee Drengenberg 04ec3535eb
handle viewing sample dashboards on default dist (#57510)
* handle viewing sample dashboards on default dist

* re-work change to not break jest test

* Update snap for addition of data-test-subj
2020-02-13 15:45:37 -06:00
Ahmad Bamieh 06df2b0db6
[Telemetry] Migrate public to NP (#56285)
* NP telemetry plugin barebones

* fully migrate telemetry sender

* license plugin to use NP telemetry

* fully migrated public to NP

* finish components testing

* fix all tests

* self code review

* remove commented code

* bracket notication for private methods

* bracket notication for private methods

* update license management tests

* afharo code review fixes

* type safe private method access in tests

* fix typecheck

* more type check fixes

* i18n check

* fix welcome page tests

* i18n optedInNoticeBanner title

* fix advanced settings field settings

* field name

* fix home snapshots

* listen to app id change

* NP code review fixes

* NP code review fixes

* update telemetry configs with np deprecations

* pass telemetry from setup instead of npStart

* type check

* update core snapshots with new api exposed

* remove debugging logs

* update home contract

* update home contract

* fix test eslint import

* navigate back to dashboard before start of next case for reporting

* gitignore reporting failure_debug generated dir

* use gotoDashboardEditMode instead of switch

* = instead of :

* merge master

* escape unused forced types in Field

* rename mock to mocks for eslint

* Update src/plugins/telemetry/public/components/telemetry_management_section.tsx

Co-Authored-By: Alejandro Fernández Haro <afharo@gmail.com>

* fix save/clear type

Co-authored-by: Alejandro Fernández Haro <afharo@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-13 09:44:01 +02:00
Spencer 4e8ab56497
build immutable bundles for new platform plugins (#53976)
* build immutable bundles for new platform plugins

* only inspect workers if configured to do so

* [navigation] use an index.scss file

* add yarn.lock symlink

* set pluginScanDirs in test so fixtures stay consistent

* cleanup helpers a little

* fix type error

* support KBN_OPTIMIZER_MAX_WORKERS for limiting workers via env

* test support for KBN_OPTIMIZER_MAX_WORKERS

* expand the available memory for workers when only running one or two

* add docs about KBN_OPTIMIZER_MAX_WORKERS environment variable

* fix README link

* update kbn/pm dist

* implement bundle caching/reuse

* update kbn/pm dist

* don't check for cache if --no-cache is passed

* update renovate config

* standardize on index.scss, move console styles over

* add support for --no-cache to cli

* include worker config vars in optimizer version

* ignore concatenated modules

* update integration test

* add safari to browserslist to avoid user-agent warnings in dev

* update docs, clean up optimizer message/misc naming

* always handle initialized messages, don't ignore states that are attached to specific events

* reword caching docs, add environment var to disable caching

* tweak logging and don't use optimizer.useBundleCache as that's disabled in dev

* handle change notifications

* batch changes for 1 second

* rename CompilerState type to CompilerMsg

* getChanges() no longer needs to assign changes to dirs

* remove unused deps

* split up run_worker.ts and share cacheKey generation logic

* add a couple docs

* update tests and remove unused imports

* specify files when creating bundle cache key

* remove one more unused import

* match existing dev cli output more closely

* update kbn/pm dist

* set KBN_NP_PLUGINS_BUILT to avoid warning in CI

* avoid extending global window type

* add note to keep pluginScanDirs in sync

* pass browserslistEnv in workerConfig so it is used for cache key

* load commons.bundle.js in parallel too

* emit initialized+success states if all bundles are cached

* load bootstraps as quickly as possible

* skip flaky suite

* bump

* update jest snapshots

* remove hashing from cache key generation

* remove unnecessary non-null assertion

* improve docs and break up Optimizer#run()

* remove unused import

* refactor kbn/optimizer to break up observable logic, implement more helpful cache invalidation logic with logging

* fix tests

* add initializing phase

* avoid rxjs observable constructor

* remove unnecessary rxjs helper, add tests for bundle cache

* update consumers of optimizer

* update readme with new call style

* replace "new platform" with "kibana platform"

* fix a couple more renames

* add support for several plain-text file formats

* fix naming of OptimizerMsg => OptimizerUpdate, use "store" naming too

* one more OptimizerMsg update

* ensure bundles are not cached when cache config is false

* test for initializing states and bundle cache events

* remove unnecessary timeout change

* Remove unnecessary helpers

* Add tests for BundleCache class

* Add tests for Bundle class

* test summarizeEvent$

* missing paths are no longer listed in mtimes map

* add tests for optimizer/cache_keys

* Add some extra docs

* Remove labeled loop

* add integration test for kbn-optimizer watcher components

* querystring-browser removed

* tweak logging a smidge, improve info and final message

* remove unused imports

* remove duplication of getModuleCount() method

* move type annotation that validates things

* clear up the build completion message

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-12 19:42:42 -07:00
Vadim Dalecky 454d0a2646
Expressions refactor (#54342)
* feat: 🎸 add UiComponent interface

* feat: 🎸 add adapter for react => ui components and back

* refactor: 💡 move registries to shared /common folder

* feat: 🎸 create expressions service state contaienr

* chore: 🤖 export some symbols

* feat: 🎸 add Executor class

* test: 💍 add simple integration test

* feat: 🎸 move registries into executor

* feat: 🎸 add initial implementation of Execution

* feat: 🎸 move Executor's state container into a signle file

* refactor: 💡 move createError() to /common folder

* feat: 🎸 use Executor in plugin definition

* refactor: 💡 rename handlers to FunctionHandlers

* feat: 🎸 improve function typings

* feat: 🎸 move types and func in sep folder, improve Execution

* refactor: 💡 cleanup expression_types folder

* refactor: 💡 improve typing names of expression types

* refactor: 💡 remove lodash from ExpressionType and improve types

* test: 💍 add ExpressionType tests

* refactor: 💡 remove function wrappers around types

* refactor: 💡 move functions to /common

* test: 💍 improve expression function tests

* feat: 🎸 create /parser folder

* refactor: 💡 move function types into /expression_functions dir

* refactor: 💡 improve parser setup

* refactor: 💡 fix export structure and move args into expr_func

* test: 💍 add ExpressionFunctionParameter tests

* fix: 🐛 fix executor types and imports

* refactor: 💡 move getByAlias to plugin, fix Execution types

* feat: 🎸 add function for argument parsing

* test: 💍 add Executor type tests

* test: 💍 add executor function and context tests

* test: 💍 check that Executor returns Execution

* test: 💍 add basic tests for Execution

* test: 💍 add basic test for execution of a chain of functions

* test: 💍 add "mult" function tot tests

* feat: 🎸 create separate expression_renderer folder

* feat: 🎸 use new executor in public plugin

* feat: 🎸 remove renderers from executor, add result to execution

* fix: 🐛 fix Kibana TypeScript errors

* test: 💍 add file to write integration tests for expr plugin

* refactor: 💡 move state_containers to /common

* refactor: 💡 move /parser to /ast and inline format() function

* refactor: 💡 remove remaining @kbn/interpreter imports

* feat: 🎸 better handling and typing for Executor context

* feat: 🎸 use Executor.run function in plugin

* fix: 🐛 fix TypeScript type errors

* test: 💍 move integration tests into one file

* feat: 🎸 create ExpressionsService

* chore: 🤖 clean up legacy code

* feat: 🎸 use ExpressionsService in /public

* refactor: 💡 move inspector adapters to /common

* feat: 🎸 improve execution

* feat: 🎸 add state to execution state and don't clone AST

* test: 💍 add tests for Execution object

* test: 💍 improve expression test helpers

* test: 💍 add Execution tests

* refactor: 💡 improve required argument checking

* fix: 🐛 fix Kibana TypeScript errors

* test: 💍 add ExpressionsService unit tests

* fix: 🐛 fix Expression plugin TypeScript types

* refactor: 💡 prefix React component with React*

* fix: 🐛 fix X-Pack TypeScript errors

* fix: 🐛 fix test TypeScript errors

* fix: 🐛 fix issues preventing loading

* feat: 🎸 remove getInitialContext() handler

* fix: 🐛 fix TypeScript errors

* chore: 🤖 remove uicomponent interface

* chore: 🤖 remove missing import

* fix: 🐛 correctly handle .query in "kibana" expression function

* refactor: 💡 call first arg in expression functions "input"

* fix: 🐛 do not free Execution state container

* test: 💍 fix tests after refactor

* test: 💍 fix more tests after refactor

* fix: 🐛 remove redundant export

* test: 💍 update intepreter_functional test shapshots

* fix: 🐛 relax "kibana" function throwing on missin gsearch ctx

* refactor: 💡 don't use ExpressionAST interface in Canvas

* docs: ✏️ improve ExpressionRenderer JSDocs

* refactor: 💡 rename context.types to inputTypes in internal fn

* refactor: 💡 replace context.types by unknown in ExprFuncDef

* refactor: 💡 improve expression function definitions in OSS

* fix: 🐛 correctly set name on metric_vis_fn

* refactor: 💡 improve Lens definitions of expression functions

* refactor: 💡 improve Canvas expression function definitions

* test: 💍 add createMockExecutionContext() helper

* refactor: 💡 add some type to events$ observable in expr handler

* feat: 🎸 add types to observables in data handler

* refactor: 💡 use inputTypes in canvas

* fix: 🐛 fix interpreter grammer generation script

* feat: 🎸 allow array in getByAlias

* test: 💍 simplify test function specs

* test: 💍 fix autocomplete tests

* fix: 🐛 use correct expression types and NP getFunctions() API

* refactor: 💡 use NP expressions to get renderer

* fix: 🐛 use context.types on server-side Canvas function defs

* refactor: 💡 use NP API to register Canvas renderers

* feat: 🎸 use NP API to get types

* style: 💄 minor formatting changes

* feat: 🎸 use NP API to get expression functions

* fix: 🐛 fix Canvas workpads

* test: 💍 add missing mock functions

* refactor: 💡 improve Lens func definition argument types

* fix: 🐛 fix Lens type error

* feat: 🎸 make lens datatable work again

* feat: 🎸 bootstrap ExpressionsService on server-side

* feat: 🎸 expose more registry related functions in contract

* feat: 🎸 add environment: server to server-side expressions

* docs: ✏️ add documentation

* test: 💍 add missing Jest mocks

* fix: 🐛 correct TypeScript type

* docs: ✏️ improve documentation

* fix: 🐛 make FunctionHelpDict type contain only Canvas functions

* fix: 🐛 fix merge conflict

* test: 💍 fix expression mocks
2020-02-11 19:47:36 +01:00
Stacey Gammon 2ae70d9592
Ui Actions explorer example (#57006)
* wip

* Move action registration out of AppMountContext fn

* Move all registration to setup

* Fix type error
2020-02-11 09:08:47 -05:00
Eli Perelman 5c3de3e16d
Fixing flaky CI tests for custom appRoutes (#55763) 2020-02-07 08:43:27 +01:00
Rashmi Kulkarni bb13af2b15
fix for chart_types test (#57056)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-06 17:37:32 -08:00
Matthias Wilhelm 8e9e4e18ce
Unskip functional testing of TSVB index pattern switching (#56848)
* Unskip test

* Remove comment
2020-02-06 20:52:24 +01:00
Maryia Lapata f4f5b04e8d
[NP] Move saved object modal into new platform (#56383)
* Move saved object modal into new platform

* Fix TS

* Revert "Fix TS"

This reverts commit f2f9f5e935.

* Revert "Move saved object modal into new platform"

This reverts commit d0f0ea6e30.

# Conflicts:
#	src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js

* Move save_object_save_modal

* Move show_saved_object_save_modal.tsx

* Move save_object_finder.tsx

* Remove unused export

* Pass I18nContext to showSaveModal

* Update i18n ids

* Fix map save

* Refactoring

* Load styles

* Revert importing styles

* Update snapshot

* Update snapshot

* Structural refactoring

* Fix path

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-06 19:56:51 +03:00
Stacey Gammon f7360721d4
Remove I prefix in UiActions types (#56898) 2020-02-06 11:35:55 -05:00
Pierre Gayvallet ea7c78d10e
Restructure SavedObject types internal representation (#56378)
* adapt types and tests to prepare for new NP api

* rename and export public types

* update generated doc

* first implementation of registerMappings

* adapt es archiver to convert legacy mappings

* update generated doc

* fix more tests

* add unit tests

* add legacy-compat unit test

* add documentation and examples

* Introduce SavedObjectTypeRegistry and SavedObjectType types

* add and fix tests

* expose createSerializer API and fix usages

* remove registerMappings API, add internal registerType

* revert changes to migration guide

* adapt ES-archiver migrator creation

* export serializer-related types

* update generated doc

* add and use convertTypesToLegacySchema

* remove / move to internal some mapping types

* fix forEach closure context

* add missing docs

* fix core path

* some nits

* fix so_mixin tests

* fix integration tests

* fix integration tests for real

* add documentation on serializer + restructure files and types

* nit

* add and use the ISavedObjectTypeRegistry interface

* Add documentation, deprecates migrationLogger#warning

* better typing for SavedObjectsRawDoc._source

* nits

* update generated doc

* remove exposition of SavedObjectsTypeMappingDefinitions, update doc

* creates so internal contracts mocks

* improve documentation
2020-02-06 10:30:55 +01:00
Joe Reuter 22e66a1484
Rollup TSVB integration: Add test and fix warning text (#56639) 2020-02-04 18:15:48 +01:00
Nick Partridge 186a82669f
Kibana property config migrations (#55937)
* Move defaultAppId config param into kibanaLegacy
* Move disableWelcomeScreen config param into Home plugin
* Update api and docs with silent option for renameFromRoot
2020-02-03 22:17:27 -06:00
Greg Thompson 94be839a24
Upgrade EUI to v18.3.0 (#56228)
* eui to 18.3.0

* ts interface update

* src snapshot updates

* x-pack snapshot updates

* icons in nav

* Homepage updates, nav drawer and tests

* feedback

* more feedback

* euiIconType for observability and security

* remove unused translations

Co-authored-by: dave.snider@gmail.com <dave.snider@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-03 16:37:35 -06:00
Tim Sullivan ebb2989257
[Reporting/FieldFormats] expose setFieldFormats and call from ReportingPlugin.start (#56563)
* [Reporting] New Platform Migration

Part of #53898

* fix CI

* fix typescript

Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-03 14:32:59 -07:00
Peter Pisljar f2713659f6
filtering (making it work with expressions) (#55351)
* adding meta information to KibanaDatatable

* updating filtering functions to use new information

* moving filter creation to APPLY_FILTER_ACTION

* adding SELECT_RANGE_ACTION and TRIGGER

* making _meta optional

* inlining legacy code for inspector

* fixing jest tests

* keeping apply_filter_action and adding value_click_action and trigger

* utilities for serializing/unserializing aggConfigs

* renaming prop to indexPatternId

* cleanup

* updating interpreter functional baselines

* trying to fix tests

* Fix legend tests

* reverting update to multi metric screenshot

* updating based on review

* updating tests

Co-authored-by: Nick Partridge <nick.ryan.partridge@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-03 09:01:34 -05:00
Anton Dosov 395e7b6907
[Bugfix][State Management] 'state:storeInSessionStorage' doesn’t take effect for dashboard without full page reload (#56284)
* bugfix: 'state:storeInSessionStorage' doesn’t take effect for dashboard without full page reload
* add test “changing 'state:storeInSessionStorage' also takes effect without full page reload”
2020-01-30 11:09:12 +01:00
Dmitry Lemeshko 25fb555a53
Code coverage: run functional tests from repo copy (#55195)
* run functional tests from cloned folders

* do not copy kibana.yml

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-29 14:36:47 +01:00
Matthias Wilhelm b9d18c4930 Skip 'context view for date_nanos with custom timestamp' functional test (#56178) 2020-01-28 09:53:21 -08:00
Spencer d66489df37
make test less flaky by retrying if list is re-rendered (#55949)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-27 16:27:36 -07:00
Brian Seeders 99f224097c
Remove matrix build support (#54202) 2020-01-27 17:10:34 -05:00
Dmitry Lemeshko 82446048cf
skip tests due to issue #55992 (#55995) 2020-01-27 16:49:59 +01:00
Josh Dover 1bb59af44a
Add isSystemRequest support to Kibana Platform (#53734) 2020-01-24 15:20:09 -07:00
spalger e67cc8514a Revert "[csp] allow blob styles when running from source (#54991)"
This reverts commit 375f0b42a7.
2020-01-23 23:32:10 -07:00
Matthias Wilhelm ac0953e08b
[Discover] Change default sort handling for index patterns without timefield (#54427)
Default sort is no longer in state. There's now a separate function to provide default sort for ES and UI, in case the user didn't actively select a field to sort by
2020-01-24 06:23:53 +01:00
Brian Seeders 6fcf3f0005
Skip flaky custom appRoute tests 2020-01-23 16:58:13 -05:00
Eli Perelman fe5e470aae
Explicitly test custom appRoutes (#55405)
* Explicitly test custom appRoutes

* Extract common navigation function
2020-01-23 09:08:13 -06:00
Spencer 375f0b42a7
[csp] allow blob styles when running from source (#54991)
* [csp] allow blob styles when running from source

* update kbn/pm dist

* add kibanaServer service to saml_api_integration suite

* use common naming

* attempt to use env.packageInfo instead of IS_KIBANA_DISTRIBUTABLE const

* remove mock, clone rules before modifying

* pass env where necessary

* update core api docs

* make env optional in HttpConfig

* add tests for CspConfig changes, base header on this.rules

* fix test snapshot

* make env optional in HttpConfig too

* remove CspConfig.DEFAULT and make env a required constructor arg

* update csp_usage_collector tests

* update core api docs

* fix test name

* rename headerChangedFromDefault back to rulesChangedFromDefault

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-22 11:32:09 -07:00
Joe Reuter 4515cb1e55
Fix missing labels on certain axes and label filter configurations (#47563) 2020-01-22 15:59:56 +01:00
Michail Yasonik da54657b91
Grouped Kibana nav (#53545)
Adds concept of `category` to nav links, grouping them by this in the side nav
2020-01-21 12:48:07 -05:00
Liza Katz f26596145e
Clean up search service (#53766)
* deprecate msearch

* Missing export

* adjust tests, revert loading method of esaggs/boot

* getInjectedMetadata

* Fix jest tests

* update default strategy abort test

* notice update

* Allow running discover errors test independently

* Remove batchSearches

* Detect painless script error

* don't show notifications for aborted requests

* Fix jest tests

* Restore loader indicator

* Decreace loading count on error

* update search test

* Trigger digest after fetching fresh index patterns

* Revert isEqual

* accurate revert

* Return full error details to client from search endpoint

* Re-throw AbortError from http when user aborts request.

* fix typo

* typo

* Adjust routes jest test

* Restore msearch using a separate es connection

* typescript fixes

* set http service mock

* Move es client to dat aplugin, for follow up PR

* Add karma mock

* krma mock

* fix tests

* ts

* Pass in version dynamically

* add headers to esClient host

* Restored fetch soon test
Use tap for loadingCount side effects

* Cleanup search params

* Cleanup search params test

* Revert "Cleanup search params"

This reverts commit ca9dea01d5.

* Revert "Cleanup search params test"

This reverts commit 30b9478612.

* Revert code to use old es client until  #44302 is resolved

* Revert changes to getPainlessError

* Fix jest test

* Refactor esClient to trigger loadingIndicator

* fixing tests

* use esClient from searchService

* git remove comment

* fix jest

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-21 18:49:57 +02:00
Anton Dosov 27c8a4bc25
[State Management] remove AppState from Dashboard app (#54105)
Removes AppState from dashboard app and replaces it with state containers and state syncing utilities.
2020-01-21 13:04:49 +01:00
Pierre Gayvallet de7a22d523
Show error page when accessing unavailable app (#54656)
* display not found page instead of throwing an error when accessible unavailable app

* move types to public folder

* fix types import

* remove updater from start app

* remove unnecessary await
2020-01-20 15:00:11 +01:00
Matt Bargar 8ae51abe19 Fix KQL value suggestions for nested fields (#54820)
* Revert "Flag nested fields as non-aggregatable (#51774)"

This reverts commit c7046a08

* Filter out nested fields at the agg param level

* Forbid nested fields in TSVB

* Revert "Forbid nested fields in TSVB"

This reverts commit afcaa348

Co-authored-by: Tim Roes <mail@timroes.de>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-18 16:25:51 +01:00
Matt Bargar b98a636de2 Remove nested root from index pattern (#54978)
* Revert "Add label and icon to nested fields in the doc table (#54199)"

This reverts commit f77b3620

* Apply label and icon to nested fields in the doc table

* Add nested type to field_icon

* Improve nested test and add comment

* Fix tests

* Always pass the field type
2020-01-18 11:01:05 +01:00