feat(GUI): add drive quantity to flash analytics (#2298)

We add a field `driveCount` to the flash analytics events in the image
writer.

Change-Type: patch
This commit is contained in:
Benedict Aas 2018-05-08 10:56:15 +01:00 committed by GitHub
parent 07ed90ed11
commit ca45855ed7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,6 +160,7 @@ exports.performWrite = (image, drives, onProgress) => {
const analyticsData = {
image,
drives,
driveCount: drives.length,
uuid: flashState.getFlashUuid(),
unmountOnSuccess: settings.get('unmountOnSuccess'),
validateWriteOnSuccess: settings.get('validateWriteOnSuccess')
@ -299,6 +300,7 @@ exports.flash = (image, drives) => {
const analyticsData = {
image,
drives,
driveCount: drives.length,
uuid: flashState.getFlashUuid(),
unmountOnSuccess: settings.get('unmountOnSuccess'),
validateWriteOnSuccess: settings.get('validateWriteOnSuccess')
@ -339,9 +341,11 @@ exports.flash = (image, drives) => {
* imageWriter.cancel()
*/
exports.cancel = () => {
const drives = selectionState.getSelectedDevices()
analytics.logEvent('Cancel', {
image: selectionState.getImagePath(),
drives: selectionState.getSelectedDevices(),
drives,
driveCount: drives.length,
uuid: flashState.getFlashUuid(),
unmountOnSuccess: settings.get('unmountOnSuccess'),
validateWriteOnSuccess: settings.get('validateWriteOnSuccess')