push changes

This commit is contained in:
Michael Ramsey
2019-10-08 10:53:02 -04:00
parent 0695e9c9d0
commit bd71b39d31
1802 changed files with 170876 additions and 50904 deletions

View File

@@ -0,0 +1,241 @@
#!/usr/local/CyberCP/bin/python2
import threading as multi
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
from plogical.virtualHostUtilities import virtualHostUtilities
from plogical.processUtilities import ProcessUtilities
from .models import Websites, ChildDomains
from plogical.applicationInstaller import ApplicationInstaller
from plogical.mysqlUtilities import mysqlUtilities
from random import randint
import os
class StagingSetup(multi.Thread):
def __init__(self, function, extraArgs):
multi.Thread.__init__(self)
self.function = function
self.extraArgs = extraArgs
def run(self):
try:
if self.function == 'startCloning':
self.startCloning()
elif self.function == 'startSyncing':
self.startSyncing()
except BaseException, msg:
logging.writeToFile(str(msg) + ' [StagingSetup.run]')
def startCloning(self):
try:
tempStatusPath = self.extraArgs['tempStatusPath']
masterDomain = self.extraArgs['masterDomain']
domain = self.extraArgs['domain']
admin = self.extraArgs['admin']
website = Websites.objects.get(domain=masterDomain)
## Creating Child Domain
path = "/home/" + masterDomain + "/public_html/" + domain
logging.statusWriter(tempStatusPath, 'Creating domain for staging environment..,5')
phpSelection = 'PHP 7.1'
execPath = "/usr/local/CyberCP/bin/python2 " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = execPath + " createDomain --masterDomain " + masterDomain + " --virtualHostName " + domain + \
" --phpVersion '" + phpSelection + "' --ssl 0 --dkimCheck 0 --openBasedir 0 --path " + path + ' --websiteOwner ' \
+ admin.userName + ' --tempStatusPath %s' % (tempStatusPath + '1') + " --apache 0"
ProcessUtilities.executioner(execPath)
domainCreationStatusPath = tempStatusPath + '1'
data = open(domainCreationStatusPath, 'r').read()
if data.find('[200]') > -1:
pass
else:
logging.statusWriter(tempStatusPath, 'Failed to create child-domain for staging enviroment. [404]')
return 0
logging.statusWriter(tempStatusPath, 'Domain successfully created..,15')
## Copying Data
masterPath = '/home/%s/public_html' % (masterDomain)
command = 'rsync -avzh --exclude "%s" --exclude "wp-content/backups" --exclude "wp-content/updraft" --exclude "wp-content/cache" --exclude "wp-content/plugins/litespeed-cache" %s/ %s' % (
domain, masterPath, path)
ProcessUtilities.executioner(command, website.externalApp)
logging.statusWriter(tempStatusPath, 'Data copied..,50')
## Creating Database
logging.statusWriter(tempStatusPath, 'Creating and copying database..,50')
dbNameRestore, dbUser, dbPassword = ApplicationInstaller(None, None).dbCreation(tempStatusPath, website)
# Create dump of existing database
configPath = '%s/wp-config.php' % (masterPath)
if not os.path.exists(configPath):
logging.statusWriter(tempStatusPath, 'WordPress is not detected. [404]')
return 0
data = open(configPath, 'r').readlines()
for items in data:
if items.find('DB_NAME') > -1:
try:
dbName = items.split("'")[3]
if mysqlUtilities.createDatabaseBackup(dbName, '/home/cyberpanel'):
break
else:
raise BaseException('Failed to create database backup.')
except:
dbName = items.split('"')[1]
if mysqlUtilities.createDatabaseBackup(dbName, '/home/cyberpanel'):
break
else:
raise BaseException('Failed to create database backup.')
databasePath = '%s/%s.sql' % ('/home/cyberpanel', dbName)
command = "sed -i 's/%s/%s/g' %s" % (masterDomain, domain, databasePath)
ProcessUtilities.executioner(command, 'cyberpanel')
command = "sed -i 's/%s/%s/g' %s" % ('https', 'http', databasePath)
ProcessUtilities.executioner(command, 'cyberpanel')
if not mysqlUtilities.restoreDatabaseBackup(dbNameRestore, '/home/cyberpanel', None, 1, dbName):
try:
os.remove(databasePath)
except:
pass
raise BaseException('Failed to restore database backup.')
try:
os.remove(databasePath)
except:
pass
## Update final config file
pathFinalConfig = '%s/wp-config.php' % (path)
data = open(pathFinalConfig, 'r').readlines()
tmp = "/tmp/" + str(randint(1000, 9999))
writeToFile = open(tmp, 'w')
for items in data:
if items.find('DB_NAME') > -1:
writeToFile.write("define( 'DB_NAME', '%s' );\n" % (dbNameRestore))
elif items.find('DB_USER') > -1:
writeToFile.write("define( 'DB_USER', '%s' );\n" % (dbUser))
elif items.find('DB_PASSWORD') > -1:
writeToFile.write("define( 'DB_PASSWORD', '%s' );\n" % (dbPassword))
elif items.find('WP_SITEURL') > -1:
continue
else:
writeToFile.write(items)
writeToFile.close()
command = 'mv %s %s' % (tmp, pathFinalConfig)
ProcessUtilities.executioner(command, website.externalApp)
logging.statusWriter(tempStatusPath, 'Database synced..,100')
try:
os.path.remove(databasePath)
except:
pass
logging.statusWriter(tempStatusPath, 'Data copied..,[200]')
return 0
except BaseException, msg:
mesg = '%s. [404]' % (str(msg))
logging.statusWriter(tempStatusPath, mesg)
def startSyncing(self):
try:
tempStatusPath = self.extraArgs['tempStatusPath']
childDomain = self.extraArgs['childDomain']
eraseCheck = self.extraArgs['eraseCheck']
dbCheck = self.extraArgs['dbCheck']
copyChanged = self.extraArgs['copyChanged']
child = ChildDomains.objects.get(domain=childDomain)
configPath = '%s/wp-config.php' % (child.path)
if not os.path.exists(configPath):
logging.statusWriter(tempStatusPath, 'WordPress is not detected. [404]')
return 0
if dbCheck:
logging.statusWriter(tempStatusPath, 'Syncing databases..,10')
## Create backup of child-domain database
configPath = '%s/wp-config.php' % (child.path)
data = open(configPath, 'r').readlines()
for items in data:
if items.find('DB_NAME') > -1:
dbName = items.split("'")[3]
if mysqlUtilities.createDatabaseBackup(dbName, '/home/cyberpanel'):
break
else:
raise BaseException('Failed to create database backup.')
databasePath = '%s/%s.sql' % ('/home/cyberpanel', dbName)
command = "sed -i 's/%s/%s/g' %s" % (child.domain, child.master.domain, databasePath)
ProcessUtilities.executioner(command, 'cyberpanel')
## Restore to master domain
masterPath = '/home/%s/public_html' % (child.master.domain)
configPath = '%s/wp-config.php' % (masterPath)
data = open(configPath, 'r').readlines()
for items in data:
if items.find('DB_NAME') > -1:
dbNameRestore = items.split("'")[3]
if not mysqlUtilities.restoreDatabaseBackup(dbNameRestore, '/home/cyberpanel', None, 1, dbName):
try:
os.remove(databasePath)
except:
pass
raise BaseException('Failed to restore database backup.')
try:
os.remove(databasePath)
except:
pass
if eraseCheck:
sourcePath = child.path
destinationPath = '/home/%s/public_html' % (child.master.domain)
command = 'rsync -avzh --exclude "wp-config.php" %s/ %s' % (sourcePath, destinationPath)
ProcessUtilities.executioner(command, child.master.externalApp)
elif copyChanged:
sourcePath = child.path
destinationPath = '/home/%s/public_html' % (child.master.domain)
command = 'rsync -avzh --exclude "wp-config.php" %s/ %s' % (sourcePath, destinationPath)
ProcessUtilities.executioner(command, child.master.externalApp)
logging.statusWriter(tempStatusPath, 'Data copied..,[200]')
return 0
except BaseException, msg:
mesg = '%s. [404]' % (str(msg))
logging.statusWriter(tempStatusPath, mesg)

View File

@@ -1,32 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-25 20:30
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('loginSystem', '0001_initial'),
('packages', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Websites',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('domain', models.CharField(max_length=50, unique=True)),
('adminEmail', models.CharField(max_length=50)),
('phpSelection', models.CharField(max_length=5)),
('ssl', models.IntegerField()),
('ftp', models.IntegerField()),
('admin', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='loginSystem.Administrator')),
('package', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='packages.Package')),
],
),
]

View File

@@ -9,8 +9,8 @@ from loginSystem.models import Administrator
class Websites(models.Model):
admin = models.ForeignKey(Administrator)
package = models.ForeignKey(Package)
admin = models.ForeignKey(Administrator, on_delete=models.PROTECT)
package = models.ForeignKey(Package, on_delete=models.PROTECT)
domain = models.CharField(max_length=50,unique=True)
adminEmail = models.CharField(max_length=50)
phpSelection = models.CharField(max_length=10)
@@ -42,3 +42,8 @@ class backupSchedules(models.Model):
dest = models.ForeignKey(dest)
frequency = models.CharField(max_length=15)
class aliasDomains(models.Model):
master = models.ForeignKey(Websites, on_delete=models.CASCADE)
aliasDomain = models.CharField(max_length=75)

View File

@@ -0,0 +1,132 @@
from signals import *
from plogical.pluginManagerGlobal import pluginManagerGlobal
class pluginManager:
@staticmethod
def preWebsiteCreation(request):
return pluginManagerGlobal.globalPlug(request, preWebsiteCreation)
@staticmethod
def postWebsiteCreation(request, response):
return pluginManagerGlobal.globalPlug(request, postWebsiteCreation, response)
@staticmethod
def preDomainCreation(request):
return pluginManagerGlobal.globalPlug(request, preDomainCreation)
@staticmethod
def postDomainCreation(request, response):
return pluginManagerGlobal.globalPlug(request, postDomainCreation, response)
@staticmethod
def preWebsiteDeletion(request):
return pluginManagerGlobal.globalPlug(request, preWebsiteDeletion)
@staticmethod
def postWebsiteDeletion(request, response):
return pluginManagerGlobal.globalPlug(request, postWebsiteDeletion, response)
@staticmethod
def preDomainDeletion(request):
return pluginManagerGlobal.globalPlug(request, preDomainDeletion)
@staticmethod
def postDomainDeletion(request, response):
return pluginManagerGlobal.globalPlug(request, postDomainDeletion, response)
@staticmethod
def preWebsiteSuspension(request):
return pluginManagerGlobal.globalPlug(request, preWebsiteSuspension)
@staticmethod
def postWebsiteSuspension(request, response):
return pluginManagerGlobal.globalPlug(request, postWebsiteSuspension, response)
@staticmethod
def preWebsiteModification(request):
return pluginManagerGlobal.globalPlug(request, preWebsiteModification)
@staticmethod
def postWebsiteModification(request, response):
return pluginManagerGlobal.globalPlug(request, postWebsiteModification, response)
@staticmethod
def preDomain(request):
return pluginManagerGlobal.globalPlug(request, preDomain)
@staticmethod
def postDomain(request, response):
return pluginManagerGlobal.globalPlug(request, postDomain, response)
@staticmethod
def preSaveConfigsToFile(request):
return pluginManagerGlobal.globalPlug(request, preSaveConfigsToFile)
@staticmethod
def postSaveConfigsToFile(request, response):
return pluginManagerGlobal.globalPlug(request, postSaveConfigsToFile, response)
@staticmethod
def preSaveRewriteRules(request):
return pluginManagerGlobal.globalPlug(request, preSaveRewriteRules)
@staticmethod
def postSaveRewriteRules(request, response):
return pluginManagerGlobal.globalPlug(request, postSaveRewriteRules, response)
@staticmethod
def preSaveSSL(request):
return pluginManagerGlobal.globalPlug(request, preSaveSSL)
@staticmethod
def postSaveSSL(request, response):
return pluginManagerGlobal.globalPlug(request, postSaveSSL, response)
@staticmethod
def preChangePHP(request):
return pluginManagerGlobal.globalPlug(request, preChangePHP)
@staticmethod
def postChangePHP(request, response):
return pluginManagerGlobal.globalPlug(request, postChangePHP, response)
@staticmethod
def preChangeOpenBasedir(request):
return pluginManagerGlobal.globalPlug(request, preChangeOpenBasedir)
@staticmethod
def postChangeOpenBasedir(request, response):
return pluginManagerGlobal.globalPlug(request, postChangeOpenBasedir, response)
@staticmethod
def preAddNewCron(request):
return pluginManagerGlobal.globalPlug(request, preAddNewCron)
@staticmethod
def postAddNewCron(request, response):
return pluginManagerGlobal.globalPlug(request, postAddNewCron, response)
@staticmethod
def preRemCronbyLine(request):
return pluginManagerGlobal.globalPlug(request, preRemCronbyLine)
@staticmethod
def postRemCronbyLine(request, response):
return pluginManagerGlobal.globalPlug(request, postRemCronbyLine, response)
@staticmethod
def preSubmitAliasCreation(request):
return pluginManagerGlobal.globalPlug(request, preSubmitAliasCreation)
@staticmethod
def postSubmitAliasCreation(request, response):
return pluginManagerGlobal.globalPlug(request, postSubmitAliasCreation, response)
@staticmethod
def preDelateAlias(request):
return pluginManagerGlobal.globalPlug(request, preDelateAlias)
@staticmethod
def postDelateAlias(request, response):
return pluginManagerGlobal.globalPlug(request, postDelateAlias, response)

101
websiteFunctions/signals.py Normal file
View File

@@ -0,0 +1,101 @@
# The world is a prison for the believer.
## https://www.youtube.com/watch?v=DWfNYztUM1U
from django.dispatch import Signal
## This event is fired before CyberPanel core start creation of website
preWebsiteCreation = Signal(providing_args=["request"])
## This event is fired after CyberPanel core finished creation of website.
postWebsiteCreation = Signal(providing_args=["request", "response"])
## This event is fired before CyberPanel core start creation of child-domain
preDomainCreation = Signal(providing_args=["request"])
## This event is fired after CyberPanel core finished creation of child-domain.
postDomainCreation = Signal(providing_args=["request", "response"])
## This event is fired before CyberPanel core start deletion of website
preWebsiteDeletion = Signal(providing_args=["request"])
## This event is fired after CyberPanel core finished deletion of website
postWebsiteDeletion = Signal(providing_args=["request", "response"])
## This event is fired before CyberPanel core start deletion of child-domain
preDomainDeletion = Signal(providing_args=["request"])
## This event is fired after CyberPanel core finished deletion of child-domain
postDomainDeletion = Signal(providing_args=["request", "response"])
## This event is fired before CyberPanel core start suspension of website
preWebsiteSuspension = Signal(providing_args=["request"])
## This event is fired after CyberPanel core finished suspension of website
postWebsiteSuspension = Signal(providing_args=["request", "response"])
## This event is fired before CyberPanel core start suspension of website
preWebsiteModification = Signal(providing_args=["request"])
## This event is fired after CyberPanel core finished suspension of website
postWebsiteModification = Signal(providing_args=["request", "response"])
## This event is fired before CyberPanel core load website launcher
preDomain = Signal(providing_args=["request"])
## This event is fired after CyberPanel core finished loading website launcher
postDomain = Signal(providing_args=["request", "response"])
## This event is fired before CyberPanel core start saving changes to vhost conf
preSaveConfigsToFile = Signal(providing_args=["request"])
## This event is fired after CyberPanel core finished saving changes to vhost conf
postSaveConfigsToFile = Signal(providing_args=["request", "response"])
## This event is fired before CyberPanel core start saving changes to vhost rewrite file
preSaveRewriteRules = Signal(providing_args=["request"])
## This event is fired after CyberPanel core finished saving changes to vhost rewrite file
postSaveRewriteRules = Signal(providing_args=["request", "response"])
## This event is fired before CyberPanel core start saving custom SSL
preSaveSSL = Signal(providing_args=["request"])
## This event is fired after CyberPanel core finished saving saving custom SSL
postSaveSSL = Signal(providing_args=["request", "response"])
## This event is fired before CyberPanel core start changing php version of domain or website
preChangePHP = Signal(providing_args=["request"])
## This event is fired after CyberPanel core finished change php version of domain or website
postChangePHP = Signal(providing_args=["request", "response"])
## This event is fired before CyberPanel core start changing open_basdir status for domain or website
preChangeOpenBasedir = Signal(providing_args=["request"])
## This event is fired after CyberPanel core finished changing open_basdir status for domain or website
postChangeOpenBasedir = Signal(providing_args=["request", "response"])
## This event is fired before CyberPanel core start adding new cron
preAddNewCron = Signal(providing_args=["request"])
## This event is fired after CyberPanel core is finished adding new cron
postAddNewCron = Signal(providing_args=["request", "response"])
## This event is fired before CyberPanel core start removing cron
preRemCronbyLine = Signal(providing_args=["request"])
## This event is fired after CyberPanel core is finished removing cron
postRemCronbyLine = Signal(providing_args=["request", "response"])
## This event is fired before CyberPanel core start creating domain alias
preSubmitAliasCreation = Signal(providing_args=["request"])
## This event is fired after CyberPanel core is finished creating domain alias
postSubmitAliasCreation = Signal(providing_args=["request", "response"])
## This event is fired before CyberPanel core start deleting domain alais
preDelateAlias = Signal(providing_args=["request"])
## This event is fired after CyberPanel core is finished deleting domain alias
postDelateAlias = Signal(providing_args=["request", "response"])

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 877 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 834 B

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 888 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

@@ -11,4 +11,229 @@
border-color:#3498db
}
.table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>th {
color: #777777;
font-weight: 400;
border-color: #cccccc;
border-width: 1px;
background-color: transparent;
}
.table {
font-size: 14px;
width: 100%;
border-spacing: 0;
border-collapse: separate;
border-radius: 5px;
background: #fdfdfd;
padding: 0px 12px;
margin: 10px 12px;
}
.table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th {
/* padding: 10px; */
border-top-width: 1px;
border-top-style: solid;
text-align: left;
}
.mt-5 {
margin-top: 5px;
}
.mt-10 {
margin-top: 10px;
}
.mt-20 {
margin-top: 20px;
}
.mt-30 {
margin-top: 30px;
}
.mr-10 {
margin-right: 10px;
}
.mb-10 {
margin-bottom: 10px;
}
.ml-10 {
margin-left: 10px;
}
.my-10 {
margin-top: 10px;
margin-bottom: 10px;
}
.mx-5 {
margin-left: 5px;
margin-right: 5px;
}
.mx-10 {
margin-left: 10px;
margin-right: 10px;
}
.title-hero {
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
margin: 0 0 15px;
padding: 0;
text-transform: none;
font-size: 14px;
opacity: 1;
color: #777777;
font-weight: 400;
}
.bs-badge {
font-size: 11px;
font-weight: 400;
line-height: 19px;
display: inline-block;
min-width: 20px;
padding: 0 5px 0 4px;
border-radius: 2px;
}
.row-title {
color: #778899;
}
/*span.h4 {
white-space: nowrap;
}*/
/*.panel-body {
white-space: nowrap;
}
*/
.bg-gradient-9 {
background: #0daeff; /* Old browsers */
background: -moz-linear-gradient(-45deg, #0daeff 0%,#3939ad 30%); /* FF3.6-15 */
background: -webkit-linear-gradient(-45deg, #0daeff 0%,#3939ad 30%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(-45deg, #0daeff 0%,#3939ad 30%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3939ad', endColorstr='#0daeff',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}
#page-header .user-account-btn>a.user-profile .glyph-icon, .logo-bg {
background-color: rgba(0,0,0,.15);
}
a:hover {
text-decoration: none;
}
.text-success {
color: #29A329 !important;
}
.alert-success, .alert-success a, .parsley-success {
color: #1e620f;
border-color: #7cd362;
background: #E4FFE4;
}
.flex {
display: flex;
}
.align-center {
margin: 0 auto;
}
.text-bold {
font-weight: 600;
}
.tile-box-shortcut .tile-header {
background: 0 0;
padding: 25px;
position: absolute;
font-size: 18px;
font-weight: 400;
left: 3em;
bottom: 0px;
}
.tile-box-shortcut .tile-content-wrapper>.glyph-icon {
position: absolute;
left: 25px;
top: 40px;
}
.fa {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
font-size: 2.25em;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
position: absolute;
left: 25px;
top: 28px;
}
.bs-badge {
font-size: 18px;
font-weight: 100;
line-height: 19px;
display: inline-block;
min-width: 20px;
padding: 0 5px 0 4px;
border-radius: 2px;
color: #afeeee;
}
.tile-box-shortcut .bs-badge {
left: auto;
right: 10px;
top: 30px;
background: transparent;
}
#sidebar-menu {
background: #EAEAF1;
}
#page-sidebar ul li a .glyph-icon {
color: #191970;
}
#header-logo .logo-content-big, .logo-content-small {
height: 40px;
left: 15px;
}
#mobile-navigation .logo-content-small {
width: 50px;
display: block;
left: 75px;
}
#header-nav-left {
margin: 0 20px;
}
#page-content {
background: #ffffff;
}
.service-panel {
background: #A1BDC6 !important;
}
.serviceImg img {
box-shadow: 0 0 2px 1px rgba(0,0,0,.05);
}
.btn-icon {
top: 0px;
left: 0px;
margin: 0px auto;
position: relative;
font-size: 16px;
}
.tab-mod {
color: #777777;
background: transparent;
border-color: #dddddd;
}
.btn-primary {
background: #33ADFF;
border-color: #0099FF;
}
.btn-primary:hover,.btn-primary:focus {
background: #5CBDFF;
border-color: #33ADFF;
}
.btn-min-width {
min-width: 350px;
}

File diff suppressed because it is too large Load Diff

View File

@@ -3,148 +3,169 @@
{% block title %}{% trans "Create New Website - CyberPanel" %}{% endblock %}
{% block content %}
{% load static %}
{% get_current_language as LANGUAGE_CODE %}
<!-- Current language: {{ LANGUAGE_CODE }} -->
<div class="container">
<div id="page-title">
<h2>{% trans "Create Website" %}</h2>
<p>{% trans "On this page you can launch, list, modify and delete websites from your server." %}</p>
</div>
<div class="panel">
<div class="panel-body">
<h3 class="title-hero">
{% trans "Website Details" %} <img id="webSiteCreation" src="{% static 'images/loading.gif' %}">
</h3>
<div ng-controller="createWebsite" class="example-box-wrapper">
<form name="websiteCreationForm" action="/" id="createPackages" class="form-horizontal bordered-row">
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Select Package" %}</label>
<div class="col-sm-6">
<select ng-model="packageForWebsite" class="form-control">
{% for items in packageList %}
<option>{{ items }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Select Owner" %}</label>
<div class="col-sm-6">
<select ng-model="websiteOwner" class="form-control">
{% for items in owernList %}
<option>{{ items }}</option>
{% endfor %}
</select>
</div>
</div>
<div 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="domainNameCreate" placeholder="{% trans "Do not enter WWW, it will be auto created!" %}" required>
</div>
<div ng-show="websiteCreationForm.dom.$error.pattern" class="current-pack">{% trans "Invalid Domain (Note: You don't need to add 'http' or 'https')" %}</div>
</div>
<div 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="adminEmail" required>
</div>
<div ng-show="websiteCreationForm.email.$error.email" class="current-pack">{% trans "Invalid Email" %}</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Select PHP" %}</label>
<div class="col-sm-6">
<select ng-model="phpSelection" class="form-control">
<option>PHP 5.3</option>
<option>PHP 5.4</option>
<option>PHP 5.5</option>
<option>PHP 5.6</option>
<option>PHP 7.0</option>
<option>PHP 7.1</option>
<option>PHP 7.2</option>
</select>
</div>
</div>
<div 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>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<button ng-disabled="websiteCreationForm.dom.$error.required || websiteCreationForm.email.$invalid" type="button" ng-click="createWebsite()" class="btn btn-primary btn-lg btn-block">{% trans "Create Website" %}</button>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<div id="websiteCreationFailed" class="alert alert-danger">
<p>{% trans "Cannot create website. Error message:" %} {$ errorMessage $}</p>
</div>
<div id="websiteCreated" class="alert alert-success">
<p>{% trans "Website with domain" %} <strong>{$ websiteDomain $}</strong>{% trans " is Successfully Created" %}</p>
</div>
</div>
</div>
</form>
{% load static %}
{% get_current_language as LANGUAGE_CODE %}
<!-- Current language: {{ LANGUAGE_CODE }} -->
<div class="container">
<div id="page-title">
<h2>{% trans "Create Website" %}</h2>
<p>{% trans "On this page you can launch, list, modify and delete websites from your server." %}</p>
</div>
<div ng-controller="createWebsite" class="panel">
<div class="panel-body">
<h3 class="content-box-header">
{% trans "Website Details" %} <img ng-hide="webSiteCreationLoading"
src="{% static 'images/loading.gif' %}">
</h3>
<div class="example-box-wrapper">
<form name="websiteCreationForm" action="/" id="createPackages"
class="form-horizontal bordered-row panel-body">
<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="packageForWebsite" class="form-control">
{% for items in packageList %}
<option>{{ items }}</option>
{% endfor %}
</select>
</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="websiteOwner" class="form-control">
{% for items in owernList %}
<option>{{ items }}</option>
{% endfor %}
</select>
</div>
</div>
<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="domainNameCreate"
placeholder="{% trans "Do not enter WWW, it will be auto created!" %}" required>
</div>
<div ng-show="websiteCreationForm.dom.$error.pattern"
class="current-pack">{% trans "Invalid Domain (Note: You don't need to add 'http' or 'https')" %}</div>
</div>
<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="adminEmail" required>
</div>
<div ng-show="websiteCreationForm.email.$error.email"
class="current-pack">{% trans "Invalid Email" %}</div>
</div>
<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="phpSelection" class="form-control">
{% for php in phps %}
<option>{{ php }}</option>
{% endfor %}
</select>
</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>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<button ng-disabled="websiteCreationForm.dom.$error.required || websiteCreationForm.email.$invalid"
type="button" ng-click="createWebsite()"
class="btn btn-primary btn-lg">{% trans "Create Website" %}</button>
</div>
</div>
<div ng-hide="installationProgress" class="form-group">
<label class="col-sm-2 control-label"></label>
<div class="col-sm-7">
<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 ng-hide="errorMessageBox" class="alert alert-danger">
<p>{% trans "Error message:" %} {$ errorMessage $}</p>
</div>
<div ng-hide="success" class="alert alert-success">
<p>{% trans "Website succesfully created." %}</p>
</div>
<div ng-hide="couldNotConnect" class="alert alert-danger">
<p>{% trans "Could not connect to server. Please refresh this page." %}</p>
</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>
</div>
</div>
</div>
</div>
{% endblock %}
{% endblock %}

View File

@@ -15,13 +15,13 @@
<div class="panel">
<div class="panel-body">
<h3 class="title-hero">
<h3 class="content-box-header">
{% trans "Delete Website" %} <img id="deleteLoading" src="{% static 'images/loading.gif' %}">
</h3>
<div class="example-box-wrapper">
<form ng-controller="deleteWebsiteControl" action="/" class="form-horizontal bordered-row">
<form ng-controller="deleteWebsiteControl" action="/" class="form-horizontal bordered-row panel-body">
<div class="form-group">
@@ -39,7 +39,7 @@
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<button type="button" ng-click="deleteWebsite()" class="btn btn-primary btn-lg btn-block">{% trans "Delete Website" %}</button>
<button type="button" ng-click="deleteWebsite()" class="btn btn-primary btn-lg">{% trans "Delete Website" %}</button>
</div>
</div>
@@ -48,7 +48,7 @@
<div id="deleteWebsiteButton" class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<button type="button" ng-click="deleteWebsiteFinal()" class="btn btn-primary btn-lg btn-block">{% trans "Are you sure?" %}</button>
<button type="button" ng-click="deleteWebsiteFinal()" class="btn btn-primary btn-lg">{% trans "Are you sure?" %}</button>
</div>
</div>
@@ -56,7 +56,7 @@
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<div class="col-sm-6">
<div id="websiteDeleteFailure" class="alert alert-danger">
<p>{% trans "Cannot delete website, Error message: " %} {$ errorMessage $}</p>
</div>
@@ -83,4 +83,4 @@
</div>
{% endblock %}
{% endblock %}

View File

@@ -14,104 +14,89 @@
<p>{% trans "On this page you can launch, list, modify and delete websites from your server." %}</p>
</div>
<div class="panel">
<div class="panel col-md-12">
<div class="panel-body">
<h3 class="title-hero">
<h3 class="content-box-header">
{% trans "Available Functions" %}
</h3>
<div class="example-box-wrapper">
{% if type == 3 %}
<div class="row">
<div class="col-md-4">
<div class="col-md-3 btn-min-width">
<a href="{% url 'listWebsites' %}" title="{% trans 'List Websites' %}" class="tile-box tile-box-shortcut btn-primary">
<div class="tile-header">
{% trans "List Websites" %}
{% trans "List Website" %}
</div>
<div class="tile-content-wrapper">
<i class="glyph-icon icon-dashboard"></i>
<i class="fa fa-plus-square"></i>
</div>
</a>
</div>
</div>
{% else %}
<div class="row">
<div class="col-md-4">
<div class="col-md-3 btn-min-width">
<a href="{% url 'createWebsite' %}" title="{% trans 'Create Website' %}" class="tile-box tile-box-shortcut btn-primary">
<div class="tile-header">
{% trans "Create Website" %}
</div>
<div class="tile-content-wrapper">
<i class="glyph-icon icon-dashboard"></i>
<i class="fa fa-plus-square"></i>
</div>
</a>
</div>
<div class="col-md-4">
<div class="col-md-3 btn-min-width">
<a href="{% url 'listWebsites' %}" title="{% trans 'List Websites' %}" class="tile-box tile-box-shortcut btn-primary">
<div class="tile-header">
{% trans "List Websites" %}
{% trans "List Website" %}
</div>
<div class="tile-content-wrapper">
<i class="glyph-icon icon-dashboard"></i>
<i class="fa fa-list-ul"></i>
</div>
</a>
</div>
<div class="col-md-4">
<div class="col-md-3 btn-min-width">
<a href="{% url 'modifyWebsite' %}" title="{% trans 'Modify Website' %}" class="tile-box tile-box-shortcut btn-primary">
<div class="tile-header">
{% trans "Modify Website" %}
</div>
<div class="tile-content-wrapper">
<i class="glyph-icon icon-dashboard"></i>
<i class="fa fa-edit"></i>
</div>
</a>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="col-md-3 btn-min-width">
<a href="{% url 'siteState' %}" title="{% trans 'Suspend/Unsuspend Website' %}" class="tile-box tile-box-shortcut btn-primary">
<div class="tile-header">
{% trans "Suspend/Unsuspend Website" %}
{% trans "Suspend/Unsuspend" %}
</div>
<div class="tile-content-wrapper">
<i class="glyph-icon icon-dashboard"></i>
<i class="fa fa-pause"></i>
</div>
</a>
</div>
<div class="col-md-4">
<div class="col-md-3 btn-min-width">
<a href="{% url 'deleteWebsite' %}" title="{% trans 'Delete Website' %}" class="tile-box tile-box-shortcut btn-primary">
<div class="tile-header">
{% trans "Delete Website" %}
</div>
<div class="tile-content-wrapper">
<i class="glyph-icon icon-dashboard"></i>
<i class="fa fa-trash"></i>
</div>
</a>
</div>
</div>
{% endif %}
@@ -122,4 +107,4 @@
</div>
{% endblock %}
{% endblock %}

View File

@@ -0,0 +1,141 @@
{% extends "baseTemplate/index.html" %}
{% load i18n %}
{% block title %}{% trans "Install PrestaShop - CyberPanel" %}{% endblock %}
{% block content %}
{% load static %}
{% get_current_language as LANGUAGE_CODE %}
<!-- Current language: {{ LANGUAGE_CODE }} -->
<div class="container">
<div id="page-title">
<h2>{% trans "Install PrestaShop" %}</h2>
<p>{% trans "One-click PrestaShop Install!" %}</p>
</div>
<div ng-controller="installPrestaShopCTRL" class="panel">
<div class="panel-body">
<h3 class="title-hero">
<span id="domainNamePage">{{ domainName }}</span> - {% trans "Installation Details" %} <img ng-hide="wpInstallLoading" src="{% static 'images/loading.gif' %}">
</h3>
<div class="example-box-wrapper">
<form name="websiteCreationForm" action="/" id="createPackages" class="form-horizontal bordered-row">
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Shop Name" %}</label>
<div class="col-sm-6">
<input type="text" class="form-control" ng-model="shopName" required>
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "First Name" %}</label>
<div class="col-sm-6">
<input type="text" class="form-control" ng-model="firstName" required>
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Last Name" %}</label>
<div class="col-sm-6">
<input type="text" class="form-control" ng-model="lastName" required>
</div>
</div>
<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" class="form-control" ng-model="email" required>
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Password" %}</label>
<div class="col-sm-6">
<input type="password" class="form-control" ng-model="password" required>
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Database Prefix" %}</label>
<div class="col-sm-6">
<input type="text" class="form-control" ng-model="databasePrefix" required>
</div>
</div>
<!--<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Path" %}</label>
<div class="col-sm-6">
<input placeholder="Leave emtpy to install in website home directory. (Without preceding slash)" type="text" class="form-control" ng-model="installPath">
</div>
</div>-->
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<button type="button" ng-click="installPrestShop()" class="btn btn-primary btn-lg btn-block">{% trans "Install Now" %}</button>
</div>
</div>
<div ng-hide="installationProgress" class="form-group">
<label class="col-sm-2 control-label"></label>
<div class="col-sm-7">
<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 ng-hide="installationFailed" class="alert alert-danger">
<p>{% trans "Installation failed. Error message:" %} {$ errorMessage $}</p>
</div>
<div ng-hide="installationSuccessfull" class="alert alert-success">
<p>{% trans "Installation successful. Visit:" %} {$ installationURL $}</p>
</div>
<div ng-hide="couldNotConnect" class="alert alert-danger">
<p>{% trans "Could not connect to server. Please refresh this page." %}</p>
</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 btn-block">{% trans "Go Back" %}</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@@ -55,7 +55,7 @@
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Path" %}</label>
<div class="col-sm-6">
<input placeholder="Leave emtpy to install in website home directory. (Without preceding slash)" type="text" class="form-control" ng-model="installPath">
<input placeholder="Leave empty to install in website home directory. (Without preceding slash)" type="text" class="form-control" ng-model="installPath">
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@@ -3,30 +3,111 @@
{% block title %}{% trans "Websites Hosted - CyberPanel" %}{% endblock %}
{% block content %}
{% load static %}
{% get_current_language as LANGUAGE_CODE %}
<!-- Current language: {{ LANGUAGE_CODE }} -->
{% load static %}
{% get_current_language as LANGUAGE_CODE %}
<!-- Current language: {{ LANGUAGE_CODE }} -->
<script>
$(document).ready(function () {
$('[data-toggle="tooltip"]').tooltip();
});
</script>
<div class="container">
<div ng-controller="listWebsites" class="container">
<div id="page-title">
<h2 id="domainNamePage">{% trans "List Websites" %}</h2>
<p>{% trans "On this page you can launch, list, modify and delete websites from your server." %}</p>
<h2 id="domainNamePage">{% trans "List Websites" %}</h2> <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>
</div>
<div class="panel">
<div class="panel-body">
<h3 class="title-hero">
{% trans "Websites" %}
</h3>
<div ng-controller="listWebsites" class="example-box-wrapper">
<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>
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="datatable-example">
<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-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.domain $}" title="Open File Manager"> --
/home/{$ web.domain $}/public_html</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">&emsp;</i>
<span>Manage</span>
</a>
</div>
</div>
<div class="col-md-12">
<div class="col-md-4 content-box-header">
<i class="p fa fa-sticky-note btn-icon text-muted" data-toggle="tooltip"
data-placement="right" title="State">&emsp;</i>
<span ng-bind="web.state" 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">&emsp;</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">&emsp;</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-4 content-box-header">
<i class="p fa fa-hdd-o btn-icon text-muted" data-toggle="tooltip" data-placement="right"
title="Disk Usage">&emsp;</i>
<span ng-bind="web.diskUsed" 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">&emsp;</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">&emsp;</i>
<span ng-bind="web.admin" style="text-transform: none"></span>
</div>
</div>
<!--table cellpadding="0" cellspacing="0" border="0" class="table" style="margin:0px 0px; id="datatable-example">
<thead>
<tr>
<th>Domain</th>
<th>Launch</th>
<th>IP Address</th>
<th>Package</th>
<th>Owner</th>
@@ -35,10 +116,7 @@
</tr>
</thead>
<tbody>
<tr ng-repeat="web in WebSitesList track by $index">
<td ng-bind="web.domain"></td>
<td><a href="{$ web.domain $}"><img width="30px" height="30" class="center-block" src="{% static 'baseTemplate/assets/image-resources/webPanel.png' %}"></a></td>
<tr>
<td ng-bind="web.ipAddress"></td>
<td ng-bind="web.package"></td>
<td ng-bind="web.admin"></td>
@@ -47,39 +125,31 @@
</tr>
</tbody>
</table>
</table-->
<div id="listFail" class="alert alert-danger">
<p>{% trans "Cannot list websites. Error message:" %} {$ errorMessage $}</p>
</div>
<div class="row">
<div class="col-sm-4 col-sm-offset-8">
<nav aria-label="Page navigation">
<ul class="pagination">
{% for items in pagination %}
<li ng-click="getFurtherWebsitesFromDB({{ forloop.counter }})" id="webPages"><a href="">{{ forloop.counter }}</a></li>
{% endfor %}
</ul>
</nav>
</div>
</div>
</div>
<div id="listFail" class="alert alert-danger">
<p>{% trans "Cannot list websites. Error message:" %} {$ errorMessage $}</p>
</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>
</div>
</div> <!-- end row -->
</div>
</div>
</div>
{% endblock %}
{% endblock %}

View File

@@ -3,137 +3,131 @@
{% block title %}{% trans "Modify Website - CyberPanel" %}{% endblock %}
{% block content %}
{% load static %}
{% get_current_language as LANGUAGE_CODE %}
<!-- Current language: {{ LANGUAGE_CODE }} -->
<div class="container">
<div id="page-title">
<h2>{% trans "Modify Website" %}</h2>
<p>{% trans "Packages define resources for your websites, you need to add package before creating a website." %}</p>
</div>
<div class="panel">
<div class="panel-body">
<h3 class="title-hero">
{% trans "Modify Website" %} <img id="modifyWebsiteLoading" src="{% static 'images/loading.gif' %}">
</h3>
<div class="example-box-wrapper">
<form ng-controller="modifyWebsitesController" action="/" class="form-horizontal bordered-row">
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Select Website" %} </label>
<div class="col-sm-6">
<select ng-change="fetchWebsites()" ng-model="websiteToBeModified" class="form-control">
{% for items in websiteList %}
<option>{{ items }}</option>
{% endfor %}
</select>
</div>
</div>
<!------ Modification form that appears after a click --------------->
<div id="webSiteDetailsToBeModified">
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Select Package" %}</label>
<div class="col-sm-6">
<select ng-model="selectedPack" class="form-control">
<option ng-repeat="pack in webpacks">{$ pack.pack $}</option>
</select>
</div>
<div class="current-pack">{% trans "Current Package:" %} {$ currentPack $}</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Select Owner" %}</label>
<div class="col-sm-6">
<select ng-model="selectedAdmin" class="form-control">
<option ng-repeat="admins in adminNames">{$ admins.adminNames $}</option>
</select>
</div>
<div class="current-pack">{% trans "Current Owner:"%} {$ currentAdmin $}</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Email" %}</label>
<div class="col-sm-6">
<input type="email" class="form-control" ng-model="adminEmail" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Select PHP" %}</label>
<div class="col-sm-6">
<select ng-model="phpSelection" class="form-control">
<option>PHP 5.3</option>
<option>PHP 5.4</option>
<option>PHP 5.5</option>
<option>PHP 5.6</option>
<option>PHP 7.0</option>
<option>PHP 7.1</option>
<option>PHP 7.2</option>
</select>
</div>
</div>
</div>
<!------ Modification form that appears after a click --------------->
<div id="modifyWebsiteButton" class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<button type="button" ng-click="modifyWebsiteFunc()" class="btn btn-primary btn-lg btn-block">{% trans "Modify Website" %}</button>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<div id="websiteModifyFailure" class="alert alert-danger">
<p>{% trans "Cannot fetch website details. Error message:" %} {$ errorMessage $}</p>
</div>
<div id="canNotModify" class="alert alert-danger">
<p>{% trans "Cannot modify website. Error message:" %} {$ errMessage $}</p>
</div>
<div id="websiteModifySuccess" class="alert alert-success">
<p>{% trans "Website Details Successfully fetched" %}</p>
</div>
<div id="websiteSuccessfullyModified" class="alert alert-success">
<strong>{$ websiteModified $}</strong> Successfully Modified</p>
</div>
</div>
</div>
</form>
{% load static %}
{% get_current_language as LANGUAGE_CODE %}
<!-- Current language: {{ LANGUAGE_CODE }} -->
<div class="container">
<div id="page-title">
<h2>{% trans "Modify Website" %}</h2>
<p>{% trans "Packages define resources for your websites, you need to add package before creating a website." %}</p>
</div>
<div class="panel">
<div class="panel-body">
<h3 class="content-box-header">
{% trans "Modify Website" %} <img id="modifyWebsiteLoading" src="{% static 'images/loading.gif' %}">
</h3>
<div class="example-box-wrapper">
<form ng-controller="modifyWebsitesController" action="/" class="form-horizontal bordered-row panel-body">
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Select Website" %} </label>
<div class="col-sm-6">
<select ng-change="fetchWebsites()" ng-model="websiteToBeModified" class="form-control">
{% for items in websiteList %}
<option>{{ items }}</option>
{% endfor %}
</select>
</div>
</div>
<!------ Modification form that appears after a click --------------->
<div id="webSiteDetailsToBeModified">
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Select Package" %}</label>
<div class="col-sm-6">
<select ng-model="selectedPack" class="form-control">
<option ng-repeat="pack in webpacks">{$ pack.pack $}</option>
</select>
</div>
<div class="current-pack">{% trans "Current Package:" %} {$ currentPack $}</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Select Owner" %}</label>
<div class="col-sm-6">
<select ng-model="selectedAdmin" class="form-control">
<option ng-repeat="admins in adminNames">{$ admins.adminNames $}</option>
</select>
</div>
<div class="current-pack">{% trans "Current Owner:" %} {$ currentAdmin $}</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Email" %}</label>
<div class="col-sm-6">
<input type="email" class="form-control" ng-model="adminEmail" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Select PHP" %}</label>
<div class="col-sm-6">
<select ng-model="phpSelection" class="form-control">
{% for php in phps %}
<option>{{ php }}</option>
{% endfor %}
</select>
</div>
</div>
</div>
<!------ Modification form that appears after a click --------------->
<div id="modifyWebsiteButton" class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<button type="button" ng-click="modifyWebsiteFunc()"
class="btn btn-primary btn-lg btn-block">{% trans "Modify Website" %}</button>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<div id="websiteModifyFailure" class="alert alert-danger">
<p>{% trans "Cannot fetch website details. Error message:" %} {$ errorMessage $}</p>
</div>
<div id="canNotModify" class="alert alert-danger">
<p>{% trans "Cannot modify website. Error message:" %} {$ errMessage $}</p>
</div>
<div id="websiteModifySuccess" class="alert alert-success">
<p>{% trans "Website Details Successfully fetched" %}</p>
</div>
<div id="websiteSuccessfullyModified" class="alert alert-success">
<strong>{$ websiteModified $}</strong> Successfully Modified</p>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% endblock %}

View File

@@ -0,0 +1,313 @@
{% extends "baseTemplate/index.html" %}
{% load i18n %}
{% block title %}{% trans "Git Management - CyberPanel" %}{% endblock %}
{% block content %}
{% load static %}
{% get_current_language as LANGUAGE_CODE %}
<!-- Current language: {{ LANGUAGE_CODE }} -->
<div ng-controller="setupGit" class="container">
<div id="page-title">
<h2>{% trans "Git Management" %}</h2>
<p>{% trans "Attach git to your websites." %}</p>
</div>
{% if not installed %}
<div class="panel">
<div class="panel-body">
<h3 class="title-hero">
<span id="domainNamePage">{{ domainName }}</span> - {% trans "Attach Git" %} <img ng-hide="gitLoading" src="{% static 'images/loading.gif' %}">
</h3>
<div class="example-box-wrapper">
<ul class="list-group list-group-separator row list-group-icons">
<li class="col-md-3 active">
<a href="#tab-example-1" data-toggle="tab" class="list-group-item">
<i class="glyph-icon icon-dashboard"></i>
{% trans "Providers" %}
</a>
</li>
<li class="col-md-3">
<a href="#tab-example-3" data-toggle="tab" class="list-group-item">
<i class="glyph-icon font-blue-alt icon-globe"></i>
{% trans "Deployment Key" %}
</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane fade active in" id="tab-example-1">
<div class="example-box-wrapper">
<ul class="list-group row">
<li class="col-md-3">
<a href="" ng-click="setProvider('github')" class="list-group-item">
Github
<i class="glyph-icon icon-chevron-right"></i>
</a>
</li>
<li class="col-md-3">
<a href="" ng-click="setProvider('gitlab')" class="list-group-item">
GitLab
<i class="glyph-icon font-green icon-chevron-right"></i>
</a>
</li>
</ul>
<form action="/" class="form-horizontal bordered-row">
<div ng-hide="installationDetailsForm" class="form-group">
<label style="color: green;" class="col-sm-10 control-label">{% trans "Before attaching repo to your website, make sure to place your Development key in your GIT repository." %}</label>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Username" %}</label>
<div class="col-sm-6">
<input type="text" class="form-control" ng-model="githubUserName" required>
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Repository Name" %}</label>
<div class="col-sm-6">
<input type="text" class="form-control" ng-model="githubRepo" required>
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Branch" %}</label>
<div class="col-sm-6">
<input type="text" class="form-control" ng-model="githubBranch" required>
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<button type="button" ng-click="attachRepo()" class="btn btn-primary btn-lg btn-block">{% trans "Attach Now" %}</button>
</div>
</div>
<div ng-hide="" class="form-group">
<label class="col-sm-2 control-label"></label>
<div class="col-sm-7">
<div ng-hide="installProg" class="alert alert-success text-center">
<h2>{$ currentStatus $}</h2>
</div>
<div ng-hide="installProg" 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 ng-hide="installationFailed" class="alert alert-danger">
<p>{% trans "Error message:" %} {$ errorMessage $}</p>
</div>
<div ng-hide="installationSuccessfull" class="alert alert-success">
<p>{% trans "GIT Successfully attached, refreshing page in 3 seconds... Visit:" %} {$ installationURL $}</p>
</div>
<div ng-hide="couldNotConnect" class="alert alert-danger">
<p>{% trans "Could not connect to server. Please refresh this page." %}</p>
</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 btn-block">{% trans "Go Back" %}</button>
</div>
</div>
</form>
</div>
</div>
<div class="tab-pane fade" id="tab-example-3">
<form action="/" class="form-horizontal bordered-row">
<!------ List of records --------------->
<div class="form-group">
<div class="col-sm-12">
<table class="table">
<thead>
<tr>
<th>{% trans "Deployment Key" %}</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="form-group">
<div class="col-sm-12">
<textarea rows="5" class="form-control">{{ deploymentKey }}</textarea>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!------ List of records --------------->
</form>
</div>
</div>
</div>
</div>
</div>
{% else %}
<div class="panel">
<div class="panel-body">
<h3 class="title-hero">
<span id="domainNamePage">{{ domainName }}</span> <img ng-hide="gitLoading" src="{% static 'images/loading.gif' %}">
</h3>
<div class="example-box-wrapper">
<ul class="list-group list-group-separator row list-group-icons">
<li class="col-md-3 active">
<a href="#tab-example-1" data-toggle="tab" class="list-group-item">
<i style="top: 11px" class="fa fa-git" aria-hidden="true"></i>
{% trans 'Manage' %}
</a>
</li>
<li class="col-md-3">
<a href="#tab-example-3" data-toggle="tab" class="list-group-item">
<i style="top: 11px" class="fa fa-tree" aria-hidden="true"></i>
{% trans 'Change Branch' %}
</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane fade active in" id="tab-example-1">
<ul class="list-group row">
<li class="col-md-3">
<a href="" ng-click="detachRepo()" class="list-group-item">
{% trans 'Detach Repo' %}
<i class="glyph-icon icon-chevron-right"></i>
</a>
</li>
</ul>
<div class="alert alert-info">
<h4 class="alert-title">{% trans 'Webhook URL' %}</h4>
<p>{% trans "Add this URL to Webhooks section of your Git respository, if you've used hostname SSL then replace IP with your hostname. Otherwise use IP and disable SSL check while configuring webhook. This will initiate a pull from your resposity as soon as you commit some changes."%} <code>{{ webhookURL }}</code></p>
</div>
<div ng-hide="" class="form-group">
<label class="col-sm-2 control-label"></label>
<div class="col-sm-7">
<div ng-hide="failedMesg" class="alert alert-danger">
<p>{% trans "Error message:" %} {$ errorMessage $}</p>
</div>
<div ng-hide="successMessage" class="alert alert-success">
<p>{% trans "Repo successfully detached, refreshing in 3 seconds.." %}</p>
</div>
<div ng-hide="couldNotConnect" class="alert alert-danger">
<p>{% trans "Could not connect to server. Please refresh this page." %}</p>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="tab-example-3">
<form action="/" class="form-horizontal bordered-row">
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Branch" %}</label>
<div class="col-sm-6">
<input type="text" class="form-control" ng-model="githubBranch" required>
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<button type="button" ng-click="changeBranch()" class="btn btn-primary btn-lg btn-block">{% trans "Change Branch" %}</button>
</div>
</div>
<div ng-hide="" class="form-group">
<label class="col-sm-2 control-label"></label>
<div class="col-sm-7">
<div ng-hide="failedMesg" class="alert alert-danger">
<p>{% trans "Error message:" %} {$ errorMessage $}</p>
</div>
<div ng-hide="successMessageBranch" class="alert alert-success">
<p>{% trans "Branch successfully changed." %}</p>
</div>
<div ng-hide="couldNotConnect" class="alert alert-danger">
<p>{% trans "Could not connect to server. Please refresh this page." %}</p>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
{% endif %}
</div>
{% endblock %}

View File

@@ -0,0 +1,88 @@
{% extends "baseTemplate/index.html" %}
{% load i18n %}
{% block title %}{% trans "Set up Staging Enviroment - CyberPanel" %}{% endblock %}
{% block content %}
{% load static %}
{% get_current_language as LANGUAGE_CODE %}
<!-- Current language: {{ LANGUAGE_CODE }} -->
<div class="container">
<div id="page-title">
<h2>{% trans "Set up Staging Enviroment" %}</h2>
<p>{% trans "Set up staging enviroment for " %} {{ domainName }}. {% trans ". Any domain that you will choose here will be created as child-domain for this master site." %}</p>
</div>
<div ng-controller="cloneWebsite" class="panel">
<div class="panel-body">
<h3 class="title-hero">
{% trans "Set up staging enviroment for " %}<span id="domainName">{{ domainName }}</span> <img
ng-hide="cyberpanelLoading" src="{% static 'images/loading.gif' %}">
</h3>
<div class="example-box-wrapper">
<form name="websiteCreationForm" action="/" id="createPackages"
class="form-horizontal bordered-row">
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label"></label>
<label class="col-sm-4 control-label">{% trans "Domain that you will enter below will be created as child-domain to " %}
<spam id="domainName">{{ domainName }}</spam>
{% trans '.' %}</label>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Domain" %}</label>
<div class="col-sm-6">
<input type="text" class="form-control" ng-model="domain" required>
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<button type="button" ng-click="startCloning()"
class="btn btn-primary btn-lg btn-block">{% trans "Start Cloning" %}</button>
</div>
</div>
<div ng-hide="installationProgress" class="form-group">
<label class="col-sm-2 control-label"></label>
<div class="col-sm-7">
<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>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,57 @@
{% extends "baseTemplate/index.html" %}
{% load i18n %}
{% block title %}{% trans "SSH and CageFS - CyberPanel" %}{% endblock %}
{% block content %}
{% load static %}
{% get_current_language as LANGUAGE_CODE %}
<!-- Current language: {{ LANGUAGE_CODE }} -->
<div class="container">
<div id="page-title">
<h2>{% trans "SSH Access" %}</h2>
<p>{% trans "Set up SSH access and enable/disable CageFS for " %} {{ domainName }}. {% trans " CageFS require CloudLinux OS." %}</p>
</div>
<div ng-controller="sshAccess" class="panel">
<div class="panel-body">
<h3 class="title-hero">
{% trans "Set up SSH access for " %} {{ domainName }}.</span> <img ng-hide="wpInstallLoading" src="{% static 'images/loading.gif' %}">
</h3>
<div class="example-box-wrapper">
<form name="websiteCreationForm" action="/" id="createPackages" class="form-horizontal bordered-row">
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label"></label>
<label class="col-sm-4 control-label">{% trans "SSH user for " %} <spam id="domainName">{{ domainName }}</spam> {% trans ' is ' %} <span id="externalApp">{{ externalApp }}</span></label>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Password" %}</label>
<div class="col-sm-6">
<input type="password" class="form-control" ng-model="password" required>
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<button type="button" ng-click="setupSSHAccess()" class="btn btn-primary btn-lg btn-block">{% trans "Save Changes" %}</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@@ -16,13 +16,13 @@
<div ng-controller="suspendWebsiteControl" class="panel">
<div class="panel-body">
<h3 class="title-hero">
<h3 class="content-box-header">
{% trans "Suspend/Unsuspend Website" %} <img ng-hide="suspendLoading" src="{% static 'images/loading.gif' %}">
</h3>
<div class="example-box-wrapper">
<form action="/" class="form-horizontal bordered-row">
<form action="/" class="form-horizontal bordered-row panel-body">
<div class="form-group">
@@ -52,7 +52,7 @@
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<button type="button" ng-click="save()" class="btn btn-primary btn-lg btn-block">{% trans "Save" %}</button>
<button type="button" ng-click="save()" class="btn btn-primary btn-lg">{% trans "Save" %}</button>
</div>
</div>
@@ -60,7 +60,7 @@
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<div class="col-sm-6">
<div ng-hide="websiteSuspendFailure" class="alert alert-danger">
<p>{% trans "Cannot suspend website, Error message: " %}{$ errorMessage $}</p>
</div>
@@ -95,4 +95,4 @@
</div>
{% endblock %}
{% endblock %}

View File

@@ -0,0 +1,104 @@
{% extends "baseTemplate/index.html" %}
{% load i18n %}
{% block title %}{% trans "Sync to Master - CyberPanel" %}{% endblock %}
{% block content %}
{% load static %}
{% get_current_language as LANGUAGE_CODE %}
<!-- Current language: {{ LANGUAGE_CODE }} -->
<div class="container">
<div id="page-title">
<h2>{% trans "Sync your site to Master" %}</h2>
<p>{% trans "Right now you can only sync your child domains to master domains."%} {{ childDomain }} {% trans " will be synced to " %} {{ domainName }}.</p>
</div>
<div ng-controller="syncWebsite" class="panel">
<div class="panel-body">
<h3 class="title-hero">
{% trans "Sync " %}<span id="childDomain">{{ childDomain }}</span> {% trans "to " %} <span id="domainName">{{ domainName }}</span><img
ng-hide="cyberpanelLoading" src="{% static 'images/loading.gif' %}">
</h3>
<div class="example-box-wrapper">
<form name="websiteCreationForm" action="/" id="createPackages"
class="form-horizontal bordered-row">
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "What to Sync" %}</label>
<div class="col-sm-9">
<div class="checkbox">
<label>
<input ng-model="eraseCheck" type="checkbox" value="">
Copy Complete Data
</label>
</div>
</div>
<label class="col-sm-3 control-label"></label>
<div class="col-sm-9">
<div class="checkbox">
<label>
<input ng-model="dbCheck" type="checkbox" value="">
Sync Database
</label>
</div>
</div>
<label class="col-sm-3 control-label"></label>
<div class="col-sm-9">
<div class="checkbox">
<label>
<input ng-model="copyChanged" type="checkbox" value="">
Copy Changed Files
</label>
</div>
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<button type="button" ng-click="startSyncing()"
class="btn btn-primary btn-lg btn-block">{% trans "Start Syncing" %}</button>
</div>
</div>
<div ng-hide="installationProgress" class="form-group">
<label class="col-sm-2 control-label"></label>
<div class="col-sm-7">
<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>
</div>
</div>
{% endblock %}

File diff suppressed because it is too large Load Diff

View File

@@ -4,81 +4,76 @@ import views
urlpatterns = [
url(r'^$', views.loadWebsitesHome, name='loadWebsitesHome'),
url(r'^createWebsite', views.createWebsite, name='createWebsite'),
url(r'^listWebsites', views.listWebsites, name='listWebsites'),
url(r'^modifyWebsite', views.modifyWebsite, name='modifyWebsite'),
url(r'^deleteWebsite', views.deleteWebsite, name='deleteWebsite'),
url(r'^siteState', views.siteState, name='siteState'),
url(r'^createWebsite$', views.createWebsite, name='createWebsite'),
url(r'^listWebsites$', views.listWebsites, name='listWebsites'),
url(r'^modifyWebsite$', views.modifyWebsite, name='modifyWebsite'),
url(r'^deleteWebsite$', views.deleteWebsite, name='deleteWebsite'),
url(r'^siteState$', views.siteState, name='siteState'),
# Website modification url
url(r'^submitWebsiteCreation', views.submitWebsiteCreation, name='submitWebsiteCreation'),
url(r'^submitWebsiteDeletion', views.submitWebsiteDeletion, name='submitWebsiteDeletion'),
url(r'^submitWebsiteListing', views.getFurtherAccounts, name='submitWebsiteListing'),
url(r'^submitWebsiteModification', views.deleteWebsite, name='submitWebsiteModification'),
url(r'^submitWebsiteStatus', views.submitWebsiteStatus, name='submitWebsiteStatus'),
url(r'^submitWebsiteCreation$', views.submitWebsiteCreation, name='submitWebsiteCreation'),
url(r'^submitWebsiteDeletion$', views.submitWebsiteDeletion, name='submitWebsiteDeletion'),
url(r'^submitWebsiteListing$', views.getFurtherAccounts, name='submitWebsiteListing'),
url(r'^fetchWebsitesList$', views.fetchWebsitesList, name='fetchWebsitesList'),
url(r'^searchWebsites$', views.searchWebsites, name='searchWebsites'),
url(r'^submitWebsiteModification$', views.deleteWebsite, name='submitWebsiteModification'),
url(r'^submitWebsiteStatus$', views.submitWebsiteStatus, name='submitWebsiteStatus'),
url(r'^getWebsiteDetails', views.submitWebsiteModify, name='getWebsiteDetails'),
url(r'^getWebsiteDetails$', views.submitWebsiteModify, name='getWebsiteDetails'),
url(r'^saveWebsiteChanges', views.saveWebsiteChanges, name='saveWebsiteChanges'),
url(r'^(?P<domain>([\da-z\.-]+\.[a-z\.]{2,12}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?)/(?P<childDomain>([\da-z\.-]+\.[a-z\.]{2,12}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?)$', views.launchChild, name='launchChild'),
url(r'^(?P<domain>([\da-z\.-]+\.[a-z\.]{2,12}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?)$', views.domain, name='domain'),
url(r'^getDataFromLogFile', views.getDataFromLogFile, name='getDataFromLogFile'),
url(r'^fetchErrorLogs', views.fetchErrorLogs, name='fetchErrorLogs'),
url(r'^getDataFromLogFile$', views.getDataFromLogFile, name='getDataFromLogFile'),
url(r'^fetchErrorLogs$', views.fetchErrorLogs, name='fetchErrorLogs'),
url(r'^getDataFromConfigFile', views.getDataFromConfigFile, name='getDataFromConfigFile'),
url(r'^getDataFromConfigFile$', views.getDataFromConfigFile, name='getDataFromConfigFile'),
url(r'^saveConfigsToFile', views.saveConfigsToFile, name='saveConfigsToFile'),
url(r'^saveConfigsToFile$', views.saveConfigsToFile, name='saveConfigsToFile'),
url(r'^getRewriteRules', views.getRewriteRules, name='getRewriteRules'),
url(r'^getRewriteRules$', views.getRewriteRules, name='getRewriteRules'),
url(r'^saveRewriteRules', views.saveRewriteRules, name='saveRewriteRules'),
url(r'^saveRewriteRules$', views.saveRewriteRules, name='saveRewriteRules'),
url(r'^saveSSL', views.saveSSL, name='saveSSL'),
url(r'^saveSSL$', views.saveSSL, name='saveSSL'),
## sub/add/park domains
url(r'^submitDomainCreation', views.submitDomainCreation, name='submitDomainCreation'),
url(r'^submitDomainCreation$', views.submitDomainCreation, name='submitDomainCreation'),
## fetch domains
url(r'^fetchDomains', views.fetchDomains, name='submitDomainCreation'),
url(r'^changePHP', views.changePHP, name='changePHP'),
url(r'^submitDomainDeletion', views.submitDomainDeletion, name='submitDomainDeletion'),
url(r'^fetchDomains$', views.fetchDomains, name='submitDomainCreation'),
url(r'^changePHP$', views.changePHP, name='changePHP'),
url(r'^submitDomainDeletion$', views.submitDomainDeletion, name='submitDomainDeletion'),
# crons
url(r'^listCron',views.listCron,name="listCron"),
url(r'^getWebsiteCron',views.getWebsiteCron,name="getWebsiteCron"),
url(r'^getCronbyLine',views.getCronbyLine,name="getCronbyLine"),
url(r'^remCronbyLine',views.remCronbyLine,name="remCronbyLine"),
url(r'^saveCronChanges',views.saveCronChanges,name="saveCronChanges"),
url(r'^addNewCron',views.addNewCron,name="addNewCron"),
url(r'^listCron$',views.listCron,name="listCron"),
url(r'^getWebsiteCron$',views.getWebsiteCron,name="getWebsiteCron"),
url(r'^getCronbyLine$',views.getCronbyLine,name="getCronbyLine"),
url(r'^remCronbyLine$',views.remCronbyLine,name="remCronbyLine"),
url(r'^saveCronChanges$',views.saveCronChanges,name="saveCronChanges"),
url(r'^addNewCron$',views.addNewCron,name="addNewCron"),
## Domain Alias
url(r'^(?P<domain>([\da-z\.-]+\.[a-z\.]{2,12}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?)/domainAlias$', views.domainAlias, name='domainAlias'),
url(r'^submitAliasCreation',views.submitAliasCreation,name="submitAliasCreation"),
url(r'^issueAliasSSL',views.issueAliasSSL,name="issueAliasSSL"),
url(r'^delateAlias',views.delateAlias,name="delateAlias"),
url(r'^(?P<domain>(.*))/domainAlias$', views.domainAlias, name='domainAlias'),
url(r'^submitAliasCreation$',views.submitAliasCreation,name="submitAliasCreation"),
url(r'^issueAliasSSL$',views.issueAliasSSL,name="issueAliasSSL"),
url(r'^delateAlias$',views.delateAlias,name="delateAlias"),
## Openbasedir
url(r'^changeOpenBasedir$',views.changeOpenBasedir,name="changeOpenBasedir"),
## Application Installer
url(r'^applicationInstaller$',views.applicationInstaller,name="applicationInstaller"),
## WP Install
url(r'^(?P<domain>([\da-z\.-]+\.[a-z\.]{2,12}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?)/wordpressInstall$', views.wordpressInstall, name='wordpressInstall'),
url(r'^(?P<domain>(.*))/wordpressInstall$', views.wordpressInstall, name='wordpressInstall'),
url(r'^installWordpressStatus$',views.installWordpressStatus,name="installWordpressStatus"),
url(r'^installWordpress$', views.installWordpress, name='installWordpress'),
@@ -86,7 +81,35 @@ urlpatterns = [
## Joomla Install
url(r'^installJoomla$', views.installJoomla, name='installJoomla'),
url(r'^(?P<domain>([\da-z\.-]+\.[a-z\.]{2,12}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?)/joomlaInstall$', views.joomlaInstall, name='joomlaInstall'),
url(r'^(?P<domain>(.*))/joomlaInstall$', views.joomlaInstall, name='joomlaInstall'),
## PrestaShop Install
url(r'^prestaShopInstall$', views.prestaShopInstall, name='prestaShopInstall'),
url(r'^(?P<domain>(.*))/installPrestaShop$', views.installPrestaShop, name='installPrestaShop'),
## Git
url(r'^(?P<domain>(.*))/setupGit$', views.setupGit, name='setupGit'),
url(r'^setupGitRepo$', views.setupGitRepo, name='setupGitRepo'),
## Set up SSH Access
url(r'^(?P<domain>(.*))/sshAccess$', views.sshAccess, name='sshAccess'),
url(r'^saveSSHAccessChanges$', views.saveSSHAccessChanges, name='saveSSHAccessChanges'),
## Staging Enviroment
url(r'^(?P<domain>(.*))/setupStaging$', views.setupStaging, name='setupStaging'),
url(r'^startCloning$', views.startCloning, name='startCloning'),
url(r'^(?P<domain>(.*))/(?P<childDomain>(.*))/syncToMaster$', views.syncToMaster, name='syncToMaster'),
url(r'^startSync$', views.startSync, name='startSync'),
url(r'^(?P<domain>(.*))/gitNotify$', views.gitNotify, name='gitNotify'),
url(r'^detachRepo$', views.detachRepo, name='detachRepo'),
url(r'^changeBranch$', views.changeBranch, name='changeBranch'),
## Catch all for domains
url(r'^(?P<domain>(.*))/(?P<childDomain>(.*))$', views.launchChild, name='launchChild'),
url(r'^(?P<domain>(.*))$', views.domain, name='domain'),
]

File diff suppressed because it is too large Load Diff

2569
websiteFunctions/website.py Normal file

File diff suppressed because it is too large Load Diff