display usage info

This commit is contained in:
Girish Ramakrishnan
2020-02-20 12:08:56 -08:00
parent 1ef5fd1a0f
commit 5fd575a217
3 changed files with 25 additions and 1 deletions
+4
View File
@@ -304,6 +304,7 @@
<th>Name</th>
<th>Owner</th>
<th>Aliases</th>
<th>Usage</th>
<th class="text-right">Action</th>
</tr>
</thead>
@@ -318,6 +319,9 @@
<td class="hand" ng-click="mailboxes.edit.show(mailbox)">
{{ mailbox.aliases }}
</td>
<td class="hand" ng-click="mailboxes.edit.show(mailbox)">
{{ mailbox.usage | prettyDiskSize }}
</td>
<td class="text-right no-wrap">
<button class="btn btn-xs btn-default" ng-click="mailboxes.edit.show(mailbox)"><i class="fa fa-pencil-alt"></i></button>
<button class="btn btn-xs btn-danger" ng-click="mailboxes.remove.show(mailbox)"><i class="far fa-trash-alt"></i></button>
+7 -1
View File
@@ -391,7 +391,13 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
return m;
});
callback();
Client.getMailUsage($scope.domain.domain, function (error, usage) {
if (error) return callback(error);
$scope.mailboxes.mailboxes.forEach(function (m) { m.usage = usage[m.name].size || 0; });
callback();
});
});
});
}