mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-11 15:56:11 +01:00
backupdoneini
This commit is contained in:
@@ -2147,10 +2147,11 @@ $parameters = array(
|
|||||||
from managePHP.phpManager import PHPManager
|
from managePHP.phpManager import PHPManager
|
||||||
import json
|
import json
|
||||||
tempStatusPath = self.extraArgs['tempStatusPath']
|
tempStatusPath = self.extraArgs['tempStatusPath']
|
||||||
|
self.tempStatusPath = tempStatusPath
|
||||||
|
|
||||||
statusFile = open(tempStatusPath, 'w')
|
statusFile = open(tempStatusPath, 'w')
|
||||||
statusFile.writelines('Creating BackUp...,10')
|
statusFile.writelines('Creating BackUp...,10')
|
||||||
statusFile.close()
|
statusFile.close()
|
||||||
|
|
||||||
wpsite = WPSites.objects.get(pk=self.extraArgs['WPid'])
|
wpsite = WPSites.objects.get(pk=self.extraArgs['WPid'])
|
||||||
|
|
||||||
website =Websites.objects.get(pk=wpsite.owner_id)
|
website =Websites.objects.get(pk=wpsite.owner_id)
|
||||||
@@ -2282,10 +2283,10 @@ $parameters = array(
|
|||||||
if os.path.exists(ProcessUtilities.debugPath):
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
logging.writeToFile(result)
|
logging.writeToFile(result)
|
||||||
|
|
||||||
|
|
||||||
command = f'rm -rf {tempPath}'
|
command = f'rm -rf {tempPath}'
|
||||||
ProcessUtilities.executioner(command)
|
ProcessUtilities.executioner(command)
|
||||||
|
|
||||||
|
|
||||||
statusFile = open(tempStatusPath, 'w')
|
statusFile = open(tempStatusPath, 'w')
|
||||||
statusFile.writelines("Successfully Created. [200]")
|
statusFile.writelines("Successfully Created. [200]")
|
||||||
statusFile.close()
|
statusFile.close()
|
||||||
@@ -2293,6 +2294,8 @@ $parameters = array(
|
|||||||
|
|
||||||
|
|
||||||
except BaseException as msg:
|
except BaseException as msg:
|
||||||
|
command = f'rm -rf {self.tempPath}'
|
||||||
|
ProcessUtilities.executioner(command)
|
||||||
logging.writeToFile("Error WPCreateBackup ....... %s" % str(msg))
|
logging.writeToFile("Error WPCreateBackup ....... %s" % str(msg))
|
||||||
statusFile = open(self.tempStatusPath, 'w')
|
statusFile = open(self.tempStatusPath, 'w')
|
||||||
statusFile.writelines(str(msg) + " [404]")
|
statusFile.writelines(str(msg) + " [404]")
|
||||||
|
|||||||
@@ -1149,10 +1149,14 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
|
|||||||
$scope.goBackDisable = false;
|
$scope.goBackDisable = false;
|
||||||
|
|
||||||
$("#installProgress").css("width", "100%");
|
$("#installProgress").css("width", "100%");
|
||||||
|
$("#installProgressbackup").css("width", "100%");
|
||||||
$scope.installPercentage = "100";
|
$scope.installPercentage = "100";
|
||||||
$scope.currentStatus = response.data.currentStatus;
|
$scope.currentStatus = response.data.currentStatus;
|
||||||
$timeout.cancel();
|
$timeout.cancel();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$scope.wordpresshomeloading = true;
|
$scope.wordpresshomeloading = true;
|
||||||
@@ -1166,17 +1170,22 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
|
|||||||
$scope.errorMessage = response.data.error_message;
|
$scope.errorMessage = response.data.error_message;
|
||||||
|
|
||||||
$("#installProgress").css("width", "0%");
|
$("#installProgress").css("width", "0%");
|
||||||
|
$("#installProgressbackup").css("width", "0%");
|
||||||
$scope.installPercentage = "0";
|
$scope.installPercentage = "0";
|
||||||
$scope.goBackDisable = false;
|
$scope.goBackDisable = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$("#installProgress").css("width", response.data.installationProgress + "%");
|
$("#installProgress").css("width", response.data.installationProgress + "%");
|
||||||
|
$("#installProgressbackup").css("width", response.data.installationProgress + "%");
|
||||||
$scope.installPercentage = response.data.installationProgress;
|
$scope.installPercentage = response.data.installationProgress;
|
||||||
$scope.currentStatus = response.data.currentStatus;
|
$scope.currentStatus = response.data.currentStatus;
|
||||||
$timeout(getCreationStatus, 1000);
|
$timeout(getCreationStatus, 1000);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -378,7 +378,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div id="installProgress" class="progress-bar"
|
<div id="installProgressbackup" class="progress-bar"
|
||||||
role="progressbar" aria-valuenow="70"
|
role="progressbar" aria-valuenow="70"
|
||||||
aria-valuemin="0" aria-valuemax="100"
|
aria-valuemin="0" aria-valuemax="100"
|
||||||
style="width:0%">
|
style="width:0%">
|
||||||
|
|||||||
@@ -710,7 +710,6 @@ class WebsiteManager:
|
|||||||
extraArgs['tempStatusPath'] = "/home/cyberpanel/" + str(randint(1000, 9999))
|
extraArgs['tempStatusPath'] = "/home/cyberpanel/" + str(randint(1000, 9999))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
background = ApplicationInstaller('WPCreateBackup', extraArgs)
|
background = ApplicationInstaller('WPCreateBackup', extraArgs)
|
||||||
background.start()
|
background.start()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user