resolve conflic

This commit is contained in:
Usman Nasir
2022-06-07 13:49:04 +05:00
6 changed files with 330 additions and 2 deletions

View File

@@ -1397,6 +1397,62 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
};
$scope.CreateBackup = function () {
$('#wordpresshomeloading').show();
$scope.wordpresshomeloading = false;
$scope.stagingDetailsForm = true;
$scope.installationProgress = false;
$scope.errorMessageBox = true;
$scope.success = true;
$scope.couldNotConnect = true;
$scope.goBackDisable = true;
$scope.currentStatus = "Starting creation Backups..";
var data = {
WPid: $('#WPid').html(),
}
var url = "/websites/WPCreateBackup";
var config = {
headers: {
'X-CSRFToken': getCookie('csrftoken')
}
};
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
function ListInitialDatas(response) {
$('#wordpresshomeloading').hide();
$('createbackupbutton').hide();
if (response.data.status === 1) {
new PNotify({
title: 'Success!',
text: 'Creating Backups!.',
type: 'success'
});
statusFile = response.data.tempStatusPath;
getCreationStatus();
} else {
new PNotify({
title: 'Operation Failed!',
text: response.data.error_message,
type: 'error'
});
}
}
function cantLoadInitialDatas(response) {
$('#wordpresshomeloading').hide();
alert(response)
}
};
});