* 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>
* chore(NA): async import on infra plugin in order to avoid infra plugin on apm
* chore(NA): add async import into infra plugin to reduce apm bundle size
* docs(NA): including small note
* fix(NA): pass pluginsSetup as an argument
* chore(NA): fix missing type
* chore(NA): split register in two functions
* chore(NA): only register once
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
## Summary
* Adds large list support using REST endpoints.
Status:
---
* Currently ready to be merged behind the feature flag of it being disabled with ongoing work happening after it is merged.
* REST Endpoints shouldn't have large refactoring at this point
* Team meeting occurred where the pieces were discussed in person.
What is left?
---
- [ ] Add other data types. At the moment `ip` and `keyword` are the two types of lists. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html
- [x] Unit tests
- [x] Lots of misc TODO's in the code base still
- [ ] Import loads everything into memory first when it should attempt streaming
- [ ] Add end to end backend tests
- [x] Add transform and io-ts validation for returns
Testing
---
Ensure you set this in your ENV before starting Kibana:
```ts
export ELASTIC_XPACK_SIEM_LISTS_FEATURE=true
```
Download or create a large list file such as this one filled with IP's:
https://cinsscore.com/list/ci-badguys.txt
Go to your REST endpoint folder of scripts:
```ts
cd kibana/x-pack/plugins/lists/server/scripts
```
Do a hard reset:
```ts
./hard_reset
```
Then import it as either a data type of `ip`:
```ts
./import_list_items_by_filename.sh ip ~/Downloads/ci-badguys-smaller.txt
```
Or as a `keyword`
```ts
./import_list_items_by_filename.sh keyword ~/Downloads/ci-badguys-smaller.txt
```
Then you can export it through:
```ts
./export_list_items.sh ci-badgusy-smaller.txt
```
For all the other endpoints and testing of the CRUD operations you have access to:
```ts
delete_all_lists.sh
delete_list.sh
delete_list_index.sh
delete_list_item.sh
delete_list_item_by_id.sh
delete_list_item_by_value.sh
export_list_items.sh
export_list_items_to_file.sh
get_list.sh
get_list_item_by_id.sh
get_list_item_by_value.sh
import_list_items.sh
import_list_items_by_filename.sh
lists_index_exists.sh
patch_list.sh
patch_list_item.sh
post_list.sh
post_list_index.sh
post_list_item.sh
```
### Checklist
Delete any items that are not applicable to this PR.
- [ ] [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
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
resolves https://github.com/elastic/kibana/issues/64275
Changes the fields used to query the event log by time range to use the
`@timestamp` field.
Also allow `@timestamp` as a sort option, and make it the default sort option.
Reorganizing, renaming, and generally cleaning up common code in Endpoint.
* Cleaning up `common/types`
* Renaming things
* Adding comments
* Removing `export` when it's not needed
* [Metrics UI] Fixes for editing alerts in alert management
* Change EuiFieldSearch to use onChange instead of onSearch
* Fixing groupBy
* Fixing the correct groupBy
* Fix Datasource API calls to use correct object type in kuery
* Fix policy details showing toaster multiple times
* Fix taking last url param value (instead of first)
* fix: 🐛 subsribe to "abort" event in abort controller
* test: 💍 add test for execution cancellation after completion
* feat: 🎸 use a more meaningful sentinel
* refactor: 💡 use toPromise() from data plugin
* chore: 🤖 disable most new tests
* test: 💍 remove fake timers from abort tests
* test: 💍 remove new tests completely
There seems to be some async race condition in Jest test runner not
related to this PR, but for some reason Jest fails. Removing these tests
temporarily to check if this file cases Jest to fail.
* chore: 🤖 try adding .catch clause to abortion promise
* chore: 🤖 revert tests back and add .catch() comment
* Install prebuilt index templates as v2
* Correctly handle pre-build v1 index templates
* Generate index templates v2 during package install
* Update unit tests for index template v2
* Fix imports.
* Fix types.
* Use index template v2 API for template deletion
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>