Merge pull request #2557 from balena-io/explicit-safe-webview-events

Use explicit names for safe-webview events
This commit is contained in:
Lorenzo Alberto Maria Ambrosi 2018-11-28 21:11:10 +01:00 committed by GitHub
commit cf596a88ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,7 +194,8 @@ class SafeWebview extends react.PureComponent {
if (event.resourceType === 'mainFrame') {
const HTTP_OK = 200
analytics.logEvent(event, {
analytics.logEvent('SafeWebview loaded', {
event,
applicationSessionUuid: store.getState().toJS().applicationSessionUuid,
flashingWorkflowUuid: store.getState().toJS().flashingWorkflowUuid
})
@ -250,7 +251,8 @@ class SafeWebview extends react.PureComponent {
if (message.command === 'error') {
analytics.logException(message.data)
} else {
analytics.logEvent(message.data || message, {
analytics.logEvent('SafeWebview console message', {
message,
applicationSessionUuid: store.getState().toJS().applicationSessionUuid,
flashingWorkflowUuid: store.getState().toJS().flashingWorkflowUuid
})