improvments to email verification

This commit is contained in:
Usman Nasir
2020-06-07 17:53:11 +05:00
parent 9048a5fe7c
commit 0b5bc9fed2
11 changed files with 465 additions and 82 deletions

View File

@@ -237,10 +237,8 @@ app.controller('backupWebsiteControl', function ($scope, $http, $timeout) {
///** Backup site ends **///
///** Restore site ***//
app.controller('restoreWebsiteControl', function ($scope, $http, $timeout) {
$scope.restoreLoading = true;
@@ -415,13 +413,10 @@ app.controller('restoreWebsiteControl', function ($scope, $http, $timeout) {
});
//*** Restore site ends here ***///
///** Backup Destination ***//
app.controller('backupDestinations', function ($scope, $http, $timeout) {
$scope.destinationLoading = true;
@@ -666,13 +661,10 @@ app.controller('backupDestinations', function ($scope, $http, $timeout) {
});
//*** Backup destination ***///
///** Schedule Backup ***//
app.controller('scheduleBackup', function ($scope, $http, $timeout) {
$scope.scheduleBackupLoading = true;
@@ -951,10 +943,8 @@ app.controller('scheduleBackup', function ($scope, $http, $timeout) {
});
//*** Schedule Backup ***///
//*** Remote Backup site ****//
app.controller('remoteBackupControl', function ($scope, $http, $timeout) {
@@ -1543,7 +1533,6 @@ app.controller('remoteBackupControl', function ($scope, $http, $timeout) {
///** Backup site ends **///
//*** Remote Backup site ****//
app.controller('backupLogsScheduled', function ($scope, $http, $timeout) {

View File

@@ -774,6 +774,58 @@ app.controller('manageEmailLists', function ($scope, $http, $timeout) {
};
$scope.currentPageLogs = 1;
$scope.recordsToShowLogs = 10;
$scope.fetchLogs = function () {
$scope.cyberPanelLoading = false;
var config = {
headers: {
'X-CSRFToken': getCookie('csrftoken')
}
};
var data = {
listName: $scope.listName,
page: $scope.currentPageLogs,
recordsToShow: $scope.recordsToShowLogs
};
url = "/emailMarketing/fetchVerifyLogs";
$http.post(url, data, config).then(ListInitialData, cantLoadInitialData);
function ListInitialData(response) {
$scope.cyberPanelLoading = true;
if (response.data.status === 1) {
$scope.recordsLogs = JSON.parse(response.data.logs);
$scope.paginationLogs = response.data.pagination;
$scope.totalEmails = response.data.totalEmails;
$scope.verified = response.data.verified;
$scope.notVerified = response.data.notVerified;
} else {
new PNotify({
title: 'Error!',
text: response.data.error_message,
type: 'error'
});
}
}
function cantLoadInitialData(response) {
$scope.cyberPanelLoading = true;
new PNotify({
title: 'Operation Failed!',
text: 'Could not connect to server, please refresh this page',
type: 'error'
});
}
};
});
app.controller('manageSMTPHostsCTRL', function ($scope, $http) {
@@ -1330,4 +1382,87 @@ app.controller('sendEmailsCTRL', function ($scope, $http, $timeout) {
};
});
app.controller('configureVerify', function ($scope, $http) {
$scope.cyberPanelLoading = true;
$scope.ipv4Hidden = true;
$scope.ipv6Hidden = true;
$scope.delayHidden = true;
$scope.delayInitial = function () {
if ($scope.delay === 'Disable') {
$scope.delayHidden = true;
} else {
$scope.delayHidden = false;
}
};
$scope.rotateInitial = function () {
if ($scope.rotation === 'Disable') {
$scope.rotationHidden = true;
} else if ($scope.rotation === 'IPv4') {
$scope.ipv4Hidden = false;
$scope.ipv6Hidden = true;
} else {
$scope.ipv4Hidden = true;
$scope.ipv6Hidden = false;
}
};
$scope.saveChanges = function () {
$scope.cyberPanelLoading = false;
url = "/emailMarketing/saveConfigureVerify";
var data = {
domain: $("#domainName").text(),
rotation: $scope.rotation,
delay: $scope.delay,
delayAfter: $scope.delayAfter,
delayTime: $scope.delayTime,
ipv4: $scope.ipv4,
ipv6: $scope.ipv6
};
var config = {
headers: {
'X-CSRFToken': getCookie('csrftoken')
}
};
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
function ListInitialDatas(response) {
$scope.cyberPanelLoading = true;
if (response.data.status === 1) {
new PNotify({
title: 'Success!',
text: 'Successfully saved verification settings.',
type: 'success'
});
} else {
new PNotify({
title: 'Operation Failed!',
text: response.data.error_message,
type: 'error'
});
}
}
function cantLoadInitialDatas(response) {
$scope.cyberPanelLoading = false;
new PNotify({
title: 'Operation Failed!',
text: 'Could not connect to server, please refresh this page',
type: 'error'
});
}
};
});