diff --git a/lib/gui/app/components/drive-selector/services/drive-selector.js b/lib/gui/app/components/drive-selector/services/drive-selector.js index 4647da9d..5b7376f0 100644 --- a/lib/gui/app/components/drive-selector/services/drive-selector.js +++ b/lib/gui/app/components/drive-selector/services/drive-selector.js @@ -34,6 +34,7 @@ module.exports = function (ModalService, $q) { */ this.open = () => { modal = ModalService.open({ + name: 'drive-selector', template: './components/drive-selector/templates/drive-selector-modal.tpl.html', controller: 'DriveSelectorController as modal', size: 'drive-selector-modal' diff --git a/lib/gui/app/components/modal/services/modal.js b/lib/gui/app/components/modal/services/modal.js index fb7693e2..da6efb6a 100644 --- a/lib/gui/app/components/modal/services/modal.js +++ b/lib/gui/app/components/modal/services/modal.js @@ -34,6 +34,7 @@ module.exports = function ($uibModal, $q) { * * @example * ModalService.open({ + * name: 'my modal', * template: './path/to/modal.tpl.html', * controller: 'DriveSelectorController as modal', * }); @@ -44,7 +45,7 @@ module.exports = function ($uibModal, $q) { }) analytics.logEvent('Open modal', { - template: options.template + name: options.name }) const modal = $uibModal.open({ @@ -60,6 +61,7 @@ module.exports = function ($uibModal, $q) { result: $q((resolve, reject) => { modal.result.then((value) => { analytics.logEvent('Modal accepted', { + name: options.name, value }) @@ -68,6 +70,7 @@ module.exports = function ($uibModal, $q) { // Bootstrap doesn't 'resolve' these but cancels the dialog if (error === 'escape key press' || error === 'backdrop click') { analytics.logEvent('Modal rejected', { + name: options.name, method: error }) @@ -75,6 +78,7 @@ module.exports = function ($uibModal, $q) { } analytics.logEvent('Modal rejected', { + name: options.name, value: error }) diff --git a/lib/gui/app/components/tooltip-modal/services/tooltip-modal.js b/lib/gui/app/components/tooltip-modal/services/tooltip-modal.js index 5b3b8b63..11aaefc8 100644 --- a/lib/gui/app/components/tooltip-modal/services/tooltip-modal.js +++ b/lib/gui/app/components/tooltip-modal/services/tooltip-modal.js @@ -37,6 +37,7 @@ module.exports = function (ModalService) { */ this.show = (options) => { return ModalService.open({ + name: 'tooltip', template: './components/tooltip-modal/templates/tooltip-modal.tpl.html', controller: 'TooltipModalController as modal', size: 'tooltip-modal', diff --git a/lib/gui/app/components/warning-modal/services/warning-modal.js b/lib/gui/app/components/warning-modal/services/warning-modal.js index 24391b8b..90cf29b8 100644 --- a/lib/gui/app/components/warning-modal/services/warning-modal.js +++ b/lib/gui/app/components/warning-modal/services/warning-modal.js @@ -40,6 +40,7 @@ module.exports = function ($sce, ModalService) { this.display = (options = {}) => { options.description = $sce.trustAsHtml(options.description) return ModalService.open({ + name: 'warning', template: './components/warning-modal/templates/warning-modal.tpl.html', controller: 'WarningModalController as modal', size: 'warning-modal',