mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 05:45:59 +01:00
some improvements to wpmanager
This commit is contained in:
@@ -1647,7 +1647,7 @@ $parameters = array(
|
|||||||
import json
|
import json
|
||||||
tempStatusPath = self.data['tempStatusPath']
|
tempStatusPath = self.data['tempStatusPath']
|
||||||
statusFile = open(tempStatusPath, 'w')
|
statusFile = open(tempStatusPath, 'w')
|
||||||
statusFile.writelines('Creating Website...')
|
statusFile.writelines('Creating Website...,10')
|
||||||
statusFile.close()
|
statusFile.close()
|
||||||
|
|
||||||
|
|
||||||
@@ -1677,7 +1677,7 @@ $parameters = array(
|
|||||||
break
|
break
|
||||||
elif lastLine.find('[404]') > -1:
|
elif lastLine.find('[404]') > -1:
|
||||||
statusFile = open(currentTemp, 'w')
|
statusFile = open(currentTemp, 'w')
|
||||||
statusFile.writelines('Failed to Create Website: error: %s[404]' % lastLine)
|
statusFile.writelines('Failed to Create Website: error: %s. [404]' % lastLine)
|
||||||
statusFile.close()
|
statusFile.close()
|
||||||
return 0
|
return 0
|
||||||
else:
|
else:
|
||||||
@@ -1687,7 +1687,7 @@ $parameters = array(
|
|||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|
||||||
statusFile = open(tempStatusPath, 'w')
|
statusFile = open(tempStatusPath, 'w')
|
||||||
statusFile.writelines('Installing WordPress....')
|
statusFile.writelines('Installing WordPress....,30')
|
||||||
statusFile.close()
|
statusFile.close()
|
||||||
|
|
||||||
## Install WordPress
|
## Install WordPress
|
||||||
|
|||||||
@@ -310,12 +310,14 @@ app.controller('createWordpress', function ($scope, $http, $timeout, $compile, $
|
|||||||
getCreationStatus();
|
getCreationStatus();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
$scope.goBackDisable = false;
|
||||||
// $scope.errorMessage = response.data.error_message;
|
new PNotify({
|
||||||
alert("Status not = 1: Error..." + response.data.error_message)
|
title: 'Operation Failed!',
|
||||||
|
text: response.data.error_message,
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|||||||
@@ -10,24 +10,34 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div id="page-title">
|
<div id="page-title">
|
||||||
<h2 id="domainNamePage"><h2>{% trans "Configure Plugins" %}</h2>
|
<h2 id="domainNamePage"><h2>{% trans "Configure Plugins" %}</h2>
|
||||||
<a class="pull-right btn btn-primary" href="{% url "Addnewplugin" %}">{% trans "Add New Plugin" %}</a>
|
<a class="pull-right btn btn-primary" href="{% url "Addnewplugin" %}">{% trans "Create New Bucket" %}</a>
|
||||||
</h2>
|
</h2>
|
||||||
|
<p>{% trans "You can configure list of plugins that will automatically get installed while deploying WordPress." %}</p>
|
||||||
</div>
|
</div>
|
||||||
<h3>List of Saved Plugins Bucket</h3>
|
<div ng-controller="listTableUsers" class="panel">
|
||||||
|
<div class="panel-body">
|
||||||
|
<h3 class="content-box-header">
|
||||||
|
{% trans "Plugin Buckets" %} <img ng-hide="cyberpanelLoading"
|
||||||
|
src="{% static 'images/loading.gif' %}">
|
||||||
|
</h3>
|
||||||
|
<div class="example-box-wrapper">
|
||||||
|
|
||||||
|
<!------ List of records --------------->
|
||||||
|
|
||||||
<table class="table table-hover dataTable no-footer" id="basicTable" role="grid">
|
<table class="table table-hover dataTable no-footer" id="basicTable" role="grid">
|
||||||
<thead style="background-color: #0a6ebd">
|
<thead>
|
||||||
<tr role="row" class="plans-head">
|
<tr role="row" class="plans-head">
|
||||||
<th style="color: #fff0ff" class="sorting_desc" tabindex="0"
|
<th class="sorting_desc" tabindex="0"
|
||||||
aria-controls="basicTable" rowspan="1" colspan="1"
|
aria-controls="basicTable" rowspan="1" colspan="1"
|
||||||
aria-sort="descending"
|
aria-sort="descending"
|
||||||
aria-label="Title: activate to sort column ascending">ID
|
aria-label="Title: activate to sort column ascending">ID
|
||||||
</th>
|
</th>
|
||||||
<th style="color: #fff0ff" class="sorting" tabindex="0"
|
<th class="sorting" tabindex="0"
|
||||||
aria-controls="basicTable" rowspan="1" colspan="1"
|
aria-controls="basicTable" rowspan="1" colspan="1"
|
||||||
aria-label="Places: activate to sort column ascending">File name
|
aria-label="Places: activate to sort column ascending">File name
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th style="color: #fff0ff" class="sorting" tabindex="0"
|
<th class="sorting" tabindex="0"
|
||||||
aria-controls="basicTable" rowspan="1" colspan="1"
|
aria-controls="basicTable" rowspan="1" colspan="1"
|
||||||
aria-label="Places: activate to sort column ascending">Action
|
aria-label="Places: activate to sort column ascending">Action
|
||||||
</th>
|
</th>
|
||||||
@@ -49,8 +59,9 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="row">
|
<td class="row">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<a href="{% url 'EidtPlugin'%}?ID={{sub.id}}"
|
<a href="{% url 'EidtPlugin' %}?ID={{ sub.id }}"
|
||||||
type="button" class="btn btn-border btn-alt border-green btn-link font-green">
|
type="button"
|
||||||
|
class="btn btn-border btn-alt border-green btn-link font-green">
|
||||||
Edit
|
Edit
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -61,7 +72,8 @@
|
|||||||
onclick="DeletePluginBuucket('{% url 'ConfigurePlugins' %}?delete={{ sub.id }}')"
|
onclick="DeletePluginBuucket('{% url 'ConfigurePlugins' %}?delete={{ sub.id }}')"
|
||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
data-target="#DeleteMember" aria-label=""
|
data-target="#DeleteMember" aria-label=""
|
||||||
type="button" class="btn btn-border btn-alt border-red btn-link font-red">
|
type="button"
|
||||||
|
class="btn btn-border btn-alt border-red btn-link font-red">
|
||||||
Delete
|
Delete
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -75,27 +87,33 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<!------ List of records --------------->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!------------Modal---->
|
<!------------Modal---->
|
||||||
|
|
||||||
<div class="modal fade stick-up" id="DeleteMember" tabindex="-1">
|
<div class="modal fade stick-up" id="DeleteMember" tabindex="-1">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
<h4 class="modal-title">Deleting Plugin Bucket</h4>
|
<h4 class="modal-title">Deleting Plugin Bucket</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p>Are you sure?</p>
|
<p>Are you sure?</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
|
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
|
||||||
<button type="button" onclick="FinalDeletePluginBuucket()" class="btn btn-primary">Yes</button>
|
<button type="button" onclick="FinalDeletePluginBuucket()" class="btn btn-primary">Yes</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -168,8 +168,6 @@ class WebsiteManager:
|
|||||||
userobj = Administrator.objects.get(pk=userID)
|
userobj = Administrator.objects.get(pk=userID)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Selectedplugins = wpplugins.objects.filter(owner = userobj)
|
Selectedplugins = wpplugins.objects.filter(owner = userobj)
|
||||||
#data['Selectedplugins'] = wpplugins.objects.filter(ProjectOwner=HostingCompany)
|
#data['Selectedplugins'] = wpplugins.objects.filter(ProjectOwner=HostingCompany)
|
||||||
|
|
||||||
@@ -1051,7 +1049,6 @@ class WebsiteManager:
|
|||||||
extraArgs['home'] = "1"
|
extraArgs['home'] = "1"
|
||||||
extraArgs['tempStatusPath'] = "/home/cyberpanel/" + str(randint(1000, 9999))
|
extraArgs['tempStatusPath'] = "/home/cyberpanel/" + str(randint(1000, 9999))
|
||||||
|
|
||||||
|
|
||||||
background = ApplicationInstaller('wordpressInstallNew', extraArgs)
|
background = ApplicationInstaller('wordpressInstallNew', extraArgs)
|
||||||
background.start()
|
background.start()
|
||||||
|
|
||||||
@@ -2798,7 +2795,7 @@ class WebsiteManager:
|
|||||||
return HttpResponse(json_data)
|
return HttpResponse(json_data)
|
||||||
elif lastLine.find('[404]') > -1:
|
elif lastLine.find('[404]') > -1:
|
||||||
data_ret = {'abort': 1, 'installStatus': 0, 'installationProgress': "0",
|
data_ret = {'abort': 1, 'installStatus': 0, 'installationProgress': "0",
|
||||||
'error_message': lastLine}
|
'error_message': ProcessUtilities.outputExecutioner("cat " + statusFile).splitlines()}
|
||||||
json_data = json.dumps(data_ret)
|
json_data = json.dumps(data_ret)
|
||||||
return HttpResponse(json_data)
|
return HttpResponse(json_data)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user