feature: configure server mailer for CyberPanel notifications

This commit is contained in:
Usman Nasir
2020-03-17 20:51:45 +05:00
parent bae625a2d2
commit 88aee551c1
17 changed files with 2192 additions and 1625 deletions

View File

@@ -6714,5 +6714,62 @@ app.controller('manageGIT', function ($scope, $http, $timeout, $window) {
}
};
$scope.currentPage = 1;
$scope.recordsToShow = 10;
$scope.fetchGitLogs = function () {
$scope.cyberpanelLoading = false;
var config = {
headers: {
'X-CSRFToken': getCookie('csrftoken')
}
};
var data = {
domain: $("#domain").text(),
folder: $scope.folder,
page: $scope.currentPage,
recordsToShow: $scope.recordsToShow
};
dataurl = "/websites/fetchGitLogs";
$http.post(dataurl, data, config).then(ListInitialDatas, cantLoadInitialDatas);
function ListInitialDatas(response) {
$scope.cyberpanelLoading = true;
if (response.data.status === 1) {
new PNotify({
title: 'Success',
text: 'Successfully fetched.',
type: 'success'
});
$scope.logs = JSON.parse(response.data.logs);
$scope.pagination = response.data.pagination;
} else {
new PNotify({
title: 'Operation Failed!',
text: response.data.error_message,
type: 'error'
});
}
}
function cantLoadInitialDatas(response) {
$scope.cyberpanelLoading = true;
new PNotify({
title: 'Operation Failed!',
text: 'Could not connect to server, please refresh this page.',
type: 'error'
});
}
};
});
/* Java script code to git tracking ends here */