mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
telemetry for organizations
This commit is contained in:
parent
90b0f3201e
commit
d8f54fc15a
@ -3,6 +3,7 @@
|
||||
|
||||
.controller('organizationBillingAdjustSeatsController', function ($scope, $state, $uibModalInstance, apiService,
|
||||
$analytics, toastr, add) {
|
||||
$analytics.eventTrack('organizationBillingAdjustSeatsController', { category: 'Modal' });
|
||||
$scope.add = add;
|
||||
$scope.seatAdjustment = 0;
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
.controller('organizationBillingChangePaymentController', function ($scope, $state, $uibModalInstance, apiService, stripe,
|
||||
$analytics, toastr, existingPaymentMethod) {
|
||||
$analytics.eventTrack('organizationBillingChangePaymentController', { category: 'Modal' });
|
||||
$scope.existingPaymentMethod = existingPaymentMethod;
|
||||
|
||||
$scope.submit = function () {
|
||||
|
@ -1,7 +1,7 @@
|
||||
angular
|
||||
.module('bit.organization')
|
||||
|
||||
.controller('organizationBillingController', function ($scope, apiService, $state, $uibModal, toastr) {
|
||||
.controller('organizationBillingController', function ($scope, apiService, $state, $uibModal, toastr, $analytics) {
|
||||
$scope.charges = [];
|
||||
$scope.paymentSource = null;
|
||||
$scope.plan = null;
|
||||
@ -71,6 +71,7 @@
|
||||
|
||||
apiService.organizations.putCancel({ id: $state.params.orgId }, {})
|
||||
.$promise.then(function (response) {
|
||||
$analytics.eventTrack('Canceled Plan');
|
||||
toastr.success('Organization subscription has been canceled.');
|
||||
load();
|
||||
});
|
||||
@ -83,6 +84,7 @@
|
||||
|
||||
apiService.organizations.putReinstate({ id: $state.params.orgId }, {})
|
||||
.$promise.then(function (response) {
|
||||
$analytics.eventTrack('Reinstated Plan');
|
||||
toastr.success('Organization cancellation request has been removed.');
|
||||
load();
|
||||
});
|
||||
|
@ -7,8 +7,6 @@
|
||||
if (!userProfile.organizations) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$scope.orgProfile = userProfile.organizations[$state.params.orgId];
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,8 @@
|
||||
angular
|
||||
.module('bit.organization')
|
||||
|
||||
.controller('organizationPeopleController', function ($scope, $state, $uibModal, cryptoService, apiService, toastr) {
|
||||
.controller('organizationPeopleController', function ($scope, $state, $uibModal, cryptoService, apiService,
|
||||
toastr, $analytics) {
|
||||
$scope.users = [];
|
||||
$scope.$on('$viewContentLoaded', function () {
|
||||
loadList();
|
||||
@ -9,6 +10,7 @@
|
||||
|
||||
$scope.reinvite = function (user) {
|
||||
apiService.organizationUsers.reinvite({ orgId: $state.params.orgId, id: user.id }, null, function () {
|
||||
$analytics.eventTrack('Reinvited User');
|
||||
toastr.success(user.email + ' has been invited again.', 'User Invited');
|
||||
}, function () {
|
||||
toastr.error('Unable to invite user.', 'Error');
|
||||
@ -21,6 +23,7 @@
|
||||
}
|
||||
|
||||
apiService.organizationUsers.del({ orgId: $state.params.orgId, id: user.id }, null, function () {
|
||||
$analytics.eventTrack('Deleted User');
|
||||
toastr.success(user.email + ' has been removed.', 'User Removed');
|
||||
var index = $scope.users.indexOf(user);
|
||||
if (index > -1) {
|
||||
@ -42,6 +45,7 @@
|
||||
var key = cryptoService.rsaEncrypt(orgKey.key, userKey.PublicKey);
|
||||
apiService.organizationUsers.confirm({ orgId: $state.params.orgId, id: user.id }, { key: key }, function () {
|
||||
user.status = 2;
|
||||
$analytics.eventTrack('Confirmed User');
|
||||
toastr.success(user.email + ' has been confirmed.', 'User Confirmed');
|
||||
}, function () {
|
||||
toastr.error('Unable to confirm user.', 'Error');
|
||||
|
@ -1,7 +1,10 @@
|
||||
angular
|
||||
.module('bit.organization')
|
||||
|
||||
.controller('organizationPeopleEditController', function ($scope, $state, $uibModalInstance, apiService, cipherService, id) {
|
||||
.controller('organizationPeopleEditController', function ($scope, $state, $uibModalInstance, apiService, cipherService, id,
|
||||
$analytics) {
|
||||
$analytics.eventTrack('organizationPeopleEditController', { category: 'Modal' });
|
||||
|
||||
$scope.loading = true;
|
||||
$scope.subvaults = [];
|
||||
$scope.selectedSubvaults = {};
|
||||
@ -86,6 +89,7 @@
|
||||
subvaults: subvaults,
|
||||
accessAllSubvaults: $scope.accessAllSubvaults
|
||||
}, function () {
|
||||
$analytics.eventTrack('Edited User');
|
||||
$uibModalInstance.close();
|
||||
}).$promise;
|
||||
};
|
||||
|
@ -1,7 +1,10 @@
|
||||
angular
|
||||
.module('bit.organization')
|
||||
|
||||
.controller('organizationPeopleInviteController', function ($scope, $state, $uibModalInstance, apiService, cipherService) {
|
||||
.controller('organizationPeopleInviteController', function ($scope, $state, $uibModalInstance, apiService, cipherService,
|
||||
$analytics) {
|
||||
$analytics.eventTrack('organizationPeopleInviteController', { category: 'Modal' });
|
||||
|
||||
$scope.loading = true;
|
||||
$scope.subvaults = [];
|
||||
$scope.selectedSubvaults = {};
|
||||
@ -75,6 +78,7 @@
|
||||
subvaults: subvaults,
|
||||
accessAllSubvaults: model.accessAllSubvaults
|
||||
}, function () {
|
||||
$analytics.eventTrack('Invited User');
|
||||
$uibModalInstance.close();
|
||||
}).$promise;
|
||||
};
|
||||
|
@ -1,7 +1,8 @@
|
||||
angular
|
||||
.module('bit.organization')
|
||||
|
||||
.controller('organizationSettingsController', function ($scope, $state, apiService, toastr, authService, $uibModal) {
|
||||
.controller('organizationSettingsController', function ($scope, $state, apiService, toastr, authService, $uibModal,
|
||||
$analytics) {
|
||||
$scope.model = {};
|
||||
$scope.$on('$viewContentLoaded', function () {
|
||||
apiService.organizations.get({ id: $state.params.orgId }, function (org) {
|
||||
@ -16,6 +17,7 @@
|
||||
$scope.generalSave = function () {
|
||||
$scope.generalPromise = apiService.organizations.put({ id: $state.params.orgId }, $scope.model, function (org) {
|
||||
authService.updateProfileOrganization(org).then(function (updatedOrg) {
|
||||
$analytics.eventTrack('Updated Organization Settings');
|
||||
toastr.success('Organization has been updated.', 'Success!');
|
||||
});
|
||||
}).$promise;
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
.controller('organizationSubvaultsAddController', function ($scope, $state, $uibModalInstance, apiService, cipherService,
|
||||
$analytics) {
|
||||
$analytics.eventTrack('organizationSubvaultsAddController', { category: 'Modal' });
|
||||
|
||||
$scope.submit = function (model) {
|
||||
var subvault = cipherService.encryptSubvault(model, $state.params.orgId);
|
||||
$scope.submitPromise = apiService.subvaults.post({ orgId: $state.params.orgId }, subvault, function (response) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
.module('bit.organization')
|
||||
|
||||
.controller('organizationSubvaultsController', function ($scope, $state, apiService, $uibModal, cipherService, $filter,
|
||||
toastr) {
|
||||
toastr, $analytics) {
|
||||
$scope.subvaults = [];
|
||||
$scope.loading = true;
|
||||
$scope.$on('$viewContentLoaded', function () {
|
||||
@ -81,6 +81,7 @@
|
||||
$scope.subvaults.splice(index, 1);
|
||||
}
|
||||
|
||||
$analytics.eventTrack('Deleted Subvault');
|
||||
toastr.success(subvault.name + ' has been deleted.', 'Subvault Deleted');
|
||||
}, function () {
|
||||
toastr.error(subvault.name + ' was not able to be deleted.', 'Error');
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
.controller('organizationSubvaultsEditController', function ($scope, $state, $uibModalInstance, apiService, cipherService,
|
||||
$analytics, id) {
|
||||
$analytics.eventTrack('organizationSubvaultsEditController', { category: 'Modal' });
|
||||
$scope.subvault = {};
|
||||
|
||||
$uibModalInstance.opened.then(function () {
|
||||
|
@ -1,7 +1,8 @@
|
||||
angular
|
||||
.module('bit.organization')
|
||||
|
||||
.controller('organizationSubvaultsGroupsController', function ($scope, $state, $uibModalInstance, subvault) {
|
||||
.controller('organizationSubvaultsGroupsController', function ($scope, $state, $uibModalInstance, subvault, $analytics) {
|
||||
$analytics.eventTrack('organizationSubvaultsGroupsController', { category: 'Modal' });
|
||||
$scope.subvault = subvault;
|
||||
|
||||
$scope.close = function () {
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
.controller('organizationSubvaultsUsersController', function ($scope, $state, $uibModalInstance, apiService, cipherService,
|
||||
$analytics, subvault, toastr) {
|
||||
$analytics.eventTrack('organizationSubvaultsUsersController', { category: 'Modal' });
|
||||
$scope.loading = true;
|
||||
$scope.subvault = subvault;
|
||||
$scope.users = [];
|
||||
@ -42,6 +43,7 @@
|
||||
|
||||
apiService.subvaultUsers.del({ orgId: $state.params.orgId, id: user.id }, null, function () {
|
||||
toastr.success(user.email + ' has been removed.', 'User Removed');
|
||||
$analytics.eventTrack('Removed User From Subvault');
|
||||
var index = $scope.users.indexOf(user);
|
||||
if (index > -1) {
|
||||
$scope.users.splice(index, 1);
|
||||
|
@ -112,7 +112,7 @@
|
||||
}
|
||||
|
||||
apiService.ciphers.putSubvaults({ id: login.id }, request).$promise.then(function (response) {
|
||||
$analytics.eventTrack('Removed From Subvault');
|
||||
$analytics.eventTrack('Removed Login From Subvault');
|
||||
login.subvaultIds = request.subvaultIds;
|
||||
});
|
||||
};
|
||||
@ -123,6 +123,7 @@
|
||||
}
|
||||
|
||||
apiService.ciphers.delAdmin({ id: login.id }, function () {
|
||||
$analytics.eventTrack('Deleted Login');
|
||||
var index = $scope.logins.indexOf(login);
|
||||
if (index > -1) {
|
||||
$scope.logins.splice(index, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user