message: fix(GUI): Remove results data from cancel event
  Change-type: patch
diff: @@ -327,17 +327,18 @@ exports.flash = (image, drives) => {
  return exports.performWrite(image, drives, (state) => {
  flashState.setProgressState(state)
  }).then(flashState.unsetFlashingFlag).then(() => {
  + if (flashState.wasLastFlashCancelled()) {
  + const eventData = _.assign({ status: 'cancel' }, analyticsData)
  + analytics.logEvent('Elevation cancelled', eventData)
  + } else {
  const { results } = flashState.getFlashResults()
  - const event = _.assign({
  + const eventData = _.assign({
  errors: results.errors,
  devices: results.devices,
  status: 'finished'
  },
  analyticsData)
  - if (flashState.wasLastFlashCancelled()) {
  - analytics.logEvent('Elevation cancelled', event)
  - } else {
  - analytics.logEvent('Done', event)
  + analytics.logEvent('Done', eventData)
  }
  }).catch((error) => {
  flashState.unsetFlashingFlag({
  @@ -347,13 +348,13 @@ exports.flash = (image, drives) => {
  // eslint-disable-next-line no-magic-numbers
  if (drives.length > 1) {
  const { results } = flashState.getFlashResults()
  - const event = _.assign({
  + const eventData = _.assign({
  errors: results.errors,
  devices: results.devices,
  status: 'failed'
  },
  analyticsData)
  - analytics.logEvent('Write failed', event)
  + analytics.logEvent('Write failed', eventData)
  }
  return Bluebird.reject(error)
  @@ -372,7 +373,6 @@ exports.flash = (image, drives) => {
  */
  exports.cancel = () => {
  const drives = selectionState.getSelectedDevices()
  - const { results } = flashState.getFlashResults()
  const analyticsData = {
  image: selectionState.getImagePath(),
  drives,
  @@ -382,15 +382,10 @@ exports.cancel = () => {
  unmountOnSuccess: settings.get('unmountOnSuccess'),
  validateWriteOnSuccess: settings.get('validateWriteOnSuccess'),
  applicationSessionUuid: store.getState().toJS().applicationSessionUuid,
  - flashingWorkflowUuid: store.getState().toJS().flashingWorkflowUuid
  + flashingWorkflowUuid: store.getState().toJS().flashingWorkflowUuid,
  + status: 'cancel'
  }
  - const event = _.assign({
  - errors: results.errors,
  - devices: results.devices,
  - status: 'finished'
  - },
  - analyticsData)
  - analytics.logEvent('Cancel', event)
  + analytics.logEvent('Cancel', analyticsData)
  // Re-enable lock release on inactivity
  updateLock.resume()
  