bug fixes

This commit is contained in:
Usman Nasir
2022-06-05 18:34:46 +05:00
parent 2e61794c50
commit db691c432d
4 changed files with 57 additions and 64 deletions

View File

@@ -673,6 +673,7 @@ class ACLManager:
@staticmethod @staticmethod
def checkOwnership(domain, admin, currentACL): def checkOwnership(domain, admin, currentACL):
try: try:
childDomain = ChildDomains.objects.get(domain=domain) childDomain = ChildDomains.objects.get(domain=domain)

View File

@@ -348,6 +348,7 @@ app.controller('createWordpress', function ($scope, $http, $timeout, $compile, $
$scope.goBackDisable = true; $scope.goBackDisable = true;
$("#installProgress").css("width", "0%"); $("#installProgress").css("width", "0%");
}; };
function getCreationStatus() { function getCreationStatus() {
url = "/websites/installWordpressStatus"; url = "/websites/installWordpressStatus";
@@ -385,8 +386,7 @@ app.controller('createWordpress', function ($scope, $http, $timeout, $compile, $
$scope.currentStatus = response.data.currentStatus; $scope.currentStatus = response.data.currentStatus;
$timeout.cancel(); $timeout.cancel();
} } else {
else {
$scope.webSiteCreationLoading = true; $scope.webSiteCreationLoading = true;
$scope.installationDetailsForm = true; $scope.installationDetailsForm = true;
@@ -433,16 +433,19 @@ app.controller('createWordpress', function ($scope, $http, $timeout, $compile, $
}); });
//........... delete wp list //........... delete wp list
var FurlDeleteWP; var FurlDeleteWP;
function DeleteWPNow(url) { function DeleteWPNow(url) {
FurlDeleteWP = url; FurlDeleteWP = url;
} }
function FinalDeleteWPNow() { function FinalDeleteWPNow() {
window.location.href = FurlDeleteWP; window.location.href = FurlDeleteWP;
} }
app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $window) { app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $window) {
$scope.wordpresshomeloading = true; $scope.wordpresshomeloading = true;
$scope.stagingDetailsForm = false; $scope.stagingDetailsForm = false;
$scope.installationProgress = true; $scope.installationProgress = true;
@@ -587,7 +590,6 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
}; };
$scope.GetCurrentPlugins = function () { $scope.GetCurrentPlugins = function () {
$('#wordpresshomeloading').show(); $('#wordpresshomeloading').show();
@@ -641,7 +643,6 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
}; };
$scope.GetCurrentThemes = function () { $scope.GetCurrentThemes = function () {
$('#wordpresshomeloading').show(); $('#wordpresshomeloading').show();
@@ -1032,7 +1033,6 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
}; };
function AddThemes(value, index, array) { function AddThemes(value, index, array) {
var FinalMarkup = '<tr>' var FinalMarkup = '<tr>'
FinalMarkup = FinalMarkup + '<td><input onclick="AddThemeToArray(this,\'' + value.name + '\')" type="checkbox" id="' + value.name + '"><label for="' + value.name + '"></label></td>'; FinalMarkup = FinalMarkup + '<td><input onclick="AddThemeToArray(this,\'' + value.name + '\')" type="checkbox" id="' + value.name + '"><label for="' + value.name + '"></label></td>';
@@ -1251,21 +1251,13 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
function cantLoadInitialDatas(response) { function cantLoadInitialDatas(response) {
$('#wordpresshomeloading').hide(); $('#wordpresshomeloading').hide();
alert("Error"+response) alert("Error" + response)
} }
}; };
$scope.SaveUpdateConfig = function () {
$scope.autoLogin = function () {
var url = "/websites/DeleteThemes";
//window.open("/wpmanager/" + $('#HostingCompanyID').html() + "/manage/" + server + "/" + wordpress + "/AutoLogin");
var WPid = $('#WPid').html();
window.open("/websites/AutoLogin?WordPressID="+sub.id);
}
$scope.SaveUpdateConfig =function () {
$('#wordpresshomeloading').show(); $('#wordpresshomeloading').show();
var data = { var data = {
AutomaticUpdates: $('#AutomaticUpdates').find(":selected").text(), AutomaticUpdates: $('#AutomaticUpdates').find(":selected").text(),
@@ -1321,8 +1313,17 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
}; };
var DeploytoProductionID;
function DeployToProductionInitial(vall) {
DeploytoProductionID = vall;
}
function FinalDeployToProduction() {
alert($('#WPid').html());
alert(DeploytoProductionID);
return 0;
FinalDeployToProduction = function () {
$('#wordpresshomeloading').show(); $('#wordpresshomeloading').show();
$('#DeployToProduction').modal('hide'); $('#DeployToProduction').modal('hide');
var data = { var data = {
@@ -1374,20 +1375,16 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
}; }
}); });
var DeploytoProductionID;
function DeployToProductionInitial(vall){
DeploytoProductionID=vall;
}
function AddStagings(value, index, array) { function AddStagings(value, index, array) {
var FinalMarkup = '<tr>' var FinalMarkup = '<tr>'
for (let x in value) { for (let x in value) {
if (x === 'name') { if (x === 'name') {
FinalMarkup = FinalMarkup + '<td><a href="' + value.url + '">' + value[x] + '</a></td>'; FinalMarkup = FinalMarkup + '<td><a href=/websites/WPHome?ID=' + value.id + '>' + value[x] + '</a></td>';
} else if (x !== 'url' && x !== 'deleteURL' && x !== 'id') { } else if (x !== 'url' && x !== 'deleteURL' && x !== 'id') {
FinalMarkup = FinalMarkup + '<td>' + value[x] + "</td>"; FinalMarkup = FinalMarkup + '<td>' + value[x] + "</td>";
} }

View File

@@ -304,7 +304,7 @@
<i class="glyph-icon icon-arrow-right"></i> <i class="glyph-icon icon-arrow-right"></i>
</button> </button>
</div> </div>
<div ng-hide="installationProgress" class="form-group"> <div style="margin-top: 1%" ng-hide="installationProgress" class="form-group">
<label class="col-sm-2 control-label"></label> <label class="col-sm-2 control-label"></label>
<div class="col-sm-7"> <div class="col-sm-7">

View File

@@ -672,11 +672,6 @@ class WebsiteManager:
extraArgs['tempStatusPath'] = "/home/cyberpanel/" + str(randint(1000, 9999)) extraArgs['tempStatusPath'] = "/home/cyberpanel/" + str(randint(1000, 9999))
if ACLManager.checkOwnership(wpsite.owner.domain, admin, currentACL) == 1:
pass
else:
return ACLManager.loadError()
background = ApplicationInstaller('CreateStagingNow', extraArgs) background = ApplicationInstaller('CreateStagingNow', extraArgs)
background.start() background.start()