mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-26 20:56:34 +00:00
Merge pull request #199 from resin-io/misc/analytics-restart
Move "Restart" event log to FinishController
This commit is contained in:
commit
ee2fd2a91c
@ -88,8 +88,6 @@ app.controller('AppController', function(
|
|||||||
this.writer = ImageWriterService;
|
this.writer = ImageWriterService;
|
||||||
this.scanner = DriveScannerService;
|
this.scanner = DriveScannerService;
|
||||||
|
|
||||||
AnalyticsService.logEvent('Restart');
|
|
||||||
|
|
||||||
NotifierService.subscribe($scope, 'image-writer:state', function(state) {
|
NotifierService.subscribe($scope, 'image-writer:state', function(state) {
|
||||||
AnalyticsService.log(`Progress: ${state.progress}% at ${state.speed} MB/s`);
|
AnalyticsService.log(`Progress: ${state.progress}% at ${state.speed} MB/s`);
|
||||||
|
|
||||||
@ -210,12 +208,19 @@ app.controller('NavigationController', function($state) {
|
|||||||
this.open = shell.openExternal;
|
this.open = shell.openExternal;
|
||||||
});
|
});
|
||||||
|
|
||||||
app.controller('FinishController', function($state, SelectionStateService, SettingsService, ImageWriterService) {
|
app.controller('FinishController', function(
|
||||||
|
$state,
|
||||||
|
SelectionStateService,
|
||||||
|
SettingsService,
|
||||||
|
ImageWriterService,
|
||||||
|
AnalyticsService
|
||||||
|
) {
|
||||||
this.settings = SettingsService.data;
|
this.settings = SettingsService.data;
|
||||||
|
|
||||||
this.restart = function(options) {
|
this.restart = function(options) {
|
||||||
SelectionStateService.clear(options);
|
SelectionStateService.clear(options);
|
||||||
ImageWriterService.resetState();
|
ImageWriterService.resetState();
|
||||||
|
AnalyticsService.logEvent('Restart', options);
|
||||||
$state.go('main');
|
$state.go('main');
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user