Commit graph

295 commits

Author SHA1 Message Date
Joe Reuter 761465bc77
clean up kibana-app ownership (#67780) 2020-05-29 18:22:43 +02:00
Larry Gregory 639dbbeb19
Migrate audit logging to KP (#67381)
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-28 14:46:42 -04:00
Mikhail Shustov 173b7d138e
add platform team as cloud plugin owner (#67376) 2020-05-26 20:56:51 +02:00
Catherine Liu 9c11243563
[Canvas] Fix flaky custom element functional tests (#65908)
* Enable clearWithKeyboard option when filling out custom elements form

* Added canvas functional tests path to CODEOWNERS

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-19 00:00:28 -07:00
Brian Seeders aca45a7fac
Add kibana-operations as codeowners for .ci/es-snapshots and vars/ (#66746) 2020-05-15 13:09:39 -04:00
Dmitry Lemeshko f575913850
FTR: move basic services under common folder (#66563)
* [CODEOWNERS] set kibana-qa to own test/functional/services

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

* update codeowners

* update imports

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-15 18:28:28 +02:00
Alejandro Fernández Haro b56070515a
[skip-ci] Remove legacy dirs from the CODEOWNERS in telemetry (#66401) 2020-05-14 11:47:46 +01:00
Tre 4853f24705
Ingest code coverage (#62336) 2020-05-13 15:09:42 -06:00
Alejandro Fernández Haro 9ab73efd18
Remove Newsfeed leftovers from the Legacy codebase (#66084) 2020-05-13 16:35:22 +01:00
Alejandro Fernández Haro 577bf0928b
Move Kibana Usage collectors outside the telemetry plugin (#65663) 2020-05-13 09:22:38 +01:00
Corey Robertson b8bea5b8b2
[Canvas] move files from legacy/plugins to plugins (#65283)
* Moves the files

* Rename legacy/plugins/canvas paths

* Correct paths

* Fix shareable_runtime and storybook

* ESLint Fixes

* Fix jest test and paths
2020-05-05 20:52:56 -04:00
Søren Louv-Jansen e02350cdc7
[APM] Update path to APM app after move to NP (#65034) 2020-05-05 18:22:47 +02:00
Daniil Suleiman f126e6130b
[NP][Discover] Move discover into new platform (#63473)
* Move discover into NP

* Convert doc_table tests to jest

* Move rows_headers to use jest

* Move fixed_scroll.test

* Clean up

* Revert jest changes

* Pass down deps into IndexPatternFieldList

* Fix conflicts

* Pass env vars

* Remove LegacyCoreStart

* Update generated doc

* Fix canvas type

* Fix i18n

* Improve stub_index_pattern code

* Add fieldFormats to mocked services

* Skip failing tests
- while still working on them, to find out if other tests fail in jenkins

* Unskip sidebar test

* Move mocha tests to legacy

- delete jest tests, can be converted later on

* Fix Scss imports
- Seems functional tests didn't build because of them?

* Remove another invalid SCSS import

* Pass deps as last argument

* Move field list into data start contract

* Move create field into data start contract, fix tests

* Update docs

* Fix duplicating fields

* Update snapshots in management

* Fix review comments

* Update docs

* Fix angular compilation

* Update docs

Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-04 23:34:24 +03: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
Daniil Suleiman 5754912ae4
Adjust kibana app owning files (#65064) 2020-05-04 14:45:39 +03:00
igoristic 59315bc84d
[Monitoring] NP Migration complete client cutover (#62908)
* Final phase before the complete cutover

* NP migration

* lint fix

* More NP stuff

* Moved Stack Monitoring client plugin outside legacy and fixed all tests

* ...

* Removed unused files

* Fix for main links

* Fixed more tests

* Fixed redirect when clicking on SM icon again

* Code review feedback

* Addressed code review feedback

* Fixed return value
2020-04-30 15:59:35 -04:00
Alison Goryachev 6e3791ea12
Ingest Node Pipelines UI (#62321) 2020-04-30 15:52:14 -04:00
Gidi Meir Morris 9fe7229357
[Alerting] migrates all remaining plugins to new platform (#64335)
Completes the migration of all Alerting Services plugins onto the Kibana Platform

It includes:

1. Actions plugin
2. Alerting plugin
3. Task Manager plugin
4. Triggers UI plugin

And touches the Uptime and Siem plugins as their use of the Task Manager relied on some of the legacy lifecycle to work (registering AlertTypes and Telemetry tasks after the Start stage has already began). The fix was simply to moves these registrations to the Setup stage.
2020-04-29 15:46:54 +01:00
Frank Hassanabad 30e41c5d8f
Update codeowners for endpoint and siem
## Summary

* Update codeowners for endpoint and SIEM
* Remove legacy stuff
2020-04-29 08:25:12 -06:00
Justin Kambic 05f0d0ac8a
[Uptime] Migrate client to New Platform (#55086)
* Move uptime legacy server to plugins directory.

* Re-add feature registration code.

* Move uptime legacy server to plugins directory.

* Re-add feature registration code.

* Move all files.

* WIP fixing things.

* WIP fixing things.

* WIP fixing things.

* Finished fixing server.

* Fix alert type registration glitch.

* Remove obsolete file.

* Fix unwanted revisions, uncomment previously un-migrated code, delete accidentally-merged files.

* More cleanup.

* Fix all non-maps unit tests.

* Get functional tests working.

* Delete misplaced file.

* Add uptime CODEOWNERS entry.

* Get map working in Uptime app on NP.

* Update CODEOWNERS to remove legacy entry.

* Update server imports.

* Delete and clean up unused or redundant code/comments.

* Move new files from legacy to NP to fix merge error.

* Fix broken import.

* Delete obsolete test snapshots.

* Clean up imports and types, delete obsolete code.

* Clean up redundant common imports.

* Delete obsolete translation keys.

* Add additional explicit typing to plugin class.

* Combine redundant common imports.

* Delete unneeded optionalPlugin entry.

* Revert "Combine redundant common imports."

This reverts commit 159e66c349.

* Update a translation description.

* Revert "Clean up redundant common imports."

This reverts commit 8794013fbe.

* Remove new common index file and revert imports from only common to more specific paths.

* Fix broken imports in `~/x-pack/test`.

* Move new file from legacy to NP location.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-29 07:28:03 -04:00
Frank Hassanabad 1282341020
[SIEM][Detections] Adds large list support using REST endpoints
## Summary
* Adds large list support using REST endpoints.

Status: 
---

* Currently ready to be merged behind the feature flag of it being disabled with ongoing work happening after it is merged. 
* REST Endpoints shouldn't have large refactoring at this point
* Team meeting occurred where the pieces were discussed in person.

What is left?
---

- [ ] Add other data types. At the moment `ip` and `keyword` are the two types of lists. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html
- [x] Unit tests
- [x] Lots of misc TODO's in the code base still
- [ ] Import loads everything into memory first when it should attempt streaming
- [ ] Add end to end backend tests
- [x] Add transform and io-ts validation for returns 

Testing
---

Ensure you set this in your ENV before starting Kibana:
```ts
export ELASTIC_XPACK_SIEM_LISTS_FEATURE=true
```

Download or create a large list file such as this one filled with IP's:
https://cinsscore.com/list/ci-badguys.txt

Go to your REST endpoint folder of scripts:
```ts
cd kibana/x-pack/plugins/lists/server/scripts
```

Do a hard reset:
```ts
./hard_reset
```

Then import it as either a data type of `ip`:
```ts
./import_list_items_by_filename.sh ip ~/Downloads/ci-badguys-smaller.txt
```

Or as a `keyword`
```ts
./import_list_items_by_filename.sh keyword ~/Downloads/ci-badguys-smaller.txt
```

Then you can export it through:
```ts
./export_list_items.sh ci-badgusy-smaller.txt
```

For all the other endpoints and testing of the CRUD operations you have access to:

```ts
delete_all_lists.sh
delete_list.sh
delete_list_index.sh
delete_list_item.sh
delete_list_item_by_id.sh
delete_list_item_by_value.sh
export_list_items.sh
export_list_items_to_file.sh
get_list.sh
get_list_item_by_id.sh
get_list_item_by_value.sh
import_list_items.sh
import_list_items_by_filename.sh
lists_index_exists.sh
patch_list.sh
patch_list_item.sh
post_list.sh
post_list_index.sh
post_list_item.sh
```

### Checklist

Delete any items that are not applicable to this PR.

- [ ] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
2020-04-28 16:00:22 -06:00
Daniil Suleiman da89856503
[NP] Move visTypeVislib into NP (#63963) 2020-04-28 14:44:17 +02:00
Daniil Suleiman 6bb751540b
Move input_control_vis into NP (#63333)
* Move input_control_vis into NP

* Change config paths

* Clean up
2020-04-24 11:49:02 +03:00
Matthias Wilhelm 2f363ba144
Migrate vis_type_table to kibana/new platform (#63105)
* Move vis_type_table to Kibana Platform

* Adapt mocha tests
* Adapt CODEOWNERS

* Adapt SCSS
2020-04-21 09:49:48 +02:00
Joe Reuter 4e56419ca4
Migrate timelion vis (#62819) 2020-04-17 10:42:27 +02:00
Jonathan Buttner 0a9e17b57f
[Endpoint][EPM] Retrieve Index Pattern from Ingest Manager (#63016)
* Endpoint successfully depending on ingest manager to initialize

* Moving the endpoint functional tests to their own directory to avoid enabling ingest in the base tests

* Removing page objects and other endpoint fields from base functional

* Updating code owners with new functional location

* Adding index pattern functionality

* Missed a file

* Pointing resolver tests at endpoint functional tests

* Pointing space tests at the endpoint functional directory

* Adding ingest service to do setup and tests for 500s

* Correcting services path

* Adding jest test names

* Updating es archives with the correct mapping and index names

* Fixing import error

* Adding resolver tests to code owners

* enabling epm flag for functional tests

* adding correct tag to test

* Removing the version information and unneeded xsrf

* Addressing endpoint index pattern feedback

* Removing unused import

* Renaming index pattern to es index pattern

* Fixing missed index pattern calls

* Removing unused import

* Fixing type error

* Moving es_index_pattern outside of installed and fixing function name

* Keeping the event index the same for now

* Wrapping index pattern await in try catch

* Address PR feedback, adding comments
2020-04-16 16:20:16 -04:00
Daniil Suleiman 6bbcabcf1f
[NP] Visualize (#62294)
* Move visualize plugin to np

* Refactor plugin services

* Clean up

* Remove legacy style usage

* Fix style imports

* Fix timelion_options context provider

* Fix translations

* Change codeowners for visualize

* Import styles in legacy for BWC in Browser tests

* Get rid of embeddable dependency

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-16 18:32:46 +03:00
Maryia Lapata bae2bda7d4
[NP] Migrate Markdown to NP (#62940)
* Migrate Markdown to NP

* Refactoring

* Add ConfigSchema, server, rename markdown_vis to visTypeMarkdown

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-16 18:32:07 +03:00
Matthias Wilhelm 5ffdeb62e0
Migrate vis_type_metric to kibana/new platform (#63096)
* Move vis_type_metric to Kibana Platform

* Adapt i18n

* Cleanup tests

* Modify CODEOWNERS

* Cleanup SCSS
2020-04-16 13:46:23 +02:00
Ahmad Bamieh 188ebe8e2c
[i18n] Update CODEOWNERS (#63354)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-16 12:55:22 +03:00
Justin Kambic b670851422
Add uptime CODEOWNER entries. (#63616) 2020-04-15 12:48:16 -04:00
Tim Roes 99332b8a6e
Fix CODEOWNERS and sass lint paths (#63552) 2020-04-15 17:52:21 +02:00
Daniil Suleiman afb48bceca
[NP] Move visTypeXy plugin (#63449)
* Move vis_type_xy into NP

* Substitute usage in vis_type_vislib

* Disable plugin by default
2020-04-15 18:03:17 +03:00
Daniil Suleiman 23a5734d07
[NP] TSVB (#63237)
* Move TSVB into new platform

* Get rid of isFunction checks

* Remove extra import of styling constants

* Move styles importing into plugin.ts

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-15 17:03:20 +03:00
Tim Roes ebbc062689
Move Lens frontend to Kibana Platform (#62965)
* Move Lens frontend to Kibana platform

* Fix line breaks

* Fix jest tests

* Fix remaining test

* Remove old Lens plugin entry

* Fix i18n prefix

* Add config schema

* Address review
2020-04-15 12:22:37 +02:00
CJ Cenizal 982c0da78e
Move ILM out of legacy (#61915)
* Rename IndexMgmtSetup to IndexManagementPluginSetup.
* Remove unused fetch index template route and related tests.
* Remove unnecessary custom styles.
2020-04-09 16:51:22 -07:00
Jonathan Buttner 6b5cbd562f
[Endpoint][EPM] Endpoint depending on ingest manager to initialize (#62871)
* Endpoint successfully depending on ingest manager to initialize

* Moving the endpoint functional tests to their own directory to avoid enabling ingest in the base tests

* Removing page objects and other endpoint fields from base functional

* Updating code owners with new functional location

* Pointing resolver tests at endpoint functional tests

* Pointing space tests at the endpoint functional directory

* Adding jest test names
2020-04-09 09:41:38 -04:00
CJ Cenizal 4bdbe7356d
Remove ES-UI as code owner of Transform app. (#62556) 2020-04-06 09:49:23 -07:00
Joe Reuter 9bab4ef746
Move ownerships of home, dev tools and discover (#62612)
* move ownership

* fix es-ui ownership
2020-04-06 18:36:22 +02:00
CJ Cenizal 12a7dd033f
Update CODEOWNERS with ES-UI apps, including grok debugger. (#62045) 2020-04-01 09:36:48 -07:00
Pierre Gayvallet a7508b8f20
Migrate SO management routes to new plugin (#59734)
* unexpose SavedObjectsManagement from legacy server

* migrate saved object management routes to new plugin

* fix endpoint methods

* adapt code due to rebase

* extract types

* improve findAll params

* adapt existing api integration tests and migrate to TS

* update generated doc

* add API integration tests for /scroll/count

* add unit tests for plugin and routes

* add injectMetaAttributes tests

* extract relation type

* add find_relationships tests

* add find_all tests

* do not complete migrator$ to avoid unhandled promise rejection

* fix data for search endpoint integration tests

* remove falsy comment

* rename plugin folder to match plugin id

* address review comments

* update CODEOWNERS
2020-03-26 12:43:54 +01:00
Matthew Kime 498abb4152
Revert "Drilldowns (#59632)" (#61136)
This reverts commit 5abb2c8c7d.
2020-03-24 16:22:11 -05:00
Alejandro Fernández Haro 7062542919
[skip-ci] Fix CODEOWNERS paths for the Pulse team (#60944) 2020-03-24 10:20:51 +00:00
Vadim Dalecky 5abb2c8c7d
Drilldowns (#59632)
* Add drilldown wizard components

* Dynamic actions (#58216)

* feat: 🎸 add DynamicAction and FactoryAction types

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

* feat: 🎸 add ActionInternal and ActionContract

* chore: 🤖 remove unused file

* feat: 🎸 improve action interfaces

* docs: ✏️ add JSDocs

* feat: 🎸 simplify ui_actions interfaces

* fix: 🐛 fix TypeScript types

* feat: 🎸 add AbstractPresentable interface

* feat: 🎸 add AbstractConfigurable interface

* feat: 🎸 use AbstractPresentable in ActionInternal

* test: 💍 fix ui_actions Jest tests

* feat: 🎸 add state container to action

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

* refactor: 💡 rename AbsractPresentable -> Presentable

* refactor: 💡 rename AbstractConfigurable -> Configurable

* feat: 🎸 add Storybook to ui_actions

* feat: 🎸 add <ErrorConfigureAction> component

* feat: 🎸 improve <ConfigureAction> component

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

* feat: 🎸 improve <ErrorConfigureAction> component

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

* feat: 🎸 render sample action configuration component

* feat: 🎸 connect action config to <ConfigureAction>

* feat: 🎸 improve <ConfigureAction> stories

* test: 💍 add ActionInternal serialize/deserialize tests

* feat: 🎸 add ActionContract

* feat: 🎸 split action Context into Execution and Presentation

* fix: 🐛 fix TypeScript error

* refactor: 💡 extract state container hooks to module scope

* docs: ✏️ fix typos

* chore: 🤖 remove Mutable<t> type

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

* style: 💄 avoid using unnecessary types

* chore: 🤖 address PR review comments

* chore: 🤖 rename ActionContext generic

* chore: 🤖 remove order from state container

* chore: 🤖 remove deprecation notice on getHref

* test: 💍 fix tests after order field change

* remove comments

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

* Drilldown context menu (#59638)

* fix: 🐛 fix TypeScript error

* feat: 🎸 add CONTEXT_MENU_DRILLDOWNS_TRIGGER trigger

* fix: 🐛 correctly order context menu items

* fix: 🐛 set correct order on drilldown flyout actions

* fix: 🐛 clean up context menu building functions

* feat: 🎸 add context menu separator action

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

* Dashboard x pack (#59653)

* feat: 🎸 add dashboard_enhanced plugin to x-pack

* feat: 🎸 improve context menu separator

* feat: 🎸 move drilldown flyout actions to dashboard_enhanced

* fix: 🐛 fix exports from ui_actions plugin

* feat: 🎸 "implement" registerDrilldown() method

* fix ConfigurableBaseConfig type

* Implement connected flyout_manage_drilldowns component

* Simplify connected flyout manage drilldowns component. Remove intermediate component

* clean up data-testid workaround in new components

* Connect welcome message to storage

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

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

* Drilldown factory (#59823)

* refactor: 💡 import storage interface from ui_actions plugin

* refactor: 💡 make actions not-dynamic

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

* fix: 🐛 fix more TypeScript errors

* fix: 🐛 fix TypeScript import error

* Drilldown registration (#59834)

* feat: 🎸 improve drilldown registration method

* fix: 🐛 set up translations for dashboard_enhanced plugin

* Drilldown events 3 (#59854)

* feat: 🎸 add serialize/unserialize to action

* feat: 🎸 pass in uiActions service into Embeddable

* feat: 🎸 merge ui_actions oss and basic plugins

* refactor: 💡 move action factory registry to OSS

* fix: 🐛 fix TypeScript errors

* Drilldown events 4 (#59876)

* feat: 🎸 mock sample drilldown execute methods

* feat: 🎸 add .dynamicActions manager to Embeddable

* feat: 🎸 add first version of dynamic action manager

* Drilldown events 5 (#59885)

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

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

* fix: 🐛 fix OSS TypeScript errors

* basic integration of components with dynamicActionManager

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

* display drilldown count in embeddable edit mode

* display drilldown count in embeddable edit mode

* improve wizard components. more tests.

* partial progress, dashboard drilldowns (#59977)

* partial progress, dashboard drilldowns

* partial progress, dashboard drilldowns

* feat: 🎸 improve dashboard drilldown setup

* feat: 🎸 wire in services into dashboard drilldown

* chore: 🤖 add Storybook to dashboard_enhanced

* feat: 🎸 create presentational <DashboardDrilldownConfig>

* test: 💍 add <DashboardDrilldownConfig> stories

* test: 💍 use presentation dashboar config component

* feat: 🎸 wire in services into React component

* docs: ✏️ add README to /components folder

* feat: 🎸 increase importance of Dashboard drilldown

* feat: 🎸 improve icon definition in drilldowns

* chore: 🤖 remove unnecessary comment

* chore: 🤖 add todos

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

* Manage drilldowns toasts. Add basic error handling.

* support order in action factory selector

* fix column order in manage drilldowns list

* remove accidental debug info

* bunch of nit ui fixes

* Drilldowns reactive action manager (#60099)

* feat: 🎸 improve isConfigValid return type

* feat: 🎸 make DynamicActionManager reactive

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

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

* fix: 🐛 correctly await for .deleteEvents()

* Drilldowns various 2 (#60103)

* chore: 🤖 address review comments

* test: 💍 fix embeddable_panel.test.tsx tests

* chore: 🤖 clean up ActionInternal

* chore: 🤖 make isConfigValid a simple predicate

* chore: 🤖 fix TypeScript type errors

* test: 💍 stub DynamicActionManager tests (#60104)

* Drilldowns review 1 (#60139)

* refactor: 💡 improve generic types

* fix: 🐛 don't overwrite icon

* fix: 🐛 fix x-pack TypeScript errors

* fix: 🐛 fix TypeScript error

* fix: 🐛 correct merge

* Drilldowns various 4 (#60264)

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

* style: 💄 remove AnyDrilldown type

* feat: 🎸 add drilldown factory context

* chore: 🤖 remove sample drilldown

* fix: 🐛 increase spacing between action factory picker

* workaround issue with closing flyout when navigating away

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

* fix react key issue in action_wizard

* don’t open 2 flyouts

* fix action order

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

* Drilldowns reload stored (#60336)

* style: 💄 don't use double equals __

* feat: 🎸 add reload$ to ActionStorage interface

* feat: 🎸 add reload$ to embeddable event storage

* feat: 🎸 add storage syncing to DynamicActionManager

* refactor: 💡 use state from DynamicActionManager in React

* fix: 🐛 add check for manager being stopped

* Drilldowns triggers (#60339)

* feat: 🎸 make use of supportedTriggers()

* feat: 🎸 pass in context to configuration component

* feat: 🎸 augment factory context

* fix: 🐛 stop infinite re-rendering

* Drilldowns multitrigger (#60357)

* feat: 🎸 add support for multiple triggers

* feat: 🎸 enable Drilldowns for TSVB

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

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

* create drilldown flyout cleanup

* remove border from selectedActionFactoryContainer

* adjust callout in DrilldownHello

* update form labels

* remove unused file

* fix type error

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

* basic unit tests for flyout_create_drildown action

* Drilldowns finalize (#60371)

* fix: 🐛 align flyout content to left side

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

* fix: 🐛 move flyout back nav chevron up

* fix: 🐛 fix type check after refactor

* basic unit tests for drilldown actions

* Drilldowns finalize 2 (#60510)

* test: 💍 fix test mock

* chore: 🤖 remove unused UiActionsService methods

* refactor: 💡 cleanup UiActionsService action registration

* fix: 🐛 add missing functionality after refactor

* test: 💍 add action factory tests

* test: 💍 add DynamicActionManager tests

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

* fix: 🐛 register correctly CSV action

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

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

* feat: 🎸 disable Drilldowns for TSVB

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

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

* feat: 🎸 remove places from drilldown interface

* refactor: 💡 remove place in factory context

* chore: 🤖 remove doExecute

* remove not needed now error_configure_action component

* remove workaround for storybook

* feat: 🎸 improve DrilldownDefinition interface

* style: 💄 replace any by unknown

* chore: 🤖 remove any

* chore: 🤖 make isConfigValid return type a boolean

* refactor: 💡 move getDisplayName to factory, remove deprecated

* style: 💄 remove any

* feat: 🎸 improve ActionFactoryDefinition

* refactor: 💡 change visualize_embeddable params

* feat: 🎸 add dashboard dependency to dashboard_enhanced

* style: 💄 rename drilldown plugin life-cycle contracts

* refactor: 💡 do naming adjustments for dashboard drilldown

* fix: 🐛 fix Type error

* fix: 🐛 fix TypeScript type errors

* test: 💍 fix test after refactor

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

* chore: 🤖 remove setting from kibana.yml

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

* remove custom css per review

* refactor: 💡 rename drilldownCount to eventCount

* style: 💄 remove any

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

* style: 💄 remove unused import

Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
Co-authored-by: Matt Kime <matt@mattki.me>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
2020-03-24 08:31:29 +01:00
CJ Cenizal f32a8483bc
Create Painless Lab app (#57538)
* Create Painless Playground app (#54578)

* Replace heart script with smiley face script. (#57755)

* Rename Painless Playground -> Painless Lab. (#57545)

* Fix i18n namespace.

* Improve smiley face proportions.
- Add def keyword to Painless spec.
- Temporarily fix broken highlighting.
- Add small padding to main controls.

* [Painless Lab] Minor Fixes (#58135)

* Code restructure, improve types, add plugin id, introduced hook

Moved the code execution hook to a custom hook outside of main,
also chaining off promise to avoid lower level handling of
sequencing.

* Re-instated formatting code

To improve DX the execution error response from the painless API
was massaged to a more reader friendly state, only giving non-repeating
information.

Currently it is hard to determine the line and character information from
the painless endpoint. If the user wishes to see this raw information it
will be available in the API response flyout.

* Remove leading new line in default script

* Remove registration of feature flag

* Fix types

* Restore previous auto-submit request behaviour

* Remove use of null and remove old comment

Stick with "undefined" as the designation for something not existing.

* [Painless Lab] NP migration (#59794)

* Fix sample document editor.

* [Painless Lab] Fix float -> integer coercion bug (#60201)

* Clarify data and persistence flow. Fix floating point precision bug.
* Send a string to API and ES client instead of an object.

* Rename helpers lib to format. Add tests for formatRequestPayload.

* Add query parameter to score context (#60414)

* Fix typo and i18n

* Make state init lazy

Otherwise we are needlessly reading and JSON.parse'ing on every
state update

* Support the query parameter in requests to Painless

* Fix borked i18n

* Fix i18n

* Another i18n issue

* [Painless] Minor state update model refactor (#60532)

* Fix typo and i18n

* Make state init lazy

Otherwise we are needlessly reading and JSON.parse'ing on every
state update

* Support the query parameter in requests to Painless

* WiP on state refactor

* Some cleanup after manual testing

* Fix types and i18n

* Fix i18n in context_tab

* i18n

* [Painless] Language Service (#60612)

* Added language service

* Use the correct monaco instance and add wordwise operations

* Remove plugin context initializer for now

* [Painless] Replace hard-coded links (#60603)

* Replace hard-coded links

Also remove all props from Main component

* Pass the new links object to the request flyout too

* Link directly to painless execute API's contexts

* Remove responsive stacking from tabs with icons in them.

* Resize Painless Lab bottom bar to accommodate nav drawer width (#60833)

* Validate Painless Lab index field (#60841)

* Make JSON format of parameters field more prominent. Set default parameters to provide an example to users.
* Set default document to provide an example to users.
* Simplify context's updateState interface.
* Refactor store and context file organization.
  - Remove common directory, move constants and types files to root.
  - Move initialState into context file, where it's being used.
* Add validation for index input.
* Create context directory.

* Fix bottom bar z-index.

* Position flyout help link so it's bottom-aligned with the title and farther from the close button.

Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alison.goryachev@elastic.co>
2020-03-23 16:10:12 -07:00
Jen Huang bc16fcd984
Update ingest management team handle (#60457) 2020-03-17 16:15:27 -07:00
Luke Elmers a8e33a87b5
Update app arch CODEOWNERS items. (#60396) 2020-03-17 13:27:10 -06:00
Stacey Gammon b9e9311d1f
rename dashboard_embeddable_container to dashboard (#59898)
* rename dashboard_embeddable_container to dashboard

* codeowners & typo

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-13 12:55:21 -04:00
Walter Rafelsberger ce6029b9b0
[ML] Transforms: Use EuiInMemoryTable instead of custom typed table. (#59782)
Before EuiInMemoryTable had TypeScript support we used our own typings and some state & CSS fixes. This is now all solved by the original EUI component.
- Use EuiInMemoryTable instead of custom typed table.
- Deletes some legacy leftover files.
2020-03-11 09:37:03 +01:00
Joe Portner a2c002d130
Regenerate core api docs (#59814) 2020-03-10 17:24:05 -04:00
Josh Dover 944be80091
Rename status_page to statusPage (#59186) 2020-03-05 14:16:37 -07:00
Stacey Gammon 543481ba53
Add direct access link registry and dashboard impl and use in ML (#57496)
* Add direct access link registry and dashboard impl and use in ML

* Add example plugin with migration example

* address code review comments

* Fixes, more code review updates

* Readme clean up

* add tests

* remove else

* Rename everything from DirectAccessLinkGenerator to the much short UrlGenerator. also fix the ml # thing and return a relative link from dashboard genrator

* add important text in bold

* Move url generators into share plugin

* add correct i18n prefix

* Fix timeRange url name

* make share plugin optional for dashboard

* fix code owners

* Use base UrlGeneratorState type, add comments

* Fix hash bug and add test that would have caught it
2020-03-04 12:43:09 -05:00
Walter Rafelsberger 7e25301698
[ML] Updated ML and transform CODEOWNERS for NP. (#59286)
Updates CODEOWNERS to include NP plugin paths for the ML and transform plugin.
2020-03-04 13:02:42 +01:00
Frank Hassanabad 7aaf58c86c
Added Security Intelligence And Analytics for prepackaged_rules (#58808) 2020-02-28 08:38:23 -07:00
Jean-Louis Leysens 899270a108
[Upgrade Assistant] Move out of legacy folder (#58034)
* Create x-pack/plugins skeleton for upgrade assistant

* Move public folder contents

Move the public folder of Upgrade Assistant and migrate public to use HttpSetup (remove axios)

* Include stylesheets in public

* Move server side out of legacy

Begin migration of Reindex worker to new platform

Move imports around so that it satsifies new platform constraints like not importing
server side code (even types) in client.

* Updated the routes with new dependencies and removed server shim

* Fix router unit tests

* Fix server lib tests

After changing function signatures for the reindex server factory (and others) all
of the tests needed to be revisited and brought in line with the new APIs.

Also used core/server mocks where appropriate

* Clean up types issues

* Fix setting credentials on request header

* Removed the security plugin from Upgrade Assistant

The security plugin is a potential future consumer of the Upgrade Assistant's deprecation feature
and we would therefore not want to create a circular depedency here. We pull in the licensing plugin
rather (as it is less likely that we will depend on that) and use it to determine whether security
is available and enabled.

* Migrate to config to new platform config

xpack.upgrade_assistant.enabled

* Remove unused types

* Fix import issue

* Move upgrade assistant back to Elasticsearch management section

* Update dotfiles

Added elasticsearch ui team as upgrade assistant code owner
Updated i18nrc.json path

* Alphabetical ordering in xpack/i18nrc.json

* Implemented PR feedback

Renamed callCluster -> callAsUser to be more consistent
with platform naming.

Added comment about why we are not using security plugin
directly inside of Upgrade Assistant.

Fixed long path imports and use 'src/core/..' throughout.

Fixed import ordering.

Renamed variables inside of telemetry lib.

* Revert to longer import path

In plugin.ts importing from 'kibana/server' or 'src/core/server'
results in a module not found error.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-25 15:31:04 +01:00
Vadim Dalecky 4cd809aa7d
Drilldown plugin (#58097)
* feat: 🎸 add <PanelOptionsMenu> component

* feat: 🎸 use presentational <PanelOptionsMenu> component

* feat: 🎸 create stubs for Drilldown components

* feat: 🎸 open new drilldown flyout from panel's context menu

* feat: 🎸 setup Drilldowns plugin in X-Pack

* feat: 🎸 add Storybook to drilldowns plugin

* refactor: 💡 move drilldown components to x-pack

* feat: 🎸 add stub action to open drilldown flyout

* feat: 🎸 add drilldowns plugin to translation index

* fix: 🐛 correct TypeScript type check

* fix: 🐛 use correct i18n namespace

* ci: 🎡 add drilldowns plugin to CODEOWNERS file

* fix: 🐛 revert back <PanelOptionsMenu> change

* fix: 🐛 type must not be empty
2020-02-20 21:59:29 +01:00
Frank Hassanabad 3bd639dd68
[SIEM] Let us try out code owners for a little while and see what happens
## Summary

Code owners for SIEM team.
2020-02-20 12:56:03 -07:00
Sebastian Grodzicki 39c835af60
Add owners for monitoring plugin (#57987) 2020-02-20 14:05:21 +01:00
John Schulz 5a99642cfb
Add Ingest Manager plugin to master (#56567)
* [Fleet] Add permissions checks (#48143)

* Add permissions check to API

* Add permissions check to UI

* Undo changes

* Update index.tsx

* Update enroll.ts

* add API tests for permissions

* add fleet to trial license check

* Agent enrollment flyout (#48173)

* Fix agent table empty prompt

* First pass at agent enrollment flyout with placeholders

* Move enrollment commands into separate file and enable templated vars

* Use default double braces for templating

* [Fleet] unenroll agent from the details page (#48286)

* [Fleet] add API to unenroll agents
* [Fleet] return a 403 for inactive agent
* [Fleet] UI to unenroll an agent from the detail page

* [Fleet] Filter inactive agent from the listing (#48466)

* [Fleet] Expose policy change method from fleet plugins (#48562)

* [IM] add screenshot detail view and image endpoint (#48149)

* add api endpoint to handle images

* #47978 add screenshots component with single image

* update padding around screenshot

* import existing API_ROOT

* move ImageRequestParams interface and fix type

* pass the content-type through and add test

* fix ie11 issues with nested flex items, change radius to use eui variable

* use eui variables for padding

* add aria label and image description

* [IM] Use EPM in variables & types (#48453)

* IntegrationsManager -> EPM

* integrationsManager -> epm

* [iI]ntegration -> [pP]ackage. Update tests.

* Don't rename integrations registry URL.

* Update i18n key in x-pack/.i18nrc.json

* Update path to functional test config

* Add epm to recently re-enabled privileges test

* Update two values recently added in main feature branch

* Move/update screenshot tests

* [Fleet] Allow to edit metadata (#48682)

* [Fleet] Add a toggle to show Inactive users (#48917)

* Multiselect to unenroll agents (#48852)

* Initial pass at multiselect to unenroll agents

* Adjust loading state button text

* Fix types; use unenroll provider in agent details

* Update select all agents kuery

* Prevent inactive agents from being selected

* [Fleet] Fix privilege tests after merge of master (#49118)

* [Fleet] Temporary use the elastic user as kibana user to be able to create API keys (#49037)

* [EPM] Fix package version requirement structure (#49172)

* [EPM] Fix package version requirement structure

In https://github.com/elastic/integrations-registry/pull/134 the API structure changes. This PR should adjust to the new structure.

* Update x-pack/legacy/plugins/integrations_manager/common/types.ts

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

* Update x-pack/legacy/plugins/integrations_manager/common/types.ts

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

* Update x-pack/legacy/plugins/integrations_manager/common/types.ts

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

* Update x-pack/legacy/plugins/integrations_manager/common/types.ts

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

* [EPM] 48799 markdown into readme (#49180)

* add markdown component and fetch markdown

* add package.json file with react-markdown dependency

* add markdown renderers, use readme path

* remove description and rename to readme

* remove dropshadow on images

* add loading component for readme request

* comment on loading components

* Add command to spin up a mock server for ingest endpoints (#49259)

* 48654 files from registry (#49580)

* Replace image path/handler with generic file one

* Incorporate tests from #48696

* [EPM] Make screenshot image captions optional (#48912)

* Make screenshot image captions optional

* fix typos, type, rename variable

* [EPM] update to layout and and spacing (#49413)

* fix height and color issues

* make container full height

* remove panels per design update and make white bg color

* adjust spacing

* check for empty response

* fix eslint issue

* fix layout in safari

* remove unused component

* [EPM] Rename registry url to new path (#49598)

The integrations-registry repository was renamed to package-registry and with it also all the assets inside. The url under which the service is served will also be changed (not done yet). As soon as this is done, this PR should be merged.

* [EPM] rewrite relative image paths (#49637)

* rewrite relative image paths

* remove EuiImage, use transformImageUri, clean up

* [EPM] Use NP registerFeature (#49625)

* Use NP registerFeature

* Added features plugin to deps. Used it in setup.

Moved `registerFeature` from `init` to plugin setup.

Moved rest of init into `createSetupShim`. `init` is now

```ts
init(server: Legacy.Server) {
    const { initializerContext, coreSetup, pluginsSetup } = createSetupShim(server);

    new Plugin(initializerContext).setup(coreSetup, pluginsSetup);
  },
```

Moved feature (argument for `registerFeature`) to separate file.

Renamed plugin-specific `CoreSetup` to `EPMCoreSetup`

* [Fleet] Filter agents list table by policy name (#49968)

* Add policies lib and adapters

* Fix mock server headers

* Initial pass at policy filter dropdown by manipulating kuery string

* Adjust spec return values

* Use separate state for policy filter; fix typings and disable some eslint rules

* Fix react-related eslint errors

/Users/jfsiii/work/kibana/x-pack/legacy/plugins/integrations_manager/public/hooks/use_links.tsx
  26:20  error  React Hook "useCore" is called in function "addBasePath" which is neither a React function component or a custom React Hook function  react-hooks/rules-of-hooks

/Users/jfsiii/work/kibana/x-pack/legacy/plugins/integrations_manager/public/screens/detail/readme.tsx
  26:35  error  React Hook "useLinks" cannot be called inside a callback. React Hooks must be called in a React function component or a custom React Hook function  react-hooks/rules-of-hooks
  39:6   error  React Hook useEffect has a missing dependency: 'readmePath'. Either include it or remove the dependency array                                       react-hooks/exhaustive-deps

/Users/jfsiii/work/kibana/x-pack/legacy/plugins/integrations_manager/public/screens/home/search_results.tsx
  27:42  error  `"` can be escaped with `&quot;`, `&ldquo;`, `&#34;`, `&rdquo;`  react/no-unescaped-entities
  27:49  error  `"` can be escaped with `&quot;`, `&ldquo;`, `&#34;`, `&rdquo;`  react/no-unescaped-entities

✖ 5 problems (5 errors, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

* Remove ui/* imports (#50094)

* [Fleet] Use ES api keys for agent authentication (#49639)

* add collapsible read me component (#49990)

* add collapsible read me component

* Update x-pack/legacy/plugins/integrations_manager/public/components/content_collapse.tsx

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

* add empty array as second argument to useLayoutEffect

* [EPM] Make API consistent for package installation and removal (#48745)

* Adjust type names

* Install package in one go.

* Integration -> Package

* Really install all known assets

* Remove ingest pipelines on package deletion.

* [EPM] Replace image paths/handlers with generic ones for file (#48688)

* Replace image path/handler with generic file one

* Incorporate tests from #48696

* Fix merge error.

* Type tuning

* Adjust types

* Remove asset types from routes altogether

* Add timelion-sheet back to types.

* Respond with full package info to install/delete

* Be specific in return type.

* Keep installAssets() as separate step

* [EPM] Add unit tests for pathParts (#50279)

* [EPM] Add unit tests for pathParts

This adds unit tests for the pathParts function. I initially wanted to enhance the function to also support paths like `iptables-1.0.4/dataset/log/elasticsearch/ingest-pipeline/pipeline.json`. But without unit tests it was hard for me to make the changes.

This adds a unit test driven by a table so we can extend it later. Adding these tests also helps me to better understand the code.

As a note for myself, the command to run these tests is:

```
node scripts/jest --watch ./legacy/plugins/integrations_manager/server/registry/index.test.ts
```

* Update docs for merging master into feature branch (#50396)

* [Fleet] Remove in memory repository (#50431)

* [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

* First pass at deleting everything related to EPM & Fleet plugins

* Remove EPM-specific react-markdown

* Remove some unwanted differences from master.
Removed more EPM and Fleet changes

* React.FC -> React.FunctionComponent to match the pattern in master

* Selectively enable features based on config values

* Fix typing and(?) CI

* Enable xpack.ingestManger during tests

Follow example from xpack.endpoint flags

* Don't create BASE_URL value based on PLUGIN_ID

* Don't add optional routes. Use config for registry url

* Add README with some skeleton docs on tests, etc

* Undo changes to some files based on PR feedback

* Commit the result of 'yarn kbn run build -i @kbn/pm'

* Commit the result of 'yarn kbn run build -i @kbn/pm'

* WIP. But add some passing api integration tests

 └-: apis
   └-> "before all" hook
   └-: Ingest Manager plugin
     └-> "before all" hook
     └-: /agent_configs
       └-> "before all" hook
       └-> should get agent configs
         └-> "before each" hook: global before each
         └- ✓ pass  (42ms) "apis Ingest Manager plugin /agent_configs should get agent configs"
       └-> should create agent config
         └-> "before each" hook: global before each
         └- ✓ pass  (63ms) "apis Ingest Manager plugin /agent_configs should create agent config"
       └-> should have new agent config
         └-> "before each" hook: global before each
         └- ✓ pass  (41ms) "apis Ingest Manager plugin /agent_configs should have new agent config"
       └-> should delete that new config
         └-> "before each" hook: global before each
         └- ✓ pass  (1.0s) "apis Ingest Manager plugin /agent_configs should delete that new config"
       └-> should get datasources
         └-> "before each" hook: global before each
         └- ✓ pass  (26ms) "apis Ingest Manager plugin /agent_configs should get datasources"
       └-> should 404 from EPM package api
         └-> "before each" hook: global before each
         └- ✓ pass  (41ms) "apis Ingest Manager plugin /agent_configs should 404 from EPM package api"
       └-> "after all" hook
     └-> "after all" hook
   └-> "after all" hook

6 passing (1.2s)

* WIP

* Fix TS type errors.

Types are created tests. Should they come from test project?

* Add route to delete datasources (mirrors agent_configs api)

* Remove old ESArchiver files

* Add integration tests for each /agent_config & /datasources route

* Update README

Remove bash integration test scripts

* More updates to README

* Remove xpack.kueryAutocomplete from x-pack/.i18n.json

* Use default appRoute. We can't use /app/ingest (at least for now).

Looking at the app_router it seems like any route starting with `/app` must be `/app/:appId`.

I also don't think appRoute is fully supported. I'll follow up with Platform.

* Use appBasePath from app mount params for React Router basename

* Remove out-of-date comments

* Use the ES client from core

* Move License & Config services WIP. Pushing to share

* Move config & license services into App Context service.

* Remove FTR tests for Ingest Manager

* Remove license-related propperties

* Remove clusterClient properties

* Don't set this.security if not in dependencies

* WIP (failing) integration_test

* No more unknown key errors. Timeouts now

* Test routes with default (disabled) and manager-only flags

* Add tests to cover all permutations of flags (A, AB, AC, ABC)

* Use TS types vs config-schema in common & public

Move all @kbn/config-schema usage to server

Co-authored-by: Matt Apperson <me@mattapperson.com>
Co-authored-by: Jen Huang <its.jenetic@gmail.com>
Co-authored-by: Nicolas Chaulet <n.chaulet@gmail.com>
Co-authored-by: Sandra Gonzales <neptunian@users.noreply.github.com>
Co-authored-by: Nicolas Ruflin <spam@ruflin.com>
Co-authored-by: Sonja Krause-Harder <krauseha@gmail.com>
Co-authored-by: Brian Seeders <seeders@gmail.com>
Co-authored-by: Tyler Smalley <tylersmalley@me.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-18 21:30:38 -05:00
Jonathan Buttner e8994abebe
[Endpoint] Adding the endpoint teams for relevant directories (#57920)
* Adding the endpoint teams for relevant directories

* Using combined team
2020-02-18 18:15:45 -05:00
Yuliia Naumenko c07ff7174e
Alerting plugin migrate to Kibana platform (#57635)
* Moved alerting plugin to new platform

* Fixed type checks

* Fixed failing tests

* Fixed functional tests

* Fixed plugin context initialization

* small typo

* Fixed type checks

* Fixed create alert schema

* Moved alerting files to Kibana platform folder

* Fixed duration validation

* Fixed find page size

* Fixed type check

* Fixed due to comments

* Fixed merge issues

* Added missing

* Fixed alerting functional tests

* Fixed tests

* Fixed update schema validation

* Added throttle update

* Fixed failing tests

* test

* fixed setup alerting dependencies for siem and monitoring plugins

* Fixed siem setup dependancies
2020-02-18 09:05:56 -08:00
Alison Goryachev 6e3790537d
[Remote clusters] Migrate client-side code out of legacy (#57365) 2020-02-14 21:10:33 -05:00
Spencer 4e8ab56497
build immutable bundles for new platform plugins (#53976)
* build immutable bundles for new platform plugins

* only inspect workers if configured to do so

* [navigation] use an index.scss file

* add yarn.lock symlink

* set pluginScanDirs in test so fixtures stay consistent

* cleanup helpers a little

* fix type error

* support KBN_OPTIMIZER_MAX_WORKERS for limiting workers via env

* test support for KBN_OPTIMIZER_MAX_WORKERS

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

* add docs about KBN_OPTIMIZER_MAX_WORKERS environment variable

* fix README link

* update kbn/pm dist

* implement bundle caching/reuse

* update kbn/pm dist

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

* update renovate config

* standardize on index.scss, move console styles over

* add support for --no-cache to cli

* include worker config vars in optimizer version

* ignore concatenated modules

* update integration test

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

* update docs, clean up optimizer message/misc naming

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

* reword caching docs, add environment var to disable caching

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

* handle change notifications

* batch changes for 1 second

* rename CompilerState type to CompilerMsg

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

* remove unused deps

* split up run_worker.ts and share cacheKey generation logic

* add a couple docs

* update tests and remove unused imports

* specify files when creating bundle cache key

* remove one more unused import

* match existing dev cli output more closely

* update kbn/pm dist

* set KBN_NP_PLUGINS_BUILT to avoid warning in CI

* avoid extending global window type

* add note to keep pluginScanDirs in sync

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

* load commons.bundle.js in parallel too

* emit initialized+success states if all bundles are cached

* load bootstraps as quickly as possible

* skip flaky suite

* bump

* update jest snapshots

* remove hashing from cache key generation

* remove unnecessary non-null assertion

* improve docs and break up Optimizer#run()

* remove unused import

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

* fix tests

* add initializing phase

* avoid rxjs observable constructor

* remove unnecessary rxjs helper, add tests for bundle cache

* update consumers of optimizer

* update readme with new call style

* replace "new platform" with "kibana platform"

* fix a couple more renames

* add support for several plain-text file formats

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

* one more OptimizerMsg update

* ensure bundles are not cached when cache config is false

* test for initializing states and bundle cache events

* remove unnecessary timeout change

* Remove unnecessary helpers

* Add tests for BundleCache class

* Add tests for Bundle class

* test summarizeEvent$

* missing paths are no longer listed in mtimes map

* add tests for optimizer/cache_keys

* Add some extra docs

* Remove labeled loop

* add integration test for kbn-optimizer watcher components

* querystring-browser removed

* tweak logging a smidge, improve info and final message

* remove unused imports

* remove duplication of getModuleCount() method

* move type annotation that validates things

* clear up the build completion message

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-12 19:42:42 -07:00
Mike Côté 8ec0e01b34
Include actions new platform plugin for codeowners (#57252) 2020-02-11 15:41:32 -05:00
Jason Rhodes bb06ca8d69
Create observability CODEOWNERS reference (#57109)
* Create observability CODEOWNERS reference

* Update elastic/epm to elastic/ingest per Jen's request :)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-11 10:27:35 -05:00
Nick Partridge 0f117c9c32
Vislib replacement toggle (#56439)
* Add new vislib replacement plugin shell
* Add config to toggle new vislib replacement
2020-02-03 22:05:32 -06:00
Vadim Dalecky c86ee1b6ea
chore: 🤖 add AppArch plugins to CODEOWNERS (#56397)
* chore: 🤖 add AppArch plugins to CODEOWNERS

And sort the list alphabetically.

* chore: 🤖 add @kbn/interpreter to AppArch CODEOWNERS

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-03 07:05:39 -08:00
Joe Reuter c504c40ba9
exclude tutorial resources from code ownership (#55987)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-30 16:42:03 +01:00
Jean-Louis Leysens 952b61e049
[Console] Move out of legacy + migrate server side to New Platform (#55690)
* Initial move of public and setup of server skeleton

* Fix public paths and types

* Use new usage stats dependency directly in tracker also mark as an optional dependency

* WiP on getting server side working

* Restore proxy route behaviour for base case, still need to test custom proxy and SSL

* Add new type and lib files

* Clean up legacy start up code and add comment about issue in kibana.yml config for console

* Move console_extensions to new platform and introduce ConsoleSetup API for extending autocomplete
Add TODO regarding exposing legacy ES config

* Re-introduce injected elasticsearch variable and use it in public

* Don't pass stateSetter prop through to checkbox

* Refactor of proxy route (split into separate files). Easier testing for now.
Refactor file name of request.ts -> proxy_request.ts. This is consistent with the exported function now
Started fixing server side tests for the proxy route
  - Migrated away from sinon
  - Completed the body.js -> body.test.ts. Still have to do the rest

* headers.js test -> headers.test.ts and moved some of the proxy route mocking logic to a common space

* Finish migration of rest of proxy route test away from hapi
Add test for custom route validation

* Bring console application in line with https://github.com/elastic/kibana/blob/master/src/core/CONVENTIONS.md#applications
Change log from info level to debug level for console_extensions plugin

* Update i18nrc file for console

* Add setHeaders when passing back error response

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-30 10:51:02 +01:00
Mikhail Shustov 06acf2f42a
add owners for es_archiver (#56184) 2020-01-28 19:57:44 +01:00
Thomas Watson bb30bb4fd4
Update .github/CODEOWNERS (#55728) 2020-01-23 19:07:40 +01:00
Joe Reuter 841afe32fc
exclude tutorials from code ownership (#55705) 2020-01-23 15:39:43 +01:00
Jean-Louis Leysens bb37b0f613
[Watcher] Move out of legacy (#54752)
* Moved out of legacy folder

* First iteration of watcher plugin that renders

* Move create Timebuckets to plugin root
Update route registration and fix license checking for NP

* Re-enable Component integration tests

* Minor fix for data deserializer in api.ts

* Slight logic refactor, more defensive plugin startup

* Re-add legacy folder for SCSS pipeline

* Remove duplicate style sheet

* Fix type issue with TimeBuckets export

* Update license management routing logic (issued warning for using basepath on navigating away from license management)
Remove commented out code in watcher

* More defensive plugin registration

* Fix i18n issues and restore registration of feature on home view

* Remove watcher license error check copy

* Restore license error message in watcher

* Fix mock context value

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-23 15:35:36 +01:00
Dario Gieselaar 0275331514
Add @elastic/apm-ui as code owner of APM NP plugin (#55674) 2020-01-23 13:44:55 +01:00
Jean-Louis Leysens b8d35105c7
[SearchProfiler] Move out of legacy (#55331)
* Initial move of searchprofiler into new platform directory, lots of things need testing

* Whitespace, clean up types and remove unused files

* First iteration of end-to-end plugin working

- Updated license check to only check for presence of basic license (not search profiler as a feature
- Updated the payload: removed types from validation
- Also added README in public regarding the location of styles

* Added extractProfilerErrorMessage function to interface with new error reporting from profiler endpoint

* Fix paths to test_utils

* Update I18n for search profiler

* Fix react hooks ordering bug with license status updates and fix test (wait for first license object before rendering)

* Added index.ts file to common in searchprofiler route
Marked types and values as internal
Removed unnecessary "async" from function
Update import to not use "src" alias

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-22 13:58:18 +01:00
Patrick Mueller b78c1b1042
Adds event log for actions and alerting (#45081)
initial code for event log

see issue https://github.com/elastic/kibana/issues/45083
2020-01-21 18:00:08 -05:00
Nick Partridge ce2930ec51
De-angularize vis tooltips (#54954)
* Remove angular dependencey from vis/tooltip
* Move tooltip logic into vislib
* Remove and fix all ngMock refs in vislib tests
* Add numeral to renovate config
* Add vis_type_vislib to codeowners
* Move vis_legend into vislib and fix errors
* vis_type_vislib/public imports to be only top-level
2020-01-21 10:46:56 -06:00
Mike Côté 67a8194d6c
Fix codeowners for alerting services team (#53889)
* Fix codeowners

* Fix localization and telemetry folders as well

* Fix task manager path

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-15 18:06:24 -05:00
Yuliia Naumenko 8259445350
Create UI for alerting and actions plugin (#48959)
* Refactored reducers type definitions

* Fixed dependancy objects

* Fixed action add

* Fixed logging app icon

* Added action types params fields

* Added fields for check and re-notify alert

* Add tags to alert list

* Adjusted threshold expression with validation, added visualization

* Move delete button to the left and hide when no selection

* Rename action list title column to name

* fixed request

* Removed watcher labels

* Design cleanup

* Added expression default values

* Added visualization for index threshold alert

* Rename Actions tab to Connectors

* Rename "create action" to "create connector"

* Remove actions column name

* Add count per action type

* Hide checkboxes when user can't delete

* Add title to home, rename Alerting UI breadcrumb (remove UI part)

* Added correct binding for interval and throttle

* Added tags support for create Alert UI

* Added server error display in UI on save alert

* Added connectors for action forms

* Update button styles

* Switch inputs to compressed forms

* Fixed some fields for add alert form

* Fixed updating action by index

* Fixed filter for index/fields api requests

* Remove the test alert type that was in the init function

* Fixed action type icon on add connector form and did small refactoring on action forms; added action validation

* Rename alerting UI plugin to triggers and actions UI (or something else) #50305

* Implemented action connector edit UI

* Add bulk actions to alerts list

* Update home title spacing

* Fixed editing secrets action property

* Changing behaviour of bulk actions and disable buttons during request

* Refactored plugin definition with appdependency interface

* Moved add dependencies to the separate file

* Enable visualization if only hasExpressionErrors passed

* Fixed add action twice on click card

* Fix actions column in alert list

* Fixed action canSave capability

* Renamed Actions to ActionConnectors in appropriate UI files

* Renamed alertTypeParams to params in UI code

* Add filter for tags

* Cleanup previous commit

* Fix alert type filter

* Refactored edit form to use ActionTableItem

* Renamed ActionTableItem to ActionConnectorTableItem

* Fixed missing button key error for alerts list filter

* Renamed translation labels for connectors

* Enable UI plugin by default

* Rename buildin to builtin

* Fix some type checks

* Add API tests

* Split API file into smaller files

* Rename plugin id

* Remove dependency on actions plugin (should be optional dep in NP)

* Fix some translation ids

* Revert "Rename plugin id"

This reverts commit f6daeb3d5e.

* Rename method for loading connectors

* Added functional tests base

* Fix functional test type filter

* Add test alert type for now

* Initial connectors functional tests

* Rename description to name

* Use unique connector names to allow re-running tests

* Assert on more things

* Update alert/action menu items. Flyout width. Add index.scss file

* Added action connector list unit tests

* Add bulk delete functional test

* Move tests to SSL functional environment

* Fix tests

* Added unit tests for actionTypeRegistry and alertTypeRegistry

* Fixed update connector with only properties

* Added some functional tests for alerts with TODOs

* connectors list page cleanup

* empty state cleanup

* Added connector edit flyout unit test

* Fix functional tests

* text cleanup

* zindex fix for index threshold trigger

* Expand the functional tests, add assertions

* Fixed edit connector from the Name column, and removed pencil button

* Remove tags filter, use search bar instead

* Finalize functional tests

* Support filtering alerts by action type

* Rename plugin name for translations

* Rename default breadcrumb title to alerts and actions

* Added unit tests for connectors empty prompt, fixed api tests

* Added unit test for select action type menu for create connector; Fixed update selected connector for edit form

* Added unit test for edit connector flyout

* Added alerts list unit tests

* Added connector form unit tests

* Added connector reducer unit tests

* Fixed some failing unit tests

* Fixed alerts list unit tests

* Set alert tab default if it is available

* Added doc_title and get_time_units unit tests

* Added some test fixes

* Fixed index threshold expression to display only index and fields

* Added email building action unit tests

* Added unit tests for builtin action types

* Remove test alert type

* Move create alert UI behind feature flag 'createAlertUiEnabled'

* Fix functional tests

* Update codeowners

* Update codeowners for tests

* Revert watcher changes

* Fix type check failure

* Fix unit test failures

* Fixed typecheck failures

* Fixed language check errors

* Did some text/type fixes

* Fixed typecheck

* Fixed unit tests warning

* Fix failing functional tests

* Fix registry tests to have cleaner diff when it fails

* Make DEFAULT_SECTION a Section type

* Remove unused constructor

* Make app dependency error string same line

* Remove unused error pages

* Set interface to alerts context

* Fix action_connector_form.tsx label

* Fix label in connector_add_flyout.tsx

* Fix label in alert_add.tsx

* Move alert_types to builtin_alert_types

* Move some threshold constants into threshold folder

* Move api.ts within threshold folder

* Removed duplication logic from action type and alert type registry list

* Fixed email action type test and adjusted validation to support arrays ony

* Added missing connector fields for email action type

* Fixed building action types issues due to comments

* Refactored with more new platform structure; fixed some comments from review

* Capitalize Actions in 'Alerts and Actions' labels

* Skip flaky tests

* Fix failing functional test

* Fixed failing unit tests, added new deps

* Fixed type checks

* Fixed language check failing

* Fix broken functional tests

* Refactored actionConnectors and alerting context

* Removed doc title service

* added get time options type definitions

* removed obsolete code

* Made generic registry type for actionTypes and alert types

* Fixed some enum types

* fixed type check CI

* Convert EuiSearchBar to normal text field

* Fix typo

* Fix conditional rendering

* Fix bug where selection doesn't reset

* Fix broken functional test, wait for ENTER key to search alerts

* Make app section hide from menu when user doesn't have access

* Fixed connector name validation (error due to renaming from description)

* Removed obsolete useEffect

* Removed unused ShareRouter

* Fixed key validation error

* Mobed wrongly wrapped objects

* Removed useEffect from connectors form

* Replaced error forms with eui controls props

* Added delete confirmation dialog for connectors list

* Fixed build errors

* Fixed failing test

* Skip flaky tests

* Added null check for app context - render components tree only if it isn't null

* Fixed type check eror

* Did changes on the UX and text/labels commnets

* Fixed failing tests

* Fixed error handling

* Refactored Webhook form http headers due to the mockup

* Fixed build

* Fix labels issue

* Fix spacing and form row alignment

* Fixed failing type check

* put ownfocus on popover in actions list

* fix spacing and flex

* fix color on conectors list

* clean up webhook headers form

* fix logic check for headers

* Made changes due to review comments

* Fixed delete connector test

* Fixed all flaky test for delete connectors 53956

* Fixed type check due to NP changes

* Disable plugin by default

* Added configuration props for functional tests to enable triggers and actions ui

* removed timeout from test

* added enable triggers and actions to functional/config.js

* fix the build

* Changed ci group and disabled plugin

* changed config setting to root

* Changed disable approach

* Experiment with index managment

* Set back configuration settings for triggers and actions

* Enable plugins

* Set index management to disabled to see the failing issue

* Revert experimental back for index_managment

* Fixed type check

Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
Co-authored-by: dave.snider@gmail.com <dave.snider@gmail.com>
Co-authored-by: DeFazio <michael.defazio@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com>
2020-01-13 16:16:20 -08:00
Spencer 357be5970d
share specific instances of some ui packages (#54079)
* share specific instances of some ui packages

* remove unnecessary eslint changes, every package will define deps anyway

* remove mentions of moment webpackShims in eslint resolver

* remove use of lodash

* list angular as dep for x-pack

* add operations as codeowner of shared-deps pkg
2020-01-10 15:22:18 -07:00
Tim Roes 53d1c96a4a
Remove non existing codeowners (#54274)
* Remove non existing codeowners

* Add TSVB to Kibana App codeowners
2020-01-08 18:10:26 +01:00
Mikhail Shustov 007ea5fc46
set AppArch team as an owner of the search endpoints (#54131) 2020-01-08 12:18:55 +03:00
Joe Reuter 06d26f6b68
Enforce shimmed plugin boundaries (#52633) 2019-12-20 19:01:56 +01:00
Nathan Reese 6e5f9cc703
[Maps] register @elastic/kibana-gis to maps code (#53487) 2019-12-19 11:23:20 -07:00
Mike Côté cf8cb62bf5
Update codeowners to include functional tests (#53045) 2019-12-17 15:51:40 -05:00
Eli Perelman 614bde927e
Move CSP options to new platform (#52698)
* Move CSP options to new platform

* Expose SharedGlobalConfig from root

* Derive CSP options from config

* Consolidate CSP configuration with HTTP config

* Fix outstanding config renames

* Remove legacy CSP configuration calls, migrate to platform properties

* Revise docs

* Fix test from type change

* Expose ICspConfig, consolidate and simplify CSP defaults access

* Rebase and update docs

* Remove legacy API from route definition params, review nits

* Clean up config path usages for consistency

* Regenerate docs
2019-12-13 15:57:17 -06:00
Bill McConaghy 79a8528646
fixing CODEOWNERS file (#52919) 2019-12-12 13:41:10 -05:00
Joe Reuter b6ea6990c0
Migrate url shortener service (#50896) 2019-12-11 14:19:28 +01:00
Mikhail Shustov 6db76a7e6d
add codeowners for legacy server folder (#52158) 2019-12-06 08:23:48 +01:00
Luke Elmers d63595890e
Update App Arch CODEOWNERS with legacy plugins. (#51502) 2019-12-02 16:57:27 -07:00
Ahmad Bamieh 0039e97747
[Telemetry] collector set to np (#51618)
* first iteration

* local collection ready

* type check

* fix collectorSet tests

* unskip test

* ordering

* collectors as array in constructor

* update README files

* update README and canvas to check for optional dep

* update README with more details

* Add file path for README example

* type UsageCollectionSetup

* run type check after refactor
2019-11-27 01:55:48 +02:00
Aleh Zasypkin 0557a40a9d
Document @kbn/config-schema. (#50307) 2019-11-26 12:56:31 +01:00
Jonathan Budzenski 1ce02049aa
Swap renovate codeowners with assignee configuration (#48987)
* Swap renovate codeowners with assignee configuration

* remove :
2019-11-25 09:38:49 -06:00
Robert Oskamp ed8b822c8f
[ML] Add ownership of transform functional test files to ml-ui (#51418) 2019-11-22 14:46:57 +01:00
spalger bf2d6e7b6c [codeowners] assign src/dev/i18n to stack services team 2019-11-21 11:30:04 -07:00
Tiago Costa 48a2156c4c
chore(NA): remove code plugin from codeowners (#50451) 2019-11-15 00:19:57 +00:00
Aleh Zasypkin 203ef5577c
Migrate Encrypted Saved Objects plugin to the new platform. (#49890) 2019-11-01 22:32:12 +01:00
Larry Gregory 45617f0bbe
Adding NP spaces plugin to CODEOWNERS (#49963) 2019-11-01 15:37:38 -04:00
Walter Rafelsberger 0e341b2088
Fix CODEOWNERS. (#49740)
Fixes the format of the CODEOWNERS file to ping both ML-UI and ES-UI team for the transform plugin. Having the same path twice for each team ignored the second rule. This update has the path only once with both teams on the same line.
2019-10-30 09:12:17 -07:00
Vadim Dalecky a38223d890
Expressions np (#47810)
* refactor: 💡 generalize service getters and setters in expressio

* feat: 🎸 create NP-ready plugin for expressions

* refactor: 💡 flatten expressions plugin and remove service

* chore: 🤖 re-export legacy expressions service dir for Lens

* refactor: 💡 don't import renderer registry statically

* test: 💍 mock expressions service renderers registry in Mocha

* refactor: 💡 clean-up NP expressions pugin

* refactor: 💡 move Expression fonts to NP

* refactor: 💡 register Interpreter entities explicitly

* refactor: 💡 move clog Expression function to NP

* refactor: 💡 move font function and style types to NP

* refactor: 💡 remove ui/chrome from kibana_context function

* feat: 🎸 add ability to consume start core from setup life-cycle

* refactor: 💡 move kibana_context function to NP

* feat: 🎸 improve naming and delete import of missing function

* refactor: 💡 register expression clog and font fn in NP

* chore: 🤖 set AppArch as GitHub folder owners

* refactor: 💡 move Expression "kibana" function to NP

* refactor: 💡 move range function to visualizations plugin

* feat: 🎸 move visDimensions to visualizations plugin

* chore: 🤖 delete unused files

* refactor: 💡 move expression type registration to NP

* refactor: 💡 move createHandlers() function to NP

* feat: 🎸 move Expression executor to NP

* refactor: 💡 re-implement function registry

* refactor: 💡 convert expression type to class

* fix: 🐛 correct TypeScript errors

* feat: 🎸 convert Expressions type registry to class

* feat: 🎸 convert render function registry to class

* fix: 🐛 fix TypeScript errors

* fix: 🐛 fix translations after refactor

* refactor: 💡 move Expression types to NP

* test: 💍 remove unused test

* fix: 🐛 fix Lens import after merge with master

* fix: 🐛 fix TypeScript errors

* refactor: 💡 update expression types

* test: 💍 fix renderer test
2019-10-30 14:57:53 +01:00
Mikhail Shustov e665574c30
add platform team as a licensing owner (#49617) 2019-10-30 09:45:20 -04:00
Liza Katz 6bb30e7190
Allow plugins to register top nav menu items (regression fix) (#48542)
* Move top nav menu to its own plugin
Allow registering additional options from other plugins
Added demo plugin

* Added functional test to validate top nav registration

* Improved names

* Rename array

* Fixed lens tests

* Deleted old NavBarExtensionsRegistryProvider

* Fixed top nav menu test

* Attempt fixing test by clearing ui_actions on stop

* temporary disable test
2019-10-28 10:40:21 +02:00
spalger 9758d6971d add codeowner declarations for operations packages 2019-10-21 12:58:37 -07:00
Walter Rafelsberger 41aea39cc0
Adds es-ui team to transform plugin in CODEOWNERS. (#48665) 2019-10-21 01:47:43 -07:00
Sebastian Grodzicki b8647aece3
Adding @elastic/epm to CODEOWNERS (#48237) 2019-10-16 12:05:25 +02:00
Sebastian Grodzicki 5dda3b1d6a
Update Logs & Metrics UI team name (#47942) 2019-10-16 10:10:42 +02:00
Rudolf Meijering 1a9cd51891
Remove platform as code owner from ui/saved_objects (#47673) 2019-10-14 13:25:12 +02:00
Brandon Kobel 9235db5ff7
Reenabling the privileges test, and removing the includeActions test (#48027)
* Reenabling the privileges test, and skipping the one that includes
actions

* Making the security team the codeowner
2019-10-11 15:02:53 -07:00
Walter Rafelsberger bcf9ec3662
[transform] Move ML "Data Frame Transforms" to Kibana management section "Transforms". (#45880)
Moves "Data frame transforms" from the ML plugin to its own "transform" plugin within the Kibana management section.
2019-10-09 11:13:27 -07:00
Søren Louv-Jansen 4d432f1d9c
Update CODEOWNERS (#47029) 2019-10-01 15:59:16 +02:00
Joe Reuter eeac753084
add graph to codeowners file (#46468) 2019-09-25 09:04:11 +02:00
Pete Harverson e6ea269319
[ML] Add ownership of ML functional test files to ml-ui (#45915) 2019-09-18 09:20:47 +01:00
Joe Reuter eed848ab2e New visualization editor Lens (#36437)
* [lens] Initial Commit (#35627)

* [visualization editor] Initial Commit

* [lens] Add more complete initial state

* [lens] Fix type issues

* [lens] Remove feature control

* [lens] Bring back feature control and add tests

* [lens] Update plugin structure and naming per comments

* replace any usage by safe casting

* [lens] Respond to review comments

* [lens] Remove unused EditorFrameState type

* [lens] Initial state for IndexPatternDatasource (#36052)

* [lens] Add first tests to indexpattern data source

* Respond to review comments

* Fix type definitions

* [lens] Editor frame initializes datasources and visualizations (#36060)

* [lens] Editor frame initializes datasources and visualizations

* Respond to review comments

* Fix build issues

* Fix state management issue

* [lens][draft] Lens/drag drop (#36268)

Add basic drag / drop component to Lens

* remove local package (#36456)

* [lens] Native renderer (#36165)

* Add nativerenderer component

* Use native renderer in app and editor frame

* [Lens] No explicit any (#36515)

* [Lens] Implement basic editor frame state handling (#36443)

* [lens] Load index patterns and render in data panel (#36463)

* [lens] Editor frame initializes datasources and visualizations

* Respond to review comments

* Fix build issues

* remove local package

* [lens] Load index patterns into data source

* Redo types for Index Pattern Datasource

* Fix one more type

* Respond to review comments

* [draft] Lens/line chart renderer (#36827)

Expression logic for the Lens xy chart.

* [lens] Index pattern data panel (initial) (#37015)

* [lens] Index pattern switcher

* Respond to review comments

* [Lens] Editor state 2 (#36513)

* [lens] Dimension panel that generates columns (#37117)

* [lens] Dimension panel that generates columns

* Update from review comments

* [lens] Generate esdocs queries from index pattern (#37361)

* [lens] Generate esdocs queries from index pattern

* Remove unused code

* Update yarn.lock from yarn kbn bootstrap

* [Lens] Add basic Lens xy chart suggestions (#37030)

Basic xy chart suggestions

* [Lens] Expression rendering (#37648)

* [Lens] Expression handling (#37876)

* [Lens] Lens/xy config panel (#37391)

Basic xy chart configuration panel

* [Lens] Xy expression building (#37967)

* [Lens] Initialize visualization with datasource api (#38142)

* [lens] Dimension panel lets users select operations and fields individually (#37573)

* [lens] Dimension panel lets users select operations and fields individually

* Split files and add tests

* Fix dimension labeling and add clear button

* Support more aggregations, aggregation nesting, rollups, and clearing

* Fix esaggs expression

* Increase top-level test coverage of dimension panel

* Update from review comments

* [Lens] Rename columns (#38278)

* [Lens] Lens/index pattern drag drop (#37711)

* Basic xy chart suggestions

* Re-apply XY config panel after force merge

* Initial integration of lens drag and drop

* Tweak naming, remove irellevant comment

* Tweaks per Wylie's feedback

* Add xy chart internationalization
Tweak types per Joe's feedback

* Update xy chart i18n implementation

* Fix i18n id

* Add drop tests to the lens index pattern

* improve tests

* [lens] Only allow aggregated dimensions (#38820)

* [lens] Only allow aggregated dimensions

* [lens] Index pattern suggest on drop

* Fully remove value

* Revert "[lens] Index pattern suggest on drop"

This reverts commit 604c6ed68c.

* Fix type errors

* [lens] Suggest on drop (#38848)

* [lens] Index pattern suggest on drop

* Add test for suggestion without date field

* fix merge

* [Lens] Parameter configurations and new dimension config flow (#38863)

* fix eslint failure

* [lens] Fix build by updating saved objects and i18n (#39391)

* [lens] Update location of saved objects code

* Update internatationalization

* Remove added file

* [lens] Fix arguments to esaggs using booleans (#39462)

* [lens] Datatable visualization plugin (#39390)

* [lens] Datatable visualization plugin

* Fix merge issues and add tests

* Update from review

* Fix file locations

* [lens] Use first suggestion when switching visualizations (#39377)

* [lens] Label each Y axis with its operation label (#39461)

* [lens] Label each Y axis with its operation label

* Remove comment

* Add link to chart issue

* [Lens] Suggestion preview rendering (#39576)

* [Lens] Popover configs (#39565)

* [Lens] Basic layouting (#39587)

* remove datasource public API in suggestions (#39772)

* [Lens] Basic save / load (#39257)

Add basic routing, save, and load to Lens

* [lens] Fix lint error

* [lens] Use node scripts/eslint.js --fix to fix errors

* [lens] Include link to lens from Visualize (#40542)

* [lens] Support stacking in xy visualization (#40546)

* [lens] Support stacking in xy visualization

* Use chart type switcher for stacked and horizontal xy charts

* Clean up remaining isStacked code

* Fix type error

* [Lens] Add xy split series support (#39726)

* Add split series to lens xy chart

* [lens] Lens Filter Ratio (#40196)

* WIP filter ratio

* Fix test issues

* Pass dependencies through plugin like new platform

* Pass props into filter ratio popover editor

* Provide mocks to filter_ratio popover test

* Add another test

* Clean up to prepare for review

* Clean up unnecessary changes

* Respond to review comments

* Fix tests

* [Lens] Terms order direction (#39884)

* fix types

* [Lens] Data panel styling and optimizations (#40787)

Style the data panel (mostly Joe Reuter's doing). Optimize a bunch of the Lens stack.

* [Lens] Optimize dimension panel flow (#41114)

* [Lens] re-introduce no-explicit-any (#41454)

* [Lens] No results marker (#41450)

* [lens] Support layers for visualizing results of multiple queries (#41290)

* [lens] WIP add support for layers

* [lens] WIP switch to nested tables

* Get basic layering to work

* Load multiple tables and render in one chart

* Fix priority ordering

* Reduce quantity of linting errors

* Ensure that new xy layer state has a split column

* Make the "add" y / split the trailing accessor

* Various fixes for datasource public API and implementation

* Unify datasource deletion and accessor removal

* Fix broken scss

* Fix xy visualization TypeScript errors?

* Build basic suggestions

* Restore save/load and fix typescript bugs

* simplify init routine

* fix save tests

* fix persistence tests

* fix state management tests

* Ensure the data table is aligned to the top

* Add layer support to Lens datatable

* Give xy chart a default layer initially

* Allow deletion of layers in xy charts

* xy: Make split accessor singular
Remove commented code blocks

* Change expression type for lens_merge_tables

* Fix XY chart rendering expression

* Fix type errors relating to `layerId` in table suggestions

* Pass around tables for suggestions with associated layerIds

* fix tests in workspace panel

* fix editor_frame tests

* Fix xy tests, skip inapplicable tests
that will be implemented in a separate PR

* add some tests for multiple datasources and layers

* Suggest that split series comes before X axis in XY chart

* Get datatable suggestion working

* Adjust how xy axis labels are computed

* Datasource suggestions should handle layers and have tests

* Fix linting in XY chart and remove commented code

* Update snapshots from earlier change

* Fix linting errors

* More cleanup

* Remove commented code

* Test the multi-column editor

* XY Visualization does not need to track datasourceId

* Fix various comments

* Remove unused xy prop
Add datasource header to datatable config

* Use operation labels for XY chart

* Adding and removing layers is reflected in the datasource

* rewrote datasource state init

* clean up editor_frame frame api implementation

* clean up editor frame

* [Lens] Embeddable (#41361)

* [lens] Move XY chart config into popover and fix layering (#41927)

* [lens] Move XY chart config into popover and fix layering

* Fix tests

* Update style

* Change wrapping of layer settings popover

* [Lens] Fix bugs in date_histogram and filter ratio (#42046)

* [Lens] Performance improvements (#41784)

* fix type error

* switch default size of terms operation to 3 (#42334)

* [lens] Improve suggestions for split series (#42052)

* [lens] Add chart switcher (#42093)

* solve merge conflicts

* fix test case

* [Lens] Allow only current visualization on field drop in workspace (#42344)

* [Lens] Remove indexpattern id on column (#42429)

* [lens] Implement app-level filtering and time picker (#42031)

* [lens] Implement app-level filtering and time picker

* More integration with filter bar

* Clean up test code and type errors

* Add frame level tests for syncing with app

* Add test coverage for app logic

* Simplify state management from app down

* Fix import errors

* Clarify whether properties are ids or titles for index pattern

* pass new saved object by ref

* add dirty state checking

* Fix tests

* [Lens] Add some tests around document handling in dimension panel (#42670)

* [Lens] Terms operation boolean support (#42817)

* [lens] Minor UX/UI improvements in Lens (#42852)

* Make dimension popover toggle when clicking button

* Without suggestions hide suggestion panel

* Add missing translations (#42921)

* [Lens] Config panel design (#42980)

* Fix up design of config panel

Does not include config popover

* Remove a couple of non-null assertions (#43013)

* Remove a couple of non-null assertions

* Remove orphaned import

* [Lens] Switch indexpattern manually (#42599)

* [Lens] Update frame to put suggestions at the bottom (#42997)

* fix type errors

* switch indexpattern on layer if there is only a single empty one (#43079)

* [Lens] Suggest reduced versions of current data table (#42537)

* [Lens] Field formatter support (#38874)

* Fix bugs

* [Lens] Add bucket nesting editor to indexpattern (#42869)

* [Lens] Remove unnecessary fields and indexing from mappings (#43285)

* [Lens] Xy scale type (#42142)

* [lens] Allow updater function to be used for updating state (#43373)

* [Lens] Lens metric visualization (#39364)

* Fix axis rotation (#43792)

* [Lens] Auto date histogram (#43775)

* Add auto date histogram

* Improve documentation and cleanup

* Add tests

* Change test name

* [Lens] Fix query bar integration (#43865)

* [Lens] Clean up operations code (#43784)

* [Lens] Functional tests (#44279)

Foundational layer for lens functional tests. Lens-specific page objects are not in this PR.

* [Lens] Add Lens visualizations to Visualize list (#43398)

* [Lens] Suggestion improvements (#43688)

* [lens] Calculate existence of fields in datasource (#44422)

* [lens] Calculate existence of fields in datasource

* Fix route registration

* Add page object and use existence in functional test

* Simplify layout of filters for index pattern

* Respond to review feedback

* Update class names

* Use new URL constant

* Fix usage of base path

* Fix lint errors

* [Lens ] Preview metric (#43755)

* format filter ratio as percentage (#44625)

* [Lens] Remove datasource suggestion id (#44495)

* [Lens] Make breadcrumbs look and feel like Visualize (#44258)

* [lens] Fix breakage from app-arch movements (#44720)

* [lens] Fix type error in test from merge

* [lens] Fix registration of embeddable (#45171)

* [Lens] Functional tests (#44814)

Basic functional tests for Lens, by no means comprehensive. This is more of a smokescreen test of some normal use cases.

* [lens] Add Lens to CODEOWNERS (#45296)

* [lens] Fix visualization alias registration

* [lens] Fix usage of EUI after typescript upgrade (#45404)

* [lens] Fix usage of EUI after typescript upgrade

* Use local fix instead of workaround

* [lens] Fix usage of expressions plugin (#45544)

* [lens] Fix usage of expressions plugin

* Use updated exports from #45538

* Fix imports and mocha tests

* Use relative instead of absolute path to fix tests

* [lens] More cleanup from QueryBar changes in master (#45687)

* [lens] Fix build and use new platform from entry points (#45834)

* [lens] Fix build and use new platform from entry points

* Fix params for existence route
2019-09-17 14:57:53 -04:00
Aleh Zasypkin 9d69b72a5f
Move base feature controls functionality from XPack Main plugin to a dedicated XPack Features plugin (#44664) 2019-09-09 19:15:58 +02:00
Vadim Dalecky 748afc11c6
Embeddables React (#43272)
* docs: ✏️ add demo command

* feat: 🎸 add openFlyout method to kibana-react

* chore: 🤖 revert master changes

* refactor: 💡 update core types and use mocks provided by NP

* chore: 🤖 remove old mock

* feat: 🎸 export react-use context, use useUiSetting in infra

* feat: 🎸 create React wrapper for Overlays service

* chore: 🤖 App Architecture team as kibana-react code owners

* feat: 🎸 improve kibana-react context interface

* feat: 🎸 check for uiSettings service in useSetting hook

* feat: 🎸 improve interface of KibanaReactOverlays

* feat: 🎸 improve Dashboard container options

* test: 💍 adapt tests to use context

* fix: 🐛 fix TypeScript types

* feat: 🎸 add notifications service wrapper

* feat: 🎸 add withKibana HOC

* feat: 🎸 add <UseKibana> render prop

* refactor: 💡 use React context in DashboardGrid

* test: 💍 use context in dashboard_grid tests

* test: 💍 add tests for createReactOverlays()

* test: 💍 add tests for React notification service wrapper

* docs: ✏️ add kibana-react documentation

* docs: ✏️ fixes to README

* docs: ✏️ add overlays and notifications context examples

* refactor: 💡 rename useUiSetting to useUiSetting$

* feat: 🎸 add useUiSetting hook

* docs: ✏️ remove un-necessary HOC usage

* feat: 🎸 add <KibanaContextProvider> component

* refactor: 💡 rename createContext to createKibanaReactContext

* feat: 🎸 make notifications and overlays always available

* refactor: 💡 use <KibanaContextProvider> component in infra

* test: 💍 fix dashboard embeddable tests

* refactor: 💡 remove context creation from Dashboard factory

* fix: 🐛 improve error messages

* fix: 🐛 fix TypeScript type check
2019-08-23 17:41:22 +02:00
CJ Cenizal d5ce67f5ed Disable flaky request lib tests. Add es_ui_shared plugin to CODEOWNERS. 2019-08-04 12:36:53 -07:00
Brandon Kobel a8080b88c9
@elastic/kibana-platform now owns the config/kibana.yml file (#42405) 2019-07-31 15:31:39 -07:00
Ahmad Bamieh 9d7cf53eba
[telemetry] Analytics Package (#41113)
* kbn-analytics

* kbn-analytics

* expose provider

* add logger

* performance and stats reporters

* finalize ui stats metric

* functional tests

* remove readme file for now

* update readme

* add types file into to tsconfigs

* Update packages/kbn-analytics/src/report.ts

Co-Authored-By: Josh Dover <me@joshdover.com>

* fix typechecks

* use enum instead of strings for metric types

* getUiStatsReporter -> createUiStatsReporter

* fix special typo in README

* remove unused stop method

* fix tests

* default debug to false

* use chrome.getInjected

* add METRIC_TYPE to jest module mocks

* mock create fn

* handle enabled:false

* init ui_metric in test setup env

* regenerator runtime

* transform-regenerator

* update lock file

* update babel configs

* runtime dep

* add regenerator

* babel configs

* use env-preset

* merge conflicts

* fix workpad telemetry tests

* regeneratorRuntime attempt to fix number 30000

* env targets

* remove module config

* try again

* try without regenerator

* use kbn/babel-preset/webpack_preset only

* runtime

* just use typescript

* update tsconfig

* Caches trackers by app value for infra useTrackMetric hook
2019-07-23 15:46:56 +03:00
Aleh Zasypkin 6848a985c6
Add ownership of new platform security plugin to security team. (#41748) 2019-07-23 13:40:33 +02:00
Mike Côté 560e672083
Add ownership of task manager to stack services team (#41457) 2019-07-18 10:32:57 -04:00
Jason Rhodes 580c94676e
Adds stack-services example entries to CODEOWNERS (#41241) 2019-07-16 20:56:14 -04:00
Vadim Dalecky f18e7439d9
「AppArch」Interpreter 👉 New Platform (#39329)
* feat: 🎸 set-up NP data plugin

* refactor: 💡 move interpreter functions registry to NP

* refactor: 💡 move interpreter renderer registry to NP plugin

* refactor: 💡 move interpreter typesRegistry to NP

* refactor: 💡 move interpreter types to NP

* chore: 🤖 import typeRegistry from NP and change TS type folder

* refactor: 💡 move interpreter expression types to NP

* refactor: 💡 move rest of interpreter common folder to NP plugin

* fix: 🐛 fix TypeScript errors

* test: 💍 improve typings and test mocks

* refactor: 💡 make Interpreter internal registry impl private

* test: 💍 inline NP backdoor mock creation in test suites

* chore: 🤖 change @kbn/interpreter import paths to try fix errors

* fix: 🐛 improve core Plugin interfaces

* feat: 🎸 add stop() lifecycle to NP data plugins

* refactor: 💡 move interpreter into expressions service data NP

* refactor: 💡 inline Registry @kbn/interpreter class

* refactor: 💡 remove dependency on @kbn/interpreter in data pub

* refactor: 💡 move interpreter common dir into expressions dir

* fix: 🐛 use TS types in kibana_context

* feat: 🎸 add types suggested in PR review

* feat: 🎸 add semantic interpreter registration functions

* refactor: 💡 use require for all @kbn/interpreter imports

* test: 💍 add Karma test mocks, thx @spalger 🙏

* docs: ✏️ update Core docs

* test: 💍 add Sinon stubs for registries

* chore: 🤖 change import syntax in hopes CI will work

* chore: 🤖 set App Architecture as owners of data plugin

* docs: ✏️ add README

* chore: 🤖 change import in hopes to fix optimizer

* fix: 🐛 make stop() plugin life-cycle optional

* docs: ✏️ update Core API docs

* test: 💍 remove unnecessary Jest mock

* chore: 🤖 don't import from deeply inside a plugin

* refactor: 💡 try different interpreter import

* fix: 🐛 fix Karma mocking

* fix: 🐛 fix TypeScript type imports

* test: 💍 fix broken test
2019-07-02 09:07:07 +02:00
Court Ewing 2d171c92f5 Fix path references into and out of x-pack/legacy 2019-06-20 13:34:48 -04:00
Vadim Dalecky 0c34b0d6d3
State containers 📦 (#38758)
* feat: 🎸 add initial createStore() implementation

* test: 💍 test observable $state interface

* style: 💄 apply prettier

* chore: 🤖 upgrade react-redux lib

* refactor: 💡 rename $state -> state$

* feat: 🎸 add initial React context and connect implementation

* feat: 🎸 improve connect()() HOC TypeScript typings

* feat: 🎸 export store methods

* feat: 🎸 implement store mutations

* chore: 🤖 add TODO list

* refactor: 💡 rename .mutations -> .createMutations

* feat: 🎸 use name Redux actions for mutations

* fix: 🐛 fix TypeScript errors

* feat: 🎸 store mutations inside store object

* style: 💄 run Prettier on test file

* refactor: 💡 rename mutation -> mutator

* chore: 🤖 set :AppArch team as code owners of kibana_utils

* chore: 🤖 update x-pack package.json react-redux dependencies

* chore: 🤖 run yarn kbn bootstrap

* chore: 🤖 revert back react-redux package upgrade

* refactor: 💡 rename remaining mutation -> mutator

* feat: 🎸 implement first set of React hooks

* chore: 🤖 revert back react-redux upgrade

* refactor: 💡 use useState() inside <Consumer>

* feat: 🎸 implement useSelector() React hook

* docs: ✏️ add store creation docs

* docs: ✏️ add mutators documentation

* docs: ✏️ add getter and Redux docs

* docs: ✏️ add react reference

* docs: ✏️ typo

* docs: typo

Co-Authored-By: Stacey Gammon <gammon@elastic.co>

* docs: typo

Co-Authored-By: Stacey Gammon <gammon@elastic.co>

* docs: remove private link
2019-06-14 16:00:32 +02:00
Spencer 0f5bd4dfcc
Implement renovate config generator (#38369)
* reformat renovate.json5 with json5 cli, add header

* add scripts for rengerating renovate config from ts files

* regenerate renovate config

* verify renovate.json5 is up to date in CI

* add description to the build_renovate_config script

* auto-group types packages

* fix typo

* mention version pinning in doc block

* support disabling renovate for package groups

* scan all package paths for @-types deps

* regenerate renovate config

* regenerate renovate config

* name scoped package regexp

* move some of the new logic out of package_groups.ts

* flatMap in one pass
2019-06-07 13:30:59 -07:00
Rudolf Meijering ea9721ad13
[Core] Rewrite saved objects in typescript (#36829)
* Convert simple files to TS

* Fix jest tests

* Rename saved_objects_client{.js => .ts}

* WIP saved_objects_client

* saved_objects repository{.js => .ts}

* includedFields support string[] for type paramater

* Repository/saved_objects_client -> TS

* Fix tests and dependencies

* Fix saved objects type errors and simplify

* saved_objects/index saved_objects/service/index -> ts

* Fix saved objects export test after switching to typed mock

* Workaround type error

* Revert "Workaround type error"

This reverts commit de3252267eb2e6bf56a5584d271b55a7afdc1c53.

* Correctly type Server.savedObjects.SaveObjectsClient constructor

* saved_objects/service/lib/index.{js -> ts}

* saved_objects/service/lib/scoped_client_provider{js -> ts}

* Typescriptify scoped_client_provider

* Fix x-pack jest imports

* Add lodash/internal/toPath typings to xpath

* Introduce SavedObjectsClientContract

We need a way to specify that injected dependencies should adhere to the
SavedObjectsClient "contract". We can't use the SavedObjectsClient class
itself since it contains the private _repository property which in TS is
included in the type signature of a class.

* Cleanup and simplify types

* Fix repository#delete should return {}

* Add SavedObjects repository test for uncovered bug

Test for a bug in our previous js implementation that can lead to data
corruption and data loss.

If a bulkGet request is made where one of the objects to fetch is of a type
that isn't allowed, the returned result will include documents which have the
incorrect id and type assigned. E.g. the data of an object with id '1' is
returned with id '2'. Saving '2' will incorrectly override it's data with that
of the data of object '1'.

* SavedObject.updated_at: string and unify saved_object / serializer types

* Cleanup

* Address code review feedback

* Don't mock errors helpers in SavedObjectsClient Mock

* Address CR feedback

* CR Feedback #2

* Add kibana-platform as code owners of Saved Objects

* Better typings for SavedObjectsClient.errors

* Use unknown as default for generic type request paramater

* Bump @types/elasticsearch

* Fix types for isForbiddenError

* Bump x-pack @types/elasticsearch
2019-06-06 10:49:13 +02:00
Jason Rhodes b0fec9c3f3
Update infra codeowners team to new team name (#36661) 2019-05-20 06:46:02 -04:00
Jason Rhodes 6377605f07
Adds infra plugin to CODEOWNERS (#36634) 2019-05-17 13:18:01 -04:00
Jen Huang e2222ce7c3
Snapshot Repositories UI (#34407)
* [SR] Snapshot and restore plugin boilerplate (#32276)

* Initial plugin set up

* Set up client shell

* Add initial repository list routes

* Fix merge issues and some typings

* Decouple server from plugin.ts files, tighten up typings

* Use exported constant for required license

* Translate plugin name, more typings

* Fix more types, move list components under /home

* Remove unused var

* Change scss prefix

* Uncouple unmount logic from routing shim, and some other PR feedback

* [SR] Repository list and details UI (#33367)

* Initial pass at repositories list UI

* Add detail panel for file system repositories, and a generic detail panel with json settings view

* Add detail components for other types

* Add detail panel footer, rename `useStateValue` to `useAppState`

* Fix detail panel footer

* Fix unused vars

* PR feedback

* PR feedback

* [SR] Refactor proposal (#33690)

* Move app dependencies to its own context provider

* Add index.ts barrel file for common types

* Move Enums to constants.ts file

* Refactor function component using `React.FunctionComponent<Props>`

* Refactor service folder structure

* Fix type import

* Move REPOSITORY_DOC_PATHS from common to public constants

* Move AppCore and AppPlugins interfaces back to shim and re-export them from app types

* [SR] Create and edit repositories UI (#34020)

* Add routing and placeholder form

* Fix typings

* Set up edit repository route, and basic form UI

* Add typings for wrapCustomError, and copy extractCausedByChain from CCR wrapEsError

* Throw errors that are already boomified

* Create and edit for basic repository types (fs, url, source)

* Add repository verification UI to table and details

* Create and edit for plugin repository types (hdfs, azure, s3, gcs)

* Fix linting

* Fix test

* Fix test

* Remove unused import

* Fix duplicate i18n key

* Fix details opening on cancel edit, remove unnecessary Fragments, definition file for some EUI components to x-pack, rename saveError

* Remove breaks

* Adjust add and edit repo routes so they don't conflict with list route

* Add repo plugin and types doc links to form

* Bootstrap documentation service

* Bootstrap text service and replace RepositoryTypeName component with it

* Bootstrap breadcrumb service and replace usages

* Bootstrap httpService, remove chrome and http from app dependencies(!)

* Add request creator and replace all instances of useRequest and sendRequest with it

* Fix typo

* Simplify update repository and update repository setting methods

* Adjust copy

* Lint

* Remove unused var

* Remove unused import

* [SR] Add API for retrieving snapshots. (#34598)

* [SR] Single and multiple repository delete (#34593)

* Add single/multi repository delete API and UI

* Address PR feedback

* [SR] Add SnapshotTable and SnapshotDetails. (#34837)

* Remove associations between multiple repositories with a single snapshot.
* Retrieve complete snapshot details in getAllHandler.
* Fix cleanup function bug in useRequest hook.
* Fix bug in useRequest which prevented old data from being cleared when subsequent requests returned errors.
* Add initialValue config option to useRequest.
* Add formatDate service to text module.

* [SR] Fix linting and add (de)serialization for repositories (#35031)

* Fix eslint issues and add (de)serialization for repositories

* Add comment about flattening settings

* [SR] Surface repository errors and index failures more prominently (#35042)

* Add links to repositories from Snapshot Table and Snapshot Details.
- Rename services/breadcrumbs to services/navigation and add linkToRepository function.
- Refactor home component to update active tab when URL was changed.
* Add warning callout to let user know when their repositories contain errors.
* Sort failures by shard and add test for snapshot serialization.
* Sort failures and indices.
* Add filter for filtering snapshots by their repository.
* Surface states with humanized text, icons, and tooltips where necessary.
* Fix pluralization of seconds.
* Surface failures tab even if there are none.
- Display a '-' for missing times and durations.
- Create DataPlaceholder component.

* [SR] Polish repositories UX (#35123)

* Refactor repository detail panel to load repository based directly on route param.
* Display repository detail panel while table is loading.
* Make 'Edit repository' table action a link instead of a button.
* Render disabled EuiSelect as a readonly EuiFieldText.
* Prepend HDFS URI with hdfs:// protocol.
* Present scheme options for Read-Only URL repository as a select.

* [SR] Add client-side validation to repository form and link to snapshots from details (#35238)

* Add client side repository form validation, extract `flatten` into common lib

* Add snapshot count to repository details and link to snapshot list

* Reset validation when changing repository type

* Fix snapshot list filter deep linking for repository names with slashes and spaces

* Fix imports

* PR feedback

* [SR] Design and copywriting fixes (#35591)

* Split repository form into two steps; move `clean_settings.ts` to server

* Default to snapshots tab, adjust snapshot empty prompt, add app description

* Add minimum timeout to list view requests to avoid flicker, use EuiEmptyPrompt for loading screen, add doc link to settings step

* Add information about snapshots to delete repository behavior, add doc link for source only toggle, add size notation help text

* Add main doc link

* Copywriting and i18n fixes, and add some common settings to third party repo types

* Add fields to third party repo detail panel

* More copywriting fixes

* Use spinner for duration and end time if snapshotting is still in progress

* Show all repository type options, mark missing plugins

* Revert "Show all repository type options, mark missing plugins"

This reverts commit e34ee47cec.

* Fix space

* [SR] Add permissions UI and Cloud-specific repository type UI branch (#35833)

* Add missing permissions UI and cloud-specific repository type UI branch

* Add ES UI as owners of /snapshot_restore directory

* Add no repository types callout for Cloud edge case

* Redirect invalid section param to repositories

* Add warning empty prompt if all repositories have errrors

* Replace repository cards with EuiCard

* Add snapshot doc link to repository error empty prompt

* Remove auto-verification from list and get routes, add separate verification route, add manual verification to repository detail panel

* Update copy and remove obsolete test

* Remove unused scss files

* Final changes to repository cards
2019-05-13 07:03:37 -07:00
Tiago Costa 2ff272c2f3
Update CODEOWNERS with the paths under kibana operations team supervision (#26374)
* feat(NA): update CODEOWNERS with the code under kibana operations team supervision.

* chore(NA): add suport_node_env to operations codeowners.

* refact(NA): change declaration order.
2019-05-09 23:43:58 +01:00
Aleh Zasypkin 2df3880ac7
Introduce Encrypted Saved Objects plugin (#34526) 2019-05-03 17:44:02 +02:00
Fuyao Zhao 81fa6dcf85
[Code] Add code owners (#35498) 2019-04-24 11:08:32 -07:00
Marco Vettorello 6025d16e0f
Add TSVB external contractors as code owners for TSVB dir (#34848) 2019-04-11 10:29:51 +02:00
Tim Roes 8b99d78937 Add platform team as core codeowner (#32904) 2019-03-11 12:21:36 -04:00
Court Ewing 2ce51a5be5 Update paths to ui, server, deprecation, plugin_discovery in src/legacy
This commit accompanies the four that precede it. Rather than squash
them altogether, the four previous commits all do nothing except move
files to help avoid conflicts.
2019-02-11 10:41:37 -05:00
Court Ewing 7a87f03ec7
Introduce content security policy (CSP) (#29545)
* csp: nonce and unsafe-eval for scripts

To kick things off, a rudimentary CSP implementation only allows
dynamically loading new JavaScript if it includes an associated nonce
that is generated on every load of the app.

A more sophisticated content security policy is necessary, particularly
one that bans eval for scripts, but one step at a time.

* img-src is not necessary if the goal is not to restrict

* configurable CSP owned by security team

* smoke test

* remove x-content-security-policy

* document csp.rules

* fix tsconfig for test

* switch integration test back to regular js

* stop looking for tsconfig in test

* grrr, linting errors not caught by precommit

* docs: people -> you for consistency sake

Co-Authored-By: epixa <court@epixa.com>
2019-02-01 17:11:38 -05:00
Walter Rafelsberger 910bebb38b
[ML] Add ml-ui team to CODEOWNERS. (#29810) 2019-02-01 12:18:12 +01:00
CJ Cenizal a22a5d00ff
Reorganize codeowners and define Elasticsearch UI ownership. (#28873) 2019-01-17 11:18:28 -08:00
Shaunak Kashyap a00163b6fe
Remove stack monitoring (#27163)
We're a super small team (1 UI developer) at the moment and don't want PRs to x-pack/monitoring code to require review from us. We haven't had issues with this approach until now and see no reason to change the policy just yet.
2018-12-13 14:47:21 -08:00
Joe Fleming 8a51814f9b
chore: add canvas to CODEOWNERS (#26376) 2018-11-29 09:27:31 -07:00
Matt Apperson 238e24a09c
Add Beats and stack monitoring to CODEOWNERS (#26413)
* Add Beats and stack monitoring to CODEOWNERS

* Update CODEOWNERS
2018-11-29 08:52:33 -05:00
Larry Gregory 4ccedeeacb
Assigns spaces plugin to the Kibana security team (#26348) 2018-11-28 12:55:05 -05:00
Søren Louv-Jansen 1f92c0c128
Add APM UI to codeowners (#25218) 2018-11-07 10:27:29 +01:00
dave.snider@gmail.com f99c8032f4
kibana design owns .scss files (#23889) 2018-11-06 15:24:21 -08:00
Larry Gregory 70f2eed4e9
introducing CODEOWNERS to Kibana (#22830) 2018-09-14 14:46:03 -04:00