made changes in updatemysql

This commit is contained in:
Hassan Hashmi
2024-02-06 13:03:29 +05:00
parent 4a6aca8ea5
commit bad53db454
7 changed files with 179 additions and 7 deletions

View File

@@ -836,4 +836,61 @@ app.controller('OptimizeMysql', function ($scope, $http) {
});
}
}
})
})
app.controller('mysqlupdate', function ($scope, $http, $timeout) {
$scope.cyberPanelLoading = true;
$scope.dbLoading = true;
$scope.installlogs = true;
$scope.Upgardemysql = function () {
$scope.dbLoading = false;
$scope.installform = true;
url = "/dataBases/upgrademysqlnow";
var data = {
mysqlversion: $scope.version
};
var config = {
headers: {
'X-CSRFToken': getCookie('csrftoken')
}
};
$http.post(url, data, config).then(ListInitialData, cantLoadInitialData);
function ListInitialData(response) {
$scope.cyberhosting = true;
if (response.data.status === 1) {
$scope.installlogs = false;
$timeout(getRequestStatus, 1000);
} else {
new PNotify({
title: 'Error!',
text: response.data.error_message,
type: 'error'
});
}
}
function cantLoadInitialData(response) {
$scope.cyberhosting = true;
new PNotify({
title: 'Error!',
text: 'Could not connect to server, please refresh this page.',
type: 'error'
});
}
}
$scope.getRequestStatus
});