mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 13:56:01 +01:00
feature: convert domain to website
This commit is contained in:
@@ -378,7 +378,7 @@ app.controller('listWebsites', function ($scope, $http) {
|
||||
|
||||
});
|
||||
|
||||
app.controller('listChildDomainsMain', function ($scope, $http) {
|
||||
app.controller('listChildDomainsMain', function ($scope, $http, $timeout) {
|
||||
|
||||
|
||||
$scope.currentPage = 1;
|
||||
@@ -525,6 +525,174 @@ app.controller('listChildDomainsMain', function ($scope, $http) {
|
||||
|
||||
};
|
||||
|
||||
$scope.initConvert = function(virtualHost){
|
||||
$scope.domainName = virtualHost;
|
||||
};
|
||||
|
||||
var statusFile;
|
||||
|
||||
$scope.installationProgress = true;
|
||||
|
||||
$scope.convert = function () {
|
||||
|
||||
$scope.cyberPanelLoading = false;
|
||||
$scope.installationDetailsForm = true;
|
||||
$scope.installationProgress = false;
|
||||
$scope.goBackDisable = true;
|
||||
|
||||
$scope.currentStatus = "Starting creation..";
|
||||
|
||||
var ssl, dkimCheck, openBasedir;
|
||||
|
||||
if ($scope.sslCheck === true) {
|
||||
ssl = 1;
|
||||
} else {
|
||||
ssl = 0
|
||||
}
|
||||
|
||||
if ($scope.dkimCheck === true) {
|
||||
dkimCheck = 1;
|
||||
} else {
|
||||
dkimCheck = 0
|
||||
}
|
||||
|
||||
if ($scope.openBasedir === true) {
|
||||
openBasedir = 1;
|
||||
} else {
|
||||
openBasedir = 0
|
||||
}
|
||||
|
||||
url = "/websites/convertDomainToSite";
|
||||
|
||||
|
||||
var data = {
|
||||
package: $scope.packageForWebsite,
|
||||
domainName: $scope.domainName,
|
||||
adminEmail: $scope.adminEmail,
|
||||
phpSelection: $scope.phpSelection,
|
||||
websiteOwner: $scope.websiteOwner,
|
||||
ssl: ssl,
|
||||
dkimCheck: dkimCheck,
|
||||
openBasedir: openBasedir
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
if (response.data.createWebSiteStatus === 1) {
|
||||
statusFile = response.data.tempStatusPath;
|
||||
getCreationStatus();
|
||||
} else {
|
||||
|
||||
$scope.cyberPanelLoading = true;
|
||||
$scope.installationDetailsForm = true;
|
||||
$scope.installationProgress = false;
|
||||
$scope.goBackDisable = false;
|
||||
|
||||
$scope.currentStatus = response.data.error_message;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
|
||||
$scope.cyberPanelLoading = true;
|
||||
$scope.installationDetailsForm = true;
|
||||
$scope.installationProgress = false;
|
||||
$scope.goBackDisable = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
$scope.goBack = function () {
|
||||
$scope.cyberPanelLoading = true;
|
||||
$scope.installationDetailsForm = false;
|
||||
$scope.installationProgress = true;
|
||||
$scope.goBackDisable = true;
|
||||
$("#installProgress").css("width", "0%");
|
||||
};
|
||||
|
||||
function getCreationStatus() {
|
||||
|
||||
url = "/websites/installWordpressStatus";
|
||||
|
||||
var data = {
|
||||
statusFile: statusFile
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
|
||||
if (response.data.abort === 1) {
|
||||
|
||||
if (response.data.installStatus === 1) {
|
||||
|
||||
$scope.cyberPanelLoading = true;
|
||||
$scope.installationDetailsForm = true;
|
||||
$scope.installationProgress = false;
|
||||
$scope.goBackDisable = false;
|
||||
|
||||
$("#installProgress").css("width", "100%");
|
||||
$scope.installPercentage = "100";
|
||||
$scope.currentStatus = response.data.currentStatus;
|
||||
$timeout.cancel();
|
||||
|
||||
} else {
|
||||
|
||||
$scope.cyberPanelLoading = true;
|
||||
$scope.installationDetailsForm = true;
|
||||
$scope.installationProgress = false;
|
||||
$scope.goBackDisable = false;
|
||||
|
||||
$scope.currentStatus = response.data.error_message;
|
||||
|
||||
$("#installProgress").css("width", "0%");
|
||||
$scope.installPercentage = "0";
|
||||
$scope.goBackDisable = false;
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
$("#installProgress").css("width", response.data.installationProgress + "%");
|
||||
$scope.installPercentage = response.data.installationProgress;
|
||||
$scope.currentStatus = response.data.currentStatus;
|
||||
$timeout(getCreationStatus, 1000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
|
||||
$scope.cyberPanelLoading = true;
|
||||
$scope.installationDetailsForm = true;
|
||||
$scope.installationProgress = false;
|
||||
$scope.goBackDisable = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -15,137 +15,243 @@
|
||||
|
||||
<div ng-controller="listChildDomainsMain" class="container">
|
||||
|
||||
<div id="page-title">
|
||||
<h2 id="domainNamePage">{% trans "List Child Domains" %}</h2> <img ng-hide="cyberPanelLoading"
|
||||
src="{% static 'images/loading.gif' %}">
|
||||
<p>{% trans "On this page you can launch, list, modify and delete child domains from your server." %}</p>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-10" style="padding: 0px; box-shadow: 0px 0px 1px 0px #888888; margin-bottom: 2%">
|
||||
<input ng-change="searchWebsites()" placeholder="Search..." ng-model="patternAdded" name="dom" type="text"
|
||||
class="form-control" required>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group">
|
||||
<select ng-model="recordsToShow" ng-change="getFurtherWebsitesFromDB()"
|
||||
class="form-control" id="example-select">
|
||||
<option>10</option>
|
||||
<option>50</option>
|
||||
<option>100</option>
|
||||
</select>
|
||||
<div id="page-title">
|
||||
<h2 id="domainNamePage">{% trans "List Child Domains" %}</h2> <img ng-hide="cyberPanelLoading"
|
||||
src="{% static 'images/loading.gif' %}">
|
||||
<p>{% trans "On this page you can launch, list, modify and delete child domains from your server." %}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-repeat="web in WebSitesList track by $index" class="panel col-md-12"
|
||||
style="padding: 0px; box-shadow: 0px 0px 1px 0px #888888;">
|
||||
<div class="">
|
||||
<div class="table-responsive no-gutter text-nowrap" style="overflow-x: hidden;">
|
||||
<div style="background-image: url({% static 'images/not-available-preview.png' %});
|
||||
height: 160px;
|
||||
width: 200px;
|
||||
background-position: top;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
position: relative;" class="col-lg-3 col-md-12">
|
||||
</div>
|
||||
<div class="col-lg-9" style="text-transform: none">
|
||||
<div style="border-bottom: 1px solid #888888" class="col-md-12">
|
||||
<div class="col-lg-10 content-box-header" style="text-transform: none;">
|
||||
<a href="http://{$ web.domain $}" target="_blank" title="Visit Site">
|
||||
<h2 style="display: inline; color: #414C59;" ng-bind="web.domain"></h2>
|
||||
</a>
|
||||
<a target="_blank" href="/filemanager/{$ web.masterDomain $}" title="Open File Manager"> -- {$ web.path $}</a>
|
||||
</div>
|
||||
<div class="col-md-2 content-box-header" style="text-transform: none;">
|
||||
<a href="/websites/{$ web.domain $}" target="_blank" title="Manage Website">
|
||||
<i class="p fa fa-external-link btn-icon"> </i>
|
||||
<span>Manage</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-10" style="padding: 0px; box-shadow: 0px 0px 1px 0px #888888; margin-bottom: 2%">
|
||||
<input ng-change="searchWebsites()" placeholder="Search..." ng-model="patternAdded" name="dom" type="text"
|
||||
class="form-control" required>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group">
|
||||
<select ng-model="recordsToShow" ng-change="getFurtherWebsitesFromDB()"
|
||||
class="form-control" id="example-select">
|
||||
<option>10</option>
|
||||
<option>50</option>
|
||||
<option>100</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-repeat="web in WebSitesList track by $index" class="panel col-md-12"
|
||||
style="padding: 0px; box-shadow: 0px 0px 1px 0px #888888;">
|
||||
<div class="">
|
||||
<div class="table-responsive no-gutter text-nowrap" style="overflow-x: hidden;">
|
||||
<div style="background-image: url({% static 'images/not-available-preview.png' %});
|
||||
height: 160px;
|
||||
width: 200px;
|
||||
background-position: top;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
position: relative;" class="col-lg-3 col-md-12">
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-4 content-box-header">
|
||||
<i class="p fa fa-user-circle btn-icon text-muted" data-toggle="tooltip"
|
||||
data-placement="right" title="Master Domain/Owner"> </i>
|
||||
<span ng-bind="web.masterDomain" style="text-transform: none"></span>
|
||||
<div class="col-lg-9" style="text-transform: none">
|
||||
<div style="border-bottom: 1px solid #888888" class="col-md-12">
|
||||
<div class="col-lg-10 content-box-header" style="text-transform: none;">
|
||||
<a href="http://{$ web.domain $}" target="_blank" title="Visit Site">
|
||||
<h2 style="display: inline; color: #414C59;" ng-bind="web.domain"></h2>
|
||||
</a>
|
||||
<a target="_blank" href="/filemanager/{$ web.masterDomain $}" title="Open File Manager">
|
||||
--
|
||||
{$ web.path $}</a>
|
||||
</div>
|
||||
<div class="col-md-2 content-box-header" style="text-transform: none;">
|
||||
<a href="/websites/{$ web.masterDomain $}/{$ web.domain $}" target="_blank"
|
||||
title="Manage Website">
|
||||
<i class="p fa fa-external-link btn-icon"> </i>
|
||||
<span>Manage</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 content-box-header">
|
||||
<i class="p fa fa-map-marker btn-icon text-muted" data-toggle="tooltip"
|
||||
data-placement="right" title="IP Address"> </i>
|
||||
<span ng-bind="web.ipAddress"></span>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-4 content-box-header">
|
||||
<i class="p fa fa-user-circle btn-icon text-muted" data-toggle="tooltip"
|
||||
data-placement="right" title="Master Domain/Owner"> </i>
|
||||
<span ng-bind="web.masterDomain" style="text-transform: none"></span>
|
||||
</div>
|
||||
<div class="col-md-4 content-box-header">
|
||||
<i class="p fa fa-map-marker btn-icon text-muted" data-toggle="tooltip"
|
||||
data-placement="right" title="IP Address"> </i>
|
||||
<span ng-bind="web.ipAddress"></span>
|
||||
</div>
|
||||
<div class="col-md-4 content-box-header">
|
||||
<i class="p fa fa-lock btn-icon text-muted" data-toggle="tooltip" data-placement="right"
|
||||
title="SSL"> </i>
|
||||
<span><a ng-click="issueSSL(web.domain)" href=""
|
||||
style="text-transform: none">Issue SSL</a></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 content-box-header">
|
||||
<i class="p fa fa-lock btn-icon text-muted" data-toggle="tooltip" data-placement="right"
|
||||
title="SSL"> </i>
|
||||
<span><a ng-click="issueSSL(web.domain)" href="" style="text-transform: none">Issue SSL</a></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-4 content-box-header">
|
||||
<i class="p fa fa-cubes btn-icon text-muted" data-toggle="tooltip" data-placement="right"
|
||||
title="Packages"> </i>
|
||||
<span ng-bind="web.package" style="text-transform: none"></span>
|
||||
</div>
|
||||
<div class="col-md-4 content-box-header">
|
||||
<i class="p fa fa-user btn-icon text-muted" data-toggle="tooltip" data-placement="right"
|
||||
title="Owner"> </i>
|
||||
<span ng-bind="web.admin" style="text-transform: none"></span>
|
||||
</div>
|
||||
<div class="col-md-4 content-box-header">
|
||||
<i class="p fa fa-cubes btn-icon text-muted" data-toggle="tooltip"
|
||||
data-placement="right"
|
||||
title="Packages"> </i>
|
||||
<span ng-bind="web.package" style="text-transform: none"></span>
|
||||
</div>
|
||||
<div class="col-md-4 content-box-header">
|
||||
<i class="p fa fa-user btn-icon text-muted" data-toggle="tooltip" data-placement="right"
|
||||
title="Owner"> </i>
|
||||
<span ng-bind="web.admin" style="text-transform: none"></span>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 content-box-header">
|
||||
<i class="p fa fa-arrows-h btn-icon text-muted" data-toggle="tooltip"
|
||||
data-placement="right"
|
||||
title="Convert to Website"> </i>
|
||||
<span><a data-toggle="modal" data-target="#settings" href=""
|
||||
style="text-transform: none" ng-click="initConvert(web.domain)">Convert to Website</a></span>
|
||||
<div id="settings" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×
|
||||
</button>
|
||||
<h4 class="modal-title">Convert Child Domain to normal Website
|
||||
<img ng-hide="$parent.cyberPanelLoading" src="/static/images/loading.gif"
|
||||
style="display: none;">
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<form name="containerSettingsForm" action="/" class="form-horizontal">
|
||||
|
||||
<div ng-hide="installationDetailsForm" class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Domain Name" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input name="dom" type="text" class="form-control"
|
||||
ng-model="domainName"
|
||||
placeholder="{% trans "Do not enter WWW, it will be auto created!" %}"
|
||||
readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-hide="installationDetailsForm" class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Select Owner" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<select ng-model="$parent.websiteOwner"
|
||||
class="form-control">
|
||||
{% for items in owernList %}
|
||||
<option>{{ items }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr ng-hide="installationDetailsForm">
|
||||
|
||||
<div ng-hide="installationDetailsForm" class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Select Package" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<select ng-model="$parent.packageForWebsite"
|
||||
class="form-control">
|
||||
{% for items in packageList %}
|
||||
<option>{{ items }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr ng-hide="installationDetailsForm">
|
||||
<div ng-hide="installationDetailsForm" class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Email" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="email" name="email" class="form-control"
|
||||
ng-model="$parent.adminEmail" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr ng-hide="installationDetailsForm">
|
||||
<div ng-hide="installationDetailsForm" class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Select PHP" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<select ng-model="$parent.phpSelection"
|
||||
class="form-control">
|
||||
{% for php in phps %}
|
||||
<option>{{ php }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-hide="installationProgress" class="form-group">
|
||||
<label class="col-sm-1 control-label"></label>
|
||||
<div class="col-sm-10">
|
||||
|
||||
<div class="alert alert-success text-center">
|
||||
<h2>{$ currentStatus $}</h2>
|
||||
</div>
|
||||
|
||||
<div class="progress">
|
||||
<div id="installProgress" class="progress-bar"
|
||||
role="progressbar" aria-valuenow="70"
|
||||
aria-valuemin="0" aria-valuemax="100"
|
||||
style="width:0%">
|
||||
<span class="sr-only">70% Complete</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-hide="installationProgress" class="form-group">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" ng-disabled="goBackDisable"
|
||||
ng-click="goBack()"
|
||||
class="btn btn-primary btn-lg">{% trans "Go Back" %}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary"
|
||||
ng-click="convert()">Convert
|
||||
</button>
|
||||
<button type="button" ng-disabled="savingSettings"
|
||||
class="btn btn-default" data-dismiss="modal">
|
||||
Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 content-box-header">
|
||||
<i class="p fa fa-arrows-h btn-icon text-muted" data-toggle="tooltip" data-placement="right"
|
||||
title="Convert to Website"> </i>
|
||||
<span><a ng-click="issueSSL(web.domain)" href="" style="text-transform: none">Convert to Website</a></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--table cellpadding="0" cellspacing="0" border="0" class="table" style="margin:0px 0px; id="datatable-example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>IP Address</th>
|
||||
<th>Package</th>
|
||||
<th>Owner</th>
|
||||
<th>State</th>
|
||||
<th>Email</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td ng-bind="web.ipAddress"></td>
|
||||
<td ng-bind="web.package"></td>
|
||||
<td ng-bind="web.admin"></td>
|
||||
<td ng-bind="web.state"></td>
|
||||
<td ng-bind="web.adminEmail"></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table-->
|
||||
|
||||
</div>
|
||||
|
||||
<div id="listFail" class="alert alert-danger">
|
||||
<p>{% trans "Cannot list websites. Error message:" %} {$ errorMessage $}</p>
|
||||
<div id="listFail" class="alert alert-danger">
|
||||
<p>{% trans "Cannot list websites. Error message:" %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 2%" class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select ng-model="currentPage" class="form-control"
|
||||
ng-change="getFurtherWebsitesFromDB()">
|
||||
<option ng-repeat="page in pagination">{$ $index + 1 $}</option>
|
||||
</select>
|
||||
<div style="margin-top: 2%" class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- end row -->
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<select ng-model="currentPage" class="form-control"
|
||||
ng-change="getFurtherWebsitesFromDB()">
|
||||
<option ng-repeat="page in pagination">{$ $index + 1 $}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- end row -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -20,6 +20,7 @@ urlpatterns = [
|
||||
url(r'^submitWebsiteListing$', views.getFurtherAccounts, name='submitWebsiteListing'),
|
||||
url(r'^fetchWebsitesList$', views.fetchWebsitesList, name='fetchWebsitesList'),
|
||||
url(r'^fetchChildDomainsMain$', views.fetchChildDomainsMain, name='fetchChildDomainsMain'),
|
||||
url(r'^convertDomainToSite$', views.convertDomainToSite, name='convertDomainToSite'),
|
||||
url(r'^searchWebsites$', views.searchWebsites, name='searchWebsites'),
|
||||
url(r'^submitWebsiteModification$', views.deleteWebsite, name='submitWebsiteModification'),
|
||||
url(r'^submitWebsiteStatus$', views.submitWebsiteStatus, name='submitWebsiteStatus'),
|
||||
|
||||
@@ -189,6 +189,16 @@ def submitDomainDeletion(request):
|
||||
except KeyError:
|
||||
return redirect(loadLoginPage)
|
||||
|
||||
def convertDomainToSite(request):
|
||||
try:
|
||||
|
||||
userID = request.session['userID']
|
||||
wm = WebsiteManager()
|
||||
return wm.convertDomainToSite(userID, request)
|
||||
|
||||
except KeyError:
|
||||
return redirect(loadLoginPage)
|
||||
|
||||
def submitWebsiteStatus(request):
|
||||
try:
|
||||
|
||||
|
||||
@@ -119,8 +119,13 @@ class WebsiteManager:
|
||||
try:
|
||||
currentACL = ACLManager.loadedACL(userID)
|
||||
pagination = self.websitePagination(currentACL, userID)
|
||||
adminNames = ACLManager.loadAllUsers(userID)
|
||||
packagesName = ACLManager.loadPackages(userID, currentACL)
|
||||
phps = PHPManager.findPHPVersions()
|
||||
|
||||
return render(request, 'websiteFunctions/listChildDomains.html', {"pagination": pagination})
|
||||
Data = {'packageList': packagesName, "owernList": adminNames, 'phps': phps}
|
||||
|
||||
return render(request, 'websiteFunctions/listChildDomains.html', Data)
|
||||
except BaseException as msg:
|
||||
return HttpResponse(str(msg))
|
||||
|
||||
@@ -2739,3 +2744,22 @@ StrictHostKeyChecking no
|
||||
data_ret = {'status': 0, 'installStatus': 0, 'error_message': str(msg)}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
|
||||
def convertDomainToSite(self, userID=None, request=None):
|
||||
try:
|
||||
|
||||
extraArgs = {}
|
||||
extraArgs['request'] = request
|
||||
extraArgs['tempStatusPath'] = "/home/cyberpanel/" + str(randint(1000, 9999))
|
||||
background = ApplicationInstaller('convertDomainToSite', extraArgs)
|
||||
background.start()
|
||||
|
||||
data_ret = {'status': 1, 'createWebSiteStatus': 1, 'tempStatusPath': extraArgs['tempStatusPath']}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
except BaseException as msg:
|
||||
data_ret = {'status': 0, 'createWebSiteStatus': 0, 'error_message': str(msg)}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
Reference in New Issue
Block a user