Commit graph

118 commits

Author SHA1 Message Date
Joe Reuter 74b9ed6414
Move tsvb server to new platform (#55310) 2020-01-30 16:42:56 +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
Daniil Suleiman 7f63118d6b
Vis default editor plugin (#55612)
* Shim the default_editor

* Update paths in vis_default_editor

* Update paths in dependent plugins

* Update the dependent plugins

* Create an entry point

* Wrap the editor with kibana context

* Fix circular re-renders

* Update sub aggs mapping

* Move schemas and agg_groups to agg_types, update jest tests

* Use services from kibana context, other fixes

* Fix useEffect maximum update depth

* Create i18n namesapce for visDefaultEditor, rename translations

* Fix tests

* Resolve paths

* Remove ui/vis/vis_types

* Fix vis import

* Move editor_config_provider to ui/vis
2020-01-29 17:41:18 +03:00
Nick Partridge 05ed2d63b5
Charts plugin (combining ui/color_maps and EuiUtils) (#55469)
* Combine ui/color_maps and EuiUtils into new Charts plugin
* EuiUtils is now the theme service
* ui/color_maps is now the colorMaps service
* Fix all imports of each to pull from new Charts plugin
* Add theme methods to both setup and start contracts
* Move and jestify heatMapColors tests
* Convert remaining js files to ts
* Move vis/color to Charts plugin
* Update missed visTypeVislib naming
2020-01-28 08:13:56 -06:00
Joe Reuter 38fd963ed3
Timelion api migration (#53005) 2020-01-23 18:19:33 +01: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
Maryia Lapata 9e07a427c7
[Vis] Move Timelion Vis to vis_type_timelion (#52069)
* Deangularize timelion vis

* Refactoring

* Fix path

* Update timelion_controller.ts

* Remove unused deps

* Create vis_type_timelion

* Create ChartComponent

* Render chart in react

* Reactify timelion editor

* Change translation ids

* Use hooks

* Add @types/pegjs into renovate.json5

* Add validation, add hover suggestions

* Style fixes

* Change plugin setup, use kibana context

* Update

* Fix ticks

* Fix plotselected listener

* Fix plothover handler

* Add TS for options

* Update TS

* Restructuring

* Change plugin start

* Remove vis from timelion plugin

* Rename class

* Mock services

* Fix other comments

* Remove duplicate files

* Convert test to jest

* Remove kibana_services from timelion

* Delete visualize_app.ts.~LOCAL

* Refactoring

* Fix TS

* Refactoring, TS

* Import eui variables

* Import styling constants

* Move react components to vis_type_timelion

* Fix TS

* Move ui imports to legacy_imports.ts

* Move chain.peg to vis_type_timelion

* Fix path

* Use KibanaContext instead kibana_services.ts

* Refactoring

* Refactoring

* Add @types/flot

* Fix issue with hovered series color

* Update renovate.json5

* Pass timelionPanels as dependencies

* Move common folder to vis_type_timelion

* Move back tick_formatters.ts

* Rename styles file

* Refactoring

* Update _index.scss

* Move to_milliseconds to common

* Revert yaxes formatting

* Refactoring

* Refactoring

* Use Panel directly

* Refactoring of to_milliseconds.ts

Co-authored-by: Daniil Suleiman <31325372+sulemanof@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-17 15:30:26 +03:00
Nick Partridge bd7d5eb9f6
Shim vis_type_vislib (#53536)
* shim of kbn_vislib_vis_types (now vis_type_vislib)
* Move vislib into vis_type_vislib plugin
* Convert remaining plugin files to typescript
* Rename vis to vis_type_vislib
2020-01-15 15:48:19 -06:00
Joe Reuter c75cd9de19
NP Migration: Sample data (#52753) 2019-12-20 19:06:21 +01:00
Matthew Kime 2d36b216af
move management registry to new platform (#53020)
* move management registry to new platform
2019-12-17 13:00:54 -06:00
Stacey Gammon 7e67d1f86c
Embeddable examples on the platform and included with --run-examples flag (#52111)
* Add a new platform embeddable example plugin

* Remove extra hello world test impl.

* cleanup

* code review updates

* Change example to highlight and have parent filter out children

* Fix deep comparison of embeddable prop

* adjust help text
2019-12-16 15:03:46 -05:00
Liza Katz daac96cce7
Move top nav to NP (#52877)
* Move top nav to NP

* TopNavMenu karma mock

* Fixed lens test mocking
Removed old plugin code

* readme

* Code review fixes

* lint

* ts
2019-12-16 13:56:51 +00:00
Kukhyeon Heo 77f4f8c250 ui/management -> new platform (#45747)
Created management plugin under core_plugins.
Filled the plugin with 2 services: IndexPatternManagementService and SavedObjectsManagementService.
Removed related codes in ui/management and changed the paths.
2019-12-09 11:56:51 -06:00
Anton Dosov 881c836f94
[State Management] Move url state_hashing utils to kibana_utils (#52280)
Part of #44151,
Continuation of #51835,
Just moves existing state related url utils to kibana_utils plugin

Also fixes small regression introduced in #51835,
When sharing hashed url directly it should show error toast instead of full page fatal error
2019-12-06 13:20:29 +01:00
Alexey Antonov c415311221 Move @kbn/es-query into data plugin (#51014) 2019-11-26 13:28:04 -07:00
Joe Reuter 8af09faa72 Move local application service into Kibana platform (#50661)
* move local application service registry to new platform

* move dev tools app itself

* fix i18n

* make sure legacy dev tools are imported

* rename dev tools plugin
2019-11-22 19:04:48 +01:00
Joe Reuter 600862ef64
Migrate share registry (#50137) 2019-11-19 09:50:54 +01:00
Vadim Dalecky 26077633d6
Expressions fully migrated to the New Platform (#50294)
* chore: 🤖 use "expressions" namespace for expression translation

* feat: 🎸 move Expressions renderer to the New Platform

* feat: 🎸 move Expression executor to the New Platform

* feat: 🎸 move Expressions loader to the New Platform

* feat: 🎸 re-export Expressions setup, remove services.ts

* feat: 🎸 use "expressions" translation namespace

* feat: 🎸 move Expressions start contract to the New Platform

* feat: 🎸 move expressions mocks to the New Platform

* chore: 🤖 clean up NP-ready Expressions plugin

* feat: 🎸 remove Expressions shim, merge prev PV changes

* feat: 🎸 clean up expressions and interpreter plugins

* fix: 🐛 remember exression services

* fix: 🐛 load legacy Interpeter functions using uiExport

* perf: ️ run executer with always the latest functions

* fix: 🐛 load interpreter actions in Kibana, provide functions

* fix: 🐛 load Interpreter uiExport int Lens app

* fix: 🐛 load Interpeter uiExports int Canvas

* refactor: 💡 move esaggs function to data plugin Search service

* refactor: 💡 move visualization registrants to Visualizations pl

* test: 💍 fix Lens Jest test mocks

* fix: 🐛 correct translations for moved registrants

* chore: 🤖 address PR comments

* fix: 🐛 load Expressions CSS, nuke Expressions legacy plugin

* fix: 🐛 stop leaking CSS classes between Expressiosn and Lens

* chore: 🤖 remove expression types from client-side use /common

* chore: 🤖 address review comments

* fix: 🐛 load interpreter ui-exports in dashboard_viewer

* Have ExpressionRenderer accept className prop.

* Fix static positioning class targets
2019-11-18 16:26:13 -08:00
Yuliia Naumenko a50dbefb62 [Newsfeed] UI plugin for Kibana (#49579)
* Added base folder structure for Newsfeed plugin

* Added base folders for lib and component

* Added newsfeed button to navigation controls on the right side

* add getApi() to return api data observable (#49581)

* Added flyout base body and provided EuiHeaderAlert component inside the newsfeed plugin

* Moved newsfeed plugin to OSS and added for the styles purpose new folder for legacy plugin 'newsfeed' with the same id to support this

* Added subscribe on fetch newsfeed change

* Add NewsfeedApiDriver class (#49710)

* add NewsfeedApiDriver class

* fix xpack prefix

* add corner case handling

* Added data binding to the ui

* added EuiHeaderAlert style overrides (#49739)

* Fixed due to comments on PR

* add missing fields to NewsfeedItem and FetchResult

* fix templating of service url

* gracefully handle temporary request failure

* Mapped missing fields for data and badge

* Fixed typos issues

* integrate i18n.getLocale()

* allow service url root to be changed in dev mode

* replace a lot of consts with config

* fix flyout height (#49809)

* Add "error" field to FetchResult: Error | null

* simplify fetch error handling

* Do not store hash for items that are filtered out

* add expireOn in case it is useful to UI

* always use staging url for dev config

* unit test for newsfeed api driver

* simplify modelItems

* Fixed eslint errors

* Fixed label translations

* Add unit test for concatenating the stored hashes with the new

* add newsfeed to i18n.json

* Fixed expression error

* --wip-- [skip ci]

* fix parse error

* fix test

* test(newsfeed): Added testing endpoint which simulates the Elastic Newsfeed for consumption in functional tests

* add tests for getApi()

* add tests for getApi

* Added no news page

* fix fetch not happening after page refresh with sessionStorage primed

* test(newsfeed): Added testing endpoint which simulates the Elastic Newsfeed for consumption in functional tests

* Added loading screen

* Small fixes due to comments

* Fixed issue with stop fetching news on error catch

* test(newsfeed): Configure FTS to point newsfeed to the simulated newsfeed endpoit

* Fixed browser error message: Invariant Violation: [React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.

* Fixed typo issue in label name

* polish the code changes

* Add simple jest/enzyme tests for the components

* honor utc format

* Filter pre-published items

* Fall back to en

* retry tests

* comment clarfication

* Setup newsfeed service fixture from test/common/config

* Added base functional tests for newsfeed functionality

* valid urlroot is for prod

* add documentation for the supported enabled setting

* more urlRoot

* --wip-- [skip ci]

* add the before for fn

* add ui_capabilties test

* update jest snapshot

* Fixed failing test

* finish newsfeed error functional test

* include ui_capability config

* error case testing in ci group 6

* refactor(newsfeed): moved newsfeed api call so that it is done before its use

* code polish

* enabled newsfeed_err test in CI
2019-11-13 08:48:34 -07:00
Vadim Dalecky 75f31130f0
Dashboard container (#49600)
* feat: 🎸 create dasboard embeddable NP plugin, move panel action

* refactor: 💡 pass in getFactories() fn to "replace" action

* refactor: 💡 move dashboard container actions to NP

* refactor: 💡 remove action files from dashboard container in LP

* refactor: 💡 move dashboard grid to NP plugin

* refactor: 💡 move Embeddable SASS to the NP

* refactor: 💡 move dashboard container panel to NP

* refactor: 💡 move dashboard container viewport to NP

* refactor: 💡 move dashboard constant to constants file

* refactor: 💡 move dashboard_continaer file to NP

* refactor: 💡 move dashboard_container_factory.tsx to NP

* chore: 🤖 disable injected React components

* feat: 🎸 fill in NP plugin

* feat: 🎸 move expand panel action to NP

* feat: 🎸 move replace action panel to NP

* feat: 🎸 move dashboard_contaienr to NP

* chore: 🤖 delete LP dasboard container plugin shim

* chore: 🤖 delete LP dashboard_embeddable_container plugin

* chore: 🤖 point translations to the NP plugin

* test: 💍 re-enable dashboard container tests

* chore: 🤖 fix TypeScript type errors

* chore: 🤖 fix more TypeScript tyeps

* test: 💍 fix import in .js test

* feat: 🎸 use <SavedObjectFinder> in dashboard container

* feat: 🎸 add full screen button to dashboard container

* fix: 🐛 execute Chrome hiding only once

* chore: 🤖 put back temporary type substitutions

While moving this plugin file-by-file those types were not available

* chore: 🤖 revert back kibana_react imports

* fix: 🐛 address review comments
2019-10-31 17:56:39 +01: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
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
Artyom Gospodarsky 931604d8ab
Remove extra Field Format wrappers and move into data plugin (#47948)
* Remove extra wrappers

* Move Field Format utils into data plugin

* Change i18n prefix

* Add a new alias to i18n

* Fix issues

* Make Numeral utils on their own

* Enhance Numeral interface

* Revert Percent changes

* Add common Numeral for Number, Bite, Percent

* Fix i18n for some utils

* Remove test duplicates

* Remove test duplicates

* Make a common import public path

* Reimport default color

* Change paths for server modules

* Change default color constant name
2019-10-21 18:14:55 +03:00
Ahmad Bamieh a42a767285
[Telemetry] Move to OSS (#45769)
* update paths and licenses

* localization collector in oss

* node-crypto typings in oss

* update telemetry i18n labels

* update translation rc files

* remove duplicate components in home for telemetry

* update tests

* finalize collection + move csp collector to oss

* self review

* use apm instead of beats

* xpack collection

* fix collection tests

* remove space specific settings

* mock npSetup and npStart

* disable banner in tests

* remove commented mock

* monitoring np telemetry fixes

* replace telemetryOptedIn in oss instead of xpack_main

* fix telemetry OptIn test
2019-10-16 10:24:20 +03:00
Vadim Dalecky f7b95eccdd
Embeddables 2 np (#46771)
* chore: 🤖 move embeddable_api to NP "embeddable" plugin

* fix: 🐛 fix TypeScript type check errors

* fix: 🐛 fix TypeScript and build errors

* test: 💍 fix Jest tests

* fix: 🐛 fix translations

* test: 💍 add Mocha mocks

* fix: 🐛 change import syntax from function test sample plugin

* fix: 🐛 revert canvas changes back and leave placeholders

* chore: 🤖 revert more changes

* chore: 🤖 revert more changes

* fix: 🐛 fix TypeScript type check errors

* fix: 🐛 fix functional test imports

* fix: 🐛 fix x-pack Jest test importa

* test: 💍 fix advanced_ui_actiosn import for tests
2019-09-27 15:15:19 +02:00
Stacey Gammon 01daabcb53
Move actions to NP (#44707)
* move actions to np

* fix jest and types
2019-09-18 21:50:34 -04:00
Liza Katz a45b0a7bbf
Split data and expression plugins (#45125)
* split data plugin from expression plugin

* added expressions as dependency to visualizations

* ui/agg import

* expressions start contract
replace __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED with __LEGACY

* Rename contract

* vis deps

* Fix build pipeline mocks

* Added expressions plugin to karma mock

* update imports

* export types from common

* Restore types.ts

* Remove unused expressions plugin server code
2019-09-12 15:57:58 +03:00
Alexey Antonov 5887526723 [TSVB] (Step 2) Shim new platform - renaming tsvb -> vis_type_timeseries (#44981) 2019-09-09 17:43:05 +03:00
Jen Huang 6f402b7382
[SR] SLM create and edit policies (#43390)
* add buttons and links to create/edit policy

* set up add policy form

* start create policy form, including loading/error states and redirect for repository select field. add inline option to SectionLoading. add actions prop to SectionError

* add snapshot name field

* Change page title upon app navigation, improve breadcrumbs

* Add on cancel to policy form, reorder fields

* Add simple cron field

* First pass at create/edit policy functionality

* Adjust permissions for SLM tab

* Adjust no snapshots prompt based on if policies exist or not

* Add selectable indices to policy form

* Move cron editor from rollup jobs to ES UI shared folder

* Used shared cron editor for slm policy create/edit

* Adjust copies; add duplicate schedule warning callout

* Surface in progress information

* Fix doc link for 7.x

* Fix rollup tests

* Copy edits from review

* Add ES endpoint to request review

* Remove unused imports

* Fix i18n by cleaning up typo'd text

* Remove unused import

* Fix permissions and i18n

* Revert change to Logistics copy

* Fix bugs and PR feedback

* Add cancel button to form and add comment for list

* Adjust timeout comment

* Fix bug with list of indices in detail panel when clicking through table

* Add comment about EUI bug
2019-08-27 14:25:48 -07:00
Vadim Dalecky 85d4147cfd
exit_full_screen_button 👉 New Platform (#43414)
* refactor: 💡 move ExitFullScreenButtonUi to src/plugins

* refactor: 💡 move ExitFullScreenButtonUi to src/plugins

* refactor: 💡 use <ExitFullScreenButton> button from src/plugins

* test: 💍 fix exit_full_screen_button tests

* refactor: 💡 import _index.scss from main SCSS file

* feat: 🎸 port translations to a NP plugin

* test: 💍 update Jest snapshot
2019-08-23 21:51:25 +02:00
Alexey Antonov b7f980a3fa
[Tag Cloud] (Step 2) Shim new platform - renaming tagcloud-> vis_type_tagcloud (#42589) 2019-08-06 11:29:10 +03:00
Alexey Antonov 872b56d61e
[Metric Vis] (Step 2) Shim new platform - renaming metric_vis -> vis_type_metric (#42590) 2019-08-06 11:28:08 +03:00
Vadim Dalecky 39b233a24d
Inspector 👉 New Platform (#42164)
* refactor: 💡 remove SASS and clean up InspectorView component

* refactor: 💡 clean up inspector, convert .js -> .ts

* feat: 🎸 add Inspector NP plugin boilerplate

* feat: 🎸 move view registry to NP, move types, add registerView

* docs: ✏️ move inspector README to NP plugin

* refactor: 💡 move ui/inspector/ui to NP

* refactor: 💡 move Inspector adapters to NP

* refactor: 💡 move Inspector.isAvailable to New Platform

* refactor: 💡 move Inspector.open to New Platform plugin

* test: 💍 move Inspector tests to NP plugin

* chore: 🤖 fix imports

* feat: 🎸 update translations

* test: 💍 fix failing translation snapshot

* test: 💍 fix yarn test:browser tests

* Update src/legacy/ui/public/inspector/build_tabular_inspector_data.ts

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

* [ML] [Job wizards] switching to new kibana context provider

* fix: 🐛 specify translation path directly to the plugin

* docs: ✏️ add comment about Webpack config fix

* Update src/legacy/ui/public/inspector/build_tabular_inspector_data.ts

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

* Update src/legacy/ui/public/inspector/build_tabular_inspector_data.ts

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

* feat: 🎸 improve types as per review

* fix: 🐛 remove <InspectorView> comp and fix view layouts

* test: 💍 improve mocks
2019-08-02 17:00:35 +02:00
Alexey Antonov 9dbb00e9a2
[Table Visualization] (Step 2) Shim new platform - renaming table_vis -> vis_type_table (#41872)
* [Table Visualization] (Step 2) Shim new platform - renaming table_vis -> vis_type_table

* fix PR comment
2019-07-26 23:01:29 +03:00
Liza Katz 623b70d511
Clean up top nav \ search bar \ query bar directives (#41636)
* Move timepicker (to be deprecated) into old kbn_top_nav

* Deleted search-bar and query-bar directives!

* moved search bar to kibana_react (it's a generic react component, not a service)

* translations

* Moved superDatePicker directive to kbn_top_nav (to be deprecated)
Deleted unused react_component directives call-out and tool-bar-search-box

* TS test fix

* Delete relative options
2019-07-23 15:31:09 +03:00
Alexey Antonov 2a8ddb9603
[Vega] (Step 2) Shim new platform - renaming vega -> vis_type_vega (#41565) 2019-07-22 10:55:27 +03:00
Ahmad Bamieh 81153c2a22
[i18n] .i18nrc file as the source of truth and enhance tooling (#39774)
* scan node_modules/@kbn directory for i18n

* remove es-lint-disable-next line

* update paths

* look inside .i18nrc.json instead of traversing files

* split .i18nrc file and enhance i18n tooling

* checkout master kibana config

* include x-pack/.i18nrc.json file

* remove unused import

* fix i18n_integrate

* fix i18n_integrate

* code review changes

* code review changes

* try using scanDir

* revert to using concat

* add config type

* code review fixes

* finalize PR

* revert kibana.yml
2019-07-21 15:06:03 +03:00
Peter Pisljar c78cfbb0f5
Markdown vis type np shim (#38767) 2019-07-02 17:40:24 +02:00
Ahmad Bamieh 8c8ef33d36
[i18n] move translations into NP plugin (#39177)
* new platform xpack plugin

* update env snapshot

* update all snapshots

* plugin service tests

* fix scripts/check_ts_projects.js

* update i18nrc

* run i18n_check
2019-06-26 11:29:11 +03:00
Stacey Gammon 1bcf7ceb8e
Dashboard embeddable container plugin (#38974)
* Dashboard embeddable plugin

* comment out duplicate scss styles

* review: conform closer to NP standards

* export/import from index file in folder
2019-06-25 08:43:28 -04:00
Mike Côté 98f7c75ff4
Introduce basic alerting and actions plugin (#37042)
* Create actions plugin (#35679)

* Basic alerting plugin with actions

* Remove relative imports

* Code cleanup

* Split service into 3 parts, change connector structure

* Ability to disable plugin, ability to get actions

* Add slack connector

* Add email connector

* Ability to validate params and connector options

* Remove connectorOptionsSecrets for now

* Fix plugin config validation

* Add tests for slack connector

* Default connectors register on plugin init, console renamed to log, slack to message_slack

* Add remaining API endpoints for action CRUD

* Add list connectors API

* Change actions CRUD APIs to be closer with saved objects structure

* WIP

* Fix broken tests

* Add encrypted attribute support

* Add params and connectorOptions for email

* WIP

* Remove action's ability to have custom ids

* Remove ts-ignore

* Fix broken test

* Remove default connectors from this branch

* Fix API integration tests to use fixture connector

* Rename connector terminology to action type

* Rename actionTypeOptions to actionTypeConfig

* Code cleanup

* Fix broken tests

* Rename alerting plugin to actions

* Some code cleanup and add API unit tests

* Change signature of action type service execute function

* Add some plugin api integration tests

* Fix type check failure

* Code cleanup

* Create an actions client instead of an action service

* Apply Bill's PR feedback

* Fix broken test

* Find function to have destructured params

* Add tests to ensure encrypted attributes are not returned

* Fix broken test

* Add tests for validation

* Ensure actions can be updated without re-passing the config

* Remove dead code

* Test cleanup

* Fix eslint issue

* Apply Peter's PR feedback

* Code cleanup and fix broken tests

* Apply Brandon's PR feedback

* Add namespace support

* Fix broken test

* Pass services to action executors (#37194)

* Pass services to action executors

* Fix tests

* Apply PR feedback

* Apply PR feedback pt2

* Cleanup actions plugin (#37250)

* Cleanup actions, move code from alerting plugin PR

* Rename service terminology to registry

* Use static encryption key for encrypted attributes plugin inside of tests

* Empty data after create test is done running

* Fix type checks

* Fix inconsistent naming

* add server log action for alerting (#37530)

adds the first "builtin" alertType for performing a `server.log()`

* Create alerting plugin (#37043)

* WIP

* Rename fire function and remove @ts-ignore in all places

* Change naming in alerting service

* Remove alert instance class for now, support interval configuration

* Cleanup TS

* Split alerting between registry and client

* Use saved object alongside task manager instance

* Add remaining alerting APIs

* Change create structure

* Rename some variables, change actionGroups structure

* Use handlebars for templating strings at fire time

* Fix params given to alert type execute function

* Use alert instance class

* Alert instances support meta attributes

* Move alert instances deserialization

* Change interval to be ms

* Rename actions es archive

* Fix tests to use encrypted esArchive for action record

* Add create alert test to demo end to end flow

* Fix type check issue

* Alerts to use references to action objects

* Only update task manager tasks after saved objects are fully updated

* Use scope in task manager

* Fix type check

* Use task manager to execute actions

* Convert ids into references and back

* Apply PR feedback

* Fix broken test

* Fix some bugs

* Fix test errors

* Alert interval to be previous runAt + interval instead of now + interval

* Add range support

* Remove extra line

* Cleanup

* Add alert_instance.test.ts

* Add alert_type_registry.test.ts

* Move tests around

* Create generic task manager mock

* Add note about saved objects client mock

* Create alert_type_registry.mock.ts

* Add alerts_client.test.ts

* Add create_alert_instance_factory.test.ts

* Add create_fire_handler.test.ts

* WIP

* Fix get_create_task_runner_function.test.ts and make test pass

* Make get_create_task_runner_function.test.ts 100% coverage

* Add unit tests for routes

* Move files around

* Created transform_action_params.ts

* Add get_next_run_at.ts

* Add comment explaining why we copy nextRunAt

* Re-use state within alert instance

* Finalize code coverage in unit tests

* Create base api integration tests

* Add a test that ensures end to end functionality of an alert

* Fix ui capabilities test

* Fix broken plugin api integration test

* Fix jest tests with new saved objects client

* Fix broken integration tests

* Change api integration test fixture to make more sense, add functions for future tests

* Move alerts integration testing into own file, prep to add more tests

* Add tests to ensure failed task instances get retried

* Add get_create_task_runner_function.test.ts for actions, create encrypted saved objects mock

* Add action validation tests

* Ensure action type validation occurs on update

* Test 400 on unregistered alert types

* Ensure alertTypeId can't be updated

* Add validation test for alert create / update

* Fix broken checks / tests

* Skip failing test for now

* Cleanup jest tests

* Ensure action objects can be updated while keeping encrypted attributes readable

* Remove partial update sopport, remove ability to change actionTypeId, require config

* Ensure actionTypeConfig is validated on create and update

* Add alertTypeParams validation support

* Fix failing tests

* Ensure alert cleanup errors don't replace the original error

* Pass callCluster as a service to alerts and actions

* Only pass log to alerts client

* Pass savedObjectsClient as a service to alerting and actions

* Fix failing tests

* Remove range support, provide when current and previous task got scheduled

* Ensure Joi validation happens before every execute

* Remove skipped tests, to be done in future PR

* Apply self feedback pt1

* Apply self feedback pt2

* Fix broken tests

* Apply PR feedback

* PR feedback pt1

* Apply security team PR feedback

* PR feedback pt1

* PR feedback pt2

* PR feedback pt3

* Fix broken tests

* Fix callCluster to have signature

* Revert f11a6aeb06

* PR feedback pt4

* Remove __jest__ folders

* PR feedback pt5

* Fix Joi from leaking secrets

* Fire instance actions in parallel instead of series

* Fix failing jest tests

* Accept core api changes

* Fix saved objects client mock

* PR feedback pt1

* Fix eslint issues

* Throw error when alert instance already fired (#39251)

* Throw error when alert instance already fired

* shouldFire doesn't need its own boolean value

* Actions & alerting getting started user guides (#39093)

* Initial user guides

* Cleanup

* Typos, example changes

* Switch to tables, use ordered list for usage

* Start docs around alert instances and templating

* Documentation changes

* Some adjustments

* Apply PR feedback

* Apply suggestions from code review

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

* PR feedback pt2

* Provide better examples for alert types

* Apply PR feedback

* Update README locations
2019-06-20 19:37:17 -04:00
Court Ewing 2d171c92f5 Fix path references into and out of x-pack/legacy 2019-06-20 13:34:48 -04:00
Aaron Caldwell b1911e9269
[File upload] New plugin: file upload (#36404)
* Add file upload x-pack plugin

* Clean up

* Remove unneeded cluster config

* Remove unneeded test

* First pass basic telemetry (not connected).

* Basic telemetry connected

* Review feedback

* Revise telemetry to use savedObjectRepository. Capture metrics on app and file types

* Lots of cleanup, consolidation of logic

* Clean up, reorg

* Update telem tests and telem functions

* Add back import data model

* Clean up and update telemetry tests

* Fix telemetry test issues and update corresponding code

* Up chunk limit to 30 MB

* Add file upload telemetry to saved objects management builder

* Missing space

* Add descriptive comments to dynamic keys in telemetry fields

* [Maps] [File upload] Geojson upload (#36410)

* Client side basics

* File added and default named correctly

* Connect transient layer removal to file import component

* Simplify transient layer removal

* Move file import ui over to new file upload plugin and make more generic

* Add post-processing option to file upload. Make component json-specific

* Add flag for source indexing

* Revise import layer workflow to be separate from add layer workflow

* Differentiate between normal sources and import sources. Add back layer add/next button

* Update indexing boolean in component after file upload & parse

* First pass rough indexing from maps working on specific use cases

* Update parsing logic to handle geojson formats

* Index pattern added following index creation

* Pass onsuccess callback to file_upload to add layer to maps app

* Handle mulltipolygon type in es geo utils

* Add functionality to make es layer permanent and switch to edit panel

* Add to index if exists or create new

* Make plugin API more intuitive. Set up to handle remove action

* Pass transient removal call through to file import

* Clean up layer viewing logic for temp and perm layers

* Remove change source from import screen

* Add option to provide mappings array and pass geo_point and geo_shape to array

* Add support for multiple mappings select and index naming

* Match style of import file button to add layer for now

* Remove duplicate case handling resulting from merge

* Move geo processing logic over to file upload plugin for reuse

* Remove old geo_shape formatting from geo_point code

* Set default index data type. Remove unneeded stringify request logic

* Check for custom processor object which contains function

* Move file picker to separate component

* Some cleaning. Add geojson clean & validate code

* Catch file parsing errors and notify user

* Disable index type if valid file not referenced

* Set error messaging on invalid index name used

* Add index pattern checking logic and error handling

* Dynamically populate geo index options

* Set index data type earlier in the workflow. Don't duplicate requests

* Pass back index ready status from plugin and connect to layer next button

* Increase max bytes to ~50MB

* Don't parse files over max size & warn user. Also, remove toasts and warn similarly to other components

* Uploaded file default label: 'fileToImport' -> 'Import File'

* Expand out feature properties for mapping

* Pass through telemetry data to plugin back-end

* Clean up indexing flow. Separate creation of index patterns. Add new index pattern create callbacks

* Pass back info for indexing failures but don't connect to UI yet

* Fix telemetry test issues and update corresponding code

# Conflicts:
#	x-pack/plugins/file_upload/server/telemetry/telemetry.test.ts

* Add file upload telemetry to saved objects management builder

* Missing space

* Add descriptive comments to dynamic keys in telemetry fields

* Divide up the import layer add workflow on the maps side and tweak to avoid layer color change

* Fix bug affecting file preview replacement not updating coordinate index type

* Remove index pattern. Organize effects. General clean up

* preIndexTransform -> transformDetails

* Update proptypes

* Cleaning, organizing

* Add index name guidelines. Show conditionally

* Add file size, type guidance. Filter on file size, not chunk size. Small tweaks to file/index tips

* Zoom to layer extent on preview of imported data

* Revert "Revise import layer workflow to be separate from add layer workflow"

This reverts commit 3b35f5371d.

* Handle import file determination to accomodate add layer flow. Update card wording

* Decompose addLayer component into smaller pieces. Add placeholder import progress component

* Dynamically change footer button text for context

* Move import card to top of sources

* Get basic progress tracking in place

* Allow second layer (indexed layer) to get removed. Reconnect file remove. Small UI tweaks

* Add link to management for further index mods

* Fix i18n failures

* Add file parsing progress indicator & text

* Reset importView on source reset

* Add dynamic chunking to handle fluctuating data sizes common to geo features

* Don't duplicate index request if request in flight

* Modify json upload and import to use JS classes & react class component state

* Transition remaining file_upload components over to class/component structure with state

* Move functions into index_settings class

* Review feedback

* Add fetch with timeout

* Split out import editor into separate component and clean up logic

* Clean up add layer panel/button title logic

* More cleanup

* Tweaks to success and error handling flow

* Handle success/error handling on add/view indexed data

* Jump to indexing complete on error. Handle nothing returned to client app

* Update name/location of source select css file

* Update import source card border color and icon

* Suggest name for index based upon file name

* Add validation to auto-suggested index name/pattern

* Use constants for geo_point and geo_shape in mappings

* Update geojson upload card/description

* Catch-all review feedback

* Fix internationalization syntax errors

* Review feedback

* Get index names and patterns only when needed

* Make addLayer async again to fix zoom to extent issue, waits on just the async syncDataForLayer function (which is async)

* Remove panel description as derived state and shift to function

* Remove geojson fit to extent for now

* Remove unused class selector

* Remove unneeded i18 wrapper for what's already passed in as an i18 element

* Revise import state to be handle via redux. Some json upload args changes

* Review feedback. Some cleanup and bug fixes

* Roll back store actions changes and layer_addpanel changes related to color change

* Follow scss file naming conventions for source_select

* Review feedback

* Restore clobbered layer_control view to master state. Add source_select css

* Update import to use plugin local indexPatternService, not maps'

* Review feedback, mostly i18n. Also add index to scss path

* i18n translation updates

* Assign error message to values rather than error object

* Update getMapColors to filter out transient layer

* Wrap Feature as FeatureCollection in Maps

* Add jest tests for geo processing functions. Add fixes for single feature handling

* i18n

* Review feedback. Test cleanup/fixes

* Update layer add panel footer logic to still show when source not selected

* Fix issue of not recognizing MultiPoint type. Remove throw logic for now

* Update telemetry with newly required placeholder function

* Prevent external modification of nested geojson objects

* i18n translation updates

* Revert "Fix issue of not recognizing MultiPoint type. Remove throw logic for now"

This reverts commit d692f913f8.

* Revert "Prevent external modification of nested geojson objects"

This reverts commit 0ea9fd3336.

* yarn.lock update

* [File upload] Remove dynamic fields from mappings, code and telemetry test (#38902)

* Remove dynamic fields from mappings, code and telemetry test

* Add file-upload-telemetry to spaces and es archiver test mappings

* Don't create telemetry saved object if none exists, create on first update instead

* Back out es archiver mappings update
2019-06-18 18:32:31 -06:00
Ahmad Bamieh b36aad350a
[i18n] extract untracked translations and prettier logging (#35171)
* extract untracked translations and prettier logging

* self code review

* Update src/dev/run_i18n_check.ts

Co-Authored-By: Bamieh <ahmadbamieh@gmail.com>

* updating listR

* run new i18n_check and fix errors

* kbnEmbeddables -> embeddableApi

* remove any type

* Update src/legacy/core_plugins/embeddable_api/public/panel/panel_header/panel_actions/add_panel/add_panel_flyout.tsx

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

* Update src/legacy/core_plugins/embeddable_api/public/panel/panel_header/panel_actions/add_panel/add_panel_action.tsx

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

* self code review fixes

* fix extract and integrate scripts

* ts-ignore js file
2019-06-17 16:03:12 +03:00
Ahmad Bamieh c308048f04
[Telemetry] move from xpack main (#35403)
* enabling xpack in new plugins

* move telemetry into separate new platform plugin

* remap constants

* resolved hacks issue

* remove extra dir

* js -> ts

* run linter

* fix tests

* reset kibana.yml

* reset kibana.yml

* ts types

* add telemetry translations to i18n

* use deprecated configs

* checkout config.yml

* fix test

* move telemetry from xpack_main in api_integration

* add telemetry apis

* hide banner

* remove routes/get_stats in favor of collectors/get_stats

* code review fixes
2019-06-12 13:53:48 +03:00
Catherine Liu cf3eab2753
[Canvas] Fixes i18n errors (#37565)
* Fixed i18n errors

* Added canvas path to .i18nrc.json
2019-05-30 17:32:11 -07:00
Ahmad Bamieh 6ab3ce3f70
[i18n] Add Japanese locale (#36940) 2019-05-23 03:15:57 +03: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
FrankHassanabad bb182c239a
Merge remote-tracking branch 'upstream/master' into feature-secops 2019-05-02 15:13:53 -06:00
Liza Katz b298b3ddec
Moved query bar into data plugin (#35390)
* moved query bar to data plugin
2019-04-30 15:57:12 +03:00