mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 07:17:18 +00:00
feat(GUI): add analytics image / drive info on flash done / error events (#1255)
Change-Type: patch
This commit is contained in:
parent
76aa05f320
commit
7fe503c89a
@ -72,7 +72,10 @@ module.exports = function(
|
||||
}
|
||||
|
||||
OSNotificationService.send('Success!', messages.info.flashComplete());
|
||||
AnalyticsService.logEvent('Done');
|
||||
AnalyticsService.logEvent('Done', {
|
||||
image,
|
||||
drive
|
||||
});
|
||||
$state.go('success');
|
||||
})
|
||||
.catch((error) => {
|
||||
@ -80,15 +83,23 @@ module.exports = function(
|
||||
|
||||
if (error.code === 'EVALIDATION') {
|
||||
FlashErrorModalService.show(messages.error.validation());
|
||||
AnalyticsService.logEvent('Validation error');
|
||||
AnalyticsService.logEvent('Validation error', {
|
||||
image,
|
||||
drive
|
||||
});
|
||||
} else if (error.code === 'ENOSPC') {
|
||||
FlashErrorModalService.show(messages.error.notEnoughSpaceInDrive());
|
||||
AnalyticsService.logEvent('Out of space');
|
||||
AnalyticsService.logEvent('Out of space', {
|
||||
image,
|
||||
drive
|
||||
});
|
||||
} else {
|
||||
FlashErrorModalService.show(messages.error.genericFlashError());
|
||||
ErrorService.reportException(error);
|
||||
AnalyticsService.logEvent('Flash error', {
|
||||
error
|
||||
error,
|
||||
image,
|
||||
drive
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user