Backport of #5310 into 2.5.
The original code required some changes to remove conflicts (mostly due to loadable components and the different way in which we require some components now), and to adapt to 2.5. As not all pages had the same page header buttons, I modified that as well to match the status in master, which is way less confusing.
* Fix parameter description on API * Prepare Stream components for changes - Fix linter errors - Remove unnecessary `preventDefault()` calls * Add skeleton of stream alerts overview page * Freshen up ConditionAlertNotifications - Rename to the more appropriate StreamAlertNotifications, since notifications are fetched for a stream, and not a condition - Move the component to alertnotifications - Fix some texts in the component - Fix linter errors * Add stream notifications to stream alerts page * Add list of stream conditions to stream alerts page * Change page header actions * Add link to create new notification * Small code improvements - Fix linter errors - Clean and simplify some code * Hide notification configuration by default Make element more compact by hiding configuration by default. Let user expand the configuration by clicking on a link, similar to how we do with stream rules in the streams page. * Fix linter errors * Unify display of alert conditions Use the same component to render an alert condition, regardless of the context. We still need to customize some of the features through props, but this is more consistent with notifications. * Add a details view flag on AlertCondition For now this only removes the link to go to the alert condition details. * Update alert condition page after edit/delete * Update conditions lists after update/delete * Add link to see alerts of a stream This allows users to see alerts, conditions, and notifications for a single stream from within the alert page. * Don't render alert conditions without a stream After deleting an alert condition, it is possible to run into a race condition that tries to render the alert condition that just got deleted, throwing an error. This change avoids that situation by not rendering alert conditions that are not found in the stream list. * Make Alert component more reusable Move filtering out of the component, and require only the props it needs. * Add alerts information into stream alerts overview * Fetch common alerts data only once * Load available alert condition types explicitly Before this information loaded when the store was loaded, but also sometimes by hand. In the end we only need that information in a handful of pages, so better let them load it manually when they need it. * Prefill condition stream from stream alerts page When creating a new condition from the stream alerts overview page, pre-select the stream the user is seeing in the new alert condition form. The user still has the possibility of editing that selection later on. * Prefill notification stream from stream alerts page When creating a new notificaiton from the stream alerts overview page, pre-select the stream the user is seeing in the new alert notification form. The user still has the possibility of editing that selection later on. * Reload data after condition update or delete * Display unresolved alerts in stream alerts page This is only meant to give a short summary of the stream alerts, displaying unresolved alerts should suffice for now. * Remove unused exception * Auto-reload alerts * Avoid stream alerts page jumping on data reload First load should set the loading state, but further reloads need to be less intrusive. This avoids page jumps because content is replaced by spinners. * Change workflow for new condition or notification Conditions and notifications work with one another, and both in the context of a stream. Redirecting the user to the stream alerts overview page after creating a new condition or notification will give the most context of the change that was just made. * Improve descriptions * Fix linter errors