mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-10 23:36:11 +01:00
Bug fix to Remote backups.
This commit is contained in:
@@ -1074,7 +1074,7 @@ app.controller('remoteBackupControl', function($scope, $http, $timeout) {
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
if (response.data.status == 1) {
|
||||
if (response.data.status === 1) {
|
||||
$scope.records = JSON.parse(response.data.data);
|
||||
var parsed = JSON.parse(response.data.data);
|
||||
|
||||
@@ -1149,7 +1149,6 @@ app.controller('remoteBackupControl', function($scope, $http, $timeout) {
|
||||
// disable fetch accounts button
|
||||
|
||||
$scope.fetchAccountsBtn = true;
|
||||
|
||||
$scope.backupLoading = false;
|
||||
|
||||
var IPAddress = $scope.IPAddress;
|
||||
@@ -1174,7 +1173,7 @@ app.controller('remoteBackupControl', function($scope, $http, $timeout) {
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
if (response.data.remoteTransferStatus == 1) {
|
||||
if (response.data.remoteTransferStatus === 1) {
|
||||
tempTransferDir = response.data.dir;
|
||||
$scope.accountsInRemoteServerTable = true;
|
||||
|
||||
@@ -1235,8 +1234,6 @@ app.controller('remoteBackupControl', function($scope, $http, $timeout) {
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
function getBackupStatus(password) {
|
||||
|
||||
url = "/backup/getRemoteTransferStatus";
|
||||
@@ -1244,7 +1241,7 @@ app.controller('remoteBackupControl', function($scope, $http, $timeout) {
|
||||
var data = {
|
||||
password : $scope.password,
|
||||
ipAddress: $scope.IPAddress,
|
||||
dir: tempTransferDir,
|
||||
dir: tempTransferDir
|
||||
};
|
||||
|
||||
var config = {
|
||||
@@ -1258,9 +1255,9 @@ app.controller('remoteBackupControl', function($scope, $http, $timeout) {
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
if (response.data.remoteTransferStatus == 1) {
|
||||
if (response.data.remoteTransferStatus === 1) {
|
||||
|
||||
if(response.data.backupsSent == 0){
|
||||
if(response.data.backupsSent === 0){
|
||||
$scope.backupStatus = false;
|
||||
$scope.requestData = response.data.status;
|
||||
$timeout(getBackupStatus, 2000);
|
||||
@@ -1268,7 +1265,9 @@ app.controller('remoteBackupControl', function($scope, $http, $timeout) {
|
||||
else{
|
||||
$scope.requestData = response.data.status;
|
||||
$timeout.cancel();
|
||||
$scope.backupLoading = true;
|
||||
|
||||
// Start the restore of remote backups that are transferred to local server
|
||||
|
||||
remoteBackupRestore();
|
||||
}
|
||||
}
|
||||
@@ -1318,7 +1317,7 @@ app.controller('remoteBackupControl', function($scope, $http, $timeout) {
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
if (response.data.remoteRestoreStatus == 1) {
|
||||
if (response.data.remoteRestoreStatus === 1) {
|
||||
localRestoreStatus();
|
||||
}
|
||||
}
|
||||
@@ -1330,6 +1329,7 @@ app.controller('remoteBackupControl', function($scope, $http, $timeout) {
|
||||
$scope.errorMessage = true;
|
||||
$scope.accountsFetched = true;
|
||||
$scope.notificationsBox = false;
|
||||
$scope.backupLoading = true;
|
||||
}
|
||||
|
||||
///////////////
|
||||
@@ -1357,9 +1357,9 @@ app.controller('remoteBackupControl', function($scope, $http, $timeout) {
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
if (response.data.remoteTransferStatus == 1) {
|
||||
if (response.data.remoteTransferStatus === 1) {
|
||||
|
||||
if(response.data.complete == 0){
|
||||
if(response.data.complete === 0){
|
||||
$scope.backupStatus = false;
|
||||
$scope.restoreData = response.data.status;
|
||||
$timeout(localRestoreStatus, 2000);
|
||||
|
||||
Reference in New Issue
Block a user