* [Maps] labels for polygons and lines
* remove x-pack yarn.lock
* add labels to choropleth map wizard
* clean up comment
* add mvt tile support
* only add centroids if there may be lines or polygons
* tslint
* tslint
* do not add centroid to too many features polygon
* update get_tile expect statements
* move turf dependencies from devDependencies to dependencies
* update jest snapshot and functional test expects
* fix functional test expect
* another functional test expect update
* functional test updates
* expect
* pew pew source expect updates
* update joins expect
* update mapbox style expects
* update join visibility expects for geocentroids
* update join visibility expects for geocentroids
* another functional test expect update
* review feedback
* update yarn.lock
* tslint
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This package has long since been deprecated and no longer maintained.
The only reason it still exists is that not all plugins have migrated
away from using the kui classes to EUI. This removes all src and build
files as a step forward.
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* add settings
* update abab package to version with types
* add test case for CORS
* add tests for cors config
* fix jest tests
* add deprecation message
* tweak deprecation
* make test runable on Cloud
* add docs
* fix type error
* add test to throw on invalid URL
* address comments
* Update src/core/server/http/http_config.test.ts
Co-authored-by: Larry Gregory <lgregorydev@gmail.com>
* Update docs/setup/settings.asciidoc
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
* allow kbn-xsrf headers to be set on CORS request
Co-authored-by: Larry Gregory <lgregorydev@gmail.com>
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
* chore(NA): add fsevents resolution to 2.x
* chore(NA): add fsevents as an optionalDepedency to allow resolutions to be set for it
* chore(NA): remove fsevents resolution from package.json
* chore(NA): remove optionalDependencies from being declared
* chore(NA): update kbn pm dist
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Updated to eui@30.4.1, fixed types and unit tests
* Cleanup some imports
* Fix a text color swap, now back to danger text
* Bump EUI to v30.4.2
* Revert snapshot changes from ownFocus modification
* Clean up alert flyout test actions to better represent user actions
* Upgrade EUI to 30.5.1
* More accurate test interaction
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* chore(NA): update gitignore to include first changes from moving into a single package.json
* chore(NA): update gitignore
* chore(NA): move all the dependencies into the single package.json and apply changes to bootstrap
* chore(NA): fix types problems after the single package json
* chore(NA): include code to find the dependencies used across the code
* chore(NA): introduce pure lockfile for install dependencies on build
* chore(NA): update clean task to not delete anything from xpack node_modules
* chore(NA): update gitignore to remove development temporary rules
* chore(NA): update notice file
* chore(NA): update jest snapshots
* chore(NA): fix whitelisted licenses to include a new specify form of an already included one
* chore(NA): remove check lockfile symlinks from child projects
* chore(NA): fix eslint and add missing declared deps on single pkg json
* chore(NA): correctly update notice
* chore(NA): fix failing jest test for storyshots.test.tsx
* chore(NA): fix cypress multi reporter path
* chore(NA): fix Project tests check
* chore(NA): fix problem with logic to detect used dependes on oss build
* chore(NA): include correct x-pack plugins dep discovery
* chore(NA): discover entries under dynamic requires on vis_type_timelion
* chore(NA): remove canvas
* chore(NA): add initial code to find circular deps
* chore(NA): ground work to integrate the circular deps scripts
* chore(NA): add correct filtering to find circular dependenices feature
* chore(NA): add ci mode flag into circular deps script
* chore(NA): feature complete circular dependencies detect script
* chore(NA): merge and solve conflicts with master
* chore(NA): remove unwanted changes
* chore(NA): remove unwanted changes on kbn storybook
* chore(NA): hook find circular deps tool into ci
* chore(NA): remove previous find plugin circular deps script
* chore(NA): add type for circular dep list
* chore(NA): add type for circular dep list for allowed list
* chore(NA): allow CI to fail check
* chore(NA): update deps allowed list
* chore(NA): run search circular deps script over examples too
* docs(NA): adds cli description
* chore(NA): use plugin search paths to build entries to find circular deps
* chore(NA): update allowed list
* chore(NA): snapshot update for kbn optimizer test
* chore(NA): update dpdm version
* chore(NA): remove thirdParty flag
* chore(NA): update docs to include info about the new tool
* docs(NA): update to link PR instead of the issue
* chore(NA): update debug logs to always output allowedList
* fix(NA): correctly list found differences number
* chore(NA): remove quiet flag
* fix(NA): correctly fail the CI if circular deps are found
* chore(NA): complete list of found circular deps
* chore(NA): used named capturing group into the regex
* docs(NA): update typescript best practices docs and styleguide
* chore(NA): introduce quick filter option flag
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* bump version to 4.1.1-rc
* fix code to run kbn bootstrap
* fix errors
* DO NOT MERGE. mute errors and ping teams to fix them
* Address EuiSelectableProps configuration in discover sidebar
* use explicit type for EuiSelectable
* update to ts v4.1.2
* fix ts error in EuiSelectable
* update docs
* update prettier with ts version support
* Revert "update prettier with ts version support"
This reverts commit 3de48db3ec.
* address another new problem
Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
* create kbn-legacy-logging package and start to move things
* fix rotator tests
* fix logging system test mocks
* move logging format to the package
* move logging setup to package
* adapt legacy logging server
* remove usage of legacy config in the legacy logging server
* move legacy logging server to package
* remove `??` syntax from package
* update generated doc
* fix a few things due to month old merge
* remove typings from project
* move reconfigureLogging to package
* add basic README file
* update generated doc
* remove old typings
* add typing for legacy logging events
* remove `??` from packages
* fix / improve event types usages
* remove suffix from tsconfig
* update deps
* update rules
use type-aware @typescript-eslint/no-shadow instead of no-shadow. do not use no-undef, rely on TypeScript instead
* fix or mute all lint errors
* react-hooks eslint plugin fails on ? syntax
* fix wrong typings in viz
* remove React as a global type
* fix eslint errors
* update version to 4.8.1
* fix a new error
## Summary
Update `unpackRegistryPackageToCache` to call `unpackArchiveToCache` instead of duplicating much of it.
Now an archive is iterated & put in cache via the same function regardless of its initial source.
* chore(NA): update gitignore to include first changes from moving into a single package.json
* chore(NA): update gitignore
* chore(NA): move all the dependencies into the single package.json and apply changes to bootstrap
* chore(NA): fix types problems after the single package json
* chore(NA): include code to find the dependencies used across the code
* chore(NA): introduce pure lockfile for install dependencies on build
* chore(NA): update clean task to not delete anything from xpack node_modules
* chore(NA): update gitignore to remove development temporary rules
* chore(NA): update notice file
* chore(NA): update jest snapshots
* chore(NA): fix whitelisted licenses to include a new specify form of an already included one
* chore(NA): remove check lockfile symlinks from child projects
* chore(NA): fix eslint and add missing declared deps on single pkg json
* chore(NA): correctly update notice
* chore(NA): fix failing jest test for storyshots.test.tsx
* chore(NA): fix cypress multi reporter path
* chore(NA): fix Project tests check
* chore(NA): fix problem with logic to detect used dependes on oss build
* chore(NA): include correct x-pack plugins dep discovery
* chore(NA): discover entries under dynamic requires on vis_type_timelion
* chore(NA): remove canvas
* test(NA): fix jest unit tests
* chore(NA): remove double react declaration from storyshot test file
* chore(NA): try removing isOSS check
* chore(NA): support for plugin development
* chore(NA): update logic to fix unit tests and typechecking
* chore(NA): support to run npm scripts in child kbn projects across all envs
* chore(NA): support github checks reporter on x-pack and remove cpy types as the package correctly provides them
* chore(NA): update cpy version
* chore(NA): include last kbn pm changes
* chore(NA): update style on build_production_projects.ts
* chore(NA): remove any cast fom telemetry opt in stats
* chore(NA): remove del and re-use rm -rf again
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* convert pdf.js to TS
* more typescript
* simplify caller
* more typescript
* more typescript
* fix the code to match the expected interface
* very cool comment
* interface correction
* remove unused class method
* add unit test for PdfMaker
* file rename for typo correction
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Upgraded eui to v29.5.0; snapshot updates
* Cleaned up some types
* addresses feedback on types change
* Update EuiIcon snapshots in jest integration tests
* Updated snapshot from rebasing on master
* Upgraded EUI to v29.2.0
* Remove hacks on top of EuiHeaderLink(s)
* Actual update to eui@29.2.0
* Resolve typescript issue when omitting a key over a union
* Resolve nav menu test's expectations
* Fix lint issue
* Update to 29.3.0
* Revert vega snapshot update
I don’t think this was intended to change when I ran the updater
* [ui-shared-deps] strip proptypes from ui-shared-deps production build
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: spalger <spalger@users.noreply.github.com>
* chore(NA): script to check for multiple version of same dependency
* chore(NA): remove multiple versions for the same dependency
* chore(NA): hook single_version_dependencies script into the CI
* chore(NA): remove grunt from the CI hook integration
* chore(NA): update kbn pm dist
* chore(NA): fix typechecking
* chore(NA): update code to run under last extract-zip version
* fix(NA): multiple versions of the same type dependency
* move validation to bootstrap (#13)
Co-authored-by: spalger <spalger@users.noreply.github.com>
* chore(NA): todo to remove logic to validate single version deps once we move into a single package.json
* chore(NA): remove verify dependency versions jenkins task
* chore(NA): update kbn pm dist file
* chore(NA): remove last mention to verify_dependency_versions.sh fom tasks.groovy
Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Upgrade to Storybook 6 and attempt to use the declarative configuration.
The goals of this PR (as part of Kibana's Storybook roadmap, are:
Upgrade to Storybook 6
Still allow running Storybooks with yarn storybook plugin_name
Use the declarative configuration to (hopefully) make the configuration simpler to use an easier to understand, as well as avoiding deprecation warnings and loss of future compatibility
The ways in which what I have so far differs from how we do things today are:
In the alias configuration it takes a path to a storybook configuration directory instead of the storybook.js file from before
Each plugin (it doesn't have to be a plugin; can be any directory) has a .storybook/main.js (the aliases file in @kbn/storybook specifies these locations) where they can define their Storybook configuration. You can require('@kbn/storybook').defaultConfig to get defaults and override them
@kbn/storybook has a preset that can provide Webpack and Babel configuration and Storybook parameters and decorators
Instead of dynamically creating the list of stories to import, we define them in the globs of the stories property in .storybook/main.js.
Do not build a DLL. We are using @kbn/ui-shared-deps as externals. Startup time is not quite as fast but still acceptable.
Other things done in this PR:
Allow default exports in .stories. to allow for Common Story Format CSF stories
Add guard in Webpack configuration needed for overriding CSS rules
Update filename casing check to allow for files with required names in Storybook
Clean up observability stories
Rename *.examples.tsx and *.story.tsx to *.stories.tsx
* Updating the version of the elasticsearch-js Client
* ES Client methods aren't implicitly bound to the Client anymore
* Adjusting mocks to work with prototypical inheritance
* Fixing effects of ping returning a Boolean, now.
* Updating @elastic/elasticsearch to 7.9.1
* Responding to @restrry's feedback
* Now with destructuring...
* Update to latest rum-react
The latest version fixes a problem where you would get a bunch of warnings that you couldn't turn off if you used `render` instead of component with a route. This was causing us to use `component` in some places where `render` should be used.
The latest version fixes this problem so we change back to `render`
where appropriate.
Also make our `ApmRoute` a `Route` instead of `any`.
* adds "Creates timeline" test
* deletes timeline events spec
* completes assertions
* comments assertion
* fixes typecheck error
* waits for all the changes in the timeline to be performed before creating a new timeline and closing the toggle
* fixes failing problem
* fixes loop script
* makes test realiable on visual mode
* fixes merge issue
* makes test more reliable
* fixes typecheck issue
* fixes typecheck
* opens timeline from timeline settings
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
The removed resolutions are no longer needed because the packages that
originally depended on the incompatible versions have either been
removed or upgraded.
* move deprecations and raw loader to package
* move config service to package
* start to adapt the usages
* adapt yet more usages
* update generated doc
* move logging types to `@kbn/logging`
* update generated doc
* add yarn.lock symlink
* merge @kbn-logging PR
* adapt Env.createDefault
* update generated doc
* remove mock exports from the main entrypoint to avoid importing it in production code
* use dynamic require to import `REPO_ROOT` from bootstrap file
* move logger mock to kbn-logging package
* address review comments
* import PublicMethodOf from kbn/utility-types
* fix import conflict
* update generated doc
* use the @kbn/std package
* update generated doc
* adapt plugin service mock
Moves common utility functions to obtain the repository root,
paths (config/data), and Kibana package.json to a @kbn/utils package.
Moving these existing functions allows them to be used in production, in
other packages because of Kibana.
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Fixes storybook anomaly score generation and better utilizes available screen space
* Closes#71770 for APM service maps by replacing breadthfirst layout with
one from the cytoscape-dagre extension. Also replaces the taxi edges
with cubic bezier edges. Finally, this adds the ability to drag
individual nodes around the service map.
* Removes unused code
* removes commented line of code
* - Adds ability for scripts/notice.js to check files with the .tsx file extension
- Adds attribution for `applyCubicBezierStyles`
* Refine comment text and MIT license url
* Add Kea 2.20.rc.3
* Remove Kea declarations
* Convert AppLogic files to use new syntax
- Utilizes MakeLogicType to type the logic file and remove bespoke typings
- Use object syntax for actions and reducers, instead of functions
- Add return types to actions in interface
- Remove interfaces from component (Kea does this automagically now)
- Also renamed IAppLogic* to IApp*
* Convert Workplace Search Overview files to use new syntax
- Utilizes MakeLogicType to type the logic file and remove bespoke typings
- Use object syntax for actions and reducers, instead of functions
- Add return types to actions in interface
- Remove interfaces from component (Kea does this automagically now)
- Also renamed mockLogic* to mockApp*
* Convert HttpLogic files to use new syntax
- Utilizes MakeLogicType to type the logic file and remove bespoke typings
- Use object syntax for actions and reducers, instead of functions
- Add return types to actions in interface
- Remove interfaces from component (Kea does this automagically now)
- Also renamed IHttpLogic* to IHttp*
* Convert FlashMessages files to use new syntax
- Utilizes MakeLogicType to type the logic file and remove bespoke typings
- Use object syntax for actions and reducers, instead of functions
- Add return types to actions in interface
- Remove interfaces from component (Kea does this automagically now)
* Remove hand-rolled Kea types
Bye-bye pretty code
* Upgrade to rc4 per author
From Kea author: “I’d suggest upgrading to rc.4 before merging though, as I seem to have committed some optional chaining operators ("?.") into the compiled JS output, which will cause errors if anyone is using an older browser. You can also wait for 2.2.0 final, but that might still be a week or more away…”
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* bump ts to v4
* MOAR RAM
* fix type errors for OSS
* first pass on x-pack errors
* second pass on x-pack type errors
* 3rd pass on x-pack type-errors
* mute errors if complex cases
* don't delete if spread suffices
* mute other complex cases
* make User fields optional
* fix optional types
* fix tests
* fix typings for time_range
* fix type errors in x-pack/tests
* rebuild kbn-pm
* remove leftovers from master update
* fix alert tests
* [Telemetry Checker] TS4 Fixes
* bump to 4.0.1-rc
* fix new errors in master
* bump typescript-eslint to version supporting TS v4 syntax
* fix merge commit errors
* update to the stable TS version 4.0.2
* bump ts-eslint to version supporting ts v4
* fix typo
* fix type errors after merge
* update ts in another new package.json
* TEMP: remove me
* Revert "TEMP: remove me"
This reverts commit dc0fc3bae6.
* [Telemetry] Update snapshot for new TS4 SyntaxKind
* bump prettier to support TS v4 syntax
* fix prettier rules
* last style change
* fix new type errors
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
* Fixed alerting_api_integration/security_and_spaces tests failing if actions proxy set on for parallel process running using commands 'scripts/functional_tests_server' and 'scripts/functional_test_runner'
* -
* Fixed get port from range for Slack and webhook simulators, removed some test warnings
* Added check for listening proxy server
* changed logger to debug removed not useful error
* -
* changed proxy to dynamic target in a single place
* test retry
* -
* -
* -
* -
* test with no cleanup
* -
* -
* -
* -
* Added environment variable ALERTING_PROXY_PORT
* fixed type checks
* fixed clean up proxy server port
* Added proxy support for action types
* Fixed tests
* added rejectUnauthorizedCertificates config setting
* removed slack not used code
* Fixed Slack proxy
* fixed typecheck errors
* Cleanup code
* Fixed slack
* Added unit tests
* added proxy server for test
* Fixed build
* Added functional tests
* fixed due to comments
* Fixed tests and some changes due to comments
* Fixed functional tests
* fixed circular deps
* Added proxy unit test to action type
* Migrated last pieces of legacy fixture code
* Implemented own server for webhook simulator
* Fixed type checks. Moved slack simulator to own server
* close server after tests run
* Fixed due to comments
* fixed failing tests
* Add Kea packages
- kea and kea-waitfor
* Add Kea declarations and types
Hopefully TypeScript support coming soon from author
* Add Kea to entry point
* Add logic for overview
* Update components to use Kea
* Fix a couple of tests that weren’t getting complete coverage
* Remove kea-waitfor
Turns out we don’t need it
* Remove unused declaration
* Update x-pack/plugins/enterprise_search/public/applications/workplace_search/components/overview/overview_logic.ts
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Update x-pack/plugins/enterprise_search/public/applications/workplace_search/components/overview/overview_logic.ts
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Update x-pack/plugins/enterprise_search/public/applications/workplace_search/components/overview/__mocks__/overview_logic.mock.ts
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* Update x-pack/plugins/enterprise_search/public/applications/workplace_search/components/overview/overview_logic.test.ts
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
* [Opinionated] Remove extra actions defs
- they're already being defined in IOverviewActions, so no need to repeat them
* DRY out a new reusable/generics IKeaLogic/Listeners interface
- Multiple logic files can now do IKeaListeners<SomeLogicActions> and not have to declare their own IListenerParams!
+ bonus IKeaSelectors just for consistency
* DRY out Kea reducers definitions to generics interface
* [Refactor] Improve KeaReducers generic to actually type-check/check key names
- Typescript will now throw an error if you put in a key name that isn't declared in your actions/values interface
- default & new states now will be type checked!! 🎉
* [Refactor] Update selectors() and listeners() to also check types and keys
* [Refactor] Move param defs to bottom of file instead of inline
- so that inline definitions mostly focus on type checks, and more boilerplate defs are DRYed out
- I played around with 2.1 obj definitions and got terrible results here :(
* Update tests and remove selectors per code review
* Remove last statsColumns instance
* Remove last instance of hideOnboarding
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Co-authored-by: Constance Chen <constance.chen.3@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [APM] APM & Observability plugin lint improvements
This is a large change, but most of it is automatic `eslint --fix` changes.
* Apply the same ESLint ovderrides in APM and Observability plugins.
* Remove the `no-unused-vars` rule. We can turn on the TypeScript check if needed.
* Check both JS and TS files.
* Add a rule for react function component definitions
* Upgrade eslint-plugin-react to include that rule
* add "@elastic/elasticsearch" to dependencies
* first POC of new client
* add logging
* add generation script for client facade API and implementation
* add back keepAlive
* add exports from client
* add new client mocks
* add some doc
* fix API usages
* rename legacy client to legacy in service
* rename currently unused config/client observable
* wire new client to service & update mocks
* fix mock type
* export client types
* add transport.request
* more doc
* migrate version_check to new client
* fix default port logic
* rename legacy client mocks
* move legacy client mocks to legacy folder
* start adding tests
* add configure_client tests
* add get_client_facade tests
* bump client to 7.8
* add cluster_client tests
* expose new client on internal contract only
* revert using the new client for es version check
* add service level test for new client
* update generated API
* Revert "rename legacy client mocks"
This reverts commit e48f3ad6
* address some review comments
* revert ts-expect-error from unowned files
* move response mocks to mocks.ts
* Remove generated facade, use ES Client directly
* log queries even in case of error
* nits
* use direct properties instead of accessors
* handle async closing of client
* review nits
* ElasticSearchClient -> ElasticsearchClient
* add test for encoded querystring
* adapt test file
* Convert tag cloud tests to jest
* Add mocks to test_utils and remove tests from legacy
* Revert changes made by accident
* Update tag_cloud_visualization.test.js
* Update tag_cloud.test.js
* Update jsdom_svg_mocks.ts
* Add restoring previous value to window.SVGElement.prototype.transform
* Get rid of some deep imports
* Reimport jsdom_svg_mocks functions from test_utils/public
* Get rid of ExprVis by inlining some of its params to vis object
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>