mail: add js code to get eventlog

This commit is contained in:
Girish Ramakrishnan
2020-02-11 22:07:58 -08:00
parent 304c930f95
commit 135548a03b
3 changed files with 71 additions and 24 deletions

View File

@@ -1948,6 +1948,21 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
};
// Email
Client.prototype.getMailEventLogs = function (page, perPage, callback) {
var config = {
params: {
page: page,
per_page: perPage
}
};
get('/api/v1/mailserver/eventlog', config, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data.eventlogs);
});
};
Client.prototype.getMailConfigForDomain = function (domain, callback) {
get('/api/v1/mail/' + domain, null, function (error, data, status) {
if (error) return callback(error);