db manager

This commit is contained in:
Usman Nasir
2022-06-18 17:23:09 +05:00
parent 3c61540146
commit 7bce1d2606
7 changed files with 181 additions and 36 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 = {