resolves https://github.com/elastic/kibana/issues/62668
Adds a property named `rel` to the nested saved objects in the event
documents, whose value should not be set, or set to `primary`.
The query by saved object function changes to only match event documents
with that saved objects if it has the `rel: primary` value.
This is used to limit searching alerting's executeAction event document
with only the alert saved object, and not the action saved object (this
document has an alert and action saved object). The alert saved object
has the `rel: primary` field set, and the action does not. Previously,
those documents were returned with a query of the action saved object.
* Removes plugin dependencies for better integration outside of Requests such as alerting
* Adds more unit tests
* Fixes more TypeScript types to be more normalized
* Makes this work with the user 'elastic' if security is turned off
- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios
* Adjust NewDatasource type to exclude stream `agent_stream` property, add additional datasource hooks
* Initial pass at edit datasource UI
* Clean up dupe code, fix submit button not enabled after re-selecting a package
* Remove delete config functionality from list page
* Show validation errors for data source name and description fields
* Fix types
* Add success toasts
* Review fixes, clean up i18n
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Bind non primary time fields to timepicker
* Fix typescript argument types
* Allow auto interval on all fields
* Remove lens_auto_date function
* Fix existing jest tests and add test todos
* Remove lens_auto_date from esarchives
* Add TimeBuckets jest tests
* Fix typo in esarchiver
* Address review feedback
* Make code a bit better readable
* Fix default time field retrieval
* Fix TS errors
* Add esaggs interpreter tests
* Change public API doc of data plugin
* Add toExpression tests for index pattern datasource
* Add migration stub
* Add full migration
* Fix naming inconsistency in esaggs
* Fix naming issue
* Revert archives to un-migrated version
* Ignore expressions that are already migrated
* test: remove extra spaces and timeField=\\"products.created_on\\"} to timeField=\"products.created_on\"}
* Rename all timeField -> timeFields
* Combine duplicate functions
* Fix boolean error and add test for it
* Commit API changes
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Marta Bondyra <marta.bondyra@elastic.co>
* [Maps] do not display EMS or kibana layer wizards when not configured
* default tilemap to empty object instead of array
* fix typo
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* link to installed version of detail page
* add latestVersion property to EPM get package endpoint
* add updates available notices
* add update package button
* handle various states and send installedVersion from package endpoint
* fix type errors
* fix install error because not returning promises
* track version in state
* handle unsuccessful update attempt
* remove unused variable
1. we need our redux actions for our telemetry middleware, which:
2. require types from an index file, which:
3. includes all of our model types, and everything involved in them
By moving these types to a separate file and importing _that_instead, we
bypass inclusion of 2 and 3 in our plugin, which equates to ~550kB (of a
total of ~600kB).
* Adds telemetry API tests for oss
* Modifies test expectations to match that within oss
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* set files to track for coverage collection
* increase timeout to 4h
* trying to add detectOpenHandles to avoid worker stuck
* update config
* make config paths more common
* update configs
* update jest oss config
* exclude 'tests' folder for coverage
* Add set-value as an explicit dependency
This is a more robust solution than lodash's set().
* Replace lodash.set() with set-value's equivalent
* Rebuild renovate config
We added set-value to our dependencies.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* convert into TS
* load plugin scripts in html body
* use buildNum as a unique Id for cache busting
* add tests for caching
* fix tests
* remove the last TODO. url should be inlined with assetss server
* this logic handled by publicPathMap on the client
* cache kbn-shared-deps as well
* attempt to fix karma tests
* always run file through replace stream
* place buildHash at begining of path, include all static files
* update bundles_route tests to inject buildNum everywhere
* fix karma config to point to right prefix
* use isDist naming throughout
* explain magic number with variables
* restore replacePublicPath option from #64226
* replace one more instance of replacePublicPath
* use promisify instead of bluebird + non-null assertions
* remove one more magic number
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Completes the migration of all Alerting Services plugins onto the Kibana Platform
It includes:
1. Actions plugin
2. Alerting plugin
3. Task Manager plugin
4. Triggers UI plugin
And touches the Uptime and Siem plugins as their use of the Task Manager relied on some of the legacy lifecycle to work (registering AlertTypes and Telemetry tasks after the Start stage has already began). The fix was simply to moves these registrations to the Setup stage.
* feat: don't use auto interval to get interval for single bar
* fix: fixing non auto intervals
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Move uptime legacy server to plugins directory.
* Re-add feature registration code.
* Move uptime legacy server to plugins directory.
* Re-add feature registration code.
* Move all files.
* WIP fixing things.
* WIP fixing things.
* WIP fixing things.
* Finished fixing server.
* Fix alert type registration glitch.
* Remove obsolete file.
* Fix unwanted revisions, uncomment previously un-migrated code, delete accidentally-merged files.
* More cleanup.
* Fix all non-maps unit tests.
* Get functional tests working.
* Delete misplaced file.
* Add uptime CODEOWNERS entry.
* Get map working in Uptime app on NP.
* Update CODEOWNERS to remove legacy entry.
* Update server imports.
* Delete and clean up unused or redundant code/comments.
* Move new files from legacy to NP to fix merge error.
* Fix broken import.
* Delete obsolete test snapshots.
* Clean up imports and types, delete obsolete code.
* Clean up redundant common imports.
* Delete obsolete translation keys.
* Add additional explicit typing to plugin class.
* Combine redundant common imports.
* Delete unneeded optionalPlugin entry.
* Revert "Combine redundant common imports."
This reverts commit 159e66c349.
* Update a translation description.
* Revert "Clean up redundant common imports."
This reverts commit 8794013fbe.
* Remove new common index file and revert imports from only common to more specific paths.
* Fix broken imports in `~/x-pack/test`.
* Move new file from legacy to NP location.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* init routes for template timeline
* create template timeline
* add create/update timelines route
* update api entry point
* fix types
* add template type
* fix types
* add types and template timeline id
* fix types
* update import timeline to handle template timeline
* unit test
* sudo code
* remove class for savedobject
* add template timeline version
* clean up arguments
* fix types for framework request
* show filter in find
* fix create template timeline
* update mock data
* handle missing timeline when exporting
* update the order for timeline routes
* update schemas
* move type to common folder so we can re-use them on UI and server side
* fix types + integrate persist with epic timeline
* update all timeline when persit timeline
* add timeline api readme
* fix validation error
* fix unit test
* display error if unexpected format is given
* fix issue with reftech all timeline query
* fix flashing timeline while refetch
* fix types
* fix types
* fix dependency
* fix timeline deletion
* remove redundant dependency
* add i18n message
* fix unit test
Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Cleanup .eslingignore and add target
Since adding the new platform plugins target directories, we need to
update the eslintignore to reflect that.
Did a bit of organizing of the file for some sanity.
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>