incremental backups: stage 5: generating backups

This commit is contained in:
Usman Nasir
2019-10-04 15:56:53 +05:00
parent a3ec139254
commit d81d00d8ca
9 changed files with 511 additions and 18 deletions

View File

@@ -133,7 +133,8 @@ app.controller('createIncrementalBackups', function ($scope, $http, $timeout) {
backupDestinations: $scope.backupDestinations,
websiteData: $scope.websiteData,
websiteEmails: $scope.websiteEmails,
websiteSSLs: $scope.websiteSSLs
websiteSSLs: $scope.websiteSSLs,
websiteDatabases: $scope.websiteDatabases
};
@@ -198,6 +199,52 @@ app.controller('createIncrementalBackups', function ($scope, $http, $timeout) {
};
$scope.restore = function (id) {
$scope.cyberpanelLoading = false;
url = "/IncrementalBackups/fetchRestorePoints";
var data = {
id: id
};
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) {
$scope.jobs = JSON.parse(response.data.data);
} 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'
});
}
};
});