mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-19 17:26:34 +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());
|
OSNotificationService.send('Success!', messages.info.flashComplete());
|
||||||
AnalyticsService.logEvent('Done');
|
AnalyticsService.logEvent('Done', {
|
||||||
|
image,
|
||||||
|
drive
|
||||||
|
});
|
||||||
$state.go('success');
|
$state.go('success');
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
@ -80,15 +83,23 @@ module.exports = function(
|
|||||||
|
|
||||||
if (error.code === 'EVALIDATION') {
|
if (error.code === 'EVALIDATION') {
|
||||||
FlashErrorModalService.show(messages.error.validation());
|
FlashErrorModalService.show(messages.error.validation());
|
||||||
AnalyticsService.logEvent('Validation error');
|
AnalyticsService.logEvent('Validation error', {
|
||||||
|
image,
|
||||||
|
drive
|
||||||
|
});
|
||||||
} else if (error.code === 'ENOSPC') {
|
} else if (error.code === 'ENOSPC') {
|
||||||
FlashErrorModalService.show(messages.error.notEnoughSpaceInDrive());
|
FlashErrorModalService.show(messages.error.notEnoughSpaceInDrive());
|
||||||
AnalyticsService.logEvent('Out of space');
|
AnalyticsService.logEvent('Out of space', {
|
||||||
|
image,
|
||||||
|
drive
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
FlashErrorModalService.show(messages.error.genericFlashError());
|
FlashErrorModalService.show(messages.error.genericFlashError());
|
||||||
ErrorService.reportException(error);
|
ErrorService.reportException(error);
|
||||||
AnalyticsService.logEvent('Flash error', {
|
AnalyticsService.logEvent('Flash error', {
|
||||||
error
|
error,
|
||||||
|
image,
|
||||||
|
drive
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user