* Added Test for event.library
* renamed data directry and gzip data file
* rename expectedData file
* Changes per Charlie request
* Changes for the enable_APM-ci branch
* Update resolver.ts
* Added comment per Charlie request
* Update resolver.ts
* Added Alert Test for Resolver and fix for the APM enabled Run fail
* Added Alert Test for Resolver and fix for the APM enabled Run fail
* removed commented out code
* Fixing CI fail
* Fixing CI fail
* Removed Alert Resolver test
* aAdding Alert test back
* Adding Alert test back
* Adding Alert test back
* Adding info log for debuging
* Adding info log for debuging
* Adding info log for debuging
* Adding info log for debuging
* Adding info log for debuging
* Adding info log for debuging
* adding one more verification for Data
* stripedd Data file
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* resolves https://github.com/elastic/kibana/issues/78148
Adds a `defaultActionMessage` to the index threshold alert, so that the `message` parameter for actions will be pre-filled with a useful message
Adds a `RunsWhen` field to actions in the Alerts Flyout when creating / editing an Alert which allows the user to assign specific actions to a certain Action Groups
* Implemented Alerting health status pusher by using task manager and status pooler for Kibana status plugins 'kibanahost/api/status'
* Exposed health task registration to alerts plugin
* Fixed type error
* Extended health API endpoint with info about decryption failures, added correct health task implementation
* adjusted query
* Tested locally and got it working as expected, fixed tests and type check
* Added unit tests
* Changed AlertExecutionStatusErrorReasons to be enum
* Uppercase the enum
* Replaced string values to enum
* Fixed types
* Extended AlertsClient with getHealth method
* added return type to healthStatus$
* Added configurable health check interval and timestamps
* Extended update core status interval to 5mins
* Fixed failing tests
* Registered alerts config
* Fixed date for ok health state
* fixed jest test
* fixed task state
* Fixed due to comments, moved getHealth to a plugin level
* fixed type checks
* Added sorting to the latest Ok state last update
* adjusted error queries
* Fixed jest tests
* removed unused
* fixed type check
* Update renderer handlers when element is changed
* Update handlers before render
* Add canvas functional test for filters
* Update snapshot and remove log
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## 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.
* [Visualizations] New vis wizard
* Update functional tests
* Create oss plugins for maps and lens and unregister alias function
* Add new plugins to .i18nrc.json
* Add readme and codeowners to the new plugins
* update docs
* fix tests
* fix types
* fixes
* Update development docs
* fix oss functional tests
* Fix jest and x-pack functional tests
* Fix functional test
* changes on the layout
* Cleanup and responsiveness
* cleanup unecessary code
* add common folder to the new OSS plugins
* remove unecessary translations
* Update limits.yml file
* Fix basic label
* Add experimental badge on controls vis
* Nice improvements
* fixes
* Improving styles
* Making modal go full height on smaller screens
* Fixing sass lint warning
* fix lint error
* fix internationalization error
* PR fixes
* PR changes
* Use useCallback where possible
* Remove translations that need to be translated again
* Lazy Load wizard modal
* Remove legacyMapVisualizationWarning
* Import the OSS plugins constants from the plugins
* Export constant from lensOss
* Change the new oss plugins from OSS to Oss
* Add a new line to the kibana.json files of the new plugins
* New nit fix
* Fix spaces
* Change the texts for the first step of the modal
* Fix test
* Fixes some of the PR comments
* Add onClick funtionality to the entire aggregation based card
* Cards description changes, introduce a copyFromRoot method to solve the problem of when disabling the x-pack plugic, to also disable the oss
* Create new FTR for testing the functionality of the wizard when both maps and lens apps are disabled
* fix eslint error
* Change groupTitles and descriptions
* Change input vis description
* Remove the copyFromRoot from the signature of the ConfigDeprecationFactory and export it from the main entrypoint
* Make the disabled cards badge clickable
* Changes from code review
* Fix functional tests failures
* Rename groupTitle to titleInWizard to be more specific
* Change vega vis note
* minor design changes
* fix problem with plugins list docs
* Retrieve maps and lens landing page from docs service and add tracking url param
* Fix funtional test for the new dashboard flow
* Fix logic in alias registry for removing the discardOnRegister alias
* no need to remove the alias entry from the discardOnRegister array
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: miukimiu <elizabet.oliveira@elastic.co>
## Summary
Fixes: https://github.com/elastic/kibana/issues/82148
We have errors and do not generate a signal when a source index already has utilized and reserved the "signal" field for their own data purposes. This fix is a bit tricky and has one medium sized risk which is we also support "signals generated on top of existing signals". Therefore we have to be careful and do a small runtime detection of the "data shape" of the signal's data type. If it looks like the user is using the "signal" field within their mapping instead of us, we move the customer's signal into "original_signal" inside our "signal" structure we create when we copy their data set when creating a signal.
To help mitigate the risks associated with this critical bug with regards to breaking signals on top of signals I have:
* This adds unit tests
* This adds end to end tests for testing generating signals including signals on signals to help mitigate risk
The key test for this shape in the PR are in the file:
```
detection_engine/signals/build_event_type_signal.ts
```
like so:
```ts
export const isEventTypeSignal = (doc: BaseSignalHit): boolean => {
return doc._source.signal?.rule?.id != null && typeof doc._source.signal?.rule?.id === 'string';
};
```
Example of what happens when it does a "move" of an existing numeric signal keyword type:
```ts
# This causes a clash with us using the name signal as a numeric.
PUT clashing-index/_doc/1
{
"@timestamp": "2020-10-28T05:08:53.000Z",
"signal": 1
}
```
Before, this was an error. With this PR it now will restructure this data like so when creating a signal along with additional signal ancestor information, meta data. I omitted some of the data from the output signal for this example.
```ts
{
... Other data copied ...
"signal":
{
"original_signal": 1 <--- We "move it" here now
"parents":
[
{
"id": "BhbXBmkBR346wHgn4PeZ",
"type": "event",
"index": "your-index-name",
"depth": 0
},
],
"ancestors":
[
{
"id": "BhbXBmkBR346wHgn4PeZ",
"type": "event",
"index": "your-index-name",
"depth": 0
},
],
"status": "open",
"depth": 1,
"parent":
{
"id": "BhbXBmkBR346wHgn4PeZ",
type: "event",
"index": "your-index-name",
"depth": 0
},
"original_time": "2019-02-19T17:40:03.790Z",
"original_event":
{
"action": "socket_closed",
"dataset": "socket",
"kind": "event",
"module": "system"
},
}
```
### Checklist
- [x] [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
* Adding action group id to event log. Showing action group as part of status in alert details view
* Simplifying getting action group id
* Cleanup
* Adding unit tests
* Updating functional tests
* Updating test
* Fix types check
* Updating test
* PR fixes
* PR fixes
* Properly handle kibana assets with underscores in their path
* Recomment test
* Fix type check
* Don't install index patterns that are reserved
* Introduce SavedObjectType to use on AssetReference
* Fix Test
* Update install.ts
Use new `dataTypes` const which replaced `DataType` enum
* Update install.ts
Remove unused `indexPatternTypes` from outer scope
* Update install.ts
fix (?) bad updates from before where new/correct value was used but result wasn't exported
* Update install.ts
* Update install.ts
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: John Schulz <john.schulz@elastic.co>
* Init connector
* Add test
* Improve comment type
* Add integration tests
* Fix i18n
* Improve tests
* Show unknown when username is null
* Improve comment type
* Pass connector to case client
* Improve type after PR #82125
* Add comment migration test
* Fix integration tests
* Fix reporter on table
* Create case connector ui
* Add connector to README
* Improve casting on executor
* Translate name
* Improve test
* Create comment type enum
* Fix type
* Fix i18n
* Move README to cases
* Filter out case connector from alerting
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
* [test] Updates rollup test to allow incoming doc_count field mapper
A doc_count field mapper was added in
https://github.com/elastic/elasticsearch/pull/64503
This is currently failing the ES promotion. After this promotion, we can
go back and update this test to be an exact match on the body if we
think that is the desired assertion.
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
This PR adds screenshot comparison tests for the nodes in the graph on the test plugin.
Run the tests using this command:
`yarn test:ftr --config x-pack/test/plugin_functional/config.ts --grep Resolver`
* wip
* wip
* Adding aggregation option to find function and using those results in UI
* Requesting aggregations from client instead of hard-coding in route
* alert_api test
* i18n fix
* Adding functional test
* Adding unit test for filters
* Splitting into two API endpoints
* Fixing test
* Fixing test
* Adding comment
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* create xpack plugin skeleton, start to implement management section
* add tag creation modal
* first implementation of the tags table
* use InMemoryTable
* add edit modal and delete action
* update plugin list
* add tag list, fix types
* add capabilities check on client-side
* add tag combo box component
* add missing i18n keys
* fix privilege FTR tests
* add base structure for FTR tests
* fix feature ftr test
* use string literals for i18n
* create savedObjectsTaggingOss plugin, move API types to oss plugin, start to wire to SO management page.
* update plugin list
* fix types
* allow to use `_find` with multiple references
* add FTR test for _find API on references fields
* add _find integration tests
* update generated doc
* start to implement tag filtering on SO management section
* update generated docs
* wire tagging API to dashboard listing page
* fix i18n namespace
* fix type & tests
* update dashboard listing snapshots
* adapt FTR listingTable service to search for parsable queries
* wite tagging API to visualize listing
* update tagging plugin limits
* add server-side and client-side validation for tag create/edit
* rename title field to name
* fix types
* fix types bis
* add removeReferencesTo API to SOR/SOC
* update generated doc
* add server-side unit test for `savedObjectsTagging` plugin
* move tagging API types to its own file
* add savedObjectsTaggingOss mock
* add tags_cache tests
* add tests for client-side tag client
* extract uiApi to distinct files
* various API improvements
* add more tests
* add link between tag and so management sections + add connection counts
* add base functional test suite for tagging
* add more FTR tests
* improve feature control func test
* update codeowners
* update generated doc
* fix access to proxy modal
* adapt SO save modal to allow to add tag field
* add SO decorator registry and tag implementation
* add unit tests for SO tag decorator
* add functional tests for visualize integration
* add tag SO read permission for vis/dash feature
* add RBAC api integ tests
* add API integration tests
* add test for getTagConnectionsUrl
* add SOM test suite
* add dashboard integration suite
* remove test line
* add missing unit tests
* improve API types doc
* fix create modal save button label
* remove console.log
* improve doc
* self review
* add refresh interval for tag cache
* improve page object doc
* minor cleanup
* address review comments
* small layout fixes
* add initial focus
* use lazy accessor for tag request handler context
* adapt SOM export and export route to handle references
* remove icon from feature config due to master changes
* fix SO table tests
* update generated docs
* sort tags by name in filter dropdown and listing component
* wire SO tagging to dashboard save modal
* fix types
* - add 'create tag' action in tag selector
- add notifications on update/create/delete from management
- delete modal wording
* add description max length validation
* remove real-time validation
* fix i18n bundle id
* update expected size of savedObjectsTagging plugin
* use own useIfMounted
* update limit again, contract components cannot be lazy loaded atm.
* math is hard
* remove single usage of lodash for bundle size
* add async imports for create/edit modal
* add FTR test for 'create tag' action from tag selector
* allow 'create new' option to prepopulate name field
* extract savedObjectToTag
* add advancedSettings read user for security api_integ suite
* add audit login for security client wrapper
* use import type when possible
* wire SO tagging to lens visualization
* fix lens jest test
* Fix `create tag` option being selected when closing the selector dropdown
* add sorting to tag column from getTableColumnDef
* address some of restrry comments
* rename tag selector's setSelected option to onTagsSelected
* fix audit logging even type for saved_object_remove_references
* update plugin size limit to current size
* adapt maxlength validation wording
* remove selection column until we have batch action menu
* remove connections link when user lack read privilege to savedObjectManagement
* forbid registering multiple SO decorators with the same priority
* add so decorator test
* extract getTagFindReferences and create API mock
* update audit-logging ascidoc
* doc nit
* throw conflict error if update returns any failure
* use refresh=true as default
* wording nits
* export: rename `references` to `hasReference`
* update generated doc
* set description max length to 100
* do not initialize tag cache on anonymous pages
* split fetchObjectsToExport into two distinct functions
* change tag client `delete` call order
* tsdoc nits
* more nits
* add README for oss plugin
* add oss plugin start tests
* SavedObject.find: rename `references` to `hasReference`
* change section description label
* remove url prefix constants
* last nits and comments
* update generated doc
* 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>
* spiked intervals in alerts
* ensure scheduled tasks dont get wiped
* Fixed type checks and unit tests
* Added simple test, which only covers successful case when edit happened right after task was complete previous execution
* fixed jest
* fallback to existing task schedule when possible
* added missing test
* Added support for day and hour schedule interval values
* added docs for new schedule run result
* fixed doc
* added UnrecoverableError support for task runners nad pluged it into alerting where needed
* typo
Co-authored-by: Yuliia Naumenko <yuliia.naumenko@elastic.com>
* [ML] fix callout styles
* [ML] refactor timeseriesexplorer.js, add series_controls.tsx, storage support for partition config
* [ML] anomalousOnly support
* [ML] sort by control
* [ML] update query
* [ML] sort order controls
* [ML] adjust query
* [ML] merge default and local configs, add info
* [ML] fix types, adjust sorting logic for model plot results
* [ML] fix translation keys
* [ML] fixed size for the icon flex item
* [ML] fix time range condition, refactor
* [ML] change info messages and the icon color
* Fix model plot info message
Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>
* [ML] functional tests
* [ML] rename ML_ENTITY_FIELDS_CONFIG
* [ML] support manual input
* [ML] show max record score color indicator
* [ML] use :checked selector
* [ML] refactor functional tests
* [ML] extend config with "applyTimeRange", refactor with entity_config.tsx
* [ML] info messages
* [ML] remove custom message
* [ML] adjust the endpoint
* [ML] customOptionText
* [ML] sort by name UI tweak
* [ML] change text
* [ML] remove TODO comment
* [ML] fix functional test
* [ML] move "Anomalous only"/"Apply time range" control to the bottom of the popover
* [ML] update types