* [Lens] Escape field names in formula
* Fix handling of partially typed fields with invalid chars
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add event filters filter on exception list to hide it in UI
* Fixes unit test and added more tests for showEventFilters
* fixes test adding showEventFilters test cases
* Pass params as js object instead of individual variables
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* wip
* First pass at standalone and embedded redux stores and usage
* wip
* First pass at standalone and embedded redux stores and usage
* wip
* clean up
* wip
* refact(NA): remove extra pkg_npm target and add specific target folders on @kbn/i18n
* cleanup
* - fixes type errors in tests
* WIP remove use_manage_timeline
* wip add query + selector
* finishing integrating timeline manage context from redux
* integrating t-grid in security solution
* fix RowRender type
* WIP begin to move components from package to plugin
* integration of t-grid inside of security solution
* wip to make redux work
* little trick to make it render
* - fixes a few type errors
* better integration betwen tgrid and security solutions
* bringing back tsconfig on timeline
* wip integration t-grid in observability
* fix types
* fix type in security solutions
* add type to import + trie dto get the bundle size as small as possible
* fix type in integration test
* fix type in integration test
* - fix tests
* clean up to use technical fields
* - fixes unit tests
* - mocks the `useDateFormat` function of the `useKibana` service to fix unit tests
* fix t-grid settings vs create timeline + fix inspect button
* fix last suites test
* Update unit tests, snapshots and lint
* Fix bad merge
* fix plugin export
* Fix some failing tests
* fix unit tets in timelines plugins
* fix latest test
* fix i18n
* free obs from t-grid
* Fix timeline functional plugin types
* fix store provider
* Update failing defaultHeader test
* Fix i18n usage in security solution
* Fix remaining i18n errors in timelines plugin
* Dedupe common shared types
* move drag and drop utils in package to avoid duplication
* More shared type cleanup
* add feature flag
* review I
* fix merge with master
* fix i18n translation
* More type deduping
* Use @kbn/common-utils, fix remaining types
* fix types
* fix tests
* missing type
* fix cypress tests
Co-authored-by: Kevin Qualters <kevin.qualters@elastic.co>
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
Co-authored-by: Andrew Goldstein <andrew.goldstein@elastic.co>
* very wip
* added new assets screen
* added routes to new assets view on the package details view
* Finished styling the assets page layout, need to work on adding
links
* rather use EuiHorizontalRule
* only show the assets tab if installed
* Added hacky version of linking to assets.
* added comment about deprecation of current linking functionality
* added an initial version of the success toast with a link to the agent flyout
* First iteration of end-to-end UX working. Need to add a lot of tests!
* fixed navigation bug and added a comment
* added a lot more padding to bottom of form
* restructured code for clarity, updated deprecation comments and moved relevant code closer together
* added a longer form comment about the origin policyId
* added logic for handling load error
* refactor assets accordions out of assets page component
* slightly larger text in badge
* added some basic jest test for view data step in enrollment flyout
* adjusted sizing of numbers in badges again, EuiText does not know about size="l"
* updated size limits for fleet
* updated styling and layout of assets accordion based on original
designs
* remove unused EuiTitle
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Сhanged EuiCodeEditor to CodeEditor (monaco) at markdown_editor.js
* Added css lang support for monaco-editor.
* Added .d.ts for css lang import directly from monaco.
* Moved handlebars_url language to the code_editor.
Moved handlebars_url language registration to the code_editor.
Changed the way of registration of languages.
* Added merge for markdown_handlebars lang.
* Changed to simple markdown syntax.
Handlebars syntax breaks highlighting of special chars in markdown syntax.
* Removed useless mergeConfig function.
* Removed legacy import.
* Refactor export from monaco-editor.
* Fixed 'Could not find a declaration file for module'
* Fixed tests.
* Fixed typings errors.
* Added comment to typings.
* Fixed clearMarkdown for Monaco editor.
* Made changes based on suggestions.
* Fixed types errors.
* Fixed function tests types errors.
* Fixes, based on nits.
* Fixes based on nits.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Removes spaces check, since spaces should always be available
* Disables Monitoring, SecuritySolutions, and Reporting in SSPL tests
until #102552 is completed
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Adds boilerplate for new hook-utils package
* Move existing, identified utils into our hook-utils package
Updates references, and fixes a few missing config that were preventing
packages from building.
* Extracts a common type and adds a little more JSdoc for clarity
* Adds new useObservable hook
Similar to useAsync (a nearly identical interface), this is meant to
wrap a thunk returning an observable, allowing conditional invocation
and progressive updates as the observable continues to emit.
* Remove orphaned test
This function (and its tests) were moved to the hook-utils package; this
was simply missed.
* Remove optional chaining from kbn package
The build system does not currently support these typescript features.
While a valid fix would also have been to build separate browser and
node targets a la #99390, the use here was very minimal and so changing
to a supported syntax was the most pragmatic fix.
* Update old reference in test file
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Hide legacy index templates table if the user doesn't have any.
* Render deprecation warning above legacy index templates table and in legacy index template wizard.
* Update index template doc link to point to the new docs.
* 💄 Hack to fix suggestion box
* 🐛 Fix validation messages
* 🐛 Relax operations check for managedReferences
* Change completion params
* 🏷️ Fix missing arg issue
* ✨ Add more tinymath fns
* 🐛 Improved validation around math operations + multiple named arguments
* 🐛 Use new onError feature in math expression
* ♻️ Refactor namedArguments validation
* 🐛 Fix circular dependency issue in tests + minor fixes
* Move formula into a tab
* 🔥 Leftovers from previous merge
* ✨ Move over namedArgs from previous function
* ✅ Add tests for transferable scenarios
* ✅ Fixed broken test
* ✨ Use custom label for axis
* Allow switching back and forth to formula tab
* Add a section for the function reference
* Add modal editor and markdown docs
* Change the way math nodes are validated
* Use custom portal to fix monaco positioning
* Fix model sharing issues
* Provide signature help
* 🐛 Fix small test issue
* 🐛 Mark pow arguments as required
* 🐛 validate on first render only if a formula is present
* 🔥 Remove log10 fn for now
* ✨ Improved math validation + add tests for math functions
* Fix mount/unmount issues with Monaco
* [Lens] Fully unmount React when flyout closes
* Fix bug with editor frame unmounting
* Fix type
* Add tests for monaco providers, add hover provider
* Add test for last_value
* Usability improvements
* Add KQL and Lucene named parameters
* Add kql, lucene completion and validation
* Fix autocomplete on weird characters and properly connect KQL
* Highlight functions that have additional requirements after validating
* Fix type error and move help text to popover
* Fix escape characters inside KQL
* 🐛 Fix dataType issue when moving over to Formula
* Automatically insert single quotes on every named param
* Only insert single quotes when typing kql= or lucene=
* Reorganize help popover
* Fix merge issues
* Update grammar for formulas
* Fix bad merge
* Rough fullscreen mode
* Type updates
* Pass through fullscreen state
* Remove more chrome from full screen mode
* Fix minor bugs in formula typing
* 🐛 Decouple column order of references and output
* 🔧 Fix tests and types
* ✅ Add first functional test
* Fix copying formulas and empty formula
* Trigger suggestion prompt when hitting enter on function or typing kql=
* 🐛 Prevent flyout from closing while interacting with monaco
* refactoring
* move main column generation into parse module
* fix tests
* refactor small formula styles and markup
* documentation
* adjustments in formula footer
* Formula refactoring (#12)
* refactoring
* move main column generation into parse module
* fix tests
* more style and markup tweak for custom formula
* Fix tests
* [Expressions] Use table column ID instead of name when set
* [Lens] Create managedReference type for formulas
* Fix test failures
* Fix i18n types
* fix fullscreen flex issues
* Delete managedReference when replacing
* refactor css and markup; add button placeholders
* [Lens] Formulas
* Tests for formula
Co-authored-by: Marco Liberati <marco.liberati@elastic.co>
* added error count placeholder
* Add tooltips
* Refactoring from code review
* Fix some editor issues
* Update ID matching to match by name sometimes
* Improve performance of Monaco, fix formulas with 0, update labels
* Improve performance of full screen toggle
* Fix formula tests
* fix stuff
* Add an extra case to prevent insertion of duplicate column
* Simplify logic and add test for output ID
* add telemetry for Lens formula (#15)
* Respond to review comments
* ✨ Improve the signatures with better documentation and examples
* adjust border styles to account for docs collapse
* refactor docs markup; restructure docs obj; styles
* Fix formula auto reordering (#18)
* fix formula auto reordering
* add unit test
* Fix and improve suggestion experience in Formula (#19)
* ✨ Revisit documentation and suggestions
* 👌 Integrated feedback
* ✨ Add query validation for quotes
* Usability updates & type fixes
* add search to formula
* fix form styles to match designs
* fix text styles; revert to Markdown for control
* 👌 Integrated more feedback
* improve search
* improve suggestions
* improve suggestions even more
* 🐛 Fix i18n issues (#22)
* Persist formula on leave, fix fullscreen and popovers
* Fix documentation tests
* 🏷️ fix type issue
* 🐛 Remove hidden operations from valid functions list
* 🐛 Fix empty string query edge case
* 🐛 Enable more suggestions + extends validation
* Fix tests that depended on setState being called without function
* Error state and text wrapping updates
* ✨ Add new module to CodeEditor for brackets matching (#25)
* Fix type
* show warning
* keep current quick function
* ✨ Improve suggestions within kql query
* 📷 Fix snapshot editor test
* 🐛 Improved suggestion for single quote and refactored debounce
* Fix lodash usage
* Fix tests
* Revert "keep current quick function"
This reverts commit ed477054c5.
* Improve performance of dispatch by using timeout
* Improve memoization of datapanel
* Fix escape characters
* fix reduced suggestions
* fix responsiveness
* fix unit test
* Fix autocomplete on nested math
* Show errors and warnings on first render
* fix transposing column crash
* Update comment
* 🐛 Fix field error message
* fix test types
* 📝 Fix i18n name
* 💄 Manage wordwrap via react component
* Fix selector for palettes that interferes with quick functions
* Use word wrapping by default
* Errors for managed references are handled at the top level
* 🐛 Move the cursor just next to new inserted text
* ⚗️ First pass for performance
* 🐛 Fix unwanted change
* ⚡ Memoize as many combobox props as possible
* ⚡ More memoization
* Show errors in hover
* Use temporary invalid state when moving away from formula
* Remove setActiveDimension and shouldClose, fixed by async setters
* Fix test dependency
* do not show quick functions tab
* increase documentation popover width
* fix functional test
* Call setActiveDimension when updating visualization
* Simplify handling of flyout with incomplete columns
* Fix test issues
* add description to formula telemetry
* fix schema
* Update from design feedback
* More review comments
* Hide callout border from v7 theme
Co-authored-by: dej611 <dej611@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Michael Marcialis <michael.marcialis@elastic.co>
Co-authored-by: Joe Reuter <email@johannes-reuter.de>
Co-authored-by: Marco Liberati <marco.liberati@elastic.co>
Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
* [kbnArchiver] convert archive names to root-relative paths
* ensure that newly multiline hooks are explicitly async
* missed a newly multiline hook
* fix exists check
* avoid extra lines by wrapping arrow body in {}
* one block more
* fix errant `name` variable
Co-authored-by: spalger <spalger@users.noreply.github.com>
* Support owner and description in manifest file, add to mdx output for each plugin
* Update parse_kibana_platform_plugin.ts
* edit a couple kibana.jsons
* Update write_plugin_mdx_docs.ts
* update api docs
* Update core server manifest plugin types
* update core docs
* Fix type_check failure
* [ML] Add index visualizer
* [ML] Readd support for global state
* [ML] Add time buckets & fix dependencies
* [ML] Working ver
* [ML] Add back and boolean support
* [ML] Remove old files inside ml
* [ML] Rename files
* [ML] Move field type icon
* [ML] Create new folder structure
* [ML] Organize index_data_visualizer
* [ML] Move types into index_data_visualizer folder
* [ML] Move more files into file_data_visualizer
* [ML] Move more files into index_data_visualizer
* [ML] Add new data visualizer model
* [ML] Remove getVisualizerFieldStats which is not used by dv
* [ML] Delete redundant folder
* [ML] Copy old data visualizer routes to new plugin
* [ML] Remove old routes
* [ML] Disable for ml job cards tests for now
* [ML] Remove todos
* [ML] Move the toast error to the UI component
* [ML] Fix map styling
* [ML] Add runtime_mappings for internal/file_upload/time_field_range
* [ML] Move routes into folder
* [ML] Update permissions
* [ML] Update texts
* [ML] Update schemas import and api get_field_stats
* [ML] Reorg folders into common
* [ML] Update types & tests
* [ML] Update internal/data_visualizer permissions and action panel tests
* [ML] Update imports after #100863
* [ML] Fix CI
* [ML] Rename folder from file_data_visualizer to data_visualizer
* [ML] Rename i18n ids
* [ML] Update fileDataVisualizer -> dataVisualizer dependency name in ml plugin
* [ML] Remove ml prefix in data test subjs
* [ML] Fix settings and docs
* [ML] Update plugin description
* [ML] Remove mlContext dependency completely
* [ML] Set query to optional
* Revert "[ML] Update plugin description"
This reverts commit 4ab1a25c
* [ML] Update plugins list docs
* [ML] Fix types and i18n
* [ML] Revert ml data test subj/class name changes
* [ML] Split up data visualizer model, remove Logger
* [ML] Remove empty file and indexPatternFieldEditor
* [ML] Move imports of file_upload
* [ML] Update plugin dependencies
* Re-add missing data_visualizer.json
* Remove capabilities in data_visualizer
* Fix test subjs
* Update ownership for data_visualizer and file_upload code to be ml
* Update estypes after 98266
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* bump @elastic/elasticsearch to canary.7
* address errors in core
* address errors in data plugin
* address errors in Alerting team plugins
* remove outdated messages in Lens
* remove unnecessary comments in ML
* address errors in Observability plugin
* address errors in reporting plugin
* address errors in Rule registry plugin
* fix errors in Security plugins
* fix errors in ES-UI plugin
* remove unnecessary union.
* update core tests
* fix kbn-es-archiver
* update to canary 8
* bump to v9
* use new typings
* fix new errors in core
* fix errors in core typeings
* fix type errors in data plugin
* fix type errors in telemetray plugin
* fix data plugin tests
* fix search examples type error
* fix errors in discover plugin
* fix errors in index_pattern_management
* fix type errors in vis_type_*
* fix errors in typings/elasticsearch
* fix type errors in actions plugin
* fix type errors in alerting and apm plugins
* fix type errors in canvas and cases
* fix errors in event_log
* fix type errors in ILM and ingest_pipelines
* fix errors in lens plugin
* fix errors in lists plugin
* fix errors in logstash
* fix errors in metrics_entities
* fix errors in o11y
* fix errors in watcher
* fix errors in uptime
* fix errors in upgrade_assistant
* fix errors in task_manager
* fix errors in stack_alerts
* fix errors in security_solution
* fix errors in rule_registry
* fix errors in snapshot_restore
* fix remaining errors
* fix search intergration tests
* adjust assetion
* bump version to canary.10
* adapt code to new naming schema
* use mapping types provided by the client library
* Revert "adjust assetion"
This reverts commit 19b8fe0464.
* fix so intergration tests
* fix http integration tests
* bump version to canary 11
* fix login test
* fix http integration test
* fix apm test
* update docs
* fixing some ml types
* fix new errors in data plugin
* fix new errors in alerting plugin
* fix new errors in lists plugin
* fix new errors in reporting
* fix or mute errors in rule_registry plugin
* more ML type fixes
* bump to canary 12
* fix errors after merge conflict
* additional ML fixes
* bump to canary 13
* fix errors in apm plugin
* fix errors in fleet plugin
* fix errors in infra plugin
* fix errors in monitoring plugin
* fix errors in osquery plugin
* fix errors in security solution plugins
* fix errors in transform plugin
* Update type imports for ES
* fix errors in x-pack plugins
* fix errors in tests
* update docs
* fix errors in x-pack/test
* update error description
* fix errors after master merge
* update comment in infra plugin
* fix new errors on xpack tests/
Co-authored-by: James Gowdy <jgowdy@elastic.co>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
* fix(NA): windows ts_project outside sandbox compilation adding tsconfig paths for packages
* chore(NA): missing @kbn paths for node_modules so types can work
* chore(NA): missing @kbn paths for node_modules so types can work
* chore(NA): organizing deps on non ts_project packages
* chore(NA): change order to find @kbn packages on node_modules first
* chore(NA): add @kbn/expect typings setting on package.json
* chore(NA): fix typechecking
* chore(NA): add missing change on tsconfig file
* chore(NA): unblock windows build by not depending on the pkg_npm rule symlink in the package.json
* chore(NA): add missing depedencies on BUILD.bazel file for io-ts-list-types
* chore(NA): remove rootDirs configs
* chore(NA): change kbn/monaco targets order
* chore(NA): update kbn-monaco build
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* es lint fix
* Add formatter on the buckets labels
* Config the new plugin, toggle tooltip
* Aff filtering on slice click
* minor fixes
* fix eslint error
* use legacy palette for now
* Add color picker to legend colors
* Fix ts error
* Add legend actions
* Fix bug on Color Picker and remove local state as it is unecessary
* Fix some bugs on colorPicker
* Add setting for the user to select between the legacy palette or the eui ones
* small enhancements, treat empty labels with (empty)
* Fix color picker bugs with multiple layers
* fixes on internationalization
* Create migration script for pie chart and legacy palette
* Add unit tests (wip) and a small refactoring
* Add unit tests and move some things to utils, useMemo and useCallback where it should
* Add jest config file
* Fix jest test
* fix api integration failure
* Fix to_ast_esaggs for new pie plugin
* Close legendColorPicker popover when user clicks outside
* Fix warning
* Remove getter/setters and refactor
* Remove kibanaUtils from pie plugin as it is not needed
* Add new values to the migration script
* Fix bug on not changing color for expty string
* remove from migration script as they don't need it
* Fix editor settings for old and new implementation
* fix uistate type
* Disable split chart for the new plugin for now
* Remove temp folder
* Move translations to the pie plugin
* Fix CI failures
* Add unit test for the editor config
* Types cleanup
* Fix types vol2
* Minor improvements
* Display data on the inspector
* Cleanup translations
* Add telemetry for new editor pie options
* Fix missing translation
* Use Eui component to detect click outside the color picker popover
* Retrieve color picker from editor and syncColors on dashboard
* Lazy load palette service
* Add the new plugin to ts references, fix tests, refactor
* Fix ci failure
* Move charts library switch to vislib plugin
* Remove cyclic dependencies
* Modify license headers
* Move charts library switch to visualizations plugin
* Fix i18n on the switch moved to visualizations plugin
* Update license
* Fix tests
* Fix bugs created by new charts version
* Fix the i18n switch problem
* Update the migration script
* Identify if colorIsOverwritten or not
* Small multiples, missing the click event
* Fixes the UX for small multiples part1
* Distinct colors per slice implementation
* Fix ts references problem
* Fix some small multiples bugs
* Add unit tests
* Fix ts ref problem
* Fix TS problems caused by es-charts new version
* Update the sample pie visualizations with the new eui palette
* Allows filtering by the small multiples value
* Apply sortPredicate on partition layers
* Fix vilib test
* Enable functional tests for new plugin
* Fix some functional tests
* Minor fix
* Fix functional tests
* Fix dashboard tests
* Fix all dashboard tests
* Apply some improvements
* Explicit params instead of visConfig Json
* Fix i18n failure
* Add top level setting
* Minor fix
* Fix jest tests
* Address PR comments
* Fix i18n error
* fix functional test
* Add an icon tip on the distinct colors per slice switch
* Fix some of the PR comments
* Address more PR comments
* Small fix
* Functional test
* address some PR comments
* Add padding to the pie container
* Add a max width to the container
* Improve dashboard functional test
* Move the labels expression function to the pie plugin
* Fix i18n
* Fix functional test
* Apply PR comments
* Do not forget to also add the migration to them embeddable too :D
* Fix distinct colors for IP range layer
* Remove console errors
* Fix small mulitples colors with multiple layers
* Fix lint problem
* Fix problems created from merging with master
* Address PR comments
* Change the config in order the pie chart to not appear so huge on the editor
* Address PR comments
* Change the max percentage digits to 4
* Change the max size to 1000
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Move inspector adapter integration into search source
* docs and ts
* Move other bucket to search source
* test ts + delete unused tabilfy function
* hierarchical param in aggconfig.
ts improvements
more inspector tests
* fix jest
* separate inspect
more tests
* jest
* inspector
* Error handling and more tests
* put the fun in functional tests
* delete client side legacy msearch code
* ts
* override to sync search in search source
* delete more legacy code
* ts
* delete moarrrr
* deflate bfetch chunks
* update tests
use only zlib
* ts
* extract getInflatedResponse
* tests
* Use fflate in attempt to reduce package size
* use node streams, fflate and hex encoding.
* DISABLE_SEARCH_COMPRESSION UI Settings
Use base64 and async compression
* i18n
* Code review
Use custom header for compression
Promisify once
* use custom headers
* Update jest
* fix tests
* code review, baby!
* integration
* tests
* limit
* limit
* limit
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Shows event filters card on fleet page
* Uses aggs instead of while loop to retrieve summary data
* Add request and response types in the lists package
* Fixes old import
* Removes old i18n keys
* Removes more old i18n keys
* Use consts for exception lists url and endpoint event filter list id
* Uses event filters service to retrieve summary data
* Fixes addressed pr comments such as changing the route without underscore, adding aggs type, validating response, and more
* Uses useMemo instead of useState to memoize object
* Add new e2e test for summart endpoint
* Handle api errors on event filters and trusted apps summary api calls
* Add api error message to the toast
* Fix wrong i18n key
* Change span tag by react fragment
* Uses styled components instead of modify compontent style directly and small improvements on test -> ts
* Adds curls script for summary route
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* cleanup removed dirs
* delete removed folders from other places in the repo
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [triggersActionsUi] Reduce page load bundle to under 100kB
* removed old code
* removed fragment
* changed svg logo to lazy react components
* fixed type checks and translations
* fixed type checks
* fixed type checks
* fixed type checks
* fixed tests
* fixed tests
* fixed iconClass
* fixed due to comments
* added info about new IconType to readme file
* fixed key errors
* Fixing sticky nav
* Adding some side bar styles
* Added a built-in solution nav title with avatar icon
* Adding tutorial docs
* Added KibanaPageTemplateSolutionNavAvatar
* Added KibanaPageTemplateSolutionNav
* Increased limit to `core` / `kibanaReact` plugin because of additional CSS
## Summary
Utilizes constants package and deletes duplicate code
* Renames the `securitysolution-constants` to be `securitysolution-list-constants` to be specific
* Deletes duplicated code found during cleanup
* Moves more tests into the packages found along the way with the duplicated code
* Moves `parseScheduleDates` from `@kbn/securitysolution-io-ts-types` to `@kbn/securitysolution-io-ts-utils`
### Checklist
- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
## Summary
* Adds package `kbn-securitysolution-list-api`
* Adds package `kbn-securitysolution-list-hooks`
* Moves files into the packages
* Moves a few additional types into the other packages such as the `kbn-securitysolution-io-ts-types` package to remove more things from the shard_export/shared_import between lists and security solution
* Removes more duplicated code
### Checklist
- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
* Remove custom code, add in a hack
* remove artifical limit
* Fix arrow functions in interfaces not having children
* Update docs
* Update api docs after merge from master
* update api docs after merge from master
* update api docs
## Summary
* Creates a `securitysolution-list-utils` packaged and moves the first set of utilities into there
* Fixes a slight bug with `kbn-securitysolution-io-ts-list-types` where the wrong name was used
* Moves _all_ of the lists schemas and types into the package `kbn-securitysolution-io-ts-list-types`
* Removes copied code found in a few places
## Tech debt
* Some spots I have to use an `any` in the package as Kibana kbn packages don't have the types I need
* Some spots I copy constants until we can straighten out those pieces.
* I keep copied mock files until we figure out how to share mocks from these packages without adding weight or we create dedicated mock packages for all of this.
### Checklist
- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
* initial version of the screenshot mode service
* First iteration of client side of screenshot mode plugin
Also hooked it up to the chromium browser imitating the preload
functionality of electron to set up the environment before
code runs.
* First implementation of server-side logic for detecting
screenshot mode
* fix some type issues and do a small refactor
* fix size limits, docs and ts issues
* fixed types issues and made sure screenshot mode is correctly detected on the client
* Moved the screenshot mode header definition to common
Added a server-side example for screenshot mode
Export the screenshot mode header in both public and server
* move require() to screenshotMode plugin
* Update chromium_driver.ts
* cleaned up some comments, minor refactor in ReportingCore and
changed the screenshotmode detection function to check for a
specific value.
* fix export
* Expanded server-side screenshot mode contract with function that
checks a kibana request to determine whether we in screenshot
mode
* added comments to explain use of literal value rather than external reference
* updated comment
* update reporting example
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
## Summary
With recent package changes and fixes we are down to 61kb for page load bundle. General rules are max kilobytes + 15kb for buffer so that would mean we should lower it to be 76kb.
Resolves#95870
## Summary
The io-ts package was too large and needed to broken down more by domain to decrease the lists plugin size and any other plugin wanting to use the packages will not incur big hits as well.
Before we had one large io-ts package:
```
@kbn/securitysolution-io-ts-utils
```
Now we have these broken down 4 packages:
```
@kbn/securitysolution-io-ts-utils
@kbn/securitysolution-io-ts-types
@kbn/securitysolution-io-ts-alerting-types
@kbn/securitysolution-io-ts-list-types
```
Deps between these packages are:
```
@kbn/securitysolution-io-ts-utils (none)
@kbn/securitysolution-io-ts-types -> @kbn/securitysolution-io-ts-utils
@kbn/securitysolution-io-ts-alerting-types -> @kbn/securitysolution-io-ts-types, @kbn/securitysolution-io-ts-utils
@kbn/securitysolution-io-ts-list-types -> @kbn/securitysolution-io-ts-types, @kbn/securitysolution-io-ts-utils
```
Short description and function of each (Also in each of their README.md):
```
@kbn/securitysolution-io-ts-utils, Smallest amount of utilities such as format, validate, etc...
@kbn/securitysolution-io-ts-types, Base types such as to_number, to_string, etc...
@kbn/securitysolution-io-ts-alerting-types, Alerting specific types such as severity, from, to, etc...
@kbn/securitysolution-io-ts-list-types, list specific types such as exception lists, exception list types, etc...
```
### Checklist
Delete any items that are not applicable to this PR.
- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
* refactor config deprecations to avoid config mutations
* remove dynamic access keys in core deprecations.
* refactor custom config deprecations to match the new signature
* improve config deprecations fixtures for nested keys
* add a test for xpack.banner config deprecations
* key --> path, add a test for invalid command
## Summary
Removes the dependency of security_solution from the lists plugin
* Removes some of the deprecated types in favor of the new kbn package
* Adds a workaround in the kbn packages of removing the ?? and `a?.b?.c` typescript since kbn packages cannot transpile it
* Exposes the test_utils from the kbn package
### Checklist
- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
* [ftr] validate that suites are not in multiple ciGroups
* remove unused import
* include filename in error message
* remove redundant ciGroup tags
* fix more duplicate ciGroups
Co-authored-by: spalger <spalger@users.noreply.github.com>
## Summary
Pulls constants from lists plugin into its own kbn package.
Phase 1: Lift and shift small shared constants into kbn package called `kbn-securitysolution-constants`
Phase 2: Deprecate existing code now in packages
Phase 3+: Strangle/remove existing code and use the code from the kbn package
## Summary
Good place for one off utils to use and reduce/remove the circular deps we have between security_solutions, lists, and anywhere else we have them for different utils.
Phase 1: Adds kbn package of `kbn-securitysolution-utils` through lift and shift
Phase 2: Deprecated the functions
Phase 3: Removes the functions in favor of using the `kbn-securitysolution-utils`
Phase 4+: Adds more and removes dependencies/copies across plugins within the security solution. Maybe we break things out by domain later as this grows in size.
- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
## Summary
We are removing duplicated code in sections of plugins into the kibana/packages folder. This is phase 1 of 4+ where:
Phase 1: Lift and shift the io-ts code into `kibana/packages/kbn-securitysolution-io-ts-utils`
Phase 2: Deprecate the utils across plugins any copied code
Phase 3: Replace the deprecated types with the ones in here where we can. [Strangle pattern](https://martinfowler.com/bliki/StranglerFigApplication.html)
Phase 4+: (potentially) consolidating any duplication or everything altogether with the `kbn-io-ts-utils` project
### Checklist
- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
* chore(NA): moving @kbn/analytics into bazel
* chore(NA): fix type check for package migration
* chore(NA): fix type check for package migration
* chore(NA): fix type check for package migration
* chore(NA): separate type generating from server code
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Before:
```
info => Loading static files from /Users/smith/Code/kibana/node_modules/@kbn/ui-shared-deps/target and serving at /.
info => Loading presets
info => Loading presets
info => Loading 8 other files in "x-pack/plugins/apm/.storybook"
info => Adding stories defined in "x-pack/plugins/apm/.storybook/main.js"
info => Using default Webpack setup
... like 300MB of output ...
webpack built 0f7b67ae2a8a0401f5af in 105247ms
```
After:
```
info => Loading static files from /Users/smith/Code/kibana/node_modules/@kbn/ui-shared-deps/target and serving at /.
info => Loading presets
info => Loading presets
info => Loading 8 other files in "x-pack/plugins/apm/.storybook"
info => Adding stories defined in "x-pack/plugins/apm/.storybook/main.js"
info => Using default Webpack setup
... yeah it just sits there for a bit, but were you reading this and did you believe the percentages you were being told? ...
webpack built 0f7b67ae2a8a0401f5af in 105247ms
```
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Phase 1 of a multi-phase cautious approach for adding an experimental application cache for Kibana solutions called `metric_entities` and integrates it within Security Solutions.
Phase 1 is putting experimental support into the application without breaking existing features. Lots of TODO's, conversations and a possible RFC from phase 1 to phase 2 approach. Some features are missing, but for phase 1 the general idea and code is all there.
To enable this first phase after checking out the branch add this to your `kibana.dev.yml`
```yml
xpack.metricsEntities.enabled: true
xpack.securitySolution.enableExperimental: ['metricsEntitiesEnabled']
```
Then go into Stack Management -> Advanced Settings (Under Security Solutions) and set the enabled to true like so:
<img width="1229" alt="Screen Shot 2021-04-08 at 2 21 02 PM" src="https://user-images.githubusercontent.com/1151048/114091276-b3cbb700-9875-11eb-9083-5c1d91dd20ed.png">
Next go to the security_solutions page and you will see it being activated and you will have these transforms running if you look under stack management:
<img width="1710" alt="Screen Shot 2021-04-29 at 2 00 27 PM" src="https://user-images.githubusercontent.com/1151048/116611174-4a2e4e00-a8f3-11eb-9e15-55cb504dfb2a.png">
On the hosts page, network, page, etc... You can see them being activated when you have no query/filter and you click on request:
<img width="1405" alt="Screen Shot 2021-04-29 at 2 01 28 PM" src="https://user-images.githubusercontent.com/1151048/116611274-6a5e0d00-a8f3-11eb-9998-9f5b3d1c5c63.png">
You will see in the request the index patterns all starting with `estc_xyz*`
### Checklist
Delete any items that are not applicable to this PR.
- [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)
We have lots of TODO's but no concrete docs with this just yet.
- [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials
Behind a feature flag and this isn't there yet.
- [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
* convert functional_tests/lib into TS
* convert ES cluster factory into TS
* fix exports from kbn-test
* fix core test_helpers
* remove legacy ES client usage in ui_settings tests
* remove unnecessary ts-expect-errors comments
* initialize DEFAULT_SETTINGS_WITH_CORE_PLUGINS lazily to prevent failure when imported outside of FTR context
* throw an exception on invalid process.env.TEST_ES_PORT
* do not restart Kibana server on integration tests writing logs
* unskip tests
* do not write to ended stream to avoid a race condition
* revert changes to the File appender
* fix race condition on the logging_system level
enforce buffer usage for all the logs created during disposal phase
* [ML] Moving file data vizualizer to file upload plugin
* removing maps plug dependency
* fixing imports
* small refactor
* adding missing endpoints
* fixing translations
* fxing table controls
* fixing types and disabling geo point test
* actually disabling geo point test
* making endpoints internal
* moving UI code to separate plugin
* enabling maps integration
* cleaning up dependencies
* fixing translation ids
* moving analyze file endpoint out of file upload plugin
* fixing transtations issues
* refactor for lazy loading of component
* updating limits
* updating plugin asciidoc
* code clean up
* further clean up
* adding comment
* fixing really obvious CI error
* removing commented out include
* reenabling geo point test
* fixing incorrectly changed import
* removing ml from labels and identifiers
* renaming function
* moving analyse file endpoint to file upload plugin
* reverting import path changes
* adding esUiShared back in
* fixing navigation tabs alignment in basic license
* adding key to tab wrapper
* reverting test label
* further removal of ml references
* removing ml label from more identifiers
* fixing tests
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* chore(NA): upgrade into last ibazel version
* chore(NA): upgrade into latest ibazel version
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Set up Observability rule APIs
* Populate alerts table with data from API
* Move field map types/utils to common
* Format reason/link in alert type
* Format reason/link in alert type
* Fix issues with tsconfigs
* Storybook cleanup for example alerts
* Use `MemoryRouter` in the stories and `useHistory` in the component to get the history
* Replace examples with ones from "real" data
* Use `() => {}` instead of `jest.fn()` in mock registry data
* Store/display evaluations, add active/recovered badge
* Some more story fixes
* Decode rule data with type from owning registry
* Use transaction type/environment in link to app
* Fix type issues
* Fix API tests
* Undo changes in task_runner.ts
* Remove Mutable<> wrappers for field map
* Remove logger.debug calls in alerting es client
* Add API test for recovery of alerts
* Revert changes to src/core/server/http/router
* Use type imports where possible
* Update limits
* Set limit to 100kb
Co-authored-by: Nathan L Smith <smith@nlsmith.com>
* Track stats and add extra output information
* Update api docs output
* Clean up id names
* update api docs
* Consolidate error messages and fix a bug
* Update docs
* Update get_declaration_nodes_for_plugin.ts
* Fix bug with removeBrokenLinks not being recursive
* Update docs
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* chore(NA): moving @kbn/config-schema into bazel
* chore(NA): correctly format packages for the new bazel standards
* chore(NA): correctly maps srcs into source_files
* chore(NA): remove config-schema dep from legacy built packages package.jsons
* chore(NA): include kbn/config-schema in the list of bazel packages to be built
* chore(NA): change import to fix typechecking
* chore(NA): remove dependency on new package built by bazel
* chore(NA): be more explicit about incremental setting
* chore(NA): include pretty in the args for ts_project rule
* docs(NA): include package migration completion in the developer getting started
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* chore(NA): moving @kbn/apm-utils into bazel
* chore(NA): add kbn/apm-utils into package.json
* chore(NA): missing standard on build file globs
* chore(NA): be more explicit about incremental setting
* chore(NA): include pretty in the args for ts_project rule
* docs(NA): include package migration completion in the developer getting started
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* chore(NA): add warnings both to run and watch commands about Bazel built packages
* chore(NA): add new commands to build and watch bazel packages
* docs(NA): add documentation about how to deal with bazel packages
* chore(NA): addressed majority of the feedback received except for improved error logging
* chore(NA): disable ibazel info notification.
* chore(NA): remove iBazel notification
* chore(NA): remove iBazel notification - kbn pm dist
* chore(NA): move show_results option to kbn-pm only
* chore(NA): patch build bazel command to include packages target list
* chore(NA): add pretty logging for elastic-datemath
* chore(NA): remove double error output from commands ran with Bazel
* fix(NA): include simple error message to preserve subprocess failure state
* docs(NA): missing docs about how to independentely watch non bazel packages
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Moves part of the exceptions UI out of the security solution plugin and into the lists plugin. In order to keep PRs (relatively) small, I am moving single components at a time. This should also then help more easily pinpoint the source of any issues that come up along the way.
The next couple PRs will focus on the exception builder. This one in particular is focused on moving over the `ExceptionBuilderComponent` which deals with rendering numerous exception items and their entries.
Quick Summary:
- `x-pack/plugins/security_solution/public/common/components/exceptions/builder/` → ` x-pack/plugins/lists/public/exceptions/components/builder/`
- Corresponding unit test file moved as well
- Updated security solution exception builder to pull `ExceptionBuilderComponent` from lists plugin
* starting removing stuff
* fix jest config
* disable CLI mode until other PR is merged
* fix the schema
* add deprecation for maxPayloadBytes
* fix legacy start logic
* deletes `env` from unknown args
* fix FTR test config
* some legacy service deletion
* move config validation
* remove legacy exports from entrypoint
* preserve legacy logging in core logging config
* try to fix uiSettings integration tests
* fix legacy service tests
* more type fix
* use fromRoot from @kbn/utils
* cleanup kibana.d.ts
* fix unit tests
* remove src/core/server/utils
* fix server script
* add integration test for `/{path*}` route
* add unit tests on legacy config
* adapt uiSetting IT bis
* fix tests
* update generated doc
* address some review comments
* move review comments
* fix some stuff
* fix some stuff
* fix some stuff
* fix some stuff bis
* generated doc
* add test for ensureValidConfiguration
* add base config for all the TS projects
* all the project use new tsconfig.project.json
* compile test files in the high-level tsconfig.json
* fix TS error in maps plugin
* fix TS error in infra plugin
* exclude mote test and test until folders
* uptime. do not import test code within prod code
* expressions. do not import test code within prod code
* data: export mocks from high level folder
* task_manager: comply with es client typings
* infra: remove unused enzyme_helpers
* check_ts_project requires "include" key
* ts_check should handle parent configs
* all ts configs should extend base one
* exclude test folders from plugins
* update patterns to fix ts_check errors
* Apply suggestions from code review
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* uptime: MountWithReduxProvider to test helpers
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* chore(NA): move elastic-datemath into a ts package
* chore(NA): finish elastic-datemath
* chore(NA): finish elastic-datemath
* chore(NA): source folder for elastic-datemath
* chore(NA): add source-maps ace, analytics, apm-config-loader and apm-utils packages
* chore(NA): add sourcemaps to packages on typescript
* chore(NA): move test fixtures within source
* chore(NA): correct exclusions on packages
* chore(NA): correct package.json on all packages
* chore(NA): correct package.json on all packages
* chore(NA): complete kbn pm
* chore(NA): default export on elastic-datemath
* chore(NA): include logs on kbn-logging
* chore(NA): update bundle ref module to last code used in the webpack upstream
* chore(NA): update bundle ref module to last code used in the webpack upstream - refactored
* chore(NA): remove override method for exportsArgument
* fix(NA): typechecking problems by use @internal at javascript import sources on kbn-test package
* fix(NA): typescript projects check
* fix(NA): run optimizer integration tests from source
* chore(NA): fix usage from target for kbn optimizer
* chore(NA): path on tsconfig
* chore(NA): move tsignore into ts-expect-error
* chore(NA): include souce maps on kbn cli dev
* chore(NA): include souce maps on kbn-crypto, kbn-server-http-tools and kbn-telemetry-tools
* chore(NA): add issue links into the ts-expect-error comments