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:

## 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 Result**
* The page does not appear to reload
* In development mode, a single error is logged to the JS console
**Actual Resluts**
* 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
* [Maps] Add missing license to requests in maps embeddables (#59207)
* Pull core service init out into separate function
* Call bind function from embeddable factory constructor
* Move inspector init back to start method. Remove old license check file
* Add TS types
* Fix remaining merge issues
* [SIEM] Default the Timeline events filter to show All events (#58953)
## [SIEM] Default the Timeline events filter to show All events
The Timeline events filter introduced in `7.6` to support the [detection engine](https://www.elastic.co/guide/en/siem/guide/current/detection-engine-overview.html) defaulted to filtering by `Raw events`, and thus required manually selecting `All events` or `Signal events` from the dropdown to view signals.
The new default is `All events`, per the screenshots below:
### Before

### After

* * Added `eventType`, which is a required prop in `7.6.x` to pass the type check, along with this note:
```
CAUTION: `eventType` is an optional prop in post-`7.6.x` branches. In later branches, `eventType`
is omitted from this test, to truly verify the new default from redux. In this branch, we must
specify `eventType` to pass the type check, but this is not the true intent of this test.
```
* [Metrics UI] Ensure inventory view buckets never drop below 60 seconds (#58503)
* [Metrics UI] Ensure inventory view buckets never drop below 60 seconds
* Fixing tests
* Fixing tests... again
* Fixing tests... rounding issue?
* Trying to fix the tests... again
* updating test for custom metric
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Fixing tests due to rounding issue
* Removing test that shouldn't have been backported.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Removed flex group because it's causing alignment issues on IE. Verified and tested on all 3 browsers.
* Restored <EuiFlexItem> but added grow=false to properly align icons.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Refactor the all rules page to be easier to test
* review with Garrett
* bring back utility bar under condition
* fix bugs tags and allow switch to show loading when enable/disable rule
* fix rules selection when trigerring new rules
* fix imports/exports can only use rule_id as learned today
* review I
Until these are officially supported in new platform, it's best to not
rely on this behavior. We can achieve roughly the same functionality
with a GET request. Modifies the existing script accordingly, in case
anyone's still using it.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [SIEM] Detections container/rules unit tests (#58055)
* add unit test for rules api
* add unit test for useFetchIndexPatterns
* fix useFetchIndexPatterns and add unit test for usePersistRule
* add more unit test for container/rules
* review
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* fix types + adapt test to the old fetch way
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Fixes#58079
This is an improved version of #58078
Note, this is a bugfix targeting 7.6.1 . I've decided to open this PR directly against 7.6 in the interest of time. We can forward-port this to 7.x / master later.
This patch improves the handling of timespans with snapshot counts. This feature originally worked, but suffered a regression when we increased the default timespan in the query context to 5m. This means that without this patch the counts you get are the maximum total number of monitors that were down over the past 5m, which is not really that useful.
We now use a scripted metric to always count precisely the number of up/down monitors. On my box this could process 400k summary docs in ~600ms. This should scale as shards are added.
I attempted to keep memory usage relatively slow by using simple maps of strings.