* Fixed adding an extra space character on selecting alert variable in action text fields.
* Made components for variables to be able to insert the variable by the cursor position
* cleanup
* Added variables support for all components
* update on handle selections for text
* Fixed functional tests
* [Maps] show vector tile labels on top
* experiment with new sort algorithm
* clean up
* remove old sort method
* add unit test for sort layer
* tslint
* clean up
* make labelsOnTop configurable
* tslint
* more tslint
* add another test case for single layer move
* clarify should messages
* fix assert not null operators
* review feedback
* update snapshot
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* chore(NA): upgrade oss to lodash4
chore(NA): migrate cli, cli_plugin, cli_keystore, dev, test_utils and apm src script to lodash4
chore(NA): missing file for cli plugin
chore(NA): add src core
chore(NA): es archiver and fixtures
chore(NA): try to fix functional test failure
chore(NA): migrate src/legacy entirely to lodash4 except src/legacy/core_plugins
chore(NA): move legacy core plugins to lodash4
chore(NA): upgrade optimize to lodash4
chore(NA): upgrade to lodash4 on advanced_settings, charts, console and dashboard
chore(NA): migrate to lodash4 on dev_tools, discover, embeddable, es_ui)shared, expressions, home plugins
chore(NA): upgrade data plugin to lodash4
chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4
chore(NA): missing data upgrades to lodash4
Revert "chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4"
This reverts commit 137055c5fed2fc52bb26547e0bc1ad2e3d4fe309.
Revert "Revert "chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4""
This reverts commit f7e73688782998513d9fb6d7e8f0765e9beb28d1.
Revert "chore(NA): missing data upgrades to lodash4"
This reverts commit 92b85bf947a89bfc70cc4052738a6b2128ffb076.
Revert "chore(NA): upgrade data plugin to lodash4"
This reverts commit 88fdb075ee1e26c4ac979b6681d8a2b002df74c6.
chore(NA): upgrade idx_pattern_mgt, input_control_vis, inspector, kbn_legacy, kbn_react, kbn_usage_collections, kbn_utils, management and maps_legacy to lodash4
chore(NA): map src plugin data to lodash3
chore(NA): missing lodash.clonedeep dep
chore(NA): change packages kbn-config-schema deps
chore(NA): update renovate config
chore(NA): upgrade vis_type plugins to lodash4
chore(NA): move vis_type_vislib to lodash3
chore(NA): update visualizations and visualize to lodash4
chore(NA): remove lodash 3 types from src and move test to lodash4
chore(NA): move home, usage_collection and management to lodash 3
Revert "chore(NA): move home, usage_collection and management to lodash 3"
This reverts commit f86e8585f02d21550746569af54215b076a79a3d.
chore(NA): move kibana_legacy, saved_objects saved_objects_management into lodash3
chore(NA): update x-pack test to mock lodash4
Revert "chore(NA): move kibana_legacy, saved_objects saved_objects_management into lodash3"
This reverts commit 2d10fe450533e1b36db21d99cfae3ce996a244e0.
* chore(NA): move x-pack and packages to lodash 4
* chore(NA): remove mention to lodash from main package.json
* chore(NA): remove helper alias for lodash4 and make it the default lodash
* chore(NA): fix last failing types in the repo
* chore(NA): fix public api
* chore(NA): fix types for agg_row.tsx
* chore(NA): fix increment of optimizer modules in the rollup plugin
* chore(NA): migrate `src/core/public/http/fetch.ts` (#5)
* omit undefined query props
* just remove merge usage
* fix types
* chore(NA): fixes for feedback from apm team
* chore(NA): recover old behaviour on apm LoadingIndeicatorContext.tsx
* chore(NA): fixes for feedback from watson
* Platform lodash4 tweaks (#6)
* chore(NA): fix types and behaviour on src/core/server/elasticsearch/errors.ts
* Canvas fixes for lodash upgrade
* [APM] Adds unit test for APM service maps transform (#7)
* Adds a snapshot unit test for getConnections and rearranges some code to make testing easier
* reverts `ArrayList` back to `String[]` in the painless script within `fetch_service_paths_from_trace_ids.ts`
* chore(NA): update yarn.lock
* chore(NA): remove any and use a real type for alerts task runner
Co-authored-by: Gidi Meir Morris <github@gidi.io>
* chore(NA): used named import for triggers_actions_ui file
* chore(NA): fix eslint
* chore(NA): fix types
* Delete most uptime lodash references.
* Simplify. Clean up types.
* [Uptime] Delete most uptime lodash references (#8)
* Delete most uptime lodash references.
* Simplify. Clean up types.
* chore(NA): add eslint rule to avoid using lodash3
* chore(NA): apply changes on feedback from es-ui team
* fix some types (#9)
* Clean up some expressions types.
* chore(NA): missing ts-expect-error statements
* Upgrade lodash 4 vislib (#11)
* replace lodash 3 with lodash 4 on vislib plugin
* Further changes
* further replacement of lodash3 to 4
* further work on upgrading to lodash 4
* final changes to update lodash
* chore(NA): upgrade data plugin to lodash4
chore(NA): upgrade data plugin public to lodash4
chore(NA): fix typecheck task
chore(NA): fix agg_config with hasIn
chore(NA): assign to assignIn and has to hasIn
chore(NA): upgrade data plugin server to lodash4
chore(NA): new signature for core api
fix(NA): match behaviour between lodash3 and lodash4 for set in search_source
* chore(NA): remove lodash3 completely from the repo
* chore(NA): fix x-pack/test/api_integration/apis/metrics_ui/snapshot.ts missing content
* chore(NA): fix lodash usage on apm
* chore(NA): fix typecheck for maps
* Patch lodash template (#12)
* Applying changes from https://github.com/elastic/kibana/pull/64985
* Using isIterateeCall, because it seems less brittle
* Also patching `lodash/template` and `lodash/fp/template`
* Reorganizing some files...
* Revising comment
* Ends up `_` is a function also... I hate JavaScript
Co-authored-by: Pierre Gayvallet <pierre.gayvallet@gmail.com>
Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Oliver Gupte <ogupte@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Gidi Meir Morris <github@gidi.io>
Co-authored-by: Justin Kambic <justin.kambic@elastic.co>
Co-authored-by: Stratoula Kalafateli <stratoula1@gmail.com>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
Co-authored-by: kobelb <brandon.kobel@elastic.co>
### Summary
On initial render of the SIEM pages, a 400 error was showing for POST http://localhost:5601/api/detection_engine/signals/search. This PR is a temporary fix for this bug. This initial call is being used to populate the Last alert text that shows at the top of a number of the pages. The reason the size was 0 is because we weren't interested in the signals themselves, just the timestamp of the last alert. Teamed up with @XavierM and it seems to us that the issue is the server side validation. It may be Hapi misreading the 0 as false or our updated validation not accepting size 0.
As the base assets will be shipped by ES directly, the base package is not needed anymore. https://github.com/elastic/elasticsearch/pull/57629
In the future we might reintroduce it to update the installed assets.
* updates apm integration job to work with service maps
* rename apm job in setup_module test
* modifies detector description
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
In https://github.com/elastic/package-registry/issues/517 the naming of the file paths inside a package is standardised to only use `_` and not `-`. This adjusts the paths for `ilm-policy`, `component-template`, `index-template` to the correct path.
An additional change here is to get rid of assets we don't support yet, like rollup jobs and ml jobs. We will reintroduce these when we support them.
* Sort endpoint responses into indices and datastreams
The server endpoint for policies now returns data streams and
filters out backing indices from the indices array it returned
previously
* Refactor indices switch and field out of the step settings file
* Fix indices field form behaviour
* WiP on UI. Added the second table per mockup for add and edit.
* add support for creating a policy that backs up data streams end to end
* wip on restore flow - added data streams to server response
* add logic for detecting whether an index is part of a data stream
* fix public jest tests
* fix server side jest tests
* pivot to different solution in UI while we do not have data streams nicely separated
* added data stream to snapshot summary details
* move the data streams badge file closer to where it used
* add data stream badge when restoring snapshots too
* update restore copy
* fix pattern specification in indices and data streams field
* first iteration of complete policy UX
* First iteration that is ready for review
Given the contraints on working with data streams and indices in policies
at the moment the simplest implementation is to just include data streams
with indices and have the user select them there for now.
The way snapshotting behaviour is currently implemented relies entirely
on what is specified inside of "indices", this is also where data
streams must be placed. This unfortunately means that capture patterns
defined in indices will capture entire data streams too.
* delete unused import
* fix type issue in tests
* added logic for rendering out previous selection as custom pattern
* refactor indices fields to make component smaller
* added CIT for data streams badge
* Data streams > indices
* updates to relevant pieces of copy
* more copy updates
* fix types and remove unused import
* removed backing indices from restore view
* Added data stream restore warning message
* restore CITs
* first round of copy feedback
* refactor help text to provide clearer feedback, for both restore and policy forms
* Restore updates
- added spacer between title and data streams callout
- added copy to the restore settings tab to indicate that settings
also apply to backing indices
* further copy refinements
* second round of copy feedback
* fix i18n
* added comment to mock
* line spacing fixes and created issue for tracking backing index discovery in snaphots
* refactor collapsible list logic and tests
* refactor editing managed policy check
* refactor copy to be clearer about pluralisation of data streams
* refactor file structure in components for data stream badge
* added tests for indices and data streams field helper
* refactored types and fixed i18n id per guidelines
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Refactor generator for ancestry support
* Adding optional ancestry array
* Refactor the pagination since the totals are not used anymore
* Updating the queries to not use aggregations for determining the totals
* Refactoring the children helper to handle pagination without totals
* Pinning the seed for the resolver tree generator service
* Splitting the fetcher into multiple classes for msearch
* Updating tests and api for ancestry array and msearch
* Adding more comments and fixing type errors
* Fixing resolver test import
* Fixing tests and type errors
* Fixing type errors and tests
* Removing useAncestry field
* Fixing test
* Removing useAncestry field from tests
* An empty array will be returned because that's how ES will do it too
* improved error messages
* traverse recursive error struct
* add check for object with keys
* update button position and copy
* size adjustments
* Refactor i18n texts and change wording
Also added missing translation and refactored maximum errors in
collapsed state to external constant
* use io-ts, add CIT and unit tests
* refactor error utilities to separate file
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* changing transaction count to transaction rate per second
* sanity check coordinates before calculate the mean
* sanity check coordinates before calculate the mean
* removing extend_bounds to return empty when no data is available
* stub out task for the exceptions list packager
* Hits list code and pages
* refactor
* Begin adding saved object and type definitions
* Transforms to endpoint exceptions
* Get internal SO client
* update messaging
* cleanup
* Integrating with task manager
* Integrated with task manager properly
* Begin adding schemas
* Add multiple OS and schema version support
* filter by OS
* Fixing sort
* Move to security_solutions
* siem -> securitySolution
* Progress on downloads, cleanup
* Add config, update artifact creation, add TODOs
* Fixing buffer serialization problem
* Adding cleanup to task
* Handle HEAD req
* proper header
* More robust task management
* single -> agnostic
* Fix OS filtering
* Scaffolding digital signatures / tests
* Adds rotue for creating endpoint user
* Cleanup
* persisting user
* Adding route to fetch created user
* Addings tests for translating exceptions
* Adding test for download API
* Download tweaks + artifact generation fixes
* reorganize
* fix imports
* Fixing test
* Changes id of SO
* integration tests setup
* Add first integration tests
* Cache layer
* more schema validation
* Set up for manifest update
* minor change
* remove setup code
* add manifest schema
* refactoring
* manifest rewrite (partial)
* finish scaffolding new manifest logic
* syntax errors
* more refactoring
* Move to endpoint directory
* minor cleanup
* clean up old artifacts
* Use diff appropriately
* Fix download
* schedule task on interval
* Split up into client/manager
* more mocks
* config interval
* Fixing download tests and adding cache tests
* lint
* mo money, mo progress
* Converting to io-ts
* More tests and mocks
* even more tests and mocks
* Merging both refactors
* Adding more tests for the convertion layer
* fix conflicts
* Adding lzma types
* Bug fixes
* lint
* resolve some type errors
* Adding back in cache
* Fixing download test
* Changing cache to be sized
* Fix manifest manager initialization
* Hook up datasource service
* Fix download tests
* Incremental progress
* Adds integration with ingest manager for auth
* Update test fixture
* Add manifest dispatch
* Refactoring to use the same SO Client from ingest
* bug fixes
* build renovate config
* Fix endpoint_app_context_services tests
* Only index the fields that are necessary for searching
* Integ test progress
* mock and test city
* Add task tests
* Tests for artifact_client and manifest_client
* Add manifest_manager tests
* minor refactor
* Finish manifest_manager tests
* Type errors
* Update integ test
* Type errors, final cleanup
* Fix integration test and add test for invalid api key
* minor fixup
* Remove compression
* Update task interval
* Removing .text suffix from translated list
* Fixes hashes for unit tests
* clean up yarn.lock
* Remove lzma-native from package.json
* missed updating one of the tests
Co-authored-by: Alex Kahan <alexander.kahan@elastic.co>
* Fixed assertion to check through all indices before making assertion.
* Restored yarn.lock file.
* Removed only from describe.
* Fixed linting issue.
* Fixed nits that were in the PR conversation.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
### Summary
This PR creates the bulk functionality of the exception builder. The exception builder is the component that will be used to create exception list items. It does not deal with the actual API creation/deletion/update of exceptions, it does contain an `onChange` handler that can be used to access the exceptions. The builder is able to:
- accept `ExceptionListItem` and render them correctly
- allow user to add exception list item and exception list item entries
- accept an `indexPattern` and use it to fetch relevant field and autocomplete field values
- disable `Or` button if user is only allowed to edit/add to exception list item (not add additional exception list items)
- displays `Add new exception` button if no exception items exist
- An exception item can be created without entries, the `add new exception` button will show in the case that an exception list contains exception list item(s) with an empty `entries` array (as long as there is one exception list item with an item in `entries`, button does not show)
- debounces field value autocomplete searches
- bubble up exceptions to parent component, stripping out any empty entries
* Rename `datasource` saved object to `package_config` (SO type `ingest-datasource` to `ingest-package-config`) and adjust mappings:
- Remove unused `processors` field on input & stream levels
- Remove unnecessary `enabled` field on package config & input levels
- Rename `agent_stream` field to `compiled_stream`
- Reorder other fields so that important fields are closer to top & similar fields are grouped together
Also,
- Remove 7.9.0 migrations as we are not supporting an upgrade path from experimental to beta release
* Pluralize `ingest-package-configs` for consistency
* Rename `Datasource`-related types to `PackageConfig`, update all references (does not include actual type definition changes yet)
* Rename `Datasource` schemas and rest spec typings to `PackageConfig` (does not include actual schema changes yet)
* Change `datasources` on agent config typings and schemas to `package_configs` and update all references
* Add back `enabled` field on package config and input levels. They are needed for current & future UI features. Also:
- Match types and schemas with saved object mappings (`agent_stream` to `compiled_stream`, removal of `processors`)
- Set `namespace` to be a required property on agent config and package config types, add validation support for it on UI
* Rename server-side datasource references in file names, variable names, and routes
* Update spec file and schema file
* Update doc wording
* Rename all instances of datasource in file paths and variable names on client sides, and for Endpoint too
* Minor copy adjustments, fix i18n check
* Replace datasource references in tests and fixtures; remove unused `ingest/policies` es archiver data
* Fix tests
* Fix test field name
* Fix test fixtures fields again
* Fix i18n
* Use modern mount context in Dev Tools and Console, and clean up plugin definitions of Grok Debugger, Search Profiler, and Painless Lab.
* Remove return value from Console lifecycle method.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Refactor generator for ancestry support
* Adding optional ancestry array
* Fixing tests and type errors
* Removing useAncestry field
* Fixing test
* An empty array will be returned because that's how ES will do it too
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Add wrapper function to make an AbortSignal arg optional
Components commonly do not care about aborting a request, but are
required to pass `{ signal: new AbortController().signal }` anyway. This
addresses that use case.
* Adds hook for retrieving the component's mount status
This is useful for dealing with asynchronous tasks that may complete
after the invoking component has been unmounted. Using this hook,
callbacks can determine whether they're currently unmounted, i.e.
whether it's safe to set state or not.
* Add our own implemetation of useAsync
This does not suffer from the Typescript issues that the react-use
implementation had, and is generally a cleaner hook than useAsyncTask as
it makes no assumptions about the underlying function.
* Update exported Lists API hooks to use useAsync and withOptionalSignal
Removes the now-unused useAsyncTask as well.
* Add some JSDoc for our new functions
* add _meta field to index templates
* fix typescript issue
* make package an object
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* refactor: 💡 rename folder to "explore_data"
* style: 💄 check for "share" plugin in more semantic way
"explore data" actions use Discover URL generator, which is registered
in "share" plugin, which is optional plugin, so we check for its
existance, because otherwise URL generator is not available.
* refactor: 💡 move KibanaURL to a separate file
* feat: 🎸 add "Explore underlying data" in-chart action
* fix: 🐛 fix imports after refactor
* feat: 🎸 add start.filtersFromContext to embeddable plugin
* feat: 🎸 add type checkers to data plugin
* feat: 🎸 better handle empty filters in Discover URL generator
* feat: 🎸 implement .getUrl() method of explore data in-chart act
* feat: 🎸 add embeddable.filtersAndTimeRangeFromContext()
* feat: 🎸 improve getUrl() method of explore data action
* test: 💍 update test mock
* fix possible stale hashHistory.location in discover
* style: 💄 ensureHashHistoryLocation -> syncHistoryLocations
* docs: ✏️ update autogenerated docs
* test: 💍 add in-chart "Explore underlying data" unit tests
* test: 💍 add in-chart "Explore underlying data" functional tests
* test: 💍 clean-up custom time range after panel action tests
* chore: 🤖 fix embeddable plugin mocks
* chore: 🤖 fix another mock
* test: 💍 add support for new action to pie chart service
* feat: 🎸 enable "Explore underlying data" action for Lens vis
* test: 💍 make tests green again
* refactor: 💡 rename trigger contexts
* chore: 🤖 fix TypeScript errors
Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* remove unused piece of state
* Move related event total calculation to selector
* rename xScale
* remove `let`
* Move `dispatch` call out of HTTP try-catch
* add POC logic to modify the 'from' param in the search
* fixes formatting for appending gap diff to from
* computes new max signals based on how many intervals of rule runs were missed when gap in consecutive rule runs is detected
* adds logging, fixes bug where we could end up with negative values for diff, adds calculatedFrom to the search after query
* remove console.log and for some reason two eslint disables were added so i removed one of them
* rename variables, add test based on log message - need to figure out a better way to test this
* remove unused import
* fully re-worked the algorithm for searching discrete time periods, still need search_after because a user could submit a rule with a custom maxSignals so that would still serve a purpose. This needs heavy refactoring though, and tests.
* updated loop to include maxSignals per time interval tuple, this way we guarantee maxSignals per full rule interval. Needs some refactoring though.
* move logic into utils function, utils function still needs refactoring
* adds unit tests and cleans up new util function for determining time intervals for searching to occur
* more code cleanup
* remove more logging statements
* fix type errors
* updates unit tests and fixes bug where search result would return 0 hits but we were accessing property on non-existent hit item
* fix rebase conflict
* fixes a bug where a negative gap could exist if a rule ran before the lookback time, also fixes a bug where the search and bulk loop would return false when successful.
* gap is a duration, not a number.
* remove logging variable
* remove logging function from test
* fix type import from rebase with master
* updates missed test when rebased with master, removes unused import
* modify log statements to include meta information for logged rule events, adds tests
* remove unnecessary ts-ignores
* indentation on stringify
* adds a test to ensure we are parsing the elapsed time correctly
* Switches mount callbacks to only use start deps
Fixes#58014
* Sets up skeleton logs data fetchers for overview
* Fixes type hacks for logs fetcher
* Prevent kibana from crashing on initial load
* Fixes types and linting errors
* Fixes some linting import/export issues
Co-authored-by: Alejandro Fernández Gómez <alejandro.fernandez@elastic.co>
Fixes a race condition where the ML plugin would be mounted before receiving its first license information update and thus redirecting to a fallback page (Kibana Home, Space-Chooser or Data Visualizer page depending on the setup).
* ts-ignore --> ts-expect-error
* fix error with mutable array
* fix errors in consumers code
* update SOM
* fix FeatureConfig & Feature compatibility
* do not re-export from code. it breaks built version
* update docs
* add eslint rule for platform team code
* remove test. this is covered by ts-expect-error in unit tests
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
## Summary
* Moves querying and tests from server to common
The function we are interested using on the front end is:
```ts
export const getQueryFilter = (
query: Query,
language: Language,
filters: Array<Partial<Filter>>,
index: Index,
lists: ExceptionListItemSchema[]
) => {
```
### Checklist
- [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
* Add pure API functions and react hooks for value list APIs
This also adds a generic hook, useAsyncTask, that wraps an async
function to provide basic utilities:
* loading state
* error state
* abort/cancel function
* Fix type errors in hook tests
These were not caught locally as I was accidentally running typescript
without the full project.
* Document current limitations of useAsyncTask
* Defines a new validation function that returns an Either instead of a tuple
This allows callers to further leverage fp-ts functions as needed.
* Remove duplicated copyright comment
* WIP: Perform request/response validations in the FP style
* leverages new validateEither fn which returns an Either
* constructs a pipeline that:
* validates the payload
* performs the API call
* validates the response
and short-circuits if any of those produce a Left value.
It then converts the Either into a promise that either rejects with the
Left or resolves with the Right.
* Adds helper function to convert a TaskEither back to a Promise
This cleans up our validation pipeline considerably.
* Adds request/response validations to findLists
* refactors private API functions to accept the encoded request schema
(i.e. snake cased)
* refactors validateEither to use `schema.validate` instead of
`schema.decode` since we don't actually want the decoded value, we just
want to verify that it'll be able to be decoded on the backend.
* Refactor our API types
* Add request/response validation to import/export functions
* Fix type errors
* Continue to export decoded types without a qualifier
* pull types used by hooks from their new location
* Fix errors with usage of act()
* Attempting to reduce plugin bundle size
By pulling from the module directly instead of an index, we can
hopefully narrow down our dependencies until tree-shaking does this for
us.
* useAsyncFn's initiator does not return a promise
Rather than returning a promise and requiring the caller to handle a
rejection, we instead return nothing and require the user to watch the
hook's state.
* success can be handled with a useEffect on state.result
* errors can be handled with a useEffect on state.error
* Fix failing test
Assertion count wasn't updated following interface changes; we've now
got two inline expectations so this isn't needed.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Works-ish
* Load the default view without throwing error
* Design feedback
* Update Saved Views design on Metrics explorer
* Fix types
* UX improvements when saving and editng
* Only load default view if there is no state from anywhere else.
* Add loading indicator and other polish
* Hide saved view menu when opening modals
* Fix typecheck
* Fix typo
* Fix translations
* using test_user with limited read permission to search profiler test
* gitcheck
* search profiler test using test_user
* using limited roles and privileges for CCR
* changed the global ccr role kibana section to be consistent with other roles with no feature controls
* removed canvas role
* changes to include pagination for 100 rows
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Update EPM package registry typings to reflect registry changes
* Change `dataset.id` references to `dataset.name`
* Fix RegistryStream
* Fix packageToConfigDatasourceInputs service
* Fix assignPackageStream service
* Fix validateDatasource service
* Fix configure data source components
* Fix variable
* Fix stream template installation
* Add support for `input[].dataset.type` and change `stream.dataset` mapping to be object containing `name` with instead of just a string
* Nest package information under `meta` in agent config yaml
* Move `dataset.type` to stream level instead of input level
* Make single call to fetch registry package information instead of doing it per stream
* Fix type issues
* Update endpoint test assertion
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [ui-shared-deps] include styled-components
* update snapshots caused by react-is upgrade
* fix jest snapshots
* declare react-is dep in x-pack too so it uses the right version
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* fixes 'sets and reads the url state for timeline by id' test
* fixes merge issue
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* refactor: 💡 rename folder to "explore_data"
* style: 💄 check for "share" plugin in more semantic way
"explore data" actions use Discover URL generator, which is registered
in "share" plugin, which is optional plugin, so we check for its
existance, because otherwise URL generator is not available.
* refactor: 💡 move KibanaURL to a separate file
* feat: 🎸 add "Explore underlying data" in-chart action
* fix: 🐛 fix imports after refactor
* feat: 🎸 add start.filtersFromContext to embeddable plugin
* feat: 🎸 add type checkers to data plugin
* feat: 🎸 better handle empty filters in Discover URL generator
* feat: 🎸 implement .getUrl() method of explore data in-chart act
* feat: 🎸 add embeddable.filtersAndTimeRangeFromContext()
* feat: 🎸 improve getUrl() method of explore data action
* test: 💍 update test mock
* fix possible stale hashHistory.location in discover
* style: 💄 ensureHashHistoryLocation -> syncHistoryLocations
* docs: ✏️ update autogenerated docs
* test: 💍 add in-chart "Explore underlying data" unit tests
* test: 💍 add in-chart "Explore underlying data" functional tests
* test: 💍 clean-up custom time range after panel action tests
* chore: 🤖 fix embeddable plugin mocks
* chore: 🤖 fix another mock
* test: 💍 add support for new action to pie chart service
* feat: 🎸 add kibana.yml to disable in-chart "explore data" actio
Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* move last snapshot to inline
* move legacy files to legacy subfolder
* move request types out of legacy
* export Headers from http instead of elasticsearch
* renaming - first pass
* renaming - second pass
* fix core mocks
* adapt new calls
* update generated doc
* fix IT test mocks
* fix new usages
* Update Canvas Plugin documentation
* Small fix
* Update x-pack/plugins/canvas/README.md
Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
* Update x-pack/plugins/canvas/README.md
Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
* Update x-pack/plugins/canvas/README.md
Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
* Update x-pack/plugins/canvas/README.md
Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
* Update x-pack/plugins/canvas/README.md
Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
* Update x-pack/plugins/canvas/README.md
Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
* Update x-pack/plugins/canvas/README.md
Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
* Update x-pack/plugins/canvas/README.md
Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
* Update x-pack/plugins/canvas/README.md
Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
* rollover data stream when index template mappings are not compatible
* update error messages
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Partially disable test files.
* Use DockerServers in EPM tests.
* Only run tests when DockerServers have been set up
* Reenable ingest manager API integration tests
* Pass new test_packages to registry container
* Enable DockerServers tests in CI.
* Correctly serve filetest package for file tests.
* Add helper to skip test and log warning.
* Reenable further file tests.
* Add developer documentation about Docker in Kibana CI.
* Document use of yarn test:ftr
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [APM] Use licensing from context
We added the usage of `featureUsage.notifyUsage` from the licensing plugin in #69455.
This required us to use `getStartServices to add `licensing` to `context.plugins`.
In #69838 `featureUsage` was added to `context.licensing`, so we don't need to add it to `context.plugins`.
## [Security] `Investigate in Resolver` Timeline Integration
This PR adds a new `Investigate in Resolver` action to the Timeline, and all timeline-based views, including:
- Timeline
- Alert list (i.e. Signals)
- Hosts > Events
- Hosts > External alerts
- Network > External alerts
![investigate-in-resolver-action](https://user-images.githubusercontent.com/4459398/85886173-c40d1c80-b7a2-11ea-8011-0221fef95d51.png)
### Resolver Overlay
When the `Investigate in Resolver` action is clicked, Resolver is displayed in an overlay over the events. The screenshot below has placeholder text where Resolver will be rendered:
![resolver-overlay](https://user-images.githubusercontent.com/4459398/85886309-10f0f300-b7a3-11ea-95cb-0117207e4890.png)
The Resolver overlay is closed by clicking the `< Back to events` button shown in the screenshot above.
The state of the timeline is restored when the overlay is closed. The scroll position (within the events), any expanded events, etc, will appear exactly as they were before the Resolver overlay was displayed.
### Case Integration
Users may link directly to a Timeline Resolver view from cases via the `Attach to new case` and `Attach to existing case...` actions show in the screenshot below:
![case-integration](https://user-images.githubusercontent.com/4459398/85886773-e3587980-b7a3-11ea-87b6-b098ea14bc5f.png)
![investigate-in-resolver](https://user-images.githubusercontent.com/4459398/85885618-daff3f00-b7a1-11ea-9356-2e8a1291f213.gif)
When users click the link in a case, Timeline will automatically open to the Resolver view in the link.
### URL State
Users can directly share Resolver views (in saved Timelines) with other users by copying the Kibana URL to the clipboard when Resolver is open.
When another user pastes the URL in their browser, Timeline will automatically open and display the Resolver view in the URL.
### Enabling the `Investigate in Resolver` action
In this PR, the `Investigate in Resolver` action is only enabled for events where all of the following are true:
- `agent.type` is `endpoint`
- `process.entity_id` exists
### Context passed to Resolver
The only context passed to `Resolver` is the `_id` of the event (when the user clicks `Investigate in Resolver`)
### What's next?
- @oatkiller will replace the placeholder text shown in the screenshots above with the actual call to Resolver in a separate PR
- I will follow-up this PR with additional tests
- The action text `Investigate in Resolver` may be changed in a future PR
- Hide the `Add to case` action in timeline-based views (it's currently visible, but disabled)