Commit graph

1675 commits

Author SHA1 Message Date
gchaps a3a915ab66
[DOCS] Adds information about query timeout (#64970)
* [DOCS] Adds information about query timeout

* [DOCS] Adds image to search doc

* [DOCS] Improves organization

* Update docs/discover/search.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/discover/search.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
2020-05-04 11:08:35 -07:00
Catherine Liu 058044065c
[Canvas] Updates function reference docs (#64741) 2020-05-04 10:07:23 -07:00
Kaarina Tungseth fb6d325fe9
[DOCS} Fixes 404s in master (#64911) 2020-05-04 10:49:14 -05:00
Kaarina Tungseth 3ba268d8a5
[DOCS] Reformats settings tables (#64844)
* Formats settings into tables

* Formatting

* Formatting
2020-05-04 10:22:40 -05: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
Patrick Mueller cb00e5e7bb
[Alerting] fix labels and links in PagerDuty action ui and docs (#64032)
resolves #63222, resolves #63768, resolves #63223

ui changes:

- adds an "(optional)" label after the API URL label
- changes help link to go to alerting docs and not watcher docs
- changes the label "Routing key" to "Integration key" to match other docs
- changes the order of the severity options to match other docs

doc changes:

- changes the reference of "Routing key" to "Integration key" to match other docs
- makes clearer that the API URL is optional
2020-05-04 08:48:57 -04:00
Kerry Gallagher 34cccedc8e
[Logs UI] [Alerting] Documentation (#64886)
* Docs for logs alerts

Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
2020-05-04 12:30:31 +01:00
Luke Elmers 7f8f765541
[data.search.aggs] Remove legacy aggs APIs. (#64719) 2020-04-30 19:40:01 -06:00
Pierre Gayvallet 6e2691358f
add generic typings for SavedObjectMigrationFn (#63943)
* add generic typings for SavedObjectMigrationFn

* change default attributes type to unknown

* update generated doc

* adapt new calls

* update generated doc

* update migration example

* fix merge conflicts
2020-04-30 10:28:14 +02: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
CJ Cenizal 3b753ec514
ES UI new platform cleanup (#64332) 2020-04-28 09:41:02 -07:00
James Gowdy f9c81a30cb
[ML] Add kibana setting for file data visualizer max file size (#64427)
* [ML] Add kibana setting for file data visualizers max file size

* adding failsafe for setting

* fixing id

* [DOCS] Updates Data Visualizer setting

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: lcawl <lcawley@elastic.co>
2020-04-28 09:22:46 +01:00
Matthew Kime 231de27026
Typescript index pattern field editor (#63495)
* Typescript index pattern field editor
2020-04-27 15:19:02 -05:00
Brian Seeders 4d3e60be39
[Docs] Add ES Snapshot docs (#64437) 2020-04-27 15:46:48 -04:00
Rudolf Meijering dfb6a308cf
Remove SO root property index signature (#64434)
* Remove SO root property index signature

* Update documentation
2020-04-27 16:08:27 +02:00
Pierre Gayvallet 3d78b1bcf9
Remove SO autocreateindex error and error page (#64037)
* remove autocreateIndex error and error page

* update generated doc

* delete unused keys

* remove sass import

* add missing graph import

* remove unused method
2020-04-27 10:02:40 +02:00
Yuliia Naumenko 6bf0e731b6
Extended existing alerting functionality to support preconfigured only action types (#64030)
* Extended existing alerting functionality to support preconfigured only action types

* fixed functional test

* Adding documentation

* Fixed UI part due to comments

* added missing tests

* fixed action type execution

* Fixed documentation

* Fixed due to comments

* fixed type checks

* extended isActionExecutable to check exact action id if it is in the preconfigured list
2020-04-24 14:38:28 -07: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
Alejandro Fernández 53b33bb3cb
[Logs UI] View log in context modal (#62198) 2020-04-24 22:29:04 +02:00
Alexey Antonov d53997742b
[FieldFormats] Cleanup: rename IFieldFormatType -> FieldFormatInstanceType (#64193)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-24 10:32:34 +03:00
Kaarina Tungseth 74a07b46d8
[DOCS] Added images to automating report generation (#64333)
* [DOCS] Added images to automating report generation

* Fixes image file name
2020-04-23 15:00:40 -05:00
gchaps a53d53369c
[DOCS] Fixes formatting in alerting doc (#64338) 2020-04-23 11:11:18 -07:00
Luke Elmers e2baff36b8
[data.search.aggs]: Create agg types function for terms agg. (#63541)
* Minor cleanup on AggConfigJson interface.

* Add types for terms agg params & mapping.

* Add terms agg expression function.

* Register agg functions with expressions service.

* Add unit tests for terms expression function.

* Update API docs.

* AggConfigJson -> AggConfigSerialized

* Add serialize(), enforce serializable params, fix subexpressions in terms agg fn.

* Simplify getAggTypesFunctions

* it() -> test()

* Add help text.

* Ensure serialize() is used by agg param type.

* Add toExpressionAst to AggConfig.

* Add json arg to terms agg fn.

* Update docs.

* Fix typo which caused functional test failures.

* Add AggParam.toExpressionAst so AggConfig.toExpressionAst can return function ast instead of expression ast.

* Clean up overlooked items.
2020-04-23 11:39:38 -06:00
Kaarina Tungseth 7acfbab9b4
[DOCS] Removed supported aggregations links from visualization pages (#64244) 2020-04-23 09:03:31 -05:00
Chris Roberson 23fbf7d67d
[Monitoring] Update docs based on config change (#63860)
* Update a bunch of docs

* PR feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-22 15:31:25 -04:00
Alexey Antonov 0a6da70a89
[Regression] Histogram aggregation always shows an error message (#63484)
* WIP [Regression] Histogram aggregation always shows an error message

Closes: #62624

* make getInternalStartServices private

* fix ts issues

* remove createSearchSource from static contract

* fix some jest test

* move searh_source to static contract

* fix types

* fix function tests

* fix jest / add createStartServicesGetter

* fix comments: saved_object_management

* maps: fix PR comments

* maps: update types

* fix heck_published_api_changes

* move searchSource into runtime contract

* cleanup

* fix ts error

* cleanup

* remove extra dependencies

* fix Discover

* fix Discover JEST

* fix PR comments

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-22 19:21:14 +03:00
gchaps 8ebd0c1b71
[DOCS] Fixes hierarchy in alerting and actions section (#64133) 2020-04-22 08:19:09 -07:00
Kaarina Tungseth aa560353f8
[DOCS] Adds dashboard controls options (#64079) 2020-04-22 08:38:53 -05:00
Peter Pisljar 222fdc5029
refactor action filter creation utils (#62969) 2020-04-22 10:41:58 +02:00
Ben Skelker b7aab690f4
[Docs]7.7 SIEM doc updates (#63951)
* SIEM section doc updates

* corrections

* more corrections
2020-04-21 20:14:25 +03:00
Lisa Cawley 1a6338a314
[DOCS] Add file size setting for Data Visualizer (#64006) 2020-04-21 09:35:19 -07:00
Devon Thomson b7f2a010c8
[DOCS] Add documentation for clone feature (#64019)
* Added documentation for the clone feature
Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
2020-04-21 11:26:53 -04:00
Ben Skelker d6fdb689e8
[Docs]Adds saved object key setting to load balancing kib instances (#63935)
* adds saved object key setting to load balancing kib instances

* SIEM section doc updates

* Revert "SIEM section doc updates" - wrong PR

This reverts commit fc55d90a6d.

* corrections
2020-04-21 09:26:06 +03:00
Kaarina Tungseth e302fd8486
Vega doc changes (#63889)
* Vega doc changes

* Final changes

* Review comments
2020-04-20 15:56:41 -05:00
gchaps d45d78016a
[DOCS] Alerting PagerDuty benefits (#63652)
* [DOCS] Alerting PagerDuty benefits

* [DOCS] Fixes broken link

* [DOCS] Organization changes

* [DOCS] Changes to meet template and incorporate review comments

* [DOCS] Fixed formatting of bulleted list

* [DOCS] Incorporates review comments

* Update docs/user/alerting/action-types/pagerduty.asciidoc

Co-Authored-By: Mike Côté <mikecote@users.noreply.github.com>

* [DOCS] Fixes naming and other formatting issues

Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
2020-04-20 09:09:49 -07:00
Liza Katz 796421f600
[SEARCH] Cleanup fetch soon (#63320)
* move old code to legacy folder

* Use search service directly from search source

* Move get search params to fetch folder

* Delete search strategy folder

* Doc update

* Minor cleanups

* Moved es client to legacy folder

* Clean up some unused code (isViable, old search function)

* Updated tests

* strings update

* Fix jest test

* re-arrange runSearch function

* re-arrange runSearch function

* fix jest tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-19 17:58:45 +03:00
Yuliia Naumenko 055d1fb7d4
[Alerting] Documentation for how to pre-configure connectors. (#63807)
* [Alerting] Documentation for how to pre-configure connectors.

* small fix

* Adjusted titles

* Fixed wrong link

* fixed warning

* Fixed ci issues

* [DOCS] Edits preconfigured connector docs

* Replaced words 'pre-configured' with 'preconfigured'

Co-authored-by: gchaps <chappell_5@yahoo.com>
2020-04-17 17:04:02 -07:00
Radu Gheorghe cf7da3cdb7
Add headers to the sample curl (#63548)
* Add headers to the sample curl

At least in 7.x it doesn't work without the kbn-xsrf and json headers.

* More headers to curl commands

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-17 10:01:30 -05:00
Sonja Krause-Harder f91c795e30
[EPM] Handle multi fields in index template generation (#63112)
* Add unit test stub for multi fields.

* Add multi field handling to mapping generation.

* Start documenting index template generation.

* Add unit tests.

* Remove stub for fields.yml documentation

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-17 13:23:30 +02:00
Andrew Cholakian 6652045cbf
Uptime 7.7 docs (#62228)
Add docs for 7.7 features:

- Alerting
- Duration anomalies
- Settings

Point security docs to heartbeat.
2020-04-16 15:38:57 -05:00
gchaps 82be9c64c6
[DOCS] Updates remote cluster and ccr docs (#63517)
* [DOCS] Updates remote cluster and ccr docs

* [DOCS] Adds section on managing clusters and follower indices

* [DOCS] Incorporates review comments
2020-04-16 13:29:23 -07: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
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
Uladzislau Lasitsa ce9c6e258a
Index pattern management UI -> TypeScript and New Platform Ready (indexed_fields_table) (#63364)
* MIgrated indexed_fields_table to typescript.

* Updated docs

* Fixed comments

* Fixed types
2020-04-16 10:32:28 +03:00
Tim Sullivan f4c81b440d
[Reporting] Switch Serverside Config Wrapper to NP (#62500)
* New config

* fix translations json

* add csv.useByteOrderMarkEncoding to schema

* imports cleanup

* restore "get default chromium sandbox disabled" functionality

* integrate getDefaultChromiumSandboxDisabled

* fix tests

* --wip-- [skip ci]

* add more schema tests

* diff prettiness

* trash legacy files that moved to NP

* create_config tests

* Hoist create_config

* better disableSandbox tests

* fix ts

* fix export

* fix bad code

* make comments better

* fix i18n

* comment

* automatically setting... logs

* replace log_configuration

* fix lint

* This is f2

* improve startup log about sandbox info

* update docs with log reference

* revert log removal

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-15 14:52:32 -07:00
Mike Côté 6c670b77f8
Split action types into own page (#63516)
* Split action types into own page

* Update docs/user/alerting/action-types.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Apply changes based on feedback

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2020-04-15 15:54:36 -04:00
Mike Côté e44cf28c98
Fix alerting documentation encryption key requirement (#63512)
* Fix documentation to indicate encryption key config required regardless if security is used or not

* Update docs/user/alerting/index.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/user/alerting/index.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2020-04-15 12:19:15 -04:00
Brandon Morelli 02bcc8e78b
[APM] docs: restructure APM documentation for 7.7 (#63280) 2020-04-15 07:54:26 -07:00
Nicolas Ruflin 3342f9e80e
[Ingest] Add details to indexing strategy around allow chars (#63560)
Add some recommendation around what chars should be used if a dataset or namespace contains a `-`.
2020-04-15 16:44:14 +02:00
Matthew Kime 69ed664dd9
Index Pattern Field class - factor out copy_field code for future typescripting (#63083)
* Index Pattern Field class - factor out copy_field code for future typescripting
2020-04-14 06:58:56 -05:00
Melori Arellano 9b25fe1ebd
[DOCS] Add ILM tutorial (#59502)
* Add tutorial for ILM with filebeat

* Change screenshots and add additional steps

* Update screenshots, add numbered steps, and other minor edits

* Incorporate feedback: update links, formatting, and minor edits

* Move tip inline with list

* Apply suggestions from code review

Co-Authored-By: James Rodewig <james.rodewig@elastic.co>

* Move TIP inline . . . again

* Put TIP inline

Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2020-04-13 13:57:50 -06: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
Yuliia Naumenko 53ee20b306
Changed alerting wrong param name for help xpack.encrypted_saved_objects.encryptionKey to xpack.encryptedSavedObjects.encryptionKey (#63307) 2020-04-10 19:18:19 -07: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
gchaps 9fd63a7daa
[DOCS] Adds docs for Painless Lab (#62997)
* [DOCS] Adds docs for Painless Lab

* [DOCS] Incorporated review comments
2020-04-09 11:31:19 -07:00
Kaarina Tungseth 59c044ff00
[DOCS] Removed references to right (#62508) 2020-04-09 12:42:30 -05:00
Brandon Morelli fddf6cbee5
[APM] docs: add alerting examples for APM (#62864) 2020-04-09 08:52:06 -07:00
Brandon Morelli 6985478a32
docs: fix rendering of bulleted list (#62855) 2020-04-09 08:22:00 -07:00
Joe Reuter 8d21b6b6f3
Move search source parsing and serializing to data (#59919) 2020-04-09 14:06:01 +02:00
Josh Dover f84773faed
Add basic StatusService (#60335) 2020-04-08 13:16:32 -06:00
Larry Gregory cc9c4113b2
Document sub-feature privileges (#62335)
* documenting sub-feature privileges

* Apply suggestions from code review

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* address PR feedback

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2020-04-08 07:15:31 -04:00
Brandon Morelli 5e1708f884
[APM] docs: add service map information (#62671) 2020-04-07 11:27:02 -07:00
Alexey Antonov 008b0fda64
[data.search.aggs] Remove service getters from agg types (#61628)
* [data.search.aggs] Remove service getters from agg types

Part of #60333

* new portion of changes

* pass dependencies to MetricAgg Type through constructor

* update docs

* refactoring buckets

* remove unused mockDataServices

* Remove service getters from metrics

* Some fixes

* remove temporary code

* moved notifications to the getInternalStartServices

* fixed karma lock

* update docs

* Fixed tests

* fix broken CI

* fix PR comment

* fix typo

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Uladzislau Lasitsa <Uladzislau_Lasitsa@epam.com>
2020-04-07 13:39:30 +03:00
Kaarina Tungseth 809ec97649
[DOCS] Removed references to left (#60807)
* [DOCS] Removed references to left

* Fixed broken build
2020-04-06 15:37:45 -05:00
Lisa Cawley 42d7bb0c81
[DOCS] Fixes nesting in APM and spaces API (#62659) 2020-04-06 11:11:56 -07:00
Kaarina Tungseth 23755f95fa
[DOCS] Collapses content in Kibana and APM APIs (#62201)
* Collapses content in Kibana and APM APIs

* Update docs/api/role-management/put.asciidoc

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>

* Update docs/api/spaces-management/copy_saved_objects.asciidoc

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>

* Update docs/api/spaces-management/copy_saved_objects.asciidoc

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>

* Update docs/api/spaces-management/copy_saved_objects.asciidoc

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>

* Update docs/api/spaces-management/copy_saved_objects.asciidoc

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>

* Update docs/api/spaces-management/copy_saved_objects.asciidoc

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>

* Update docs/api/spaces-management/copy_saved_objects.asciidoc

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>

* Update docs/api/spaces-management/resolve_copy_saved_objects_conflicts.asciidoc

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>

* Update docs/api/spaces-management/resolve_copy_saved_objects_conflicts.asciidoc

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>

* Update docs/api/spaces-management/resolve_copy_saved_objects_conflicts.asciidoc

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>

* Update docs/api/spaces-management/resolve_copy_saved_objects_conflicts.asciidoc

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>

* Update docs/api/spaces-management/resolve_copy_saved_objects_conflicts.asciidoc

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>

* Update docs/api/spaces-management/resolve_copy_saved_objects_conflicts.asciidoc

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>

* Update docs/api/spaces-management/resolve_copy_saved_objects_conflicts.asciidoc

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>

* Update docs/api/spaces-management/resolve_copy_saved_objects_conflicts.asciidoc

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2020-04-06 11:15:52 -05:00
Nathan Reese d26372ce9d
[Maps] 7.7 documentation updates (#61332)
* [Maps] 7.7 doc updates

* blended layer

* revert to grid aggregation language

* review feedback
2020-04-06 08:17:50 -06:00
Alison Goryachev 4ab89e9145
[DOCS] Update index templates example (#62530) 2020-04-06 05:05:29 -04:00
Phillip Burch cff0e4d456
Add docs for metric explorer alerts (#62314)
* Add docs for metric explorer alerts

* Fix link

* Actually fix the link

* Grammar fix

Co-Authored-By: Brandon Morelli <bmorelli25@gmail.com>

Co-authored-by: Brandon Morelli <bmorelli25@gmail.com>
2020-04-03 15:21:17 -05:00
Brandon Morelli d10889a86a
docs: updates to apm agent config (#61893) 2020-04-02 14:19:40 -07:00
Nicolas Ruflin d639432fe5
Add more definitions about Ingest Management (#62049)
This should help to explain the different terms.

The docs directory was also renamed from epm to ingest_manager.
2020-04-02 20:46:52 +02:00
Peter Schretlen 09f1bae2ee
fix text error in diagrams (#62101) 2020-04-02 14:23:09 -04:00
Kaarina Tungseth d6587d7f5b
Updates dashboard images (#62011) 2020-04-02 13:03:50 -05:00
Court Ewing a729b3baef
Remove support for deprecated xpack.telemetry configurations (#51142)
* Remove support for deprecated xpack.telemetry configurations

In 7.5, we moved telemetry to OSS and dropped the xpack prefix for the
telemetry plugin configuration options. We deprecated the usage of the
xpack prefix so any existing usage would trigger a warning at startup.

In 8.0, we remove support for the deprecated xpack prefix configs for
telemetry.

* Move telemetry settings into its own document

* Use external reference instead of anchor

* Update docs/migration/migrate_8_0.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/migration/migrate_8_0.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/settings/telemetry-settings.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/settings/telemetry-settings.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/settings/telemetry-settings.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/settings/telemetry-settings.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/settings/telemetry-settings.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/settings/telemetry-settings.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/settings/telemetry-settings.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/settings/telemetry-settings.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Remove depecrated xpack.telemetry.* config from xpack_main/index.js

Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alejandro Fernández Haro <afharo@gmail.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2020-04-02 15:27:57 +01:00
Aleh Zasypkin 534155f6fc
Document new xpack.security.authc.* settings and related 8.0.0 breaking changes. (#61443) 2020-04-01 16:15:03 +02:00
Alejandro Fernández 9ac2bc5aa4
[DOCS] Show new date picker in logs UI docs (#62019) 2020-04-01 11:55:00 +02:00
Kaarina Tungseth 6af9b136bc
[DOCS] Changed Elasticsearch raw data (#61997)
* [DOCS] Changed Elasticsearch raw data

* Review comments
2020-03-31 13:13:41 -05:00
Peter Schretlen 4e7c681f2b
Alerting user interface documentation and guide (#60256) 2020-03-27 16:45:24 -04:00
Lukas Olson 80417f6888
[Search] Fix async search to encode index pattern in path (#61374)
* Fix async search to encode index in path

* Update docs

* Review feedback & fixing types
2020-03-27 08:31:34 -07:00
Peter Pisljar 7b0c66f7f1
move visualizations plugin to new platform (#60403) 2020-03-27 13:02:06 +01:00
Brandon Morelli df9f2ac577
docs: [APM] custom links (#60595) 2020-03-26 13:30:41 -07:00
Kaarina Tungseth 9ec240a752
[DOCS] Canvas assets (#57494)
* [DOCS] Canvas assets

* Structure reorganization

* Separated out workpad content

* Images, content reorg

* Review comments

* Review comments

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-26 10:28:55 -05:00
Pierre Gayvallet 468de51153
Add plugin start contract to getStartServices return value (#61216)
* add plugin own contract as third element of getStartServices result

* adapt plugins code

* update tests

* revert unknown to use void again

* update generated doc

* fix UT

* update mock to allow non-object `pluginStartContract`

* add @typeParam documentation
2020-03-26 10:49:05 +01:00
Josh Dover 4b012fb21a
Fix running Kibana Platform migrations in development (#61325) 2020-03-25 15:27:26 -06:00
Rudolf Meijering 0d45d9b53f
Update core migration docs links (#61251) 2020-03-25 22:22:21 +01:00
Liza Katz c7c6eba079
Add async search notification (#60706)
* notifications ui

* increase timeout to 10s

* trigger notification from search interceptor

* added an enhanced interceptor

* added an enhanced interceptor

* docs

* docs

* fix ts

* Fix jest tests for interceptor

* update docs

* docs

* Fix handling syntax error in discover

* docs and translations

* fix scripted fields err

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
2020-03-24 17:41:31 +02:00
Pierre Gayvallet babefb5737
introduce StartServicesAccessor type for CoreSetup.getStartServices (#60748)
* create StartServicesAccessor type

* update generated doc

* update usages to use new type

* add missing public annotation
2020-03-24 14:33:31 +01:00
Tiago Costa 35b222a840
fix(NA): log rotation watchers usage (#60956)
* fix(NA): log rotation watchers usage

* docs(NA): add old value to the example

* chore(NA): change warning messages
2020-03-24 02:56:04 +00:00
Peter Pisljar ed55531207
cleanup visualizations api (#59958) 2020-03-23 19:19:39 +01:00
Devon Thomson 05c995a939
Support Histogram Data Type (#59387)
Added the histogram field type to Kibana, to be used in the percentiles, percentiles ranks, and median aggregations.
2020-03-23 11:53:51 -04:00
Kaarina Tungseth fda3196611
[DOCS] Updates API requests and examples (#60695)
* [DOCS] Updates API requests and examples

* Review comments
2020-03-20 16:33:20 -05: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
Daniil Suleiman 1a1e2e7b2e
[NP] Remove ui/agg_types dependencies and move paginated table to kibana_legacy (#60276)
* fix agg type shims and move paginated table to kibana_legacy

* fix types

* fix i18n ids

* fix unit tests

* Update imports

* Remove ui/agg_types imports

* Clean up vis_default_editor plugin

* Remove agg_types imports in vis_type_table

* Clean up x-pack

* Clean up vis_type_vislib

* Last cleanups

* Update docs

* Mock Schemas in vis_type_metric

* Use data plugin mocks

* Remove ui/directives/paginate reference

* Remove snapshot

* Remove shallow

Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-20 18:39:44 +03:00
Jean-Louis Leysens 2c25520051
[Upgrade Assistant] First iteration of batch reindex docs (#59887)
* First iteration of batch reindex docs

Tested with docs generator repo

* Add top level bullet points and remove cruft

* Address PR feedback

Also move the experimental marker to similar position (before
description) on existing endpoint docs for UA.
2020-03-20 11:44:35 +01:00
Liza Katz ef0935ff45
Add addInfo toast to core notifications service (#60574)
* addInfo toast

* md files

* fis types

* Added options to toast methods

* Export ToastOptions

* Export ToastOptions

* added test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-20 08:38:02 +02:00
Liza Katz 2eda06e770
Introduce search interceptor (#60523)
* Add async search strategy

* Add async search

* Fix async strategy and add tests

* Move types to separate file

* Revert changes to demo search

* Update demo search strategy to use async

* Add async es search strategy

* Return response as rawResponse

* Poll after initial request

* Add cancellation to search strategies

* Add tests

* Simplify async search strategy

* Move loadingCount to search strategy

* Update abort controller library

* Bootstrap

* Abort when the request is aborted

* Add utility and update value suggestions route

* Fix bad merge conflict

* Update tests

* Move to data_enhanced plugin

* Remove bad merge

* Revert switching abort controller libraries

* Revert package.json in lib

* Move to previous abort controller

* Add support for frozen indices

* Fix test to use fake timers to run debounced handlers

* Revert changes to example plugin

* Fix loading bar not going away when cancelling

* Call getSearchStrategy instead of passing  directly

* Add async demo search strategy

* Fix error with setting state

* Update how aborting works

* Fix type checks

* Add test for loading count

* Attempt to fix broken example test

* Revert changes to test

* Fix test

* Update name to camelCase

* Fix failing test

* Don't require data_enhanced in example plugin

* Actually send DELETE request

* Use waitForCompletion parameter

* Use default search params

* Add support for rollups

* Only make changes needed for frozen indices/rollups

* Only make changes needed for frozen indices/rollups

* Add back in async functionality

* Fix tests/types

* Fix issue with sending empty body in GET

* Don't include skipped in loaded/total

* Don't wait before polling the next time

* Add search interceptor for bulk managing searches

* Simplify search logic

* Fix merge error

* Review feedback

* Add service for running beyond timeout

* Refactor abort utils

* Remove unneeded changes

* Add tests

* cleanup mocks

* Update src/legacy/core_plugins/kibana/public/dashboard/np_ready/dashboard_app.html

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

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-19 10:28:43 +02:00
Alexey Antonov a708d69f50
[Visualize] Duplicated query filters in es request (#60106)
* [Visualize] Duplicated query filters in es request

Closes: #59630

* Fix CI

* fix CI

* move uniq_filters to common

* fix scripts/check_published_api_changes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-18 18:06:59 +03:00
Lukas Olson ac5e323af8
[Search service] Asynchronous ES search strategy (#53538)
* Add async search strategy

* Add async search

* Fix async strategy and add tests

* Move types to separate file

* Revert changes to demo search

* Update demo search strategy to use async

* Add async es search strategy

* Return response as rawResponse

* Poll after initial request

* Add cancellation to search strategies

* Add tests

* Simplify async search strategy

* Move loadingCount to search strategy

* Update abort controller library

* Bootstrap

* Abort when the request is aborted

* Add utility and update value suggestions route

* Fix bad merge conflict

* Update tests

* Move to data_enhanced plugin

* Remove bad merge

* Revert switching abort controller libraries

* Revert package.json in lib

* Move to previous abort controller

* Add support for frozen indices

* Fix test to use fake timers to run debounced handlers

* Revert changes to example plugin

* Fix loading bar not going away when cancelling

* Call getSearchStrategy instead of passing  directly

* Add async demo search strategy

* Fix error with setting state

* Update how aborting works

* Fix type checks

* Add test for loading count

* Attempt to fix broken example test

* Revert changes to test

* Fix test

* Update name to camelCase

* Fix failing test

* Don't require data_enhanced in example plugin

* Actually send DELETE request

* Use waitForCompletion parameter

* Use default search params

* Add support for rollups

* Only make changes needed for frozen indices/rollups

* Only make changes needed for frozen indices/rollups

* Add back in async functionality

* Fix tests/types

* Fix issue with sending empty body in GET

* Don't include skipped in loaded/total

* Don't wait before polling the next time

* Simplify search logic

* Fix merge error

* Review feedback

* Fix issue with hits.total

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-17 18:47:54 -07:00
CJ Cenizal 4deea08f23
Publish getIsNavDrawerLocked$ method on core chrome service. (#60191)
* Remove isCollapsed, getIsCollapsed, and global_nav_state.
2020-03-17 18:15:26 -07:00
Karen Metts 631d93da50
Remove link to old settings (#60326) 2020-03-17 16:11:40 -04: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
Nathan Reese ef3261132a
[Maps] move MapSavedObject type out of telemetry (#60127)
* [Maps] move MapSavedObject type out of telemetry

* move SavedObject from server to core/types

* review feedback

* results from check_published_api_changes
2020-03-16 15:40:52 -06:00
Kaarina Tungseth 56006534af
[DOCS] Removed below references (#60159) 2020-03-16 09:58:16 -05: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
Rudolf Meijering 6e6325b1df
Expose Elasticsearch from start and deprecate from setup (#59886)
* Expose Elasticsearch from start and deprecate from setup

* Expose client under legacy namespace, add deprecated note

* Update migration guide
2020-03-13 21:17:38 +01:00
Luke Elmers 5d428b0d80
Search Service: cutover agg types to the new platform (#59605) 2020-03-13 09:12:20 -06:00
John Schulz 96f74e6e7a
[Ingest] Add Fleet & EPM features (#59376)
* [EPM] Documentation of HTTP routes & TS types for Ingest (#48798)

* Add beginning models and two routes for Ingest

* Update types & models per discussion w/Ruflin
Also reviewed data structures listed at https://docs.google.com/document/d/1IBR3f9dpHqJmXYEdg06WV34KSMd3g5k4aMGa4jde_Eg/edit#

* Update: /policies always returns array. /policy returns single policy

* Add pagination for /policy & /datasources. Uses per_page & page params

* Add API metadata. Standardize policy_id param name.

* Update descriptions to match Google Doc. Move use case to Policy.

Disabled the '@typescript-eslint/array-type' rule because it was going around in circles. It didn't like Datasource[] or Array<Datasource>

* Return to initial TS annotation for Arrays

Remove the line disabling @typescript-eslint/array-type now that it's behaving normally again 🤷

* [EPM] Add directory structure for server/lib. (#50469)

* Add directory structure for server/lib.

* 'tests' seems to be more common than 'test'

* Make CI happy

* [EPM] Add basic documentation directory (#50478)

* [EPM] Add basic documentation directory

Having the doc directory around allows us to easily add docs from here on to document how EPM works.

To run the docs build, use the following command from the kibana directory:

```
../docs/build_docs --doc docs/epm/index.asciidoc --open
```

The above assumes that docs (https://github.com/elastic/docs) are checked out in the same directory as Kibana.

With this change, the EPM docs build is not included yet in the overall docs build. For this adjustments to https://github.com/elastic/docs/blob/master/conf.yaml must be made.

* [EPM] Add basic index template (#50471)

This PR adds the very basic index template we will use for the packages. It contains all the basic settings and some examples. The examples will be remove as soon as we have an actual implementation with packages but for now is convenient to see if it is a valid package.

This code is put into the lib directory as it does not tie directly into any handlers.

It also adds an functional tests for loading a template. This means we have a way to check if a template is valid in Elasticsearch. Based on this we can check in the future all our generated templates for validity with Elasticsearch.

To run the functional test, go to the Kibana x-pack directory. Start the first command:

```
node scripts/functional_tests_server.js --config test/epm_api_integration/config.ts
```

Keep the above running and switch to an other Terminal. Now run:

```
node scripts/functional_test_runner.js --config x-pack/test/epm_api_integration/config.ts
```

* 40752 rewrite ingest pipeline (#50627)

* Add directory structure for server/lib.

* 'tests' seems to be more common than 'test'

* Make CI happy

* Implement pipeline rewriting.

* Add more testcases

* For posterity (comment change)

* Allow beats-style template delimiters

* Be more succinct

* Document better

* Replace AssetType enum with union type (#50696)

See https://github.com/elastic/kibana/pull/50609#discussion_r346080439

Discussed in Slack and agree to revert for now. Can track down the issues & restore later

* Remove unnecessary await if we can return the promise (#50329)

* Fix whitespace per figma comments. Closes #47348 (#47350)

* Add fix & comment for TS 3.7.2 regression

* [EPM] cleanup assets, filter assets for those currently supported (#50609)

* cleanup assets, filter assets for those currently supported

* removed unused type

* fix type

* add comment for better type

* change type name to be more descriptive

* hardcode image width for ie11 (#49796)

* hardcode image width for ie11

* eslint

* improve comment

* add maxWidth

* [EPM] useKibana hook & render in plugin.start (#50110)

* plugin.start now does reactdom.render vs returning react element

export plugin function from public/index

* Move setClient call from plugin.start to plugin.setup

* Use `useUiSetting$` from `useKibana` hooks

* Fix broken app due to bad hooks usage

Can't use useKibana outside a React component.

Reverting to prior approach since it's still NP. Can revisit context usage in a followup PR

* [EPM] Install package from detail view on button click (#50735)

* Support basic "click button -> show spinner -> installed" install flow

* Remove incorrect comments. Add TS return types to data functions.

* [EPM] Use NP feature_catalogue.register (#50108)

* Use NP feature_catalogue.register

* Use type from NP plugin

* fix linting

* fix types

* fix headers in Fleet

* skipping test due to ES param change

* Revert "skipping test due to ES param change"

This reverts commit d05f20decf.

* remove type field

* remove unused import

* [EPM] Final(?) update from integrations_manager -> EPM (#50976)

* Update (all remaining?) references from integrations_manager to EPM

* Update path in i18n file

* [EPM] update compatibility section (#50975)

* change min max version to single range value

* add elastic stack icon and change text

* remove badge from version and use code font

* remove euistyled

* add back version component lost in merge

* remove euiStyled

* remove old file

* Restore RequirementVersionRange type

* Disable test for elasticsearch username.

Temporary work around until we know how the stack wants to add the permissions we need. Either adding to the kibana user or creating a new user.

* Revert "Disable test for elasticsearch username."

This reverts commit f1020e4eab.

* Disable test for elasticsearch username.

    Temporary work around until we know how the stack wants to add the permissions we need. Either adding to the kibana user or creating a new user.

* Fix EPM typing issues in register feature

* Fix typings after master merge

* [EPM] CI fixes (#51284)

* Initialize es in test.

* Add it(), no es.init()

* Clean up.

* [EPM] add confirmation modal (#51172)

* add confirmation modal, move install state to Header

* update callout to use title

* move components only used in detail view to detail dir

* use better variable names

* update to more descriptive  variable names

* Restore prior response vaulues for install & delete package (#51252)

Discussed this with @skh https://github.com/elastic/kibana/pull/51112#commitcomment-35961413 & https://github.com/elastic/kibana/pull/51112#commitcomment-35970664 as well as in a video call

Also added some TS type annotations for data fetching functions to make the contracts more explicit

* [EPM] /package API only lists installable assets. Restore enums. (#51414)

* API only shows installable assets. Server types to own file. Restore enums

* Fix type imports

* Only return installable asset types (kibana for now)

* server/types now only has code from hapi which shouldn't go to client

* Add more restricted TS types to DisplayAssets object

* Flip order of arguments to Extract

In these cases it still works the same, but looking at https://www.typescriptlang.org/docs/handbook/advanced-types.html the signature is

`Extract<T, U>` - Extract from `T` those types that are assignable to `U`

so the larger set should be first

* [Fleet] Enrollment api key UI (#51495)

* Make button pretty in dark mode as well. (#51610)

* [EPM] Add docs entry about registryUrl config (#51697)

This documentation is at the moment mainly for internal use. I found myself searching for this URL several times in the code or PRs so I thought I rather add it to the docs for now.

* [EPM] Remove encoding of Kibana objects as not needed anymore

* [Fleet] Move agent status server side and API to get aggregated status for a policy (#51673)

* [EPM] Add basic docs around install/delete API endpoint (#51728)

This is mainly for internal usage at the moment to look up.

* Ingest/policy (#51741)

* wip policy

* tweaks

* tweaks

* FIX TYPOS

* WIP move policy => agent config conversion to fleet, WIP policy changed method

* fix tests and bugs

* updates tests and snaps

* more fixes

* use AGENT_POLLING_INTERVAL

* cleanup and fix some formatting

* Update x-pack/legacy/plugins/ingest/server/libs/datasources.ts

Co-Authored-By: John Schulz <github.com@jfsiii.org>

* Update x-pack/legacy/plugins/ingest/server/libs/datasources.ts

Co-Authored-By: John Schulz <github.com@jfsiii.org>

* Update x-pack/legacy/plugins/ingest/server/libs/outputs.ts

Co-Authored-By: John Schulz <github.com@jfsiii.org>

* Update x-pack/legacy/plugins/fleet/server/libs/policy.ts

Co-Authored-By: John Schulz <github.com@jfsiii.org>

* fix things broken by PR review suggestions

* remove unused field

* fix types

* fix mappings

* add datasource mappings

* Fix mappings and remove get full policy from checkin

* Fix ingest api integration tests

* run es-lint to fix fleet

* Fix typescript issues

* [EPM] Track package install state and add toast notification (#51734)

* add notifications from core to plugin

* add package install state hook

* fix type error

* use toMountPoint helper to add jsx to notification

* add warning notification to failed install

* make notifications dependency explicit prop

* move PackageInstall provider lower

* add comment about InstallStatus type overlapping InstallationStatus

* use InstallStatus type in InstallationButton component

* fix type

* [Ingest] Adds support for a working default output (#51841)

* aadding config

* add working settings to the default output

* remove default username and password

* update libs

* [EPM] Add basics for creating the ILM setup (#50474)

This contains the basic objects to setup ILM

* Create index and alias with a write index
* Get the policy

The code does not contain any functional tests yet as it is still open on how to do it best. I suggest to get this in as a foundation and then iterate on top of it.

* [EPM] Add datasource (ingest pipeline) from package (#51851)

## Summary

This mixes a few concerns but I think it's worth it to show the parts working together.

Take a look at the individual commits for a better separation of features.

This adds 
 - the `/datasource/install/{pkgkey}` endpoint which installs ingest pipelines from a package into ES and saves a reference to them in the EPM state Saved Object
 - Connects the "Add datasource" button in the successful installation Toast to the new API
 - Adds a toast notification to inform the user the datasource was added correctly
 - Adds a "Delete Package" button on the details page so we can uninstall a package while we're waiting for the separate view which allows deletes
 - b99eda6 Pushes logic that was in the detail view into `InstallationButton`. This consolidates the logic in one component (or one component & the existing hook) and, iiic, means we can put `<InstallationButton package={...} />` on any view and get the same behavior

I'm marking this as a normal PR so people can merge if they wish

![add-datasource-delete-package-small](https://user-images.githubusercontent.com/57655/69775686-7fb39280-1167-11ea-8d41-e2b8a02252a1.gif)

* [EPM] Add basic processing of fields.yml file (#51148)

The fields.yml is used to generate the Elasticsearch template and Kibana index pattern. This PR adds a very basic implementation of processing the fields.yml and then create an Elasticsearch template out of it. The only fields that are supported at the moment are keyword fields, more will be added as a follow up.

The testing was implemented with a golden file. The output from the method is compared to a json file. If the input is changed or the method is changed, it is possible to regenerate the files with the `-generate` flag as following:

```
node scripts/jest  ./legacy/plugins/epm/server/lib/template/template.test.ts -generate
```

This will allow us to quickly test many inputs / outputs in the future, make adjustments to the existing files and generate the new outputs. We then can compare it in the diff it the changes make sense.

* [EPM] Create basic implementation to merge input template and dataset manifest (#51803)

* [EPM] Create basic implementation to merge input template and dataset manifest

With this code it is possible to take an input template for the agent and merge it with the config variables from the dataset manifest file. Currently only the name and the default value are merged. Later on we must implement to be able to pass user configured variables to it and make decision based on OS selection.

Closing https://github.com/elastic/kibana/issues/51794

* [EPM] Refactoring of lib structure (#51885)

This refactors the structure of lib. As so far all the lib parts are related to assets in the package, it is organised the same way with the same structure. Each directory has its own tests directory if it needs one. This makes it possible to (almost) not need relative paths for tests.

* [EPM] Allow to read files from fields directory (#51958)

This change allows to also extract files from the `fields` directory. Previously this was not possible because it always assumed a service must be there.

* [EPM] Install Elasticsearch Index Template for data source (#51878)

This installs the Elasticsearch index template for each dataset in a package. For now the names are hardcoded based on package key and dataset name but will be more dynamic later on when we pass the full dataset information.

The dataset extractions is a bit "hacky" at the moment and we should get a full implementation of dataset at a later stage and replace this code.

* [Fleet] Policy list, details, create, edit UIs (#51950)

* Set up simple policies list view

* Adjust spec to return single policy

* Set up simple policy details page

* Add demo stats/chart to policy details

* Add description string

* Initial setup of policy form and create policy UI

* Policy create/edit form; integrate policy list api

* Integrate create policy api

* Integrate policy detail, agent status, and policy edit APIs; adjust policy list api integration in agent enrollment

* Fix edit policy mock meta

* Fix policy list search bar

* PR and linting fixes; use typings from ingest plugin

* Fix i18n

* [EPM] Add datasource saved object type (#51871)

## Summary

This PR makes a few assumptions, and contains a lot of refactoring. It might be beneficial to look at the resulting directory structure under `server` first to get the (new) big picture.

Assumptions:
- our API deals with several concerns, for now these are packages and datasources
- we manage our own HTTP API endpoints for these concerns (in particular, don't use the ingest plugin for that)
- we manage (for now) the Kibana saved object in which datasources are saved. importing and calling methods from the ingest plugin to do that down the road will (hopefully) be a manageable change

This led to the following decisions:
- the code is separated into subdirectories by concern, containing all the route handlers and tightly coupled code
- for now, these directories are in `server/packages` and `server/datasources`. I'm tempted to move them into `server/api/{packages,datasources}` but wanted to limit the amount of refactoring in one PR
- shared code lives in `server/lib`
- some code from `server/packages` has been almost duplicated to handle saving to Datasource saved objects, some has been refactored and is used from both places. The deduplication needs further improvement
- maybe `server/registry` should also move under `server/lib` (but see above, I'm trying to not move everything around all at once)

Testing:

* Please note that this is a breaking change because the saved object type for package information
has also been renamed. You'll need to start with a fresh `.kibana-*` index. Restarting `yarn es snapshot` (withouth specifying a data directory) should do the trick.

* Package installation should still work, e.g. with a GET request to `http://localhost:5601/api/epm/package/coredns-1.0.1`. The saved objects for packages can be inspected with a GET request to `http://localhost:5601/api/saved_objects/epm-package/$PKG_KEY`, e.g. `http://localhost:5601/api/saved_objects/epm-package/coredns-1.0.1`
* Datasource creation should still work, e.g. with a GET request to `http://localhost:5601/api/epm/datasource/install/coredns-1.0.1`. The saved objects for datasources can be inspected with a GET to `http://localhost:5601/api/saved_objects/epm-datasource/$PKG_KEY`, e.g. `http://localhost:5601/api/saved_objects/epm-datasource/coredns-1.0.1`

* [Fleet] Expose policy during agent checkin (#51968)

* [EPM] Add /epr prefix to the tar.gz download path (#51881)

The registry slightly changed the .tar.gz path because of download stats reason. This adjusts for it. See https://github.com/elastic/package-registry/pull/169

* [EPM] Move template installation to lib and add asset helper  (#52049)

* [EPM] Move template installation to lib and add asset helper

All the logic related to the installation of the templates for a package should be inside the template library folder. This moves the logic into this folder.

A few refactorings were made to simplify installation:

* Introduction of DataSet interface: This interface is needed to extract the data sets inside a package and install one template per data set.
* Pass package instead of package key to installation process: Passing the package instead of the package key means fetching of package information is decoupled from the installation process and abstracted. This separates the two concerns and should simplify testing.
* getAsssets method: The getAssets methods works on top of the package object to extract asset paths. It is inspired by get_objects methods but supports passing a package and a dataset.

Currently one problem with testing that exists is that to fetch the content of an asset is not decoupled yet.

* [EPM] Reduce data source to one type (#52061)

Between Fleet / Ingest / EPM there had been several interface definitions of Datasource and the related types. This reduces it to one place for the definition. The same applies to the policy definition.

The goal of this is that from now on we all rely on the same definition. If we make changes, we make them in all parts of the code.

In this PR is only the minimal change needed to get us all on one interface. Further changes will be needed that we all rely on the same saved objects etc.

* add export command

* revert 2 more files to rely on export

* revert imports

* Fix types for Datasource Saved Object

* merge in master

* fix type check

* Run VSCode's organize imports on EPM files (#52234)

Learned about it on Slack from https://twitter.com/ryanchenkie/status/1201883268527927301

Blog at https://code.visualstudio.com/updates/v1_23#_run-code-actions-on-save

Basically does the order we've been loosely following (3rd party, then relative) & alphabetic by location and variable name.

It's not customizable but it's reasonable and, afaict, consistent.

* [EPM] More realistic datasource SO. Error if package not installed. (#52229)

* Move cache 'hack' into getAssetsData

* p -> pkg. package is reserved. pkgkey is used in many places

* Remove unnecessary type cast

* Clarify reasons behind asset path manipulation

* Return the Datasource; not the Saved Object.

* Use real values from package in fake datasource SO

* Error if /datasource/install before /package/install

```
> curl --user elastic:changeme localhost:5601/api/epm/datasource/install/coredns-1.0.1
{
  "statusCode": 403,
  "error": "Forbidden",
  "message": "coredns-1.0.1 is not installed"
}

> curl --user elastic:changeme localhost:5601/api/epm/install/coredns-1.0.1
[
  {
    "id": "53aa1f70-443e-11e9-8548-ab7fbe04f038",
    "type": "dashboard"
  },
  {
    "id": "Metricbeat-CoreDNS-Dashboard-ecs",
    "type": "dashboard"
  },
  {
    "id": "75743f70-443c-11e9-8548-ab7fbe04f038",
    "type": "visualization"
  },
  {
    "id": "36e08510-53c4-11e9-b466-9be470bbd327-ecs",
    "type": "visualization"
  },
  {
    "id": "277fc650-67a9-11e9-a534-715561d0bf42",
    "type": "visualization"
  },
  {
    "id": "cfde7fb0-443d-11e9-8548-ab7fbe04f038",
    "type": "visualization"
  },
  {
    "id": "a19df590-53c4-11e9-b466-9be470bbd327-ecs",
    "type": "visualization"
  },
  {
    "id": "a58345f0-7298-11e9-b0d0-414c3011ddbb",
    "type": "visualization"
  },
  {
    "id": "9dc640e0-4432-11e9-8548-ab7fbe04f038",
    "type": "visualization"
  },
  {
    "id": "3ad75810-4429-11e9-8548-ab7fbe04f038",
    "type": "visualization"
  },
  {
    "id": "57c74300-7308-11e9-b0d0-414c3011ddbb",
    "type": "visualization"
  },
  {
    "id": "27da53f0-53d5-11e9-b466-9be470bbd327-ecs",
    "type": "visualization"
  },
  {
    "id": "86177430-728d-11e9-b0d0-414c3011ddbb",
    "type": "visualization"
  },
  {
    "id": "4804eaa0-7315-11e9-b0d0-414c3011ddbb",
    "type": "visualization"
  }
]

> curl --user elastic:changeme localhost:5601/api/epm/datasource/install/coredns-1.0.1
[
  {
    "id": "coredns_1_0_1_dataset_log_elasticsearch_ingest_pipeline_pipeline_plaintext_json",
    "type": "ingest-pipeline"
  },
  {
    "id": "coredns_1_0_1_dataset_log_elasticsearch_ingest_pipeline_pipeline_json_json",
    "type": "ingest-pipeline"
  },
  {
    "id": "coredns_1_0_1_dataset_log_elasticsearch_ingest_pipeline_pipeline_entry_json",
    "type": "ingest-pipeline"
  }
]
```

* fix duplicated imports

* [EPM] Move golden files generation over to jest snapshot (#52203)

* [EPM] Move golden files generation over to jest snapshot

I initially used my own implementation to write the generated files. It runs out jest has a feature to write snapshots which simplifies the code a lot.

I added a loop with an additional test file so in the future we can just keep adding test files without having to modify the test code.

To updated the snapshots, the param `-u` has to be used:

```
node scripts/jest legacy/plugins/epm/server/lib/fields/field.test.ts -u
```

* [EPM] Create metrics-* and logs-* Kibana index pattern (#52277)

This creates the very basic Kibana index patterns metrics-* and logs-* for Kibana. At the moment it is overwritten every time. We need to change this in the future to take the fields from all installed data sources and regenerate it.

* [EPM] Create helper for elasticsearch asset names (#52265)

Most of the Elasticsearch assets have the same base name. This creates a helper to get the base name for the assets. In case we decide to change the base name in the future, we can change it in one place.

* fix tests and destructing

* [EPM] Update Registry types. Prevent errors installing certain datasources. (#52285)

* Update RegistryPackage type

* Use download key from EPR to fetch archive

* Fix errors caused by correcting the Registry types.

The issues were largely that some Registry types like `title, `datasets` and `assets` where marked as required, but are actually optional. This highlighted area in the code were we relied on them always being present.

We added to the issue by wrapping Registry types in `Required` which made those items which were correctly listed as optional, required for EPM code. Updated EPM types to reflect the largely pass-through nature of the EPM types.

There are two properties which we ensure are in every EPM response, those were put into their own (unexported) type.

Confirm by trying to add a datasource to a package which has no datasources, like apache-1.0.1 or system-2.0.1. In `feature-ingest` and the earlier version of this PR, the `/datasource/install` call returns a 500. In this PR it succeeds.

* [EPM] Add setup of default ILM policies (#52272)

This creates two ILM policies: logs-default and metrics-default. These are the default ILM policies used. Currently the policy content is hardcoded in the code but should be fetched from the base package in the future. The setup happens as part of the datasource installation. When a data source is installed it is a good time to check if the assets are there but we might extract this to a better place in the future.

* [EPM] 52075 add data source first page (#52320)

* Update RegistryPackage type

* add first page of add data source

* fix for ie11 flex min width bug

* remove toDetailViewRelative

* remove unneeded spread

* Update TS type names for EPR search results (#52512)


 * `RegistryList -> RegistrySearchResults`
 * `RegistryListItem -> RegistrySearchResult`

* Restore import sort order from #52234 (#52548)

Many of the changes from #52234 were lost. Presumably due to PR(s) merging which were based on branches which had the previous unsorted order.

* [EPM] Replace wildcard export (#52554)


 * PackageNotInstalledError -> packages/index.ts
 * pkgToPkgKey -> registry/index.ts (will convert existing `${name}-${version}` instances later)

* Replace export * from packages.

There's an argument that the import sites should be updated to import from `packages/get`, `packages/install`, etc but that can wait for a later PR.

* [EPM] Reduce usage of epm-package SavedObject (#52576)

* Delete existing Installation type. Rename InstallationAttributes to Installation

* Reduce usage of EPM SO. Add getInstallation().

Replaced two calls of getInstallationObject() with getInstallation().

Two less places with knowledge of SO internals.

Lots of potential improvements for EPM TS types remain (refactoring/removing Installable, etc), but this is a good incremental step, IMO

* [EPM] Fix missing export link (#52628)

Without it, things break. I am surprised CI did not catch this.

* [EPM] Cleanup ILM loading (#52632)

Before the check for the ILM policy to exist triggered an exception. With this change it is a normal response also if the policy does not exist yet.

A follow up issue will be created in Elasticsearch to get a HEAD request for this available.

* [EPM] Switch to staging URL for registry (#52626)

The old cluster with the registry will be removed as soon as this is merged.

* [EPM] Use Dataset interface to generate template (#52255)

This will make sure we have to pass much feature params and can fully rely on the datasource object to create names for assets.

* [Fleet] Use agent events to compute agent health (#52513)

* [EPM] Data source integration tests (#52542)

* Add fixtures for data source integration test.

* Move test setup to beforeEach

* Add test for datasource creation

* Handle pipelines in yml format.

* Make integration test for adding a data source pass.

* Use EPR staging URL with CDN. (#52776)

See https://github.com/elastic/kibana/pull/52626#pullrequestreview-330622868

* [EPM] Add Data Source page updates (#52705)

* remove dupe type RegistryPackage

* change switches to checkboxes, use datasets to create checkboxes, add some local form state

* update types

* [EPM] redirect after package install (#52771)

* add callback after successful installation and redirect

* add temp data sources tab content to access add data source page

* remove assets tab for mvp

* hide data sources link and redirect from data sources tab if package not installed

* change callback name

* remove commented out assets logic

* add redirect to hook

* fix type

* Use ingest datasource api (#52964)

Incremental change. Uses HTTP API for datasource creation. Will do follow-up PR which uses JS function instead

* Remove duplicate fetchInfo & installTemplates

I think this was from a bad merge, but pretty sure we don't want these functions called twice in the same function

* WIP. Pushing so others can see

* Improve correctness/flexibility of absolute URL

* Disable datasource test & template installation

* [Ingest] Data source APIs (#52448)

* Clean up ingest imports and remove unneeded mock_spec files

* Initial pass at datasources lib and API endpoints

* Add add/remove datasource to/from policy API endpoints

* Add datasource contract tests and related policy contract tests; update snapshots

* Fix tests

* Fix tests again

* Fix tests 3

* Adjust routes, PR feedback

* modify epm createDatasource endpoint to use user data (#52971)

* change epm/datasource/install/{pkg} to POST, send user data to endpoint, install pipelines and templates based on user selected datasets

* change test to post for installing a datasource

* change some names and types around

* delete request.headers['transfer-encoding'] being passed through from epm request

* [EPM] Don't share CreateFakeDatasource type (#53068)

It's not shared between client & server so it doesn't need to be in common. Also, it imports server code which would try to bring server types to the client. It's types so they're compiled away but it's important to keep common to what's truly common. Breaking this separation is why we thought enums broke the client. A lint rule just landed in master to prevent this.

* [EPM] Index template generation fixes (#53104)

* Only add keyword type field to mappings.

* Index template installation

* Handle empty fields definition files
* Re-enable index template installation

* [Fleet] Assign/Unassign data source from policy UI (#53058)

* Add index files to export various modules; normalize imports

* Clean up unused files; extract datasources table component from policy details page

* Expose http client to frontend libs; remove unused types; import ES UI's useRequest lib

* Adjust shape of rest api adapter interface to better match with rest of kibana; remove unused node adapter; change per_page param to perPage in agent events route

* Initial pass at assign data sources flyout

* Initial pass at unassigning data sources from policy

* Make data sources table searchable by package values

* Fix enrollment key lib for rest adapter param changes

* Fix imports and types

* `yarn.lock` changes after bootstrapping

* [EPM] Implement getConfig for dataset (#53261)

* [EPM] Implement getConfig for dataset

* Implements a getConfig method on a dataset object. 
* Build the configuration for each dataset in a package.
* construct and save streams into datasource saved object

* [EPM] Fix template installation (#53272)

As dataset.package was not set, the installed templates contained undefined in the template name. This changes fixes this.

* [EM] Refactor ingest pipeline installation (#53309)

* Refactor ingest pipeline installation

* Only install index templates for requested datasets

* Add index.default_pipeline to index template

* Hook up pipeline rewriting

* Add correct types.

* change POST create datasources path (#53165)

* change POST create datasources path

* remove pkgkey from params

* Fix creation of a data source with a custom ID (#53537)

* [Ingest] Return associated policy IDs in data source info (#53350)

* Return number of policies from data source, surface in assign data source UI

* Update snapshots

* [EPM]: Assign data source to policy in UI (#53597)

* Let ES generate source ids. Refactor along the way.
* Datasource.id isn't optional. It's just missing before we send to Ingest
* Delete EPM's mapping of datasources saved object. Ingest handles that.
* Keep datasource object-related work in constructDatasource
* Move asset installation into own function. Keep entry point high-level.
* More descriptive (less ambiguous) names for these two functions
* Use enum values from Ingest instead of plain strings
* Limit the 'type' key of references to known asset types.
* Update variable names to clarify that we're merging arrays of references
* Use [].flat instead .reduce + .concat to avoid error on empty arrays.
* Pass PackageInfo value directly to component vs pulling off n properties
* Name handlers/options based on the data, not the UI element
* Populate policy combo box based on values from Ingest policy API
* Mark Dataset.vars as optional.
* Add TODOs

* Add commands to run API tests to README (#53847)

* Limit functions to 3 params max. Update those which used more (#53848)

* [EPM] Code in 'common' directories shouldn't import server code (#53854)

* [Fleet] Code in 'common' directories shouldn't import server code (#53938)

* [Fleet] Remove server code from common folder in fleet
* [Fleet] Fix typescript issues after master merge
* [EPM] Fix typescript issues after master merge

* Fix eslint issues

* Fix typescript issues after merge

* Fix merge master missing line

* Fix merge conflict

* [Fleet] Fix registration of Ingest management section (#54065)

* Fix registration of Ingest management section

* Fix i18n key

* [Fleet] Remove server code from common folder in ingest (#53969)

* [Fleet] Connect fleet to policy change update (#53201)

* [Fleet] Send created event when a policy is created
* [Fleet] updated created event when a policy is created
* [Fleet] Send deleted event when a policy is deleted

* [Fleet] Rename output.url => output.hosts (#54258)

* [Ingest] Remove policies UI (#54308)

* Remove meta field UI from policy add/edit form

* Initial pass at policy bulk+single delete UI and API

* Adjust policy links from agent list and detail pages so that links are only active if policy exists

* Add delete policy UI to policy detail page

* Disable policy delete button for default policy

* Commit updated kbn-pm artifact.

CI is failing with messages like
14:52:28  ERROR: 'yarn kbn run build -i @kbn/pm' caused changes to the following files:
14:52:28
14:52:28  packages/kbn-pm/dist/index.js

Following advice from https://elastic.slack.com/archives/C0D8P2XK5/p1570032166063400 and running/committing build

* Update kbn/pm package

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* [EPM] create logs metrics index patterns (#54037)

* fixes bug in for loop returning too early and not looping through all yaml files creating incomplete index template, move loading yaml files to own function, other cleanup

* use reduce in place of for loop

* basic functionality for creating index patterns

* separate logs and metrics index patterns

* dedupe fields

* adjust flattenFields to rename nested fields with parent name path

* some tests

* use yml files for tests

* add awaits as part of installing the package

* optimize loading of yaml files

* fix typo

* change type packageName to package

* update tests to use all files from the beginning

* fix type errors

* fix test

* Use dataset.package from registry

https://github.com/elastic/kibana/pull/54037#pullrequestreview-340362812

* Form validation on add datasource page. (#53920)

* [Ingest] Add support for policy `label` field (#54413)

* Allow `label` field in policy APIs, update UIs to support `label` field

* PR review changes, typo fixes, update tests

* [Fleet] Fix api key creation (#54498)

* [Fleet] Move agent acks to his own endpoint (#54401)

* [Ingest] Fix MaxListenersExceededWarning during kibana boot (#54745)

* [Fleet] Create a default api key for the default output (#54658)

* [EPM] update index pattern fields (#54862)

* add DatasetType type

* move loadFieldsFromYaml to fields

* add logic to determine field values

* update tests

* add back accidentally removed readFromDocValues

* remove DatasetType and add IndexPatternType

* rename dedup to dedupe

* group tests

* use null coalescing operator

* Fix typing issues

* [Fleet] Support agent event subtype STOPPING (#55231)

* [EPM] Prevent double submit when creating data sources

Update installationRequested state after submit (#55100)

* [EPM] handle alias fields when creating kibana index pattern (#55254)

* add alias support, update flattenFields to handle alias copying, update and add tests

* update snapshot

* update findFieldByPath to return undefined if not leaf node

* remove temporary alias type from map

* [EPM] handle multi fields when creating index patterns (#55554)

* handle mult_fields

* move nested function out

* [Fleet] Fleet/spec docs (#55619)

* [EPM] Start to document definitions (#55361)

This is a first stab at creating a place where we define the terms we use across ingest management. This is not complete but defines a place where we can add all the future defintions.

* [EPM] Indexing strategy docs (#55301)

* [EPM] Indexing strategy docs

This documentation is to start documenting our new indexing strategy in a public place and have it versioned. This will allow us to share the current state of the indexing strategy more easily in a single place, track it when updated and also already have it ready for our future users to look it up and understand the benefits of it.

* update typos

* fix one more typo

* apply review feedback

* skip fields that are disabled (#55735)

* [Fleet] Fix fleet typing issues after merging master

* [EPM] Create fieldFormatMap in kibana index pattern (#55892)

* add support for fieldFormatMap

* output params must be camel case

* fix case

* add url_template param

* [Fleet] Use user from saved object to create apiKeys (#55458)

* [EPM] Document package upgrade behaviour (#56138)

This PR adds more detailed documentation on what should happen when a package is upgraded.

* Remove some explicit typing to pass type checks.

This abstraction will be removed in the single plugin going into master.

* remove readFromDocValues (#56227)

* Add symlink to yarn.lock to fix(?) CI

https://github.com/elastic/kibana/pull/56443/checks?check_run_id=418123781 failed saying EPM directory "MUST have a 'yarn.lock' symlink"

Seems to have originated with https://github.com/elastic/kibana/pull/55440

Following example from other legacy/plugins/* in that PR

* Like 441d9ed, but correct

* [Ingest] Convert `ingest` plugin to new platform `ingest_manager` plugin (#56262)

* Seed Ingest Manager as a new NP plugin

* Add contexts for core, deps, and config. Begin routing and nav UI

* Export NP ready request from top-level es_ui_shared/public/

* Add nav styling w/ theming, add useRequest hook

* Set up license and config server-side services; add test routes

* Move most types and constants into /common

* Initial pass at:
* data stream and agent config models
* data stream routes and schemas

* Initial pass at agent config api route handlers

* Change plugin id to camel case

* Fix circular schema dependency, add security as optional plugin

* Create appContext service, use request user info in agent config routes + libs

* Create default agent config

* Add default output host config, output typings, and create default output and its api key

* Move saved object mapping to new plugin

* Change data streams -> datasources

* Add legacy plugin to bootstrap mappings

* Adjust fleet's ingest dependencies

* Disable policies UI in Fleet

* Adjust EPM's ingest dependencies

* Adjust ingest manager base API route

* Adjust fleet's client side ingest dependencies

* Remove more ingest dependencies from fleet

* REMOVE MOST OF LEGACY INGEST PLUGIN

* Add section for agent configs in UI nav

* Allow useRequest and sendRequest consumers to specify typing for response

* Initial pass at porting over agent config list UI

* Port over agent config creation

* Port over delete agent config functionality

* Fix app routing

* Port over fleet setup routes

* Adjust fleet's ingest dependencies

* Make fleet happy path work, skip some tests (MESSY! :))

* Remove policy list UI code from fleet

* Change useRequestResponse error type

* Add missing agent config schemas and hooks

* Fix type check issues

* Register IM under management

* Fix type issues as a result of changes to use/sendRequest interfaces

* Make all ingest saved objects *not* space-aware

* Fix i18n path

* Fix app categories import

* Fix datasource package assets schema (array of asset objects)

* Seed Ingest Manager privileges to fix tests

* Change `features` to optional plugin instead of required

* Fix security privileges tests

* Fix feature test

* Fix duplicate enrollment key created for default agent config

* Fix fleet agent enrollment by catching agent config 404

* PR feedback

* [Fleet] Detailed docs of fleet <-> agents interactions (#56212)

* [EPM] update index patterns on install/uninstall of package (#56591)

* create index patterns functionality on install/uninstall of package

* update snapshots

* [Fleet] Generate an ES api key per agent per output (#56637)

* [Fleet] Remove unused enrollement rules (#56753)

* remove files related to creating data source (#56745)

* Fix typing issues after mergin master

* Fix api key authentication after master merge

* [EPM] NP Migration: Move server files and route handlers to ingest_manager (#56854)

* initial pass moving registry and categories endpoint

* moves all needed server files and gets list endpoint working

* add route list validation schema

* remove epm config

* use config to get the registryUrl

* clean up registry url

* gets file endpoint working

* add info endpoint

* get install package endpoint working

* support uninstall package endpoint

* add API response types

* move epm types to models

* move AssetType to IngestAsset type from ingest plugin

* remove redundant export

* update epm_api_integration tests to new endpoint paths in ingest manager

* fix imports

* [Ingest Management] Change indexing from {type}-{namespace}-{dataset} to {type}-{dataset}-{namespace} (#56132)

Currently we have the indexing strategy defined as `{type}-{namespace}-{dataset}`. In this PR I propose to change this to `{type}-{dataset}-{namespace}`. As all 3 fields are constant keyword fields, the orders does not matter in most cases.

The reason I propose this change is to better align the name of indices with the name of the other assets:

* ingest pipeline: {type}-{dataset}
* index template: {type}-{dataset}
  * Index pattern: {type}-{dataset}-*
* alias name: {type}-{dataset}-{namespace}

This makes it easier to remember the asset names conventions (at least for me).

It makes a difference when specifying security per namespace: To lock down security, previously it is `/(logs|metrics)-prod-$/` and becomes `/(logs|metrics)-[^-]+-prod-$/`. In any case, we should help / assist the user to get this right.

* [EPM] Remove epm plugin and directory (#57309)

* delete server files, move over epm saved object schemas and mapping, stop epm plugin loading in xpack

* updated yarn

* change to updated name

* remove epm dir, copy readme to ingest_manager

* move package.json over and update yarn.lock

* update package name

* add yarn.lock symlink

* fix yarn.lock symlink

* remove epm from security privileges map

* remove epm from feature endpoint and i18nrc

* [Fleet] Move fleet to the new platform and to ingest_manager plugin (#56803)

* [Fleet] NP migration public part (#57567)

* [EPM] EPM to new plugin, UI part (#56882)

* Move EPM home / list view over to ingest-manager

* Use react-router-dom in epm section.

* WIP: add package detail view.

* Use correct route.

* Only import needed types to public

* Remove obsolete file.

* Import type correctly

* Revert "Remove obsolete file."

This reverts commit 4b061102ebc62b49e7d1291060405ea8d23a3a8a.

* Routes are still needed, fix them.

* Import types correctly

* More type import fixes.

* update get categories hook

* remove no longer used getCategories function

* get list packages hook working

* delete routes.tsx, cleanup links

* add the usePackageInstall hook

* replace rest of api calls with use/send request

* remove tmp_routes

* bring over breadcrumbs

* remove comments and get styles working

* get ride side col loading

* temp type fix

* remove useCore

* add assets

* remove comment

* add public directory to legacy ingest_manager and update asset path

* Fix PackageInfo type. Use for API & UI vs a saved object type.

The `as PackageInfo` cast was required because the pipeline was typed as returning `Installed | NotInstalled` which are saved object response.

Updating that to PackageInfo allows the `as` to be removed but revealed an incompatibility between the `assets` properties of RegistryPackage and PackageInfo

```
Types of property 'assets' are incompatible.
  Type 'Record<"kibana", Record<KibanaAssetType, KibanaAssetParts[]>>' is missing the following properties from type 'string[]': length, pop, push, concat, and 28 more.
```

It seems the `RegistryPackage & PackageAdditions` didn't cause the PackageAdditions.assets to replace the RegistryPackage.assets property.

I changed the definition of PackageInfo to do what I initially thought it was doing. See comments in models/epm.ts for more about how the new type is constructed.

* remove comment

* fix paths

* fix public paths

* fix path

* remove ui types file

* fix types

Co-authored-by: Sandra Gonzales <neptunian@users.noreply.github.com>
Co-authored-by: John Schulz <github.com@jfsiii.org>

* [Fleet] AgentEvent change agent_id and remove data (#57818)

* Remove legacy `ingest` plugin completely (#58056)

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

* WIP. 1 type error (but >1 bugs) remaining.

* Add `callCluster` accessors for using ES vs appContext.getClusterClient()

* Undo (?) changes to kbn-pm/dist/index.js

* Run scripts/build_renovate_config for @types/tar

* Replace data w/ agent_id in server schema

* Different way to declare a saved object type

* Use a more specific path to the agent script

* Replace data with agent_id for agent checkin

* Restore internalSavedObjectsClient in app context

* Use project & HTTP TS types in scripts/dev_agent

* Remove ingestManager from FTR features

The plugin is disabled by default and not currently running the FTR tests. I believe we'll add this back when we restore the EPM integration tests.

* Move more variables to common/{constants,types}

* Remove ingestManager from default expected features

* Enable conditional routes. Adjust integration tests

EPM routes currently return a 500 for these tests. For now they `.expect(500)` when enabled and `.expect(404)` when disabled. We can look into the issue and get them to `.expect(200)` in later tests.

* Replace React.FC with React.FunctionComponent following new repo pattern

* Enable Fleet & Ingest FTR tests

* Remove duplicate *Response entries from server/types

* Update README instructions for CLI flags. Rearrange sections (#58363)

* Add instructions for CLI flags. Rearrange sections

Also added some more information about the plugin behavior with links to relevant code

* Add instructions for Ingest & Fleet FTR tests

* Restore search to EPM list page

* [Fleet] Allow to configure CA sha for kibana and elasticsearch (#58186)

* [Ingest] Adjust saved object mappings and rename policy -> config (#58670)

* Replace all reference to (agent) "policy"/"policies" with "config"/"configs"

* Adjust output and datasource saved object mappings

* Update schemas and types to match SO changes

* Fix type check

* Adjust default output object

* Fix property names in tests

* Move installing of index templates and ingest pipelines to package installation (#58619)

* update template and pipeline asset names, install on package install

* fix package install error handling messaging

* save references to installations to package saved object

* add epm.enabled flag for epm functional test runner

* don't add suffix to pipeline entry

* [Fleet] Add a schema of all of our saved objects (#58769)

* [Fleet] Do not use default id for saved objects that need to be encrypted (#57876)

* Adding events for index pattern generation (#58908)

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

* Fix yarn.lock after merge

* [Fleet] create agent config before enabling fleet user (#59166)

* support for top level elasticsearch assets installation (#58869)

* add support for ilm policy installation

* check if ilm policy exists

* handle prebuilt index templates, update tests

* cleanup

* update type in install

* fix installing index templates to create multiple ones for inheritance

* [Fleet] Create default output while creating default config (#59223)

* Use the new definitions from package-registry#176 (#59311)

* [Fleet] Remove our custom API key authentication  (#59212)

* [Ingest] Full agent config schema & API (#59262)

* Add schema for full agent config and business logic to convert SO agent config -> full agent config

* Adjust output properties in full agent config

* Whitelist full agent config output fields

* [Fleet] UI Agent enrollment flyout (#58524)

* Use POST vs GET for EPM install & remove (#59367)

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

* install default packages during setup (#59330)

* install default packages during setup

* check if package is already installed

* [Ingest] Updates to Agent Configuration List UI (#59374)

- Added search bar
- Sync of columns to design
- Actions per row in popup menu
- Connect pagination and per-page count to API request
- Support for `kuery` url param

* Update docs from /api/:section to /api/ingest_manager/:section (#59422)

* [EPM] Add Streams TS type to mirror EPR's (#59446)

* Add Streams TS type in EPM to mirror EPR's

Follows the changes add in https://github.com/elastic/package-registry/pull/230/files#diff-7dea786222588c32c19238bffffee9c2

* Add RegistryPackage.datasources

* Add more detailed shape for Registry Vars

* Don't code in modify src/plugins/management

See PR convo at c47975535f (r389042975)

* [Ingest] Add agent counts to each agent config output of `/agent_configs` API  (#59552)

* Added agent counts to getAgentConfigsHandler
* Show agent counts on Agent Config List

* [Fleet] Agent list header (#59487)

* [EPM] Use /packages & /packages/{pkgkey} (#59550)

* Use /packages & /packages/{pkgkey}

* Update paths in skipped tests

* Docs use /packages vs /package/{install,delete}

Some copy & code sample changes.

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

* [Ingest] Design sync for Agent Configuration Create Flyout (#59479)

* Match form to design
* Support URI route param to open flyout

* [Ingest] Create data source step 1 & 2 (#59590)

* Add Error and PackageIcon components

* Add create datasource layout+navigation, and select package step

* Add description field to datasource, remove assets and description from datasource package

* Add temporary datasources typing for EPM package info

* Initial pass at configure datasources step. Stream vars only (no input vars yet)

* First pass at input vars config; separate components

* Fix issue with adding more than one datasource to a config

* Add shell review step; save datasouce

* Remove assign/unassign datasource from agent config details UI, replace with add datasource buttons

* Remove actions column from datasource table

* Initial pass at create datasource from package

* Move package to config service to /common, add tests

* Rename VarsEntry to RegistryVarsEntry, add datasets and datasources to RegistrySearchResult definition

* Add typings to create datasource flow

* Add real count of agents to select agent config list

* Ensure the necessary package is installed at time of datasource creation

* Use lowercase pkgkey for consistency

* Update EPM file path to use /packages (#59693)

* fixed header padding (#59711)

* [EPM] Use icons from packages, if present (#59765)

* [Ingest] Create data source step 3 (#59822)

* Make app setup loading state prettier

* Add review step of datasource wizard

* Change name to ID in agent config datasources field

* Fix types

* Add stored datasource to agent datasource unit tests

* Adjustment of registry typings and which registry copy fields to show to sync with elastic/package-registry#242

* Fix `multi` vars not populating with array: elastic/kibana#59724

* Account for if a stream is enabled by default from registry package definition: elastic/kibana#59724

* Adjust tests to account for last two commits

* Fix review page back link

* Fix d'oh typo

* [Ingest] Agent Config Details header and sub tabs navigation (#59783)

- Syncs Agent Config Details header to design
- Includes sub navigation tabs connected to route URL
- Agent Config List Create data source row action enabled

* [Fleet] update agent list UI (#59685)

* [Fleet] ensure default packages are added to the default config (#59759)

* [Fleet] fix output rename api_token => api_key (#60001)

* [Ingest] Address #59376 feedback (#59961)

* Disable create/destroy CTAs if no write capability

Use `core.application.capabilities.ingestManager.write` to test user permissions

* Add -all & -read tags for HTTP routes

* Update test .expect() to match description

* Add useCapabilities hook. Fix two issues with hiding/disabling CTA.

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

* Missed one in e12a8ad8a4

* Use package icon as default when no other can be found (#60025)

* Remove duplicate xpack setting

FTR tests failing to start ES with error

```
ERROR ERROR: setting [xpack.security.authc.api_key.enabled] already set, saw [true] and [true]
```

https://github.com/elastic/kibana/pull/59376/checks?check_run_id=503930031 & https://github.com/elastic/kibana/pull/59376/checks?check_run_id=503975576 etc

It appears the xpack.security.authc.api_key.enabled flag was recently added to master in another part, so remove our instance of the setting to prevent the error

* Update EPM file tests to use /packages/{pkgkey}

These should have failed when the routes were changed. Will go back and see what happened.

* [Ingest] Add `revision` to agent configs & data sources (#59848)

* Add revision to agent config and datasource saved objects, add delete datasource service and datasource

* Add revision to full agent config output

* PR feedback

Co-authored-by: Sonja Krause-Harder <sonja.krause-harder@elastic.co>
Co-authored-by: Nicolas Ruflin <spam@ruflin.com>
Co-authored-by: Sandra Gonzales <neptunian@users.noreply.github.com>
Co-authored-by: Matt Apperson <me@mattapperson.com>
Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Nicolas Chaulet <n.chaulet@gmail.com>
Co-authored-by: Matt Apperson <matthew.apperson@elastic.co>
Co-authored-by: Jen Huang <its.jenetic@gmail.com>
Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
Co-authored-by: Tyler Smalley <tyler.smalley@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: neptunian <sandra.gonzales@elastic.co>
Co-authored-by: Jonathan Buttner <56361221+jonathan-buttner@users.noreply.github.com>
Co-authored-by: Paul Tavares <56442535+paul-tavares@users.noreply.github.com>
Co-authored-by: Henry <henry.harding@elastic.co>
2020-03-12 18:52:06 -04: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
Nick Partridge 153e545d57
[Docs] Update threshold watch note (#59797) 2020-03-11 16:30:43 -04:00
Luke Elmers 3c64031c07
Temporarily remove visualization development docs. (#58141) 2020-03-11 13:04:59 -06:00
Liza Katz 66455316bb
Clear out old rollup strategy (#59423)
* Old search strategy cleanup

* restore rollup strategy

* Remove hasSearchStategyForIndexPattern

* ts

* fix jest tests

* cleanup exports

* pass index pattern type to server for rollups

* merge fix

* Fix types

* ts fixes

* oss strategy error handling

* update translations

* jest test fix

* Use indexType instead of index

* code review 1

* updated docs

* jest test

* jest snapshot

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-11 18:03:27 +02:00
Kaarina Tungseth 40901496ca
[DOCS] Removed Coordinate and Region Maps (#59828)
* [DOCS] Removed Coordinate and Region Maps

* Review comment

* Added redirect for visualize-maps
2020-03-11 09:25:20 -05:00
Kaarina Tungseth 9484012fdf
[DOCS] Removed experimental from KQL (#59896) 2020-03-11 08:58:33 -05:00
Kaarina Tungseth 2f912a3661
[DOCS] Clarification in tutorial (#59088)
* Cl[DOCS] arification in tutorial

* Review comments
2020-03-11 08:53:20 -05:00
Kaarina Tungseth 9985597ad9
[DOCS] Updated and added jump tables (#59774)
* [DOCS] Updated and added jump tables

* Review comment
2020-03-10 16:46:02 -05:00
Kaarina Tungseth 6e7df195d3
[DOCS] Moved rolled up index content (#59372)
* [DOCS] Moved rolled up index content

* Review comments
2020-03-10 16:37:17 -05:00
Joe Portner a2c002d130
Regenerate core api docs (#59814) 2020-03-10 17:24:05 -04:00
Kaarina Tungseth 5dcba2a566
[DOCS] Changed Discover app to Discover (#59769) 2020-03-10 10:51:53 -05: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
Liza Katz 28d0cf4485
Generate docs from data plugin (#56955)
* Add doc building for data plugin

* Added data server md file

* index file for suggestion component

* Clear out internal imports from public API

* Remove FunctionalComponent usage

* comment out working docs

* Added fixes following @octogonz feedback

* new docs

* Clean up

* Clean up 2

* fix jest

* rename docs script file

* update tasks

* tasks

* update docs
2020-03-10 11:34:06 +02:00
Nathan Reese 6395dac297
[Maps][docs] add more details to Quantitative data driven styling docs (#59553)
* [Maps][docs] add more details to Quantitative data driven styling

* Update docs/maps/maps-aggregations.asciidoc

Co-Authored-By: Nick Peihl <nickpeihl@gmail.com>

* Update docs/maps/vector-style.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/maps/vector-style.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/maps/vector-style.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/maps/vector-style.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/maps/vector-style.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/maps/vector-style.asciidoc

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* review feedback

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2020-03-09 15:19:25 -06:00
Ben Skelker 51fb32bbf3
removes beta tag (#59618) 2020-03-09 17:58:13 +02:00
Kaarina Tungseth 84f6885c36
[DOCS] Removed spatial references (#59595)
* [DOCS] Removed ss above spatial references

* Removed above from n numeral formatting page
2020-03-09 10:29:25 -05:00
Mikhail Shustov 5c436534d6
Add an optional authentication mode for HTTP resources (#58589)
* add authRequred: 'optional'

* expose auth status via request context

* update security plugin to use notHandled auth outcome

* capabilities service uses optional auth

* update tests

* attach security headers only to unauthorised response

* add isAuthenticated tests for 'optional' auth mode

* security plugin relies on http.auth.isAuthenticated to calc capabilities

* generate docs

* reword test suit names

* update tests

* update test checking isAuth on optional auth path

* address Oleg comments

* add test for auth: try

* fix

* pass isAuthenticted as boolean via context

* remove response header from notHandled

* update docs

* add redirected for auth interceptor

* security plugin uses t.redirected to be compat with auth: optional

* update docs

* require location header in the interface

* address comments #1

* declare isAuthenticated on KibanaRequest

* remove auth.isAuthenticated from scope

* update docs

* remove unnecessary comment

* do not fail on FakrRequest

* small improvements
2020-03-07 11:55:20 +01:00
Tim Sullivan 893d8da1d8
[Reporting/Screenshots] Handle page setup errors and capture the page, don't fail the job (#58683)
* [Reporting] Handle error if intercepted request could not be continued

* [Reporting/Screenshots] Handle page setup errors and capture the page with errors shown

* show warnings in UI

* i18n todos

* Cleanup an old troubleshooting task

* set the default for all new timeout settings to 30 seconds

* fix some tests

* update error strings

* Cleanup 2

* fix tests 2

* polish the job info map status items

* More error message updating

* Log the error that was caught

* Oops fix ts

* add documentation

* fix i18n

* fix mocha test

* use the openUrl timeout as the default for navigation

* fix comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-05 22:26:36 -07:00
gchaps 2f97b4c06a
[DOCS] Updates Snapshot and Restore doc (#59451)
* [DOCS] Updates Snapshot and Restore doc

* [DOCS] Incorporates review comment
2020-03-05 11:32:32 -08:00
gchaps 8ded7f91c8
[DOCS] Updates intro doc (#58161)
* [DOCS] Updates intro doc

* [DOCS] Incorporates review comments

* [DOCS] Added image of a solution and other tweaks

* [DOCS] Updates image and content in get data section

* [DOCS] Incorporates review comments into docs intro

* Updated Lens and Visualize

* [DOCS] Adds note about Lens

* [DOCS] Added link to es docs

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
2020-03-05 08:55:54 -08:00
Josh Dover ab1439cb1a
Remove documentation for server.cors settings (#59096)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-04 14:35:54 -07:00
Pierre Gayvallet b1cb92f822
Expose metrics service to public API (#59294)
* expose metrics service to public API

* update generated doc
2020-03-04 20:15:35 +01:00
Pierre Gayvallet 7130a0405f
Expose savedObject import / export utility methods (#58882)
* add getImportExportObjectLimit to so setup

* expose static method for so import / export

* improve functions naming

* fix mocked reference
2020-03-04 12:10:29 +01:00
Larry Gregory 74030c97a9
Add support for deprecated roles (#57209)
* Add support for deprecated roles

* address PR feedback

* remove unused import

* copy edits

* fix snapshots

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-03 13:23:53 -05:00
Mikhail Shustov 4226b6f373
Allow disabling xsrf protection per an endpoint (#58717)
* add xsrfRequired flag to a route definition interface

* update tests

* deprecate server.xsrf.whitelist

It meant to be used for IdP endpoints only, which we are going to refactor to disable xsrf requirement per a specific endpoint.

* update docs

* do not fail on manual KibanaRequest creation

* address comments

* update tests

* address comments

* make xsrfRequired available only for destructive methods

* update docs

* another isSafeMethod usage
2020-03-03 15:46:50 +01:00
Pierre Gayvallet 64ffae3ec5
Add core metrics service (#58623)
* create base service and collectors

* wire the service into server, add mock

* add collector tests

* add main collector test

* export metric types from server

* add service and server tests

* updates generated doc

* improve doc

* nits and comments

* add disconnected requests test
2020-03-03 10:54:03 +01:00
Josh Dover 48a33abdee
Remove appBasePath from docs + add mock for AppMountParameters (#58775) 2020-03-02 15:51:33 -07:00
Kaarina Tungseth 1eca341260
[DOCS] Rework of main get started page (#58260)
* [DOCS] Rework of main gett started page

* Redirect for add-sample-data

* Link fix

* Review comments

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-02 09:59:29 -06:00
Pierre Gayvallet 2b9dc43158
add dynamic property to type definition (#58852) 2020-02-28 16:39:06 +01:00
Pierre Gayvallet ce45647ea2
block SO setup API calls after startup (#58718) 2020-02-28 09:20:51 +01:00
Kaarina Tungseth 235b3535e2
[DOCS] Consolidates map content (#57736)
* [DOCS] Consolidates map content

* Section reorganization

* Navigation options

* Added images and cleaned up text

* Added tilemap.html to redirects

* Review comments
2020-02-27 10:40:07 -06:00
Lisa Cawley 2a756bbb81
[DOCS] Fixes outdated monitoring links (#58556) 2020-02-27 08:28:08 -08:00
Nik Richers e48483d246
Switch to standard ESS trial attribute (#58309)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 11:45:22 -08:00
Josh Dover 4cb9bc4472
Add ScopedHistory to AppMountParams (#56705) 2020-02-26 12:43:12 -07:00
Wylie Conlon 07fec2f725
Documentation for numeral pattern formatting (#57616)
* Documentation for Elastic Numeral formatting

* Tweaks from feedback

* Updates from feedback

* Fix and update examples

* Add TODOs

* Fix typo

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 14:17:59 -05:00
Justin Juno 4b8b9a4218
[DOCS] Add Homebrew start + stop instructions for Kibana (#58495)
* add brew start and stop instructions to docs

* add float to start-stop doc

* Update start-stop.asciidoc

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 08:13:53 -08:00
Pierre Gayvallet 8524303b6e
Allow savedObjects types registration from NP (#57430)
* expose `registerType` API

* expose `getTypeRegistry` API

* change SavedObjectMigrationFn signature to add context

* fix exported types

* update generated doc

* update migration documentation

* fix legacy service test

* fix typings

* update service setup description

* add saved_objects server folder convention

* fix unit test

* documentation NITs

* add typeRegistry to SavedObjectClientWrapperOptions
2020-02-26 16:22:35 +01:00
Thomas Neirynck d9e3d744ba
[Maps] Add EPSG-code to docs (#58378) 2020-02-25 14:21:25 -05:00
Søren Louv-Jansen 13eacb51f0
[APM] Stabilize agent configuration API (#57767) 2020-02-24 23:43:40 +01:00
Lukas Olson 7e087633d2
Remove unused indexPattern:fieldMapping:lookBack advanced setting (#58147)
* Remove unused indexPattern:fieldMapping:lookBack advanced setting

* Remove unused translations

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-24 14:44:03 -07:00
Mikhail Shustov d61ef267d5
force savedObject API consumers to define SO type explicitly (#58022)
* force savedObject consumers to define type explicitly

* address comments

* regen docs
2020-02-21 22:11:05 +01:00