wpmanagerui

This commit is contained in:
Hassan Hashmi
2022-06-02 14:35:41 +05:00
parent d4306af197
commit 9bd1f7a958
8 changed files with 608 additions and 574 deletions

View File

@@ -14,7 +14,6 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CyberCP.settings")
django.setup() django.setup()
import threading as multi import threading as multi
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
import plogical.CyberCPLogFileWriter as logging
import subprocess import subprocess
from websiteFunctions.models import ChildDomains, Websites, WPSites, WPStaging from websiteFunctions.models import ChildDomains, Websites, WPSites, WPStaging
from plogical import randomPassword from plogical import randomPassword
@@ -1668,11 +1667,11 @@ $parameters = array(
ab = WebsiteManager() ab = WebsiteManager()
coreResult = ab.submitWebsiteCreation(UserID, DataToPass) coreResult = ab.submitWebsiteCreation(UserID, DataToPass)
coreResult1 = json.loads((coreResult).content) coreResult1 = json.loads((coreResult).content)
logging.CyberCPLogFileWriter.writeToFile("Creating website result....%s"%coreResult1) logging.writeToFile("Creating website result....%s"%coreResult1)
reutrntempath = coreResult1['tempStatusPath'] reutrntempath = coreResult1['tempStatusPath']
while (1): while (1):
lastLine = open(reutrntempath, 'r').read() lastLine = open(reutrntempath, 'r').read()
logging.writeToFile("Error web creating lastline ....... %s" % lastLine)
if lastLine.find('[200]') > -1: if lastLine.find('[200]') > -1:
break break
elif lastLine.find('[404]') > -1: elif lastLine.find('[404]') > -1:
@@ -1709,7 +1708,7 @@ $parameters = array(
return 0 return 0
else: else:
statusFile = open(currentTemp, 'w') statusFile = open(currentTemp, 'w')
statusFile.writelines('Installing WordPress....,30') statusFile.writelines('Installing WordPress....,50')
statusFile.close() statusFile.close()
time.sleep(2) time.sleep(2)
@@ -1734,7 +1733,7 @@ $parameters = array(
except BaseException as msg: except BaseException as msg:
logging.CyberCPLogFileWriter.writeToFile("Error WP web creating ....... %s" % str(msg)) logging.writeToFile("Error WP web creating ....... %s" % str(msg))
return 0 return 0
def UpdateWPTheme(self): def UpdateWPTheme(self):
@@ -1768,7 +1767,7 @@ $parameters = array(
stdoutput = ProcessUtilities.outputExecutioner(command) stdoutput = ProcessUtilities.outputExecutioner(command)
except BaseException as msg: except BaseException as msg:
logging.CyberCPLogFileWriter.writeToFile("Error WP UpdateWPTheme ....... %s" % str(msg)) logging.writeToFile("Error WP UpdateWPTheme ....... %s" % str(msg))
return 0 return 0
@@ -1804,7 +1803,7 @@ $parameters = array(
stdoutput = ProcessUtilities.outputExecutioner(command) stdoutput = ProcessUtilities.outputExecutioner(command)
except BaseException as msg: except BaseException as msg:
logging.CyberCPLogFileWriter.writeToFile("Error WP UpdateWPTheme ....... %s" % str(msg)) logging.writeToFile("Error WP UpdateWPTheme ....... %s" % str(msg))
return 0 return 0
def DeleteThemes(self): def DeleteThemes(self):
@@ -1829,7 +1828,7 @@ $parameters = array(
except BaseException as msg: except BaseException as msg:
logging.CyberCPLogFileWriter.writeToFile("Error WP DeleteThemes ....... %s" % str(msg)) logging.writeToFile("Error WP DeleteThemes ....... %s" % str(msg))
return 0 return 0
def DeletePlugins(self): def DeletePlugins(self):
@@ -1856,7 +1855,7 @@ $parameters = array(
except BaseException as msg: except BaseException as msg:
logging.CyberCPLogFileWriter.writeToFile("Error WP DeletePlugins ....... %s" % str(msg)) logging.writeToFile("Error WP DeletePlugins ....... %s" % str(msg))
return 0 return 0
def ChangeStatusThemes(self): def ChangeStatusThemes(self):
@@ -1883,7 +1882,7 @@ $parameters = array(
except BaseException as msg: except BaseException as msg:
logging.CyberCPLogFileWriter.writeToFile("Error WP ChangeStatusThemes ....... %s" % str(msg)) logging.writeToFile("Error WP ChangeStatusThemes ....... %s" % str(msg))
return 0 return 0
def CreateStagingNow(self): def CreateStagingNow(self):
@@ -1915,7 +1914,7 @@ $parameters = array(
ab = WebsiteManager() ab = WebsiteManager()
coreResult = ab.submitWebsiteCreation(UserID, DataToPass) coreResult = ab.submitWebsiteCreation(UserID, DataToPass)
coreResult1 = json.loads((coreResult).content) coreResult1 = json.loads((coreResult).content)
logging.CyberCPLogFileWriter.writeToFile("Creating website result....%s" % coreResult1) logging.writeToFile("Creating website result....%s" % coreResult1)
reutrntempath = coreResult1['tempStatusPath'] reutrntempath = coreResult1['tempStatusPath']
while (1): while (1):
lastLine = open(reutrntempath, 'r').read() lastLine = open(reutrntempath, 'r').read()
@@ -2053,7 +2052,7 @@ $parameters = array(
except BaseException as msg: except BaseException as msg:
logging.CyberCPLogFileWriter.writeToFile("Error WP ChangeStatusThemes ....... %s" % str(msg)) logging.writeToFile("Error WP ChangeStatusThemes ....... %s" % str(msg))
return 0 return 0

View File

@@ -101,6 +101,7 @@ class NormalBackupJobLogs(models.Model):
message = models.TextField() message = models.TextField()
class wpplugins(models.Model): class wpplugins(models.Model):
owner = models.ForeignKey(Administrator, on_delete=models.CASCADE) owner = models.ForeignKey(Administrator, on_delete=models.CASCADE)
Name = models.CharField(max_length=255, default='') Name = models.CharField(max_length=255, default='')

View File

@@ -48,6 +48,7 @@ function FinalDeletePluginBuucket() {
} }
var SPVal; var SPVal;
app.controller('WPAddNewPlugin', function ($scope, $http, $timeout, $window, $compile) { app.controller('WPAddNewPlugin', function ($scope, $http, $timeout, $window, $compile) {
$scope.SearchPluginName = function (val) { $scope.SearchPluginName = function (val) {
@@ -442,6 +443,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
$scope.LoadWPdata = function () { $scope.LoadWPdata = function () {
$scope.wordpresshomeloading = false; $scope.wordpresshomeloading = false;
$('#wordpresshomeloading').show();
var url = "/websites/FetchWPdata"; var url = "/websites/FetchWPdata";
@@ -462,6 +464,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
function ListInitialDatas(response) { function ListInitialDatas(response) {
wordpresshomeloading = true; wordpresshomeloading = true;
$('#wordpresshomeloading').hide();
if (response.data.status === 1) { if (response.data.status === 1) {
$('#WPVersion').text(response.data.ret_data.version); $('#WPVersion').text(response.data.ret_data.version);
@@ -486,6 +489,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
function cantLoadInitialDatas(response) { function cantLoadInitialDatas(response) {
$('#wordpresshomeloading').hide();
$scope.webSiteCreationLoading = true; $scope.webSiteCreationLoading = true;
$scope.installationDetailsForm = true; $scope.installationDetailsForm = true;
@@ -562,6 +566,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
$scope.GetCurrentPlugins = function () { $scope.GetCurrentPlugins = function () {
$('#wordpresshomeloading').show();
$scope.wordpresshomeloading = false; $scope.wordpresshomeloading = false;
@@ -583,6 +588,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
function ListInitialDatas(response) { function ListInitialDatas(response) {
wordpresshomeloading = true; wordpresshomeloading = true;
$('#wordpresshomeloading').hide();
if (response.data.status === 1) { if (response.data.status === 1) {
$('#PluginBody').html(''); $('#PluginBody').html('');
@@ -597,6 +603,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
function cantLoadInitialDatas(response) { function cantLoadInitialDatas(response) {
$('#wordpresshomeloading').hide();
$scope.webSiteCreationLoading = true; $scope.webSiteCreationLoading = true;
$scope.installationDetailsForm = true; $scope.installationDetailsForm = true;
@@ -613,6 +620,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
$scope.GetCurrentThemes = function () { $scope.GetCurrentThemes = function () {
$('#wordpresshomeloading').show();
$scope.wordpresshomeloading = false; $scope.wordpresshomeloading = false;
@@ -634,6 +642,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
function ListInitialDatas(response) { function ListInitialDatas(response) {
wordpresshomeloading = true; wordpresshomeloading = true;
$('#wordpresshomeloading').hide();
if (response.data.status === 1) { if (response.data.status === 1) {
@@ -649,7 +658,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
function cantLoadInitialDatas(response) { function cantLoadInitialDatas(response) {
$('#wordpresshomeloading').hide();
$scope.webSiteCreationLoading = true; $scope.webSiteCreationLoading = true;
$scope.installationDetailsForm = true; $scope.installationDetailsForm = true;
$scope.installationProgress = false; $scope.installationProgress = false;
@@ -664,7 +673,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
}; };
$scope.UpdatePlugins = function (plugin) { $scope.UpdatePlugins = function (plugin) {
$('#wordpresshomeloading').show();
var data = { var data = {
plugin: plugin, plugin: plugin,
pluginarray: PluginsList, pluginarray: PluginsList,
@@ -686,6 +695,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
function ListInitialDatas(response) { function ListInitialDatas(response) {
$('#wordpresshomeloading').hide();
$scope.wordpresshomeloading = true; $scope.wordpresshomeloading = true;
if (response.data.status === 1) { if (response.data.status === 1) {
@@ -706,6 +716,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
function cantLoadInitialDatas(response) { function cantLoadInitialDatas(response) {
$('#wordpresshomeloading').hide();
$scope.wordpresshomeloading = true; $scope.wordpresshomeloading = true;
alert(response) alert(response)
@@ -715,6 +726,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
}; };
$scope.DeletePlugins = function (plugin) { $scope.DeletePlugins = function (plugin) {
$('#wordpresshomeloading').show();
var data = { var data = {
plugin: plugin, plugin: plugin,
pluginarray: PluginsList, pluginarray: PluginsList,
@@ -736,6 +748,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
function ListInitialDatas(response) { function ListInitialDatas(response) {
$('#wordpresshomeloading').hide();
$scope.wordpresshomeloading = true; $scope.wordpresshomeloading = true;
if (response.data.status === 1) { if (response.data.status === 1) {
@@ -756,6 +769,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
function cantLoadInitialDatas(response) { function cantLoadInitialDatas(response) {
$('#wordpresshomeloading').hide();
$scope.wordpresshomeloading = true; $scope.wordpresshomeloading = true;
alert(response) alert(response)
@@ -764,6 +778,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
$scope.ChangeStatus = function (plugin) { $scope.ChangeStatus = function (plugin) {
$('#wordpresshomeloading').show();
var data = { var data = {
plugin: plugin, plugin: plugin,
WPid: $('#WPid').html(), WPid: $('#WPid').html(),
@@ -784,6 +799,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
function ListInitialDatas(response) { function ListInitialDatas(response) {
$('#wordpresshomeloading').hide();
$scope.wordpresshomeloading = true; $scope.wordpresshomeloading = true;
if (response.data.status === 1) { if (response.data.status === 1) {
@@ -804,6 +820,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
function cantLoadInitialDatas(response) { function cantLoadInitialDatas(response) {
$('#wordpresshomeloading').hide();
$scope.wordpresshomeloading = true; $scope.wordpresshomeloading = true;
alert(response) alert(response)
@@ -838,8 +855,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
$scope.UpdateThemes = function (theme) { $scope.UpdateThemes = function (theme) {
$('#wordpresshomeloading').show();
var data = { var data = {
Theme: theme, Theme: theme,
Themearray: ThemesList, Themearray: ThemesList,
@@ -861,6 +877,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
function ListInitialDatas(response) { function ListInitialDatas(response) {
$('#wordpresshomeloading').hide();
$scope.wordpresshomeloading = true; $scope.wordpresshomeloading = true;
if (response.data.status === 1) { if (response.data.status === 1) {
@@ -881,6 +898,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
function cantLoadInitialDatas(response) { function cantLoadInitialDatas(response) {
$('#wordpresshomeloading').hide();
$scope.wordpresshomeloading = true; $scope.wordpresshomeloading = true;
alert(response) alert(response)
@@ -890,6 +908,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
}; };
$scope.DeleteThemes = function (theme) { $scope.DeleteThemes = function (theme) {
$('#wordpresshomeloading').show();
var data = { var data = {
Theme: theme, Theme: theme,
Themearray: ThemesList, Themearray: ThemesList,
@@ -911,6 +930,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
function ListInitialDatas(response) { function ListInitialDatas(response) {
$('#wordpresshomeloading').hide();
$scope.wordpresshomeloading = true; $scope.wordpresshomeloading = true;
if (response.data.status === 1) { if (response.data.status === 1) {
@@ -931,6 +951,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
function cantLoadInitialDatas(response) { function cantLoadInitialDatas(response) {
$('#wordpresshomeloading').hide();
$scope.wordpresshomeloading = true; $scope.wordpresshomeloading = true;
alert(response) alert(response)
@@ -938,6 +959,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
}; };
$scope.ChangeStatusThemes = function (theme) { $scope.ChangeStatusThemes = function (theme) {
$('#wordpresshomeloading').show();
var data = { var data = {
theme: theme, theme: theme,
WPid: $('#WPid').html(), WPid: $('#WPid').html(),
@@ -958,6 +980,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
function ListInitialDatas(response) { function ListInitialDatas(response) {
$('#wordpresshomeloading').hide();
$scope.wordpresshomeloading = true; $scope.wordpresshomeloading = true;
if (response.data.status === 1) { if (response.data.status === 1) {
@@ -978,6 +1001,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
function cantLoadInitialDatas(response) { function cantLoadInitialDatas(response) {
$('#wordpresshomeloading').hide();
$scope.wordpresshomeloading = true; $scope.wordpresshomeloading = true;
alert(response) alert(response)
@@ -1013,6 +1037,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
$scope.CreateStagingNow = function () { $scope.CreateStagingNow = function () {
$('#wordpresshomeloading').show();
$scope.wordpresshomeloading = false; $scope.wordpresshomeloading = false;
$scope.stagingDetailsForm = true; $scope.stagingDetailsForm = true;
@@ -1042,7 +1067,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
function ListInitialDatas(response) { function ListInitialDatas(response) {
$('#wordpresshomeloading').hide();
if (response.data.status === 1) { if (response.data.status === 1) {
statusFile = response.data.tempStatusPath; statusFile = response.data.tempStatusPath;
getCreationStatus(); getCreationStatus();
@@ -1058,6 +1083,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
function cantLoadInitialDatas(response) { function cantLoadInitialDatas(response) {
$('#wordpresshomeloading').hide();
$scope.wordpresshomeloading = true; $scope.wordpresshomeloading = true;
alert(response) alert(response)
@@ -1065,6 +1091,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
}; };
function getCreationStatus() { function getCreationStatus() {
$('#wordpresshomeloading').show();
url = "/websites/installWordpressStatus"; url = "/websites/installWordpressStatus";
@@ -1083,7 +1110,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
function ListInitialDatas(response) { function ListInitialDatas(response) {
$('#wordpresshomeloading').hide();
if (response.data.abort === 1) { if (response.data.abort === 1) {
@@ -1122,6 +1149,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
} else { } else {
$("#installProgress").css("width", response.data.installationProgress + "%"); $("#installProgress").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;
@@ -1131,7 +1159,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
function cantLoadInitialDatas(response) { function cantLoadInitialDatas(response) {
$('#wordpresshomeloading').hide();
$scope.wordpresshomeloading = true; $scope.wordpresshomeloading = true;
$scope.stagingDetailsForm = true; $scope.stagingDetailsForm = true;
$scope.installationProgress = false; $scope.installationProgress = false;
@@ -1146,6 +1174,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
$scope.goBack = function () { $scope.goBack = function () {
$('#wordpresshomeloading').hide();
$scope.wordpresshomeloading = true; $scope.wordpresshomeloading = true;
$scope.stagingDetailsForm = false; $scope.stagingDetailsForm = false;
$scope.installationProgress = true; $scope.installationProgress = true;
@@ -1157,6 +1186,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
}; };
$scope.fetchstaging = function () { $scope.fetchstaging = function () {
$('#wordpresshomeloading').show();
$scope.wordpresshomeloading = false; $scope.wordpresshomeloading = false;
var url = "/websites/fetchstaging"; var url = "/websites/fetchstaging";
@@ -1177,6 +1207,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
function ListInitialDatas(response) { function ListInitialDatas(response) {
wordpresshomeloading = true; wordpresshomeloading = true;
$('#wordpresshomeloading').hide();
if (response.data.status === 1) { if (response.data.status === 1) {
@@ -1196,6 +1227,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
function cantLoadInitialDatas(response) { function cantLoadInitialDatas(response) {
$('#wordpresshomeloading').hide();
alert("Error"+response) alert("Error"+response)
} }
@@ -1211,6 +1243,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
$scope.SaveUpdateConfig =function () { $scope.SaveUpdateConfig =function () {
$('#wordpresshomeloading').show();
var data = { var data = {
AutomaticUpdates: $('#AutomaticUpdates').find(":selected").text(), AutomaticUpdates: $('#AutomaticUpdates').find(":selected").text(),
Plugins: $('#Plugins').find(":selected").text(), Plugins: $('#Plugins').find(":selected").text(),
@@ -1233,6 +1266,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
function ListInitialDatas(response) { function ListInitialDatas(response) {
$('#wordpresshomeloading').hide();
$scope.wordpresshomeloading = true; $scope.wordpresshomeloading = true;
if (response.data.status === 1) { if (response.data.status === 1) {
@@ -1254,6 +1288,7 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
function cantLoadInitialDatas(response) { function cantLoadInitialDatas(response) {
$('#wordpresshomeloading').hide();
new PNotify({ new PNotify({
title: 'Operation Failed!', title: 'Operation Failed!',
text: response, text: response,

View File

@@ -29,17 +29,12 @@
<label>{% trans "Search Plugin Name" %}</label> <label style="margin-top: 15px;">{% trans "Search Plugin Name" %}</label>
<input name="searchcontent" type="text" class="form-control" ng-model="searchcontent" <input name="searchcontent" type="text" class="form-control" ng-model="searchcontent"
ng-keyup="SearchPluginName('add')" ng-keyup="SearchPluginName('add')"
placeholder="{% trans "Search Plugin...." %}" required> placeholder="{% trans "Search Plugin...." %}" required>
<div id="mysearch" class="col-lg-12" style="display: none; border-top: none!important; <div id="mysearch" class="col-lg-12" style="display: none; border-top: none!important;
border: 1px solid rgba(90, 91, 92, 0.7); border: 1px solid rgba(90, 91, 92, 0.7);
position: absolute; z-index: 1; position: absolute; z-index: 1;
@@ -48,8 +43,8 @@
<h3>Selected Plugin</h3> <h3 style="margin-top: 20px;">Selected Plugin</h3>
<div id="selJS" style="display: none; display: flex; flex-direction: row;"> <div id="selJS" style="display: none; display: flex; flex-direction: row; margin-top: 10px;">
</div> </div>
<div ng-hide="installationDetailsForm" class="form-group"> <div ng-hide="installationDetailsForm" class="form-group">

View File

@@ -122,7 +122,7 @@
<select ng-model="autoupdates" class="form-control"> <select ng-model="autoupdates" class="form-control">
<option>Disabled</option> <option>Disabled</option>
<option>All (minor and major)</option> <option>All minor and major</option>
<option>Minor and Security Updates</option> <option>Minor and Security Updates</option>
</select> </select>
@@ -155,45 +155,6 @@
</div> </div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Additional Features" %}</label>
<div class="col-sm-9">
<div class="checkbox">
<label>
<input ng-model="sslCheck" type="checkbox" value="">
SSL
</label>
</div>
</div>
<label class="col-sm-3 control-label"></label>
<div class="col-sm-9">
<div class="checkbox">
<label>
<input ng-model="dkimCheck" type="checkbox" value="">
DKIM Support
</label>
</div>
</div>
<label class="col-sm-3 control-label"></label>
<div class="col-sm-9">
<div class="checkbox">
<label>
<input ng-model="openBasedir" type="checkbox" value="">
open_basedir Protection
</label>
</div>
</div>
<label class="col-sm-3 control-label"></label>
<div class="col-sm-9">
<div class="checkbox">
<label>
<input ng-model="mailDomain" type="checkbox" value="">
Create Mail Domain
</label>
</div>
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group"> <div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label"></label> <label class="col-sm-3 control-label"></label>
<div class="col-sm-4"> <div class="col-sm-4">

View File

@@ -22,27 +22,20 @@
class="form-horizontal bordered-row panel-body"> class="form-horizontal bordered-row panel-body">
<label>{% trans "Search Plugin Name" %}</label> <label style="margin-bottom: 10px;">{% trans "Search Plugin Name" %}</label>
<input name="searchcontent" type="text" class="form-control" ng-model="searchcontent" <input name="searchcontent" type="text" class="form-control" ng-model="searchcontent"
ng-keyup="SearchPluginName('eidt')" ng-keyup="SearchPluginName('eidt')"
placeholder="{% trans "Search Plugin...." %}" required> placeholder="{% trans "Search Plugin...." %}" required>
<div id="mysearch" class="col-lg-12" style="display: none; border-top: none!important; <div id="mysearch" class="col-lg-12" style="display: none; border-top: none!important;
border: 1px solid rgba(90, 91, 92, 0.7); border: 1px solid rgba(90, 91, 92, 0.7);
position: absolute; z-index: 1; position: absolute; z-index: 1;
background-color: #FFFFFF"> background-color: #FFFFFF">
</div> </div>
<h3 style="margin-top: 20px;">Selected Plugin</h3>
<div id="sedplugn" style=" display: flex; flex-direction: row; margin-top: 10px;">
<h3>Selected Plugin</h3>
<div id="sedplugn" style=" display: flex; flex-direction: row;">
{% for plugin in Selectedplugins %} {% for plugin in Selectedplugins %}
<div id="selplug" <div id="selplug"
style="background-color: #12207a; color: #FFFFFF; padding: 5px; border-radius: 30px"> style="background-color: #12207a; color: #FFFFFF; padding: 5px; border-radius: 30px">

View File

@@ -1,6 +1,6 @@
{% extends "baseTemplate/index.html" %} {% extends "baseTemplate/index.html" %}
{% load i18n %} {% load i18n %}
{% block title %}{% trans "Websites Hosted - CyberPanel" %}{% endblock %} {% block title %}{% trans "Worpress Manager - CyberPanel" %}{% endblock %}
{% block content %} {% block content %}
{% load static %} {% load static %}
@@ -12,133 +12,26 @@
<div ng-controller="WPsiteHome" class="container"> <div ng-controller="WPsiteHome" class="container">
<div class="col-sm-12"> <div id="page-title">
<div class="row"> <h2>{{ wpsite.title }}</h2>
<div class="col-12"> <p>({{ wpsite.path }})<img style="display: none" id="wordpresshomeloading" ng-hide="wordpresshomeloading"
<div class="card"> src="{% static 'images/loading.gif' %}"></p>
<div class="card-body">
<div class="row">
<div class="col-lg-4">
<!-- Product image -->
<a target="_blank" style="border: 1px solid greenyellow"
href="http://{{ wpsite.FinalURL }}" class="text-center d-block mb-4">
<img src="https://cdn.statically.io/screenshot/{{ wpsite.FinalURL }}"
class="img-fluid"
alt="{{ wpsite.FinalURL }}">
</a>
<hr>
<div class="d-lg-flex d-none justify-content-center">
<a href="/websites/{{ wpsite.owner.domain }}">
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true"
focusable="false" width="1em" height="1em"
style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"
preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32">
<path d="M16 18H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2zM6 6v10h10V6z"
fill="#626262"></path>
<path d="M26 12v4h-4v-4h4m0-2h-4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2z"
fill="#626262"></path>
<path d="M26 22v4h-4v-4h4m0-2h-4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2z"
fill="#626262"></path>
<path d="M16 22v4h-4v-4h4m0-2h-4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2z"
fill="#626262"></path>
</svg>
Manage Application
</a>
<a ng-click="autoUpdateConfigurationsInit()" data-toggle="modal"
data-target="#autoUpdateConfig" style="margin-left: 3%"
href="javascript: void(0);">
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true"
focusable="false" width="1em" height="1em"
style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"
preserveAspectRatio="xMidYMid meet" viewBox="0 0 20 20">
<path d="M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4l-3.5-4h2.32a4.439 4.439 0 0 0-4.32-3.45c-1.45 0-2.73.71-3.54 1.78L4.95 5.66a6.965 6.965 0 0 1 5.25-2.38zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48a4.439 4.439 0 0 0 4.32 3.45c1.45 0 2.73-.71 3.54-1.78l1.71 1.95a6.95 6.95 0 0 1-5.25 2.38z"
fill="#626262"></path>
</svg>
Autoupdate Configurations
</a>
<div id="autoUpdateConfig" class="modal fade" tabindex="-1" role="dialog"
aria-hidden="true">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;
</button>
<h4 class="modal-title">{% trans "Updates" %}</h4>
</div>
<div class="modal-body">
<form>
<h4 style="margin: 2%">Configure setting for automatic updates.</h4>
<div class="row">
<label class="col-lg-6">Automatic Updates (Currently:
{{ wpsite.AutoUpdates }})</label>
<div class="col-lg-6">
<select id="AutomaticUpdates"
style="padding: 10px">
<option>Disabled</option>
<option>Minor and Security Updates</option>
<option>All (minor and major)</option>
</select>
</div>
</div>
<div class="row">
<label class="col-lg-4">Plugins (Currently: {{ wpsite.PluginUpdates }})</label>
<div class="col-lg-8">
<select id="Plugins"
style="padding: 10px">
<option>Enabled</option>
<option>Disabled</option>
</select>
</div>
</div>
<div class="row">
<label class="col-lg-4">Themes (Currently: {{ wpsite.ThemeUpdates }})</label>
<div class="col-lg-8">
<select id="Themes"
style="padding: 10px">
<option>Enabled</option>
<option>Disabled</option>
</select>
</div>
</div> </div>
</form> <div class="panel" >
<div class="panel-body">
<h3 class="content-box-header">
</div> {% trans "WordPress Manager" %}
<div class="modal-footer"> </h3>
<button type="button" class="btn btn-primary" <div>
ng-click="SaveUpdateConfig()">Save
</button>
<button type="button" ng-disabled="savingSettings"
class="btn btn-default" data-dismiss="modal">
Close
</button>
</div>
</div>
</div>
<!-- /.modal-dialog -->
</div>
</div>
</div>
<div class="col-sm-8">
<!-- Product title --> <!-- Product title -->
<h2 style="display: inline" class="mt-0">{{ wpsite.title }}</h2> <h2 style="display: inline" class="mt-0"></h2>
<p style="display: inline;">({{ wpsite.path }}) <img ng-hide="wordpresshomeloading" <p style="display: inline;">
src="{% static 'images/loading.gif' %}">
</p> </p>
<div class="panel-body"> <div>
<div class="example-box-wrapper"> <div class="example-box-wrapper">
<ul class="nav-responsive nav nav-tabs"> <ul class="nav-responsive nav nav-tabs">
@@ -222,15 +115,15 @@
<div style="margin-top: 4%"> <div style="margin-top: 4%">
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<h6 class="font-14">WordPress Version</h6> <h6 style="font-weight: bold">WordPress Version</h6>
<p id="WPVersion" class="text-sm lh-150"></p> <p id="WPVersion" class="text-sm lh-150"></p>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<h6 class="font-14">PHP</h6> <h6 style="font-weight: bold">PHP</h6>
<p class="text-sm lh-150">{{ wpsite.owner.phpSelection }}</p> <p class="text-sm lh-150">{{ wpsite.owner.phpSelection }}</p>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<h6 class="font-14">LSCache</h6> <h6 style="font-weight: bold">LSCache</h6>
<div class="custom-control custom-switch"> <div class="custom-control custom-switch">
<input ng-click="UpdateWPSettings('lscache')" <input ng-click="UpdateWPSettings('lscache')"
type="checkbox" type="checkbox"
@@ -245,7 +138,7 @@
<div style="margin-top: 4%"> <div style="margin-top: 4%">
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<h6 class="font-14">Debugging</h6> <h6 style="font-weight: bold">Debugging</h6>
<div class="custom-control custom-switch"> <div class="custom-control custom-switch">
<input ng-click="UpdateWPSettings('debugging')" <input ng-click="UpdateWPSettings('debugging')"
type="checkbox" type="checkbox"
@@ -256,7 +149,7 @@
</div> </div>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<h6 class="font-14">Search Engine Indexing</h6> <h6 style="font-weight: bold">Search Engine Indexing</h6>
<div class="custom-control custom-switch"> <div class="custom-control custom-switch">
<input ng-click="UpdateWPSettings('searchIndex')" <input ng-click="UpdateWPSettings('searchIndex')"
type="checkbox" type="checkbox"
@@ -267,7 +160,7 @@
</div> </div>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<h6 class="font-14">Maintenance mode</h6> <h6 style="font-weight: bold">Maintenance mode</h6>
<div class="custom-control custom-switch"> <div class="custom-control custom-switch">
<input ng-click="UpdateWPSettings('maintenanceMode')" <input ng-click="UpdateWPSettings('maintenanceMode')"
type="checkbox" type="checkbox"
@@ -473,7 +366,112 @@
</div> </div>
</div> </div>
</div> </div>
<hr>
<div class="d-lg-flex d-none justify-content-center">
<a href="/websites/{{ wpsite.owner.domain }}">
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true"
focusable="false" width="1em" height="1em"
style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"
preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32">
<path d="M16 18H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2zM6 6v10h10V6z"
fill="#626262"></path>
<path d="M26 12v4h-4v-4h4m0-2h-4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2z"
fill="#626262"></path>
<path d="M26 22v4h-4v-4h4m0-2h-4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2z"
fill="#626262"></path>
<path d="M16 22v4h-4v-4h4m0-2h-4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2z"
fill="#626262"></path>
</svg>
Manage Application
</a>
<a ng-click="autoUpdateConfigurationsInit()" data-toggle="modal"
data-target="#autoUpdateConfig" style="margin-left: 3%"
href="javascript: void(0);">
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true"
focusable="false" width="1em" height="1em"
style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"
preserveAspectRatio="xMidYMid meet" viewBox="0 0 20 20">
<path d="M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4l-3.5-4h2.32a4.439 4.439 0 0 0-4.32-3.45c-1.45 0-2.73.71-3.54 1.78L4.95 5.66a6.965 6.965 0 0 1 5.25-2.38zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48a4.439 4.439 0 0 0 4.32 3.45c1.45 0 2.73-.71 3.54-1.78l1.71 1.95a6.95 6.95 0 0 1-5.25 2.38z"
fill="#626262"></path>
</svg>
Autoupdate Configurations
</a>
<div id="autoUpdateConfig" class="modal fade" tabindex="-1" role="dialog"
aria-hidden="true">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">
&times;
</button>
<h4 class="modal-title">{% trans "Updates" %}</h4>
</div>
<div class="modal-body">
<form>
<h4 style="margin: 2%">Configure setting for automatic
updates.</h4>
<div class="row">
<label class="col-lg-6">Automatic Updates
(Currently:
{{ wpsite.AutoUpdates }})</label>
<div class="col-lg-6">
<select id="AutomaticUpdates"
style="padding: 10px">
<option>Disabled</option>
<option>Minor and Security Updates</option>
<option>All (minor and major)</option>
</select>
</div>
</div>
<div class="row">
<label class="col-lg-4">Plugins
(Currently: {{ wpsite.PluginUpdates }})</label>
<div class="col-lg-8">
<select id="Plugins"
style="padding: 10px">
<option>Enabled</option>
<option>Disabled</option>
</select>
</div>
</div>
<div class="row">
<label class="col-lg-4">Themes
(Currently: {{ wpsite.ThemeUpdates }})</label>
<div class="col-lg-8">
<select id="Themes"
style="padding: 10px">
<option>Enabled</option>
<option>Disabled</option>
</select>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary"
ng-click="SaveUpdateConfig()">Save
</button>
<button type="button" ng-disabled="savingSettings"
class="btn btn-default" data-dismiss="modal">
Close
</button>
</div>
</div>
</div>
<!-- /.modal-dialog -->
</div>
</div>
</div> </div>
@@ -481,11 +479,5 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
</div>
</div>
{% endblock %} {% endblock %}

View File

@@ -1,6 +1,6 @@
{% extends "baseTemplate/index.html" %} {% extends "baseTemplate/index.html" %}
{% load i18n %} {% load i18n %}
{% block title %}{% trans "Websites Hosted - CyberPanel" %}{% endblock %} {% block title %}{% trans "WordPress List - CyberPanel" %}{% endblock %}
{% block content %} {% block content %}
{% load static %} {% load static %}
@@ -13,61 +13,119 @@
}); });
</script> </script>
<style>
table { /* tables still need 'cellspacing="0"' in the markup */
border-collapse: separate;
border-spacing: 0;
}
.table-spacing {
border-spacing: 0em .9em;
}
table th:nth-child(1) {
/* Safari 3-4, iOS 1-3.2, Android 1.6- */
-webkit-border-radius: 3px 0px 0px 3px;
/* Firefox 1-3.6 */
-moz-border-radius: 3px 0px 0px 3px;
/* Opera 10.5, IE 9, Safari 5, Chrome, Firefox 4, iOS 4, Android 2.1+ */
border-radius: 3px 0px 0px 3px;
}
table th:nth-child(1){
/* Safari 3-4, iOS 1-3.2, Android 1.6- */
-webkit-border-radius: 20px 0px 0px 20px;
/* Firefox 1-3.6 */
-moz-border-radius: 20px 0px 0px 20px;
/* Opera 10.5, IE 9, Safari 5, Chrome, Firefox 4, iOS 4, Android 2.1+ */
border-radius: 20px 0px 0px 20px;
}
table th:nth-last-child(1) {
/* Safari 3-4, iOS 1-3.2, Android 1.6- */
-webkit-border-radius: 0px 20px 20px 0px;
/* Firefox 1-3.6 */
-moz-border-radius: 0px 20px 20px 0px;
/* Opera 10.5, IE 9, Safari 5, Chrome, Firefox 4, iOS 4, Android 2.1+ */
border-radius:0px 20px 20px 0px;
}
table td:nth-child(1){
/* Safari 3-4, iOS 1-3.2, Android 1.6- */
-webkit-border-radius: 20px 0px 0px 20px;
/* Firefox 1-3.6 */
-moz-border-radius: 20px 0px 0px 20px;
/* Opera 10.5, IE 9, Safari 5, Chrome, Firefox 4, iOS 4, Android 2.1+ */
border-radius: 20px 0px 0px 20px;
}
table td:nth-last-child(1) {
/* Safari 3-4, iOS 1-3.2, Android 1.6- */
-webkit-border-radius: 0px 20px 20px 0px;
/* Firefox 1-3.6 */
-moz-border-radius: 0px 20px 20px 0px;
/* Opera 10.5, IE 9, Safari 5, Chrome, Firefox 4, iOS 4, Android 2.1+ */
border-radius: 0px 20px 20px 0px;
}
</style>
<div ng-controller="listWebsites" class="container"> <div ng-controller="listWebsites" class="container">
<div id="page-title"> <div id="page-title">
<h2 id="domainNamePage">{% trans "List WordPress Websites" %} <h2 id="domainNamePage">{% trans "List WordPress Websites" %}
<a class="pull-right btn btn-primary" href="{% url "createWordpress" %}">{% trans "Create WordPress Website" %}</a> <a class="pull-right btn btn-primary"
href="{% url "createWordpress" %}">{% trans "Create WordPress Website" %}</a>
</h2> </h2>
<img ng-hide="cyberPanelLoading" src="{% static 'images/loading.gif' %}"> <img ng-hide="cyberPanelLoading" src="{% static 'images/loading.gif' %}">
<p>{% trans "On this page you can launch, list, modify and delete websites from your server." %}</p> <p>{% trans "On this page you can launch, list, modify and delete Wordpress Sites from your server." %}</p>
</div> </div>
<table class="table table-hover dataTable no-footer" id="basicTable" role="grid">
<thead style="background-color: #0a6ebd">
<tr role="row" class="plans-head">
<th style="color: #fff0ff" 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"
aria-controls="basicTable" rowspan="1" colspan="1"
aria-label="Places: activate to sort column ascending">WordPress Site Title
</th>
<th style="color: #fff0ff" class="sorting" tabindex="0"
aria-controls="basicTable" rowspan="1" colspan="1"
aria-label="Places: activate to sort column ascending">URL
</th>
<th style="color: #fff0ff" class="sorting" tabindex="0"
aria-controls="basicTable" rowspan="1" colspan="1"
aria-label="Places: activate to sort column ascending">Action <table class="table-spacing" style="width: 100%">
<thead style="color: white; background-color: #0a6ebd">
<tr>
<th style="padding: 18px; color: white; width: 161px; font-size: 12px;">WordPress Site Title
</th>
<th style="padding: 18px; color: white; width: 161px; font-size: 12px;">Domain
</th>
<th style="padding: 18px; color: white; width: 161px; font-size: 12px;">Action
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody style="background-color: #d9eefa">
{% for sub in wpsite %} {% for sub in wpsite %}
<tr role="row" class="odd"> <tr >
<td class="v-align-middle sorting_1"> <td style="padding: 13px;">
<p>{{ sub.id }}</p>
</td>
<td class="v-align-middle sorting_1">
<a href="{% url 'WPHome'%}?ID={{sub.id}}"> <a href="{% url 'WPHome'%}?ID={{sub.id}}">
<p>{{ sub.title }}</p> <p style="font-weight: bold; text-transform: uppercase; ">{{ sub.title }}</p>
</a> </a>
</td> </td>
<td class="v-align-middle"> <td style="padding: 13px;">
<p>{{ sub.url }}</p> <a target="_blank" style="color: #6aa7ff"
href="http://{{ sub.url }}">Visit
<i class="glyph-icon icon-external-link-square" title="{{ sub.url }}"></i></a>
</td> </td>
<td class="row">
<td style="padding: 13px;">