Commit graph

3411 commits

Author SHA1 Message Date
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
Matthew Kime c1ccb304b6
Management API - redirect on disabled app path (#55136)
* redirect on disabled management app path
2020-01-17 17:57:24 -06:00
Nick Partridge 119eabe271
[Metric] convert mocha tests to jest (#54054)
* Add fixtures/* alias to tsconfig and jest config
* Convert metric tests to jest
* Convert remaining js files to ts
2020-01-17 12:00:35 -06:00
Daniil Suleiman 3e46060854
[Vis: Default editor] EUIficate and Reactify the sidebar (#49864)
* EUIficate the sidebar

* Create a state reducer and a state context

* Create an editor context and actions

* Improve types

* Apply aggs reordering

* Fix functionality

* Improve types

* Fix sub_agg changes

* Remove legacy dependencies

* Watch dirty state

* Fix dirty state changes

* Update actions and reducers

* Handle keyboard submit

* Apply editor form validation

* Remove fancy forms

* Update validation

* Use embeddable instead of visualize loader

* Add auto apply behavior

* Remove legacy styles

* Remove the sidebar

* Restrict responsive to the bottom_bar

* Upgrade @elastic/eui to v14.10.0

* Replace EuiBottomBar with EuiControlBar

* Get rid of mutations in control vis

* Revert "Upgrade @elastic/eui to v14.10.0"

This reverts commit 2cd86c51d2.

* Replace bottom bar with a control panel for sidebar

* Replace selectors

* Use editor resizer

* Apply selectors

* Change selectors

* Fix sub agg change values

* Add collapse button

* Fix tests

* Get rid of editor editor_state_context, simplify the code

* Fix jest tests, update snapshots

* Fix types

* Moving collapse button to right of index pattern

* Tweaks bottom buttons

* Moved Vega buttons so they don’t scroll away

* Fix responsiveness

* Resolve UI comments

* Fix console resizer

* Update dev docs

* Bail out of additional render in metrics and axes

* Apply performance optimizations for metrics and axis panel

* Remove unused translations

* Use debounce when autoapply enabled

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-17 14:01:44 +03:00
Chandler Prall 94209a8a39
Upgraded EUI to 18.2.1 (#55090) 2020-01-16 15:03:40 -07:00
Eli Perelman 7977f0edd4
Generate legacy vars when rendering all applications (#54768)
* Generate legacy vars when rendering all applications

* Move rendering functional tests and add user settings tests

* Make rendering integration tests more robust, get data from page

* Address review nits, fix CI failures

* Remove extraneous file

* Fix type error
2020-01-16 11:35:21 -06:00
Josh Dover 54c7d340ae
Renable navigation back test (#54825) 2020-01-16 09:10:22 -07:00
Vadim Dalecky 5c19c82d4a
bfetch (2) (#53711)
* feat: 🎸 implement ItemBuffer

* test: 💍 add tests for ItemBuffer

* feat: 🎸 add TimedItemBuffer

* test: 💍 add TimedItemBuffer tests

* feat: 🎸 add createBatchedFunction

* chore: 🤖 save wip on higher level batching

* test: 💍 add createBatchedFunction tests

* feat: 🎸 implement createStreamingBatchedFunction() method

* refactor: 💡 rename "data" key to "result"

* feat: 🎸 return error in "error" key in legacy protocol

* feat: 🎸 add server-side to Expressions plugin

* refactor: 💡 move interpreter server-side registries to NP

* feat: 🎸 implement bfetch.addBatchProcessingRoute

* feat: 🎸 improve streaming and batching func to pass request

* feat: 🎸 initial setup of new expressions batching endpoint

* feat: 🎸 expose bfetch.batchedFunction() function

* feat: 🎸 add of() function

of() function awaits a promise and converts it to a 3-tuple representing
its state.

* refactor: 💡 move normalizeError() to /common

* feat: 🎸 improve createStreamingBatchedFunction() function

* refactor: 💡 move GET /api/interpreter/fns to the New Platform

* feat: 🎸 move batched_fetch to the New Platform

* feat: 🎸 implement legacy interpreter batching on server in NP

* feat: 🎸 switch legacy interpreter server functions to NP

* chore: 🤖 remove unused import

* fix: 🐛 correct expressions mocks

* test: 💍 fix batching tests after refactor

* test: 💍 stub bfetch plugin explorer

* test: 💍 add routing and app structure to bfetch_explorer

* test: 💍 add server-side to bfetch_explorer

* test: 💍 create <DoubleInteger> component in bfetch_explorer

* test: 💍 improve bfetch_explorer

* test: 💍 add <CountUntil> demo to bfetch_explorer

* test: 💍 by default redirect to first bfetch_explorer example

* test: 💍 add error example to bfetch_explorer

* docs: ✏️ improve bfetch docs

* docs: ✏️ improve bfetch server-side docs

* chore: 🤖 address self-review comments

* fix: 🐛 use new core ES data client, remove unuseed import

* fix: 🐛 remove unused interface import

* Update examples/bfetch_explorer/public/components/count_until/index.tsx

Co-Authored-By: Lukas Olson <olson.lukas@gmail.com>

* Update examples/bfetch_explorer/public/components/double_integers/index.tsx

Co-Authored-By: Lukas Olson <olson.lukas@gmail.com>

* Update src/plugins/bfetch/common/buffer/item_buffer.ts

Co-Authored-By: Lukas Olson <olson.lukas@gmail.com>

* Update src/plugins/kibana_utils/common/of.ts

Co-Authored-By: Lukas Olson <olson.lukas@gmail.com>

* docs: ✏️ add batchedFunction params to README

* refactor: 💡 rename onflush to onFlush

* feat: 🎸 make maxItemAge optional in TimedItemBuffer

* refactor: 💡 remove promise from fetchStreaming

* test: 💍 add bfetch_explorer functional tests

* test: 💍 rename test plugin to kbn_tp_bfetch_explorer

* fix: 🐛 use stream instead of removed promise

* fix: 🐛 use correct tsconfig.json in bfetch test plugin

* feat: 🎸 add kbn_tp_bfetch_explorer server-side files to tsconfi

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-16 05:33:52 -08:00
Joel Griffith 5b2e315e5a
Getting flaky tests back in shape for reporting (#46076)
* Rebasing from master, updating test utils and getting report pdf/png generation

* Removing legacy functions, packages and updating README/Licenses

* Dropping duplicitive test

* Better URL check for lens reporting

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-15 11:28:39 -08:00
Peter Pisljar 297aa7bd23
visualize embeddable to visualizations plugin (#54840) 2020-01-15 13:53:56 -05:00
Liza Katz dd16aaf5a8
Add tests for index patterns without time field on dashboard (#54760)
* Add tests for index patterns without time field on dashboard

* add null check

* Hide timefilter in editor only if timeFieldName is explicitly

* eslint

* test to ts

* Code review

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-15 18:03:51 +02:00
Matt Bargar f77b36206a Add label and icon to nested fields in the doc table (#54199)
* Apply label and icon to nested fields in the doc table

* Include nested fields in the index pattern so we can identify them in the Discover UI

* use color recommended by design

* Fix unit tests

* Update api integration test

* Fix test comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Tim Roes <mail@timroes.de>
2020-01-15 10:56:36 +01:00
Greg Thompson bd9d67ccc0
Upgrade EUI to v18.2.0 (#54786)
* 18.2.0

* ts update

* Updated `euiColorVis0`

* Update `euiColorVis1`

* Updating `euiColorVis2`

* Updated `euiColorVis3`

* Updated the rest

* Updated hard-coded viz palette hexes to latest

* src snapshot updates

* x-pack test updates

* mock jest fn

* Updated two vegalite visualization screenshots

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
2020-01-14 20:19:35 -06:00
Chandler Prall 6bed80bbd8
Upgraded EUI to 18.0.0 (#54042)
* Upgraded EUI to 18.0.0

* Fix breaks from `palette._.colors` changes

* snapshots

* Updated hard coded hex color codes in tests, fixed TS errors

* Updated a functional test's selector; added (BSD-3-Clause AND Apache-2.0) to license checker whitelist

* Functional test selector update

* Updated vega browser-ci tests for palette changes

* rebased on master

* One more location for EUI package number update and yarn lock

* Fixed lurking [but introduced] TypeScript logic bug

* Swap a prop definition for the same value but tied closer to its source

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-14 11:23:43 -07:00
Dmitry Lemeshko 040aee9fed
Functional tests: refactor dashboard_page (#54588)
* [test/functional] cleanup & tsfy dashboard_page

* fix & improvement

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-14 16:56:38 +01:00
Vadim Dalecky b7f37822a2
test: 💍 re-enable Dashboard sample data functional tests (#54717)
Closes: #40670
2020-01-14 06:32:08 -08:00
Matthias Wilhelm c42d23347a
[Discover] Fix context view for date_nanos format with custom timestamps (#54089)
* Switch from _source to fields when fetching anchor records with date_nanos timestamps

* Add testdata

* Add functional test
2020-01-14 15:15:30 +01:00
Pierre Gayvallet f71142dcd3
Fix chromeless NP apps not using full page width (#54550)
* add missing conditional classes on app-wrapper and application containers

* update snapshot

* refactor and add unit tests for service

* typo

* use consistent classNames naming
2020-01-14 08:40:15 +01:00
Maja Grubic 7543b0c7b2
[Lens][Dashboard] Adding Lens to Dashboard (#53110)
* First version of adding Lens to dashboard

* Fix failing unit test

* Replacing explicit Lens query param with a more generic one

* Fixing failing unit test

* Adding a unit test for redirect

* Do not show Save New if adding from Dashboard

* Adding functional test

* Adding functional test

* Fixing type issues

* Renaming query params

* Fixing failing unit test

* Removing unused constants

* Fixing erroneous imports

* Fixing erroneous import

* Fixing import

* Fix failing typecheck

* Removing timefilter from Dashboard URL

* Fixing type error

* Replacing time parsing with rison

* Replacing URL regex parsing with legacy URLs

* Fixing failing test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-13 17:38:47 +00:00
Bhavya RM f3cdbf20ce
Discover a11y tests (#54209)
Comprehensive discover a11y tests
2020-01-13 11:14:37 -05:00
Pierre Gayvallet aeebedfa4d
Add ApplicationService app status management (#50223)
* add unimplemented registerAppStatusUpdater & remove observers for apps and legacyApps

* adapt NavLinksService to use new application observables

* merge availableApps$ and availableLegacyApps$

* updating core docs

* adapt the navLink updating methods

* filters the inaccessible apps from availableApps$

* restrict access to navigateToApp depending on app status

* fixes due to merge

* add statusUpdater$ to AppBase

* export new types

* disable navlink depending on app status

* update generated doc

* update snapshots for disabled prop

* Address josh review

* Address review comments

* fix merge conflicts

* adapt changes due to merge

* update generated doc

* add comment and fix navlink url for custom url apps

* add AppNavLinkStatus type to split app/navlink states

* fix typo

* review comments and improvements

* add functional tests

* update generated docs and migration guide

* fix wrong type cast on AppsMenuProvider.readLinks

* properly type return of navigateToApp
2020-01-12 22:37:42 +01:00
Larry Gregory e6e1373db2
Security - Role Mappings UI (#53620)
* Initial role mappings UI

* apply design edits

* address PR feedback

* fix type cast for number field

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

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

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

* align naming of role mappings feature check

* Apply suggestions from code review

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

* add missing test assertions

* inlining feature check logic

* switch to using snapshot

* use href instead of onClick

* adding delete unit test

* consolidate href building

* unify page load error handling

* simplify initial loading state

* documenting unconditional catch blocks

* use nodes.info instead of transport.request

* Apply suggestions from code review

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

* move model out of LP into NP

* convert except_field_rule to except_any_rule

* docs, take 1

* update gif

Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-11 13:26:31 -05:00
Anton Dosov a7a557babe
[State Management] State syncing utilities (#53582)
Today, apps rely on AppState and GlobalState in the ui/state_management module to deal with internal (app) and shared (global) state. These classes give apps an ability to read/write state, when is then synced to the URL as well as sessionStorage. They also react to changes in the URL and automatically update state & emit events when changes occur.

This PR introduces new state synching utilities, which together with state containers src/plugins/kibana_utils/public/state_containers will be a replacement for AppState and GlobalState in New Platform.
2020-01-10 17:14:33 +03:00
Pierre Gayvallet c0d6b932f1
Allow the mounted application to prompt a confirm message before leaving (#54221)
* add onAppLeave to AppMountParameters

* adapt legacy shims of app mount

* update generated doc

* returns properly typed AppLeaveAction from leave handler instead of raw strings

* add openConfirm to modal service and use it instead of window.confirm

* fix unit test

* update querystringinput snapshots

* add integration tests

* nits and review comments

* add functional tests
2020-01-10 12:17:21 +01:00
Joe Portner 719ff259fc
Add support for certificates in PKCS#12 (P12) key stores (#53810)
Kibana now supports the usage of PKCS#12 (P12) key stores and trust stores for certificates and keys.
2020-01-09 13:03:16 -05:00
Marco Vettorello d5939c4af8 [Discover] fix histogram min interval (#53979)
- Fixes issues involving min intervals for leap years and DST
2020-01-08 20:41:24 -06:00
Matthew Kime 9282f19bf5
Management - New platform api (#52579)
* implement management new platform api
2020-01-08 17:43:10 -06:00
Dmitry Lemeshko 26ce6104a9
Code coverage setup on CI (#49003)
* running code coverage in CI

* apply review feedback

* add custom function to upload merged coverage reports

* fix artifacts upload without coverage

* add file extension to fix validation

* Check code_coverage is set

* run oss tests via grunt task

* review fixes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-08 21:08:48 +01:00
Dmitry Lemeshko a1176b0e4a
Functional tests: refactor visualize_page (#53845)
* add new POs and services

* split visualize_page

* refactor PO and tests

* lost changes

* more fixes

* fix tslint error

* refactor POs

* add vega_chart_page, refactor

* review fix

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-07 15:42:20 +01:00
Ahmad Bamieh ecab2073ae
[Telemetry] fix bug where uiStatsMetrics is not getting report… (#54045)
* fix bug where uiStatsMetrics is not getting reported

* fix tests
2020-01-06 23:58:55 +02:00
Maja Grubic 5b2a188c43
[Dashboard] Empty screen redesign (#53681)
* Edit screen redesign

* Edit screen redesign

* Redesign view screen

* Redesign view screen

* Fixing type failure, and functional test

* Updating failing functional tests

* update dashboard empty styles

* i18n fix

* Updating failing snapshot

Co-authored-by: Ryan Keairns <rkeairns@chef.io>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-06 10:55:15 +00:00
Marco Vettorello 9d5603a298
Update dependency @elastic/charts to v16.0.2 (#52619) 2020-01-04 13:38:11 +01:00
Tim Sullivan 8c3145ea5c
[Test/Newsfeed] Re-enable test and add news item to be filtered (#53905) 2020-01-02 15:25:54 -07:00