* [Pie] New implementation of the vislib pie chart with es-charts (#83929)
* 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>
# Conflicts:
# .github/CODEOWNERS
# packages/kbn-optimizer/limits.yml
# test/functional/apps/visualize/_pie_chart.ts
* Fix functional test
* Revert change - backport missing
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* lists to ts incremental builds
* security_solution to ts incremental
* import ResizeObserver explicitly as it is not declared in dom types
Co-authored-by: Mikhail Shustov <restrry@gmail.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
Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
* TS Incremental build exclude test files (#95610)
* 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>
* fix code plugin tsconfig
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* merge all the typings at root level
* merge x-pack/tsconfig into tsconfig.json
* fix tsconfig after changes in master
* remove unnecessary typings
* update paths to the global typings
* update paths to the global elaticsearch typings
* fix import
* fix path to typings/elasticsearch in fleet plugin
* remove file deleted from master
* fix lint errors
# Conflicts:
# x-pack/plugins/fleet/server/services/agents/crud.ts
# x-pack/plugins/fleet/server/services/artifacts/artifacts.ts
# x-pack/plugins/fleet/server/services/artifacts/mappings.ts
# x-pack/plugins/fleet/server/services/artifacts/mocks.ts
# x-pack/tsconfig.json
* exclude all the plugins from src/plugins
* move all the used fixtures to discover
* remove src/fixtures alias
* remove unused fixtures
* cleanup x-pack/tsconfig.json
* dont compile apm/scripts
* fix tests
* dont include infra in xpack/tsconfig.json
* update list of includes
# Conflicts:
# src/fixtures/hits.js
* migrate more plugins to tsproject ref
* revert changes for xpack_legacy
* fix IT
# Conflicts:
# src/dev/code_coverage/ingest_coverage/integration_tests/team_assignment.test.js
* remove unused "paths" from tsconfig
* remove unused test utils, import get-url from kbn/test
* dont pollute globals with jest when importing getUrl
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* break dependency on data plugin TS code
* move global typings to @kbn/utility-types
* import types from @kbn/utility-types
* remove type dependency on plugins
* add intermediate js files to break dependency on outter TS code
* temp type declaration for query-string
* declare src/core project
* export types to reference in the built d.ts files
* reference core project
* move jest types out of kbn/utility-types due to a clash with mocha types
* fix wrong es_kuery path and ts project paths
* reference core from packages consuming it
* x-pack & oss should use the same lodash version
* Revert "x-pack & oss should use the same lodash version"
This reverts commit 79cec5781e.
* use the same lodash version
* fix @types/lodash TS2300: Duplicate identifier error
* fix wrong imports
* update docs
* update docs
* add a comment why file is needed
# Conflicts:
# packages/kbn-utility-types/index.ts
# src/core/public/application/capabilities/capabilities_service.mock.ts
# src/core/public/chrome/chrome_service.mock.ts
* move test_helpers to the core
* create base tsconfig
* all tsconfigs use the base one
* use test_helpers exposed from the src/core
* move getFieldFormatsRegistry to data plugin
* add test_utils project
* compile types after checkout
* add a stub for platform tsconfig.json
* fix broken import
* fix broken path to the base config
* set tsBuildInfoFile for project without outDir
* do not commit tsbuildinfo file
* do not check output d.ts files
* fix type error
* use separate config to build types
* rollback changes to include paths
* mute import zone error
* rename files to avoid references to tsd
* do not use tsd for type tests
* include all ts files in project
* run buildRefs before type check to ensure the latest version
* store tsbuildinfo locally
* update paths to base config
* comment out core/tsconfig.json
* remove ui path
* fix wrong tsbuildinfo path