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
|
||||
tempStatusPath = self.data['tempStatusPath']
|
||||
statusFile = open(tempStatusPath, 'w')
|
||||
statusFile.writelines('Creating Website...')
|
||||
statusFile.writelines('Creating Website...,10')
|
||||
statusFile.close()
|
||||
|
||||
|
||||
@@ -1677,7 +1677,7 @@ $parameters = array(
|
||||
break
|
||||
elif lastLine.find('[404]') > -1:
|
||||
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()
|
||||
return 0
|
||||
else:
|
||||
@@ -1687,7 +1687,7 @@ $parameters = array(
|
||||
time.sleep(2)
|
||||
|
||||
statusFile = open(tempStatusPath, 'w')
|
||||
statusFile.writelines('Installing WordPress....')
|
||||
statusFile.writelines('Installing WordPress....,30')
|
||||
statusFile.close()
|
||||
|
||||
## Install WordPress
|
||||
|
||||
@@ -310,12 +310,14 @@ app.controller('createWordpress', function ($scope, $http, $timeout, $compile, $
|
||||
getCreationStatus();
|
||||
|
||||
} else {
|
||||
|
||||
// $scope.errorMessage = response.data.error_message;
|
||||
alert("Status not = 1: Error..." + response.data.error_message)
|
||||
$scope.goBackDisable = false;
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: response.data.error_message,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
|
||||
@@ -10,24 +10,34 @@
|
||||
<div class="container">
|
||||
<div id="page-title">
|
||||
<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>
|
||||
<p>{% trans "You can configure list of plugins that will automatically get installed while deploying WordPress." %}</p>
|
||||
</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">
|
||||
<thead style="background-color: #0a6ebd">
|
||||
<thead>
|
||||
<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-sort="descending"
|
||||
aria-label="Title: activate to sort column ascending">ID
|
||||
</th>
|
||||
<th style="color: #fff0ff" class="sorting" tabindex="0"
|
||||
<th class="sorting" tabindex="0"
|
||||
aria-controls="basicTable" rowspan="1" colspan="1"
|
||||
aria-label="Places: activate to sort column ascending">File name
|
||||
</th>
|
||||
|
||||
<th style="color: #fff0ff" class="sorting" tabindex="0"
|
||||
<th class="sorting" tabindex="0"
|
||||
aria-controls="basicTable" rowspan="1" colspan="1"
|
||||
aria-label="Places: activate to sort column ascending">Action
|
||||
</th>
|
||||
@@ -49,8 +59,9 @@
|
||||
</td>
|
||||
<td class="row">
|
||||
<div class="col-md-2">
|
||||
<a href="{% url 'EidtPlugin'%}?ID={{sub.id}}"
|
||||
type="button" class="btn btn-border btn-alt border-green btn-link font-green">
|
||||
<a href="{% url 'EidtPlugin' %}?ID={{ sub.id }}"
|
||||
type="button"
|
||||
class="btn btn-border btn-alt border-green btn-link font-green">
|
||||
Edit
|
||||
</a>
|
||||
</div>
|
||||
@@ -61,7 +72,8 @@
|
||||
onclick="DeletePluginBuucket('{% url 'ConfigurePlugins' %}?delete={{ sub.id }}')"
|
||||
data-toggle="modal"
|
||||
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
|
||||
</button>
|
||||
|
||||
@@ -75,27 +87,33 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!------ List of records --------------->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!------------Modal---->
|
||||
|
||||
<div class="modal fade stick-up" id="DeleteMember" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">Deleting Plugin Bucket</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Are you sure?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
|
||||
<button type="button" onclick="FinalDeletePluginBuucket()" class="btn btn-primary">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">Deleting Plugin Bucket</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Are you sure?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
|
||||
<button type="button" onclick="FinalDeletePluginBuucket()" class="btn btn-primary">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -168,8 +168,6 @@ class WebsiteManager:
|
||||
userobj = Administrator.objects.get(pk=userID)
|
||||
|
||||
|
||||
|
||||
|
||||
Selectedplugins = wpplugins.objects.filter(owner = userobj)
|
||||
#data['Selectedplugins'] = wpplugins.objects.filter(ProjectOwner=HostingCompany)
|
||||
|
||||
@@ -1051,7 +1049,6 @@ class WebsiteManager:
|
||||
extraArgs['home'] = "1"
|
||||
extraArgs['tempStatusPath'] = "/home/cyberpanel/" + str(randint(1000, 9999))
|
||||
|
||||
|
||||
background = ApplicationInstaller('wordpressInstallNew', extraArgs)
|
||||
background.start()
|
||||
|
||||
@@ -2798,7 +2795,7 @@ class WebsiteManager:
|
||||
return HttpResponse(json_data)
|
||||
elif lastLine.find('[404]') > -1:
|
||||
data_ret = {'abort': 1, 'installStatus': 0, 'installationProgress': "0",
|
||||
'error_message': lastLine}
|
||||
'error_message': ProcessUtilities.outputExecutioner("cat " + statusFile).splitlines()}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user