[Feature Anywhere] Add view events flyout #3382
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Tyler Ohlsen [email protected]
Description
This PR adds the 'View events' flyout which will open via an event click on a chart with
VisLayer
s enabled, or in the vis options menu viaView events
button. It shows the base vis with the event annotations, and below it a breakdown of each set of events produced by each plugin resource. It is categorized by plugin resource type as well.Technical details, more information, and example mocks can be found in the related issue #3155
Implementation details
Components
ViewEventsFlyout
- the base component where all embeddables are created from the source vis embeddable. Persists the event visualizations by type via a map mapping resource type -> list of embeddablesDateRangeItem
- contains the selected date range and refresh button. Hooks into thereload()
function defined inViewEventsFlyout
to reload all of the embeddables when clicked.BaseVisItem
- the re-created base vis embeddable containing all of the eventsEventsPanel
- the base component to show all of the event annotation charts. Contains a set ofPluginEventsPanel
sPluginEventsPanel
- contains a set ofEventVisItem
s for a particular plugin resource typeEventVisItem
- contains an event vis embeddable, including the resource name, url, and event countTimelinePanel
- contains the empty embeddable. Used to re-create the timeline and is a static component on the bottom of the flyoutAll of the embeddables are using the
EmbeddablePanel
component, which takes care of individual component lifecycles for us, including the rendering, refreshing, and destroying. This is fetched from the embeddable service function'sgetEmbeddablePanel()
.Issues Resolved
Closes #3155
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr