mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-10-26 07:46:35 +01:00
Updated Website Control Panel to add domains.
This commit is contained in:
@@ -165,7 +165,6 @@ LOCALE_PATHS = (
|
||||
|
||||
LANGUAGES = (
|
||||
('en', _('English')),
|
||||
('ur-PK', _('Urdu')),
|
||||
('cn', _('Chinese')),
|
||||
('br', _('Bulgarian')),
|
||||
('pt', _('Portuguese')),
|
||||
|
||||
Binary file not shown.
@@ -1,22 +1,24 @@
|
||||
{% extends "baseTemplate/index.html" %}
|
||||
{% load i18n %}
|
||||
{% block title %}Backup Website{% endblock %}
|
||||
{% block title %}{% trans "Transfer Websites from Remote Server - CyberPanel" %}{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
||||
|
||||
<div class="container">
|
||||
<div id="page-title">
|
||||
<h2>Remote Backups</h2>
|
||||
<p>This feature can import website(s) from remote server</p>
|
||||
<h2>{% trans "Remote Backups" %}</h2>
|
||||
<p>{% trans "This feature can import website(s) from remote server" %}</p>
|
||||
</div>
|
||||
|
||||
<div ng-controller="remoteBackupControl" class="panel">
|
||||
<div class="panel-body">
|
||||
<h3 class="title-hero">
|
||||
Remote Backups <img ng-hide="backupLoading" src="{% static 'images/loading.gif' %}">
|
||||
{% trans "Remote Backups" %} <img ng-hide="backupLoading" src="{% static 'images/loading.gif' %}">
|
||||
</h3>
|
||||
<div class="example-box-wrapper">
|
||||
|
||||
@@ -24,7 +26,7 @@
|
||||
<form action="/" class="form-horizontal bordered-row">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">IP Address</label>
|
||||
<label class="col-sm-3 control-label">{% trans "IP Address" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" ng-model="IPAddress" required>
|
||||
</div>
|
||||
@@ -32,7 +34,7 @@
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">Password</label>
|
||||
<label class="col-sm-3 control-label">{% trans "Password" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input ng-change="passwordEnter()" type="password" class="form-control" ng-model="password" required>
|
||||
</div>
|
||||
@@ -41,7 +43,7 @@
|
||||
<div ng-hide="backupButton" class="form-group">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" ng-disabled="fetchAccountsBtn" ng-click="fetchAccountsFromRemoteServer()" class="btn btn-primary btn-lg btn-block">Fetch Accounts</button>
|
||||
<button type="button" ng-disabled="fetchAccountsBtn" ng-click="fetchAccountsFromRemoteServer()" class="btn btn-primary btn-lg btn-block">{% trans "Fetch Accounts" %}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -50,11 +52,11 @@
|
||||
|
||||
<label class="col-sm-1 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" ng-disabled="startTransferbtn" ng-click="startTransfer()" class="btn btn-primary btn-lg btn-block">Start Transfer</button>
|
||||
<button type="button" ng-disabled="startTransferbtn" ng-click="startTransfer()" class="btn btn-primary btn-lg btn-block">{% trans "Start Transfer" %}</button>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4">
|
||||
<button type="button" ng-disabled="stopTransferbtn" ng-click="cancelRemoteBackup()" class="btn btn-primary btn-lg btn-block">Cancel</button>
|
||||
<button type="button" ng-disabled="stopTransferbtn" ng-click="cancelRemoteBackup()" class="btn btn-primary btn-lg btn-block">{% trans "Cancel" %}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -67,19 +69,19 @@
|
||||
<p>{$ error_message $}</p>
|
||||
</div>
|
||||
<div ng-hide="couldNotConnect" class="alert alert-danger">
|
||||
<p>Could not connect, please refresh this page.</p>
|
||||
<p>{% trans "Could not connect, please refresh this page." %}</p>
|
||||
</div>
|
||||
|
||||
<div ng-hide="accountsFetched" class="alert alert-success">
|
||||
<p>Accounts Successfully Fetched from remote server.</p>
|
||||
<p>{% trans "Accounts Successfully Fetched from remote server." %}</p>
|
||||
</div>
|
||||
|
||||
<div ng-hide="backupProcessStarted" class="alert alert-success">
|
||||
<p>Backup Process successfully started.</p>
|
||||
<p>{% trans "Backup Process successfully started." %}</p>
|
||||
</div>
|
||||
|
||||
<div ng-hide="backupCancelled" class="alert alert-success">
|
||||
<p>Backup successfully cancelled.</p>
|
||||
<p>{% trans "Backup successfully cancelled." %}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@ from django.http import HttpResponse
|
||||
from .models import DBUsers
|
||||
from loginSystem.models import Administrator
|
||||
import json
|
||||
from websiteFunctions.models import Websites,Backups,dest,backupSchedules
|
||||
from websiteFunctions.models import Websites,Backups,dest,backupSchedules,ChildDomains
|
||||
import plogical.CyberCPLogFileWriter as logging
|
||||
from loginSystem.views import loadLoginPage
|
||||
import os
|
||||
@@ -187,10 +187,19 @@ def submitBackupCreation(request):
|
||||
|
||||
metaFile = open(meta, 'w')
|
||||
|
||||
metaFile.write(backupDomain + "\n")
|
||||
metaFile.write(backupDomain + "-" + website.phpSelection + "\n")
|
||||
|
||||
childDomains = website.childdomains_set.all()
|
||||
|
||||
databases = website.databases_set.all()
|
||||
|
||||
metaFile.write("Child Domains\n")
|
||||
|
||||
for items in childDomains:
|
||||
metaFile.write(items.domain + "-" + items.phpSelection + "-" + items.path + "\n")
|
||||
|
||||
metaFile.write("Databases\n")
|
||||
|
||||
for items in databases:
|
||||
dbuser = DBUsers.objects.get(user=items.dbUser)
|
||||
metaFile.write(items.dbName + "-" + items.dbUser + "-" + dbuser.password + "\n")
|
||||
@@ -422,10 +431,10 @@ def restoreStatus(request):
|
||||
data = json.loads(request.body)
|
||||
backupFile = data['backupFile'].strip(".tar.gz")
|
||||
|
||||
path = "/home/backup/" + backupFile
|
||||
path = "/home/backup/" + data['backupFile']
|
||||
|
||||
if os.path.exists(path):
|
||||
pass
|
||||
path = "/home/backup/" + backupFile
|
||||
else:
|
||||
dir = data['dir']
|
||||
path = "/home/backup/transfer-" + str(dir) + "/" + backupFile
|
||||
@@ -1055,6 +1064,15 @@ def submitRemoteBackups(request):
|
||||
|
||||
pathToSSH = "/root/.ssh/authorized_keys"
|
||||
|
||||
if not os.path.exists("/root/.ssh"):
|
||||
os.makedirs("/root/.ssh")
|
||||
if not os.path.exists(pathToSSH):
|
||||
f = open(pathToSSH,"w")
|
||||
f.close()
|
||||
else:
|
||||
if not os.path.exists(pathToSSH):
|
||||
f = open(pathToSSH,"w")
|
||||
f.close()
|
||||
|
||||
|
||||
presenseCheck = 0
|
||||
@@ -1091,7 +1109,7 @@ def submitRemoteBackups(request):
|
||||
data_ret = json.dumps(data_ret)
|
||||
return HttpResponse(data_ret)
|
||||
else:
|
||||
data_ret = {'status': 0, 'error_message': "Not able to fetch accounts from remote server.", "dir": "Null"}
|
||||
data_ret = {'status': 0, 'error_message': "Not able to fetch accounts from remote server. Error Message: "+data['error_message'], "dir": "Null"}
|
||||
data_ret = json.dumps(data_ret)
|
||||
return HttpResponse(data_ret)
|
||||
|
||||
@@ -1125,16 +1143,20 @@ def starRemoteTransfer(request):
|
||||
|
||||
data = json.loads(r.text)
|
||||
|
||||
localStoragePath = "/home/backup/transfer-"+str(data['dir'])
|
||||
|
||||
if not os.path.exists(localStoragePath):
|
||||
os.makedirs(localStoragePath)
|
||||
|
||||
if data['transferStatus'] == 1:
|
||||
|
||||
## create local directory that will host backups
|
||||
|
||||
localStoragePath = "/home/backup/transfer-" + str(data['dir'])
|
||||
|
||||
if not os.path.exists(localStoragePath):
|
||||
os.makedirs(localStoragePath)
|
||||
|
||||
final_json = json.dumps({'remoteTransferStatus': 1, 'error_message': "None","dir":data['dir']})
|
||||
return HttpResponse(final_json)
|
||||
else:
|
||||
final_json = json.dumps({'remoteTransferStatus': 0, 'error_message': data['error_message']})
|
||||
final_json = json.dumps({'remoteTransferStatus': 0, 'error_message':"Can not initiate remote transfer. Error message: "+ data['error_message']})
|
||||
return HttpResponse(final_json)
|
||||
|
||||
except BaseException,msg:
|
||||
@@ -1154,7 +1176,7 @@ def getRemoteTransferStatus(request):
|
||||
username = "admin"
|
||||
|
||||
finalData = json.dumps({'dir': dir, "username":username,"password":password})
|
||||
r = requests.post("https://"+ipAddress+":8090/api/FetchRemoteTransferStatus", data=finalData)
|
||||
r = requests.post("https://"+ipAddress+":8090/api/FetchRemoteTransferStatus", data=finalData,verify=False)
|
||||
|
||||
data = json.loads(r.text)
|
||||
|
||||
@@ -1265,7 +1287,7 @@ def cancelRemoteBackup(request):
|
||||
|
||||
|
||||
finalData = json.dumps({'dir': dir, "username":username,"password":password})
|
||||
r = requests.post("https://"+ipAddress+":8090/api/cancelRemoteTransfer", data=finalData)
|
||||
r = requests.post("https://"+ipAddress+":8090/api/cancelRemoteTransfer", data=finalData,verify=False)
|
||||
|
||||
data = json.loads(r.text)
|
||||
|
||||
|
||||
@@ -124,6 +124,11 @@ app.controller('adminController', function($scope,$http,$timeout) {
|
||||
$("#backupDestinations").hide();
|
||||
$("#scheduleBackup").hide();
|
||||
|
||||
$("#remoteBackups").hide();
|
||||
$("#packageHome").hide();
|
||||
$("#packageSub").hide();
|
||||
$("#createWebsite").hide();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -448,7 +448,7 @@
|
||||
<div class="sidebar-submenu">
|
||||
|
||||
<ul>
|
||||
<li><a href="{% url 'createWebsite' %}" title="{% trans 'Create Website' %}"><span>{% trans "Create Website" %}</span></a></li>
|
||||
<li id="createWebsite"><a href="{% url 'createWebsite' %}" title="{% trans 'Create Website' %}"><span>{% trans "Create Website" %}</span></a></li>
|
||||
<li><a href="{% url 'listWebsites' %}" title="{% trans 'List Websites' %}"><span>{% trans "List Websites" %}</span></a></li>
|
||||
<li><a href="{% url 'modifyWebsite' %}" title="{% trans 'Modify Website' %}"><span>{% trans "Modify Website" %}</span></a></li>
|
||||
<li id="siteState"><a href="{% url 'siteState' %}" title="{% trans 'Suspend/Unsuspend' %}"><span>{% trans "Suspend/Unsuspend" %}</span></a></li>
|
||||
@@ -458,16 +458,16 @@
|
||||
</div><!-- .sidebar-submenu -->
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'packagesHome' %}" title="{% trans 'Packages' %}">
|
||||
<a id="packageHome" href="{% url 'packagesHome' %}" title="{% trans 'Packages' %}">
|
||||
<i class="glyph-icon icon-cubes"></i>
|
||||
<span>{% trans "Packages" %}</span>
|
||||
</a>
|
||||
<div class="sidebar-submenu">
|
||||
<div id="packageSub" class="sidebar-submenu">
|
||||
|
||||
<ul>
|
||||
<li><a href="{% url 'createPackage' %}" title="{% trans 'Create Package' %}"><span>{% trans "Create Package" %}</span></a></li>
|
||||
<li><a href="{% url 'deletePackage' %}" title="{% trans 'Delete Package' %}"><span>{% trans "Delete Package" %}</span></a></li>
|
||||
<li><a href="{% url 'modifyPackage' %}" title="{% trans 'Modify Package' %}"><span>{% trans "Modify Package" %}</span></a></li>
|
||||
<li id="createPackage"><a href="{% url 'createPackage' %}" title="{% trans 'Create Package' %}"><span>{% trans "Create Package" %}</span></a></li>
|
||||
<li id="deletePackage"><a href="{% url 'deletePackage' %}" title="{% trans 'Delete Package' %}"><span>{% trans "Delete Package" %}</span></a></li>
|
||||
<li id="modifyPackage"><a href="{% url 'modifyPackage' %}" title="{% trans 'Modify Package' %}"><span>{% trans "Modify Package" %}</span></a></li>
|
||||
</ul>
|
||||
|
||||
</div><!-- .sidebar-submenu -->
|
||||
@@ -562,6 +562,7 @@
|
||||
<li id="restoreSite"><a href="{% url 'restoreSite' %}" title="{% trans 'Restore Back up' %}"><span>{% trans "Restore Back up" %}</span></a></li>
|
||||
<li id="backupDestinations"><a href="{% url 'backupDestinations' %}" title="{% trans 'Add Destination' %}"><span>{% trans "Add/Delete Destination" %}</span></a></li>
|
||||
<li id="scheduleBackup"><a href="{% url 'scheduleBackup' %}" title="{% trans 'Schedule Back up' %}"><span>{% trans "Schedule Back up" %}</span></a></li>
|
||||
<li id="remoteBackups"><a href="{% url 'remoteBackups' %}" title="{% trans 'Remote Back ups' %}"><span>{% trans "Remote Back ups" %}</span></a></li>
|
||||
</ul>
|
||||
|
||||
</div><!-- .sidebar-submenu -->
|
||||
|
||||
@@ -47,10 +47,11 @@
|
||||
</div>
|
||||
|
||||
<div ng-hide="passwordChanged" class="alert alert-success">
|
||||
{% trans "Password changed for: " %} <strong>{$ dbUsername $}</strong>
|
||||
</div>
|
||||
|
||||
<div ng-hide="canNotChangePassword" class="alert alert-danger">
|
||||
<p>{% trans "Cannot change password for " %}<strong>{$ dbUsername $}</strong>, Error message: {$ errorMessage $}</p>
|
||||
<p>{% trans "Cannot change password for " %}<strong>{$ dbUsername $}</strong>, {% trans "Error message:" %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="container">
|
||||
<div id="page-title">
|
||||
<h2>{% trans "Secure SSH" %}</h2>
|
||||
<p>{% trans "Edit PHP Configurations on this page." %}</p>
|
||||
<p>{% trans "Secure or harden SSH Configurations." %}</p>
|
||||
</div>
|
||||
|
||||
<div ng-controller="secureSSHCTRL" class="panel">
|
||||
|
||||
Binary file not shown.
@@ -15,7 +15,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-10-25 01:02+0500\n"
|
||||
"POT-Creation-Date: 2017-10-29 20:47+0500\n"
|
||||
"PO-Revision-Date: 2017-10-24 22:23+0300\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
@@ -30,26 +30,22 @@ msgid "English"
|
||||
msgstr ""
|
||||
|
||||
#: CyberCP/settings.py:168
|
||||
msgid "Urdu"
|
||||
msgstr ""
|
||||
|
||||
#: CyberCP/settings.py:169
|
||||
msgid "Chinese"
|
||||
msgstr ""
|
||||
|
||||
#: CyberCP/settings.py:170
|
||||
#: CyberCP/settings.py:169
|
||||
msgid "Bulgarian"
|
||||
msgstr ""
|
||||
|
||||
#: CyberCP/settings.py:171
|
||||
#: CyberCP/settings.py:170
|
||||
msgid "Portuguese"
|
||||
msgstr ""
|
||||
|
||||
#: CyberCP/settings.py:172
|
||||
#: CyberCP/settings.py:171
|
||||
msgid "Japanese"
|
||||
msgstr ""
|
||||
|
||||
#: CyberCP/settings.py:173
|
||||
#: CyberCP/settings.py:172
|
||||
msgid "Bosnian"
|
||||
msgstr ""
|
||||
|
||||
@@ -117,7 +113,7 @@ msgstr "Откажи Архив"
|
||||
#: backup/templates/backup/backup.html:101
|
||||
#: backup/templates/backup/backupDestinations.html:90
|
||||
#: backup/templates/backup/backupSchedule.html:89
|
||||
#: databases/templates/databases/listDataBases.html:86
|
||||
#: databases/templates/databases/listDataBases.html:87
|
||||
#: dns/templates/dns/addDeleteDNSRecords.html:129
|
||||
#: firewall/templates/firewall/firewall.html:127
|
||||
#: ftp/templates/ftp/listFTPAccounts.html:87
|
||||
@@ -144,6 +140,7 @@ msgstr "Размер"
|
||||
#: dns/templates/dns/addDeleteDNSRecords.html:134
|
||||
#: firewall/templates/firewall/firewall.html:131
|
||||
#: firewall/templates/firewall/secureSSH.html:122
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:424
|
||||
msgid "Delete"
|
||||
msgstr "Изтрий"
|
||||
|
||||
@@ -166,6 +163,7 @@ msgid "On this page you can set up your Back up destinations. (SFTP)"
|
||||
msgstr "От тази страница може да настройте дестинацията за архивите (SFTP)"
|
||||
|
||||
#: backup/templates/backup/backupDestinations.html:30
|
||||
#: backup/templates/backup/remoteBackups.html:29
|
||||
#: dns/templates/dns/addDeleteDNSRecords.html:60
|
||||
#: dns/templates/dns/createNameServer.html:48
|
||||
#: dns/templates/dns/createNameServer.html:65
|
||||
@@ -173,8 +171,9 @@ msgid "IP Address"
|
||||
msgstr "IP Адрес"
|
||||
|
||||
#: backup/templates/backup/backupDestinations.html:38
|
||||
#: backup/templates/backup/remoteBackups.html:37
|
||||
#: databases/templates/databases/createDatabase.html:58
|
||||
#: databases/templates/databases/listDataBases.html:89
|
||||
#: databases/templates/databases/listDataBases.html:90
|
||||
#: ftp/templates/ftp/listFTPAccounts.html:91
|
||||
#: mailServer/templates/mailServer/changeEmailPassword.html:52
|
||||
#: mailServer/templates/mailServer/createEmailAccount.html:51
|
||||
@@ -227,10 +226,12 @@ msgstr "Дестинацията е добавена"
|
||||
#: userManagment/templates/userManagment/modifyUser.html:139
|
||||
#: websiteFunctions/templates/websiteFunctions/suspendWebsite.html:77
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:157
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:284
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:339
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:394
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:542
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:336
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:378
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:508
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:563
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:618
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:765
|
||||
msgid "Could not connect to server. Please refresh this page."
|
||||
msgstr ""
|
||||
|
||||
@@ -335,12 +336,74 @@ msgstr "Възстанови Архив"
|
||||
msgid "Restore"
|
||||
msgstr "Възстанови"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:75
|
||||
#: backup/templates/backup/remoteBackups.html:3
|
||||
#, fuzzy
|
||||
#| msgid "Create Nameserver - CyberPanel"
|
||||
msgid "Transfer Websites from Remote Server - CyberPanel"
|
||||
msgstr "Създай Nameserver - CyberPanel"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:14
|
||||
#: backup/templates/backup/remoteBackups.html:21
|
||||
#, fuzzy
|
||||
#| msgid "Restore Back up"
|
||||
msgid "Remote Backups"
|
||||
msgstr "Възстанови Архив"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:15
|
||||
msgid "This feature can import website(s) from remote server"
|
||||
msgstr ""
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:46
|
||||
#, fuzzy
|
||||
#| msgid "FTP Accounts"
|
||||
msgid "Fetch Accounts"
|
||||
msgstr "FTP Акаунти"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:55
|
||||
msgid "Start Transfer"
|
||||
msgstr ""
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:59
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:269
|
||||
#, fuzzy
|
||||
#| msgid "Cancel Backup"
|
||||
msgid "Cancel"
|
||||
msgstr "Откажи Архив"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:72
|
||||
#, fuzzy
|
||||
#| msgid "Could not connect. Please refresh this page."
|
||||
msgid "Could not connect, please refresh this page."
|
||||
msgstr "Не можем да се свържем, моля презаредете страницата."
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:76
|
||||
msgid "Accounts Successfully Fetched from remote server."
|
||||
msgstr ""
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:80
|
||||
#, fuzzy
|
||||
#| msgid " is successfully created."
|
||||
msgid "Backup Process successfully started."
|
||||
msgstr "е успешно създаден."
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:84
|
||||
#, fuzzy
|
||||
#| msgid "Rule successfully added."
|
||||
msgid "Backup successfully cancelled."
|
||||
msgstr "Правилата са успешно добавени."
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:96
|
||||
#, fuzzy
|
||||
#| msgid "Select Account"
|
||||
msgid "Search Accounts.."
|
||||
msgstr "Избери Акаунт"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:107
|
||||
#: websiteFunctions/templates/websiteFunctions/deleteWebsite.html:65
|
||||
msgid "Website"
|
||||
msgstr "Страница"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:76
|
||||
#: backup/templates/backup/remoteBackups.html:108
|
||||
#: baseTemplate/templates/baseTemplate/homePage.html:331
|
||||
#: baseTemplate/templates/baseTemplate/index.html:625
|
||||
#: baseTemplate/templates/baseTemplate/index.html:627
|
||||
@@ -348,14 +411,14 @@ msgstr "Страница"
|
||||
msgid "PHP"
|
||||
msgstr "PHP"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:77
|
||||
#: packages/templates/packages/createPackage.html:91
|
||||
#: backup/templates/backup/remoteBackups.html:109
|
||||
#: packages/templates/packages/createPackage.html:99
|
||||
#: packages/templates/packages/deletePackage.html:63
|
||||
#: packages/templates/packages/modifyPackage.html:102
|
||||
#: packages/templates/packages/modifyPackage.html:112
|
||||
msgid "Package"
|
||||
msgstr "Пакети"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:78
|
||||
#: backup/templates/backup/remoteBackups.html:110
|
||||
#: baseTemplate/templates/baseTemplate/index.html:514
|
||||
#: baseTemplate/templates/baseTemplate/index.html:516
|
||||
#: userManagment/templates/userManagment/createUser.html:47
|
||||
@@ -366,10 +429,6 @@ msgstr "Пакети"
|
||||
msgid "Email"
|
||||
msgstr "Email"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:79
|
||||
msgid "Transfer"
|
||||
msgstr ""
|
||||
|
||||
#: backup/templates/backup/restore.html:3
|
||||
msgid "Restore Website - CyberPanel"
|
||||
msgstr "Възстанови Страница - CyberPanel"
|
||||
@@ -392,6 +451,7 @@ msgstr "Избери Архив"
|
||||
|
||||
#: backup/templates/backup/restore.html:86
|
||||
#: databases/templates/databases/deleteDatabase.html:64
|
||||
#: databases/templates/databases/listDataBases.html:54
|
||||
#: firewall/templates/firewall/firewall.html:156
|
||||
#: managePHP/templates/managePHP/editPHPConfig.html:212
|
||||
msgid "Error message:"
|
||||
@@ -495,8 +555,8 @@ msgstr "Функции на Бази от Данни"
|
||||
#: baseTemplate/templates/baseTemplate/index.html:477
|
||||
#: baseTemplate/templates/baseTemplate/index.html:478
|
||||
#: baseTemplate/templates/baseTemplate/index.html:479
|
||||
#: packages/templates/packages/createPackage.html:59
|
||||
#: packages/templates/packages/modifyPackage.html:63
|
||||
#: packages/templates/packages/createPackage.html:67
|
||||
#: packages/templates/packages/modifyPackage.html:73
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:44
|
||||
msgid "Databases"
|
||||
msgstr "База от Данни"
|
||||
@@ -527,8 +587,8 @@ msgstr "FTP"
|
||||
|
||||
#: baseTemplate/templates/baseTemplate/homePage.html:278
|
||||
#: baseTemplate/templates/baseTemplate/homePage.html:281
|
||||
#: packages/templates/packages/createPackage.html:67
|
||||
#: packages/templates/packages/modifyPackage.html:70
|
||||
#: packages/templates/packages/createPackage.html:75
|
||||
#: packages/templates/packages/modifyPackage.html:80
|
||||
msgid "Emails"
|
||||
msgstr "Emails"
|
||||
|
||||
@@ -716,7 +776,7 @@ msgstr "Изтрий Страница"
|
||||
|
||||
#: baseTemplate/templates/baseTemplate/index.html:468
|
||||
#: packages/templates/packages/createPackage.html:13
|
||||
#: packages/templates/packages/createPackage.html:76
|
||||
#: packages/templates/packages/createPackage.html:84
|
||||
#: packages/templates/packages/index.html:25
|
||||
#: packages/templates/packages/index.html:27
|
||||
msgid "Create Package"
|
||||
@@ -736,7 +796,7 @@ msgstr "Изтрий Пакет"
|
||||
#: packages/templates/packages/index.html:51
|
||||
#: packages/templates/packages/modifyPackage.html:9
|
||||
#: packages/templates/packages/modifyPackage.html:15
|
||||
#: packages/templates/packages/modifyPackage.html:85
|
||||
#: packages/templates/packages/modifyPackage.html:95
|
||||
msgid "Modify Package"
|
||||
msgstr "Промени Пакет"
|
||||
|
||||
@@ -827,7 +887,7 @@ msgid "Delete Email"
|
||||
msgstr "Изтрий Email"
|
||||
|
||||
#: baseTemplate/templates/baseTemplate/index.html:523
|
||||
#: databases/templates/databases/listDataBases.html:72
|
||||
#: databases/templates/databases/listDataBases.html:73
|
||||
#: ftp/templates/ftp/listFTPAccounts.html:73
|
||||
#: mailServer/templates/mailServer/changeEmailPassword.html:64
|
||||
#: mailServer/templates/mailServer/index.html:49
|
||||
@@ -843,7 +903,8 @@ msgstr "Webmail"
|
||||
#: ftp/templates/ftp/createFTPAccount.html:12
|
||||
#: ftp/templates/ftp/createFTPAccount.html:19 ftp/templates/ftp/index.html:25
|
||||
#: ftp/templates/ftp/index.html:27
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:461
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:683
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:685
|
||||
msgid "Create FTP Account"
|
||||
msgstr "Създай FTP Акаунт"
|
||||
|
||||
@@ -852,7 +913,8 @@ msgstr "Създай FTP Акаунт"
|
||||
#: ftp/templates/ftp/deleteFTPAccount.html:18
|
||||
#: ftp/templates/ftp/deleteFTPAccount.html:52 ftp/templates/ftp/index.html:37
|
||||
#: ftp/templates/ftp/index.html:39
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:473
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:695
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:697
|
||||
msgid "Delete FTP Account"
|
||||
msgstr "Изтрий FTP Акаунт"
|
||||
|
||||
@@ -1042,7 +1104,7 @@ msgid "Create a new database on this page."
|
||||
msgstr "Създай нова база от данни от тази страница."
|
||||
|
||||
#: databases/templates/databases/createDatabase.html:42
|
||||
#: databases/templates/databases/listDataBases.html:87
|
||||
#: databases/templates/databases/listDataBases.html:88
|
||||
msgid "Database Name"
|
||||
msgstr "Име на База от Данни"
|
||||
|
||||
@@ -1107,21 +1169,25 @@ msgstr "Избери Домейн"
|
||||
msgid "Records successfully fetched for"
|
||||
msgstr ""
|
||||
|
||||
#: databases/templates/databases/listDataBases.html:53
|
||||
#: databases/templates/databases/listDataBases.html:50
|
||||
msgid "Password changed for: "
|
||||
msgstr ""
|
||||
|
||||
#: databases/templates/databases/listDataBases.html:54
|
||||
msgid "Cannot change password for "
|
||||
msgstr ""
|
||||
|
||||
#: databases/templates/databases/listDataBases.html:58
|
||||
#: databases/templates/databases/listDataBases.html:59
|
||||
#: firewall/templates/firewall/firewall.html:166
|
||||
#: ftp/templates/ftp/listFTPAccounts.html:59
|
||||
msgid "Could Not Connect to server. Please refresh this page"
|
||||
msgstr ""
|
||||
|
||||
#: databases/templates/databases/listDataBases.html:88
|
||||
#: databases/templates/databases/listDataBases.html:89
|
||||
msgid "Database User"
|
||||
msgstr ""
|
||||
|
||||
#: databases/templates/databases/listDataBases.html:97
|
||||
#: databases/templates/databases/listDataBases.html:98
|
||||
#: ftp/templates/ftp/listFTPAccounts.html:100
|
||||
msgid "Change"
|
||||
msgstr "Промени"
|
||||
@@ -1164,6 +1230,7 @@ msgstr "Приоритет"
|
||||
#: dns/templates/dns/createDNSZone.html:27
|
||||
#: dns/templates/dns/createNameServer.html:27
|
||||
#: websiteFunctions/templates/websiteFunctions/createWebsite.html:52
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:263
|
||||
msgid "Domain Name"
|
||||
msgstr "Домейн Име"
|
||||
|
||||
@@ -1386,9 +1453,10 @@ msgid "Secure SSH - CyberPanel"
|
||||
msgstr ""
|
||||
|
||||
#: firewall/templates/firewall/secureSSH.html:14
|
||||
#: managePHP/templates/managePHP/editPHPConfig.html:15
|
||||
msgid "Edit PHP Configurations on this page."
|
||||
msgstr ""
|
||||
#, fuzzy
|
||||
#| msgid "SSH Configurations Saved."
|
||||
msgid "Secure or harden SSH Configurations."
|
||||
msgstr "SSH Конфигурацията е запаметена."
|
||||
|
||||
#: firewall/templates/firewall/secureSSH.html:28
|
||||
#: managePHP/templates/managePHP/editPHPConfig.html:29
|
||||
@@ -1433,8 +1501,8 @@ msgstr "Добави Ключ"
|
||||
|
||||
#: firewall/templates/firewall/secureSSH.html:158
|
||||
#: websiteFunctions/templates/websiteFunctions/suspendWebsite.html:55
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:303
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:363
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:527
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:587
|
||||
msgid "Save"
|
||||
msgstr "Запази"
|
||||
|
||||
@@ -1623,6 +1691,10 @@ msgstr "Редактирай PHP Конфигурация - CyberPanel"
|
||||
msgid "Edit PHP Configurations"
|
||||
msgstr "Редактирай PHP Конфигурация"
|
||||
|
||||
#: managePHP/templates/managePHP/editPHPConfig.html:15
|
||||
msgid "Edit PHP Configurations on this page."
|
||||
msgstr ""
|
||||
|
||||
#: managePHP/templates/managePHP/editPHPConfig.html:35
|
||||
msgid "Advanced"
|
||||
msgstr "За Напреднали"
|
||||
@@ -1633,6 +1705,7 @@ msgstr "За Напреднали"
|
||||
#: tuning/templates/tuning/phpTuning.html:28
|
||||
#: websiteFunctions/templates/websiteFunctions/createWebsite.html:68
|
||||
#: websiteFunctions/templates/websiteFunctions/modifyWebsite.html:74
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:283
|
||||
msgid "Select PHP"
|
||||
msgstr "Избери PHP"
|
||||
|
||||
@@ -1811,32 +1884,47 @@ msgid "Package Name"
|
||||
msgstr "Име на Пакет"
|
||||
|
||||
#: packages/templates/packages/createPackage.html:35
|
||||
#: packages/templates/packages/modifyPackage.html:39
|
||||
#: packages/templates/packages/modifyPackage.html:40
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:223
|
||||
#, fuzzy
|
||||
#| msgid "Domain Name"
|
||||
msgid "Domains"
|
||||
msgstr "Домейн Име"
|
||||
|
||||
#: packages/templates/packages/createPackage.html:39
|
||||
#: packages/templates/packages/modifyPackage.html:44
|
||||
#, fuzzy
|
||||
#| msgid "( 0 = Unlimited )"
|
||||
msgid "(0 = Unlimited)"
|
||||
msgstr "( 0 = Без Лимит )"
|
||||
|
||||
#: packages/templates/packages/createPackage.html:43
|
||||
#: packages/templates/packages/modifyPackage.html:49
|
||||
msgid "Disk Space"
|
||||
msgstr "Дисково Място"
|
||||
|
||||
#: packages/templates/packages/createPackage.html:39
|
||||
#: packages/templates/packages/createPackage.html:47
|
||||
#: packages/templates/packages/modifyPackage.html:43
|
||||
#: packages/templates/packages/modifyPackage.html:51
|
||||
#: packages/templates/packages/createPackage.html:55
|
||||
#: packages/templates/packages/modifyPackage.html:53
|
||||
#: packages/templates/packages/modifyPackage.html:61
|
||||
msgid "MB (0 = Unlimited)"
|
||||
msgstr "MB (0 = Без лимит)"
|
||||
|
||||
#: packages/templates/packages/createPackage.html:43
|
||||
#: packages/templates/packages/modifyPackage.html:47
|
||||
#: packages/templates/packages/createPackage.html:51
|
||||
#: packages/templates/packages/modifyPackage.html:57
|
||||
msgid "Bandwidth"
|
||||
msgstr "Трафик"
|
||||
|
||||
#: packages/templates/packages/createPackage.html:52
|
||||
#: packages/templates/packages/modifyPackage.html:56
|
||||
#: packages/templates/packages/createPackage.html:60
|
||||
#: packages/templates/packages/modifyPackage.html:66
|
||||
msgid "FTP Accounts"
|
||||
msgstr "FTP Акаунти"
|
||||
|
||||
#: packages/templates/packages/createPackage.html:87
|
||||
#: packages/templates/packages/createPackage.html:95
|
||||
msgid "Cannot create package. Error message:"
|
||||
msgstr "Пакета не е създаден, защото:"
|
||||
|
||||
#: packages/templates/packages/createPackage.html:91
|
||||
#: packages/templates/packages/createPackage.html:99
|
||||
msgid "Successfully Created"
|
||||
msgstr "Успешно е създаден"
|
||||
|
||||
@@ -1868,15 +1956,15 @@ msgstr "Пакети - CyberPanel"
|
||||
msgid "Modify Package - CyberPanel"
|
||||
msgstr "Промени Пакет - CyberPanel"
|
||||
|
||||
#: packages/templates/packages/modifyPackage.html:94
|
||||
#: packages/templates/packages/modifyPackage.html:104
|
||||
msgid "Cannot fetch package details. Error message:"
|
||||
msgstr "Детайлите за пакета не са извлечени, защото:"
|
||||
|
||||
#: packages/templates/packages/modifyPackage.html:98
|
||||
#: packages/templates/packages/modifyPackage.html:108
|
||||
msgid "Package Details Successfully Fetched"
|
||||
msgstr "Детайлите за пакета са успешно извлечени"
|
||||
|
||||
#: packages/templates/packages/modifyPackage.html:102
|
||||
#: packages/templates/packages/modifyPackage.html:112
|
||||
msgid "Successfully Modified"
|
||||
msgstr "Успешно Променено"
|
||||
|
||||
@@ -2377,29 +2465,36 @@ msgid "Select Owner"
|
||||
msgstr "Избери Собственик"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/createWebsite.html:56
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:267
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:278
|
||||
msgid "Invalid Domain (Note: You don't need to add 'http' or 'https')"
|
||||
msgstr ""
|
||||
"Невалиден домейн (Забележка: Не е необходимо да поставяте 'http' или 'https')"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/createWebsite.html:84
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:299
|
||||
msgid "Additional Features"
|
||||
msgstr "Допълнителни функции"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/createWebsite.html:91
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:306
|
||||
msgid ""
|
||||
"For SSL to work DNS of domain should point to server, otherwise self signed "
|
||||
"SSL will be issued, you can add your own SSL later."
|
||||
msgstr ""
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/createWebsite.html:113
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:328
|
||||
msgid "Cannot create website. Error message:"
|
||||
msgstr "Страницата не е създадена, защото:"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/createWebsite.html:117
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:332
|
||||
msgid "Website with domain"
|
||||
msgstr "Страница с домейн"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/createWebsite.html:117
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:332
|
||||
msgid " is Successfully Created"
|
||||
msgstr "е Успешно Създаден"
|
||||
|
||||
@@ -2542,95 +2637,159 @@ msgstr "Следваща"
|
||||
msgid "Previous"
|
||||
msgstr "Минала"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:227
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:230
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:232
|
||||
#, fuzzy
|
||||
#| msgid "Add Destination"
|
||||
msgid "Add Domains"
|
||||
msgstr "Добави дестинация"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:242
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:244
|
||||
#, fuzzy
|
||||
#| msgid "Select Domain"
|
||||
msgid "List Domains"
|
||||
msgstr "Избери Домейн"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:274
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:733
|
||||
msgid "Path"
|
||||
msgstr "Път"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:276
|
||||
msgid "This path is relative to: "
|
||||
msgstr ""
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:276
|
||||
msgid "Leave empty to set default."
|
||||
msgstr ""
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:317
|
||||
#, fuzzy
|
||||
#| msgid "Create Email"
|
||||
msgid "Create Domain"
|
||||
msgstr "Създай Email"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:360
|
||||
#, fuzzy
|
||||
#| msgid "Version Management"
|
||||
msgid "PHP Version Changed to:"
|
||||
msgstr "Мениджър на Версия"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:364
|
||||
#, fuzzy
|
||||
#| msgid "Delete"
|
||||
msgid "Deleted:"
|
||||
msgstr "Изтрий"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:368
|
||||
#, fuzzy
|
||||
#| msgid "SSL Issued for"
|
||||
msgid "SSL Issued:"
|
||||
msgstr "SSL издаден за"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:391
|
||||
msgid "Close"
|
||||
msgstr ""
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:423
|
||||
#, fuzzy
|
||||
#| msgid "Issue SSL"
|
||||
msgid "Issue"
|
||||
msgstr "Издаване на SSL"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:451
|
||||
msgid "Configurations"
|
||||
msgstr "Конфигурация"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:233
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:457
|
||||
msgid "Edit Virtual Host Main Configurations"
|
||||
msgstr "Редактирай Virtual Host Main Configurations"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:235
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:459
|
||||
msgid "Edit vHost Main Configurations"
|
||||
msgstr "Редактирай vHost Main Configurations"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:245
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:247
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:469
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:471
|
||||
msgid "Add Rewrite Rules (.htaccess)"
|
||||
msgstr "Добави Rewrite Rules (.htaccess)"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:257
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:481
|
||||
msgid "Add Your Own SSL"
|
||||
msgstr "Добави свой SSL"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:259
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:483
|
||||
msgid "Add SSL"
|
||||
msgstr "Добави SSL"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:274
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:498
|
||||
msgid "SSL Saved"
|
||||
msgstr "SSL Запазен"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:279
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:503
|
||||
msgid "Could not save SSL. Error message:"
|
||||
msgstr "SSL не е запазен, защото:"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:329
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:553
|
||||
msgid "Current configuration in the file fetched."
|
||||
msgstr "Текущата конфигурация във файла е изтеглена"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:334
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:347
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:558
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:571
|
||||
msgid "Could not fetch current configuration. Error message:"
|
||||
msgstr "Текущата конфигурация не е изтеглена, защото:"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:343
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:398
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:567
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:622
|
||||
msgid "Configuration saved. Restart LiteSpeed put them in effect."
|
||||
msgstr ""
|
||||
"Конфигурацията е запазена. Рестартирайте LiteSpeed, за да влезнат в сила "
|
||||
"промените."
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:384
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:608
|
||||
msgid "Current rewrite rules in the file fetched."
|
||||
msgstr "Наличните rewrite rules са изтеглени."
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:389
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:613
|
||||
msgid "Could not fetch current rewrite rules. Error message:"
|
||||
msgstr "Наличните rewrite rules не са изтеглени, защото:"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:402
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:626
|
||||
msgid "Could not save rewrite rules. Error message:"
|
||||
msgstr "Новите rewrite rules не са запаметени, защото:"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:418
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:642
|
||||
msgid "Save Rewrite Rules"
|
||||
msgstr "Запази Rewrite Rules"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:441
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:665
|
||||
msgid "Files"
|
||||
msgstr "Файлове"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:450
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:672
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:674
|
||||
msgid "File Manager"
|
||||
msgstr "Файл Мениджър"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:490
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:713
|
||||
msgid "Application Installer"
|
||||
msgstr "Инсталатор на Приложения"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:498
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:719
|
||||
#, fuzzy
|
||||
#| msgid "Wordpress with LSCache"
|
||||
msgid "Install wordpress with LSCache"
|
||||
msgstr "Wordpress с LSCache"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:721
|
||||
msgid "Wordpress with LSCache"
|
||||
msgstr "Wordpress с LSCache"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:510
|
||||
msgid "Path"
|
||||
msgstr "Път"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:532
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:755
|
||||
msgid "Installation failed. Error message:"
|
||||
msgstr "Инсталацията Не завърши, защото:"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:536
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:759
|
||||
msgid "Installation successful. To complete the setup visit:"
|
||||
msgstr "Инсталацията завърши успешно. "
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -16,7 +16,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: CyberPanel\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-10-22 13:33+0500\n"
|
||||
"POT-Creation-Date: 2017-10-29 20:47+0500\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <unasir@litespeedtech.com>\n"
|
||||
@@ -30,25 +30,25 @@ msgid "English"
|
||||
msgstr "英语"
|
||||
|
||||
#: CyberCP/settings.py:168
|
||||
msgid "Urdu"
|
||||
msgstr "乌尔都语"
|
||||
|
||||
#: CyberCP/settings.py:169
|
||||
msgid "Chinese"
|
||||
msgstr "中文"
|
||||
|
||||
#: CyberCP/settings.py:170
|
||||
#: CyberCP/settings.py:169
|
||||
msgid "Bulgarian"
|
||||
msgstr "保加利亚语"
|
||||
|
||||
#: CyberCP/settings.py:171
|
||||
#: CyberCP/settings.py:170
|
||||
msgid "Portuguese"
|
||||
msgstr "葡萄牙语"
|
||||
|
||||
#: CyberCP/settings.py:172
|
||||
#: CyberCP/settings.py:171
|
||||
msgid "Japanese"
|
||||
msgstr "日语"
|
||||
|
||||
#: CyberCP/settings.py:172
|
||||
msgid "Bosnian"
|
||||
msgstr ""
|
||||
|
||||
#: backup/templates/backup/backup.html:3 backup/templates/backup/backup.html:13
|
||||
#: backup/templates/backup/backup.html:20
|
||||
msgid "Back up Website"
|
||||
@@ -115,7 +115,7 @@ msgstr "创建备份"
|
||||
#: backup/templates/backup/backup.html:101
|
||||
#: backup/templates/backup/backupDestinations.html:90
|
||||
#: backup/templates/backup/backupSchedule.html:89
|
||||
#: databases/templates/databases/listDataBases.html:86
|
||||
#: databases/templates/databases/listDataBases.html:87
|
||||
#: dns/templates/dns/addDeleteDNSRecords.html:129
|
||||
#: firewall/templates/firewall/firewall.html:127
|
||||
#: ftp/templates/ftp/listFTPAccounts.html:87
|
||||
@@ -142,6 +142,7 @@ msgstr "大小"
|
||||
#: dns/templates/dns/addDeleteDNSRecords.html:134
|
||||
#: firewall/templates/firewall/firewall.html:131
|
||||
#: firewall/templates/firewall/secureSSH.html:122
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:424
|
||||
msgid "Delete"
|
||||
msgstr "删除"
|
||||
|
||||
@@ -164,6 +165,7 @@ msgid "On this page you can set up your Back up destinations. (SFTP)"
|
||||
msgstr "这里是远程备份页面(SFTP)"
|
||||
|
||||
#: backup/templates/backup/backupDestinations.html:30
|
||||
#: backup/templates/backup/remoteBackups.html:29
|
||||
#: dns/templates/dns/addDeleteDNSRecords.html:60
|
||||
#: dns/templates/dns/createNameServer.html:48
|
||||
#: dns/templates/dns/createNameServer.html:65
|
||||
@@ -171,8 +173,9 @@ msgid "IP Address"
|
||||
msgstr "IP地址"
|
||||
|
||||
#: backup/templates/backup/backupDestinations.html:38
|
||||
#: backup/templates/backup/remoteBackups.html:37
|
||||
#: databases/templates/databases/createDatabase.html:58
|
||||
#: databases/templates/databases/listDataBases.html:89
|
||||
#: databases/templates/databases/listDataBases.html:90
|
||||
#: ftp/templates/ftp/listFTPAccounts.html:91
|
||||
#: mailServer/templates/mailServer/changeEmailPassword.html:52
|
||||
#: mailServer/templates/mailServer/createEmailAccount.html:51
|
||||
@@ -225,10 +228,12 @@ msgstr "远程目录已添加"
|
||||
#: userManagment/templates/userManagment/modifyUser.html:139
|
||||
#: websiteFunctions/templates/websiteFunctions/suspendWebsite.html:77
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:157
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:284
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:339
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:394
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:542
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:336
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:378
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:508
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:563
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:618
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:765
|
||||
msgid "Could not connect to server. Please refresh this page."
|
||||
msgstr "无法连接到服务器, 请刷新此页面"
|
||||
|
||||
@@ -337,6 +342,101 @@ msgstr "还原备份"
|
||||
msgid "Restore"
|
||||
msgstr "还原"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:3
|
||||
#, fuzzy
|
||||
#| msgid "Websites Hosted - CyberPanel"
|
||||
msgid "Transfer Websites from Remote Server - CyberPanel"
|
||||
msgstr "当前已创建的网站 - CyberPanel"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:14
|
||||
#: backup/templates/backup/remoteBackups.html:21
|
||||
#, fuzzy
|
||||
#| msgid "Restore Back up"
|
||||
msgid "Remote Backups"
|
||||
msgstr "还原备份"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:15
|
||||
msgid "This feature can import website(s) from remote server"
|
||||
msgstr ""
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:46
|
||||
#, fuzzy
|
||||
#| msgid "FTP Accounts"
|
||||
msgid "Fetch Accounts"
|
||||
msgstr "FTP用户数量"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:55
|
||||
msgid "Start Transfer"
|
||||
msgstr ""
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:59
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:269
|
||||
#, fuzzy
|
||||
#| msgid "Create Back up"
|
||||
msgid "Cancel"
|
||||
msgstr "创建备份"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:72
|
||||
#, fuzzy
|
||||
#| msgid "Could not connect. Please refresh this page."
|
||||
msgid "Could not connect, please refresh this page."
|
||||
msgstr "无法连接, 请刷新此页面"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:76
|
||||
#, fuzzy
|
||||
#| msgid "Records successfully fetched for"
|
||||
msgid "Accounts Successfully Fetched from remote server."
|
||||
msgstr "成功读取记录"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:80
|
||||
#, fuzzy
|
||||
#| msgid " is successfully created."
|
||||
msgid "Backup Process successfully started."
|
||||
msgstr " 已成功创建"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:84
|
||||
#, fuzzy
|
||||
#| msgid "is successfully created."
|
||||
msgid "Backup successfully cancelled."
|
||||
msgstr "已成功添加"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:96
|
||||
#, fuzzy
|
||||
#| msgid "Select Account"
|
||||
msgid "Search Accounts.."
|
||||
msgstr "选择用户"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:107
|
||||
#: websiteFunctions/templates/websiteFunctions/deleteWebsite.html:65
|
||||
msgid "Website"
|
||||
msgstr "网站"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:108
|
||||
#: baseTemplate/templates/baseTemplate/homePage.html:331
|
||||
#: baseTemplate/templates/baseTemplate/index.html:625
|
||||
#: baseTemplate/templates/baseTemplate/index.html:627
|
||||
#: managePHP/templates/managePHP/installExtensions.html:62
|
||||
msgid "PHP"
|
||||
msgstr "PHP"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:109
|
||||
#: packages/templates/packages/createPackage.html:99
|
||||
#: packages/templates/packages/deletePackage.html:63
|
||||
#: packages/templates/packages/modifyPackage.html:112
|
||||
msgid "Package"
|
||||
msgstr "套餐"
|
||||
|
||||
#: backup/templates/backup/remoteBackups.html:110
|
||||
#: baseTemplate/templates/baseTemplate/index.html:514
|
||||
#: baseTemplate/templates/baseTemplate/index.html:516
|
||||
#: userManagment/templates/userManagment/createUser.html:47
|
||||
#: userManagment/templates/userManagment/modifyUser.html:54
|
||||
#: userManagment/templates/userManagment/userProfile.html:50
|
||||
#: websiteFunctions/templates/websiteFunctions/createWebsite.html:60
|
||||
#: websiteFunctions/templates/websiteFunctions/modifyWebsite.html:67
|
||||
msgid "Email"
|
||||
msgstr "Email"
|
||||
|
||||
#: backup/templates/backup/restore.html:3
|
||||
msgid "Restore Website - CyberPanel"
|
||||
msgstr "还原网站 - Cyberpanel"
|
||||
@@ -361,6 +461,7 @@ msgstr "选择备份"
|
||||
|
||||
#: backup/templates/backup/restore.html:86
|
||||
#: databases/templates/databases/deleteDatabase.html:64
|
||||
#: databases/templates/databases/listDataBases.html:54
|
||||
#: firewall/templates/firewall/firewall.html:156
|
||||
#: managePHP/templates/managePHP/editPHPConfig.html:212
|
||||
msgid "Error message:"
|
||||
@@ -466,8 +567,8 @@ msgstr "数据库功能"
|
||||
#: baseTemplate/templates/baseTemplate/index.html:477
|
||||
#: baseTemplate/templates/baseTemplate/index.html:478
|
||||
#: baseTemplate/templates/baseTemplate/index.html:479
|
||||
#: packages/templates/packages/createPackage.html:59
|
||||
#: packages/templates/packages/modifyPackage.html:63
|
||||
#: packages/templates/packages/createPackage.html:67
|
||||
#: packages/templates/packages/modifyPackage.html:73
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:44
|
||||
msgid "Databases"
|
||||
msgstr "数据库"
|
||||
@@ -498,8 +599,8 @@ msgstr "FTP"
|
||||
|
||||
#: baseTemplate/templates/baseTemplate/homePage.html:278
|
||||
#: baseTemplate/templates/baseTemplate/homePage.html:281
|
||||
#: packages/templates/packages/createPackage.html:67
|
||||
#: packages/templates/packages/modifyPackage.html:70
|
||||
#: packages/templates/packages/createPackage.html:75
|
||||
#: packages/templates/packages/modifyPackage.html:80
|
||||
msgid "Emails"
|
||||
msgstr "Emails"
|
||||
|
||||
@@ -524,13 +625,6 @@ msgstr "服务器状态"
|
||||
msgid "PHP Configurations"
|
||||
msgstr "设置PHP参数"
|
||||
|
||||
#: baseTemplate/templates/baseTemplate/homePage.html:331
|
||||
#: baseTemplate/templates/baseTemplate/index.html:625
|
||||
#: baseTemplate/templates/baseTemplate/index.html:627
|
||||
#: managePHP/templates/managePHP/installExtensions.html:62
|
||||
msgid "PHP"
|
||||
msgstr "PHP"
|
||||
|
||||
#: baseTemplate/templates/baseTemplate/homePage.html:340
|
||||
#: baseTemplate/templates/baseTemplate/homePage.html:343
|
||||
#: baseTemplate/templates/baseTemplate/index.html:643
|
||||
@@ -704,7 +798,7 @@ msgstr "删除网站"
|
||||
|
||||
#: baseTemplate/templates/baseTemplate/index.html:468
|
||||
#: packages/templates/packages/createPackage.html:13
|
||||
#: packages/templates/packages/createPackage.html:76
|
||||
#: packages/templates/packages/createPackage.html:84
|
||||
#: packages/templates/packages/index.html:25
|
||||
#: packages/templates/packages/index.html:27
|
||||
msgid "Create Package"
|
||||
@@ -724,7 +818,7 @@ msgstr "删除套餐"
|
||||
#: packages/templates/packages/index.html:51
|
||||
#: packages/templates/packages/modifyPackage.html:9
|
||||
#: packages/templates/packages/modifyPackage.html:15
|
||||
#: packages/templates/packages/modifyPackage.html:85
|
||||
#: packages/templates/packages/modifyPackage.html:95
|
||||
msgid "Modify Package"
|
||||
msgstr "修改套餐"
|
||||
|
||||
@@ -788,16 +882,6 @@ msgstr "删除DNS区域"
|
||||
msgid "Add/Delete Records"
|
||||
msgstr "添加/删除记录"
|
||||
|
||||
#: baseTemplate/templates/baseTemplate/index.html:514
|
||||
#: baseTemplate/templates/baseTemplate/index.html:516
|
||||
#: userManagment/templates/userManagment/createUser.html:47
|
||||
#: userManagment/templates/userManagment/modifyUser.html:54
|
||||
#: userManagment/templates/userManagment/userProfile.html:50
|
||||
#: websiteFunctions/templates/websiteFunctions/createWebsite.html:60
|
||||
#: websiteFunctions/templates/websiteFunctions/modifyWebsite.html:67
|
||||
msgid "Email"
|
||||
msgstr "Email"
|
||||
|
||||
#: baseTemplate/templates/baseTemplate/index.html:521
|
||||
#: mailServer/templates/mailServer/createEmailAccount.html:12
|
||||
#: mailServer/templates/mailServer/createEmailAccount.html:19
|
||||
@@ -825,7 +909,7 @@ msgid "Delete Email"
|
||||
msgstr "删除Email"
|
||||
|
||||
#: baseTemplate/templates/baseTemplate/index.html:523
|
||||
#: databases/templates/databases/listDataBases.html:72
|
||||
#: databases/templates/databases/listDataBases.html:73
|
||||
#: ftp/templates/ftp/listFTPAccounts.html:73
|
||||
#: mailServer/templates/mailServer/changeEmailPassword.html:64
|
||||
#: mailServer/templates/mailServer/index.html:49
|
||||
@@ -841,7 +925,8 @@ msgstr "进入Webmail"
|
||||
#: ftp/templates/ftp/createFTPAccount.html:12
|
||||
#: ftp/templates/ftp/createFTPAccount.html:19 ftp/templates/ftp/index.html:25
|
||||
#: ftp/templates/ftp/index.html:27
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:461
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:683
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:685
|
||||
msgid "Create FTP Account"
|
||||
msgstr "创建FTP用户"
|
||||
|
||||
@@ -850,7 +935,8 @@ msgstr "创建FTP用户"
|
||||
#: ftp/templates/ftp/deleteFTPAccount.html:18
|
||||
#: ftp/templates/ftp/deleteFTPAccount.html:52 ftp/templates/ftp/index.html:37
|
||||
#: ftp/templates/ftp/index.html:39
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:473
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:695
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:697
|
||||
msgid "Delete FTP Account"
|
||||
msgstr "删除FTP用户"
|
||||
|
||||
@@ -1040,7 +1126,7 @@ msgid "Create a new database on this page."
|
||||
msgstr "在此页面创建数据库"
|
||||
|
||||
#: databases/templates/databases/createDatabase.html:42
|
||||
#: databases/templates/databases/listDataBases.html:87
|
||||
#: databases/templates/databases/listDataBases.html:88
|
||||
msgid "Database Name"
|
||||
msgstr "数据库名字"
|
||||
|
||||
@@ -1105,21 +1191,27 @@ msgstr "选择域名"
|
||||
msgid "Records successfully fetched for"
|
||||
msgstr "成功读取记录"
|
||||
|
||||
#: databases/templates/databases/listDataBases.html:53
|
||||
#: databases/templates/databases/listDataBases.html:50
|
||||
#, fuzzy
|
||||
#| msgid "Password changed for"
|
||||
msgid "Password changed for: "
|
||||
msgstr "已为修改密码"
|
||||
|
||||
#: databases/templates/databases/listDataBases.html:54
|
||||
msgid "Cannot change password for "
|
||||
msgstr "无法为修改密码 "
|
||||
|
||||
#: databases/templates/databases/listDataBases.html:58
|
||||
#: databases/templates/databases/listDataBases.html:59
|
||||
#: firewall/templates/firewall/firewall.html:166
|
||||
#: ftp/templates/ftp/listFTPAccounts.html:59
|
||||
msgid "Could Not Connect to server. Please refresh this page"
|
||||
msgstr "无法连接到服务器, 请刷新此页面"
|
||||
|
||||
#: databases/templates/databases/listDataBases.html:88
|
||||
#: databases/templates/databases/listDataBases.html:89
|
||||
msgid "Database User"
|
||||
msgstr "数据库用户"
|
||||
|
||||
#: databases/templates/databases/listDataBases.html:97
|
||||
#: databases/templates/databases/listDataBases.html:98
|
||||
#: ftp/templates/ftp/listFTPAccounts.html:100
|
||||
msgid "Change"
|
||||
msgstr "修改"
|
||||
@@ -1162,6 +1254,7 @@ msgstr "优先级"
|
||||
#: dns/templates/dns/createDNSZone.html:27
|
||||
#: dns/templates/dns/createNameServer.html:27
|
||||
#: websiteFunctions/templates/websiteFunctions/createWebsite.html:52
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:263
|
||||
msgid "Domain Name"
|
||||
msgstr "域名"
|
||||
|
||||
@@ -1386,9 +1479,10 @@ msgid "Secure SSH - CyberPanel"
|
||||
msgstr "SSH加固 - CyberPanel"
|
||||
|
||||
#: firewall/templates/firewall/secureSSH.html:14
|
||||
#: managePHP/templates/managePHP/editPHPConfig.html:15
|
||||
msgid "Edit PHP Configurations on this page."
|
||||
msgstr "在此页面设置PHP参数"
|
||||
#, fuzzy
|
||||
#| msgid "SSH Configurations Saved."
|
||||
msgid "Secure or harden SSH Configurations."
|
||||
msgstr "SSH设置已保存"
|
||||
|
||||
#: firewall/templates/firewall/secureSSH.html:28
|
||||
#: managePHP/templates/managePHP/editPHPConfig.html:29
|
||||
@@ -1433,8 +1527,8 @@ msgstr "添加密钥"
|
||||
|
||||
#: firewall/templates/firewall/secureSSH.html:158
|
||||
#: websiteFunctions/templates/websiteFunctions/suspendWebsite.html:55
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:303
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:363
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:527
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:587
|
||||
msgid "Save"
|
||||
msgstr "保存"
|
||||
|
||||
@@ -1623,6 +1717,10 @@ msgstr "设置PHP参数 - CyberPanel"
|
||||
msgid "Edit PHP Configurations"
|
||||
msgstr "设置PHP参数"
|
||||
|
||||
#: managePHP/templates/managePHP/editPHPConfig.html:15
|
||||
msgid "Edit PHP Configurations on this page."
|
||||
msgstr "在此页面设置PHP参数"
|
||||
|
||||
#: managePHP/templates/managePHP/editPHPConfig.html:35
|
||||
msgid "Advanced"
|
||||
msgstr "高级"
|
||||
@@ -1633,6 +1731,7 @@ msgstr "高级"
|
||||
#: tuning/templates/tuning/phpTuning.html:28
|
||||
#: websiteFunctions/templates/websiteFunctions/createWebsite.html:68
|
||||
#: websiteFunctions/templates/websiteFunctions/modifyWebsite.html:74
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:283
|
||||
msgid "Select PHP"
|
||||
msgstr "选择PHP版本"
|
||||
|
||||
@@ -1813,38 +1912,47 @@ msgid "Package Name"
|
||||
msgstr "套餐名称"
|
||||
|
||||
#: packages/templates/packages/createPackage.html:35
|
||||
#: packages/templates/packages/modifyPackage.html:39
|
||||
#: packages/templates/packages/modifyPackage.html:40
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:223
|
||||
#, fuzzy
|
||||
#| msgid "Domain Name"
|
||||
msgid "Domains"
|
||||
msgstr "域名"
|
||||
|
||||
#: packages/templates/packages/createPackage.html:39
|
||||
#: packages/templates/packages/modifyPackage.html:44
|
||||
#, fuzzy
|
||||
#| msgid "( 0 = Unlimited )"
|
||||
msgid "(0 = Unlimited)"
|
||||
msgstr "(0为无限制 )"
|
||||
|
||||
#: packages/templates/packages/createPackage.html:43
|
||||
#: packages/templates/packages/modifyPackage.html:49
|
||||
msgid "Disk Space"
|
||||
msgstr "硬盘空间"
|
||||
|
||||
#: packages/templates/packages/createPackage.html:39
|
||||
#: packages/templates/packages/createPackage.html:47
|
||||
#: packages/templates/packages/modifyPackage.html:43
|
||||
#: packages/templates/packages/modifyPackage.html:51
|
||||
#: packages/templates/packages/createPackage.html:55
|
||||
#: packages/templates/packages/modifyPackage.html:53
|
||||
#: packages/templates/packages/modifyPackage.html:61
|
||||
msgid "MB (0 = Unlimited)"
|
||||
msgstr "MB (0为无限制)"
|
||||
|
||||
#: packages/templates/packages/createPackage.html:43
|
||||
#: packages/templates/packages/modifyPackage.html:47
|
||||
#: packages/templates/packages/createPackage.html:51
|
||||
#: packages/templates/packages/modifyPackage.html:57
|
||||
msgid "Bandwidth"
|
||||
msgstr "流量"
|
||||
|
||||
#: packages/templates/packages/createPackage.html:52
|
||||
#: packages/templates/packages/modifyPackage.html:56
|
||||
#: packages/templates/packages/createPackage.html:60
|
||||
#: packages/templates/packages/modifyPackage.html:66
|
||||
msgid "FTP Accounts"
|
||||
msgstr "FTP用户数量"
|
||||
|
||||
#: packages/templates/packages/createPackage.html:87
|
||||
#: packages/templates/packages/createPackage.html:95
|
||||
msgid "Cannot create package. Error message:"
|
||||
msgstr "无法创建套餐, 错误信息: "
|
||||
|
||||
#: packages/templates/packages/createPackage.html:91
|
||||
#: packages/templates/packages/deletePackage.html:63
|
||||
#: packages/templates/packages/modifyPackage.html:102
|
||||
msgid "Package"
|
||||
msgstr "套餐"
|
||||
|
||||
#: packages/templates/packages/createPackage.html:91
|
||||
#: packages/templates/packages/createPackage.html:99
|
||||
msgid "Successfully Created"
|
||||
msgstr "已成功创建"
|
||||
|
||||
@@ -1876,15 +1984,15 @@ msgstr "套餐 - CyberPanel"
|
||||
msgid "Modify Package - CyberPanel"
|
||||
msgstr "修改套餐 - CyberPanel"
|
||||
|
||||
#: packages/templates/packages/modifyPackage.html:94
|
||||
#: packages/templates/packages/modifyPackage.html:104
|
||||
msgid "Cannot fetch package details. Error message:"
|
||||
msgstr "无法获取套餐资料, 错误信息: "
|
||||
|
||||
#: packages/templates/packages/modifyPackage.html:98
|
||||
#: packages/templates/packages/modifyPackage.html:108
|
||||
msgid "Package Details Successfully Fetched"
|
||||
msgstr "套餐详情成功读取"
|
||||
|
||||
#: packages/templates/packages/modifyPackage.html:102
|
||||
#: packages/templates/packages/modifyPackage.html:112
|
||||
msgid "Successfully Modified"
|
||||
msgstr "已成功修改"
|
||||
|
||||
@@ -2390,14 +2498,18 @@ msgid "Select Owner"
|
||||
msgstr "选择拥有者"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/createWebsite.html:56
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:267
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:278
|
||||
msgid "Invalid Domain (Note: You don't need to add 'http' or 'https')"
|
||||
msgstr "无效域名(注意: 不需要添加http或https)"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/createWebsite.html:84
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:299
|
||||
msgid "Additional Features"
|
||||
msgstr "额外功能"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/createWebsite.html:91
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:306
|
||||
msgid ""
|
||||
"For SSL to work DNS of domain should point to server, otherwise self signed "
|
||||
"SSL will be issued, you can add your own SSL later."
|
||||
@@ -2406,14 +2518,17 @@ msgstr ""
|
||||
"之后添加自有证书或重新申请签发Let's Encrypt证书"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/createWebsite.html:113
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:328
|
||||
msgid "Cannot create website. Error message:"
|
||||
msgstr "无法创建网站, 错误信息: "
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/createWebsite.html:117
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:332
|
||||
msgid "Website with domain"
|
||||
msgstr "网站域名"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/createWebsite.html:117
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:332
|
||||
msgid " is Successfully Created"
|
||||
msgstr " 已成功创建"
|
||||
|
||||
@@ -2431,10 +2546,6 @@ msgstr "在此页面可以删除网站,此操作不可逆 "
|
||||
msgid "Cannot delete website, Error message: "
|
||||
msgstr "无法删除网站, 错误信息: "
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/deleteWebsite.html:65
|
||||
msgid "Website"
|
||||
msgstr "网站"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/deleteWebsite.html:65
|
||||
msgid "Successfully Deleted."
|
||||
msgstr "成功删除"
|
||||
@@ -2564,97 +2675,166 @@ msgstr "下一个"
|
||||
msgid "Previous"
|
||||
msgstr "上一个"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:227
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:230
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:232
|
||||
#, fuzzy
|
||||
#| msgid "Add Destination"
|
||||
msgid "Add Domains"
|
||||
msgstr "添加远程目录"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:242
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:244
|
||||
#, fuzzy
|
||||
#| msgid "Select Domain"
|
||||
msgid "List Domains"
|
||||
msgstr "选择域名"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:274
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:733
|
||||
msgid "Path"
|
||||
msgstr "路径"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:276
|
||||
msgid "This path is relative to: "
|
||||
msgstr ""
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:276
|
||||
#, fuzzy
|
||||
#| msgid "Leave empty to select default home directory."
|
||||
msgid "Leave empty to set default."
|
||||
msgstr "留空则设置为默认根目录"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:317
|
||||
#, fuzzy
|
||||
#| msgid "Create Email"
|
||||
msgid "Create Domain"
|
||||
msgstr "创建Email"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:360
|
||||
#, fuzzy
|
||||
#| msgid "Version Management"
|
||||
msgid "PHP Version Changed to:"
|
||||
msgstr "版本管理"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:364
|
||||
#, fuzzy
|
||||
#| msgid "Delete"
|
||||
msgid "Deleted:"
|
||||
msgstr "删除"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:368
|
||||
#, fuzzy
|
||||
#| msgid "SSL Issued for"
|
||||
msgid "SSL Issued:"
|
||||
msgstr "已为签发证书"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:391
|
||||
msgid "Close"
|
||||
msgstr ""
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:423
|
||||
#, fuzzy
|
||||
#| msgid "Issue SSL"
|
||||
msgid "Issue"
|
||||
msgstr "签发SSL证书"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:451
|
||||
msgid "Configurations"
|
||||
msgstr "配置"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:233
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:457
|
||||
#, fuzzy
|
||||
#| msgid "Edit vHost Main Configurations"
|
||||
msgid "Edit Virtual Host Main Configurations"
|
||||
msgstr "编辑vHost主配置"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:235
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:459
|
||||
msgid "Edit vHost Main Configurations"
|
||||
msgstr "编辑vHost主配置"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:245
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:247
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:469
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:471
|
||||
msgid "Add Rewrite Rules (.htaccess)"
|
||||
msgstr "添加Rewrite Rules (.htaccess)"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:257
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:481
|
||||
#, fuzzy
|
||||
#| msgid "Add SSL"
|
||||
msgid "Add Your Own SSL"
|
||||
msgstr "添加SSL证书"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:259
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:483
|
||||
msgid "Add SSL"
|
||||
msgstr "添加SSL证书"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:274
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:498
|
||||
msgid "SSL Saved"
|
||||
msgstr "SSL证书已保存"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:279
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:503
|
||||
msgid "Could not save SSL. Error message:"
|
||||
msgstr "无法保存SSL证书, 错误信息: "
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:329
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:553
|
||||
msgid "Current configuration in the file fetched."
|
||||
msgstr "当前配置读取成功"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:334
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:347
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:558
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:571
|
||||
msgid "Could not fetch current configuration. Error message:"
|
||||
msgstr "无法读取当前配置, 错误信息: "
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:343
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:398
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:567
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:622
|
||||
msgid "Configuration saved. Restart LiteSpeed put them in effect."
|
||||
msgstr "配置已保存, 重启LiteSpeed以生效"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:384
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:608
|
||||
msgid "Current rewrite rules in the file fetched."
|
||||
msgstr "当前Rewrite rules读取成功"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:389
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:613
|
||||
msgid "Could not fetch current rewrite rules. Error message:"
|
||||
msgstr "无法读取当前Rewrite rules, 错误信息: "
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:402
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:626
|
||||
msgid "Could not save rewrite rules. Error message:"
|
||||
msgstr "无法保存Rewrite rules, 错误信息: "
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:418
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:642
|
||||
msgid "Save Rewrite Rules"
|
||||
msgstr "保存Rewrite rules"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:441
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:665
|
||||
msgid "Files"
|
||||
msgstr "文件"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:450
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:672
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:674
|
||||
msgid "File Manager"
|
||||
msgstr "文件管理"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:490
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:713
|
||||
msgid "Application Installer"
|
||||
msgstr "应用安装器"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:498
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:719
|
||||
#, fuzzy
|
||||
#| msgid "Wordpress with LSCache"
|
||||
msgid "Install wordpress with LSCache"
|
||||
msgstr "Wordpress和LS Cache"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:721
|
||||
msgid "Wordpress with LSCache"
|
||||
msgstr "Wordpress和LS Cache"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:510
|
||||
msgid "Path"
|
||||
msgstr "路径"
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:532
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:755
|
||||
msgid "Installation failed. Error message:"
|
||||
msgstr "安装失败, 错误信息: "
|
||||
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:536
|
||||
#: websiteFunctions/templates/websiteFunctions/website.html:759
|
||||
msgid "Installation successful. To complete the setup visit:"
|
||||
msgstr "安装成功, 请访问网站以完成设置"
|
||||
|
||||
#~ msgid "Urdu"
|
||||
#~ msgstr "乌尔都语"
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,5 @@ class Administrator(models.Model):
|
||||
type = models.IntegerField()
|
||||
owner = models.IntegerField(default=1)
|
||||
|
||||
userAccountsLimit = models.IntegerField(default=0)
|
||||
websitesLimit = models.IntegerField(default=0)
|
||||
initUserAccountsLimit = models.IntegerField(default=1)
|
||||
initWebsitesLimit = models.IntegerField(default=1)
|
||||
initUserAccountsLimit = models.IntegerField(default=0)
|
||||
initWebsitesLimit = models.IntegerField(default=0)
|
||||
Binary file not shown.
@@ -121,7 +121,7 @@ def loadLoginPage(request):
|
||||
|
||||
package = Package(admin=admin, packageName="Default", diskSpace=1000,
|
||||
bandwidth=1000, ftpAccounts=1000, dataBases=1000,
|
||||
emailAccounts=1000)
|
||||
emailAccounts=1000,allowedDomains=20)
|
||||
package.save()
|
||||
|
||||
newFWRule = FirewallRules(name="panel", proto="tcp", port="8090")
|
||||
|
||||
@@ -3,7 +3,7 @@ from __future__ import unicode_literals
|
||||
|
||||
from django.shortcuts import render,redirect
|
||||
from loginSystem.views import loadLoginPage
|
||||
from websiteFunctions.models import Websites
|
||||
from websiteFunctions.models import Websites,ChildDomains
|
||||
from loginSystem.models import Administrator
|
||||
from plogical.virtualHostUtilities import virtualHostUtilities
|
||||
from plogical.sslUtilities import sslUtilities
|
||||
@@ -73,7 +73,7 @@ def issueSSL(request):
|
||||
data = json.loads(request.body)
|
||||
virtualHost = data['virtualHost']
|
||||
|
||||
website = Websites.objects.get(domain=virtualHost)
|
||||
website = ChildDomains.objects.get(domain=virtualHost)
|
||||
|
||||
srcPrivKey = "/etc/letsencrypt/live/" + virtualHost + "/privkey.pem"
|
||||
srcFullChain = "/etc/letsencrypt/live/" + virtualHost + "/fullchain.pem"
|
||||
@@ -92,7 +92,13 @@ def issueSSL(request):
|
||||
|
||||
|
||||
if not (os.path.exists(srcPrivKey) and os.path.exists(srcFullChain)):
|
||||
ssl_responce = sslUtilities.obtainSSLForADomain(virtualHost, adminEmail)
|
||||
path = ''
|
||||
try:
|
||||
path = data['path']
|
||||
except:
|
||||
path = "/home/"+virtualHost+"/public_html"
|
||||
|
||||
ssl_responce = sslUtilities.obtainSSLForADomain(virtualHost, adminEmail,path)
|
||||
if ssl_responce == 1:
|
||||
sslUtilities.installSSLForDomain(virtualHost)
|
||||
installUtilities.reStartLiteSpeed()
|
||||
@@ -136,12 +142,12 @@ def issueSSL(request):
|
||||
return HttpResponse(json_data)
|
||||
|
||||
except BaseException,msg:
|
||||
data_ret = {"SSL": 1,
|
||||
data_ret = {"SSL": 0,
|
||||
'error_message': str(msg)}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
except KeyError:
|
||||
data_ret = {"SSL": 1,
|
||||
data_ret = {"SSL": 0,
|
||||
'error_message': str(msg)}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
@@ -229,7 +235,8 @@ def obtainHostNameSSL(request):
|
||||
|
||||
|
||||
if not (os.path.exists(srcPrivKey) and os.path.exists(srcFullChain)):
|
||||
ssl_responce = sslUtilities.obtainSSLForADomain(virtualHost, adminEmail)
|
||||
path = "/home/" + virtualHost + "/public_html"
|
||||
ssl_responce = sslUtilities.obtainSSLForADomain(virtualHost, adminEmail,path)
|
||||
if ssl_responce == 1:
|
||||
sslUtilities.installSSLForDomain(virtualHost)
|
||||
installUtilities.reStartLiteSpeed()
|
||||
@@ -291,12 +298,12 @@ def obtainHostNameSSL(request):
|
||||
return HttpResponse(json_data)
|
||||
|
||||
except BaseException,msg:
|
||||
data_ret = {"SSL": 1,
|
||||
data_ret = {"SSL": 0,
|
||||
'error_message': str(msg)}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
except KeyError:
|
||||
data_ret = {"SSL": 1,
|
||||
data_ret = {"SSL": 0,
|
||||
'error_message': str(msg)}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
@@ -14,3 +14,4 @@ class Package(models.Model):
|
||||
emailAccounts = models.IntegerField(null=True)
|
||||
dataBases = models.IntegerField(default=0)
|
||||
ftpAccounts = models.IntegerField(default=0)
|
||||
allowedDomains = models.IntegerField(default=0)
|
||||
|
||||
Binary file not shown.
@@ -62,7 +62,8 @@ app.controller('createPackage', function($scope,$http) {
|
||||
bandwidth: bandwidth,
|
||||
ftpAccounts: ftpAccounts,
|
||||
dataBases: dataBases,
|
||||
emails:emails
|
||||
emails:emails,
|
||||
allowedDomains:$scope.allowedDomains
|
||||
};
|
||||
|
||||
var config = {
|
||||
@@ -238,6 +239,7 @@ app.controller('modifyPackages', function($scope,$http) {
|
||||
$scope.ftpAccounts = response.data.ftpAccounts;
|
||||
$scope.dataBases = response.data.dataBases;
|
||||
$scope.emails = response.data.emails;
|
||||
$scope.allowedDomains = response.data.allowedDomains;
|
||||
|
||||
$scope.modifyButton = "Save Details"
|
||||
|
||||
@@ -285,7 +287,8 @@ app.controller('modifyPackages', function($scope,$http) {
|
||||
bandwidth:bandwidth,
|
||||
ftpAccounts:ftpAccounts,
|
||||
dataBases:dataBases,
|
||||
emails:emails
|
||||
emails:emails,
|
||||
allowedDomains:$scope.allowedDomains,
|
||||
};
|
||||
|
||||
var config = {
|
||||
|
||||
@@ -31,6 +31,14 @@
|
||||
<div class="current-pack">{{ admin }}_{$ packageName $}</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Domains" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input name="dspace" type="number" class="form-control" ng-model="allowedDomains" required>
|
||||
</div>
|
||||
<div class="current-pack"> {% trans "(0 = Unlimited)" %} </div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Disk Space" %}</label>
|
||||
<div class="col-sm-6">
|
||||
|
||||
@@ -35,6 +35,16 @@
|
||||
<!------ Modification form that appears after a click --------------->
|
||||
|
||||
<div id="packageDetailsToBeModified">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Domains" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" ng-model="allowedDomains" required>
|
||||
</div>
|
||||
<div class="current-pack"> {% trans "(0 = Unlimited)" %} </div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Disk Space" %}</label>
|
||||
<div class="col-sm-6">
|
||||
|
||||
@@ -74,6 +74,7 @@ def submitPackage(request):
|
||||
packageDatabases = int(data['dataBases'])
|
||||
ftpAccounts = int(data['ftpAccounts'])
|
||||
emails = int(data['emails'])
|
||||
allowedDomains = int(data['allowedDomains'])
|
||||
|
||||
|
||||
admin = Administrator.objects.get(pk=request.session['userID'])
|
||||
@@ -81,7 +82,7 @@ def submitPackage(request):
|
||||
packageName = admin.userName+"_"+packageName
|
||||
|
||||
package = Package(admin=admin, packageName=packageName, diskSpace=packageSpace,
|
||||
bandwidth=packageBandwidth, ftpAccounts=ftpAccounts, dataBases=packageDatabases,emailAccounts=emails)
|
||||
bandwidth=packageBandwidth, ftpAccounts=ftpAccounts, dataBases=packageDatabases,emailAccounts=emails,allowedDomains=allowedDomains)
|
||||
|
||||
package.save()
|
||||
|
||||
@@ -171,7 +172,7 @@ def submitModify(request):
|
||||
emails = modifyPack.emailAccounts
|
||||
|
||||
data_ret = {'emails':emails,'modifyStatus': 1,'error_message': "None",
|
||||
"diskSpace":diskSpace,"bandwidth":bandwidth,"ftpAccounts":ftpAccounts,"dataBases":dataBases}
|
||||
"diskSpace":diskSpace,"bandwidth":bandwidth,"ftpAccounts":ftpAccounts,"dataBases":dataBases,"allowedDomains":modifyPack.allowedDomains}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
@@ -201,6 +202,7 @@ def saveChanges(request):
|
||||
modifyPack.ftpAccounts = data['ftpAccounts']
|
||||
modifyPack.dataBases = data['dataBases']
|
||||
modifyPack.emailAccounts = data['emails']
|
||||
modifyPack.allowedDomains = data['allowedDomains']
|
||||
modifyPack.save()
|
||||
|
||||
data_ret = {'saveStatus': 1,'error_message': "None"}
|
||||
|
||||
@@ -10,7 +10,7 @@ import tarfile
|
||||
from multiprocessing import Process
|
||||
import json
|
||||
import requests
|
||||
|
||||
import signal
|
||||
|
||||
|
||||
class backupUtilities:
|
||||
@@ -27,18 +27,25 @@ class backupUtilities:
|
||||
status.close()
|
||||
|
||||
count = 0
|
||||
dbCheck = 0
|
||||
for items in meta:
|
||||
if count==0:
|
||||
domainName = items.strip('\n')
|
||||
domainName = items.split('-')[0]
|
||||
make_archive(tempStoragePath+"/public_html", 'gztar', "/home/"+domainName+"/public_html")
|
||||
count = count + 1
|
||||
else:
|
||||
dbName = items.split('-')[0]
|
||||
status = open(backupPath + 'status', "w")
|
||||
status.write(backupName + "\n")
|
||||
status.write("Backing up database: "+dbName)
|
||||
status.close()
|
||||
mysqlUtilities.mysqlUtilities.createDatabaseBackup(dbName,tempStoragePath)
|
||||
if items.find("Databases")>-1:
|
||||
dbCheck = 1
|
||||
continue
|
||||
|
||||
if dbCheck == 1:
|
||||
dbName = items.split('-')[0]
|
||||
status = open(backupPath + 'status', "w")
|
||||
status.write(backupName + "\n")
|
||||
status.write("Backing up database: " + dbName)
|
||||
status.close()
|
||||
mysqlUtilities.mysqlUtilities.createDatabaseBackup(dbName, tempStoragePath)
|
||||
|
||||
|
||||
make_archive(backupPath+"/"+backupName, 'gztar', tempStoragePath)
|
||||
rmtree(tempStoragePath)
|
||||
@@ -122,7 +129,7 @@ class backupUtilities:
|
||||
|
||||
try:
|
||||
finalData = json.dumps({'backupFile': backupName,"dir":dir})
|
||||
r = requests.post("http://localhost:5003/websites/CreateWebsiteFromBackup", data=finalData)
|
||||
r = requests.post("http://localhost:5003/websites/CreateWebsiteFromBackup", data=finalData,verify=False)
|
||||
data = json.loads(r.text)
|
||||
|
||||
if data['createWebSiteStatus'] == 1:
|
||||
@@ -140,9 +147,6 @@ class backupUtilities:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [startRestore]")
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
|
||||
f = open(completPath + '/status')
|
||||
data = f.read()
|
||||
status = data.split('\n', 1)[0]
|
||||
@@ -152,23 +156,80 @@ class backupUtilities:
|
||||
elif (status == "Website already exists"):
|
||||
return 0
|
||||
|
||||
## reading meta file to create databases
|
||||
########### creating sub/addon/parked domains
|
||||
|
||||
status = open(completPath + '/status', "w")
|
||||
status.write("Creating Child Domains")
|
||||
status.close()
|
||||
|
||||
## reading meta file to create subdomains
|
||||
|
||||
data = open(completPath + "/meta", 'r').readlines()
|
||||
|
||||
## extracting master domain for later use
|
||||
|
||||
masterDomain = data[0].split('-')[0]
|
||||
websiteHome = "/home/" + masterDomain + "/public_html"
|
||||
|
||||
|
||||
try:
|
||||
childDomainsCheck = 0
|
||||
for items in data:
|
||||
if items.find("Child Domains") > -1:
|
||||
childDomainsCheck = 1
|
||||
continue
|
||||
if items.find("Databases") > -1:
|
||||
break
|
||||
|
||||
if childDomainsCheck == 1:
|
||||
domain = items.split('-')[0]
|
||||
phpSelection = items.split('-')[1]
|
||||
path = items.split('-')[2].strip("\n")
|
||||
|
||||
|
||||
finalData = json.dumps({'masterDomain': masterDomain, 'domainName': domain,'phpSelection': phpSelection,'path': path,'ssl':0,'restore':1})
|
||||
r = requests.post("http://localhost:5003/websites/submitDomainCreation", data=finalData,
|
||||
verify=False)
|
||||
|
||||
data = json.loads(r.text)
|
||||
|
||||
if data['createWebSiteStatus'] == 1:
|
||||
rmtree(path)
|
||||
continue
|
||||
else:
|
||||
status = open(completPath + '/status', "w")
|
||||
status.write("Not able to create Account and databases, aborting.")
|
||||
status.close()
|
||||
logging.CyberCPLogFileWriter.writeToFile(r.text)
|
||||
return 0
|
||||
|
||||
|
||||
except BaseException, msg:
|
||||
status = open(completPath + '/status', "w")
|
||||
status.write("[201] Not able to create Account and databases, aborting.")
|
||||
status.close()
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [startRestore]")
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
|
||||
## restoring databases
|
||||
|
||||
data = open(completPath + "/meta", 'r').readlines()
|
||||
domain = data[0].strip('\n')
|
||||
websiteHome = "/home/" + domain + "/public_html"
|
||||
|
||||
check = 0
|
||||
|
||||
status = open(completPath + '/status', "w")
|
||||
status.write("Restoring Databases")
|
||||
status.close()
|
||||
|
||||
dbCheck = 0
|
||||
|
||||
for items in data:
|
||||
if check == 0:
|
||||
check = check + 1
|
||||
if items.find("Databases") > -1:
|
||||
dbCheck = 1
|
||||
continue
|
||||
else:
|
||||
if dbCheck == 1:
|
||||
dbData = items.split('-')
|
||||
mysqlUtilities.mysqlUtilities.restoreDatabaseBackup(dbData[0], completPath, dbData[2].strip('\n'))
|
||||
|
||||
@@ -338,13 +399,16 @@ class backupUtilities:
|
||||
else:
|
||||
return 0
|
||||
except BaseException, msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + "[checkIfPostIsUp]")
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + "[checkIfHostIsUp]")
|
||||
|
||||
@staticmethod
|
||||
def checkConnection(IPAddress):
|
||||
|
||||
|
||||
try:
|
||||
|
||||
backupUtilities.verifyHostKey(IPAddress)
|
||||
|
||||
expectation = []
|
||||
expectation.append("password:")
|
||||
expectation.append("Last login")
|
||||
@@ -355,44 +419,90 @@ class backupUtilities:
|
||||
|
||||
if index == 0:
|
||||
subprocess.call(['kill', str(checkConn.pid)])
|
||||
return 0
|
||||
return [0,"Remote Server is not able to authenticate for transfer to initiate."]
|
||||
elif index == 1:
|
||||
subprocess.call(['kill', str(checkConn.pid)])
|
||||
return 1
|
||||
return [1, "None"]
|
||||
else:
|
||||
subprocess.call(['kill', str(checkConn.pid)])
|
||||
return 0
|
||||
return [0, "Remote Server is not able to authenticate for transfer to initiate."]
|
||||
|
||||
except pexpect.TIMEOUT, msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [checkConnection]")
|
||||
return 0
|
||||
logging.CyberCPLogFileWriter.writeToFile("Timeout "+IPAddress+ " [checkConnection]")
|
||||
return [0, "371 Timeout while making connection to this server [checkConnection]"]
|
||||
except pexpect.EOF, msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [checkConnection]")
|
||||
return 0
|
||||
logging.CyberCPLogFileWriter.writeToFile("EOF "+IPAddress+ "[checkConnection]")
|
||||
return [0, "374 Remote Server is not able to authenticate for transfer to initiate. [checkConnection]"]
|
||||
except BaseException, msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [checkConnection]")
|
||||
return 0
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg)+" " +IPAddress+ " [checkConnection]")
|
||||
return [0, "377 Remote Server is not able to authenticate for transfer to initiate. [checkConnection]"]
|
||||
|
||||
@staticmethod
|
||||
def verifyHostKey(IPAddress):
|
||||
|
||||
try:
|
||||
backupUtilities.host_key_verification(IPAddress)
|
||||
|
||||
expectation = "continue connecting (yes/no)?"
|
||||
password = "hello" ## dumb password, not used anywhere.
|
||||
|
||||
expectation = []
|
||||
|
||||
expectation.append("continue connecting (yes/no)?")
|
||||
expectation.append("password:")
|
||||
|
||||
setupSSHKeys = pexpect.spawn("ssh root@" + IPAddress)
|
||||
|
||||
index = setupSSHKeys.expect(expectation)
|
||||
|
||||
if index == 0:
|
||||
setupSSHKeys.sendline("yes")
|
||||
|
||||
setupSSHKeys.expect("password:")
|
||||
setupSSHKeys.sendline(password)
|
||||
|
||||
expectation = []
|
||||
|
||||
expectation.append("password:")
|
||||
expectation.append(pexpect.EOF)
|
||||
|
||||
|
||||
innerIndex = setupSSHKeys.expect(expectation)
|
||||
|
||||
if innerIndex == 0:
|
||||
setupSSHKeys.kill(signal.SIGTERM)
|
||||
return [1, "None"]
|
||||
elif innerIndex == 1:
|
||||
setupSSHKeys.kill(signal.SIGTERM)
|
||||
return [1, "None"]
|
||||
|
||||
elif index == 1:
|
||||
|
||||
setupSSHKeys.expect("password:")
|
||||
setupSSHKeys.sendline(password)
|
||||
|
||||
expectation = []
|
||||
|
||||
expectation.append("password:")
|
||||
expectation.append(pexpect.EOF)
|
||||
|
||||
innerIndex = setupSSHKeys.expect(expectation)
|
||||
|
||||
if innerIndex == 0:
|
||||
setupSSHKeys.kill(signal.SIGTERM)
|
||||
return [1, "None"]
|
||||
elif innerIndex == 1:
|
||||
setupSSHKeys.kill(signal.SIGTERM)
|
||||
return [1, "None"]
|
||||
|
||||
verifyHostKey = pexpect.spawn("ssh -i /root/.ssh/cyberpanel root@" + IPAddress, timeout=3)
|
||||
verifyHostKey.expect(expectation)
|
||||
verifyHostKey.sendline("yes")
|
||||
|
||||
except pexpect.TIMEOUT, msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile("Timeout [verifyHostKey]")
|
||||
return 0
|
||||
return [0,"Timeout [verifyHostKey]"]
|
||||
except pexpect.EOF, msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile("EOF [verifyHostKey]")
|
||||
return 0
|
||||
return [0,"EOF [verifyHostKey]"]
|
||||
except BaseException, msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [verifyHostKey]")
|
||||
return 0
|
||||
return [0,str(msg)+" [verifyHostKey]"]
|
||||
|
||||
|
||||
@staticmethod
|
||||
|
||||
@@ -197,87 +197,88 @@ class remoteBackup:
|
||||
|
||||
for backup in os.listdir(backupDir):
|
||||
|
||||
writeToFile = open(backupLogPath, "a")
|
||||
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " Starting restore for: "+backup+".\n")
|
||||
|
||||
writeToFile.close()
|
||||
|
||||
if backup.endswith(ext):
|
||||
finalData = json.dumps({'backupFile': backup,"dir":dir})
|
||||
r = requests.post("http://localhost:5003/backup/submitRestore", data=finalData)
|
||||
data = json.loads(r.text)
|
||||
writeToFile = open(backupLogPath, "a")
|
||||
|
||||
if data['restoreStatus'] == 1:
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " Starting restore for: "+backup+".\n")
|
||||
|
||||
while (1):
|
||||
finalData = json.dumps({'backupFile': backup, "dir": dir})
|
||||
r = requests.post("http://localhost:5003/backup/restoreStatus", data=finalData)
|
||||
data = json.loads(r.text)
|
||||
writeToFile.close()
|
||||
|
||||
logging.CyberCPLogFileWriter.writeToFile(r.text)
|
||||
if backup.endswith(ext):
|
||||
finalData = json.dumps({'backupFile': backup,"dir":dir})
|
||||
r = requests.post("http://localhost:5003/backup/submitRestore", data=finalData,verify=False)
|
||||
data = json.loads(r.text)
|
||||
|
||||
if data['status'] == "Done":
|
||||
writeToFile = open(backupLogPath, "a")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " Restore Completed.\n")
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " #########################################\n")
|
||||
writeToFile.close()
|
||||
break
|
||||
elif data['status'] == "Website already exists":
|
||||
writeToFile = open(backupLogPath, "a")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " Website associated with this backup already exists.\n")
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " #########################################\n")
|
||||
writeToFile.close()
|
||||
logging.CyberCPLogFileWriter.writeToFile(
|
||||
"Website associated with this backup already exists")
|
||||
break
|
||||
elif data['status'] == 0:
|
||||
time.sleep(2)
|
||||
if data['restoreStatus'] == 1:
|
||||
|
||||
writeToFile = open(backupLogPath, "a")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " Waiting for restore to complete.\n")
|
||||
writeToFile.close()
|
||||
while (1):
|
||||
finalData = json.dumps({'backupFile': backup, "dir": dir})
|
||||
r = requests.post("http://localhost:5003/backup/restoreStatus", data=finalData,verify=False)
|
||||
data = json.loads(r.text)
|
||||
|
||||
pass
|
||||
elif data['status'] == "Not able to create Account and databases, aborting.":
|
||||
writeToFile = open(backupLogPath, "a")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " Not able to create Account and databases, aborting.\n")
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " #########################################\n")
|
||||
writeToFile.close()
|
||||
logging.CyberCPLogFileWriter.writeToFile(
|
||||
"Not able to create Account and databases, aborting.")
|
||||
break
|
||||
else:
|
||||
time.sleep(3)
|
||||
logging.CyberCPLogFileWriter.writeToFile(r.text)
|
||||
|
||||
writeToFile = open(backupLogPath, "a")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " Waiting for restore to complete.\n")
|
||||
writeToFile.close()
|
||||
if data['status'] == "Done":
|
||||
writeToFile = open(backupLogPath, "a")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " Restore Completed.\n")
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " #########################################\n")
|
||||
writeToFile.close()
|
||||
break
|
||||
elif data['status'] == "Website already exists":
|
||||
writeToFile = open(backupLogPath, "a")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " Website associated with this backup already exists.\n")
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " #########################################\n")
|
||||
writeToFile.close()
|
||||
logging.CyberCPLogFileWriter.writeToFile(
|
||||
"Website associated with this backup already exists")
|
||||
break
|
||||
elif data['status'] == 0:
|
||||
time.sleep(2)
|
||||
|
||||
pass
|
||||
else:
|
||||
logging.CyberCPLogFileWriter.writeToFile("Could not start restore process for: "+backup)
|
||||
writeToFile = open(backupLogPath, "a")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " Waiting for restore to complete.\n")
|
||||
writeToFile.close()
|
||||
|
||||
pass
|
||||
elif data['status'] == "Not able to create Account and databases, aborting.":
|
||||
writeToFile = open(backupLogPath, "a")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " Not able to create Account and databases, aborting.\n")
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " #########################################\n")
|
||||
writeToFile.close()
|
||||
logging.CyberCPLogFileWriter.writeToFile(
|
||||
"Not able to create Account and databases, aborting.")
|
||||
break
|
||||
else:
|
||||
time.sleep(3)
|
||||
|
||||
writeToFile = open(backupLogPath, "a")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " Waiting for restore to complete.\n")
|
||||
writeToFile.close()
|
||||
|
||||
pass
|
||||
else:
|
||||
logging.CyberCPLogFileWriter.writeToFile("Could not start restore process for: "+backup)
|
||||
|
||||
writeToFile = open(backupLogPath, "a")
|
||||
|
||||
@@ -360,13 +361,13 @@ class remoteBackup:
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " Backup started for: " + virtualHost + "\n")
|
||||
|
||||
finalData = json.dumps({'websiteToBeBacked': virtualHost})
|
||||
r = requests.post("http://localhost:5003/backup/submitBackupCreation", data=finalData)
|
||||
r = requests.post("http://localhost:5003/backup/submitBackupCreation", data=finalData,verify=False)
|
||||
data = json.loads(r.text)
|
||||
backupPath = data['tempStorage']
|
||||
|
||||
|
||||
while (1):
|
||||
r = requests.post("http://localhost:5003/backup/backupStatus", data= finalData)
|
||||
r = requests.post("http://localhost:5003/backup/backupStatus", data= finalData,verify=False)
|
||||
time.sleep(2)
|
||||
data = json.loads(r.text)
|
||||
|
||||
@@ -428,7 +429,7 @@ class remoteBackup:
|
||||
|
||||
|
||||
finalData = json.dumps({'websiteToBeBacked': virtualHost})
|
||||
r = requests.post("http://localhost:5003/backup/submitBackupCreation", data=finalData)
|
||||
r = requests.post("http://localhost:5003/backup/submitBackupCreation", data=finalData,verify=False)
|
||||
|
||||
data = json.loads(r.text)
|
||||
|
||||
@@ -438,7 +439,7 @@ class remoteBackup:
|
||||
|
||||
|
||||
while (1):
|
||||
r = requests.post("http://localhost:5003/backup/backupStatus", data= finalData)
|
||||
r = requests.post("http://localhost:5003/backup/backupStatus", data= finalData,verify=False)
|
||||
time.sleep(2)
|
||||
data = json.loads(r.text)
|
||||
|
||||
@@ -513,18 +514,25 @@ class remoteBackup:
|
||||
writeToFile.writelines("\n")
|
||||
writeToFile.writelines("\n")
|
||||
|
||||
writeToFile.close()
|
||||
|
||||
## fix yes/no
|
||||
|
||||
backupUtil.backupUtilities.verifyHostKey(ipAddress)
|
||||
verify = backupUtil.backupUtilities.verifyHostKey(ipAddress)
|
||||
|
||||
## if verification failed, return with error message
|
||||
|
||||
if verify[0] == 1:
|
||||
pass
|
||||
else:
|
||||
return [0,verify[1]]
|
||||
|
||||
|
||||
if backupUtil.backupUtilities.checkIfHostIsUp(ipAddress) == 1:
|
||||
if backupUtil.backupUtilities.checkConnection(ipAddress) != 1:
|
||||
checkConn = backupUtil.backupUtilities.checkConnection(ipAddress)
|
||||
if checkConn[0] == 0:
|
||||
writeToFile.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " Connection to:" + ipAddress + " Failed, please resetup this destination from CyberPanel, aborting." + "\n")
|
||||
return [0, "Connection check failed"]
|
||||
return [0, checkConn[1]]
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
@@ -532,6 +540,8 @@ class remoteBackup:
|
||||
"%I-%M-%S-%a-%b-%Y") + "]" + " Host:" + ipAddress + " is down, aborting." + "\n")
|
||||
return [0, "Host is down"]
|
||||
|
||||
writeToFile.close()
|
||||
|
||||
|
||||
p = Process(target=remoteBackup.backupProcess, args=(ipAddress, destination, backupLogPath,dir,accountsToTransfer))
|
||||
p.start()
|
||||
@@ -543,6 +553,6 @@ class remoteBackup:
|
||||
return [1, None]
|
||||
|
||||
except BaseException, msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [postRemoteTransfer]")
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [remoteTransfer]")
|
||||
return [0, msg]
|
||||
|
||||
|
||||
@@ -134,12 +134,10 @@ class sslUtilities:
|
||||
|
||||
|
||||
@staticmethod
|
||||
def obtainSSLForADomain(virtualHostName,adminEmail):
|
||||
def obtainSSLForADomain(virtualHostName,adminEmail,sslpath):
|
||||
|
||||
try:
|
||||
|
||||
sslpath = "/home/" + virtualHostName + "/public_html"
|
||||
|
||||
#if virtualHostName.count(".")==1:
|
||||
# command = "certbot certonly -n --agree-tos --email " + adminEmail + " --webroot -w " + sslpath + " -d " + virtualHostName + " -d www." + virtualHostName
|
||||
#else:
|
||||
|
||||
@@ -1,29 +1,77 @@
|
||||
import requests
|
||||
import json
|
||||
def editWPFile():
|
||||
import pexpect
|
||||
from CyberCPLogFileWriter import CyberCPLogFileWriter as logging
|
||||
import time
|
||||
from backupUtilities import backupUtilities
|
||||
import signal
|
||||
|
||||
finalData = json.dumps({'adminUser': "admin",
|
||||
'adminPass': "1234567",
|
||||
'domainName': "usmannasir.me",
|
||||
'ownerEmail': "admin",
|
||||
'packageName': "Default",
|
||||
'websiteOwner': "usman",
|
||||
'ownerPassword': "9xvps",
|
||||
})
|
||||
r = requests.post("http://147.135.165.44:8090/api/createWebsite", data=finalData)
|
||||
print r.text
|
||||
def verifyHostKey(IPAddress):
|
||||
try:
|
||||
backupUtilities.host_key_verification(IPAddress)
|
||||
|
||||
def delwebsite():
|
||||
password = "hello"
|
||||
|
||||
finalData = json.dumps({'adminUser': "admin",
|
||||
'adminPass': "9njZ9Hw6QuJvw4AS6w",
|
||||
})
|
||||
r = requests.post("https://cyberpanel.extravm.com:8090/api/verifyConn", data=finalData)
|
||||
print r.text
|
||||
expectation = []
|
||||
|
||||
expectation.append("continue connecting (yes/no)?")
|
||||
expectation.append("password:")
|
||||
|
||||
setupSSHKeys = pexpect.spawn("ssh root@" + IPAddress)
|
||||
|
||||
index = setupSSHKeys.expect(expectation)
|
||||
|
||||
if index == 0:
|
||||
setupSSHKeys.sendline("yes")
|
||||
|
||||
setupSSHKeys.expect("password:")
|
||||
setupSSHKeys.sendline(password)
|
||||
|
||||
expectation = []
|
||||
|
||||
expectation.append("password:")
|
||||
expectation.append(pexpect.EOF)
|
||||
|
||||
|
||||
def getKey(ipAddress, password):
|
||||
return requests.get('https://api.ipify.org').text
|
||||
innerIndex = setupSSHKeys.expect(expectation)
|
||||
|
||||
if innerIndex == 0:
|
||||
setupSSHKeys.kill(signal.SIGTERM)
|
||||
return [1, "None"]
|
||||
elif innerIndex == 1:
|
||||
setupSSHKeys.kill(signal.SIGTERM)
|
||||
return [1, "None"]
|
||||
|
||||
elif index == 1:
|
||||
|
||||
setupSSHKeys.expect("password:")
|
||||
setupSSHKeys.sendline(password)
|
||||
|
||||
expectation = []
|
||||
|
||||
expectation.append("password:")
|
||||
expectation.append(pexpect.EOF)
|
||||
|
||||
innerIndex = setupSSHKeys.expect(expectation)
|
||||
|
||||
if innerIndex == 0:
|
||||
setupSSHKeys.kill(signal.SIGTERM)
|
||||
return [1, "None"]
|
||||
elif innerIndex == 1:
|
||||
setupSSHKeys.kill(signal.SIGTERM)
|
||||
return [1, "None"]
|
||||
|
||||
|
||||
print getKey("147.135.165.44","1234567")
|
||||
except pexpect.TIMEOUT, msg:
|
||||
logging.writeToFile("Timeout [verifyHostKey]")
|
||||
return [0,"Timeout [verifyHostKey]"]
|
||||
except pexpect.EOF, msg:
|
||||
logging.writeToFile("EOF [verifyHostKey]")
|
||||
return [0,"EOF [verifyHostKey]"]
|
||||
except BaseException, msg:
|
||||
logging.writeToFile(str(msg) + " [verifyHostKey]")
|
||||
return [0,str(msg)+" [verifyHostKey]"]
|
||||
|
||||
|
||||
|
||||
print verifyHostKey("23.95.216.56")
|
||||
@@ -65,6 +65,106 @@ class virtualHostUtilities:
|
||||
return 0
|
||||
|
||||
|
||||
@staticmethod
|
||||
def perHostVirtualConf(vhFile, administratorEmail, phpVersion):
|
||||
|
||||
# General Configurations tab
|
||||
|
||||
try:
|
||||
confFile = open(vhFile, "w+")
|
||||
|
||||
docRoot = "docRoot $VH_ROOT/public_html" + "\n"
|
||||
vhDomain = "vhDomain $VH_NAME" + "\n"
|
||||
adminEmails = "adminEmails " + administratorEmail + "\n"
|
||||
enableGzip = "enableGzip 1" + "\n"
|
||||
enableIpGeo = "enableIpGeo 1" + "\n" + "\n"
|
||||
|
||||
confFile.writelines(docRoot)
|
||||
confFile.writelines(vhDomain)
|
||||
confFile.writelines(adminEmails)
|
||||
confFile.writelines(enableGzip)
|
||||
confFile.writelines(enableIpGeo)
|
||||
|
||||
# Index file settings
|
||||
|
||||
index = "index {" + "\n"
|
||||
userServer = " useServer 0" + "\n"
|
||||
indexFiles = " indexFiles index.php, index.html" + "\n"
|
||||
index_end = "}" + "\n" + "\n"
|
||||
|
||||
confFile.writelines(index)
|
||||
confFile.writelines(userServer)
|
||||
confFile.writelines(indexFiles)
|
||||
confFile.writelines(index_end)
|
||||
|
||||
# Error Log Settings
|
||||
|
||||
|
||||
error_log = "errorlog $VH_ROOT/logs/$VH_NAME.error_log {" + "\n"
|
||||
useServer = " useServer 0" + "\n"
|
||||
logLevel = " logLevel ERROR" + "\n"
|
||||
rollingSize = " rollingSize 10M" + "\n"
|
||||
error_log_end = "}" + "\n" + "\n"
|
||||
|
||||
confFile.writelines(error_log)
|
||||
confFile.writelines(useServer)
|
||||
confFile.writelines(logLevel)
|
||||
confFile.writelines(rollingSize)
|
||||
confFile.writelines(error_log_end)
|
||||
|
||||
# Access Log Settings
|
||||
|
||||
access_Log = "accesslog $VH_ROOT/logs/$VH_NAME.access_log {" + "\n"
|
||||
useServer = " useServer 0" + "\n"
|
||||
logFormat = ' logFormat "%v %h %l %u %t \"%r\" %>s %b"' + "\n"
|
||||
logHeaders = " logHeaders 5" + "\n"
|
||||
rollingSize = " rollingSize 10M" + "\n"
|
||||
keepDays = " keepDays 10"
|
||||
compressArchive = " compressArchive 1" + "\n"
|
||||
access_Log_end = "}" + "\n" + "\n"
|
||||
|
||||
confFile.writelines(access_Log)
|
||||
confFile.writelines(useServer)
|
||||
confFile.writelines(logFormat)
|
||||
confFile.writelines(logHeaders)
|
||||
confFile.writelines(rollingSize)
|
||||
confFile.writelines(keepDays)
|
||||
confFile.writelines(compressArchive)
|
||||
confFile.writelines(access_Log_end)
|
||||
|
||||
# php settings
|
||||
|
||||
scripthandler = "scripthandler {" + "\n"
|
||||
add = ""
|
||||
php_end = "}" + "\n" + "\n"
|
||||
|
||||
if phpVersion == "PHP 5.3":
|
||||
add = " add lsapi:php53 php" + "\n"
|
||||
elif phpVersion == "PHP 5.4":
|
||||
add = " add lsapi:php54 php" + "\n"
|
||||
elif phpVersion == "PHP 5.5":
|
||||
add = " add lsapi:php55 php" + "\n"
|
||||
elif phpVersion == "PHP 5.6":
|
||||
add = " add lsapi:php56 php" + "\n"
|
||||
elif phpVersion == "PHP 7.0":
|
||||
add = " add lsapi:php70 php" + "\n"
|
||||
elif phpVersion == "PHP 7.1":
|
||||
add = " add lsapi:php71 php" + "\n"
|
||||
|
||||
confFile.writelines(scripthandler)
|
||||
confFile.writelines(add)
|
||||
confFile.writelines(php_end)
|
||||
|
||||
confFile.close()
|
||||
|
||||
except BaseException, msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(
|
||||
str(msg) + " [IO Error with per host config file [perHostVirtualConf]]")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@staticmethod
|
||||
def createConfigInMainVirtualHostFile(virtualHostName):
|
||||
|
||||
@@ -127,18 +227,70 @@ class virtualHostUtilities:
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@staticmethod
|
||||
def createDirectoryForDomain(masterDomain, domain, phpVersion, path, administratorEmail):
|
||||
|
||||
confPath = virtualHostUtilities.Server_root + "/conf/vhosts/" + domain
|
||||
completePathToConfigFile = confPath + "/vhost.conf"
|
||||
|
||||
try:
|
||||
os.makedirs(path)
|
||||
except OSError, msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(
|
||||
str(msg) + " [Not able to directories for virtual host [createDirectoryForDomain]]")
|
||||
|
||||
try:
|
||||
os.makedirs(confPath)
|
||||
except OSError, msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(
|
||||
str(msg) + " [Not able to directories for virtual host [createDirectoryForDomain]]")
|
||||
|
||||
try:
|
||||
file = open(completePathToConfigFile, "w+")
|
||||
except IOError, msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [createDirectoryForDomain]]")
|
||||
return 0
|
||||
|
||||
try:
|
||||
uid = pwd.getpwnam("lsadm").pw_uid
|
||||
gid = grp.getgrnam("lsadm").gr_gid
|
||||
os.chown(confPath, uid, gid)
|
||||
os.chown(completePathToConfigFile, uid, gid)
|
||||
|
||||
uid = pwd.getpwnam("nobody").pw_uid
|
||||
gid = grp.getgrnam("nobody").gr_gid
|
||||
|
||||
os.chown("/home", uid, gid)
|
||||
os.chown(path, uid, gid)
|
||||
|
||||
except BaseException, msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [createDirectoryForDomain]]")
|
||||
|
||||
if virtualHostUtilities.perHostDomainConf(path, masterDomain, domain, completePathToConfigFile,
|
||||
administratorEmail, phpVersion) == 1:
|
||||
return 1
|
||||
else:
|
||||
return 0
|
||||
|
||||
@staticmethod
|
||||
def perHostVirtualConf(vhFile,administratorEmail, phpVersion):
|
||||
def perHostDomainConf(path, masterDomain, domain, vhFile, administratorEmail, phpVersion):
|
||||
|
||||
# General Configurations tab
|
||||
|
||||
# virtualhost project.cyberpersons.com {
|
||||
# vhRoot / home / project.cyberpersons.com
|
||||
# configFile $SERVER_ROOT / conf / vhosts /$VH_NAME / vhconf.conf
|
||||
# allowSymbolLink 1
|
||||
# enableScript 1
|
||||
# restrained 1
|
||||
# }
|
||||
|
||||
try:
|
||||
confFile = open(vhFile, "w+")
|
||||
|
||||
docRoot = "docRoot $VH_ROOT/public_html" + "\n"
|
||||
docRoot = "docRoot " + path + "\n"
|
||||
vhDomain = "vhDomain $VH_NAME" + "\n"
|
||||
adminEmails = "adminEmails "+ administratorEmail + "\n"
|
||||
adminEmails = "adminEmails " + administratorEmail + "\n"
|
||||
enableGzip = "enableGzip 1" + "\n"
|
||||
enableIpGeo = "enableIpGeo 1" + "\n" + "\n"
|
||||
|
||||
@@ -148,11 +300,10 @@ class virtualHostUtilities:
|
||||
confFile.writelines(enableGzip)
|
||||
confFile.writelines(enableIpGeo)
|
||||
|
||||
|
||||
# Index file settings
|
||||
|
||||
index = "index {" + "\n"
|
||||
userServer= " useServer 0" + "\n"
|
||||
userServer = " useServer 0" + "\n"
|
||||
indexFiles = " indexFiles index.php, index.html" + "\n"
|
||||
index_end = "}" + "\n" + "\n"
|
||||
|
||||
@@ -164,7 +315,7 @@ class virtualHostUtilities:
|
||||
# Error Log Settings
|
||||
|
||||
|
||||
error_log = "errorlog $VH_ROOT/logs/$VH_NAME.error_log {" + "\n"
|
||||
error_log = "errorlog $VH_ROOT/logs/" + masterDomain + ".error_log {" + "\n"
|
||||
useServer = " useServer 0" + "\n"
|
||||
logLevel = " logLevel ERROR" + "\n"
|
||||
rollingSize = " rollingSize 10M" + "\n"
|
||||
@@ -176,18 +327,16 @@ class virtualHostUtilities:
|
||||
confFile.writelines(rollingSize)
|
||||
confFile.writelines(error_log_end)
|
||||
|
||||
|
||||
|
||||
# Access Log Settings
|
||||
|
||||
access_Log = "accesslog $VH_ROOT/logs/$VH_NAME.access_log {" + "\n"
|
||||
useServer=" useServer 0" + "\n"
|
||||
logFormat=' logFormat "%v %h %l %u %t \"%r\" %>s %b"' + "\n"
|
||||
logHeaders=" logHeaders 5" + "\n"
|
||||
rollingSize=" rollingSize 10M" + "\n"
|
||||
keepDays=" keepDays 10"
|
||||
compressArchive=" compressArchive 1" + "\n"
|
||||
access_Log_end= "}" + "\n" + "\n"
|
||||
access_Log = "accesslog $VH_ROOT/logs/" + masterDomain + ".access_log {" + "\n"
|
||||
useServer = " useServer 0" + "\n"
|
||||
logFormat = ' logFormat "%v %h %l %u %t \"%r\" %>s %b"' + "\n"
|
||||
logHeaders = " logHeaders 5" + "\n"
|
||||
rollingSize = " rollingSize 10M" + "\n"
|
||||
keepDays = " keepDays 10"
|
||||
compressArchive = " compressArchive 1" + "\n"
|
||||
access_Log_end = "}" + "\n" + "\n"
|
||||
|
||||
confFile.writelines(access_Log)
|
||||
confFile.writelines(useServer)
|
||||
@@ -198,17 +347,12 @@ class virtualHostUtilities:
|
||||
confFile.writelines(compressArchive)
|
||||
confFile.writelines(access_Log_end)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# php settings
|
||||
|
||||
scripthandler = "scripthandler {" + "\n"
|
||||
add = ""
|
||||
php_end = "}" + "\n" + "\n"
|
||||
|
||||
|
||||
if phpVersion == "PHP 5.3":
|
||||
add = " add lsapi:php53 php" + "\n"
|
||||
elif phpVersion == "PHP 5.4":
|
||||
@@ -226,16 +370,74 @@ class virtualHostUtilities:
|
||||
confFile.writelines(add)
|
||||
confFile.writelines(php_end)
|
||||
|
||||
|
||||
confFile.close()
|
||||
|
||||
except BaseException,msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [IO Error with per host config file [perHostVirtualConf]]")
|
||||
except BaseException, msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(
|
||||
str(msg) + " [IO Error with per host config file [perHostDomainConf]]")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@staticmethod
|
||||
def createConfigInMainDomainHostFile(domain,masterDomain):
|
||||
|
||||
# virtualhost project.cyberpersons.com {
|
||||
# vhRoot / home / project.cyberpersons.com
|
||||
# configFile $SERVER_ROOT / conf / vhosts /$VH_NAME / vhconf.conf
|
||||
# allowSymbolLink 1
|
||||
# enableScript 1
|
||||
# restrained 1
|
||||
# }
|
||||
|
||||
try:
|
||||
data = open("/usr/local/lsws/conf/httpd_config.conf").readlines()
|
||||
writeDataToFile = open("/usr/local/lsws/conf/httpd_config.conf", 'w')
|
||||
|
||||
spaceonback = " "
|
||||
space = " "
|
||||
space2 = " "
|
||||
space3 = " "
|
||||
space4 = " "
|
||||
space5 = " "
|
||||
|
||||
firstLine = "virtualHost " + domain + " {" + "\n"
|
||||
secondLine = spaceonback + "vhRoot" + space + "/home/" + masterDomain + "\n"
|
||||
thirdLine = spaceonback + "configFile" + space2 + "$SERVER_ROOT" + "/conf/" + "vhosts/" + "$VH_NAME" + "/vhost.conf" + "\n"
|
||||
forthLine = spaceonback + "allowSymbolLink" + space3 + "1" + "\n"
|
||||
fifthLine = spaceonback + "enableScript" + space4 + "1" + "\n"
|
||||
sixthLine = spaceonback + "restrained" + space5 + "1" + "\n"
|
||||
seventhLine = "}" + "\n"
|
||||
map = " map " + domain + " " + domain + "\n"
|
||||
|
||||
checker = 1
|
||||
mapchecker = 1
|
||||
|
||||
for items in data:
|
||||
if ((items.find("virtualHost") > -1 or items.find("virtualhost") > -1) and checker == 1):
|
||||
writeDataToFile.writelines(firstLine)
|
||||
writeDataToFile.writelines(secondLine)
|
||||
writeDataToFile.writelines(thirdLine)
|
||||
writeDataToFile.writelines(forthLine)
|
||||
writeDataToFile.writelines(fifthLine)
|
||||
writeDataToFile.writelines(sixthLine)
|
||||
writeDataToFile.writelines(seventhLine)
|
||||
writeDataToFile.writelines("\n")
|
||||
writeDataToFile.writelines(items)
|
||||
checker = 0
|
||||
elif ((items.find("listener Default{") > -1 or items.find("Default {") > -1) and mapchecker == 1):
|
||||
writeDataToFile.writelines(items)
|
||||
writeDataToFile.writelines(map)
|
||||
mapchecker = 0
|
||||
|
||||
else:
|
||||
writeDataToFile.writelines(items)
|
||||
|
||||
writeDataToFile.close()
|
||||
except BaseException, msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(
|
||||
str(msg) + " [IO Error with main config file [createConfigInMainVirtualHostFile]]")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@staticmethod
|
||||
def deleteVirtualHostConfigurations(virtualHostName,numberOfSites):
|
||||
@@ -338,7 +540,6 @@ class virtualHostUtilities:
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@staticmethod
|
||||
def getDiskUsage(path, totalAllowed):
|
||||
try:
|
||||
|
||||
@@ -396,7 +396,6 @@ app.controller('restoreWebsiteControl', function($scope,$http,$timeout) {
|
||||
};
|
||||
|
||||
|
||||
|
||||
$scope.restoreBackup = function(){
|
||||
var backupFile = $scope.backupFile;
|
||||
|
||||
@@ -1033,102 +1032,97 @@ app.controller('scheduleBackup', function($scope,$http,$timeout) {
|
||||
|
||||
//*** Remote Backup site ****//
|
||||
app.controller('remoteBackupControl', function($scope, $http, $timeout) {
|
||||
|
||||
$scope.backupButton = true;
|
||||
|
||||
$scope.status_success = true;
|
||||
$scope.status_danger = true;
|
||||
$scope.status_info = true;
|
||||
|
||||
$scope.backupLoading = true;
|
||||
$scope.request = true;
|
||||
$scope.requestData = "";
|
||||
$scope.submitDisable = false;
|
||||
$scope.startRestore = true;
|
||||
|
||||
$scope.accountsInRemoteServerTable = true;
|
||||
$scope.transferBoxBtn = true;
|
||||
$scope.stopTransferbtn = true;
|
||||
$scope.fetchAccountsBtn = false;
|
||||
|
||||
|
||||
// notifications boxes
|
||||
$scope.notificationsBox = true;
|
||||
$scope.errorMessage = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.accountsFetched = true;
|
||||
$scope.backupProcessStarted = true;
|
||||
$scope.backupCancelled = true;
|
||||
|
||||
// status box
|
||||
|
||||
$scope.backupStatus = true;
|
||||
|
||||
var websitesToBeBacked = [];
|
||||
var websitesToBeBackedTemp = [];
|
||||
|
||||
var index = 0;
|
||||
var tempTransferDir = "";
|
||||
|
||||
$scope.passwordEnter = function() {
|
||||
$scope.backupButton = false;
|
||||
};
|
||||
|
||||
var seek = 0;
|
||||
var backupDir;
|
||||
var username = "admin";
|
||||
|
||||
|
||||
|
||||
function getBackupStatus(password) {
|
||||
|
||||
url = "/backup/getRemoteTransferStatus";
|
||||
|
||||
var data = {
|
||||
ipAddress: $scope.IPAddress,
|
||||
seek: seek,
|
||||
backupDir: backupDir,
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
console.log("Initiating Status with seek: " + seek)
|
||||
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
console.log(response.data)
|
||||
|
||||
if (response.data.remoteTransferStatus == 1) {
|
||||
seek = response.data.where;
|
||||
if (response.data.complete == 1) {
|
||||
$scope.submitDisable = false;
|
||||
$scope.backupLoading = true;
|
||||
|
||||
$scope.status_danger = true;
|
||||
$scope.status_info = true;
|
||||
$scope.status_success = false;
|
||||
$scope.startRestore = true;
|
||||
$scope.statusBox = "Backup Files Transferred! Require Permission to restore backups";
|
||||
$scope.requestData = $scope.requestData + response.data.logs
|
||||
seek = 0;
|
||||
|
||||
$scope.startRestore = false;
|
||||
} else {
|
||||
$scope.requestData = $scope.requestData + response.data.logs
|
||||
$timeout(getBackupStatus(password), 5000);
|
||||
$scope.addRemoveWebsite = function (website,websiteStatus) {
|
||||
if(websiteStatus==true)
|
||||
{
|
||||
var check = 1;
|
||||
for(var j = 0; j < websitesToBeBacked.length; j++){
|
||||
if (websitesToBeBacked[j] == website){
|
||||
check = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (response.data.error_message == "list index out of range") {
|
||||
$timeout(getBackupStatus(password), 5000);
|
||||
} else {
|
||||
$scope.submitDisable = false;
|
||||
$scope.status_danger = false;
|
||||
$scope.status_info = true;
|
||||
$scope.status_success = true;
|
||||
$scope.statusBox = "Unable to Transfer File: " + response.data.error_message;
|
||||
}
|
||||
|
||||
if(check == 1) {
|
||||
websitesToBeBacked.push(website);
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
$scope.status_danger = false;
|
||||
$scope.status_info = true;
|
||||
$scope.status_success = true;
|
||||
$scope.statusBox = "Unable to connect"
|
||||
var tempArray = [];
|
||||
|
||||
for(var j = 0; j < websitesToBeBacked.length; j++){
|
||||
if (websitesToBeBacked[j] != website){
|
||||
tempArray.push(websitesToBeBacked[j]);
|
||||
}
|
||||
}
|
||||
websitesToBeBacked = tempArray;
|
||||
}
|
||||
};
|
||||
|
||||
$scope.submitRemoteBackup = function() {
|
||||
$scope.requestData = "";
|
||||
$scope.status_success = true;
|
||||
$scope.status_danger = true;
|
||||
$scope.status_info = true;
|
||||
$scope.allChecked = function (webSiteStatus) {
|
||||
|
||||
|
||||
|
||||
if(webSiteStatus==true) {
|
||||
|
||||
websitesToBeBacked = websitesToBeBackedTemp;
|
||||
$scope.webSiteStatus = true;
|
||||
}
|
||||
else{
|
||||
websitesToBeBacked = [];
|
||||
$scope.webSiteStatus = false;
|
||||
}
|
||||
};
|
||||
|
||||
$scope.fetchAccountsFromRemoteServer = function () {
|
||||
|
||||
$scope.backupLoading = false;
|
||||
$scope.submitDisable = true;
|
||||
|
||||
// notifications boxes
|
||||
$scope.notificationsBox = true;
|
||||
$scope.errorMessage = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.accountsFetched = true;
|
||||
$scope.backupProcessStarted = true;
|
||||
$scope.backupCancelled = true;
|
||||
|
||||
var IPAddress = $scope.IPAddress;
|
||||
var password = $scope.password;
|
||||
|
||||
@@ -1136,7 +1130,6 @@ app.controller('remoteBackupControl', function($scope, $http, $timeout) {
|
||||
|
||||
var data = {
|
||||
ipAddress: IPAddress,
|
||||
username: username,
|
||||
password: password,
|
||||
};
|
||||
|
||||
@@ -1147,48 +1140,96 @@ app.controller('remoteBackupControl', function($scope, $http, $timeout) {
|
||||
};
|
||||
|
||||
|
||||
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
console.log(response.data)
|
||||
|
||||
if (response.data.status == 1) {
|
||||
$scope.request = false;
|
||||
console.log("Backup generated!!")
|
||||
backupDir = response.data.dir;
|
||||
getBackupStatus(password);
|
||||
} else {
|
||||
$scope.submitDisable = false;
|
||||
$scope.records = JSON.parse(response.data.data);
|
||||
var parsed = JSON.parse(response.data.data);
|
||||
|
||||
for(var j = 0; j < parsed.length; j++){
|
||||
websitesToBeBackedTemp.push(parsed[j].website);
|
||||
}
|
||||
|
||||
$scope.accountsInRemoteServerTable = false;
|
||||
$scope.backupLoading = true;
|
||||
|
||||
$scope.status_danger = false;
|
||||
$scope.status_info = true;
|
||||
$scope.status_success = true;
|
||||
$scope.statusBox = "Unable to Transfer File: " + response.data.error_message;
|
||||
// enable the transfer/cancel btn
|
||||
|
||||
$scope.transferBoxBtn = false;
|
||||
|
||||
// notifications boxes
|
||||
$scope.notificationsBox = false;
|
||||
$scope.errorMessage = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.accountsFetched = false;
|
||||
$scope.backupProcessStarted = true;
|
||||
$scope.backupCancelled = true;
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
$scope.error_message = response.data.error_message;
|
||||
$scope.backupLoading = true;
|
||||
|
||||
// notifications boxes
|
||||
$scope.notificationsBox = false;
|
||||
$scope.errorMessage = false;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.accountsFetched = true;
|
||||
$scope.backupProcessStarted = true;
|
||||
$scope.backupCancelled = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
$scope.status_danger = false;
|
||||
$scope.status_info = true;
|
||||
$scope.status_success = true;
|
||||
$scope.statusBox = "Unable to connect"
|
||||
|
||||
// notifications boxes
|
||||
|
||||
$scope.notificationsBox = false;
|
||||
$scope.errorMessage = true;
|
||||
$scope.couldNotConnect = false;
|
||||
$scope.accountsFetched = true;
|
||||
$scope.backupProcessStarted = true;
|
||||
$scope.backupCancelled = true;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
$scope.startTransfer = function () {
|
||||
|
||||
function getRestStatus() {
|
||||
// notifications boxes
|
||||
$scope.notificationsBox = true;
|
||||
$scope.errorMessage = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.accountsFetched = true;
|
||||
$scope.backupProcessStarted = true;
|
||||
$scope.backupCancelled = true;
|
||||
|
||||
url = "/backup/remoteRestoreStatus";
|
||||
|
||||
|
||||
if(websitesToBeBacked.length === 0){
|
||||
alert("No websites selected for transfer.")
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.fetchAccountsBtn = true;
|
||||
|
||||
$scope.backupLoading = false;
|
||||
|
||||
var IPAddress = $scope.IPAddress;
|
||||
var password = $scope.password;
|
||||
|
||||
url = "/backup/starRemoteTransfer";
|
||||
|
||||
var data = {
|
||||
seek: seek,
|
||||
backupDir: backupDir,
|
||||
ipAddress: IPAddress,
|
||||
password: password,
|
||||
accountsToTransfer:websitesToBeBacked,
|
||||
};
|
||||
console.log(data)
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
@@ -1197,69 +1238,142 @@ app.controller('remoteBackupControl', function($scope, $http, $timeout) {
|
||||
};
|
||||
|
||||
|
||||
console.log("Initiating Status with seek: " + seek)
|
||||
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
console.log(response.data)
|
||||
|
||||
if (response.data.remoteRestoreStatus == 1) {
|
||||
seek = response.data.where;
|
||||
console.log(seek);
|
||||
if (response.data.complete == 1) {
|
||||
$scope.submitDisable = false;
|
||||
$scope.backupLoading = true;
|
||||
if (response.data.remoteTransferStatus == 1) {
|
||||
tempTransferDir = response.data.dir;
|
||||
$scope.accountsInRemoteServerTable = true;
|
||||
|
||||
$scope.status_danger = true;
|
||||
$scope.status_info = true;
|
||||
$scope.status_success = false;
|
||||
// notifications boxes
|
||||
$scope.notificationsBox = false;
|
||||
$scope.errorMessage = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.accountsFetched = true;
|
||||
$scope.backupProcessStarted = false;
|
||||
$scope.backupCancelled = true;
|
||||
|
||||
$scope.statusBox = "Backup Files Restored!";
|
||||
$scope.requestData = $scope.requestData + response.data.logs
|
||||
$scope.startRestore = false;
|
||||
} else {
|
||||
$scope.requestData = $scope.requestData + response.data.logs
|
||||
$timeout(getRestStatus(), 5000);
|
||||
}
|
||||
} else {
|
||||
if (response.data.error_message == "list index out of range") {
|
||||
$timeout(getRestStatus(), 5000);
|
||||
} else {
|
||||
$scope.submitDisable = false;
|
||||
$scope.status_danger = false;
|
||||
$scope.status_info = true;
|
||||
$scope.status_success = true;
|
||||
$scope.statusBox = "Unable to Restore File: " + response.data.error_message;
|
||||
}
|
||||
// disable transfer button
|
||||
|
||||
$scope.startTransferbtn = true;
|
||||
|
||||
|
||||
// enable cancel button
|
||||
|
||||
$scope.stopTransferbtn = false;
|
||||
|
||||
|
||||
getBackupStatus();
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
$scope.error_message = response.data.error_message;
|
||||
$scope.backupLoading = true;
|
||||
|
||||
// Notifications box settings
|
||||
|
||||
// notifications boxes
|
||||
$scope.notificationsBox = false;
|
||||
$scope.errorMessage = false;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.accountsFetched = true;
|
||||
$scope.backupProcessStarted = true;
|
||||
$scope.backupCancelled = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
$scope.status_danger = false;
|
||||
$scope.status_info = true;
|
||||
$scope.status_success = true;
|
||||
$scope.statusBox = "Unable to connect"
|
||||
|
||||
// Notifications box settings
|
||||
|
||||
// notifications boxes
|
||||
$scope.notificationsBox = false;
|
||||
$scope.errorMessage = true;
|
||||
$scope.couldNotConnect = false;
|
||||
$scope.accountsFetched = true;
|
||||
$scope.backupProcessStarted = true;
|
||||
$scope.backupCancelled = true;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
function getBackupStatus(password) {
|
||||
|
||||
url = "/backup/getRemoteTransferStatus";
|
||||
|
||||
var data = {
|
||||
password : $scope.password,
|
||||
ipAddress: $scope.IPAddress,
|
||||
dir: tempTransferDir,
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
if (response.data.remoteTransferStatus == 1) {
|
||||
|
||||
if(response.data.backupsSent == 0){
|
||||
$scope.backupStatus = false;
|
||||
$scope.requestData = response.data.status;
|
||||
$timeout(getBackupStatus, 2000);
|
||||
}
|
||||
else{
|
||||
$scope.requestData = response.data.status;
|
||||
$timeout.cancel();
|
||||
$scope.backupLoading = true;
|
||||
remoteBackupRestore();
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
||||
$scope.error_message = response.data.error_message;
|
||||
$scope.backupLoading = true;
|
||||
$scope.couldNotConnect = true;
|
||||
|
||||
// Notifications box settings
|
||||
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.errorMessage = false;
|
||||
$scope.accountsFetched = true;
|
||||
$scope.notificationsBox = false;
|
||||
$timeout.cancel();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
// Notifications box settings
|
||||
|
||||
$scope.couldNotConnect = false;
|
||||
$scope.errorMessage = true;
|
||||
$scope.accountsFetched = true;
|
||||
$scope.notificationsBox = false;
|
||||
}
|
||||
};
|
||||
|
||||
$scope.submitBackupRestore = function() {
|
||||
$scope.status_success = true;
|
||||
$scope.status_danger = true;
|
||||
$scope.status_info = false;
|
||||
$scope.statusBox = "Restoring Backup";
|
||||
|
||||
$scope.backupLoading = false;
|
||||
$scope.submitDisable = true;
|
||||
|
||||
function remoteBackupRestore(){
|
||||
url = "/backup/remoteBackupRestore";
|
||||
|
||||
var data = {
|
||||
backupDir: backupDir
|
||||
backupDir: tempTransferDir,
|
||||
};
|
||||
console.log(data)
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
@@ -1267,42 +1381,241 @@ app.controller('remoteBackupControl', function($scope, $http, $timeout) {
|
||||
}
|
||||
};
|
||||
|
||||
seek = 0
|
||||
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
console.log(response.data)
|
||||
|
||||
if (response.data.remoteRestoreStatus == 1) {
|
||||
$scope.request = false;
|
||||
$scope.backupLoading = false;
|
||||
localRestoreStatus();
|
||||
}
|
||||
}
|
||||
|
||||
$scope.status_danger = true;
|
||||
$scope.status_info = true;
|
||||
$scope.status_success = false;
|
||||
$scope.statusBox = "Restore in Progress, fetching details"
|
||||
getRestStatus();
|
||||
} else {
|
||||
$scope.submitDisable = false;
|
||||
function cantLoadInitialDatas(response) {
|
||||
// Notifications box settings
|
||||
|
||||
$scope.couldNotConnect = false;
|
||||
$scope.errorMessage = true;
|
||||
$scope.accountsFetched = true;
|
||||
$scope.notificationsBox = false;
|
||||
}
|
||||
|
||||
///////////////
|
||||
|
||||
};
|
||||
|
||||
function localRestoreStatus(password) {
|
||||
|
||||
|
||||
|
||||
url = "/backup/localRestoreStatus";
|
||||
|
||||
var data = {
|
||||
backupDir: tempTransferDir,
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
if (response.data.remoteTransferStatus == 1) {
|
||||
|
||||
if(response.data.complete == 0){
|
||||
$scope.backupStatus = false;
|
||||
$scope.requestData = response.data.status;
|
||||
$timeout(localRestoreStatus, 2000);
|
||||
}
|
||||
else{
|
||||
$scope.requestData = response.data.status;
|
||||
$timeout.cancel();
|
||||
$scope.backupLoading = true;
|
||||
$scope.startTransferbtn = false;
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
||||
$scope.error_message = response.data.error_message;
|
||||
$scope.backupLoading = true;
|
||||
$scope.status_danger = false;
|
||||
$scope.status_info = true;
|
||||
$scope.status_success = true;
|
||||
$scope.statusBox = "Unable to Restore Backups: " + response.data.error_message;
|
||||
$scope.couldNotConnect = true;
|
||||
|
||||
// Notifications box settings
|
||||
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.errorMessage = false;
|
||||
$scope.accountsFetched = true;
|
||||
$scope.notificationsBox = false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
$scope.status_danger = false;
|
||||
$scope.status_info = true;
|
||||
$scope.status_success = true;
|
||||
$scope.statusBox = "Unable to connect";
|
||||
// Notifications box settings
|
||||
|
||||
$scope.couldNotConnect = false;
|
||||
$scope.errorMessage = true;
|
||||
$scope.accountsFetched = true;
|
||||
$scope.notificationsBox = false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
function restoreAccounts() {
|
||||
|
||||
url = "/backup/getRemoteTransferStatus";
|
||||
|
||||
var data = {
|
||||
password : $scope.password,
|
||||
ipAddress: $scope.IPAddress,
|
||||
dir: tempTransferDir,
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
if (response.data.remoteTransferStatus == 1) {
|
||||
|
||||
if(response.data.backupsSent == 0){
|
||||
$scope.backupStatus = false;
|
||||
$scope.requestData = response.data.status;
|
||||
$timeout(getBackupStatus, 2000);
|
||||
}
|
||||
else{
|
||||
$timeout.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
// Notifications box settings
|
||||
|
||||
$scope.couldNotConnect = false;
|
||||
$scope.errorMessage = true;
|
||||
$scope.accountsFetched = true;
|
||||
$scope.notificationsBox = false;
|
||||
}
|
||||
};
|
||||
|
||||
$scope.cancelRemoteBackup = function () {
|
||||
|
||||
|
||||
$scope.backupLoading = false;
|
||||
|
||||
// notifications boxes
|
||||
$scope.notificationsBox = true;
|
||||
$scope.errorMessage = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.accountsFetched = true;
|
||||
$scope.backupProcessStarted = true;
|
||||
$scope.backupCancelled = true;
|
||||
|
||||
var IPAddress = $scope.IPAddress;
|
||||
var password = $scope.password;
|
||||
|
||||
url = "/backup/cancelRemoteBackup";
|
||||
|
||||
var data = {
|
||||
ipAddress: IPAddress,
|
||||
password: password,
|
||||
dir:tempTransferDir,
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
if (response.data.cancelStatus == 1) {
|
||||
$scope.backupLoading = true;
|
||||
|
||||
// notifications boxes
|
||||
$scope.notificationsBox = false;
|
||||
$scope.errorMessage = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.accountsFetched = true;
|
||||
$scope.backupProcessStarted = true;
|
||||
$scope.backupCancelled = false;
|
||||
|
||||
// enable transfer button
|
||||
|
||||
$scope.startTransferbtn = false;
|
||||
|
||||
//disable cancel button
|
||||
|
||||
$scope.stopTransferbtn = true;
|
||||
|
||||
// hide status box
|
||||
|
||||
$scope.backupStatus = true;
|
||||
|
||||
// bring back websites table
|
||||
|
||||
$scope.accountsInRemoteServerTable = false;
|
||||
|
||||
// enable fetch button
|
||||
|
||||
$scope.fetchAccountsBtn = false;
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
$scope.error_message = response.data.error_message;
|
||||
$scope.backupLoading = true;
|
||||
|
||||
// notifications boxes
|
||||
|
||||
$scope.notificationsBox = false;
|
||||
$scope.errorMessage = false;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.accountsFetched = true;
|
||||
$scope.backupProcessStarted = true;
|
||||
$scope.backupCancelled = true;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
|
||||
// notifications boxes
|
||||
|
||||
$scope.notificationsBox = false;
|
||||
$scope.errorMessage = true;
|
||||
$scope.couldNotConnect = false;
|
||||
$scope.accountsFetched = true;
|
||||
$scope.backupProcessStarted = true;
|
||||
$scope.backupCancelled = true;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
});
|
||||
|
||||
///** Backup site ends **///
|
||||
@@ -124,6 +124,11 @@ app.controller('adminController', function($scope,$http,$timeout) {
|
||||
$("#backupDestinations").hide();
|
||||
$("#scheduleBackup").hide();
|
||||
|
||||
$("#remoteBackups").hide();
|
||||
$("#packageHome").hide();
|
||||
$("#packageSub").hide();
|
||||
$("#createWebsite").hide();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,8 @@ app.controller('createPackage', function($scope,$http) {
|
||||
bandwidth: bandwidth,
|
||||
ftpAccounts: ftpAccounts,
|
||||
dataBases: dataBases,
|
||||
emails:emails
|
||||
emails:emails,
|
||||
allowedDomains:$scope.allowedDomains
|
||||
};
|
||||
|
||||
var config = {
|
||||
@@ -238,6 +239,7 @@ app.controller('modifyPackages', function($scope,$http) {
|
||||
$scope.ftpAccounts = response.data.ftpAccounts;
|
||||
$scope.dataBases = response.data.dataBases;
|
||||
$scope.emails = response.data.emails;
|
||||
$scope.allowedDomains = response.data.allowedDomains;
|
||||
|
||||
$scope.modifyButton = "Save Details"
|
||||
|
||||
@@ -285,7 +287,8 @@ app.controller('modifyPackages', function($scope,$http) {
|
||||
bandwidth:bandwidth,
|
||||
ftpAccounts:ftpAccounts,
|
||||
dataBases:dataBases,
|
||||
emails:emails
|
||||
emails:emails,
|
||||
allowedDomains:$scope.allowedDomains,
|
||||
};
|
||||
|
||||
var config = {
|
||||
|
||||
@@ -1198,11 +1198,438 @@ app.controller('websitePages', function($scope,$http) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
////// create domain part
|
||||
|
||||
$("#domainCreationForm").hide();
|
||||
|
||||
$scope.showCreateDomainForm = function () {
|
||||
$("#domainCreationForm").fadeIn();
|
||||
};
|
||||
|
||||
$scope.hideDomainCreationForm = function () {
|
||||
$("#domainCreationForm").fadeOut();
|
||||
};
|
||||
|
||||
$scope.masterDomain = $("#domainNamePage").text();
|
||||
|
||||
// notifcations settings
|
||||
$scope.domainLoading = true;
|
||||
$scope.websiteCreationFailed = true;
|
||||
$scope.domainCreated = true;
|
||||
$scope.couldNotConnect = true;
|
||||
|
||||
$scope.createDomain = function(){
|
||||
|
||||
// notifcations settings
|
||||
$scope.domainLoading = false;
|
||||
$scope.websiteCreationFailed = true;
|
||||
$scope.domainCreated = true;
|
||||
$scope.couldNotConnect = true;
|
||||
|
||||
if ($scope.sslCheck === true){
|
||||
var ssl = 1;
|
||||
}
|
||||
else{
|
||||
var ssl = 0
|
||||
}
|
||||
|
||||
|
||||
url = "/websites/submitDomainCreation";
|
||||
var domainName = $scope.domainNameCreate;
|
||||
var phpSelection = $scope.phpSelection;
|
||||
|
||||
var path = $scope.docRootPath;
|
||||
|
||||
if (typeof path === 'undefined'){
|
||||
path = "";
|
||||
}
|
||||
|
||||
|
||||
var data = {
|
||||
domainName: domainName,
|
||||
phpSelection: phpSelection,
|
||||
ssl:ssl,
|
||||
path:path,
|
||||
masterDomain:$("#domainNamePage").text(),
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers : {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
$http.post(url, data,config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
|
||||
if(response.data.createWebSiteStatus === 1){
|
||||
|
||||
$scope.websiteDomain = domainName;
|
||||
|
||||
// notifcations settings
|
||||
$scope.domainLoading = true;
|
||||
$scope.websiteCreationFailed = true;
|
||||
$scope.domainCreated = false;
|
||||
$scope.couldNotConnect = true
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
$scope.errorMessage = response.data.error_message;
|
||||
|
||||
// notifcations settings
|
||||
$scope.domainLoading = true;
|
||||
$scope.websiteCreationFailed = false;
|
||||
$scope.domainCreated = true;
|
||||
$scope.couldNotConnect = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
function cantLoadInitialDatas(response) {
|
||||
|
||||
// notifcations settings
|
||||
$scope.domainLoading = true;
|
||||
$scope.websiteCreationFailed = true;
|
||||
$scope.domainCreated = true;
|
||||
$scope.couldNotConnect = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
////// List Domains Part
|
||||
|
||||
////////////////////////
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
|
||||
$("#listDomains").hide();
|
||||
|
||||
|
||||
$scope.showListDomains = function () {
|
||||
fetchDomains();
|
||||
$("#listDomains").fadeIn();
|
||||
};
|
||||
|
||||
$scope.hideListDomains = function () {
|
||||
$("#listDomains").fadeOut();
|
||||
};
|
||||
|
||||
function fetchDomains(){
|
||||
$scope.domainLoading = false;
|
||||
|
||||
var url = "/websites/fetchDomains";
|
||||
|
||||
var data = {
|
||||
masterDomain:$("#domainNamePage").text(),
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers : {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
$http.post(url, data,config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
|
||||
if(response.data.fetchStatus === 1){
|
||||
|
||||
$scope.childDomains = JSON.parse(response.data.data);
|
||||
$scope.domainLoading = true;
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.domainError = false;
|
||||
$scope.errorMessage = response.data.error_message;
|
||||
$scope.domainLoading = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
function cantLoadInitialDatas(response) {
|
||||
|
||||
$scope.couldNotConnect = false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$scope.changePHP = function(childDomain,phpSelection){
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
$scope.domainLoading = false;
|
||||
|
||||
var url = "/websites/changePHP";
|
||||
|
||||
var data = {
|
||||
childDomain:childDomain,
|
||||
phpSelection:phpSelection,
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers : {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
$http.post(url, data,config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
|
||||
if(response.data.changePHP === 1){
|
||||
|
||||
$scope.domainLoading = true;
|
||||
|
||||
$scope.changedPHPVersion = phpSelection;
|
||||
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = false;
|
||||
$scope.domainError = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.errorMessage = response.data.error_message;
|
||||
$scope.domainLoading = true;
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = false;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
function cantLoadInitialDatas(response) {
|
||||
|
||||
$scope.domainLoading = true;
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = false;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$scope.deleteChildDomain = function(childDomain){
|
||||
$scope.domainLoading = false;
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
|
||||
url = "/websites/submitDomainDeletion";
|
||||
|
||||
var data = {
|
||||
websiteName: childDomain,
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers : {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
$http.post(url, data,config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
|
||||
if(response.data.websiteDeleteStatus === 1){
|
||||
|
||||
$scope.domainLoading = true;
|
||||
$scope.deletedDomain = childDomain;
|
||||
|
||||
fetchDomains();
|
||||
|
||||
|
||||
// notifications
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = false;
|
||||
$scope.sslIssued = true;
|
||||
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.errorMessage = response.data.error_message;
|
||||
$scope.domainLoading = true;
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = false;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
function cantLoadInitialDatas(response) {
|
||||
|
||||
$scope.domainLoading = true;
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = true;
|
||||
$scope.couldNotConnect = false;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$scope.issueSSL = function(childDomain,path){
|
||||
$scope.domainLoading = false;
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
|
||||
var url = "/manageSSL/issueSSL";
|
||||
|
||||
|
||||
var data = {
|
||||
virtualHost:childDomain,
|
||||
path:path,
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers : {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
$http.post(url, data,config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
|
||||
if(response.data.SSL == 1){
|
||||
|
||||
$scope.domainLoading = true;
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = false;
|
||||
|
||||
|
||||
|
||||
$scope.sslDomainIssued = childDomain;
|
||||
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$scope.domainLoading = true;
|
||||
|
||||
$scope.errorMessage = response.data.error_message;
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = false;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
function cantLoadInitialDatas(response) {
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = true;
|
||||
$scope.couldNotConnect = false;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
/* Java script code to create account ends here */
|
||||
|
||||
@@ -17,6 +17,14 @@ class Websites(models.Model):
|
||||
ssl = models.IntegerField()
|
||||
state = models.IntegerField(default=1)
|
||||
|
||||
class ChildDomains(models.Model):
|
||||
master = models.ForeignKey(Websites,on_delete=models.CASCADE)
|
||||
domain = models.CharField(max_length=50, unique=True)
|
||||
path = models.CharField(max_length=200,default=None)
|
||||
ssl = models.IntegerField()
|
||||
phpSelection = models.CharField(max_length=10,default=None)
|
||||
|
||||
|
||||
class Backups(models.Model):
|
||||
website = models.ForeignKey(Websites,on_delete=models.CASCADE)
|
||||
fileName = models.CharField(max_length=50)
|
||||
|
||||
Binary file not shown.
@@ -1198,11 +1198,438 @@ app.controller('websitePages', function($scope,$http) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
////// create domain part
|
||||
|
||||
$("#domainCreationForm").hide();
|
||||
|
||||
$scope.showCreateDomainForm = function () {
|
||||
$("#domainCreationForm").fadeIn();
|
||||
};
|
||||
|
||||
$scope.hideDomainCreationForm = function () {
|
||||
$("#domainCreationForm").fadeOut();
|
||||
};
|
||||
|
||||
$scope.masterDomain = $("#domainNamePage").text();
|
||||
|
||||
// notifcations settings
|
||||
$scope.domainLoading = true;
|
||||
$scope.websiteCreationFailed = true;
|
||||
$scope.domainCreated = true;
|
||||
$scope.couldNotConnect = true;
|
||||
|
||||
$scope.createDomain = function(){
|
||||
|
||||
// notifcations settings
|
||||
$scope.domainLoading = false;
|
||||
$scope.websiteCreationFailed = true;
|
||||
$scope.domainCreated = true;
|
||||
$scope.couldNotConnect = true;
|
||||
|
||||
if ($scope.sslCheck === true){
|
||||
var ssl = 1;
|
||||
}
|
||||
else{
|
||||
var ssl = 0
|
||||
}
|
||||
|
||||
|
||||
url = "/websites/submitDomainCreation";
|
||||
var domainName = $scope.domainNameCreate;
|
||||
var phpSelection = $scope.phpSelection;
|
||||
|
||||
var path = $scope.docRootPath;
|
||||
|
||||
if (typeof path === 'undefined'){
|
||||
path = "";
|
||||
}
|
||||
|
||||
|
||||
var data = {
|
||||
domainName: domainName,
|
||||
phpSelection: phpSelection,
|
||||
ssl:ssl,
|
||||
path:path,
|
||||
masterDomain:$("#domainNamePage").text(),
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers : {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
$http.post(url, data,config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
|
||||
if(response.data.createWebSiteStatus === 1){
|
||||
|
||||
$scope.websiteDomain = domainName;
|
||||
|
||||
// notifcations settings
|
||||
$scope.domainLoading = true;
|
||||
$scope.websiteCreationFailed = true;
|
||||
$scope.domainCreated = false;
|
||||
$scope.couldNotConnect = true
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
$scope.errorMessage = response.data.error_message;
|
||||
|
||||
// notifcations settings
|
||||
$scope.domainLoading = true;
|
||||
$scope.websiteCreationFailed = false;
|
||||
$scope.domainCreated = true;
|
||||
$scope.couldNotConnect = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
function cantLoadInitialDatas(response) {
|
||||
|
||||
// notifcations settings
|
||||
$scope.domainLoading = true;
|
||||
$scope.websiteCreationFailed = true;
|
||||
$scope.domainCreated = true;
|
||||
$scope.couldNotConnect = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
////// List Domains Part
|
||||
|
||||
////////////////////////
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
|
||||
$("#listDomains").hide();
|
||||
|
||||
|
||||
$scope.showListDomains = function () {
|
||||
fetchDomains();
|
||||
$("#listDomains").fadeIn();
|
||||
};
|
||||
|
||||
$scope.hideListDomains = function () {
|
||||
$("#listDomains").fadeOut();
|
||||
};
|
||||
|
||||
function fetchDomains(){
|
||||
$scope.domainLoading = false;
|
||||
|
||||
var url = "/websites/fetchDomains";
|
||||
|
||||
var data = {
|
||||
masterDomain:$("#domainNamePage").text(),
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers : {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
$http.post(url, data,config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
|
||||
if(response.data.fetchStatus === 1){
|
||||
|
||||
$scope.childDomains = JSON.parse(response.data.data);
|
||||
$scope.domainLoading = true;
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.domainError = false;
|
||||
$scope.errorMessage = response.data.error_message;
|
||||
$scope.domainLoading = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
function cantLoadInitialDatas(response) {
|
||||
|
||||
$scope.couldNotConnect = false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$scope.changePHP = function(childDomain,phpSelection){
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
$scope.domainLoading = false;
|
||||
|
||||
var url = "/websites/changePHP";
|
||||
|
||||
var data = {
|
||||
childDomain:childDomain,
|
||||
phpSelection:phpSelection,
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers : {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
$http.post(url, data,config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
|
||||
if(response.data.changePHP === 1){
|
||||
|
||||
$scope.domainLoading = true;
|
||||
|
||||
$scope.changedPHPVersion = phpSelection;
|
||||
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = false;
|
||||
$scope.domainError = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.errorMessage = response.data.error_message;
|
||||
$scope.domainLoading = true;
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = false;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
function cantLoadInitialDatas(response) {
|
||||
|
||||
$scope.domainLoading = true;
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = false;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$scope.deleteChildDomain = function(childDomain){
|
||||
$scope.domainLoading = false;
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
|
||||
url = "/websites/submitDomainDeletion";
|
||||
|
||||
var data = {
|
||||
websiteName: childDomain,
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers : {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
$http.post(url, data,config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
|
||||
if(response.data.websiteDeleteStatus === 1){
|
||||
|
||||
$scope.domainLoading = true;
|
||||
$scope.deletedDomain = childDomain;
|
||||
|
||||
fetchDomains();
|
||||
|
||||
|
||||
// notifications
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = false;
|
||||
$scope.sslIssued = true;
|
||||
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.errorMessage = response.data.error_message;
|
||||
$scope.domainLoading = true;
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = false;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
function cantLoadInitialDatas(response) {
|
||||
|
||||
$scope.domainLoading = true;
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = true;
|
||||
$scope.couldNotConnect = false;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$scope.issueSSL = function(childDomain,path){
|
||||
$scope.domainLoading = false;
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
|
||||
var url = "/manageSSL/issueSSL";
|
||||
|
||||
|
||||
var data = {
|
||||
virtualHost:childDomain,
|
||||
path:path,
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers : {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
$http.post(url, data,config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
|
||||
if(response.data.SSL == 1){
|
||||
|
||||
$scope.domainLoading = true;
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = false;
|
||||
|
||||
|
||||
|
||||
$scope.sslDomainIssued = childDomain;
|
||||
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$scope.domainLoading = true;
|
||||
|
||||
$scope.errorMessage = response.data.error_message;
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = false;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
function cantLoadInitialDatas(response) {
|
||||
|
||||
// notifcations
|
||||
|
||||
$scope.phpChanged = true;
|
||||
$scope.domainError = true;
|
||||
$scope.couldNotConnect = false;
|
||||
$scope.domainDeleted = true;
|
||||
$scope.sslIssued = true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
/* Java script code to create account ends here */
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<div ng-controller="createWebsite" class="example-box-wrapper">
|
||||
|
||||
|
||||
<form name="websiteCreationForm" action="/" id="createPackages" class="form-horizontal bordered-row">
|
||||
<form name="websiteCreationForm" action="/" id="createPackages" class="form-horizontal bordered-row">
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
@@ -127,7 +127,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -211,12 +211,236 @@
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<h3 class="title-hero">
|
||||
{% trans "Domains" %} <img ng-hide="domainLoading" src="/static/images/loading.gif">
|
||||
</h3>
|
||||
|
||||
<div class="example-box-wrapper">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<a href="" ng-click="showCreateDomainForm()" title="{% trans 'Add Domains' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "Add Domains" %}
|
||||
</div>
|
||||
<div class="tile-content-wrapper">
|
||||
<i class="glyph-icon icon-dashboard"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<a href="" ng-click="showListDomains()" title="{% trans 'List Domains' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "List Domains" %}
|
||||
</div>
|
||||
<div class="tile-content-wrapper">
|
||||
<i class="glyph-icon icon-dashboard"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!---------- HTML For creating domains --------------->
|
||||
|
||||
|
||||
<form id="domainCreationForm" name="websiteCreationForm" action="/" class="form-horizontal bordered-row">
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Domain Name" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input ng-pattern="/([\da-z\.-]+\.[a-z\.]{2,6}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?$/i" name="dom" type="text" class="form-control" ng-model="domainNameCreate" 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 style="margin-bottom: 1%;" class=" col-sm-1">
|
||||
<a title="{% trans 'Cancel' %}" ng-click="hideDomainCreationForm()" href=""><img src="/static/images/close-32.png"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Path" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input placeholder="{% trans 'This path is relative to: ' %}{$ masterDomain $}. {% trans 'Leave empty to set default.' %}" type="text" class="form-control" ng-model="docRootPath" 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 "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>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Additional Features" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input ng-model="sslCheck" type="checkbox" value="">
|
||||
SSL
|
||||
<div ng-show="sslCheck" style="margin-top: 2%;margin-bottom: -2%" class="alert alert-warning">
|
||||
<p>{% trans "For SSL to work DNS of domain should point to server, otherwise self signed SSL will be issued, you can add your own SSL later." %}</p>
|
||||
</div>
|
||||
</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.dom.$error.pattern || websiteCreationForm.email.$invalid" type="button" ng-click="createDomain()" class="btn btn-primary btn-lg btn-block">{% trans "Create Domain" %}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<div ng-hide="websiteCreationFailed" class="alert alert-danger">
|
||||
<p>{% trans "Cannot create website. Error message:" %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
|
||||
<div ng-hide="domainCreated" class="alert alert-success">
|
||||
<p>{% trans "Website with domain" %} <strong>{$ websiteDomain $}</strong>{% trans " is Successfully 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>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<!---------- HTML For creating domains --------------->
|
||||
|
||||
<!---------- HTML For Listing domains --------------->
|
||||
|
||||
|
||||
<div id="listDomains" class="col-md-12">
|
||||
|
||||
<form ng-hide="" class="form-horizontal bordered-row">
|
||||
|
||||
|
||||
|
||||
<div ng-hide="phpChanged" class="alert alert-success">
|
||||
<p>{% trans "PHP Version Changed to:" %} {$ changedPHPVersion $} </p>
|
||||
</div>
|
||||
|
||||
<div ng-hide="domainDeleted" class="alert alert-success">
|
||||
<p>{% trans "Deleted:" %} {$ deletedDomain $} </p>
|
||||
</div>
|
||||
|
||||
<div ng-hide="sslIssued" class="alert alert-success">
|
||||
<p>{% trans "SSL Issued:" %} {$ sslDomainIssued $} </p>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="domainError" class="alert alert-danger">
|
||||
<p>{$ errorMessage $}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="couldNotConnect" class="alert alert-danger">
|
||||
<p>{% trans "Could not connect to server. Please refresh this page." %}</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div ng-hide="" class="form-group">
|
||||
|
||||
<div class="col-sm-11">
|
||||
<input placeholder="Search Domain..." ng-model="logSearch" name="dom" type="text" class="form-control" ng-model="domainNameCreate" required>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 1%;" class=" col-sm-1">
|
||||
<a title="{% trans 'Close' %}" ng-click="hideListDomains()" href=""><img src="/static/images/close-32.png"></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-12">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Domain</th>
|
||||
<th>Path</th>
|
||||
<th>PHP</th>
|
||||
<th>SSL</th>
|
||||
<th>Delete</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="record in childDomains | filter:logSearch">
|
||||
<td ng-bind="record.childDomain"></td>
|
||||
<td ng-bind="record.path"></td>
|
||||
<td >
|
||||
<select ng-change="changePHP(record.childDomain,phpSelection)" 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>
|
||||
</select>
|
||||
</td>
|
||||
<td><button type="button" ng-click="issueSSL(record.childDomain,record.path)" class="btn ra-100 btn-purple">{% trans "Issue" %}</button></td>
|
||||
<td><button type="button" ng-click="deleteChildDomain(record.childDomain)" class="btn ra-100 btn-purple">{% trans "Delete" %}</button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!---------- HTML For Listing domains --------------->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -435,7 +659,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<h3 class="title-hero">
|
||||
{% trans "Files" %}
|
||||
@@ -445,7 +669,7 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4">
|
||||
<a href="{$ fileManagerURL $}" target="_blank" title="{% trans 'File Manager" class="tile-box tile-box-shortcut btn-primary">
|
||||
<a href="{$ fileManagerURL $}" target="_blank" title="{% trans 'File Manager' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "File Manager" %}
|
||||
</div>
|
||||
@@ -456,7 +680,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<a href="{% url 'createFTPAccount' %}" title="{% trans 'Create FTP Account" class="tile-box tile-box-shortcut btn-primary">
|
||||
<a href="{% url 'createFTPAccount' %}" title="{% trans 'Create FTP Account' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "Create FTP Account" %}
|
||||
</div>
|
||||
@@ -468,7 +692,7 @@
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<a href="{% url 'deleteFTPAccount' %}" title="{% trans 'Delete FTP Account" class="tile-box tile-box-shortcut btn-primary">
|
||||
<a href="{% url 'deleteFTPAccount' %}" title="{% trans 'Delete FTP Account' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "Delete FTP Account" %}
|
||||
</div>
|
||||
@@ -483,7 +707,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<h3 class="title-hero">
|
||||
@@ -493,7 +716,7 @@
|
||||
<div class="example-box-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<a ng-click="installationDetails()" href="" title="{% trans 'Install wordpress with LSCache" class="tile-box tile-box-shortcut btn-primary">
|
||||
<a ng-click="installationDetails()" href="" title="{% trans 'Install wordpress with LSCache' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "Wordpress with LSCache" %}
|
||||
</div>
|
||||
@@ -575,8 +798,6 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
<div class="alert alert-danger">
|
||||
|
||||
@@ -69,4 +69,15 @@ urlpatterns = [
|
||||
url(r'^filemanager/upload', fm.upload),
|
||||
|
||||
|
||||
## sub/add/park domains
|
||||
|
||||
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'),
|
||||
|
||||
|
||||
]
|
||||
@@ -7,7 +7,7 @@ from loginSystem.models import Administrator
|
||||
from packages.models import Package
|
||||
from loginSystem.views import loadLoginPage
|
||||
import plogical.CyberCPLogFileWriter as logging
|
||||
from .models import Websites
|
||||
from .models import Websites,ChildDomains
|
||||
import json
|
||||
from math import ceil
|
||||
from plogical.mysqlUtilities import mysqlUtilities
|
||||
@@ -275,7 +275,7 @@ def submitWebsiteCreation(request):
|
||||
return HttpResponse(json_data)
|
||||
|
||||
if virtualHostUtilities.createDirectoryForVirtualHost(domain, adminEmail, phpSelection) != 1:
|
||||
numberOfWebsites = Websites.objects.count()
|
||||
numberOfWebsites = Websites.objects.count()+ChildDomains.objects.count()
|
||||
virtualHostUtilities.deleteVirtualHostConfigurations(domain, numberOfWebsites)
|
||||
data_ret = {"existsStatus": 1, 'createWebSiteStatus': 1,
|
||||
'error_message': "Can not create configurations, see CyberCP main log file."}
|
||||
@@ -283,7 +283,7 @@ def submitWebsiteCreation(request):
|
||||
return HttpResponse(json_data)
|
||||
|
||||
if virtualHostUtilities.createConfigInMainVirtualHostFile(domain) != 1:
|
||||
numberOfWebsites = Websites.objects.count()
|
||||
numberOfWebsites = Websites.objects.count()+ChildDomains.objects.count()
|
||||
virtualHostUtilities.deleteVirtualHostConfigurations(domain, numberOfWebsites)
|
||||
data_ret = {"existsStatus": 1, 'createWebSiteStatus': 1,
|
||||
'error_message': "Can not create configurations, see CyberCP main log file."}
|
||||
@@ -297,12 +297,13 @@ def submitWebsiteCreation(request):
|
||||
installUtilities.reStartLiteSpeed()
|
||||
|
||||
if ssl == 1:
|
||||
ssl_responce = sslUtilities.obtainSSLForADomain(domain, adminEmail)
|
||||
sslpath = "/home/" + domain + "/public_html"
|
||||
ssl_responce = sslUtilities.obtainSSLForADomain(domain, adminEmail,sslpath)
|
||||
if ssl_responce == 1:
|
||||
sslUtilities.installSSLForDomain(domain)
|
||||
installUtilities.reStartLiteSpeed()
|
||||
else:
|
||||
numberOfWebsites = Websites.objects.count()
|
||||
numberOfWebsites = Websites.objects.count()+ChildDomains.objects.count()
|
||||
virtualHostUtilities.deleteVirtualHostConfigurations(domain, numberOfWebsites)
|
||||
|
||||
data_ret = {"existsStatus": 1, 'createWebSiteStatus': 1,
|
||||
@@ -325,7 +326,7 @@ def submitWebsiteCreation(request):
|
||||
return HttpResponse(json_data)
|
||||
|
||||
except BaseException,msg:
|
||||
numberOfWebsites = Websites.objects.count()
|
||||
numberOfWebsites = Websites.objects.count()+ChildDomains.objects.count()
|
||||
virtualHostUtilities.deleteVirtualHostConfigurations(domain, numberOfWebsites)
|
||||
data_ret = {'createWebSiteStatus': 0, 'error_message': str(msg),"existsStatus":0}
|
||||
json_data = json.dumps(data_ret)
|
||||
@@ -335,6 +336,158 @@ def submitWebsiteCreation(request):
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
def submitDomainCreation(request):
|
||||
try:
|
||||
if request.method == 'POST':
|
||||
|
||||
data = json.loads(request.body)
|
||||
masterDomain = data['masterDomain']
|
||||
domain = data['domainName']
|
||||
phpSelection = data['phpSelection']
|
||||
|
||||
try:
|
||||
website = Websites.objects.get(domain=domain)
|
||||
data_ret = {"existsStatus": 0, 'createWebSiteStatus': 0,
|
||||
'error_message': "Website Already Exists"}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
website = ChildDomains.objects.get(domain=domain)
|
||||
data_ret = {"existsStatus": 0, 'createWebSiteStatus': 0,
|
||||
'error_message': "Website Already Exists"}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
except:
|
||||
pass
|
||||
|
||||
####### Limitations check
|
||||
|
||||
master = Websites.objects.get(domain=masterDomain)
|
||||
|
||||
if master.package.allowedDomains > master.childdomains_set.all().count():
|
||||
pass
|
||||
else:
|
||||
data_ret = {"existsStatus": 0, 'createWebSiteStatus': 0,
|
||||
'error_message': "Exceeded maximum number of domains for this package"}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
####### Limitations Check End
|
||||
|
||||
ssl = data['ssl']
|
||||
path = data['path']
|
||||
|
||||
####### Creation
|
||||
try:
|
||||
restore = data['restore']
|
||||
except:
|
||||
if len(path) > 0:
|
||||
path = path.lstrip("/")
|
||||
path = "/home/" + masterDomain + "/public_html/" + path
|
||||
else:
|
||||
path = "/home/" + masterDomain + "/public_html/" + domain
|
||||
|
||||
if virtualHostUtilities.createDirectoryForDomain(masterDomain, domain, phpSelection, path,
|
||||
master.adminEmail) != 1:
|
||||
numberOfWebsites = Websites.objects.count() + ChildDomains.objects.count()
|
||||
virtualHostUtilities.deleteVirtualHostConfigurations(domain, numberOfWebsites)
|
||||
data_ret = {"existsStatus": 1, 'createWebSiteStatus': 0,
|
||||
'error_message': "Can not create configurations, see CyberCP main log file."}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
if virtualHostUtilities.createConfigInMainDomainHostFile(domain, masterDomain) != 1:
|
||||
numberOfWebsites = Websites.objects.count() + ChildDomains.objects.count()
|
||||
virtualHostUtilities.deleteVirtualHostConfigurations(domain, numberOfWebsites)
|
||||
data_ret = {"existsStatus": 1, 'createWebSiteStatus': 0,
|
||||
'error_message': "Can not create configurations, see CyberCP main log file."}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
if ssl == 1:
|
||||
installUtilities.reStartOpenLiteSpeed("restart", "ols")
|
||||
else:
|
||||
installUtilities.reStartLiteSpeed()
|
||||
|
||||
if ssl == 1:
|
||||
ssl_responce = sslUtilities.obtainSSLForADomain(domain, master.adminEmail, path)
|
||||
if ssl_responce == 1:
|
||||
sslUtilities.installSSLForDomain(domain)
|
||||
installUtilities.reStartLiteSpeed()
|
||||
else:
|
||||
numberOfWebsites = Websites.objects.count() + ChildDomains.objects.count()
|
||||
virtualHostUtilities.deleteVirtualHostConfigurations(domain, numberOfWebsites)
|
||||
|
||||
data_ret = {"existsStatus": 1, 'createWebSiteStatus': 1,
|
||||
'error_message': str(
|
||||
ssl_responce) + ", for more information see CyberCP main log file."}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
website = ChildDomains(master=master, domain=domain, path=path, phpSelection=phpSelection, ssl=ssl)
|
||||
|
||||
website.save()
|
||||
|
||||
shutil.copy("/usr/local/CyberCP/index.html", path + "/index.html")
|
||||
|
||||
data_ret = {'createWebSiteStatus': 1, 'error_message': "None", "existsStatus": 0}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
except BaseException, msg:
|
||||
numberOfWebsites = Websites.objects.count() + ChildDomains.objects.count()
|
||||
virtualHostUtilities.deleteVirtualHostConfigurations(domain, numberOfWebsites)
|
||||
data_ret = {'createWebSiteStatus': 0, 'error_message': str(msg), "existsStatus": 0}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
def fetchDomains(request):
|
||||
try:
|
||||
val = request.session['userID']
|
||||
try:
|
||||
if request.method == 'POST':
|
||||
|
||||
|
||||
data = json.loads(request.body)
|
||||
masterDomain = data['masterDomain']
|
||||
|
||||
master = Websites.objects.get(domain=masterDomain)
|
||||
|
||||
childDomains = master.childdomains_set.all()
|
||||
|
||||
json_data = "["
|
||||
checker = 0
|
||||
|
||||
for items in childDomains:
|
||||
dic = {
|
||||
'childDomain': items.domain,
|
||||
'path': items.path,
|
||||
}
|
||||
|
||||
if checker == 0:
|
||||
json_data = json_data + json.dumps(dic)
|
||||
checker = 1
|
||||
else:
|
||||
json_data = json_data + ',' + json.dumps(dic)
|
||||
|
||||
|
||||
json_data = json_data + ']'
|
||||
final_json = json.dumps({'fetchStatus': 1, 'error_message': "None","data":json_data})
|
||||
return HttpResponse(final_json)
|
||||
|
||||
except BaseException,msg:
|
||||
final_dic = {'fetchStatus': 0, 'error_message': str(msg)}
|
||||
final_json = json.dumps(final_dic)
|
||||
|
||||
return HttpResponse(final_json)
|
||||
except KeyError:
|
||||
final_dic = {'fetchStatus': 0, 'error_message': "Not Logged In, please refresh the page or login again."}
|
||||
final_json = json.dumps(final_dic)
|
||||
return HttpResponse(final_json)
|
||||
|
||||
|
||||
|
||||
def listWebsites(request):
|
||||
@@ -448,13 +601,21 @@ def submitWebsiteDeletion(request):
|
||||
data = json.loads(request.body)
|
||||
websiteName = data['websiteName']
|
||||
|
||||
numberOfWebsites = Websites.objects.count()
|
||||
numberOfWebsites = Websites.objects.count()+ChildDomains.objects.count()
|
||||
|
||||
virtualHostUtilities.deleteVirtualHostConfigurations(websiteName,numberOfWebsites)
|
||||
|
||||
|
||||
delWebsite = Websites.objects.get(domain=websiteName)
|
||||
databases = Databases.objects.filter(website=delWebsite)
|
||||
|
||||
childDomains = delWebsite.childdomains_set.all()
|
||||
|
||||
for items in childDomains:
|
||||
numberOfWebsites = Websites.objects.count()+ChildDomains.objects.count()
|
||||
virtualHostUtilities.deleteVirtualHostConfigurations(items.domain, numberOfWebsites)
|
||||
|
||||
|
||||
for items in databases:
|
||||
mysqlUtilities.deleteDatabase(items.dbName, items.dbUser)
|
||||
|
||||
@@ -463,6 +624,39 @@ def submitWebsiteDeletion(request):
|
||||
|
||||
|
||||
|
||||
installUtilities.reStartLiteSpeed()
|
||||
|
||||
data_ret = {'websiteDeleteStatus': 1,'error_message': "None"}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
except BaseException,msg:
|
||||
data_ret = {'websiteDeleteStatus': 0, 'error_message': str(msg)}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
except KeyError,msg:
|
||||
data_ret = {'websiteDeleteStatus': 0, 'error_message': str(msg)}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
def submitDomainDeletion(request):
|
||||
try:
|
||||
val = request.session['userID']
|
||||
try:
|
||||
if request.method == 'POST':
|
||||
data = json.loads(request.body)
|
||||
websiteName = data['websiteName']
|
||||
|
||||
numberOfWebsites = Websites.objects.count()+ChildDomains.objects.count()
|
||||
|
||||
virtualHostUtilities.deleteVirtualHostConfigurations(websiteName,numberOfWebsites)
|
||||
|
||||
|
||||
delWebsite = ChildDomains.objects.get(domain=websiteName)
|
||||
|
||||
delWebsite.delete()
|
||||
|
||||
|
||||
installUtilities.reStartLiteSpeed()
|
||||
|
||||
data_ret = {'websiteDeleteStatus': 1,'error_message': "None"}
|
||||
@@ -1280,13 +1474,13 @@ def CreateWebsiteFromBackup(request):
|
||||
websiteOwner = admin.userName
|
||||
|
||||
adminEmail = admin.email
|
||||
phpSelection = "PHP 7.0"
|
||||
|
||||
## open meta file to read data
|
||||
|
||||
|
||||
data = open(path + "/meta", 'r').readlines()
|
||||
domain = data[0].strip('\n')
|
||||
domain = data[0].split('-')[0]
|
||||
phpSelection = data[0].split("-")[1].strip("\n")
|
||||
|
||||
try:
|
||||
website = Websites.objects.get(domain=domain)
|
||||
@@ -1303,11 +1497,12 @@ def CreateWebsiteFromBackup(request):
|
||||
pass
|
||||
|
||||
check = 0
|
||||
dbCheck = 0
|
||||
|
||||
for items in data:
|
||||
if check == 0:
|
||||
if virtualHostUtilities.createDirectoryForVirtualHost(domain, adminEmail, phpSelection) != 1:
|
||||
numberOfWebsites = Websites.objects.count()
|
||||
numberOfWebsites = Websites.objects.count()+ChildDomains.objects.count()
|
||||
virtualHostUtilities.deleteVirtualHostConfigurations(domain, numberOfWebsites)
|
||||
data_ret = {"existsStatus": 1, 'createWebSiteStatus': 1,
|
||||
'error_message': "Can not create configurations, see CyberCP main log file."}
|
||||
@@ -1315,7 +1510,7 @@ def CreateWebsiteFromBackup(request):
|
||||
return HttpResponse(json_data)
|
||||
|
||||
if virtualHostUtilities.createConfigInMainVirtualHostFile(domain) != 1:
|
||||
numberOfWebsites = Websites.objects.count()
|
||||
numberOfWebsites = Websites.objects.count()+ChildDomains.objects.count()
|
||||
virtualHostUtilities.deleteVirtualHostConfigurations(domain, numberOfWebsites)
|
||||
data_ret = {"existsStatus": 1, 'createWebSiteStatus': 1,
|
||||
'error_message': "Can not create configurations, see CyberCP main log file."}
|
||||
@@ -1331,14 +1526,19 @@ def CreateWebsiteFromBackup(request):
|
||||
|
||||
website.save()
|
||||
|
||||
shutil.copy("/usr/local/CyberCP/index.html", "/home/" + domain + "/public_html/index.html")
|
||||
#shutil.copy("/usr/local/CyberCP/index.html", "/home/" + domain + "/public_html/index.html")
|
||||
|
||||
check = check + 1
|
||||
else:
|
||||
dbData = items.split('-')
|
||||
mysqlUtilities.createDatabase(dbData[0], dbData[1], "cyberpanel")
|
||||
newDB = Databases(website=website, dbName=dbData[0], dbUser=dbData[1])
|
||||
newDB.save()
|
||||
if items.find("Databases") > -1:
|
||||
dbCheck = 1
|
||||
continue
|
||||
|
||||
if dbCheck == 1:
|
||||
dbData = items.split('-')
|
||||
mysqlUtilities.createDatabase(dbData[0], dbData[1], "cyberpanel")
|
||||
newDB = Databases(website=website, dbName=dbData[0], dbUser=dbData[1])
|
||||
newDB.save()
|
||||
|
||||
status = open(path + '/status', "w")
|
||||
status.write("Accounts and DBs Created")
|
||||
@@ -1349,8 +1549,41 @@ def CreateWebsiteFromBackup(request):
|
||||
return HttpResponse(json_data)
|
||||
|
||||
except BaseException, msg:
|
||||
numberOfWebsites = Websites.objects.count()
|
||||
numberOfWebsites = Websites.objects.count()+ChildDomains.objects.count()
|
||||
virtualHostUtilities.deleteVirtualHostConfigurations(domain, numberOfWebsites)
|
||||
data_ret = {'createWebSiteStatus': 0, 'error_message': str(msg), "existsStatus": 0}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
|
||||
def changePHP(request):
|
||||
try:
|
||||
val = request.session['userID']
|
||||
try:
|
||||
if request.method == 'POST':
|
||||
|
||||
data = json.loads(request.body)
|
||||
childDomain = data['childDomain']
|
||||
phpVersion = data['phpSelection']
|
||||
|
||||
|
||||
confPath = virtualHostUtilities.Server_root + "/conf/vhosts/" + childDomain
|
||||
completePathToConfigFile = confPath + "/vhost.conf"
|
||||
|
||||
virtualHostUtilities.changePHP(completePathToConfigFile,phpVersion)
|
||||
installUtilities.reStartLiteSpeed()
|
||||
|
||||
|
||||
data_ret = {'changePHP': 1,'error_message': "None"}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
except BaseException,msg:
|
||||
data_ret = {'changePHP': 0, 'error_message': str(msg)}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
|
||||
except KeyError,msg:
|
||||
data_ret = {'changePHP': 0, 'error_message': str(msg)}
|
||||
json_data = json.dumps(data_ret)
|
||||
return HttpResponse(json_data)
|
||||
Reference in New Issue
Block a user