display usage info
This commit is contained in:
@@ -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
@@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user