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:
parent
959edc85e7
commit
05dfaf910d
4 changed files with 8 additions and 3 deletions
|
@ -143,6 +143,7 @@ STM32_protocol.prototype.initialize = function() {
|
|||
} else {
|
||||
console.log('STM32 - timed out, programming failed ...');
|
||||
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
|
||||
GUI.interval_remove('STM32_timeout');
|
||||
|
@ -588,6 +589,7 @@ STM32_protocol.prototype.upload_procedure = function(step) {
|
|||
if (verify) {
|
||||
console.log('Programming: SUCCESSFUL');
|
||||
GUI.log('Programming: <strong style="color: green">SUCCESSFUL</strong>');
|
||||
ga_tracker.sendEvent('Flashing', 'Programming', 'success');
|
||||
|
||||
// update progress bar
|
||||
self.progress_bar_e.addClass('valid');
|
||||
|
@ -597,6 +599,7 @@ STM32_protocol.prototype.upload_procedure = function(step) {
|
|||
} else {
|
||||
console.log('Programming: FAILED');
|
||||
GUI.log('Programming: <strong style="color: red">FAILED</strong>');
|
||||
ga_tracker.sendEvent('Flashing', 'Programming', 'fail');
|
||||
|
||||
// update progress bar
|
||||
self.progress_bar_e.addClass('invalid');
|
||||
|
|
|
@ -421,6 +421,7 @@ STM32DFU_protocol.prototype.upload_procedure = function(step) {
|
|||
if (verify) {
|
||||
console.log('Programming: SUCCESSFUL');
|
||||
GUI.log('Programming: <strong style="color: green">SUCCESSFUL</strong>');
|
||||
ga_tracker.sendEvent('Flashing', 'Programming', 'success');
|
||||
|
||||
// update progress bar
|
||||
self.progress_bar_e.addClass('valid');
|
||||
|
@ -430,6 +431,7 @@ STM32DFU_protocol.prototype.upload_procedure = function(step) {
|
|||
} else {
|
||||
console.log('Programming: FAILED');
|
||||
GUI.log('Programming: <strong style="color: red">FAILED</strong>');
|
||||
ga_tracker.sendEvent('Flashing', 'Programming', 'fail');
|
||||
|
||||
// update progress bar
|
||||
self.progress_bar_e.addClass('invalid');
|
||||
|
|
|
@ -14,9 +14,7 @@ function tab_initialize_default() {
|
|||
$('a.firmware_flasher').click(tab_initialize_firmware_flasher);
|
||||
|
||||
$('div.welcome a').click(function() {
|
||||
var url = $(this).prop('href');
|
||||
|
||||
ga_tracker.sendEvent('ExternalUrls', 'Click', url);
|
||||
ga_tracker.sendEvent('ExternalUrls', 'Click', $(this).prop('href'));
|
||||
});
|
||||
});
|
||||
}
|
|
@ -47,6 +47,7 @@ function tab_initialize_firmware_flasher() {
|
|||
|
||||
if (parsed_hex) {
|
||||
GUI.log(chrome.i18n.getMessage('firmwareFlasherLocalFirmwareLoaded'));
|
||||
ga_tracker.sendEvent('Flashing', 'Firmware', 'local');
|
||||
$('a.flash_firmware').removeClass('locked');
|
||||
|
||||
$('span.size').html(parsed_hex.bytes_total + ' bytes');
|
||||
|
@ -72,6 +73,7 @@ function tab_initialize_firmware_flasher() {
|
|||
|
||||
if (parsed_hex) {
|
||||
GUI.log(chrome.i18n.getMessage('firmwareFlasherRemoteFirmwareLoaded'));
|
||||
ga_tracker.sendEvent('Flashing', 'Firmware', 'online');
|
||||
$('a.flash_firmware').removeClass('locked');
|
||||
|
||||
$('span.path').text('Using remote Firmware');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue