1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-14 20:10:11 +03:00

sprinkle in some tracking events for firmware flashing

This commit is contained in:
cTn 2014-06-28 21:38:06 +02:00
parent 959edc85e7
commit 05dfaf910d
4 changed files with 8 additions and 3 deletions

View file

@ -143,6 +143,7 @@ STM32_protocol.prototype.initialize = function() {
} else { } else {
console.log('STM32 - timed out, programming failed ...'); console.log('STM32 - timed out, programming failed ...');
GUI.log('STM32 - timed out, programming: <strong style="color: red">FAILED</strong>'); GUI.log('STM32 - timed out, programming: <strong style="color: red">FAILED</strong>');
ga_tracker.sendEvent('Flashing', 'Programming', 'timeout');
// protocol got stuck, clear timer and disconnect // protocol got stuck, clear timer and disconnect
GUI.interval_remove('STM32_timeout'); GUI.interval_remove('STM32_timeout');
@ -588,6 +589,7 @@ STM32_protocol.prototype.upload_procedure = function(step) {
if (verify) { if (verify) {
console.log('Programming: SUCCESSFUL'); console.log('Programming: SUCCESSFUL');
GUI.log('Programming: <strong style="color: green">SUCCESSFUL</strong>'); GUI.log('Programming: <strong style="color: green">SUCCESSFUL</strong>');
ga_tracker.sendEvent('Flashing', 'Programming', 'success');
// update progress bar // update progress bar
self.progress_bar_e.addClass('valid'); self.progress_bar_e.addClass('valid');
@ -597,6 +599,7 @@ STM32_protocol.prototype.upload_procedure = function(step) {
} else { } else {
console.log('Programming: FAILED'); console.log('Programming: FAILED');
GUI.log('Programming: <strong style="color: red">FAILED</strong>'); GUI.log('Programming: <strong style="color: red">FAILED</strong>');
ga_tracker.sendEvent('Flashing', 'Programming', 'fail');
// update progress bar // update progress bar
self.progress_bar_e.addClass('invalid'); self.progress_bar_e.addClass('invalid');

View file

@ -421,6 +421,7 @@ STM32DFU_protocol.prototype.upload_procedure = function(step) {
if (verify) { if (verify) {
console.log('Programming: SUCCESSFUL'); console.log('Programming: SUCCESSFUL');
GUI.log('Programming: <strong style="color: green">SUCCESSFUL</strong>'); GUI.log('Programming: <strong style="color: green">SUCCESSFUL</strong>');
ga_tracker.sendEvent('Flashing', 'Programming', 'success');
// update progress bar // update progress bar
self.progress_bar_e.addClass('valid'); self.progress_bar_e.addClass('valid');
@ -430,6 +431,7 @@ STM32DFU_protocol.prototype.upload_procedure = function(step) {
} else { } else {
console.log('Programming: FAILED'); console.log('Programming: FAILED');
GUI.log('Programming: <strong style="color: red">FAILED</strong>'); GUI.log('Programming: <strong style="color: red">FAILED</strong>');
ga_tracker.sendEvent('Flashing', 'Programming', 'fail');
// update progress bar // update progress bar
self.progress_bar_e.addClass('invalid'); self.progress_bar_e.addClass('invalid');

View file

@ -14,9 +14,7 @@ function tab_initialize_default() {
$('a.firmware_flasher').click(tab_initialize_firmware_flasher); $('a.firmware_flasher').click(tab_initialize_firmware_flasher);
$('div.welcome a').click(function() { $('div.welcome a').click(function() {
var url = $(this).prop('href'); ga_tracker.sendEvent('ExternalUrls', 'Click', $(this).prop('href'));
ga_tracker.sendEvent('ExternalUrls', 'Click', url);
}); });
}); });
} }

View file

@ -47,6 +47,7 @@ function tab_initialize_firmware_flasher() {
if (parsed_hex) { if (parsed_hex) {
GUI.log(chrome.i18n.getMessage('firmwareFlasherLocalFirmwareLoaded')); GUI.log(chrome.i18n.getMessage('firmwareFlasherLocalFirmwareLoaded'));
ga_tracker.sendEvent('Flashing', 'Firmware', 'local');
$('a.flash_firmware').removeClass('locked'); $('a.flash_firmware').removeClass('locked');
$('span.size').html(parsed_hex.bytes_total + ' bytes'); $('span.size').html(parsed_hex.bytes_total + ' bytes');
@ -72,6 +73,7 @@ function tab_initialize_firmware_flasher() {
if (parsed_hex) { if (parsed_hex) {
GUI.log(chrome.i18n.getMessage('firmwareFlasherRemoteFirmwareLoaded')); GUI.log(chrome.i18n.getMessage('firmwareFlasherRemoteFirmwareLoaded'));
ga_tracker.sendEvent('Flashing', 'Firmware', 'online');
$('a.flash_firmware').removeClass('locked'); $('a.flash_firmware').removeClass('locked');
$('span.path').text('Using remote Firmware'); $('span.path').text('Using remote Firmware');