Commit graph

132 commits

Author SHA1 Message Date
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
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
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
Peter Pisljar 297aa7bd23
visualize embeddable to visualizations plugin (#54840) 2020-01-15 13:53:56 -05: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
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
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
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
Matthew Kime 9282f19bf5
Management - New platform api (#52579)
* implement management new platform api
2020-01-08 17:43:10 -06: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
Eli Perelman 054ec7036d
Add server rendering service to enable standalone route rendering (#52161)
* Add server rendering service to enable standalone route rendering

* Update renovate config

* Move legacy rendering functionality to legacy service

* Use config for exposed variable in new platform

* Lint changes from rebase

* Rebase artifact

* Remove RenderingProvider, add tests for legacy vars implementation, review notes

* Add UI app functionality to legacy service

* Update rendering snapshots

* Update docs

* Fix up functional tests

* Clean up legacy types

* Revise types from reverting injected metadata changes

* Update translations and broken tests

* Mock legacy internals in legacy tests

* Add missing doc types

* Rename InternalRenderOptions to LegacyRenderOptions

* Remove extraneous legacy exports, review nits

* Functional tests fixes

* Rebase, attempt CI test fixes

* Only allow specified appIds in testbed rendering integration test

* Update snapshot names

* Review nits
2019-12-29 02:10:55 -06:00
Mikhail Shustov 0ded3cb094
Licensing plugin functional tests (#53580)
* NP licensing add functional tests (#53002)

* fix comment

* introduce core provider plugin for integration tests

* platform functional tests use core_provider_plugin for testing

* add 3 scenario for licensing plugins: server, client, legacy

* remove unused code

* run all licensing_plugin tests on CI

* remove duplicated config

* address comments

* declare global type for core provider

* remove potentially dangerous operation

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-12-24 12:31:18 +03:00
Greg Thompson e7076927d7
Upgrade EUI to v17.3.1 (#53655)
* eui to 17.3.0

* eui to 17.3.1

* TS updates

* snapshot updates

* update data-test-subj

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-12-23 09:49:35 -06:00
Alejandro Fernández Haro 3bdbcd0d1a
[NP] Allow custom validations in HTTP Routes apart from @kbn/config-schema (#51919)
* [NP] Allow custom validations in HTTP Routes apart from @kbn/config-schema

* API docs

* Allow validate function in the route handler (run-code validation)

* Prefix RouteXXX + Params and Body Validation Aliases

* Fix test broken by lodash

* Update API docs

* Add default types for simpler manual declaration

* Add run-time validation of the RouteValidateSpec

* Expose RouteValidationError instead of SchemaTypeError

* RouteValidator as a class to match config-schema interface

* Test for not-inline handler (need to check IRouter for #47047)

* Add preValidation of the input for a safer custom validation

* Better types for RouteHandlers

* [NP] Move route validation to RouteValidator wrapper

* Use the class only internally but maintain the same API

* Fix types

* Ensure RouteValidator instance in KibanaRequest.from

* Fix validator.tests (Buffer.from instead of new Buffer)

* Default precheck should allow null values

* Also allow undefined in preChecks

* MR feedback fixes

* Provide RouteValidationResolver to the validation function

* Add functional tests

* Fix new functional tests

* Fix validator additional test

* Fix test with new resolver

* Remove unused import

* Rename ValidationResolver to ValidationResultFactory and change the interface to look more like the KibanaResponseFactory

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-12-20 17:53:08 +00:00
Mikhail Shustov 4ea2599b8c
Revert "NP licensing add functional tests (#53002)" (#53577)
This reverts commit a4c5b13400.
2019-12-19 13:12:17 +01:00
Mikhail Shustov a4c5b13400
NP licensing add functional tests (#53002)
* fix comment

* introduce core provider plugin for integration tests

* platform functional tests use core_provider_plugin for testing

* add 3 scenario for licensing plugins: server, client, legacy

* remove unused code

* run all licensing_plugin tests on CI

* remove duplicated config

* address comments

* declare global type for core provider
2019-12-19 10:59:27 +01:00
Chandler Prall 068f3ffa2c
Upgrade to EUI@17.1.2 [table typescript types] (#52688)
* more types

* table types changes

* siem table conversions

* Updated rest of x-pack for EUI table typees

* updated x-pack changes against master

* Update to published eui 17.1.0

* kibana snapshots

* x-pack snapshots

* src snapshots

* autofixes

* autofixes, round 2
2019-12-18 11:15:14 -07:00
spalger 77479020e0 Revert "Update supertest related packages (#53081)"
This reverts commit 5eed8b4eb9.
2019-12-17 11:32:49 -07:00
Liza Katz 2b1cb0666b
register per app top nav items (#53136) 2019-12-17 13:01:56 +00:00
Stacey Gammon 7e67d1f86c
Embeddable examples on the platform and included with --run-examples flag (#52111)
* Add a new platform embeddable example plugin

* Remove extra hello world test impl.

* cleanup

* code review updates

* Change example to highlight and have parent filter out children

* Fix deep comparison of embeddable prop

* adjust help text
2019-12-16 15:03:46 -05:00
renovate[bot] 5eed8b4eb9 Update supertest related packages (#53081)
* Update supertest related packages

* supertest is now strict about numbers as strings
2019-12-16 12:10:26 -07:00
Liza Katz daac96cce7
Move top nav to NP (#52877)
* Move top nav to NP

* TopNavMenu karma mock

* Fixed lens test mocking
Removed old plugin code

* readme

* Code review fixes

* lint

* ts
2019-12-16 13:56:51 +00:00
spalger 8e9a8a84dc autofix all violations 2019-12-13 23:17:13 -07:00
Stacey Gammon 4801647da5
Fix and turn back on legacy embeddable tests (#52945) 2019-12-12 22:32:21 -05:00
Josh Dover 2d3698972b
Add getStartServices API (#50231) 2019-12-12 13:21:35 -06:00
Stacey Gammon 79fc07c0c3
Add top level examples folder and command to run, --run-examples. (#52027)
* Add top level examples folder and command to run, `--run-examples`.

* Add comment explaining reason --run-examples flag turns off base path.
2019-12-10 18:02:03 -05:00
Joe Reuter 3c57f71c3a
Removing stateful saved object finder (#52166) 2019-12-10 17:50:00 +01:00
Greg Thompson ac0f44e6a5
Upgrade EUI to v17.0.0 (#52342)
* eui to 17.0.0

* Fix sass imports and mixin usages

* Fix kbn ui-framework

* snapshot updates

* switch text

* switch functional update

* test subject
2019-12-09 10:51:17 -06:00
Greg Thompson 58635a29dc
Upgrade EUI to v16.1.0 (#52088)
* eui 16.1.0

* snapshot udpates

* more snapshot updates

* enqueueStateChange mock, resulting snapshot updates
2019-12-05 14:59:21 -06:00
Sébastien Loix 439708a6f9 [Dependencies]: upgrade react to latest v16.12.0 (#51145) 2019-11-28 10:56:47 +01:00
Peter Pisljar 0cc4060d4f
shim visualizations plugin (#50624) 2019-11-27 05:12:05 -05:00
patrykkopycinski 517fcb98b8
[SIEM] Fix Timeline drag and drop behavior (#51558) 2019-11-27 09:35:08 +01:00
Lukas Olson 320fa5a550
Default search params for ignore_unavailable and rest_total_hits_as_int (#50953)
* Default search params for ignore_unavailable and rest_total_hits_as_int

* Update code with options arg

* Fix filter matches index for filters with partial meta

* Fix tests
2019-11-25 20:58:35 -07:00
Stacey Gammon a38ff621b6
Add types for Embeddable setup and start contracts (#51654) 2019-11-25 21:26:51 -05:00
Greg Thompson 7cbb072554
Upgrade EUI to 16.0.0 (#50779)
* eui to 16.0.0

* type defs

* card click

* snapshot updates

* time format test updates

* ts return

* integration fix

* async

* more time format fixes

* more time format fixes

* test updates

* add uisettings dateformat timepicker test

* after method to clear setting
2019-11-20 17:02:04 -06:00
Pierre Gayvallet 01bbbf4b03
Remove react references from core OverlayService apis (#48431)
* move/rename overlay mount and unmount types from banner to parent module

Signed-off-by: pgayvallet <pierre.gayvallet@elastic.co>

* migrate openModal / modalService

Signed-off-by: pgayvallet <pierre.gayvallet@elastic.co>

fix I18nProvider import path

Signed-off-by: pgayvallet <pierre.gayvallet@elastic.co>

* updates core doc

Signed-off-by: pgayvallet <pierre.gayvallet@elastic.co>

update doc bis

Signed-off-by: pgayvallet <pierre.gayvallet@elastic.co>

* migrate openFlyout / flyout service

Signed-off-by: pgayvallet <pierre.gayvallet@elastic.co>

* remove CoreStart export from kibana-react

Signed-off-by: pgayvallet <pierre.gayvallet@elastic.co>

* adapt some calls to new signature

Signed-off-by: pgayvallet <pierre.gayvallet@elastic.co>

* adapt new calls

Signed-off-by: pgayvallet <pierre.gayvallet@elastic.co>

* adapt js call

Signed-off-by: pgayvallet <pierre.gayvallet@elastic.co>

* add flex layout on mountWrapper component to avoid losing scroll on overlays

Signed-off-by: pgayvallet <pierre.gayvallet@elastic.co>

* create proper flyout/modal services

* update generated doc

* update snapshot on data/query_bar

* use ReactNode instead of ReactElement

* rename mountForComponent to reactMount

* change reactMount usages to toMountPoint

* remove duplicate MountPoint type in overlays

* remove duplicate mount utilities from overlays

* allow to specify custom class name to MountWrapper

* Allow to specialize MountPoint on HTMLElement subtypes

* updates generated doc

* undeprecates openFlyout/openModal & remove direct subservice access from overlayService

* adapt toast api to get i18n context from service

* use MountPoint instead of inline definition
2019-11-19 10:08:16 +01:00
Alexey Antonov 9769be3a28
Move @kbn/es-query into data plugin - es-query folder (#50182)
* Move @kbn/es-query into data plugin - es-query

* fix eslint issues

* Fix PR comments

* fix CI

* fix Ci

* remove extra ts-ignore

* fix imports

* fix imports

* Test importing from data/public and casting to ES Field Types.

* Test importing from data/public and casting to ES Field Types.
2019-11-15 23:35:21 +03:00
Tim Roes 70d6220a41
Upgrade to TypeScript 3.7.2 (#47188)
* Update TS to 3.7.0-beta

* Upgrade to TypeScript 3.7.2

* Upgrade cypress to 3.5.0

* Upgrade apollo-link-http

* Update prettier

* Fix expression types

* Fix Lens test typings

* Fix ML breakage

* Fix APM breakage

* Fix sinon stub typing

* Fix beats management types

* Fix WMSOptions types

* Fix ui_filters in APM

* APM: Explicitly type Setup to prevent hitting TS limits

* Change file name to correct case

* Add styleguide rule for optional chaining

* Update typescript-eslint packages

* Revert changes in ui filters routes that are no longer needed
2019-11-15 10:33:29 +01:00
Eli Perelman e44616e8fc
Allow chromeless applications to hide left navbar link (#50060) 2019-11-14 09:36:03 -06:00
Eli Perelman 6955593d01
Allow registered applications to hide Kibana chrome (#49795)
* Allow registered applications to hide Kibana chrome

* Fix bug in flipped value of application chromeHidden

* Add additional test for app chrome hidden versus chrome visibility

* Rename chromeHidden to chromeless

* Default chrome service app hidden observable to same value as force hidden

* Consolidate force hiding in chrome, add functional tests

* Move chromeless flag to App interface to prevent legacy applications from specifying

* Address review nits to improve separation
2019-11-13 14:57:15 -06:00
Greg Thompson 998b0e6fd6
Upgrade EUI to v14.9.0 (#49678)
* eui to 14.9.0

* euiswitch updtates

* misc snapshot

* x-pack functional fixes

* more euiswitch functional test fixes

* label-less switches for spaces management

* more euiswitch fixes

* telemetry form a11y

* snapshot update

* label updates

* more switch updates

* lint
2019-11-13 14:54:21 -06:00
Tim Roes fce52133d8
Upgrade Prettier 1.19 (#50487)
* Upgrade Prettier to 1.19

* Fix new prettier style
2019-11-13 17:00:02 +01:00
Peter Pisljar 253a10696c
remove visualize loader (#46910) 2019-11-12 09:43:51 -05:00
Chandler Prall 94202a9eab
Upgrade EUI to v14.8.0 (#49375)
* Upgrade EUI to v14.8.0

* update snapshot for determinism
2019-10-29 11:04:24 -06:00
Spencer 19ea92abb7
move react/jsx-a11y rules into shared react preset (#49244)
* move react/jsx-a11y rules into shared react preset

* autofix react/jsx-closing-tag-location

* autofix react/no-unknown-property

* manually fix react/no-unescaped-entities

* maually fix react/jsx-pascal-case

* manually fix react/prefer-stateless-function

* disable known violations in specific plugins/areas

* remove code override
2019-10-29 06:15:33 -07:00
Mikhail Shustov b6591eb0bd
Provide uiSettings service in NP (#48413)
* provide ui settins client via context

* update mocks

* update types and expose setDefaults to plugins

* move ui settings routes to NP

* add typings fro test kbn server

* move integration test & improve typings

* hide client private methods, update tests

* add unit tests for get_upgradable_config

* inline writeErrors into createOrUpgradeConfig to simplify testing

* regen docs

* add functional tests for ui_settings service

* unify test suites

* add types for sipertest in core_plugin tests

* tsify core_plugins tests

* add test for empty saved config

* update renovate

* rename get/setDefaults to reguster

* regen docs

* regen docs

* Update src/core/MIGRATION.md

Co-Authored-By: Josh Dover <me@joshdover.com>
2019-10-28 16:06:12 -04:00
Liza Katz 6bb30e7190
Allow plugins to register top nav menu items (regression fix) (#48542)
* Move top nav menu to its own plugin
Allow registering additional options from other plugins
Added demo plugin

* Added functional test to validate top nav registration

* Improved names

* Rename array

* Fixed lens tests

* Deleted old NavBarExtensionsRegistryProvider

* Fixed top nav menu test

* Attempt fixing test by clearing ui_actions on stop

* temporary disable test
2019-10-28 10:40:21 +02:00
Greg Thompson 9e58b27d59
Upgrade EUI to 14.7.0 (#49110)
* eui 14.7.0

* icon updates

* snapshot updates

* storyshot updates

* remove config addition
2019-10-24 10:14:17 -05:00