* [Maps] unify legend for percentiles, interpolate, and custom ordinal color breaks (#85343)
* [Maps] unify legend for percentiles, interpolate, and custom ordinal color breaks
* unify mapbox style expression
* snapshot updates
* update jest expects
* use less than and great than symbol for first and last stop
* tslint
* do not show legend if customColorRamp is not provided
* update functional test expects
* update functional test expect
* update mapbox expect expressions in join functional tests
* update mvt expects
* revert mapbox style expression changes for interpole color ramp
* add greater then and equal to symbol for last stop
* disable stop input for first ordinal color stop
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* fix crossmerge
Co-authored-by: Nathan Reese <reese.nathan@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
**Addresses:** https://github.com/elastic/kibana/issues/76587
## Summary
In this PR I'm doing basically 2 things:
1. Making readonly callouts we have in Detections `primary` instead of `warning` and thus persistable in local storage (if a callout is dismissed, we remember it there)
2. Creating a reusable implementation for that.
TODO:
- [x] Adjust all callouts used in Detections to be of type `primary`
- [x] Implement the local storage logic (dumb)
- [x] Implement the local storage logic (reusable)
- [x] Add a new user role: "Reader" (read-only user)
- [x] Add Cypress tests
Out of scope:
- Add unit tests. I'll probably address this in a follow-up PR. Do you think it's worth it or better to wait until the rework (see the next point)?
- Rework callouts to standardise them across Detections, Cases and other parts of the Security app? See my comment below in this PR.
## Screen recordings
Quick demo of how this implementation works:
- [primary callouts](https://drive.google.com/file/d/1SYQd_ihKPvzlVUxELI8qNEqLBOkL18Gd/view?usp=sharing)
- [warning, danger](https://drive.google.com/file/d/1lrAFPyXNjOYSiEsUXxY_fjXsvmyDcdWY/view?usp=sharing) (callout types here were manually adjusted)
## Additional notes
Cypress tests are based on the work done in https://github.com/elastic/kibana/pull/81866.
![](https://puu.sh/GXwOd/1c855cb03f.png)
* [Maps] unify legend for percentiles, interpolate, and custom ordinal color breaks
* unify mapbox style expression
* snapshot updates
* update jest expects
* use less than and great than symbol for first and last stop
* tslint
* do not show legend if customColorRamp is not provided
* update functional test expects
* update functional test expect
* update mapbox expect expressions in join functional tests
* update mvt expects
* revert mapbox style expression changes for interpole color ramp
* add greater then and equal to symbol for last stop
* disable stop input for first ordinal color stop
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Setup] Add EuiCardTo helper
* Set up very basic DocumentCreationLogic file modal management
* Create buttons and modal components
* Update EngineOverviewEmpty to use only DocumentCreationButtons
- Remove API section/example/constants for now: per design discussion, we'll be moving this section into the document creation modal
- Move preceding DOCUMENT_CREATION_DESCRIPTION paragraph directly into DocumentCreationButtons, since the Documents view will just use this verbatim
* Update Documents view Index Documents button to show DocumentsCreationModal
- with some extra logic to add a new creationStep view
+ some minor test cleanup / clarification for openDocumentCreation
* Update Crawler button with conditional check
- Forgot to port this over initially
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
resolves https://github.com/elastic/kibana/issues/75601
Previously, if a context variable that is an object is referenced in a
mustache template used as an action parameter, the resulting variable
expansion will be `[Object object]`. In this PR, we change this so that
the expansion is a JSON representation of the object.
This is primarily for diagnostic purposes, so that customers can see
all the context variables available, and their values, while testing
testing their alerting actions.
* Initial structure of migration state-action machine
* Fix type import
* Retries with exponential back off
* Use discriminated union for state type
* Either type for actions
* Test exponential retries
* TaskEither types for actions
* Fetch indices instead of aliases so we can collect all index state in one request
* Log document id if transform fails
* WIP: Legacy pre-migrations
* UPDATE_TARGET_MAPPINGS
* WIP OUTDATED_DOCUMENTS_TRANSFORM
* Narrow res types depending on control state
* OUTDATED_DOCUMENTS_TRANSFORM
* Use .kibana instead of .kibana_current
* rename control states TARGET_DOCUMENTS* -> OUTDATED_DOCUMENTS*
* WIP MARK_VERSION_INDEX_READY
* Fix and expand INIT -> * transition tests
* Add alias/index name helper functions
* Add feature flag for enabling v2 migrations
* split state_action_machine, reindex legacy indices
* Don't use a scroll search for migrating outdated documents
* model: test control state progressions
* Action integration tests
* Fix existing tests and type errors
* snapshot_in_progress_exception can only happen when closing/deleting an index
* Retry steps up to 10 times
* Update api.md documentation files
* Further actions integration tests
* Action unit tests
* Fix actions integration tests
* Rename actions to be more domain-specific
* Apply suggestions from code review
Co-authored-by: Josh Dover <me@joshdover.com>
* Review feedback: polish and flesh out inline comments
* Fix unhandled rejections in actions unit tests
* model: only delay retryable_es_client_error, reset for other left responses
* Actions unit tests
* More inline comments
* Actions: Group index settings under 'index' key
* bulkIndex -> bulkOverwriteTransformedDocuments to be more domain specific
* state_action_machine tests, fix and add additional tests
* Action integration tests: updateAndPickupMappings, searchForOutdatedDocuments
* oops: uncomment commented out code
* actions integration tests: rejection for createIndex
* update state properties: clearer names, mark all as readonly
* add state properties currentAlias, versionAlias, legacyIndex and test for invalid version scheme in index names
* Use CONSTANTS for constants :D
* Actions: Clarify behaviour and impact of acknowledged: false responses
* Use consistent vocabulary for action responses
* KibanaMigrator test for migrationsV2
* KibanaMigrator test for FATAL state and action exceptions in v2 migrations
* Fix ts error in test
* Refactor: split index file up into a file per model, next, types
* next: use partial application so we don't generate a nextActionMap on every call
* move logic from index.ts to migrations_state_action_machine.ts and test
* add test
* use `Root` to allow specifying oss mode
* Add fix and todo tests for reindexing with preMigrationScript
* Dump execution log of state transitions and responses if we hit FATAL
* add 7.3 xpack tests
* add 100k test data
* Reindex instead of cloning for migrations
* Skip 100k x-pack integration test
* MARK_VERSION_INDEX_READY_CONFLICT for dealing with different versions migrating in parallel
* Track elapsed time
* Fix tests
* Model: make exhaustiveness checks more explicit
* actions integration tests: add additional tests from CR
* migrations_state_action_machine fix flaky test
* Fix flaky integration test
* Reserve FATAL termination only for situations which we never can recover from such as later version already migrated the index
* Handle incompatible_mapping_exception caused by another instance
* Cleanup logging
* Fix/stabilize integration tests
* Add REINDEX_SOURCE_TO_TARGET_VERIFY step
* Strip tests archives of */.DS_Store and __MAC_OSX
* Task manager migrations: remove invalid kibana property when converting legacy indices
* Add disabled mappings for removed field in map saved object type
* verifyReindex action: use count API
* REINDEX_BLOCK_* to prevent lost deletes (needs tests)
* Split out 100k docs integration test so that it has it's own kibana process
* REINDEX_BLOCK_* action tests
* REINDEX_BLOCK_* model tests
* Include original error message when migration_state_machine throws
* Address some CR nits
* Fix TS errors
* Fix bugs
* Reindex then clone to prevent lost deletes
* Fix tests
Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: pgayvallet <pierre.gayvallet@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Copy SourceLogic to AddSourceLogic
This commit merely copies SourceLogic and renames it to AddSourceLogic with the name of the component and interfaces changed. This will make reviewing the changes easier later
* Delete duplicated logic data
* Update component paths
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Maps] provide function to create basemap layer descriptor
* update typing
* update APM map to use createBasemapLayerDescriptor
* fix useLayerList jest test
* tslint fixes
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Initial work
* Change messaging from copy
* Fix jest tests for email connector
* Fix jest tests for alerts plugin
* Update copy
* Use server.publicBaseUrl
* Fix jest tests
* Update tests
* Cleanup jest test
* Code cleanup
* Improve email parameter names for kibana footer url
* Cleanup
* Add test for kibana footer link
* Fix type check
* Fix jest test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add i18n for AddSourceList
* Add i18n for AvailableSourcesList
* Replace all instances of interal Link
This was missed during the migration. We need to use the components we wrap Eui components with internally.
Also fixes some imports that were unnecessarily going up one level and back down for imports.
* Add i18n for ConfigCompleted
* Add i18n for ConfigDocsLinks
* Add i18n for ConfigurationIntro
* Add i18n for ConfigureCustom
* Add i18n for ConfigureOauth
* Add i18n for ConfiguredSourcesList
* Add i18n for ReAuthenticate
* Add i18n for shared field labels
Also includea shared SourceConfigFields
* Add i18n for SaveConfig
* Add i18n for SaveCustom
* Add i18n for SourceFeatures
* Add i18n for ConnectInstance
* Fix duplicate i18n ID
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* disable delete until checks complete
* add canDeleteJobs wrapper in saved objects service
* create DeleteJobCheckModal shared component
* wip: add deleteJobModal check in list and map views
* adding remove from current space endpoint
* updating error text
* fixing typo in variable name
* Update button content. Add untagging functionality
* adding anomaly detection delete job modal
* fix modal content bug
* refresh job map after deletion or untagging
* adding job refresh to anomaly detectors
* go straight to delete flow if only action available
* fixing test
* update text
* increase line spacing in check modal
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: James Gowdy <jgowdy@elastic.co>