* chore(NA): upgrade oss to lodash4
chore(NA): migrate cli, cli_plugin, cli_keystore, dev, test_utils and apm src script to lodash4
chore(NA): missing file for cli plugin
chore(NA): add src core
chore(NA): es archiver and fixtures
chore(NA): try to fix functional test failure
chore(NA): migrate src/legacy entirely to lodash4 except src/legacy/core_plugins
chore(NA): move legacy core plugins to lodash4
chore(NA): upgrade optimize to lodash4
chore(NA): upgrade to lodash4 on advanced_settings, charts, console and dashboard
chore(NA): migrate to lodash4 on dev_tools, discover, embeddable, es_ui)shared, expressions, home plugins
chore(NA): upgrade data plugin to lodash4
chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4
chore(NA): missing data upgrades to lodash4
Revert "chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4"
This reverts commit 137055c5fed2fc52bb26547e0bc1ad2e3d4fe309.
Revert "Revert "chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4""
This reverts commit f7e73688782998513d9fb6d7e8f0765e9beb28d1.
Revert "chore(NA): missing data upgrades to lodash4"
This reverts commit 92b85bf947a89bfc70cc4052738a6b2128ffb076.
Revert "chore(NA): upgrade data plugin to lodash4"
This reverts commit 88fdb075ee1e26c4ac979b6681d8a2b002df74c6.
chore(NA): upgrade idx_pattern_mgt, input_control_vis, inspector, kbn_legacy, kbn_react, kbn_usage_collections, kbn_utils, management and maps_legacy to lodash4
chore(NA): map src plugin data to lodash3
chore(NA): missing lodash.clonedeep dep
chore(NA): change packages kbn-config-schema deps
chore(NA): update renovate config
chore(NA): upgrade vis_type plugins to lodash4
chore(NA): move vis_type_vislib to lodash3
chore(NA): update visualizations and visualize to lodash4
chore(NA): remove lodash 3 types from src and move test to lodash4
chore(NA): move home, usage_collection and management to lodash 3
Revert "chore(NA): move home, usage_collection and management to lodash 3"
This reverts commit f86e8585f02d21550746569af54215b076a79a3d.
chore(NA): move kibana_legacy, saved_objects saved_objects_management into lodash3
chore(NA): update x-pack test to mock lodash4
Revert "chore(NA): move kibana_legacy, saved_objects saved_objects_management into lodash3"
This reverts commit 2d10fe450533e1b36db21d99cfae3ce996a244e0.
* chore(NA): move x-pack and packages to lodash 4
* chore(NA): remove mention to lodash from main package.json
* chore(NA): remove helper alias for lodash4 and make it the default lodash
* chore(NA): fix last failing types in the repo
* chore(NA): fix public api
* chore(NA): fix types for agg_row.tsx
* chore(NA): fix increment of optimizer modules in the rollup plugin
* chore(NA): migrate `src/core/public/http/fetch.ts` (#5)
* omit undefined query props
* just remove merge usage
* fix types
* chore(NA): fixes for feedback from apm team
* chore(NA): recover old behaviour on apm LoadingIndeicatorContext.tsx
* chore(NA): fixes for feedback from watson
* Platform lodash4 tweaks (#6)
* chore(NA): fix types and behaviour on src/core/server/elasticsearch/errors.ts
* Canvas fixes for lodash upgrade
* [APM] Adds unit test for APM service maps transform (#7)
* Adds a snapshot unit test for getConnections and rearranges some code to make testing easier
* reverts `ArrayList` back to `String[]` in the painless script within `fetch_service_paths_from_trace_ids.ts`
* chore(NA): update yarn.lock
* chore(NA): remove any and use a real type for alerts task runner
Co-authored-by: Gidi Meir Morris <github@gidi.io>
* chore(NA): used named import for triggers_actions_ui file
* chore(NA): fix eslint
* chore(NA): fix types
* Delete most uptime lodash references.
* Simplify. Clean up types.
* [Uptime] Delete most uptime lodash references (#8)
* Delete most uptime lodash references.
* Simplify. Clean up types.
* chore(NA): add eslint rule to avoid using lodash3
* chore(NA): apply changes on feedback from es-ui team
* fix some types (#9)
* Clean up some expressions types.
* chore(NA): missing ts-expect-error statements
* Upgrade lodash 4 vislib (#11)
* replace lodash 3 with lodash 4 on vislib plugin
* Further changes
* further replacement of lodash3 to 4
* further work on upgrading to lodash 4
* final changes to update lodash
* chore(NA): upgrade data plugin to lodash4
chore(NA): upgrade data plugin public to lodash4
chore(NA): fix typecheck task
chore(NA): fix agg_config with hasIn
chore(NA): assign to assignIn and has to hasIn
chore(NA): upgrade data plugin server to lodash4
chore(NA): new signature for core api
fix(NA): match behaviour between lodash3 and lodash4 for set in search_source
* chore(NA): remove lodash3 completely from the repo
* chore(NA): fix x-pack/test/api_integration/apis/metrics_ui/snapshot.ts missing content
* chore(NA): fix lodash usage on apm
* chore(NA): fix typecheck for maps
* Patch lodash template (#12)
* Applying changes from https://github.com/elastic/kibana/pull/64985
* Using isIterateeCall, because it seems less brittle
* Also patching `lodash/template` and `lodash/fp/template`
* Reorganizing some files...
* Revising comment
* Ends up `_` is a function also... I hate JavaScript
Co-authored-by: Pierre Gayvallet <pierre.gayvallet@gmail.com>
Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Oliver Gupte <ogupte@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Gidi Meir Morris <github@gidi.io>
Co-authored-by: Justin Kambic <justin.kambic@elastic.co>
Co-authored-by: Stratoula Kalafateli <stratoula1@gmail.com>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
Co-authored-by: kobelb <brandon.kobel@elastic.co>
* [ui-shared-deps] include styled-components
* update snapshots caused by react-is upgrade
* fix jest snapshots
* declare react-is dep in x-pack too so it uses the right version
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Introduces migrations into Encrypted Saved Objects.
The two main changes here are:
1. The addition of a createMigration api on the EncryptedSavedObjectsPluginSetup.
2. A change in SavedObjects migration to ensure they don't block the event loop.
* initial plugin setup
* add smoke test
* fix license check
* refactor plugin setup
* Server-side create/update ingest pipelines (#62744)
* List pipelines (#62785)
* First iteration of ingest table
* Add action placeholders
* Refactor list and address PR feedback
Refactored the list into smaller pieces and assemble in main.tsx
Also addressed feedback on copy, removed unused notifications dep
* WiP on flyout
Showing name in title
* Add reload button
* Finish first version of flyout
* Slight update to copy
* `delete` -> `edit`
* Address PR feedback
Copy and a11y updates
* Add on failure JSON to flyout if it is available
* Add details json block file and remove ununsed import
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [Ingest pipelines] Create pipeline UI (#63017)
* First vertical slice of pipeline editor component
* Made a space for common parameters
* [Ingest pipelines] Edit pipeline page (#63522)
* First iteration of CRUD functionality working
* WiP on moving the pipeline editor to pipeline processor editor
* Finish refactor to work with passing state out
* Refactor and fix tests
* [Ingest pipelines] Polish details panel and empty list (#63926)
* Address some early feedback and use FormDataProvider
FormDataProvider gives a more declarative way to listen to form
state updates.
Also refactored the state reader mechanism.
* [Ingest pipelines] Delete pipeline (#63635)
* [Ingest Node Pipelines] Clone Pipeline (#64049)
* First iteration of clone functionality
Wired up for both the list table and the details flyout in the
list section.
* satisfy eslint
* Turn on sorting for the list table
* Clean up const declarations
* Address PR feedback
Sentence-casify and update some other copy.
* Mark edit and delete as primary actions in list table
* Handle URI encoded chars in pipeline name when cloning
* Update to using the more flexible controlled component pattern
To make this component and mappings editor more consistent, both
will expose a more traditional controlled component interface to
consumers.
In the current implementation this requires that consumers use
`useCallback` for `onUpdate` handlers to avoid an infinite
rendering cycle and to avoid staleness bugs in their `onUpdate`
handlers they need to think about what might make the handler
stale.
This approach comes with the benefits and flexibility of
controlled components at the cost of slightly more complex
consumption of the components.
In future, we can explore adding the uncontrolled component
interface too so that consumers have the option to more simply
render and pull data out only when needed
* Handle sub-form validity
The pipelines processor editor not emits overall validity to
consumers
* Fix Jest test
* Refactor some names
prepareDataOut -> serialize
prepareDataIn -> deserialize
EditorProcessor -> ProcessorInternal
* Mark as private
* Major WiP
Started working on the drag-and-drop-tree and updated some
typings stuff
* [Ingest node pipelines] Privileges (#63850)
* Create privileges check for ingest pipelines app
Also moved the public side logic for checking and rendering
privilege related messages to es_ui_shared/public following the
new __packages_do_not_import__ convention.
* Add ,
* Fix import paths
* Address PR feedback
Fix i18n strings (remove reference to snapshot and restore) and
fix copy referencing snapshot and restore - all copy-pasta errors.
Also remove unused field from missing privileges object.
* Fix issue from resolving merge conflicts
* Add missing app privilege
* Use non-deprecated privilige name
* First iteration of drag and drop tree on feature parity
* First steps toward add on failure handler
Updated reducer logic to create the next copy value using immer.
* First iteration of nested tree with add on failure working
* Refactor and some UI layout updates
- Remove the "id" field on processors for now
- Implement the nested remove and update functionality again
* Remove immer (not call stack safe)
Refac to remove immer and reimplemented the immutable set and
get functions.
* [Ingest Node Pipelines] More lenient treatment of on-failure value (#64411)
* Move file to components folder
* [Ingest pipelines] Simulate pipeline (#64223)
* Updated tree rendering
- turn off dropzones for children
- fixed up some padding and margins
- fixed integration with pipeline_form.tsx
The current implementation still has a lot of jank stemming from
the UX with DnD. Unfortunately the nesting has opened a number
of issues here.
* [Ingest Node Pipelines] Show flyout after editing or creating a pipeline (#64409)
* Show flyout after editing or creating a pipeline
* JSX comment
* Show not found flyout
Copied from CCR
* update not found flyout and fix behavior when viewing details from table
* Reset pipeline name in URI when closing flyout
* Remove encodeURI
Already using encodingURIComponent for unsafe string.
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
* Clarification of terms
- addProcessor -> addTopLevelProcessor (same in editor modes)
- Expanded comment on ProcessorSelector
* Implement move between lists functionality
Added tests to the reducer for moving in and out of a recusrsive
structure.
* fix TS
* Prevent nesting a parent inside of its own child
* Add comment
* [Ingest pipelines] Cleanup (#64794)
* address review feedback
* remove unused import
* Big refactor to tree rendering structure
DnD tree now converts the nested tree to a flat one and only
consists of _1_ droppable area with a flat array of draggables
that can be combined.
Using the existing logic in the reducer combined with translating
the flat structure changes to a format the nested reducer can
understand looks like a really promising avenue.
There still seems to be a bug with a longer list where items do
not interact properly.
* Remove unused component
* A number of NB changes
- Fixed a subtle serialisation bug with on_failure in options
- Fixed a performance bug by using useRef in pipeline form
- Memoized the drag and drop tree
- Removed use of "isValid" from form lib... I think this should
be removed entirely.
* fix bad conflict resolution
* Implemented a slightly better destination resolution algo.
Also added tests.
* Fix subtle staleness bug, whitelist keys for setValue
* NB styling fix!!
Due to a parent's setting of overflow: hidden the drag and drop
tree had a dead zone that would equal the page overflow limit,
unsetting on the component itself (overflow: auto) relaxes this
limitation.
* Fix stale delete bug too
* Update naming of editor modes and update comments
* Use field types combo box
* Add delete confirmation modal
* Refactor delete modal component file name
* Better visual integration with existing form
* Update layout and styling of form
- added some padding around the new processors editor field
- Updated use of flex box in the pipeline form fields
* Move pipeline processor copy into pipeline processor component
The test button is also now inside of the pipeline processor
editor. Eventually all of this functionality should be moved
into the pipeline processor editor.
* First step of refactor to moving between trees
* First iteration of x-tree drag and drop
* Remove unused import
* Fix jest test types
* Fix up minor i18n issues and fix up layout of on failure
* Remove unnecessary prop
* Update spacing above add processor button to make it more center
* Fix destination resolution algo
* Update dragging resolver unit tests and add a lot more comments
* Use one sorting algo (removed use of euiReorder for now)
* Add placeholder tests and update comments
* Quite a big refactor
- Remove DraggableLocation entirely, only use ProcessorSelector
this simplifies mapping back to reducer instructions quite a lot
- Add tests for special case dragging behaviour
* Fix off by one bug in tests and implementation 🤦🏼♂
- Also move processor reducer to it's own folder
* Update behaviour for dragging up across trees and add tests
* Fix combine instruction
* Fix test and i18n issues
* Remove background color
* Fix selector after selector refactor
* A major performance
- Do not re-render the entire tree when editing settings
* Fix component smoke test
* Fix reading value from processor state using processor selector
* [Ingest pipelines] Custom processor form (#66022)
* Re add background color and refactor name of processor item
* Fix file naming and refactor 🚜 dnd tree rendering
- deserialze and serialize were backwards, fixed
- the dnd tree was rendering a flat tree which needed to be
mapped back to the nested tree for updates. This is still the
case but we do use recursive rendering. This enables tree nodes
to better hold local state like whether they are collapsed or not.
* Fix getting of initial on failure processors value
* Update padding styles for containers
* A lot of styling updates to get closer to look of mockup
* A WiP version of th click-tree an alternative to dnd
As a response to really long pipelines we may pivot away from
dnd.
* Remove dnd tree
* clean up reamining dnd tree references
* Clean up and refactor of tree component
To simplify the logic of the tree component processor id's
were added. Also had to update the jest spec to support this
* Added the ability to duplicate a processor
* Fix types in test
* Added duplicate functionality to ui
* Memoize tree components
* address es lint issues
* remove unused import
* Fix editing of custom json
* Address form performance issues
* Add all known missing processors
* Add ability to cancel move
* Fix staleness in test and view request flyouts
* fix type issue
* Remove unused translations and skip funcitonal test for now
* add todo comment
* Fix type issues
* remove poc styles
* disable other move buttons if we have a selected processor
* Refactor drop zone pin to button and add some styling
* Refactor processor editor item
* Update styling and use icon for cancel move action too
* fix nasty integration bug
* some minor optimizations
* prevent parent from being placed in own on failure handler
* Re-add cancel button
* Re-introduce failure processors toggle
* Fix typo
* Add Handler types for processor editor item
* Fix staleness bug for type, refactor classname and fix duplicate
bug not immutably copying values
* Experimenting with padels (revert this to undo if no further
changes have been made)
* Add description and unique ids
* Share links via component-wide context rather than props
* Virtualized list and back to outline dropzones
* Refactor id getter to a service and make it an incrementing number
* Temporary fix for double rendering issue.
This means the pipeline processors component is not controllable
but fixes the double rendering even when processors have not
changed. This is a problem coming from the ingest pipelines
plugin form system outside of this component
* add todo comment
* remove euicode element
* properly handle duplicate flow
* attempt to fix i18n
* split private_tree into it's own component and add comments
* refactor 🚜. rename Tree to ProcessorsTree and move things around
* do not delete the top level arrays for processors and onfailures
* fix typescript error
* Move duplicate, addOnFailure and delete actions into ctx menu
* remove unused import
* add support for pressing esc key to cancel move
* Add outside click listener
* always prompt before deleting a processor
* refactor remove distinction between adding top level and on fail
* add processor button to tree
* Hide the add on failure context menu item for processors with
failure handlers
* Reinstated x-tree moving and highlight and disable for buttons
on move and on edit
* removing ids step 1: remove idGenerator
* remove ids step 2: added inline text input
Also refactored a lot of the tree actions away. Now using
context and the processors editor tree item component for
dispatching actions. The tree item has access to the dispatch
and to the selector which makes it a well positioned component.
Also saves on some props drilling.
* Slight improvement to styling of text input (border)
* Re-implement missing failure toggle test
* address type todo
* Address many type issues and fix yarn.lock
* re-enable create pipeline functional test
* prevent multiple flyouts from opening
* change flyout title when editing an on-failure processor
* absolutely position the failure handlers label
when we render a dropzone on the label, then we move the label
up without affecting overall component height
* fix description behaviour not removing tag if empty
* some minor clean up
* add onflyoutopen cb to tests
* refactor processors editor item to multiple files
also refactored i18n into it's own file. would be good to come
up with a pttaern for doing this more broadly.
* fix add on-failure handler in context menu after refactor
* tag -> new description field
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alison.goryachev@elastic.co>
* update vega version
* a11y skip test
* a11y skip test attempt 2
* adding back all a11y tests
* fix failed karma test
* remove extra 0BSD license
* coalesce yarn.lock versions a little
* update kbn/pm dist
* fix CI
* fix Vega View for ML
Co-authored-by: Michail Yasonik <michail.yasonik@elastic.co>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* add babel support for export type
* bump ts version to 3.9.3
* rebuild kbn-pm
* bump typescript-eslint
* fix error in security plugin UI
* check export as works
* fix app migration type
* use correct test subj attribute
* fix errors from the old PR
* embeddable is already passed in props
* explicitly define type of fetch
* add some types for viz
* fix fetch type p.2
* add null to allow spreading without type errors due to override
* add type guard to fix type error
* cast to any, since cannot assign unknown
* add timestamp to known types
* fix type error in fetch
* fix type error. id is always defined in attibutes
* declare a type
* move ts-ignore to the lines with errors
* declare tuple type explicitly
* mute type error. cannot assign unknown
* fix errors. id is always defined
* fix error type
* fix override errors. id is always defined
* fix error. extends any doesn't work anymore
* fix type error. type is always defined
* env doesn't always contain values
* fix type error
* cast to string
* add: logs is already declared in getNodeLogsUrl
* state is already passed in props
* fix some errors in timelion
* number of fragments is always defined
* 'absolute' is not just string, but value
* TEMP: option is always defined
* always true if cast to promise manually
* both props are always defined
* explicitly define returned SO type
* workaround type
* bump tslib to be compatible with ts v3.9
* test private property
* rebuild kbn-pm
* Fix ts errors for beats management
* Fix type inference broken by the TS 3.9 upgrade
* Fix ingest manager saved object attributes typings
* Fix TS errors in cross_cluster_replication and index_management.
* Fix TS error in Watcher.
* roll back colorRange wrong type
* fix security plugin types
* TypeScript 3.9 fixes for APM
* Fix ColorRange types.
* fix actions & alerts errors. ByGidi
* fix lists error
* More APM fixes
* Remove paramaterization from `removeEmpty in agent config SettingsPage component (it's only used there and doesn't need to be parameterized.)
* Add option chain for case in registerTransactionDurationAlertType
* Cast `overallValue` in transform_metrics_chart
* Use more specific type for custom link filters
* Add more option chaining for local UI filters buckets response
* Remove unused parameters from routes
* Fix getProjection type parameter
* Use destructuring in serviceNodesLocalFiltersRoute to hide `never` error
* Revert `UnionToIntersection` change in `AggregationResponseMap`
Fixes#67804.
* fix platform type error
* Fix visualizations types.
* Fix data plugin types.
* bump TS version to 3.9.5
* Fix telemetry TS errors
* Fix dashboard code
* Adding Canvas Fixes for TS 3.9
* Fix case and security_solution types
* roll back to the old export syntax. new one might cause problems in api-extractor
* update docs
* Fix timelion code
* Fix meta
* Fix types
* fix type errors om ingest_manager
* bump babel deps
* enable private props & methods syntax
* update kbn-pm dist
* whitelist 0BSD license
* use @babel/plugin-proposal-private-methods in default set as well
* disable new babel plugins
* Revert "disable new babel plugins"
This reverts commit 04d959431d.
* cleanup security_solution types
* Fixes type error for newer TypeScript
* update docs
Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
Co-authored-by: Nathan L Smith <smith@nlsmith.com>
Co-authored-by: Walter Rafelsberger <walter@elastic.co>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Tim Roes <tim.roes@elastic.co>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: FrankHassanabad <frank.hassanabad@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This PR migrates the vast majority of Alerting legacy code to the Kibana Platform.
This includes:
1. Removed legacy Task Manager
2. Migrates Fixture plugins in Alerting, Triggers UI and Task Manager Perf
This does not includes:
1. The PagerDuty simulator due to a lack of support for custom responses in the platform. issue opened. https://github.com/elastic/kibana/issues/65045
2. The Webhooks simulator due to a lack of support for custom authorisation. Requires investigation.
* Add set-value as an explicit dependency
This is a more robust solution than lodash's set().
* Replace lodash.set() with set-value's equivalent
* Rebuild renovate config
We added set-value to our dependencies.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* snapshot updates
* bump to eui 22.3.0
* snapshots
* Fix css selector in test to match EUI internal DOM change
* Updated snapshots
* Insert react-beautiful-dnd@10 into top-level kibana to force siem's node_modules to hold its correct version
* More snapshot updates, resolved a typescript issue
* Move react-beautiful-dnd dependency around to make things happy again
* Use SearchFilterConfig from the top-level eui export
* Swallow 'ResizeObserver error does not have an err object' error in canvas
* Swallow ResizeObserver error cross-browser
* update crypto packages
* as type for return value
* get default export
* add if checks
* wrap errors in i18n
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [kbn/ui-shared-deps] expand and split
* add two import styles for eui/react-dom that are new
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Make global service map zoom toward center
Calculate the center of the graph when there's not a primary node.
Also update to latest version of types.
Fixes#61176.
* Fix types