diff --git a/src/views/emails.html b/src/views/emails.html index 410e7ba5c..48e8659b6 100644 --- a/src/views/emails.html +++ b/src/views/emails.html @@ -231,13 +231,13 @@ Blocked IPs/Domains
- 5 + {{ spamConfig.acl.blacklist.length }} address(es) blacklisted {{ spamConfig.customConfig ? '. Custom rules set.' : '.' }}
Spam filtering
- {{ spamConfig.acl.blacklist.length }} address(es) blacklisted {{ spamConfig.customConfig ? ' + Custom Config' : '' }} + {{ spamConfig.acl.blacklist.length }} address(es) blacklisted {{ spamConfig.customConfig ? '. Custom rules set.' : '.' }}
diff --git a/src/views/emails.js b/src/views/emails.js index ac7994e68..ab0e6b207 100644 --- a/src/views/emails.js +++ b/src/views/emails.js @@ -79,6 +79,15 @@ angular.module('Application').controller('EmailsController', ['$scope', '$locati domain: null, subdomain: '', + refresh: function () { + Client.getMailLocation(function (error, location) { + if (error) return console.error('Failed to get max email location', error); + + $scope.mailLocation.currentLocation.subdomain = location.subdomain; + $scope.mailLocation.currentLocation.domain = $scope.domains.find(function (d) { return location.domain === d.domain; }); + }); + }, + show: function () { $scope.mailLocation.busy = false; $scope.mailLocation.error = null; @@ -118,6 +127,14 @@ angular.module('Application').controller('EmailsController', ['$scope', '$locati size: 0, currentSize: 0, + refresh: function () { + Client.getMaxEmailSize(function (error, size) { + if (error) return console.error('Failed to get max email size', error); + + $scope.maxEmailSize.currentSize = size; + }); + }, + show: function() { $scope.maxEmailSize.busy = false; $scope.maxEmailSize.error = null; @@ -291,12 +308,7 @@ angular.module('Application').controller('EmailsController', ['$scope', '$locati }); }); - Client.getMaxEmailSize(function (error, size) { - if (error) return console.error('Failed to get max email size', error); - - $scope.maxEmailSize.currentSize = size; - }); - + $scope.maxEmailSize.refresh(); $scope.spamConfig.refresh(); }); } @@ -310,13 +322,7 @@ angular.module('Application').controller('EmailsController', ['$scope', '$locati if ($scope.user.role === 'owner') $scope.activity.refresh(); - Client.getMailLocation(function (error, location) { - if (error) return console.error('Failed to get max email location', error); - - $scope.mailLocation.currentLocation.subdomain = location.subdomain; - $scope.mailLocation.currentLocation.domain = $scope.domains.find(function (d) { return location.domain === d.domain; }); - }); - + $scope.mailLocation.refresh(); refreshDomainStatuses(); }); });