mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-15 09:46:11 +01:00
Merge branch 'v2.3.2-dev' of https://github.com/usmannasir/cyberpanel into v2.3.2-dev
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user