[WIP]- Custom event logging solution #995
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.
Adds the following:
LogEventDirective
A logger that can be attached to
<a>
and<button>
tags like so with theappLogEvent
attribute:appLogEvent
can accept an option name attribute. If this is omitted, the value inside the tag is used instead.Logging an
<a>
tag captures the elementshref=""
attribute. Logging a<button>
tag just logs the button's name.EventLoggerService
Gets used by
LogEventDirective
to send data back to the back end. Can be used within component event handlers as well in situations where theappLogEvent
attribute can't be added to the HTML template (such as is the case with patternfly components)Link data gets sent to the API as:
Button data:
Todo
Add the following to SharedModule:clipboard componentheader componentpage loading componentExtend EventLoggerService to be able to log page load events and error events.
Apply theEventLoggerService
andappLogEvent
to all links and buttons.Aggregate events into a queu and send them all at once instead of calling the api each time someone clicks a link or a button.