* wip
* wip
* wip
* will this work?
* wip but it works
* pedro
* remove thing
* remove TODOs
* fix type issue
* add tests to check that alert index api works
* Revert "add tests to check that alert index api works"
This reverts commit 5d40ca18337cf8deb63a0291150780ec094db016.
* Moved schema
* undoing my evils
* fix comments. fix incorrect import
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Exclude disallowed, private setting at index creation
* Remove intl from tabs component
* Added logic for checking the current index status
* Added ES contract integration test
Using _cluster/state is considered internal. This adds an integration
test for checking the contract in CI.
* Add the client side notification for closed indices
* First version of end-to-end functionality working
* Clean up unused, incorrect type information
* Fix type issues and added a comment about the new reindex options
* Fixed server side tests, added comments and logic updates
Updated the handling of reindexOptions to make it more
backwards compatible (treat it as if it could be undefined).
Also update the logic for checking for open or closed indices.
No optional chaining! It should break if the response does not
exactly match.
* Clean up unused code
* Improved idempotency of test and check explicitly for "close".
Rather check for the specific value we want, as this is what is
also gauranteed by the tests. In this way, the information we
send back to the client is also more accurate regarding the index
status. If, in future, more index states are introduced this will
need to be revisited if it affects the ability for an index to be
re-indexed.
* Update client-side tests
* Fix types
* Handle a case where the index name provided may be an alias
* Fix types
* merge-conflict: finish merge conflict resolution
* Update x-pack/plugins/upgrade_assistant/public/application/components/tabs/checkup/deprecations/reindex/closed_warning_icon.tsx
Co-Authored-By: Alison Goryachev <alisonmllr20@gmail.com>
* merge-conflict: Remove duplicate import
VSCode does not auto-save as expected :sigh:
* ui: Revisit the UI
Moved the warning icon to inside of the button and tooltip to
on the button.
Added a callout to the reindex flyout for when an index is closed.
* logic: slight update to when the index closed callout is shown
We only show the index closed callout in the flyout when the
reindex operation is not considered "completed"
* tests: fix jest tests
* refactor: remove "openAndClose" from reindex endpoints
"openAndClose" should just happen automatically. The user should
not have to pass the flag in, that would be a weird API. We just
need to warn the user about that reindexing a closed index will
take more resources
* test: update upgrade assistant integration test
* fix: types
* copy: use sentence case
* refactor: use the in scope declaration of reindex op
* test: Clean up tests
Reindexing test was generating index name, could just get it from
server response. Also removed openAndClose from all integration
tests
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
* Remove global state in visualize
* Fix saved query
* Update saved query handling
* Resolve merge conflicts
* Use new state syncing helpers
* Fix state behavior
* Prevent loosing the global state
* Update state syncing with url
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Show error if field is not found
* Errored filter state
* Design adjustments
* Fixing class names and making look similar to disabled
* code review fixes
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
When only one node is displayed, show an empty message.
Also:
* Start adding a basic Jest test for the ServiceMap component
* Fix bug where EuiDocsLink was rendering "children" instead of the actual children
Closes#59326.
Closes#59128.
* use inline snapshots instead of snapshots
* hide input value from error messages
* update core snapshots
* update xpack snapshots
* fix ftr assertions
* fix new snapshots
* hide values for byte_size and duration
* update new snapshots
* remove another byte_size value reference
* fix yet another value references in error messages
* update xpack snapshots
* update xpack ftr assertions
Migrates the client side plugin of transforms to NP.
- Gets rid of the last parts of the shim (http, documentation links)
- Moves the plugin from x-pack/legacy/plugins/transform/public to x-pack/plugins/transform
- Creates a custom mock for appDependencies based on NP services
- Fixes jest tests to get rid of all act() related warnings
* Use diagnostics-enable action in the workflow. Issue: #56526
* Update workflow to use v1.0.2 of the action
* Adding a new test workflow that uses a personal access token
* Remove an extra coma
* Updated project-assigner action version and access key
* Deleted the test workflow
* Temporarily commenting out project mappings while we debug the permissions issues
* Temporarily commenting out project mappings while we debug the permissions issues
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Changes the alerting UI to use the new time series query HTTP endpoint provided by the builtin index threshold alertType; previously it used a watcher HTTP endpoint.
This is part of the ongoing index threshold work tracked in https://github.com/elastic/kibana/issues/53041
* Unifying the test index name for resolver and alerts
* Endpoint isn't sending the agent field so check for it
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Added server side logic for handling batch reindex
* Remove literal string interpolation from translation
* Refactor return value of batch endpoint
"sucesses" does not communicate accurately what has happened.
"started" more closely reflects what has happened.
* First iteration of batch queues
* Single queue
Changed the batchqueues implementation to only using a single queue
- since there is only one ES that it is interacting with.
Before continuing with this work, just making sure that these pre-
cautions are necessary!
* Clean up old batch queue implementation
* Slight refactor
* Revert batch queues implementation
* Introduction of QueueSettings
Queue settings can be set on a reindex operation and set a
timemstamp value on the reindex operation for the scheduler
to use down the line for ordering operations and running them
in series
* Updated worker logic to handle items in queue in series
* Refactor /batch endpoint response to "enqueued" not "started"
* Fixed jest tests
* Refactor worker refresh operations for readability
Created a new file op_utils where logic repsonsible for sorting
and ordering reindex operation saved objects is.
* Add batch API integration test
Also assert that reindexing is happening in the expected order
* Added a new endpoint: GET batch/queue
This allows users of the API to see what the current queue state
is for visibility. Using the queue endpoint int he API integration
tests for batch too.
* Reset the queuedAt timestamp on resume
If a reindexOperation is being resumed and put in a queue we
also need to reset the queuedAt timestamp to respect the new
batch queue ordering.
* Fix jest test
Added 'undefined' as the second optional param to
resumeIndexOperation call.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
## [SIEM] Fixes dragging entries to the Timeline while data is loading may trigger a partial page reload
The `react-beautiful-dnd` library, upgraded during the `7.6` stack release from
`10.0.1` to `12.2.0`, includes a breaking change to the way [errors are handled](https://github.com/atlassian/react-beautiful-dnd/blob/v12.0.0/docs/guides/setup-problem-detection-and-error-recovery.md)
and recovered. As a result of this change, an uncaught error may trigger a
an effect that feels (from the perspective of a user) like a partial page
reload.
The most common condition where this can occur is when dragging entries to the
Timeline while data is loading, per the animated gif below:
![refresh-error](https://user-images.githubusercontent.com/4459398/76016029-59755f80-5ed9-11ea-858d-cb1189d22ea9.gif)
## Reproduction steps
1. Navigate to the Hosts page
2. Open the Timeline
3. Drag a host to the Timeline
4. While data is still loading, drag a different host to the Timeline to create an `or` query
**Expected Results**
* The page does not appear to reload
* In development mode, a single error is logged to the JS console
**Actual Results**
* The page appears to reload
* In development mode, two errors are logged to the JS console
**Error 1**
```
react-beautiful-dnd
Invariant failed: Cannot find droppable entry with id [droppableId.content.event-details-value-default-draggable-plain-column-renderer-formatted-field-value-timeline-1-kLGooXABOOUskGlPiQw5-@timestamp-1583260131000]👷<200d> This is a development only message. It will be removed in production builds.
in Draggable (created by ConnectFunction)
in ConnectFunction (created by PrivateDraggable)
in PrivateDraggable (created by PublicDraggable)
in PublicDraggable (created by Droppable)
in Droppable (created by ConnectFunction)
in ConnectFunction
```
**Error 2**
```
react-beautiful-dnd
Invariant failed: Cannot find droppable entry with id [droppableId.content.event-details-value-default-draggable-plain-column-renderer-formatted-field-value-timeline-1-kLGooXABOOUskGlPiQw5-@timestamp-1583260131000]👷<200d> This is a development only message. It will be removed in production builds.
in ErrorBoundary (created by DragDropContext)
in DragDropContext (created by Anonymous)
in Anonymous
```
### Desk testing
Tested locally in:
* Chrome `80.0.3987.122`
* Firefox `73.0.1`
* Safari `13.0.5`
Fixes https://github.com/elastic/kibana/issues/59466
* [Reporting] Handle error if intercepted request could not be continued
* [Reporting/Screenshots] Handle page setup errors and capture the page with errors shown
* show warnings in UI
* i18n todos
* Cleanup an old troubleshooting task
* set the default for all new timeout settings to 30 seconds
* fix some tests
* update error strings
* Cleanup 2
* fix tests 2
* polish the job info map status items
* More error message updating
* Log the error that was caught
* Oops fix ts
* add documentation
* fix i18n
* fix mocha test
* use the openUrl timeout as the default for navigation
* fix comment
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* refactor to use io-ts, to be able to have ressource with sub, add total comments via comment_ids, be able to delete multiple cases/comments
* fix test
* adapt UI to refactor of the API
* put it back the way it was
* clean up to get cases
* review I
* review II - bring back url parameter
* fix merge
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [Maps] top term percentage property
* populate percentage in feature properties
* TS work
* clean up TS
* fix all type errors
* unit test for esAggFieldsFactory
* clean up
* i18n cleanup
* do not show decimal place for perentage
* fix jest expects
* fix eslint errors
* tslint errors
* handle empty top bucket aggregation
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Add custom action to registry and show actions list in siem
* Exposed action form as reusable component
* Fixed few small bugs
* Fixed red ci
* Fixed type checks
* Fixed failed tests
* Fixed due to comments
* Fixed type check errors
* Fixed plugin check
* Rebalancing CI groups according to #58930
* Fixed merge issues
* Add async search strategy
* Add async search
* Fix async strategy and add tests
* Move types to separate file
* Revert changes to demo search
* Update demo search strategy to use async
* Add async es search strategy
* Return response as rawResponse
* Poll after initial request
* Add cancellation to search strategies
* Add tests
* Simplify async search strategy
* Move loadingCount to search strategy
* Update abort controller library
* Bootstrap
* Abort when the request is aborted
* Add utility and update value suggestions route
* Fix bad merge conflict
* Update tests
* Move to data_enhanced plugin
* Remove bad merge
* Revert switching abort controller libraries
* Revert package.json in lib
* Move to previous abort controller
* Add support for frozen indices
* Fix test to use fake timers to run debounced handlers
* Revert changes to example plugin
* Fix loading bar not going away when cancelling
* Call getSearchStrategy instead of passing directly
* Add async demo search strategy
* Fix error with setting state
* Update how aborting works
* Fix type checks
* Add test for loading count
* Attempt to fix broken example test
* Revert changes to test
* Fix test
* Update name to camelCase
* Fix failing test
* Don't require data_enhanced in example plugin
* Actually send DELETE request
* Use waitForCompletion parameter
* Use default search params
* Add support for rollups
* Only make changes needed for frozen indices/rollups
* Fix tests/types
* Don't include skipped in loaded/total
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>