* Making saveMethod mandatory in attribute service
* Making unwrap method mandatory
* Making book embeddable respect new attribute service
* Remove savedObjectsClient from attribute service
* Add checkForDuplicateTitle method to book embeddable
* Make options mandatory on attribute service
* Changing Lens attribute service
* Somw more typescript fixes
* Fixing attribute service typescript and tests
* Fixing typescript errors
* Unsetting feature flag
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* bump query-string version to remove manual type definitions
* remove manual type declaration
* add kibana_utils tsconfig
* add refs to kibana_utils tsconfig
* add kibana_utils to the project list
* add kibana_react project
* add support for x-pack/tsconfig.refs.json
* add ts project for x-pack licensing plugins
* add glob for ts projects in src/plugins & x-pack/plugins
* add refs to projects in examples
* fix ref paths in x-pack/test
* address mistic comments
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [Dashboard][Embeddable] Add placeholder title to embeddable panel, stored 'show panel title' prop in embeddable input.
Co-authored-by: Maja Grubic <maja.grubic@elastic.co>
* feat: 🎸 add grouping to presentable interface
* feat: 🎸 add group to "Explore underlying" data action
* refactor: 💡 return panel list and simplify context creation
* refactor: 💡 simplify context menu builder code
* refactor: 💡 further simplify context menu builder code
* feat: 🎸 add grouping to context menu builder
* feat: 🎸 add icon to drilldowns group
* fix: 🐛 sort in the other order
* feat: 🎸 group drilldown actions in edit mode
* fix: 🐛 fix TypeScript error
* feat: 🎸 wrap long context menu list into a submenu
* feat: 🎸 improve context menu long list wrapping
* feat: 🎸 display drilldowns panel at the bottom of main panel
* feat: 🎸 add separator line for context menu
* test: 💍 add basic context menu builder unit tests
* feat: 🎸 remove meta decoratiosn from generated menu
* test: 💍 add test subject attribute to "More" menu item
* chore: 🤖 remove separator line and add comment about EUI
* test: 💍 update Jest snapshots
* chore: 🤖 revert back change of showing both drilldown options
* test: 💍 add context menu samples to example plugin
* feat: 🎸 collapse long groups into a sub-panel
* test: 💍 add context menu panel edit mode examples
* test: 💍 fix OSS functional test
* test: 💍 fix X-Pack functional tests
* fix: 🐛 re-introduce item sorting by title
* test: 💍 allow explicitly opening more menu
* test: 💍 try opening more panel in functional tests
* test: 💍 disable some tests
* chore: 🤖 remove unused code
* test: 💍 use action test helper in unit tests
* refactor: 💡 add helper utility to generate actions in examples
* test: 💍 disable one more functional test
* test: 💍 improve how inspector is opened in functional tests
* test: 💍 enable functional test
* refactor: 💡 convert test suite to typescript
* test: 💍 move panel replace tests into a separate test suite
* test: 💍 move panel cloning tests to a separate test suite
* test: 💍 set up dashboard context menu test suite
* test: 💍 enable few panel context menu tests
* test: 💍 enable saved search panel tests
* test: 💍 enable expanded panel context menu tests
* test: 💍 remove render complete awaits
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Grouped features for space management
* Apply suggestions from code review
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
* Address PR Feedback
* docs changes
* updating types/docs
* update APM feature name
* Reintroduce extraAction following EUI update
* change ordering of infra features, and render callout for management category
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@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
* 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
* 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>
* improve test stability
* Use new client
* docs
* Use asyncSearch endpoints
* Clean up types
* Use transport request for now
* fixes
* Fix functional test
* encode
* remove eslint
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* improve test stability
* query string input manager (needed for search demo)
* docs
* dashboard
* Fix jest
* mock fix
* Allow restoring a saved query
* sync url
* Luke's fix to test
* cleanup
* lens jest tests
* docs
* use queryStringManager.getDefaultQuery
Don't sync query to global state
* Update app.test.tsx
lens mock
* jest fix
* jest
* use new api in the example
* Rename state param to query to match url state
* Apply changes to discover
* Update src/plugins/data/public/query/query_string/index.ts
Co-authored-by: Anton Dosov <dosantappdev@gmail.com>
* Improve query string state manager
* Cleanup dashboard code
* Handle refresh button
* Set initial dashboard state
* visualize state
* remove unused
* docs
* fix example
* fix jest
* fix filter app state in discover
* fix maps test
* jest
Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
Co-authored-by: Anton Dosov <dosantappdev@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This PR removes the alerting and actions ui privileges (alerting:show, actions:show, etc...) and instead relies on the standard Kibana feature control model to decide whether management displays the Alerts Management section under management.
This PR adds _Role Based Access-Control_ to the Alerting framework & Actions feature using Kibana Feature Controls, addressing most of the Meta issue: https://github.com/elastic/kibana/issues/43994
This also closes https://github.com/elastic/kibana/issues/62438
This PR includes the following:
1. Adds `alerting` specific Security Actions (not to be confused with Alerting Actions) to the `security` plugin which allows us to assign alerting specific privileges to users of other plugins using the `features` plugin.
2. Removes the security wrapper from the savedObjectsClient in AlertsClient and instead plugs in the new AlertsAuthorization which performs the privilege checks on each api call made to the AlertsClient.
3. Adds privileges in each plugin that is already using the Alerting Framework which mirror (as closely as possible) the existing api-level tag-based privileges and plugs them into the AlertsClient.
4. Adds feature granted privileges arounds Actions (by relying on Saved Object privileges under the hood) and plugs them into the ActionsClient
5. Removes the legacy api-level tag-based privilege system from both the Alerts and Action HTTP APIs
* Add a few asciidoc readmes
* add updated code-exploration. Need to fix the script in another go to add asciidoc support. The snippet didn't show up anyway.
Added an attribute service to embeddable start contract which provides a higher level abstraction for embeddables that can be by reference OR by value. Added an example that uses this service.
* [search] Refactor the way search strategies are registered/retrieved on the server
* Fix types and tests and update docs
* Fix failing test
* Fix build of example plugin
* Fix functional test
* Make server strategies sync
* Move strategy name into options
* docs
* Remove FE strategies
* TypeScript of hell
delete search explorer
* Fix search interceptor OSS tests
* typos
* test cleanup
* Delete search example
fix interceptor async tests to use fake timers
* docs
* fix
* return search wrapper
* Update search interceptor tests and abort utils
* ts
* jest test fix
* code review
* change how logs consume search API
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [search] Refactor the way search strategies are registered/retrieved on the server
* Fix types and tests and update docs
* Fix failing test
* Fix build of example plugin
* Fix functional test
* Make server strategies sync
Co-authored-by: Liza K <liza.katz@elastic.co>
Added example for using dashboard container by value
1.1 Refactored embeddable explorer e2e test to use new example, removed not needed kbn_tp_embeddable_explorer plugin.
For embeddable explorer examples went away from using getFactoryById() to improve type checks
There is new component a replacement for EmbeddableFactoryRenderer with slightly more flexible api: EmbeddableRenderer.
3.1 We can improve it going forward to support more use case
* Add async search strategy
* Add async search
* Fix async strategy and add tests
* Move types to separate file
* Revert changes to demo search
* Update demo search strategy to use async
* Add async es search strategy
* Return response as rawResponse
* Poll after initial request
* Add cancellation to search strategies
* Add tests
* Simplify async search strategy
* Move loadingCount to search strategy
* Update abort controller library
* Bootstrap
* Abort when the request is aborted
* Add utility and update value suggestions route
* Fix bad merge conflict
* Update tests
* Move to data_enhanced plugin
* Remove bad merge
* Revert switching abort controller libraries
* Revert package.json in lib
* Move to previous abort controller
* Add support for frozen indices
* Fix test to use fake timers to run debounced handlers
* Revert changes to example plugin
* Fix loading bar not going away when cancelling
* Call getSearchStrategy instead of passing directly
* Add async demo search strategy
* Fix error with setting state
* Update how aborting works
* Fix type checks
* Add test for loading count
* Attempt to fix broken example test
* Revert changes to test
* Fix test
* Update name to camelCase
* Fix failing test
* Don't require data_enhanced in example plugin
* Actually send DELETE request
* Use waitForCompletion parameter
* Use default search params
* Add support for rollups
* Only make changes needed for frozen indices/rollups
* Only make changes needed for frozen indices/rollups
* Add back in async functionality
* Fix tests/types
* Fix issue with sending empty body in GET
* Don't include skipped in loaded/total
* Don't wait before polling the next time
* Add search interceptor for bulk managing searches
* Simplify search logic
* Fix merge error
* Review feedback
* UI to stop async searches
* Add service for running beyond timeout
* Refactor abort utils
* Remove unneeded changes
* Add tests
* Refactor search service to register strategies directly
* Remove accidental change
* re-generate docs
* Fix merge
* types
* doc
* eslint
* Fix async strategy jest test
* type fix
* Use getStartServices in search strategies
* Code review + snapshot
* eslint
* Type script
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Liza K <liza.katz@elastic.co>
* Kibana developer examples
* Batch explorer tests should be run in examples config
* Fix tests
* add codeowner for new developer examples plugin & readme cleanup
* Try to frame embeddable wording based on what a developer's goals are.
* Add noopener noreferer, fix bad merge
* Remove bfetch.png
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Allow registered alert types to be non-editable
* Fixed isUiEditEnabled values
* Fixed due to comments
* fixed failing tests
* Enable alert type selection per alert consumer, only 'alerting' consumer can display other consumers alert types, but in case if it isEditable
* fixed tests
* Removed consumer property from the client side alert type registry and added server side property producer which purpose is to manage a feature logic
* fixed type check
* Fixed tests and type checks
* Removed error message for non registered plugins
* Fixed failing tests
* Fixed due to comments
* fixed test
* -
* revert logic for requiresAppContext
* Added close toast after saving alert
* Added support for docLinks plugin in Connectors forms and missing save capabilities for modal dialog
* Fixed tests
* Extended alert context with application capabilities
* Fixed due to comments
* Fixed typecheck
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
The needed change is to rely on history as source of truth for location instead of window.location.
btw, This makes possible to test state syncing utils integration using createMemoryHistory()
One issue was discovered after this change:
When switching from context to discover url was incorrect. history.location inside state syncing utils didn't get the last update. This happened, because history instance created in discover wasn't used in context app and when all listeners unsubscribed from it - it stopped receiving location updates. To fix this I just reused one history instance in discover, context and their kbnUrlTracker
* Add embeddable via saved object example
* give todoRefEmbed a different name from the by value one
* fix types
* fix order of unmounting
Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>