Introduces a page to view results of outlier detection jobs. Users can navigate from the analytics jobs list to the results page by clicking on the View button.
* [Code] change
* [Code] initial commit indexer
* initial call of git commit api
* sync to update-to-date
* Add checkpointing to commit indexer
* fix lint errors
* add git api to pull all commits
* calculate progresses
* unit tests for commit indexer
* add some comments
* minor change
* Custom types file for each export_type
* move get_job_params_from_request
* Update types imports and name refs
* small code change
* cherry-picked change
* Change border color to be darker version of fill color. Pass default colors to color picker swatches
* Fix bug preventing last color from ever being used
* Update line/stroke colors in functional tests
* Fill out default colors with eui vis palette colors. Add black & white to border colors
* Move default colors to color utils and use eui color palette per feedback
* Remove old defaults and update imports
* Update join test to omit color from test since it will change
* Initial work
* Cleanup add createAPIKey fn pt1
* Change getServices function to take request as parameter
* Use API key when executing alerts
* Revert task manager using encrypted saved objects
* Store fired actions within a saved object to encrypt API keys
* Fix fireActionId
* Cleanup code, fix type check error
* Add a type for getScopedSavedObjectsClient
* Fix getBasePath and spaceIdToNamespace functions
* Add safety check for API key and action
* Fix integration tests
* Fix broken jest tests
* Cleanup
* Rename generatedApiKey to apiKeyValue
* Ensure access to action record
* Cleanup
* Add unit tests
* Fix variable conflict
* Revert task manager specific code (no longer needed)
* Remove fire terminology
* Move tests to spaces and security folder
* Use ES Archiver to remove spaces (empty_kibana)
* Fix missing pieces
* Convert action tests to run per user
* Convert alerting tests to run per user
* Fix type check issue
* Fix failing test
* Add callCluster and savedObjectsClient authorization tests
* Make savedObjectsClient return 403 for authorization tests
* Cleanup
* Fix test failure
* Common function to get data from test index
* Create ObjectRemover
* Cleanup
* useApiKey now provided to functions instead of relying on condition of two strings
* Fix typo
* Make tests it(...) start with should
* Rename useApiKey to isSecurityEnabled
* Merge apiKeyId and apiKeyValue into one
* Update docs
* Use feature controls for list alert / action types API
* Remove need to add ! in TypeScript for required plugins
* Fix ESLint issue
* Include actions and alertTypeParams into AAD and genereate new API key on update
* Generate random id for API key name attribute
* Include interval in AAD
* Send pre-encoded string
* Fix ExecutorError
* Fix apiKey snapshot
* Fix 'default' typo
* De-compose apiKey
* Refresh API key when enabling / disabling an alert
* Add updatedBy
* Make unauthorized APIs return 404
* Update KM jobs list title and add tag line and link to docs
* add spaces column to analytics table for use in Kibana management
* add refresh button to kibana management analytics jobs list
* ensure refresh button does not cause bounce when loading
* move refreshInterval hook to page component
* add default value for analyticsTable prop
* [APM] Make aggregations optional in ES response type definition
Closes#43436.
Our type definition for ElasticSearch aggregations suggests that the aggregations key will always be defined if we request aggregations. However, that is not the case, as there is an edge case where if no matching indices were found, the aggregations key will be undefined.
* Review feedback
* Support undefined values in number formatters
* Expect 200s for all API requests even without matching indices
* Bail early for asDynamicBytes as well
* Deleted old kbn-top-nav directive.
Can be merged only when monitoring replace their last usage.
* fix texts
* Remove CSS import
Removed fix to config in monitoring (fix is on #43187)
* rename monitoring directive
## Summary
As described in https://github.com/elastic/siem-team/issues/441, when checking which ML ConfigTemplates are valid to install, a substring of a configured index would match and the job would fail to install. This fixes this by ensuring the complete index name matches.
* [Reporting] Move some log lines out of screenshots/index.ts
* promote some getScreenshots logs from debug to info
* promote some queue lifecycle event logs from debug to info
* Comments and renaming
* more info logging: csv from saved search
* rollback code changes to be done in future PR
* log success above error handling
* [Maps] custom color ramp
* round value down to find center color
* do not update redux state with invalide color stops
* rename EuiColorStop to ColorStop
* remove untracked file
* fix jest tests
* review feedback
* use steps instead of interpolate
* add percy functional test to verify rendering of interpolate and step color expressions
* add padding to color stop row so add/remove icons do not overlap color select
* [watcher] add missing await
* run x-pack-firefoxSmoke ciGroup 40 times, run watcher tests 20 times per job
* Fix failing watcher test
* Revert "run x-pack-firefoxSmoke ciGroup 40 times, run watcher tests 20 times per job"
This reverts commit c5d891d44d.
* Clean up watches via api
* fix linting errors
* don't swallow errors, wait for completion
* strip trailing numbers in suite tags
* run x-pack-firefoxSmoke group 40 times
* Revert "run x-pack-firefoxSmoke group 40 times"
This reverts commit cc4eb6ce54.
* run x-pack-firefoxSmoke group 40 times
# Conflicts:
# .ci/jobs.yml
* run tests 80 times
* Revert "run tests 80 times"
This reverts commit 4320c9488a.
* Revert "run x-pack-firefoxSmoke group 40 times"
This reverts commit cf0d4056d7.
* [Maps] feature geometry filters
* geo field select
* add logic to filter geo fields when geometry is line
* create filters on button click
* support multi_polygon geometries for filtering geo_points
* pass geo field name to filter method
* close tooltip when filter created
* add relation select
* fix jest test
* ui feedback
* fix typo
* review feedback
* call this.props.reevaluateTooltipPosition to ensure tooltip is not clipped
* reset to properties view when tooltip changes location
* Support for logstash
* Beats support
* Fix cherry-pick api issue
* Support for logstash
* Updates for beats and logstash
* APM migration working
* Tweaks for beats migration
* Update copy for setup new button
* If on cloud, disable setup mode
* Handle new beat flow better
* Better phrasing for APM
* Add beat type to disable step
* Fix i18n issue
* Fix jest tests
* Fix api tests
* PR feedback
* Update copy
* Remove unnecessary code
* Support shortcut to finish ES migration if we are on the connected cluster
* Undo changes that are now in a separate PR
* Share code better by exposing a single route with an optional parameter
* Disable more links
* Fix overview link for logstash
* PR feedback
* Fix tests
* PR feedback
* Fix tests
* We still need this route
* Updates
* Only show if there are instances too
* Change how we set the newly discovered cluster uuid
* Move this to support beats/apm weirdness
* Fix tests
* Remove out of date translations
* PR feedback
* Detect products a different way, to detect empty indices
* Look against the production cluster instead of the monitoring one
* When disabling ES internal collection, only disable ES - do not disable all internal collection
* remove duplicate columns declaration
* First iteration of select all menu working
* A lot of bugfixes and started on row-level selection using flatMap
* Wip on row selection
* Fix formatting
* More bug fixes and and first iteration of row selection and column selection working
* Minor refactors, cleaned up logging. Still has nasty UX bug on Popover menu
* Added translations and empty tests
* Tests are WiP
* Move checkboxes out of popover
* Implemented first iteration of select all functionality
* Move row select all into checkbox area
* Remove unused code and simplify select all if-else
* First iteration of tests
* fix tests and update name data-test-subj name
* Move checkboxes into popover with button
* - Fix tests
- Refactor test helpers for metric step
- Cleanup some JS style nits
- Make popover button disabled if all metric checkboxes are disabled
* Remove extra newline
* - Moved constants from metrics to own file so that it's more re-usable
- Removed unnecessary styling
- Fixed typos
- Updated comments
- i18n
* Add snapshot tests for query search params
* Use projections to fetch data
* Add configuration and aggregations for local filters
* Add endpoints for local filters
* UseLocalUIFilters hook
* Parse Local UI filters from URL params
* LocalUIFilters component
* TransactionTypeFilter
* replace useServiceTransactionTypes with useTransactionTypes
* Support transactionType for trace projection/api
* Configure Local UI Filters
* Use units instead of hardcoded px
* Fix i18n error
* Remove unused labels from translation files
* Update URL of API integration test for transaction_types API call
* Revert "replace useServiceTransactionTypes with useTransactionTypes"
This reverts commit bae7fa44a0fc1ace0b498cc78626fabb2d310437.
* Revert "Support transactionType for trace projection/api"
This reverts commit 2edb32cf04ca2c38885c457ba57ce0a1547fd199.
* Remove transaction type filter for traces,error groups
* Address review feedback
* Don't clone in mergeProjection; add tests
* Address review feedback
* Revert transaction_types API path in functional tests
* More review feedback
* More review feedback:
- Add transactions projection
- Merge traces/transaction groups projections
* Don't persist local UI filters in HistoryTabs
* Move projections to server folder
* Move transactionName into options
* Use pod name instead of pod uid
* Move the files around
* Convert Auto Complete to TS. Convert Collectors to ExpressionAST type
* Remove TS-Lint ignores
* Add comment for getFnArgPosition method
* disable job link if ml not enabled in space
* add analytics table in managment page
* update css for analytics table
* only show ML section if license if trial/platinum
* remove actions column for analytics list in KM
* fix typescript error on columns
* update props interface for analytics table
* plain text instead of disabled link if not enabled in space
We collect the boolean configurations which can be derived by any
end-user of Kibana by making any HTTP request. Since the rules
configuration involves strings that can leak identifiable information,
we only collect whether the rules have been changed from their defaults.
# [SIEM] Run Cypress Tests Against Elastic Cloud & Cypress Command Line / Reporting (#42804)
This PR contains enhancements to the `Cypress` end-to-end (e2e) testing support in the SIEM app, as discussed with @spalger
Note: this PR depends on test refactorings in https://github.com/elastic/kibana/pull/42766
## New: Run `Cypress` Tests Against Elastic Cloud
Cypress tests may now be run against a remote Elastic Cloud instance
(override `baseUrl`), interactively or via the command line.
Credentials are specified via `kibna.dev.yml` or environment variables.
## New: Run `Cypress` Tests On the Command Line
Run tests on the command line (override `baseUrl` and pass credentials via
the `CYPRESS_ELASTICSEARCH_USERNAME` and `CYPRESS_ELASTICSEARCH_PASSWORD`
environment variables), via command line.
## New: Reporting
Reports are configured to include:
- An HTML report, suitable for e-mail notifications
- Screenshots
- Junit reports (for integration with Kibana CI)
- Videos (optional)
Reports generated when `Cypress` tests are run on the command line are output
to the `target` directory, which follows specific conventions used by the
Kibana CI process:
* Any directory under `target` that begins with `kibana-`, e.g. `kibana-siem` will be uploaded as an artifact to a bucket
* Junit reports are picked up from the `target/junit` directory
The artifacts generated by running `Cypress` tests on the command line conform to the above conventions.
### HTML Reports
An HTML report (e.g. for email notifications) is output to:
```
target/kibana-siem/cypress/results/output.html
```
### Screenshots
Screenshots of failed tests are output to:
```
target/kibana-siem/cypress/screenshots
```
### `junit` Reports
The Kibana CI process reports `junit` test results from the `target/junit` directory.
Cypress `junit` reports are generated in `target/kibana-siem/cypress/results`
and copied to the `target/junit` directory.
### Videos (optional)
Videos are disabled by default, but can optionally be enabled by setting the
`CYPRESS_video=true` environment variable:
```
CYPRESS_video=true yarn cypress:run
```
Videos are (optionally) output to:
```
target/kibana-siem/cypress/videos
```
# Updated `README`
The full details and instructions for running Cypress tests are in the
`siem/cypress/README.md`, which was updated to reflect the changes
in this in this PR, but in a nutshell, you may run tests interactively with
the following (new) environment variables:
```sh
cd x-pack/legacy/plugins/siem
CYPRESS_baseUrl=http://localhost:5601 CYPRESS_ELASTICSEARCH_USERNAME=elastic CYPRESS_ELASTICSEARCH_PASSWORD=<password> yarn cypress:open
```
Running the command line version of the tests, which will output
the reports described above, is a similar experence:
```sh
cd x-pack/legacy/plugins/siem
CYPRESS_baseUrl=http://localhost:5601 CYPRESS_ELASTICSEARCH_USERNAME=elastic CYPRESS_ELASTICSEARCH_PASSWORD=<password> yarn cypress:run
```
https://github.com/elastic/siem-team/issues/435https://github.com/elastic/siem-team/issues/437
* EUIficate pointe-series and grid
* Apply TS
* Show grid on a panel
* Remove extra space
* Add TS
* Use BasicOptions
* Adjust func test
* Add dataTestSubj prop to SelectOption
* Use id instead of data-sest-subj
* Disable show x-axis lines when there is histogram agg
* Add tooltip for disabled 'Show x-axis lines' config
* Remove extra space
- Fixes a regression where values were not properly extracted from nested objects.
- Moves inline code we had to solve this to a utility function getNestedProperty(). Kibana's idx is a lodash-get replacement with TypeScript support. However, it requires that you'd know the accessor up front, it doesn't work with dynamic string values. getNestedProperty() allows you to pass a string like lodash-get, but it uses idx on the inside so you still get TypeScript support.
* Add ml module with hard-coded timestamp field
* Fix data_recognizer test
* Parameterize the bucket span normalization
* Remove max agg which will be specified during setup
The overrides are recursively merged and therefore additive. Therefore
we can't specify the timestamp agg here, because it could not be
overridden later with a different field and agg name. It needs to be
solely specified at setup time.
- moves use_create_analytics_form.ts inside a use_create_analytics_form directory to be able to split up the large file
- moves code related to the plain reducer function from ``use_create_analytics_form.tsto its own filereducer.ts`
- adds unit tests for use_create_analytics_form.ts and reducer.ts.
- Changes the button and modal header text from 'Create data frame analytics job' to 'Create outlier detection job'.