Merge branch 'v2.3.2-dev' of https://github.com/usmannasir/cyberpanel into v2.3.2-dev

This commit is contained in:
Hassan Hashmi
2022-06-20 13:28:01 +05:00
8 changed files with 204 additions and 37 deletions

View File

@@ -1237,6 +1237,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
};
$scope.fetchstaging = function () {
$('#wordpresshomeloading').show();
$scope.wordpresshomeloading = false;
@@ -1285,6 +1286,49 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
};
$scope.fetchDatabase = function () {
$('#wordpresshomeloading').show();
$scope.wordpresshomeloading = false;
var url = "/websites/fetchDatabase";
var data = {
WPid: $('#WPid').html(),
}
var config = {
headers: {
'X-CSRFToken': getCookie('csrftoken')
}
};
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
function ListInitialDatas(response) {
wordpresshomeloading = true;
$('#wordpresshomeloading').hide();
if (response.data.status === 1) {
$('#DB_Name').html(response.data.DataBaseName);
$('#DB_User').html(response.data.DataBaseUser);
$('#tableprefix').html(response.data.tableprefix);
} else {
alert("Error data.error_message:" + response.data.error_message)
}
}
function cantLoadInitialDatas(response) {
$('#wordpresshomeloading').hide();
alert("Error" + response)
}
};
$scope.SaveUpdateConfig = function () {
$('#wordpresshomeloading').show();
var data = {