mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-07 15:36:19 +02:00
Review Code
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
newapp.controller('createWebsiteV2', function ($scope, $http, $timeout, $window) {
|
||||
|
||||
alert('Create Website V2 loading')
|
||||
$scope.webSiteCreationLoading = true;
|
||||
$scope.installationDetailsForm = false;
|
||||
$scope.installationProgress = true;
|
||||
@@ -463,7 +462,7 @@ newapp.controller('websitePagesV2', function ($scope, $http, $timeout, $window)
|
||||
$scope.hideLogs = true;
|
||||
};
|
||||
|
||||
$scope.fileManagerURLV2 = "/filemanagerv2/" + $("#domainNamePageV2").text() ;
|
||||
$scope.fileManagerURLV2 = "/filemanagerv2/" + $("#domainNamePageV2").text();
|
||||
$scope.wordPressInstallURLV2 = $("#domainNamePageV2").text() + "/wordpressInstall";
|
||||
$scope.joomlaInstallURLV2 = $("#domainNamePageV2").text() + "/joomlaInstall";
|
||||
$scope.setupGitV2 = $("#domainNamePageV2").text() + "/setupGitV2";
|
||||
@@ -2758,6 +2757,13 @@ newapp.controller('modifyWebsitesControllerV2', function ($scope, $http) {
|
||||
};
|
||||
|
||||
});
|
||||
$("#canNotModify").hide();
|
||||
$("#webSiteDetailsToBeModified").hide();
|
||||
$("#websiteModifyFailure").hide();
|
||||
$("#websiteModifySuccess").hide();
|
||||
$("#websiteSuccessfullyModified").hide();
|
||||
$("#modifyWebsiteLoading").hide();
|
||||
$("#modifyWebsiteButton").hide();
|
||||
|
||||
newapp.controller('suspendWebsiteControlV2', function ($scope, $http) {
|
||||
|
||||
@@ -6247,6 +6253,140 @@ function AppendToTable(table, markup) {
|
||||
$(table).append(markup);
|
||||
}
|
||||
|
||||
newapp.controller('RemoteBackupConfigV2', function ($scope, $http, $timeout, $window) {
|
||||
$scope.RemoteBackupLoading = true;
|
||||
$scope.SFTPBackUpdiv = true;
|
||||
|
||||
$scope.EndpointURLdiv = true;
|
||||
$scope.Selectprovider = true;
|
||||
$scope.S3keyNamediv = true;
|
||||
$scope.Accesskeydiv = true;
|
||||
$scope.SecretKeydiv = true;
|
||||
$scope.SelectRemoteBackuptype = function () {
|
||||
var val = $scope.RemoteBackuptype;
|
||||
if (val == "SFTP") {
|
||||
$scope.SFTPBackUpdiv = false;
|
||||
$scope.EndpointURLdiv = true;
|
||||
$scope.Selectprovider = true;
|
||||
$scope.S3keyNamediv = true;
|
||||
$scope.Accesskeydiv = true;
|
||||
$scope.SecretKeydiv = true;
|
||||
} else if (val == "S3") {
|
||||
$scope.EndpointURLdiv = true;
|
||||
$scope.Selectprovider = false;
|
||||
$scope.S3keyNamediv = false;
|
||||
$scope.Accesskeydiv = false;
|
||||
$scope.SecretKeydiv = false;
|
||||
$scope.SFTPBackUpdiv = true;
|
||||
} else {
|
||||
$scope.RemoteBackupLoading = true;
|
||||
$scope.SFTPBackUpdiv = true;
|
||||
|
||||
$scope.EndpointURLdiv = true;
|
||||
$scope.Selectprovider = true;
|
||||
$scope.S3keyNamediv = true;
|
||||
$scope.Accesskeydiv = true;
|
||||
$scope.SecretKeydiv = true;
|
||||
}
|
||||
}
|
||||
|
||||
$scope.SelectProvidertype = function () {
|
||||
$scope.EndpointURLdiv = true;
|
||||
var provider = $scope.Providervalue
|
||||
if (provider == 'Backblaze') {
|
||||
$scope.EndpointURLdiv = false;
|
||||
} else {
|
||||
$scope.EndpointURLdiv = true;
|
||||
}
|
||||
}
|
||||
|
||||
$scope.SaveBackupConfig = function () {
|
||||
$scope.RemoteBackupLoading = false;
|
||||
var Hname = $scope.Hostname;
|
||||
var Uname = $scope.Username;
|
||||
var Passwd = $scope.Password;
|
||||
var path = $scope.path;
|
||||
var type = $scope.RemoteBackuptype;
|
||||
var Providervalue = $scope.Providervalue;
|
||||
var data;
|
||||
if (type == "SFTP") {
|
||||
|
||||
data = {
|
||||
Hname: Hname,
|
||||
Uname: Uname,
|
||||
Passwd: Passwd,
|
||||
path: path,
|
||||
type: type
|
||||
}
|
||||
} else if (type == "S3") {
|
||||
if (Providervalue == "Backblaze") {
|
||||
data = {
|
||||
S3keyname: $scope.S3keyName,
|
||||
Provider: Providervalue,
|
||||
AccessKey: $scope.Accesskey,
|
||||
SecertKey: $scope.SecretKey,
|
||||
EndUrl: $scope.EndpointURL,
|
||||
type: type
|
||||
}
|
||||
} else {
|
||||
data = {
|
||||
S3keyname: $scope.S3keyName,
|
||||
Provider: Providervalue,
|
||||
AccessKey: $scope.Accesskey,
|
||||
SecertKey: $scope.SecretKey,
|
||||
type: type
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
var url = "/websites/SaveBackupConfig";
|
||||
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
$scope.RemoteBackupLoading = true;
|
||||
if (response.data.status === 1) {
|
||||
new PNotify({
|
||||
title: 'Success!',
|
||||
text: 'Successfully Saved!.',
|
||||
type: 'success'
|
||||
});
|
||||
location.reload();
|
||||
|
||||
|
||||
} else {
|
||||
new PNotify({
|
||||
title: 'Error!',
|
||||
text: response.data.error_message,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
$scope.RemoteBackupLoading = true;
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: response.data.error_message,
|
||||
type: 'error'
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
newapp.controller('WPAddNewPluginV2', function ($scope, $http, $timeout, $window, $compile) {
|
||||
$scope.webSiteCreationLoading = true;
|
||||
|
||||
@@ -6544,6 +6684,712 @@ function showTab(tabId, tabColour) {
|
||||
}
|
||||
}
|
||||
|
||||
newapp.controller('ApacheManagerV2', function ($scope, $http, $timeout) {
|
||||
$scope.cyberpanelloading = true;
|
||||
$scope.apacheOLS = true;
|
||||
$scope.pureOLS = true;
|
||||
$scope.lswsEnt = true;
|
||||
|
||||
var apache = 1, ols = 2, lsws = 3;
|
||||
var statusFile;
|
||||
|
||||
$scope.getSwitchStatus = function () {
|
||||
$scope.cyberpanelloading = false;
|
||||
url = "/websites/getSwitchStatus";
|
||||
|
||||
var data = {
|
||||
domainName: $("#domainNamePage").text()
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
$http.post(url, data, config).then(ListInitialData, cantLoadInitialData);
|
||||
|
||||
|
||||
function ListInitialData(response) {
|
||||
$scope.cyberpanelloading = true;
|
||||
if (response.data.status === 1) {
|
||||
if (response.data.server === apache) {
|
||||
$scope.apacheOLS = false;
|
||||
$scope.pureOLS = true;
|
||||
$scope.lswsEnt = true;
|
||||
$scope.configData = response.data.configData;
|
||||
|
||||
$scope.pmMaxChildren = response.data.pmMaxChildren;
|
||||
$scope.pmStartServers = response.data.pmStartServers;
|
||||
$scope.pmMinSpareServers = response.data.pmMinSpareServers;
|
||||
$scope.pmMaxSpareServers = response.data.pmMaxSpareServers;
|
||||
$scope.phpPath = response.data.phpPath;
|
||||
|
||||
|
||||
} else if (response.data.server === ols) {
|
||||
$scope.apacheOLS = true;
|
||||
$scope.pureOLS = false;
|
||||
$scope.lswsEnt = true;
|
||||
} else {
|
||||
$scope.apacheOLS = true;
|
||||
$scope.pureOLS = true;
|
||||
$scope.lswsEnt = false;
|
||||
}
|
||||
//$scope.records = JSON.parse(response.data.data);
|
||||
} else {
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: response.data.error_message,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function cantLoadInitialData(response) {
|
||||
$scope.cyberpanelloading = true;
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: 'Could not connect to server, please refresh this page.',
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
$scope.getSwitchStatus();
|
||||
|
||||
$scope.switchServer = function (server) {
|
||||
$scope.cyberpanelloading = false;
|
||||
$scope.functionProgress = {"width": "0%"};
|
||||
$scope.functionStatus = 'Starting conversion..';
|
||||
|
||||
url = "/websites/switchServer";
|
||||
|
||||
var data = {
|
||||
domainName: $("#domainNamePage").text(),
|
||||
phpSelection: $scope.phpSelection,
|
||||
server: server
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
$http.post(url, data, config).then(ListInitialData, cantLoadInitialData);
|
||||
|
||||
function ListInitialData(response) {
|
||||
if (response.data.status === 1) {
|
||||
statusFile = response.data.tempStatusPath;
|
||||
statusFunc();
|
||||
|
||||
} else {
|
||||
$scope.cyberpanelloading = true;
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: response.data.error_message,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function cantLoadInitialData(response) {
|
||||
$scope.cyberpanelloading = true;
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: 'Could not connect to server, please refresh this page.',
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
function statusFunc() {
|
||||
$scope.cyberpanelloading = false;
|
||||
url = "/websites/statusFunc";
|
||||
|
||||
var data = {
|
||||
statusFile: statusFile
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
$http.post(url, data, config).then(ListInitialData, cantLoadInitialData);
|
||||
|
||||
|
||||
function ListInitialData(response) {
|
||||
if (response.data.status === 1) {
|
||||
if (response.data.abort === 1) {
|
||||
$scope.functionProgress = {"width": "100%"};
|
||||
$scope.functionStatus = response.data.currentStatus;
|
||||
$scope.cyberpanelloading = true;
|
||||
$timeout.cancel();
|
||||
$scope.getSwitchStatus();
|
||||
} else {
|
||||
$scope.functionProgress = {"width": response.data.installationProgress + "%"};
|
||||
$scope.functionStatus = response.data.currentStatus;
|
||||
$timeout(statusFunc, 3000);
|
||||
}
|
||||
|
||||
} else {
|
||||
$scope.cyberpanelloading = true;
|
||||
$scope.functionStatus = response.data.error_message;
|
||||
$scope.functionProgress = {"width": response.data.installationProgress + "%"};
|
||||
$timeout.cancel();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function cantLoadInitialData(response) {
|
||||
$scope.functionProgress = {"width": response.data.installationProgress + "%"};
|
||||
$scope.functionStatus = 'Could not connect to server, please refresh this page.';
|
||||
$timeout.cancel();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$scope.tuneSettings = function () {
|
||||
$scope.cyberpanelloading = false;
|
||||
|
||||
url = "/websites/tuneSettings";
|
||||
|
||||
var data = {
|
||||
domainName: $("#domainNamePage").text(),
|
||||
pmMaxChildren: $scope.pmMaxChildren,
|
||||
pmStartServers: $scope.pmStartServers,
|
||||
pmMinSpareServers: $scope.pmMinSpareServers,
|
||||
pmMaxSpareServers: $scope.pmMaxSpareServers,
|
||||
phpPath: $scope.phpPath
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
$http.post(url, data, config).then(ListInitialData, cantLoadInitialData);
|
||||
|
||||
function ListInitialData(response) {
|
||||
$scope.cyberpanelloading = true;
|
||||
if (response.data.status === 1) {
|
||||
|
||||
new PNotify({
|
||||
title: 'Success',
|
||||
text: 'Changes successfully applied.',
|
||||
type: 'success'
|
||||
});
|
||||
|
||||
} else {
|
||||
$scope.cyberpanelloading = true;
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: response.data.error_message,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function cantLoadInitialData(response) {
|
||||
$scope.cyberpanelloading = true;
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: 'Could not connect to server, please refresh this page.',
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
$scope.saveApacheConfig = function () {
|
||||
$scope.cyberpanelloading = false;
|
||||
|
||||
url = "/websites/saveApacheConfigsToFile";
|
||||
|
||||
var data = {
|
||||
domainName: $("#domainNamePage").text(),
|
||||
configData: $scope.configData
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
$http.post(url, data, config).then(ListInitialData, cantLoadInitialData);
|
||||
|
||||
function ListInitialData(response) {
|
||||
$scope.cyberpanelloading = true;
|
||||
if (response.data.status === 1) {
|
||||
|
||||
new PNotify({
|
||||
title: 'Success',
|
||||
text: 'Changes successfully applied.',
|
||||
type: 'success'
|
||||
});
|
||||
|
||||
} else {
|
||||
$scope.cyberpanelloading = true;
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: response.data.error_message,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function cantLoadInitialData(response) {
|
||||
$scope.cyberpanelloading = true;
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: 'Could not connect to server, please refresh this page.',
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
function DeletePluginBuucket(url) {
|
||||
DeletePluginURL = url;
|
||||
}
|
||||
|
||||
function FinalDeletePluginBuucket() {
|
||||
window.location.href = DeletePluginURL;
|
||||
}
|
||||
|
||||
newapp.controller('RestoreWPBackupV2', function ($scope, $http, $timeout, $window) {
|
||||
$scope.wordpresshomeloading = true;
|
||||
$scope.stagingDetailsForm = false;
|
||||
$scope.installationProgress = true;
|
||||
$scope.errorMessageBox = true;
|
||||
$scope.success = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.goBackDisable = true;
|
||||
|
||||
|
||||
$scope.checkmethode = function () {
|
||||
var val = $('#RestoreMethode').children("option:selected").val();
|
||||
if (val == 1) {
|
||||
$('#Newsitediv').show();
|
||||
$('#exinstingsitediv').hide();
|
||||
} else if (val == 0) {
|
||||
$('#exinstingsitediv').show();
|
||||
$('#Newsitediv').hide();
|
||||
} else {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$scope.RestoreWPbackupNow = function () {
|
||||
$('#wordpresshomeloading').show();
|
||||
$scope.wordpresshomeloading = false;
|
||||
$scope.stagingDetailsForm = true;
|
||||
$scope.installationProgress = false;
|
||||
$scope.errorMessageBox = true;
|
||||
$scope.success = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.goBackDisable = true;
|
||||
$scope.currentStatus = "Start Restoring WordPress..";
|
||||
|
||||
var Domain = $('#wprestoresubdirdomain').val()
|
||||
var path = $('#wprestoresubdirpath').val();
|
||||
var home = "1";
|
||||
|
||||
if (typeof path != 'undefined' || path != '') {
|
||||
home = "0";
|
||||
}
|
||||
if (typeof path == 'undefined') {
|
||||
path = "";
|
||||
}
|
||||
|
||||
|
||||
var backuptype = $('#backuptype').html();
|
||||
var data;
|
||||
if (backuptype == "DataBase Backup") {
|
||||
data = {
|
||||
backupid: $('#backupid').html(),
|
||||
DesSite: $('#DesSite').children("option:selected").val(),
|
||||
Domain: '',
|
||||
path: path,
|
||||
home: home,
|
||||
}
|
||||
} else {
|
||||
data = {
|
||||
backupid: $('#backupid').html(),
|
||||
DesSite: $('#DesSite').children("option:selected").val(),
|
||||
Domain: Domain,
|
||||
path: path,
|
||||
home: home,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var url = "/websites/RestoreWPbackupNow";
|
||||
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
// console.log(data)
|
||||
|
||||
var d = $('#DesSite').children("option:selected").val();
|
||||
var c = $("input[name=Newdomain]").val();
|
||||
// if (d == -1 || c == "") {
|
||||
// alert("Please Select Method of Backup Restore");
|
||||
// } else {
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
// }
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
wordpresshomeloading = true;
|
||||
$('#wordpresshomeloading').hide();
|
||||
|
||||
if (response.data.status === 1) {
|
||||
new PNotify({
|
||||
title: 'Success!',
|
||||
text: 'Restoring process starts!.',
|
||||
type: 'success'
|
||||
});
|
||||
statusFile = response.data.tempStatusPath;
|
||||
getCreationStatus();
|
||||
|
||||
} else {
|
||||
$('#wordpresshomeloading').hide();
|
||||
$scope.wordpresshomeloading = true;
|
||||
$scope.installationDetailsForm = true;
|
||||
$scope.installationProgress = false;
|
||||
$scope.errorMessageBox = false;
|
||||
$scope.success = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.goBackDisable = false;
|
||||
|
||||
$scope.errorMessage = response.data.error_message;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
$('#wordpresshomeloading').hide();
|
||||
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: response.data.error_message,
|
||||
type: 'error'
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function getCreationStatus() {
|
||||
$('#wordpresshomeloading').show();
|
||||
|
||||
url = "/websites/installWordpressStatus";
|
||||
|
||||
var data = {
|
||||
statusFile: statusFile
|
||||
};
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
$('#wordpresshomeloading').hide();
|
||||
|
||||
if (response.data.abort === 1) {
|
||||
|
||||
if (response.data.installStatus === 1) {
|
||||
|
||||
|
||||
$scope.wordpresshomeloading = true;
|
||||
$scope.stagingDetailsForm = true;
|
||||
$scope.installationProgress = false;
|
||||
$scope.errorMessageBox = true;
|
||||
$scope.success = false;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.goBackDisable = false;
|
||||
|
||||
|
||||
$("#installProgress").css("width", "100%");
|
||||
$("#installProgressbackup").css("width", "100%");
|
||||
$scope.installPercentage = "100";
|
||||
$scope.currentStatus = response.data.currentStatus;
|
||||
$timeout.cancel();
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
$scope.wordpresshomeloading = true;
|
||||
$scope.stagingDetailsForm = true;
|
||||
$scope.installationProgress = false;
|
||||
$scope.errorMessageBox = false;
|
||||
$scope.success = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.goBackDisable = false;
|
||||
|
||||
$scope.errorMessage = response.data.error_message;
|
||||
|
||||
$("#installProgress").css("width", "0%");
|
||||
$("#installProgressbackup").css("width", "0%");
|
||||
$scope.installPercentage = "0";
|
||||
$scope.goBackDisable = false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
$("#installProgress").css("width", response.data.installationProgress + "%");
|
||||
$("#installProgressbackup").css("width", response.data.installationProgress + "%");
|
||||
$scope.installPercentage = response.data.installationProgress;
|
||||
$scope.currentStatus = response.data.currentStatus;
|
||||
$timeout(getCreationStatus, 1000);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
$('#wordpresshomeloading').hide();
|
||||
$scope.wordpresshomeloading = true;
|
||||
$scope.stagingDetailsForm = true;
|
||||
$scope.installationProgress = false;
|
||||
$scope.errorMessageBox = true;
|
||||
$scope.success = true;
|
||||
$scope.couldNotConnect = false;
|
||||
$scope.goBackDisable = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
$scope.goBack = function () {
|
||||
$('#wordpresshomeloading').hide();
|
||||
$scope.wordpresshomeloading = true;
|
||||
$scope.stagingDetailsForm = false;
|
||||
$scope.installationProgress = true;
|
||||
$scope.errorMessageBox = true;
|
||||
$scope.success = true;
|
||||
$scope.couldNotConnect = true;
|
||||
$scope.goBackDisable = true;
|
||||
$("#installProgress").css("width", "0%");
|
||||
};
|
||||
});
|
||||
newapp.controller('BackupScheduleV2', function ($scope, $http, $timeout, $window) {
|
||||
$scope.BackupScheduleLoading = true;
|
||||
$scope.SaveBackupSchedule = function () {
|
||||
$scope.RemoteBackupLoading = false;
|
||||
var FileRetention = $scope.Fretention;
|
||||
var Backfrequency = $scope.Bfrequency;
|
||||
|
||||
|
||||
var data = {
|
||||
FileRetention: FileRetention,
|
||||
Backfrequency: Backfrequency,
|
||||
ScheduleName: $scope.ScheduleName,
|
||||
RemoteConfigID: $('#RemoteConfigID').html(),
|
||||
BackupType: $scope.BackupType
|
||||
}
|
||||
var url = "/websites/SaveBackupSchedule";
|
||||
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
$scope.RemoteBackupLoading = true;
|
||||
if (response.data.status === 1) {
|
||||
new PNotify({
|
||||
title: 'Success!',
|
||||
text: 'Successfully Saved!.',
|
||||
type: 'success'
|
||||
});
|
||||
location.reload();
|
||||
|
||||
|
||||
} else {
|
||||
new PNotify({
|
||||
title: 'Error!',
|
||||
text: response.data.error_message,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
$scope.RemoteBackupLoading = true;
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: response.data.error_message,
|
||||
type: 'error'
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
$scope.getupdateid = function (ID) {
|
||||
UpdatescheduleID = ID;
|
||||
}
|
||||
|
||||
$scope.UpdateRemoteschedules = function () {
|
||||
$scope.RemoteBackupLoading = false;
|
||||
var Frequency = $scope.RemoteFrequency;
|
||||
var fretention = $scope.RemoteFileretention;
|
||||
|
||||
var data = {
|
||||
ScheduleID: UpdatescheduleID,
|
||||
Frequency: Frequency,
|
||||
FileRetention: fretention
|
||||
}
|
||||
var url = "/websites/UpdateRemoteschedules";
|
||||
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
$scope.RemoteBackupLoading = true;
|
||||
if (response.data.status === 1) {
|
||||
new PNotify({
|
||||
title: 'Success!',
|
||||
text: 'Successfully Updated!.',
|
||||
type: 'success'
|
||||
});
|
||||
location.reload();
|
||||
|
||||
|
||||
} else {
|
||||
new PNotify({
|
||||
title: 'Error!',
|
||||
text: response.data.error_message,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
$scope.RemoteBackupLoading = true;
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: response.data.error_message,
|
||||
type: 'error'
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
$scope.AddWPsiteforRemoteBackup = function () {
|
||||
$scope.RemoteBackupLoading = false;
|
||||
|
||||
|
||||
var data = {
|
||||
WpsiteID: $('#Wpsite').val(),
|
||||
RemoteScheduleID: $('#RemoteScheduleID').html()
|
||||
}
|
||||
var url = "/websites/AddWPsiteforRemoteBackup";
|
||||
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
}
|
||||
};
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
$scope.RemoteBackupLoading = true;
|
||||
if (response.data.status === 1) {
|
||||
new PNotify({
|
||||
title: 'Success!',
|
||||
text: 'Successfully Saved!.',
|
||||
type: 'success'
|
||||
});
|
||||
location.reload();
|
||||
|
||||
|
||||
} else {
|
||||
new PNotify({
|
||||
title: 'Error!',
|
||||
text: response.data.error_message,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function cantLoadInitialDatas(response) {
|
||||
$scope.RemoteBackupLoading = true;
|
||||
new PNotify({
|
||||
title: 'Operation Failed!',
|
||||
text: response.data.error_message,
|
||||
type: 'error'
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
});
|
||||
|
||||
function DeleteBackupConfigNow(url) {
|
||||
window.location.href = url;
|
||||
}
|
||||
|
||||
function DeleteRemoteBackupsiteNow(url) {
|
||||
window.location.href = url;
|
||||
}
|
||||
|
||||
function DeleteBackupfileConfigNow(url) {
|
||||
window.location.href = url;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
{% for i in WPsites %}
|
||||
<option value="{{ i.id }}">{{ i.title }}</option>
|
||||
{% endfor %}
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
{% extends "baseTemplate/newBase.html" %}
|
||||
{% load i18n %}
|
||||
{% block titleNew %}{% trans "Home - CyberPanel" %}{% endblock %}
|
||||
{% block newContent %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
<div ng-controller="BackupScheduleV2" class="p-8">
|
||||
<div>
|
||||
<p class="text-4xl font-bold">Backup Sites Configurations</p>
|
||||
</div>
|
||||
|
||||
<div class="py-4">
|
||||
<p class="text-xl font-bold">Add WordPress Sites for Remote Backup</p>
|
||||
<img ng-hide="BackupScheduleLoading"
|
||||
src="{% static 'images/loading.gif' %}">
|
||||
</div>
|
||||
<hr>
|
||||
<form name="websiteCreationForm" action="/" id="createPackages">
|
||||
<span style="display: none" id="RemoteScheduleID"> {{ RemoteScheduleID }}</span>
|
||||
<div ng-hide="installationDetailsForm" class="flex mt-4 py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">Selecte WordPress Site</p>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-model="Wpsite" id="Wpsite"
|
||||
class="w-80 bg-gray-100 rounded px-2 py-1">
|
||||
{% for i in WPsites %}
|
||||
<option value="{{ i.id }}">{{ i.title }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="installationDetailsForm" class="flex justify-center mt-3">
|
||||
<button ng-click="AddWPsiteforRemoteBackup()"
|
||||
class="bg-orange-500 px-3 py-2 rounded-lg text-xl font-semibold text-white">
|
||||
Save Backup Schedule
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="py-4">
|
||||
<p class="text-xl font-bold">Saved Sites For Remote Backup</p>
|
||||
</div>
|
||||
<div class="relative py-8 overflow-x-auto">
|
||||
<table class="w-full text-sm text-left rtl:text-right">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
ID
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
WordPress Title
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
Action
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for sub in RemoteBackupsites %}
|
||||
<tbody class="border shadow-lg py-3 px-6 rounded-b-lg">
|
||||
<tr>
|
||||
<td class="px-6 py-4 font-bold">
|
||||
{{ sub.id }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
{{ sub.Title }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
<button aria-label=""
|
||||
onclick="DeleteRemoteBackupsiteNow('{% url 'AddRemoteBackupsiteV2' %}?ID={{ RemoteScheduleID }}&DeleteID={{ sub.id }}')"
|
||||
type="button"
|
||||
class="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded">
|
||||
Delete
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
347
websiteFunctions/templates/websiteFunctions/ApacheManagerV2.html
Normal file
347
websiteFunctions/templates/websiteFunctions/ApacheManagerV2.html
Normal file
@@ -0,0 +1,347 @@
|
||||
{% extends "baseTemplate/newBase.html" %}
|
||||
{% load i18n %}
|
||||
{% block titleNew %}{% trans "Home - CyberPanel" %}{% endblock %}
|
||||
{% block newContent %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% if apachemanager %}
|
||||
<div ng-controller="ApacheManagerV2" class="p-8">
|
||||
<div>
|
||||
<p class="text-4xl font-bold">Apache Manager</p>
|
||||
<p class="text-xs text-gray-600 py-2 font-semibold">Switch between Apache (as reverse proxy) and
|
||||
OpenLiteSpeed.</p>
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex items-center py-4">
|
||||
<p id="domainNamePage" class="text-xl font-bold">{{ domainName }}</p>
|
||||
<img ng-hide="cyberpanelloading"
|
||||
src="{% static 'images/loading.gif' %}">
|
||||
</div>
|
||||
<div ng-hide="apacheOLS" class="flex items-center py-4">
|
||||
<p id="domainNamePage" class="text-gray-500 font-bold">
|
||||
<span class="text-red-500">{{ domainName }}</span> is currently using Apache as
|
||||
Reverse
|
||||
Proxy to
|
||||
OpenLiteSpeed.</p>
|
||||
<img style="height: 25px" ng-hide="cyberpanelloading"
|
||||
src="{% static 'images/loading.gif' %}">
|
||||
</div>
|
||||
<hr>
|
||||
<div>
|
||||
<div ng-hide="apacheOLS" class="flex mt-4 py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">PHP</p>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-model="phpSelection" class="w-80 bg-gray-100 rounded px-2 py-1"
|
||||
id="example-select">
|
||||
{% for php in phps %}
|
||||
<option>{{ php }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-3 py-2 px-6">
|
||||
<a onclick="return false;"
|
||||
ng-hide="apacheOLS"
|
||||
ng-click="switchServer(2)"
|
||||
class="bg-orange-500 px-3 py-1 font-semibold text-white"
|
||||
href="#" data-modal-target="switchToPure" data-modal-toggle="switchToPure">
|
||||
Switch to pure OpenLiteSpeed.
|
||||
</a>
|
||||
<div id="switchToPure" tabindex="-1"
|
||||
class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full">
|
||||
<div class="relative p-4 w-full max-w-2xl max-h-full">
|
||||
<div class="relative bg-white shadow dark:bg-gray-700">
|
||||
<div class="flex items-center bg-blue-400 px-4 py-4">
|
||||
<p id="myLargeModalLabel" class="font-bold">{$ functionStatus $} <img
|
||||
ng-hide="cyberpanelloading"
|
||||
src="{% static 'images/loading.gif' %}"></p>
|
||||
<button type="button" data-modal-toggle="switchToPure"
|
||||
class="absolute top-2 end-1 text-black bg-transparent hover:text-black rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center"
|
||||
data-modal-hide="switchToPure">
|
||||
<svg class="w-3 h-3" aria-hidden="true"
|
||||
xmlns="http://www.w3.org/2000/svg" fill="none"
|
||||
viewBox="0 0 14 14">
|
||||
<path stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2"
|
||||
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
||||
</svg>
|
||||
<span class="sr-only">Close modal</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="p-4 md:p-5">
|
||||
<div class="w-full bg-gray-100 rounded-full mt-3">
|
||||
<div ng-style="functionProgress" id="installProgress"
|
||||
class="bg-green-600 text-xs font-medium text-white text-center p-2 leading-none rounded-full"
|
||||
style="width:0%">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="apacheOLS">
|
||||
<div class="py-2 px-6">
|
||||
<div ng-hide="apacheOLS">
|
||||
<p class="font-semibold w-60 text-xl">Apache Configurations</p>
|
||||
</div>
|
||||
<div>
|
||||
<textarea ng-model="configData" rows="20" class="w-full border"></textarea>
|
||||
</div>
|
||||
<div ng-hide="saveConfigBtn" class="mt-2">
|
||||
<button ng-click="saveApacheConfig()"
|
||||
class="bg-orange-500 px-3 py-1 font-semibold text-white">
|
||||
Save Apache Configurations
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="apacheOLS" class="flex items-center py-4">
|
||||
<p class="text-xl font-bold">PHP-FPM Configurations</p>
|
||||
<img style="height: 25px" ng-hide="cyberpanelloading"
|
||||
src="{% static 'images/loading.gif' %}">
|
||||
</div>
|
||||
<div ng-hide="apacheOLS">
|
||||
<div class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">pm.max_children</p>
|
||||
</div>
|
||||
<div>
|
||||
<input class="w-80 bg-gray-100 rounded px-2 py-1" type="text"
|
||||
ng-model="pmMaxChildren"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">pm.start_servers</p>
|
||||
</div>
|
||||
<div>
|
||||
<input class="w-80 bg-gray-100 rounded px-2 py-1" type="text"
|
||||
ng-model="pmStartServers"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">pm.min_spare_servers</p>
|
||||
</div>
|
||||
<div>
|
||||
<input class="w-80 bg-gray-100 rounded px-2 py-1" type="text"
|
||||
ng-model="pmMinSpareServers"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">pm.max_spare_servers</p>
|
||||
</div>
|
||||
<div>
|
||||
<input class="w-80 bg-gray-100 rounded px-2 py-1" type="text"
|
||||
ng-model="pmMaxSpareServers"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="py-2 px-6 mt-2">
|
||||
<a ng-hide="apacheOLS" ng-click="tuneSettings()"
|
||||
href="#" class="bg-orange-500 px-3 py-1 font-semibold text-white">Tune
|
||||
PHP-FPM Settings.</a>
|
||||
<p ng-hide="pureOLS" class="px-2 mt-2">
|
||||
<span class="text-red-500 font-bold">{{ domainName }}</span> is currently using pure
|
||||
OpenLiteSpeed, PHP-FPM is
|
||||
not used with OpenLiteSpeed, thus tuning is disabled.</p>
|
||||
<!-- Using OpenLiteSpeed -->
|
||||
<p ng-hide="lswsEnt" class="px-2"><span
|
||||
class="text-red-500 font-bold">{{ domainName }}</span> is
|
||||
using LiteSpeed Enterprise.
|
||||
PHP-FPM is not
|
||||
used
|
||||
with LiteSpeed
|
||||
Enterprise.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="pureOLS" class="py-4">
|
||||
<p class="text-gray-500 font-bold"><span
|
||||
class="text-red-500 font-bold">{{ domainName }}</span> is currently using pure
|
||||
OpenLiteSpeed.</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div ng-hide="pureOLS" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">PHP</p>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-model="phpSelection" class="w-80 bg-gray-100 rounded px-2 py-1"
|
||||
id="example-select">
|
||||
{% for php in phps %}
|
||||
<option>{{ php }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-2 py-2 px-6">
|
||||
<a onclick="return false;"
|
||||
ng-hide="pureOLS"
|
||||
ng-click="switchServer(1)"
|
||||
class="bg-orange-500 px-3 py-1 font-semibold text-white"
|
||||
href="#" data-modal-target="switchToOpenLiteSpeed" data-modal-toggle="switchToOpenLiteSpeed">
|
||||
Switch to OpenLiteSpeed + Apache as reverse proxy.
|
||||
</a>
|
||||
<div id="switchToOpenLiteSpeed" tabindex="-1"
|
||||
class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full">
|
||||
<div class="relative p-4 w-full max-w-2xl max-h-full">
|
||||
<div class="relative bg-white shadow dark:bg-gray-700">
|
||||
<div class="flex items-center bg-blue-400 px-4 py-4">
|
||||
<p id="myLargeModalLabel" class="font-bold">{$ functionStatus $} <img
|
||||
style="height: 25px"
|
||||
ng-hide="cyberpanelloading"
|
||||
src="{% static 'images/loading.gif' %}"></p>
|
||||
<button type="button" data-modal-toggle="switchToOpenLiteSpeed"
|
||||
class="absolute top-2 end-1 text-black bg-transparent hover:text-black rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center"
|
||||
data-modal-hide="switchToOpenLiteSpeed">
|
||||
<svg class="w-3 h-3" aria-hidden="true"
|
||||
xmlns="http://www.w3.org/2000/svg" fill="none"
|
||||
viewBox="0 0 14 14">
|
||||
<path stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2"
|
||||
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
||||
</svg>
|
||||
<span class="sr-only">Close modal</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="p-4 md:p-5">
|
||||
<div class="w-full bg-gray-100 rounded-full mt-3">
|
||||
<div ng-style="functionProgress" id="installProgress"
|
||||
class="bg-green-600 text-xs font-medium text-white text-center p-2 leading-none rounded-full"
|
||||
style="width:0%">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p ng-hide="lswsEnt" class="mt-2">
|
||||
<span class="text-red-500 font-bold">{{ domainName }}</span>
|
||||
is using LiteSpeed Enterprise. When LiteSpeed
|
||||
Enterprise is active switching is not required.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<style>
|
||||
|
||||
h1 {
|
||||
color: #333;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #555;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: #777;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #444;
|
||||
margin: 1%;
|
||||
}
|
||||
|
||||
ol {
|
||||
color: #444;
|
||||
margin: 1%;
|
||||
}
|
||||
</style>
|
||||
<div class="container">
|
||||
<div id="page-title" align="center">
|
||||
<h1><strong>OpenLiteSpeed + Apache as Backend </strong></h1>
|
||||
<h1>Introducing CyberPanel's Revolutionary Hybrid Web Server: OpenLiteSpeed + Apache!</h1>
|
||||
<p>
|
||||
Are you seeking the ultimate web hosting solution that combines blazing-fast performance with
|
||||
unparalleled feature versatility? Look no further! CyberPanel is proud to present its groundbreaking
|
||||
new feature: the OpenLiteSpeed + Apache hybrid web server. This cutting-edge innovation is designed
|
||||
to take your website's performance and functionality to unprecedented heights, offering the best of
|
||||
both worlds in a single, seamless package.
|
||||
</p>
|
||||
|
||||
<h2>Unmatched Speed with OpenLiteSpeed:</h2>
|
||||
<p>
|
||||
Harness the raw power of OpenLiteSpeed, the industry-leading, high-performance web server that
|
||||
ensures lightning-fast response times and unparalleled efficiency. OpenLiteSpeed is renowned for its
|
||||
remarkable performance capabilities, enabling your websites to handle a massive influx of traffic
|
||||
without compromising on speed or reliability. Experience near-instantaneous page loads and swift
|
||||
data transfers, providing an unbeatable user experience that keeps visitors engaged and coming back
|
||||
for more.
|
||||
</p>
|
||||
|
||||
<h2>Unrivaled Features with Apache:</h2>
|
||||
<p>
|
||||
While OpenLiteSpeed excels in speed and efficiency, we understand that Apache is favored by many web
|
||||
developers for its extensive feature set and compatibility. CyberPanel's innovative hybrid approach
|
||||
allows you to harness the full potential of Apache as a backend, granting access to an impressive
|
||||
array of modules, scripts, and configurations. Enjoy the freedom to leverage the vast Apache
|
||||
ecosystem, ensuring seamless integration with a wide range of applications and platforms.
|
||||
</p>
|
||||
|
||||
<h2>The Perfect Fusion:</h2>
|
||||
<p>
|
||||
By merging OpenLiteSpeed and Apache, CyberPanel has created a truly game-changing web server
|
||||
solution that combines the unparalleled speed of OpenLiteSpeed with the feature-rich environment of
|
||||
Apache. The result is a synergistic combination that sets new industry standards, empowering you to
|
||||
elevate your web hosting to unprecedented levels of performance and functionality.
|
||||
</p>
|
||||
|
||||
<h3>Key Features and Benefits:</h3>
|
||||
<ol>
|
||||
<li>Lightning-Fast Performance: Experience unrivaled speed and responsiveness, ensuring your
|
||||
websites load at blazing speeds, delighting visitors and improving search engine rankings.
|
||||
</li>
|
||||
<li>Versatile Feature Set: Harness the extensive features of Apache while benefiting from the speed
|
||||
and efficiency of OpenLiteSpeed, providing unmatched flexibility and compatibility.
|
||||
</li>
|
||||
<li>Enhanced Security: CyberPanel's OpenLiteSpeed + Apache configuration includes robust security
|
||||
measures to safeguard your websites and data against potential threats.
|
||||
</li>
|
||||
<li>Scalability and Stability: Enjoy the ability to handle high traffic loads effortlessly, ensuring
|
||||
your websites remain stable and responsive under any circumstances.
|
||||
</li>
|
||||
<li>Easy Management: CyberPanel's user-friendly interface makes it simple to manage and configure
|
||||
the OpenLiteSpeed + Apache hybrid web server, even for less experienced users.
|
||||
</li>
|
||||
<li>Cost-Effective Solution: Optimize your web hosting infrastructure with CyberPanel's innovative
|
||||
hybrid web server, eliminating the need for costly hardware upgrades while boosting overall
|
||||
performance.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
Unleash the true potential of your websites with CyberPanel's OpenLiteSpeed + Apache hybrid web
|
||||
server. Experience unparalleled speed, efficiency, and versatility in one unified solution. Upgrade
|
||||
your web hosting experience today and revolutionize the way you deliver content to your audience.
|
||||
Embrace the future of web hosting with CyberPanel's groundbreaking innovation!
|
||||
</p>
|
||||
</div>
|
||||
<p align="center">
|
||||
<iframe width="788.54" height="443" src="https://www.youtube.com/embed/ts5wR9G2FsE"
|
||||
title="YouTube video player" frameborder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||
allowfullscreen></iframe>
|
||||
</p>
|
||||
<div style="margin-top: 2%">
|
||||
<stripe-pricing-table pricing-table-id="prctbl_1MQtdYJMfY1fWGMszc4tx78j"
|
||||
publishable-key="pk_live_51ITXBmJMfY1fWGMs2G0LAydJweIDMp2WaYocM0xyzdn03WaHUbMw6uxfVuktAkgpRyUql7tz7gF5OwdccEZLd6Ot00XX6tGoZx">
|
||||
</stripe-pricing-table>
|
||||
<stripe-pricing-table pricing-table-id="prctbl_1LpSqSJMfY1fWGMsxSNhPLsc"
|
||||
publishable-key="pk_live_51ITXBmJMfY1fWGMs2G0LAydJweIDMp2WaYocM0xyzdn03WaHUbMw6uxfVuktAkgpRyUql7tz7gF5OwdccEZLd6Ot00XX6tGoZx">
|
||||
</stripe-pricing-table>
|
||||
<stripe-pricing-table pricing-table-id="prctbl_1M6WpCJMfY1fWGMsQXFlZWcW"
|
||||
publishable-key="pk_live_51ITXBmJMfY1fWGMs2G0LAydJweIDMp2WaYocM0xyzdn03WaHUbMw6uxfVuktAkgpRyUql7tz7gF5OwdccEZLd6Ot00XX6tGoZx">
|
||||
</stripe-pricing-table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -66,7 +66,6 @@
|
||||
<option>Only DataBase</option>
|
||||
<option>Only Website</option>
|
||||
<option>Website and Database Both</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
{% extends "baseTemplate/newBase.html" %}
|
||||
{% load i18n %}
|
||||
{% block titleNew %}{% trans "Home - CyberPanel" %}{% endblock %}
|
||||
{% block newContent %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
<div ng-controller="BackupScheduleV2" class="p-8">
|
||||
<div>
|
||||
<p class="text-4xl font-bold">Backup File Configurations</p>
|
||||
</div>
|
||||
|
||||
<div class="py-4">
|
||||
<p class="text-xl font-bold">Schedule Backups</p>
|
||||
<img ng-hide="BackupScheduleLoading"
|
||||
src="{% static 'images/loading.gif' %}">
|
||||
</div>
|
||||
<hr>
|
||||
<form name="websiteCreationForm" action="/" id="createPackages">
|
||||
<div ng-hide="installationDetailsForm" class="flex mt-4 py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">Schedule Name</p>
|
||||
</div>
|
||||
<div>
|
||||
<input name="Hostname" type="text" class="w-80 bg-gray-100 rounded px-2 py-1"
|
||||
ng-model="ScheduleName"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
<span style="display: none" id="RemoteConfigID"> {{ RemoteConfigID }}</span>
|
||||
<div ng-hide="installationDetailsForm" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">Backup Frequency</p>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-model="Bfrequency"
|
||||
class="w-80 bg-gray-100 rounded px-2 py-1">
|
||||
<option>30 Minutes</option>
|
||||
<option>1 Hour</option>
|
||||
<option>6 Hours</option>
|
||||
<option>12 Hours</option>
|
||||
<option>1 Day</option>
|
||||
<option>3 Days</option>
|
||||
<option>1 Week</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="installationDetailsForm" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">Backup File Retention</p>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-model="Fretention"
|
||||
class="w-80 bg-gray-100 rounded px-2 py-1">
|
||||
<option>3 Days</option>
|
||||
<option>1 Week</option>
|
||||
<option>3 Weeks</option>
|
||||
<option>1 Month</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="installationDetailsForm" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">Backup Type</p>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-model="BackupType"
|
||||
class="w-80 bg-gray-100 rounded px-2 py-1">
|
||||
<option>Only DataBase</option>
|
||||
<option>Only Website</option>
|
||||
<option>Website and Database Both</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="installationDetailsForm" class="flex justify-center mt-3">
|
||||
<button ng-click="SaveBackupSchedule()"
|
||||
class="bg-orange-500 px-3 py-2 rounded-lg text-xl font-semibold text-white">
|
||||
Save Backup Schedule
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="py-4">
|
||||
<p class="text-xl font-bold">Configure Backup Schedules</p>
|
||||
</div>
|
||||
<div class="relative py-8 overflow-x-auto">
|
||||
<table class="w-full text-sm text-left rtl:text-right">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
ID
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
Schedule Name
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
Backup Frequency
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
Backup File Retention
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
Last Run
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
Remote Configuration
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
Action
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for sub in Backupschedule %}
|
||||
<tbody class="border shadow-lg py-3 px-6 rounded-b-lg">
|
||||
<tr>
|
||||
<td class="px-6 py-4 font-bold">
|
||||
{{ sub.id }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
{{ sub.Name }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
{{ sub.Frequency }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
{{ sub.Retention }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
{{ sub.LastRun }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
{{ sub.RemoteConfiguration }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
<button onclick="return false;"
|
||||
ng-click="getupdateid({{ sub.id }})"
|
||||
class="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded"
|
||||
href="#" data-modal-target="edit" data-modal-toggle="edit">{% trans "EDIT" %}
|
||||
</button>
|
||||
<div id="edit" tabindex="-1"
|
||||
class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full">
|
||||
<div class="relative p-4 w-full max-w-2xl max-h-full">
|
||||
<div class="relative bg-white shadow dark:bg-gray-700">
|
||||
<div class="flex items-center bg-blue-400 px-4 py-4">
|
||||
<p class="font-bold">Update Remote Backup Schedules</p>
|
||||
<img id="containerSettingLoading" src="/static/images/loading.gif"
|
||||
style="display: none;">
|
||||
<button type="button" data-modal-toggle="edit"
|
||||
class="absolute top-2 end-1 text-black bg-transparent hover:text-black rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center"
|
||||
data-modal-hide="edit">
|
||||
<svg class="w-3 h-3" aria-hidden="true"
|
||||
xmlns="http://www.w3.org/2000/svg" fill="none"
|
||||
viewBox="0 0 14 14">
|
||||
<path stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2"
|
||||
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
||||
</svg>
|
||||
<span class="sr-only">Close modal</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="p-4 md:p-5">
|
||||
<form name="containerSettingsForm" action="/">
|
||||
<div ng-hide="installationDetailsForm" class="flex mt-4 py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">Backup Frequency</p>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-model="RemoteFrequency"
|
||||
class="w-80 bg-gray-100 rounded px-2 py-1">
|
||||
<option>30 Minutes</option>
|
||||
<option>1 Hour</option>
|
||||
<option>6 Hours</option>
|
||||
<option>12 Hours</option>
|
||||
<option>1 Day</option>
|
||||
<option>3 Days</option>
|
||||
<option>1 Week</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="installationDetailsForm" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">Backup File Retention</p>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-model="RemoteFileretention"
|
||||
class="w-80 bg-gray-100 rounded px-2 py-1">
|
||||
<option>3 Days</option>
|
||||
<option>1 Week</option>
|
||||
<option>3 Weeks</option>
|
||||
<option>1 Month</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="flex justify-end gap-2 px-2 py-2">
|
||||
<button type="button" ng-disabled="savingSettings"
|
||||
class="bg-orange-500 font-bold px-2 py-2 text-white"
|
||||
ng-click="UpdateRemoteschedules()">Save
|
||||
</button>
|
||||
<button type="button" ng-disabled="savingSettings"
|
||||
class="bg-gray-200 font-bold px-2 py-2"
|
||||
data-modal-toggle="edit"
|
||||
data-modal-hide="edit">
|
||||
Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button aria-label=""
|
||||
onclick="DeleteBackupfileConfigNow('{% url 'BackupfileConfigV2' %}?ID={{ RemoteConfigID }}&DeleteID={{ sub.id }}')"
|
||||
type="button"
|
||||
class="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded">
|
||||
Delete
|
||||
</button>
|
||||
<a href="{% url 'AddRemoteBackupsiteV2' %}?ID={{ sub.id }}"
|
||||
aria-label=""
|
||||
type="button"
|
||||
class="mt-1 bg-orange-500 hover:bg-orange-700 text-white font-bold py-2 px-4 rounded">
|
||||
Add WordPress Sites
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,232 @@
|
||||
{% extends "baseTemplate/newBase.html" %}
|
||||
{% load i18n %}
|
||||
{% block titleNew %}{% trans "Home - CyberPanel" %}{% endblock %}
|
||||
{% block newContent %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
<div ng-controller="RemoteBackupConfigV2" class="p-8">
|
||||
<div>
|
||||
<p class="text-4xl font-bold">Remote Backup Configurations</p>
|
||||
</div>
|
||||
|
||||
<div class="py-4">
|
||||
<p class="text-xl font-bold">Configure Remote Backups</p>
|
||||
<img ng-hide="RemoteBackupLoading"
|
||||
src="{% static 'images/loading.gif' %}">
|
||||
</div>
|
||||
<hr>
|
||||
<form name="websiteCreationForm" action="/" id="createPackages">
|
||||
<div ng-hide="installationDetailsForm" class="flex mt-4 py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">Select Remote Backup Type</p>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-model="RemoteBackuptype" ng-change="SelectRemoteBackuptype()"
|
||||
class="w-80 bg-gray-100 rounded px-2 py-1">
|
||||
<option>SFTP</option>
|
||||
<option>S3</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="SFTPBackUpdiv" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">Hostname</p>
|
||||
</div>
|
||||
<div>
|
||||
<input name="Hostname" type="text" class="w-80 bg-gray-100 rounded px-2 py-1" ng-model="Hostname"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="SFTPBackUpdiv" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">Username</p>
|
||||
</div>
|
||||
<div>
|
||||
<input name="Username" type="text" class="w-80 bg-gray-100 rounded px-2 py-1" ng-model="Username"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="SFTPBackUpdiv" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">Password</p>
|
||||
</div>
|
||||
<div>
|
||||
<input name="Password" type="password" class="w-80 bg-gray-100 rounded px-2 py-1"
|
||||
ng-model="Password"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="SFTPBackUpdiv" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">path</p>
|
||||
</div>
|
||||
<div>
|
||||
<input name="path" type="path" class="w-80 bg-gray-100 rounded px-2 py-1" ng-model="path"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="Selectprovider" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">Choose Provider</p>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-model="Providervalue" ng-change="SelectProvidertype()"
|
||||
class="w-80 bg-gray-100 rounded px-2 py-1">
|
||||
<option selected="selected">Amazon</option>
|
||||
<option>Wasabi</option>
|
||||
<option>Backblaze</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="S3keyNamediv" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">Name</p>
|
||||
</div>
|
||||
<div>
|
||||
<input name="S3keyName" type="text" class="w-80 bg-gray-100 rounded px-2 py-1" ng-model="S3keyName"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="EndpointURLdiv" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">Endpoint URL</p>
|
||||
</div>
|
||||
<div>
|
||||
<input name="EndpointURL" type="text" class="w-80 bg-gray-100 rounded px-2 py-1"
|
||||
ng-model="EndpointURL"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="Accesskeydiv" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">Access Key</p>
|
||||
</div>
|
||||
<div>
|
||||
<input name="Accesskey" type="text" class="w-80 bg-gray-100 rounded px-2 py-1" ng-model="Accesskey"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="SecretKeydiv" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">Secret Key</p>
|
||||
</div>
|
||||
<div>
|
||||
<input name="SecretKey" type="password" class="w-80 bg-gray-100 rounded px-2 py-1"
|
||||
ng-model="SecretKey"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="installationDetailsForm" class="flex justify-center mt-3">
|
||||
<button ng-click="SaveBackupConfig()"
|
||||
class="bg-orange-500 px-3 py-2 rounded-lg text-xl font-semibold text-white">
|
||||
Save Configurations
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="py-4">
|
||||
<p class="text-xl font-bold">Saved Remote Configuration</p>
|
||||
</div>
|
||||
<div class="relative py-8 overflow-x-auto">
|
||||
<table class="w-full text-sm text-left rtl:text-right">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
Backup Type
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
HostName
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
Path / Key Name
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
Action
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for sub in backupconfigs %}
|
||||
<tbody class="border shadow-lg py-3 px-6 rounded-b-lg">
|
||||
<tr>
|
||||
<td class="px-6 py-4 font-bold">
|
||||
{{ sub.Type }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
{{ sub.HostName }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
{{ sub.Path }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
<a href="{% url 'BackupfileConfigV2' %}?ID={{ sub.id }}"
|
||||
aria-label=""
|
||||
type="button"
|
||||
class="bg-orange-500 hover:bg-orange-700 text-white font-bold py-2 px-4 rounded">
|
||||
Schedule Backups
|
||||
</a>
|
||||
<button
|
||||
aria-label=""
|
||||
onclick="DeleteBackupConfigNow('{% url 'RemoteBackupConfig' %}?DeleteID={{ sub.id }}')"
|
||||
type="button"
|
||||
class="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded">
|
||||
Delete
|
||||
</button>
|
||||
{# <a>#}
|
||||
{# <button data-modal-target="Deletewpsite" data-modal-toggle="Deletewpsite"#}
|
||||
{# class="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded"#}
|
||||
{# type="button"#}
|
||||
{# onclick="DeleteBackupConfigNow('{% url 'RemoteBackupConfig' %}?DeleteID={{ sub.id }}')">#}
|
||||
{# Delete#}
|
||||
{# </button>#}
|
||||
{# <div id="Deletewpsite" tabindex="-1"#}
|
||||
{# class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full">#}
|
||||
{# <div class="relative p-4 w-full max-w-md max-h-full">#}
|
||||
{# <div class="relative bg-white rounded-lg shadow dark:bg-gray-700">#}
|
||||
{# <button type="button" data-modal-toggle="Deletewpsite"#}
|
||||
{# class="absolute top-3 end-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white"#}
|
||||
{# data-modal-hide="Deletewpsite">#}
|
||||
{# <svg class="w-3 h-3" aria-hidden="true"#}
|
||||
{# xmlns="http://www.w3.org/2000/svg" fill="none"#}
|
||||
{# viewBox="0 0 14 14">#}
|
||||
{# <path stroke="currentColor" stroke-linecap="round"#}
|
||||
{# stroke-linejoin="round" stroke-width="2"#}
|
||||
{# d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>#}
|
||||
{# </svg>#}
|
||||
{# <span class="sr-only">Close modal</span>#}
|
||||
{# </button>#}
|
||||
{# <div class="p-4 md:p-5 text-center">#}
|
||||
{# <svg class="mx-auto mb-4 text-gray-400 w-12 h-12 dark:text-gray-200"#}
|
||||
{# aria-hidden="true"#}
|
||||
{# xmlns="http://www.w3.org/2000/svg" fill="none"#}
|
||||
{# viewBox="0 0 20 20">#}
|
||||
{# <path stroke="currentColor" stroke-linecap="round"#}
|
||||
{# stroke-linejoin="round" stroke-width="2"#}
|
||||
{# d="M10 11V6m0 8h.01M19 10a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>#}
|
||||
{# </svg>#}
|
||||
{# <h3 class="mb-5 text-lg font-normal text-gray-500 dark:text-gray-400">#}
|
||||
{# Are you sure you want to#}
|
||||
{# delete this site?</h3>#}
|
||||
{# <button data-modal-hide="Deletewpsite" type="button"#}
|
||||
{# data-modal-toggle="Deletewpsite"#}
|
||||
{# onclick="FinalDeleteWPNow()"#}
|
||||
{# class="text-white bg-red-600 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center me-2">#}
|
||||
{# Yes, I'm sure#}
|
||||
{# </button>#}
|
||||
{# <button data-modal-hide="Deletewpsite" type="button"#}
|
||||
{# data-modal-toggle="Deletewpsite"#}
|
||||
{# class="text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600">#}
|
||||
{# No, cancel#}
|
||||
{# </button>#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
{# </a>#}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -7,35 +7,116 @@
|
||||
|
||||
<div ng-controller="listWebsitesV2" class="p-8">
|
||||
<div>
|
||||
<p class="text-4xl font-bold">Restore Backups</p>
|
||||
<p class="text-xs text-gray-600 py-2 font-semibold">On this page you can restore,list,modify and
|
||||
delete backup wordpress sites
|
||||
from your server</p>
|
||||
<p id="domainNamePage" class="text-4xl font-bold">List Backups</p>
|
||||
<p class="text-xs text-gray-600 py-2 font-semibold">On this page you can Restore, list, modify and delete
|
||||
Backups Wordpress Sites from your server.</p>
|
||||
</div>
|
||||
<div>
|
||||
<div class="py-4">
|
||||
{# <p class="text-xl font-bold">Website Details</p>#}
|
||||
<div class="flex py-4">
|
||||
<p class="text-xl font-bold">List Backups</p>
|
||||
<img ng-hide="cyberPanelLoading" src="{% static 'images/loading.gif' %}">
|
||||
</div>
|
||||
<hr>
|
||||
<div>
|
||||
<div class="flex mt-4 py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">Choose Restoring Method</p>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-model="packageForWebsite" class="form-control w-80 bg-gray-100 rounded px-2 py-1">
|
||||
{% for items in packageList %}
|
||||
<option>{{ items }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="relative py-8 overflow-x-auto">
|
||||
<table class="w-full text-sm text-left rtl:text-right">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
ID
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
Website
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
Type
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
Backup Destination
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
Action
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for sub in job %}
|
||||
<tbody class="border shadow-lg py-3 px-6 rounded-b-lg">
|
||||
<tr>
|
||||
<td class="px-6 py-4 font-bold">
|
||||
{{ sub.id }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
{{ sub.title }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
{{ sub.Backuptype }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
{{ sub.BackupDestination }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
<a href="{% url 'RestoreHomeV2' %}?BackupID={{ sub.id }}"
|
||||
aria-label=""
|
||||
type="button"
|
||||
class="bg-orange-500 hover:bg-orange-700 text-white font-bold py-2 px-4 rounded">
|
||||
Restore
|
||||
</a>
|
||||
<a>
|
||||
<button data-modal-target="Deletewpsite" data-modal-toggle="Deletewpsite"
|
||||
class="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded"
|
||||
type="button"
|
||||
onclick="DeleteWPNow('{% url 'RestoreBackupsV2' %}?DeleteID={{ sub.id }}')">
|
||||
Delete
|
||||
</button>
|
||||
<div id="Deletewpsite" tabindex="-1"
|
||||
class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full">
|
||||
<div class="relative p-4 w-full max-w-md max-h-full">
|
||||
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700">
|
||||
<button type="button" data-modal-toggle="Deletewpsite"
|
||||
class="absolute top-3 end-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white"
|
||||
data-modal-hide="Deletewpsite">
|
||||
<svg class="w-3 h-3" aria-hidden="true"
|
||||
xmlns="http://www.w3.org/2000/svg" fill="none"
|
||||
viewBox="0 0 14 14">
|
||||
<path stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2"
|
||||
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
||||
</svg>
|
||||
<span class="sr-only">Close modal</span>
|
||||
</button>
|
||||
<div class="p-4 md:p-5 text-center">
|
||||
<svg class="mx-auto mb-4 text-gray-400 w-12 h-12 dark:text-gray-200"
|
||||
aria-hidden="true"
|
||||
xmlns="http://www.w3.org/2000/svg" fill="none"
|
||||
viewBox="0 0 20 20">
|
||||
<path stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2"
|
||||
d="M10 11V6m0 8h.01M19 10a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>
|
||||
</svg>
|
||||
<h3 class="mb-5 text-lg font-normal text-gray-500 dark:text-gray-400">
|
||||
Are you sure you want to
|
||||
delete this site?</h3>
|
||||
<button data-modal-hide="Deletewpsite" type="button"
|
||||
data-modal-toggle="Deletewpsite"
|
||||
onclick="FinalDeleteWPNow()"
|
||||
class="text-white bg-red-600 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center me-2">
|
||||
Yes, I'm sure
|
||||
</button>
|
||||
<button data-modal-hide="Deletewpsite" type="button"
|
||||
data-modal-toggle="Deletewpsite"
|
||||
class="text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600">
|
||||
No, cancel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-center mt-3">
|
||||
<button ng-click="goBack()" class="bg-orange-500 px-3 py-4 rounded-lg text-xl font-semibold text-white">
|
||||
Restore Backup Now
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
|
||||
{% load static %}
|
||||
|
||||
<div class="p-8">
|
||||
<div class="flex lg:flex-row justify-between items-center sm:flex-col">
|
||||
<div ng-controller="listTableUsersV2" class="p-8">
|
||||
<div class="lg:flex justify-between items-center sm:flex-row">
|
||||
<div>
|
||||
<p class="text-4xl font-bold">Configure Plugin</p>
|
||||
<p id="domainNamePage" class="text-4xl font-bold">Configure Plugin</p>
|
||||
<p class="text-xs text-gray-600 py-2 font-semibold">You can configure list of plugins that will
|
||||
automatically get installed while deploying WordPress.</p>
|
||||
</div>
|
||||
@@ -23,8 +23,10 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="py-4">
|
||||
<div class="flex py-4">
|
||||
<p class="text-xl font-bold">Plugin Buckets</p>
|
||||
<img ng-hide="cyberpanelLoading"
|
||||
src="{% static 'images/loading.gif' %}">
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
@@ -40,8 +42,62 @@
|
||||
<div class="w-80 px-4 py-1">{{ sub.id }}</div>
|
||||
<div class="w-80 px-4 py-1">{{ sub.Name }}</div>
|
||||
<div class="w-80 px-4 py-1">
|
||||
<a href="{% url 'EidtPluginV2' %}?ID={{ sub.id }}"><button class="bg-orange-500 hover:bg-orange-700 text-white font-bold py-1 px-4 rounded">EDIT</button></a>
|
||||
<button onclick="DeletePluginBuucket('{% url 'ConfigurePlugins' %}?delete={{ sub.id }}')" class="bg-red-500 hover:bg-red-700 text-white font-bold py-1 px-4 rounded">DELETE</button>
|
||||
<a href="{% url 'EidtPluginV2' %}?ID={{ sub.id }}">
|
||||
<button class="bg-orange-500 hover:bg-orange-700 text-white font-bold py-1 px-4 rounded">
|
||||
EDIT
|
||||
</button>
|
||||
</a>
|
||||
<a>
|
||||
<button data-modal-target="Deletewpsite" data-modal-toggle="Deletewpsite"
|
||||
class="bg-red-500 hover:bg-red-700 text-white font-bold py-1 px-4 rounded"
|
||||
type="button"
|
||||
onclick="DeletePluginBuucket('{% url 'ConfigurePluginsV2' %}?delete={{ sub.id }}')">
|
||||
Delete
|
||||
</button>
|
||||
<div id="Deletewpsite" tabindex="-1"
|
||||
class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full">
|
||||
<div class="relative p-4 w-full max-w-md max-h-full">
|
||||
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700">
|
||||
<button type="button" data-modal-toggle="Deletewpsite"
|
||||
class="absolute top-3 end-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white"
|
||||
data-modal-hide="Deletewpsite">
|
||||
<svg class="w-3 h-3" aria-hidden="true"
|
||||
xmlns="http://www.w3.org/2000/svg" fill="none"
|
||||
viewBox="0 0 14 14">
|
||||
<path stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2"
|
||||
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
||||
</svg>
|
||||
<span class="sr-only">Close modal</span>
|
||||
</button>
|
||||
<div class="p-4 md:p-5 text-center">
|
||||
<svg class="mx-auto mb-4 text-gray-400 w-12 h-12 dark:text-gray-200"
|
||||
aria-hidden="true"
|
||||
xmlns="http://www.w3.org/2000/svg" fill="none"
|
||||
viewBox="0 0 20 20">
|
||||
<path stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2"
|
||||
d="M10 11V6m0 8h.01M19 10a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>
|
||||
</svg>
|
||||
<h3 class="mb-5 text-lg font-normal text-gray-500 dark:text-gray-400">
|
||||
Are you sure you want to
|
||||
delete this WordPress site?</h3>
|
||||
<button data-modal-hide="Deletewpsite" type="button"
|
||||
data-modal-toggle="Deletewpsite"
|
||||
onclick="FinalDeletePluginBuucket()"
|
||||
class="text-white bg-red-600 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center me-2">
|
||||
Yes, I'm sure
|
||||
</button>
|
||||
<button data-modal-hide="Deletewpsite" type="button"
|
||||
data-modal-toggle="Deletewpsite"
|
||||
class="text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600">
|
||||
No, cancel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
</div>
|
||||
<div ng-hide="installationDetailsForm" class="flex justify-center mt-3">
|
||||
<button ng-click="createWordPresssite()"
|
||||
class="bg-orange-500 px-3 py-4 rounded-lg text-xl font-semibold text-white">
|
||||
class="bg-orange-500 px-3 py-2 rounded-lg text-xl font-semibold text-white">
|
||||
Create Website
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<div class="p-4">
|
||||
<span id="pluginbID" style="display: none">{{ pluginbID }}</span>
|
||||
<div ng-controller="WPAddNewPlugin" class="panel">
|
||||
<div ng-controller="WPAddNewPluginV2" class="panel">
|
||||
<div>
|
||||
<div>
|
||||
<h2 class="font-bold text-xl">{{ BucketName }}</h2>
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
{% for i in WPsites %}
|
||||
<option value="{{ i.id }}">{{ i.FinalURL }}</option>
|
||||
{% endfor %}
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
@@ -63,7 +62,6 @@
|
||||
{% for i in WPsites %}
|
||||
<option value="{{ i.id }}">{{ i.FinalURL }}</option>
|
||||
{% endfor %}
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
127
websiteFunctions/templates/websiteFunctions/WPRestoreHomeV2.html
Normal file
127
websiteFunctions/templates/websiteFunctions/WPRestoreHomeV2.html
Normal file
@@ -0,0 +1,127 @@
|
||||
{% extends "baseTemplate/newBase.html" %}
|
||||
{% load i18n %}
|
||||
{% block titleNew %}{% trans "Home - CyberPanel" %}{% endblock %}
|
||||
{% block newContent %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
<div ng-controller="RestoreWPBackupV2" class="p-8">
|
||||
<div>
|
||||
<p id="domainNamePage" class="text-4xl font-bold">Restore Backups</p>
|
||||
<p class="text-xs text-gray-600 py-2 font-semibold">On this page you can Restore, list, modify and delete
|
||||
Backups Wordpress Sites from your server.</p>
|
||||
</div>
|
||||
<div class="flex gap-3 py-4 items-center">
|
||||
<p id="backupid" class="text-xl font-bold text-white px-1 bg-orange-500">{{ backupobj.id }}</p>
|
||||
<p id="backuptype" class="text-xl font-bold">{{ Backuptype }}</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="flex py-4 items-center">
|
||||
<p class="text-xl font-bold"> {{ FileName }} </p>
|
||||
<img id="wordpresshomeloading" style="display: none"
|
||||
src="{% static 'images/loading.gif' %}">
|
||||
</div>
|
||||
<hr>
|
||||
<form name="websiteCreationForm" action="/" id="createPackages">
|
||||
{% if Backuptype == "DataBase Backup" %}
|
||||
<div id="exinstingsitedivDB" ng-hide="installationDetailsForm" class="flex mt-4 py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">Choose WPsite Restore Destination</p>
|
||||
</div>
|
||||
<div>
|
||||
<select id="DesSite" class="w-80 bg-gray-100 rounded px-2 py-1" required>
|
||||
<option value="-1">Select WordPress Site</option>
|
||||
{% for i in WPsites %}
|
||||
<option value="{{ i.id }}">{{ i.FinalURL }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div ng-hide="installationDetailsForm" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">Choose Restoring Method</p>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-click="checkmethode()" id="RestoreMethode" class="w-80 bg-gray-100 rounded px-2 py-1"
|
||||
required>
|
||||
<option value="-1">Select Method</option>
|
||||
<option value="1">Restore to New Site</option>
|
||||
<option value="0">Restore to Existing Site</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id="exinstingsitediv" ng-hide="installationDetailsForm" style="display: none"
|
||||
class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">Choose WPsite Restore Destination</p>
|
||||
</div>
|
||||
<div>
|
||||
<select id="DesSite" class="w-80 bg-gray-100 rounded px-2 py-1" required>
|
||||
<option value="-1">Select WordPress Site</option>
|
||||
{% for i in WPsites %}
|
||||
<option value="{{ i.id }}">{{ i.FinalURL }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id="Newsitediv" ng-hide="installationDetailsForm" style="display: none" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">Domain Name</p>
|
||||
</div>
|
||||
<div>
|
||||
<input ng-model="domainNameCreate" id="wprestoresubdirdomain"
|
||||
class="w-80 bg-gray-100 rounded px-2 py-1"
|
||||
type="text" value="55"
|
||||
name="wprestoresubdirdomain"
|
||||
style="display: block;"
|
||||
placeholder="{% trans "Do not enter WWW, it will be auto created!" %}">
|
||||
<input id="wprestoresubdirpath" class="w-80 bg-gray-100 rounded px-2 py-1 mt-2"
|
||||
placeholder="{% trans "Leave empty for default" %}"
|
||||
type="text" value="Leave empty for default"
|
||||
name="wprestoresubdirpath" ng-model="installPath"
|
||||
style="display: block;">
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div ng-model="installationDetailsForm" class="flex justify-center mt-3">
|
||||
<button id="RestoreWPbackupNow"
|
||||
ng-click="RestoreWPbackupNow()"
|
||||
class="bg-orange-500 px-3 py-2 rounded-lg text-xl font-semibold text-white">
|
||||
Restore Backup Now
|
||||
</button>
|
||||
</div>
|
||||
<div ng-hide="installationProgress" class="form-group">
|
||||
|
||||
<div class="flex justify-center font-bold text-xl">
|
||||
<h2>{$ currentStatus $}</h2>
|
||||
</div>
|
||||
<div class="w-full bg-gray-100 rounded-full mt-3">
|
||||
<div id="installProgressbackup"
|
||||
class="bg-green-600 text-xs font-medium text-white text-center p-2 leading-none rounded-full"
|
||||
style="width:0%">
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="errorMessageBox"
|
||||
class="flex justify-center bg-red-500 rounded-lg text-white px-2 py-1 font-semibold">
|
||||
<p>{% trans "Error message:" %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
<div ng-hide="success" class="flex justify-center bg-green-500 px-2 rounded-lg py-1 font-semibold">
|
||||
<p>{% trans "Backup succesfully created." %}</p>
|
||||
</div>
|
||||
<div ng-hide="couldNotConnect"
|
||||
class="flex justify-center bg-red-500 rounded-lg text-white px-2 py-1 font-semibold">
|
||||
<p>{% trans "Could not connect to server. Please refresh this page." %}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-hide="installationProgress" class="flex justify-center mt-3">
|
||||
<button ng-disabled="goBackDisable"
|
||||
ng-click="goBack()"
|
||||
class="bg-blue-500 px-3 py-2 rounded-lg text-xl font-semibold text-white">
|
||||
Go Back
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -14,128 +14,250 @@
|
||||
from your server</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="py-8 overflow-x-auto">
|
||||
<div class="px-5">
|
||||
<table>
|
||||
<thead>
|
||||
<div>
|
||||
<tr>
|
||||
<th class="w-72 text-xl">Wordpress Site Title</th>
|
||||
<th class="w-52 text-xl">Login</th>
|
||||
<th class="w-52 text-xl">Domain</th>
|
||||
<th class="w-52 text-xl">Action</th>
|
||||
</tr>
|
||||
</div>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="rounded-lg px-3 mt-5">
|
||||
<div class="px-2">
|
||||
{% for sub in wpsite %}
|
||||
<div class="border shadow-lg py-3 mb-3 rounded-b-lg">
|
||||
<table>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<th class="w-72 pt-2 font-semibold text-sm"><a
|
||||
href="{% url 'WPHomeV2' %}?ID={{ sub.id }}">
|
||||
<p style="font-weight: bold; text-transform: uppercase; ">{{ sub.title }}</p>
|
||||
</a>
|
||||
</th>
|
||||
<th class="w-52 pt-2 font-semibold text-sm flex justify-center">
|
||||
<a title="Auto Login"
|
||||
style="margin-right: 2%; margin-left: 10px;"
|
||||
target="_blank"
|
||||
href="{% url 'AutoLogin' %}?id={{ sub.id }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img"
|
||||
width="20"
|
||||
style="margin: 3px;" height="20"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
viewBox="0 0 16 16">
|
||||
<g fill="#006600">
|
||||
<path d="M12.633 7.653c0-.848-.305-1.435-.566-1.892l-.08-.13c-.317-.51-.594-.958-.594-1.48c0-.63.478-1.218 1.152-1.218c.02 0 .039.002.058.003l.031.003A6.838 6.838 0 0 0 8 1.137A6.855 6.855 0 0 0 2.266 4.23c.16.005.313.009.442.009c.717 0 1.828-.087 1.828-.087c.37-.022.414.521.044.565c0 0-.371.044-.785.065l2.5 7.434l1.5-4.506l-1.07-2.929c-.369-.022-.719-.065-.719-.065c-.37-.022-.326-.588.043-.566c0 0 1.134.087 1.808.087c.718 0 1.83-.087 1.83-.087c.37-.022.413.522.043.566c0 0-.372.043-.785.065l2.48 7.377l.684-2.287l.054-.173c.27-.86.469-1.495.469-2.046zM1.137 8a6.864 6.864 0 0 0 3.868 6.176L1.73 5.206A6.837 6.837 0 0 0 1.137 8z"></path>
|
||||
<path d="M6.061 14.583L8.121 8.6l2.109 5.78c.014.033.03.064.049.094a6.854 6.854 0 0 1-4.218.109zm7.96-9.876c.03.219.047.453.047.706c0 .696-.13 1.479-.522 2.458l-2.096 6.06a6.86 6.86 0 0 0 2.572-9.224z"></path>
|
||||
<path fill-rule="evenodd"
|
||||
d="M0 8c0-4.411 3.589-8 8-8c4.41 0 8 3.589 8 8s-3.59 8-8 8c-4.411 0-8-3.589-8-8zm.367 0c0 4.209 3.424 7.633 7.633 7.633c4.208 0 7.632-3.424 7.632-7.633C15.632 3.79 12.208.367 8 .367C3.79.367.367 3.79.367 8z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
</a>
|
||||
</th>
|
||||
<th class="w-52 pt-2 font-semibold text-sm"><a target="_blank"
|
||||
style="color: #6aa7ff"
|
||||
href="http://{{ sub.url }}">Visit
|
||||
<i class="glyph-icon icon-external-link-square"
|
||||
title="{{ sub.url }}"></i></a>
|
||||
</th>
|
||||
<th class="w-52 pt-2 font-semibold text-sm">
|
||||
<div class="flex items-center justify-center">
|
||||
|
||||
<button data-modal-target="Deletewpsite" data-modal-toggle="Deletewpsite"
|
||||
class="block text-white bg-orange-500 hover:bg-orange-700 font-medium rounded-lg text-sm px-5 py-2.5 text-center"
|
||||
type="button"
|
||||
onclick="DeleteWPNowV2('{% url 'ListWPSitesV2' %}?DeleteID={{ sub.id }}')">
|
||||
Delete
|
||||
</button>
|
||||
|
||||
<div id="Deletewpsite" tabindex="-1"
|
||||
class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full">
|
||||
<div class="relative p-4 w-full max-w-md max-h-full">
|
||||
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700">
|
||||
<button type="button" data-modal-toggle="Deletewpsite"
|
||||
class="absolute top-3 end-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white"
|
||||
data-modal-hide="Deletewpsite">
|
||||
<svg class="w-3 h-3" aria-hidden="true"
|
||||
xmlns="http://www.w3.org/2000/svg" fill="none"
|
||||
viewBox="0 0 14 14">
|
||||
<path stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2"
|
||||
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
||||
</svg>
|
||||
<span class="sr-only">Close modal</span>
|
||||
</button>
|
||||
<div class="p-4 md:p-5 text-center">
|
||||
<svg class="mx-auto mb-4 text-gray-400 w-12 h-12 dark:text-gray-200"
|
||||
aria-hidden="true"
|
||||
xmlns="http://www.w3.org/2000/svg" fill="none"
|
||||
viewBox="0 0 20 20">
|
||||
<path stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2"
|
||||
d="M10 11V6m0 8h.01M19 10a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>
|
||||
</svg>
|
||||
<h3 class="mb-5 text-lg font-normal text-gray-500 dark:text-gray-400">
|
||||
Are you sure you want to
|
||||
delete this WordPress site?</h3>
|
||||
<button data-modal-hide="Deletewpsite" type="button"
|
||||
data-modal-toggle="Deletewpsite"
|
||||
onclick="FinalDeleteWPNowV2()"
|
||||
class="text-white bg-red-600 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center me-2">
|
||||
Yes, I'm sure
|
||||
</button>
|
||||
<button data-modal-hide="Deletewpsite" type="button"
|
||||
data-modal-toggle="Deletewpsite"
|
||||
class="text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600">
|
||||
No, cancel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="relative py-8 overflow-x-auto">
|
||||
<table class="w-full text-sm text-left rtl:text-right">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="px-6 py-3 text-xl w-52">
|
||||
<div class="flex justify-center">
|
||||
Wordpress Site Title
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3 text-xl w-52">
|
||||
<div class="flex justify-center">
|
||||
Login
|
||||
</div>
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3 text-xl w-52">
|
||||
<div class="flex justify-center">
|
||||
Domain
|
||||
</div>
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3 text-xl w-52">
|
||||
<div class="flex justify-center">
|
||||
Action
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for sub in wpsite %}
|
||||
<tbody class="border shadow-lg py-3 px-6 rounded-b-lg">
|
||||
<tr>
|
||||
<td class="px-6 py-4 w-72">
|
||||
<div class="flex justify-center">
|
||||
<a style="font-weight: bold; text-transform: uppercase;"
|
||||
href="{% url 'WPHomeV2' %}?ID={{ sub.id }}">
|
||||
<p>{{ sub.title }}</p>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-6 py-4 w-52">
|
||||
<div class="flex justify-center">
|
||||
<a title="Auto Login"
|
||||
target="_blank"
|
||||
href="{% url 'AutoLogin' %}?id={{ sub.id }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img"
|
||||
width="20"
|
||||
style="margin: 3px;" height="20"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
viewBox="0 0 16 16">
|
||||
<g fill="#006600">
|
||||
<path d="M12.633 7.653c0-.848-.305-1.435-.566-1.892l-.08-.13c-.317-.51-.594-.958-.594-1.48c0-.63.478-1.218 1.152-1.218c.02 0 .039.002.058.003l.031.003A6.838 6.838 0 0 0 8 1.137A6.855 6.855 0 0 0 2.266 4.23c.16.005.313.009.442.009c.717 0 1.828-.087 1.828-.087c.37-.022.414.521.044.565c0 0-.371.044-.785.065l2.5 7.434l1.5-4.506l-1.07-2.929c-.369-.022-.719-.065-.719-.065c-.37-.022-.326-.588.043-.566c0 0 1.134.087 1.808.087c.718 0 1.83-.087 1.83-.087c.37-.022.413.522.043.566c0 0-.372.043-.785.065l2.48 7.377l.684-2.287l.054-.173c.27-.86.469-1.495.469-2.046zM1.137 8a6.864 6.864 0 0 0 3.868 6.176L1.73 5.206A6.837 6.837 0 0 0 1.137 8z"></path>
|
||||
<path d="M6.061 14.583L8.121 8.6l2.109 5.78c.014.033.03.064.049.094a6.854 6.854 0 0 1-4.218.109zm7.96-9.876c.03.219.047.453.047.706c0 .696-.13 1.479-.522 2.458l-2.096 6.06a6.86 6.86 0 0 0 2.572-9.224z"></path>
|
||||
<path fill-rule="evenodd"
|
||||
d="M0 8c0-4.411 3.589-8 8-8c4.41 0 8 3.589 8 8s-3.59 8-8 8c-4.411 0-8-3.589-8-8zm.367 0c0 4.209 3.424 7.633 7.633 7.633c4.208 0 7.632-3.424 7.632-7.633C15.632 3.79 12.208.367 8 .367C3.79.367.367 3.79.367 8z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-6 py-4 w-52">
|
||||
<div class="flex justify-center">
|
||||
<a style="color: #6aa7ff; font-weight: bold;" target="_blank"
|
||||
href="http://{{ sub.url }}">Visit
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-6 py-4 w-52">
|
||||
<div class="flex items-center justify-center">
|
||||
<button data-modal-target="Deletewpsite" data-modal-toggle="Deletewpsite"
|
||||
class="block text-white bg-orange-500 hover:bg-orange-700 font-medium rounded-lg text-sm px-5 py-2.5 text-center"
|
||||
type="button"
|
||||
onclick="DeleteWPNowV2('{% url 'ListWPSitesV2' %}?DeleteID={{ sub.id }}')">
|
||||
Delete
|
||||
</button>
|
||||
<div id="Deletewpsite" tabindex="-1"
|
||||
class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full">
|
||||
<div class="relative p-4 w-full max-w-md max-h-full">
|
||||
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700">
|
||||
<button type="button" data-modal-toggle="Deletewpsite"
|
||||
class="absolute top-3 end-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white"
|
||||
data-modal-hide="Deletewpsite">
|
||||
<svg class="w-3 h-3" aria-hidden="true"
|
||||
xmlns="http://www.w3.org/2000/svg" fill="none"
|
||||
viewBox="0 0 14 14">
|
||||
<path stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2"
|
||||
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
||||
</svg>
|
||||
<span class="sr-only">Close modal</span>
|
||||
</button>
|
||||
<div class="p-4 md:p-5 text-center">
|
||||
<svg class="mx-auto mb-4 text-gray-400 w-12 h-12 dark:text-gray-200"
|
||||
aria-hidden="true"
|
||||
xmlns="http://www.w3.org/2000/svg" fill="none"
|
||||
viewBox="0 0 20 20">
|
||||
<path stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2"
|
||||
d="M10 11V6m0 8h.01M19 10a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>
|
||||
</svg>
|
||||
<h3 class="mb-5 text-lg font-normal text-gray-500 dark:text-gray-400">
|
||||
Are you sure you want to
|
||||
delete this WordPress site?</h3>
|
||||
<button data-modal-hide="Deletewpsite" type="button"
|
||||
data-modal-toggle="Deletewpsite"
|
||||
onclick="FinalDeleteWPNowV2()"
|
||||
class="text-white bg-red-600 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center me-2">
|
||||
Yes, I'm sure
|
||||
</button>
|
||||
<button data-modal-hide="Deletewpsite" type="button"
|
||||
data-modal-toggle="Deletewpsite"
|
||||
class="text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600">
|
||||
No, cancel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{# <div class="py-8 overflow-x-auto">#}
|
||||
{# <div class="px-5">#}
|
||||
{# <table>#}
|
||||
{# <thead>#}
|
||||
{# <div>#}
|
||||
{# <tr>#}
|
||||
{# <th class="w-72 text-xl">Wordpress Site Title</th>#}
|
||||
{# <th class="w-52 text-xl">Login</th>#}
|
||||
{# <th class="w-52 text-xl">Domain</th>#}
|
||||
{# <th class="w-52 text-xl">Action</th>#}
|
||||
{# </tr>#}
|
||||
{# </div>#}
|
||||
{# </thead>#}
|
||||
{# </table>#}
|
||||
{# </div>#}
|
||||
{##}
|
||||
{# <div class="rounded-lg px-3 mt-5">#}
|
||||
{# <div class="px-2">#}
|
||||
{# {% for sub in wpsite %}#}
|
||||
{# <div class="border shadow-lg py-3 mb-3 rounded-b-lg">#}
|
||||
{# <table>#}
|
||||
{# <tbody>#}
|
||||
{##}
|
||||
{# <tr>#}
|
||||
{# <th class="w-72 pt-2 font-semibold text-sm"><a#}
|
||||
{# href="{% url 'WPHomeV2' %}?ID={{ sub.id }}">#}
|
||||
{# <p style="font-weight: bold; text-transform: uppercase; ">{{ sub.title }}</p>#}
|
||||
{# </a>#}
|
||||
{# </th>#}
|
||||
{# <th class="w-52 pt-2 font-semibold text-sm flex justify-center">#}
|
||||
{# <a title="Auto Login"#}
|
||||
{# style="margin-right: 2%; margin-left: 10px;"#}
|
||||
{# target="_blank"#}
|
||||
{# href="{% url 'AutoLogin' %}?id={{ sub.id }}">#}
|
||||
{# <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img"#}
|
||||
{# width="20"#}
|
||||
{# style="margin: 3px;" height="20"#}
|
||||
{# preserveAspectRatio="xMidYMid meet"#}
|
||||
{# viewBox="0 0 16 16">#}
|
||||
{# <g fill="#006600">#}
|
||||
{# <path d="M12.633 7.653c0-.848-.305-1.435-.566-1.892l-.08-.13c-.317-.51-.594-.958-.594-1.48c0-.63.478-1.218 1.152-1.218c.02 0 .039.002.058.003l.031.003A6.838 6.838 0 0 0 8 1.137A6.855 6.855 0 0 0 2.266 4.23c.16.005.313.009.442.009c.717 0 1.828-.087 1.828-.087c.37-.022.414.521.044.565c0 0-.371.044-.785.065l2.5 7.434l1.5-4.506l-1.07-2.929c-.369-.022-.719-.065-.719-.065c-.37-.022-.326-.588.043-.566c0 0 1.134.087 1.808.087c.718 0 1.83-.087 1.83-.087c.37-.022.413.522.043.566c0 0-.372.043-.785.065l2.48 7.377l.684-2.287l.054-.173c.27-.86.469-1.495.469-2.046zM1.137 8a6.864 6.864 0 0 0 3.868 6.176L1.73 5.206A6.837 6.837 0 0 0 1.137 8z"></path>#}
|
||||
{# <path d="M6.061 14.583L8.121 8.6l2.109 5.78c.014.033.03.064.049.094a6.854 6.854 0 0 1-4.218.109zm7.96-9.876c.03.219.047.453.047.706c0 .696-.13 1.479-.522 2.458l-2.096 6.06a6.86 6.86 0 0 0 2.572-9.224z"></path>#}
|
||||
{# <path fill-rule="evenodd"#}
|
||||
{# d="M0 8c0-4.411 3.589-8 8-8c4.41 0 8 3.589 8 8s-3.59 8-8 8c-4.411 0-8-3.589-8-8zm.367 0c0 4.209 3.424 7.633 7.633 7.633c4.208 0 7.632-3.424 7.632-7.633C15.632 3.79 12.208.367 8 .367C3.79.367.367 3.79.367 8z"></path>#}
|
||||
{# </g>#}
|
||||
{# </svg>#}
|
||||
{# </a>#}
|
||||
{# </th>#}
|
||||
{# <th class="w-52 pt-2 font-semibold text-sm"><a target="_blank"#}
|
||||
{# style="color: #6aa7ff"#}
|
||||
{# href="http://{{ sub.url }}">Visit#}
|
||||
{# <i class="glyph-icon icon-external-link-square"#}
|
||||
{# title="{{ sub.url }}"></i></a>#}
|
||||
{# </th>#}
|
||||
{# <th class="w-52 pt-2 font-semibold text-sm">#}
|
||||
{# <div class="flex items-center justify-center">#}
|
||||
{##}
|
||||
{# <button data-modal-target="Deletewpsite" data-modal-toggle="Deletewpsite"#}
|
||||
{# class="block text-white bg-orange-500 hover:bg-orange-700 font-medium rounded-lg text-sm px-5 py-2.5 text-center"#}
|
||||
{# type="button"#}
|
||||
{# onclick="DeleteWPNowV2('{% url 'ListWPSitesV2' %}?DeleteID={{ sub.id }}')">#}
|
||||
{# Delete#}
|
||||
{# </button>#}
|
||||
{##}
|
||||
{# <div id="Deletewpsite" tabindex="-1"#}
|
||||
{# class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full">#}
|
||||
{# <div class="relative p-4 w-full max-w-md max-h-full">#}
|
||||
{# <div class="relative bg-white rounded-lg shadow dark:bg-gray-700">#}
|
||||
{# <button type="button" data-modal-toggle="Deletewpsite"#}
|
||||
{# class="absolute top-3 end-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white"#}
|
||||
{# data-modal-hide="Deletewpsite">#}
|
||||
{# <svg class="w-3 h-3" aria-hidden="true"#}
|
||||
{# xmlns="http://www.w3.org/2000/svg" fill="none"#}
|
||||
{# viewBox="0 0 14 14">#}
|
||||
{# <path stroke="currentColor" stroke-linecap="round"#}
|
||||
{# stroke-linejoin="round" stroke-width="2"#}
|
||||
{# d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>#}
|
||||
{# </svg>#}
|
||||
{# <span class="sr-only">Close modal</span>#}
|
||||
{# </button>#}
|
||||
{# <div class="p-4 md:p-5 text-center">#}
|
||||
{# <svg class="mx-auto mb-4 text-gray-400 w-12 h-12 dark:text-gray-200"#}
|
||||
{# aria-hidden="true"#}
|
||||
{# xmlns="http://www.w3.org/2000/svg" fill="none"#}
|
||||
{# viewBox="0 0 20 20">#}
|
||||
{# <path stroke="currentColor" stroke-linecap="round"#}
|
||||
{# stroke-linejoin="round" stroke-width="2"#}
|
||||
{# d="M10 11V6m0 8h.01M19 10a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>#}
|
||||
{# </svg>#}
|
||||
{# <h3 class="mb-5 text-lg font-normal text-gray-500 dark:text-gray-400">#}
|
||||
{# Are you sure you want to#}
|
||||
{# delete this WordPress site?</h3>#}
|
||||
{# <button data-modal-hide="Deletewpsite" type="button"#}
|
||||
{# data-modal-toggle="Deletewpsite"#}
|
||||
{# onclick="FinalDeleteWPNowV2()"#}
|
||||
{# class="text-white bg-red-600 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center me-2">#}
|
||||
{# Yes, I'm sure#}
|
||||
{# </button>#}
|
||||
{# <button data-modal-hide="Deletewpsite" type="button"#}
|
||||
{# data-modal-toggle="Deletewpsite"#}
|
||||
{# class="text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600">#}
|
||||
{# No, cancel#}
|
||||
{# </button>#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
{##}
|
||||
{# </div>#}
|
||||
{##}
|
||||
{# </th>#}
|
||||
{##}
|
||||
{# </tr>#}
|
||||
{##}
|
||||
{# </tbody>#}
|
||||
{# </table>#}
|
||||
{# </div>#}
|
||||
{# {% endfor %}#}
|
||||
{# </div>#}
|
||||
{##}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -12,8 +12,10 @@
|
||||
master website</p>
|
||||
</div>
|
||||
<div>
|
||||
<div class="py-4">
|
||||
<div class="flex items-center py-4">
|
||||
<p class="text-xl font-bold">Details</p>
|
||||
<img ng-hide="domainLoading"
|
||||
src="{% static 'images/loading.gif' %}">
|
||||
</div>
|
||||
<hr>
|
||||
<div>
|
||||
@@ -42,12 +44,13 @@
|
||||
</div>
|
||||
<div ng-hide="DomainCreateForm" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">Path: /home{$ masterDomain
|
||||
<p class="font-semibold w-60">Path: /home/{$ masterDomain
|
||||
$}/</p>
|
||||
</div>
|
||||
<div>
|
||||
<input type="email" name="email" class="form-control w-80 bg-gray-100 rounded px-2 py-1"
|
||||
ng-model="docRootPath" required>
|
||||
<input type="text" class="w-80 bg-gray-100 rounded px-2 py-1" ng-model="docRootPath" required>
|
||||
<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>
|
||||
<div ng-hide="DomainCreateForm" class="flex py-2 px-6">
|
||||
@@ -67,35 +70,32 @@
|
||||
<p class="font-semibold w-48">Additional Features</p></label>
|
||||
</div>
|
||||
<div class="text-gray-500 font-semibold">
|
||||
<div class="col-sm-9">
|
||||
<div class="checkbox">
|
||||
<div>
|
||||
<div>
|
||||
<label>
|
||||
<input ng-model="sslCheck" type="checkbox" value="">
|
||||
SSL
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-9">
|
||||
<div class="checkbox">
|
||||
<div>
|
||||
<div>
|
||||
<label>
|
||||
<input ng-model="apacheBackend" type="checkbox" value="">
|
||||
Apache as Reverse Proxy (Beta, for Ubuntu 22 and AlmaLinux 8)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-9">
|
||||
<div class="checkbox">
|
||||
<div>
|
||||
<div>
|
||||
<label>
|
||||
<input ng-model="dkimCheck" type="checkbox" value="">
|
||||
DKIM Support
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-9">
|
||||
<div class="checkbox">
|
||||
<div>
|
||||
<div>
|
||||
<label>
|
||||
<input ng-model="openBasedir" type="checkbox" value="">
|
||||
open_basedir Protection
|
||||
@@ -108,9 +108,40 @@
|
||||
</div>
|
||||
<div ng-hide="DomainCreateForm" class="flex justify-center mt-4">
|
||||
<button ng-click="createDomain()"
|
||||
class="bg-orange-500 px-3 py-4 rounded-lg text-xl font-semibold text-white">
|
||||
class="bg-orange-500 px-3 py-2 rounded-lg text-xl font-semibold text-white">
|
||||
Create Domain
|
||||
</button>
|
||||
</div>
|
||||
<div ng-hide="installationProgress" class="form-group">
|
||||
|
||||
<div class="flex justify-center font-bold text-xl">
|
||||
<h2>{$ currentStatus $}</h2>
|
||||
</div>
|
||||
<div class="w-full bg-gray-100 rounded-full mt-3">
|
||||
<div id="installProgress"
|
||||
class="bg-green-600 text-xs font-medium text-white text-center p-2 leading-none rounded-full"
|
||||
style="width:0%">
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="errorMessageBox"
|
||||
class="flex justify-center mt-2 bg-red-500 rounded-lg text-white px-2 py-1 font-semibold">
|
||||
<p>{% trans "Error message:" %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
<div ng-hide="success" class="flex justify-center mt-2 bg-green-500 px-2 rounded-lg py-1 font-semibold">
|
||||
<p>{% trans "Website succesfully created." %}</p>
|
||||
</div>
|
||||
<div ng-hide="couldNotConnect"
|
||||
class="flex justify-center mt-2 bg-red-500 rounded-lg text-white px-2 py-1 font-semibold">
|
||||
<p>{% trans "Could not connect to server. Please refresh this page." %}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-hide="installationProgress" class="flex justify-center mt-3">
|
||||
<button ng-disabled="goBackDisable"
|
||||
ng-click="goBack()"
|
||||
class="bg-blue-500 px-3 py-2 rounded-lg text-xl font-semibold text-white">
|
||||
Go Back
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -78,17 +78,16 @@
|
||||
<p class="font-semibold w-48">Additional Features</p></label>
|
||||
</div>
|
||||
<div class="text-gray-500 font-semibold">
|
||||
<div class="col-sm-9">
|
||||
<div class="checkbox">
|
||||
<div>
|
||||
<div>
|
||||
<label>
|
||||
<input ng-model="sslCheck" type="checkbox" value="">
|
||||
SSL
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-9">
|
||||
<div class="checkbox">
|
||||
<div>
|
||||
<div>
|
||||
<label>
|
||||
{% if test_domain_data %}
|
||||
<input ng-model="apacheBackend" type="checkbox" value="">
|
||||
@@ -103,27 +102,24 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-9">
|
||||
<div class="checkbox">
|
||||
<div>
|
||||
<div>
|
||||
<label>
|
||||
<input ng-model="dkimCheck" type="checkbox" value="">
|
||||
DKIM Support
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-9">
|
||||
<div class="checkbox">
|
||||
<div>
|
||||
<div>
|
||||
<label>
|
||||
<input ng-model="openBasedir" type="checkbox" value="">
|
||||
open_basedir Protection
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-9">
|
||||
<div class="checkbox">
|
||||
<div>
|
||||
<div>
|
||||
<label>
|
||||
<input ng-model="mailDomain" type="checkbox" value="">
|
||||
Create Mail Domain
|
||||
@@ -137,7 +133,7 @@
|
||||
<div ng-hide="installationDetailsForm" class="flex justify-center">
|
||||
<button ng-disabled="websiteCreationForm.dom.$error.required || websiteCreationForm.email.$invalid"
|
||||
ng-click="createWebsite()"
|
||||
class="bg-orange-500 px-3 py-4 rounded-lg text-xl font-semibold text-white">
|
||||
class="bg-orange-500 px-3 py-2 rounded-lg text-xl font-semibold text-white">
|
||||
Create Website
|
||||
</button>
|
||||
</div>
|
||||
@@ -152,17 +148,17 @@
|
||||
style="width:0%">
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="errorMessageBox" class="flex justify-center font-bold text-xl mt-3">
|
||||
<div ng-hide="errorMessageBox"
|
||||
class="flex justify-center mt-2 bg-red-500 rounded-lg text-white px-2 py-1 font-semibold">
|
||||
<h2>{$ errorMessage $}</h2>
|
||||
</div>
|
||||
<div ng-hide="success" class="flex justify-center font-bold text-xl mt-3">
|
||||
<div ng-hide="success" class="flex justify-center mt-2 bg-green-500 px-2 rounded-lg py-1 font-semibold">
|
||||
<h2>Website succesfully created.</h2>
|
||||
</div>
|
||||
<div ng-hide="couldNotConnect" class="flex justify-center font-bold text-xl mt-3">
|
||||
<div ng-hide="couldNotConnect"
|
||||
class="flex justify-center mt-2 bg-red-500 rounded-lg text-white px-2 py-1 font-semibold">
|
||||
<h2>Could not connect to server. Please refresh this page.</h2>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div ng-hide="installationProgress" class="flex justify-center mt-3">
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</div>
|
||||
<div class="flex justify-center mt-4">
|
||||
<button ng-click="deleteWebsite()"
|
||||
class="bg-orange-500 px-3 py-4 rounded-lg text-xl font-semibold text-white">
|
||||
class="bg-orange-500 px-3 py-2 rounded-lg text-xl font-semibold text-white">
|
||||
Delete Website
|
||||
</button>
|
||||
|
||||
@@ -53,11 +53,13 @@
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex justify-center mt-4">
|
||||
<div id="websiteDeleteFailure" class="text-red-500 font-semibold">
|
||||
<div id="websiteDeleteFailure"
|
||||
class="flex justify-center w-full mt-2 bg-red-500 rounded-lg text-white px-2 py-1 font-semibold">
|
||||
<p>{% trans "Cannot delete website, Error message: " %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
<br>
|
||||
<div id="websiteDeleteSuccess" class="text-green-500 font-semibold">
|
||||
<div id="websiteDeleteSuccess"
|
||||
class="flex justify-center w-full mt-2 bg-green-500 px-2 rounded-lg py-1 font-semibold">
|
||||
<p>{% trans "Website" %} <strong>{$ deletedWebsite $}</strong> {% trans "Successfully Deleted." %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -6,13 +6,15 @@
|
||||
{% load static %}
|
||||
|
||||
<div ng-controller="listChildDomainsMainV2" class="p-8">
|
||||
<div class="flex lg:flex-row justify-between items-center sm:flex-col">
|
||||
<div>
|
||||
<div>
|
||||
<div class="flex items-center">
|
||||
<p class="text-4xl font-bold">List Child Domains</p>
|
||||
<p class="text-xs text-gray-600 py-2 font-semibold">On this page you can launch,list,modify and
|
||||
child domains
|
||||
from your server</p>
|
||||
<img ng-hide="cyberPanelLoading"
|
||||
src="{% static 'images/loading.gif' %}">
|
||||
</div>
|
||||
<p class="text-xs text-gray-600 py-2 font-semibold">On this page you can launch,list,modify and
|
||||
child domains
|
||||
from your server</p>
|
||||
</div>
|
||||
<!-- Search Bar -->
|
||||
<div class="flex justify-between py-1 mt-4">
|
||||
@@ -45,8 +47,11 @@
|
||||
<div class="py-8">
|
||||
<div class="border shadow-lg rounded-lg px-3">
|
||||
<div ng-repeat="web in WebSitesList track by $index" class="px-2">
|
||||
<div class="bg-gray-200 mt-6 w-full rounded-t-lg border-b-2 border-gray-400">
|
||||
<div class="flex items-center bg-gray-200 mt-6 w-full rounded-t-lg border-b-2 border-gray-400">
|
||||
<p class="font-bold px-4 py-1" ng-bind="web.domain"></p>
|
||||
<a class="text-blue-600 font-semibold" target="_blank"
|
||||
href="/filemanagerv2/{$ web.masterDomain $}" title="Open File Manager">
|
||||
- File Manager</a>
|
||||
</div>
|
||||
<div class="py-3 mb-3 rounded-b-lg border-b-2 border-gray-400 overflow-x-auto">
|
||||
<table>
|
||||
@@ -54,7 +59,7 @@
|
||||
<div>
|
||||
<tr>
|
||||
<th class="w-32 pt-2">
|
||||
<a href="/websites/{$ web.masterDomain $}/{$ web.domain $}"
|
||||
<a href="/v2Websites/{$ web.masterDomain $}/{$ web.domain $}"
|
||||
class="flex items-center ml-3">
|
||||
<svg width="20" height="20" viewBox="0 0 30 30" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
@@ -72,37 +77,42 @@
|
||||
<p class="ml-2 text-blue-600 font-semibold">Manage</p>
|
||||
</a>
|
||||
</th>
|
||||
<th ng-click="initConvert(web.domain)"
|
||||
class="w-36 pt-2 font-semibold text-green-700 text-sm">
|
||||
<div class="col-md-4 content-box-header">
|
||||
<i class="p fa fa-arrows-h btn-icon text-muted" data-toggle="tooltip"
|
||||
data-placement="right" title="Convert to Website"> </i>
|
||||
<span>
|
||||
<a onclick="openModal()" href="#" style="text-transform: none">Convert to Website</a>
|
||||
</span>
|
||||
|
||||
<!-- Modal -->
|
||||
<div id="modal"
|
||||
class="fixed inset-0 overflow-auto bg-black bg-opacity-50 hidden flex items-center justify-center">
|
||||
<div class="bg-white p-8 rounded shadow-lg w-full md:w-1/2">
|
||||
<button onclick="closeModal()"
|
||||
class="absolute top-4 right-4 text-gray-700 hover:text-gray-900">
|
||||
<i class="fa fa-times"></i>
|
||||
</button>
|
||||
<h1 class="text-2xl font-bold mb-4 text-black">Convert Child Domain
|
||||
to Normal
|
||||
Website
|
||||
</h1>
|
||||
<form name="containerSettingsForm" action="/" class="mb-4">
|
||||
<div>
|
||||
<th class="w-36 pt-2">
|
||||
<a onclick="return false;"
|
||||
ng-click="initConvert(web.domain)"
|
||||
class="font-semibold text-green-700 text-sm"
|
||||
href="#" data-modal-target="edit"
|
||||
data-modal-toggle="edit">{% trans "Convert To Website" %}
|
||||
</a>
|
||||
<div id="edit" tabindex="-1"
|
||||
class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full">
|
||||
<div class="relative p-4 w-full max-w-2xl max-h-full">
|
||||
<div class="relative bg-white shadow dark:bg-gray-700">
|
||||
<div class="flex items-center bg-blue-400 px-4 py-4">
|
||||
<p class="font-bold">Convert Child Domain to Normal Website</p>
|
||||
<button type="button" data-modal-toggle="edit"
|
||||
class="absolute top-2 end-1 text-black bg-transparent hover:text-black rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center"
|
||||
data-modal-hide="edit">
|
||||
<svg class="w-3 h-3" aria-hidden="true"
|
||||
xmlns="http://www.w3.org/2000/svg" fill="none"
|
||||
viewBox="0 0 14 14">
|
||||
<path stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2"
|
||||
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
||||
</svg>
|
||||
<span class="sr-only">Close modal</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="p-4 md:p-5">
|
||||
<form name="containerSettingsForm">
|
||||
<div ng-hide="installationDetailsForm"
|
||||
class="flex py-2 px-6">
|
||||
class="flex mt-4 py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">Domain Name</p>
|
||||
<p class="font-semibold w-60">Domain Name</p>
|
||||
</div>
|
||||
<div>
|
||||
<input name="dom" type="text"
|
||||
class="form-control w-80 bg-gray-100 rounded px-2 py-1"
|
||||
class="w-80 bg-gray-100 rounded px-2 py-1"
|
||||
ng-model="domainName"
|
||||
placeholder="{% trans "Do not enter WWW, it will be auto created!" %}"
|
||||
readonly>
|
||||
@@ -111,11 +121,11 @@
|
||||
<div ng-hide="installationDetailsForm"
|
||||
class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">Select Owner</p>
|
||||
<p class="font-semibold w-60">Select Owner</p>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-model="$parent.websiteOwner"
|
||||
class="form-control w-80 bg-gray-100 rounded px-2 py-1">
|
||||
class="w-80 bg-gray-100 rounded px-2 py-1">
|
||||
{% for items in owernList %}
|
||||
<option>{{ items }}</option>
|
||||
{% endfor %}
|
||||
@@ -123,9 +133,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="installationDetailsForm"
|
||||
class="flex mt-4 py-2 px-6">
|
||||
class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">Select Package</p>
|
||||
<p class="font-semibold w-60">Select Package</p>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-model="$parent.packageForWebsite"
|
||||
@@ -139,43 +149,44 @@
|
||||
<div ng-hide="installationDetailsForm"
|
||||
class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">Email</p>
|
||||
<p class="font-semibold w-60">Email</p>
|
||||
</div>
|
||||
<div>
|
||||
<input type="email" name="email"
|
||||
class="form-control w-80 bg-gray-100 rounded px-2 py-1"
|
||||
class="w-80 bg-gray-100 rounded px-2 py-1"
|
||||
ng-model="$parent.adminEmail" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="installationDetailsForm" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-48">Select PHP</p>
|
||||
<div ng-hide="installationDetailsForm"
|
||||
class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">Select PHP</p>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-model="$parent.phpSelection"
|
||||
class="w-80 bg-gray-100 rounded px-2 py-1">
|
||||
{% for php in phps %}
|
||||
<option>{{ php }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-model="$parent.phpSelection"
|
||||
class="form-control w-80 bg-gray-100 rounded px-2 py-1">
|
||||
{% for php in phps %}
|
||||
<option>{{ php }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="flex justify-end mt-3">
|
||||
<button ng-click="convert()"
|
||||
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
|
||||
Convert
|
||||
</button>
|
||||
<button onclick="closeModal()"
|
||||
<button data-modal-toggle="edit"
|
||||
data-modal-hide="edit"
|
||||
class="ml-2 bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4 rounded">
|
||||
Close
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</th>
|
||||
<th class="w-32 pt-2 font-semibold text-sm"><span ng-bind="web.admin"
|
||||
style="text-transform: none"></span>
|
||||
@@ -189,45 +200,57 @@
|
||||
href=""
|
||||
style="text-transform: none">Issue SSL</a></span>
|
||||
</th>
|
||||
<th class="w-32 pt-2 font-semibold text-red-700 text-sm">
|
||||
<div class="col-md-4 content-box-header">
|
||||
<i class="p fa fa-arrows-h btn-icon text-muted" data-toggle="tooltip"
|
||||
data-placement="right" title="Delete"> </i>
|
||||
<span><a onclick="openModal()" href="#"
|
||||
style="text-transform: none">Delete</a>
|
||||
|
||||
<!-- Modal -->
|
||||
<div id="modal"
|
||||
class="fixed inset-0 z-50 hidden overflow-auto bg-black bg-opacity-50">
|
||||
<div class="flex items-center justify-center h-full">
|
||||
<div class="bg-white p-8 rounded shadow-lg">
|
||||
<button onclick="closeModal()"
|
||||
class="absolute top-4 right-4 text-gray-700 hover:text-gray-900">
|
||||
<i class="fa fa-times"></i>
|
||||
</button>
|
||||
<h1 class="text-2xl font-bold mb-4">Delete Child Domain</h1>
|
||||
<form class="mb-4">
|
||||
<!-- Your form content here -->
|
||||
<div class="mb-4">
|
||||
<input type="checkbox" id="deleteDocRoot"
|
||||
name="deleteDocRoot" class="mr-2">
|
||||
<label for="deleteDocRoot">Delete Document Root</label>
|
||||
<th class="w-32 pt-2">
|
||||
<a onclick="return false;"
|
||||
ng-click="deleteUserInitial(record.name)"
|
||||
class="bg-red-500 hover:bg-red-700 text-white font-bold py-1 px-2 rounded"
|
||||
href="#" data-modal-target="delete"
|
||||
data-modal-toggle="delete">{% trans "Delete" %}
|
||||
</a>
|
||||
<div id="delete" tabindex="-1"
|
||||
class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full">
|
||||
<div class="relative p-4 w-full max-w-2xl max-h-full">
|
||||
<div class="relative bg-white shadow dark:bg-gray-700">
|
||||
<div class="flex items-center bg-blue-400 px-4 py-4">
|
||||
<p class="font-bold">Delete Child Domain</p>
|
||||
<img ng-hide="cyberpanelLoading"
|
||||
src="{% static 'images/loading.gif' %}">
|
||||
<button type="button" data-modal-toggle="delete"
|
||||
class="absolute top-2 end-1 text-black bg-transparent hover:text-black rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center"
|
||||
data-modal-hide="delete">
|
||||
<svg class="w-3 h-3" aria-hidden="true"
|
||||
xmlns="http://www.w3.org/2000/svg" fill="none"
|
||||
viewBox="0 0 14 14">
|
||||
<path stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2"
|
||||
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
||||
</svg>
|
||||
<span class="sr-only">Close modal</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="p-4 md:p-5">
|
||||
<form class="mb-4">
|
||||
<!-- Your form content here -->
|
||||
<div class="mb-4">
|
||||
<input type="checkbox" id="deleteDocRoot"
|
||||
name="deleteDocRoot" class="mr-2">
|
||||
<label for="deleteDocRoot">Delete Document Root</label>
|
||||
</div>
|
||||
</form>
|
||||
<div class="flex justify-end">
|
||||
<button ng-click="deleteChildDomain()"
|
||||
class="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded">
|
||||
Delete Now
|
||||
</button>
|
||||
<button data-modal-hide="delete" data-modal-toggle="delete"
|
||||
class="ml-2 bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4 rounded">
|
||||
Close
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="flex justify-end">
|
||||
<button ng-click="deleteChildDomain()"
|
||||
class="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded">
|
||||
Delete Now
|
||||
</button>
|
||||
<button onclick="closeModal()"
|
||||
class="ml-2 bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4 rounded">
|
||||
Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</div>
|
||||
@@ -245,7 +268,163 @@
|
||||
<option ng-repeat="page in pagination">{$ $index + 1 $}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<th class="w-36 pt-2">
|
||||
<a onclick="return false;"
|
||||
ng-click="initConvert(web.domain)"
|
||||
class="font-semibold text-green-700 text-sm"
|
||||
href="#" data-modal-target="edit"
|
||||
data-modal-toggle="edit">{% trans "Convert To Website" %}
|
||||
</a>
|
||||
<div id="edit" tabindex="-1"
|
||||
class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full">
|
||||
<div class="relative p-4 w-full max-w-2xl max-h-full">
|
||||
<div class="relative bg-white shadow dark:bg-gray-700">
|
||||
<div class="flex items-center bg-blue-400 px-4 py-4">
|
||||
<p class="font-bold">Convert Child Domain to Normal Website</p>
|
||||
<button type="button" data-modal-toggle="edit"
|
||||
class="absolute top-2 end-1 text-black bg-transparent hover:text-black rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center"
|
||||
data-modal-hide="edit">
|
||||
<svg class="w-3 h-3" aria-hidden="true"
|
||||
xmlns="http://www.w3.org/2000/svg" fill="none"
|
||||
viewBox="0 0 14 14">
|
||||
<path stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2"
|
||||
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
||||
</svg>
|
||||
<span class="sr-only">Close modal</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="p-4 md:p-5">
|
||||
<form name="containerSettingsForm">
|
||||
<div ng-hide="installationDetailsForm"
|
||||
class="flex mt-4 py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">Domain Name</p>
|
||||
</div>
|
||||
<div>
|
||||
<input name="dom" type="text"
|
||||
class="w-80 bg-gray-100 rounded px-2 py-1"
|
||||
ng-model="domainName"
|
||||
placeholder="{% trans "Do not enter WWW, it will be auto created!" %}"
|
||||
readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="installationDetailsForm" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">Select Owner</p>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-model="$parent.websiteOwner"
|
||||
class="w-80 bg-gray-100 rounded px-2 py-1">
|
||||
{% for items in owernList %}
|
||||
<option>{{ items }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="installationDetailsForm" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">Select Package</p>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-model="$parent.packageForWebsite"
|
||||
class="form-control w-80 bg-gray-100 rounded px-2 py-1">
|
||||
{% for items in packageList %}
|
||||
<option>{{ items }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="installationDetailsForm" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">Email</p>
|
||||
</div>
|
||||
<div>
|
||||
<input type="email" name="email"
|
||||
class="w-80 bg-gray-100 rounded px-2 py-1"
|
||||
ng-model="$parent.adminEmail" required>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="installationDetailsForm" class="flex py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">Select PHP</p>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-model="$parent.phpSelection"
|
||||
class="w-80 bg-gray-100 rounded px-2 py-1">
|
||||
{% for php in phps %}
|
||||
<option>{{ php }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="flex justify-end mt-3">
|
||||
<button ng-click="convert()"
|
||||
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
|
||||
Convert
|
||||
</button>
|
||||
<button data-modal-toggle="edit"
|
||||
data-modal-hide="edit"
|
||||
class="ml-2 bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4 rounded">
|
||||
Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
<th class="w-32 pt-2">
|
||||
<a onclick="return false;"
|
||||
ng-click="deleteUserInitial(record.name)"
|
||||
class="bg-red-500 hover:bg-red-700 text-white font-bold py-1 px-2 rounded"
|
||||
href="#" data-modal-target="delete" data-modal-toggle="delete">{% trans "Delete" %}
|
||||
</a>
|
||||
<div id="delete" tabindex="-1"
|
||||
class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full">
|
||||
<div class="relative p-4 w-full max-w-2xl max-h-full">
|
||||
<div class="relative bg-white shadow dark:bg-gray-700">
|
||||
<div class="flex items-center bg-blue-400 px-4 py-4">
|
||||
<p class="font-bold">Delete Child Domain</p>
|
||||
<img ng-hide="cyberpanelLoading"
|
||||
src="{% static 'images/loading.gif' %}">
|
||||
<button type="button" data-modal-toggle="delete"
|
||||
class="absolute top-2 end-1 text-black bg-transparent hover:text-black rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center"
|
||||
data-modal-hide="delete">
|
||||
<svg class="w-3 h-3" aria-hidden="true"
|
||||
xmlns="http://www.w3.org/2000/svg" fill="none"
|
||||
viewBox="0 0 14 14">
|
||||
<path stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2"
|
||||
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
||||
</svg>
|
||||
<span class="sr-only">Close modal</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="p-4 md:p-5">
|
||||
<form class="mb-4">
|
||||
<!-- Your form content here -->
|
||||
<div class="mb-4">
|
||||
<input type="checkbox" id="deleteDocRoot"
|
||||
name="deleteDocRoot" class="mr-2">
|
||||
<label for="deleteDocRoot">Delete Document Root</label>
|
||||
</div>
|
||||
</form>
|
||||
<div class="flex justify-end">
|
||||
<button ng-click="deleteChildDomain()"
|
||||
class="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded">
|
||||
Delete Now
|
||||
</button>
|
||||
<button data-modal-hide="delete" data-modal-toggle="delete"
|
||||
class="ml-2 bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4 rounded">
|
||||
Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
{% endblock %}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
{% load static %}
|
||||
|
||||
<div ng-controller="listWebsitesV2" class="p-8">
|
||||
<div class="flex lg:flex-row justify-between items-center sm:flex-col">
|
||||
<div class="lg:flex justify-between items-center sm:flex-row">
|
||||
<div>
|
||||
<p class="text-4xl font-bold">List Website</p>
|
||||
<p class="text-xs text-gray-600 py-2 font-semibold">On this page you can launch,list,modify and
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
add package before creating a website.</p>
|
||||
</div>
|
||||
<div>
|
||||
<div class="py-4">
|
||||
<div class="flex items-center py-4">
|
||||
<p class="text-xl font-bold">Modify Website</p>
|
||||
<img id="modifyWebsiteLoading" src="{% static 'images/loading.gif' %}">
|
||||
</div>
|
||||
<hr>
|
||||
<div>
|
||||
@@ -40,6 +41,9 @@
|
||||
<option ng-repeat="pack in webpacks">{$ pack.pack $}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="ml-2 text-orange-500 font-semibold">{% trans "Current Package:" %} {$ currentPack
|
||||
$}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex py-2 px-6">
|
||||
<div>
|
||||
@@ -50,6 +54,9 @@
|
||||
<option ng-repeat="admins in adminNames">{$ admins.adminNames $}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="ml-2 text-orange-500 font-semibold">{% trans "Current Owner:" %} {$ currentAdmin
|
||||
$}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex py-2 px-6">
|
||||
<div>
|
||||
@@ -77,9 +84,29 @@
|
||||
</div>
|
||||
<div class="flex justify-center mt-4">
|
||||
<button id="modifyWebsiteButton" ng-click="modifyWebsiteFunc()"
|
||||
class="bg-orange-500 px-3 py-4 rounded-lg text-xl font-semibold text-white">
|
||||
class="bg-orange-500 px-3 py-2 rounded-lg text-xl font-semibold text-white">
|
||||
Modify Website
|
||||
</button>
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<div class="col-sm-4">
|
||||
<div id="websiteModifyFailure"
|
||||
class="flex justify-center bg-red-500 rounded-lg text-white px-2 py-1 font-semibold">
|
||||
<p>{% trans "Cannot fetch website details. Error message:" %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
<div id="canNotModify"
|
||||
class="flex justify-center bg-red-500 rounded-lg text-white px-2 py-1 font-semibold">
|
||||
<p>{% trans "Cannot modify website. Error message:" %} {$ errMessage $}</p>
|
||||
</div>
|
||||
<div id="websiteModifySuccess"
|
||||
class="flex justify-center bg-green-500 px-2 rounded-lg py-1 font-semibold">
|
||||
<p>{% trans "Website Details Successfully fetched" %}</p>
|
||||
</div>
|
||||
<div id="websiteSuccessfullyModified"
|
||||
class="flex justify-center bg-green-500 px-2 rounded-lg py-1 font-semibold">
|
||||
<strong>{$ websiteModified $}</strong> Successfully Modified</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -11,8 +11,9 @@
|
||||
<p class="text-xs text-gray-600 py-2 font-semibold">This page can be used to suspend/unsuspend website</p>
|
||||
</div>
|
||||
<div>
|
||||
<div class="py-4">
|
||||
<div class="flex items-center py-4">
|
||||
<p class="text-xl font-bold">Suspend/Unsuspend Website</p>
|
||||
<img ng-hide="suspendLoading" src="{% static 'images/loading.gif' %}">
|
||||
</div>
|
||||
<hr>
|
||||
<div>
|
||||
@@ -22,19 +23,19 @@
|
||||
</div>
|
||||
<div>
|
||||
<select ng-change="showSuspendUnsuspend()" ng-model="websiteToBeSuspended"
|
||||
class="form-control w-80 bg-gray-100 rounded px-2 py-1">
|
||||
class="w-80 bg-gray-100 rounded px-2 py-1">
|
||||
{% for items in websiteList %}
|
||||
<option>{{ items }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex mt-4 py-2 px-6">
|
||||
<div ng-hide="stateView" class="flex mt-4 py-2 px-6">
|
||||
<div>
|
||||
<p class="font-semibold w-60">Suspend/Unsuspend Website</p>
|
||||
</div>
|
||||
<div>
|
||||
<select ng-model="state" class="form-control w-80 bg-gray-100 rounded px-2 py-1">
|
||||
<select ng-model="state" class="w-80 bg-gray-100 rounded px-2 py-1">
|
||||
<option>{% trans "Suspend" %}</option>
|
||||
<option>{% trans "Un-Suspend" %}</option>
|
||||
</select>
|
||||
@@ -44,9 +45,30 @@
|
||||
</div>
|
||||
<div class="flex justify-center mt-4">
|
||||
<button ng-click="save()"
|
||||
class="bg-orange-500 px-3 py-4 rounded-lg text-xl font-semibold text-white">
|
||||
class="bg-orange-500 px-3 py-2 rounded-lg text-xl font-semibold text-white">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<div>
|
||||
<div ng-hide="websiteSuspendFailure"
|
||||
class="flex justify-center bg-red-500 rounded-lg text-white px-2 py-1 font-semibold">
|
||||
<p>{% trans "Cannot suspend website, Error message: " %}{$ errorMessage $}</p>
|
||||
</div>
|
||||
<div ng-hide="websiteUnsuspendFailure"
|
||||
class="flex justify-center bg-red-500 rounded-lg text-white px-2 py-1 font-semibold">
|
||||
<p>{% trans "Cannot unsuspend website. Error message:" %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
<div ng-hide="websiteSuccess"
|
||||
class="flex justify-center bg-green-500 px-2 rounded-lg py-1 font-semibold">
|
||||
<p>{% trans "Website " %}<strong>{$ websiteStatus
|
||||
$}</strong> {% trans "Successfully " %}{$ finalStatus $}.</p>
|
||||
</div>
|
||||
<div ng-hide="couldNotConnect"
|
||||
class="flex justify-center bg-red-500 rounded-lg text-white px-2 py-1 font-semibold">
|
||||
<p>{% trans "Could not connect to server. Please refresh this page." %}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -470,7 +470,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<ul class="flex w-full grid lg:grid-cols-4">
|
||||
<li class="px-3 py-3">
|
||||
<a href="{% url 'ApacheManagerV2' domain=domain %}" class="px-3 py-3">
|
||||
<div class="flex items-center">
|
||||
<div>
|
||||
<svg width="20" height="20" viewBox="0 0 40 40" fill="none"
|
||||
@@ -487,7 +487,7 @@
|
||||
<p class="px-2 font-bold" style="font-size: 70%;">Apache Manager</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</a>
|
||||
<li ng-click="fetchConfigurations()" class="px-3 py-3 cursor-pointer">
|
||||
<div class="flex items-center">
|
||||
<div>
|
||||
@@ -836,7 +836,7 @@
|
||||
</div>
|
||||
</li>
|
||||
<li class="px-3 py-3">
|
||||
<div class="flex items-center">
|
||||
<a href="{% url 'createFTPAccountV2' %}" class="flex items-center">
|
||||
<div>
|
||||
<svg width="20" height="20" viewBox="0 0 40 40" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
@@ -855,12 +855,11 @@
|
||||
<div>
|
||||
<p class="px-2 font-bold" style="font-size: 70%;">Create FTP Account</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="px-3 py-3">
|
||||
<div class="flex items-center">
|
||||
<a href="{% url 'deleteFTPAccountV2' %}" class="flex items-center">
|
||||
<div>
|
||||
|
||||
<svg width="20" height="20" viewBox="0 0 40 40" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M38.3333 12.5L29.4999 21.6667L24.8333 17" stroke="#FF9A00"
|
||||
@@ -876,7 +875,7 @@
|
||||
<div>
|
||||
<p class="px-2 font-bold" style="font-size: 70%;">Delete FTP Account</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{# open_basedir HTML#}
|
||||
@@ -943,7 +942,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<ul class="flex w-full grid lg:grid-cols-4">
|
||||
<li class="px-3 py-3">
|
||||
<a id="emailListsV2" target="_self" title="{% trans 'Create Lists' %}" class="px-3 py-3">
|
||||
<div class="flex items-center">
|
||||
<div>
|
||||
<svg width="20" height="20" viewBox="0 0 40 40" fill="none"
|
||||
@@ -956,11 +955,11 @@
|
||||
fill="#FF9A00"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<div id="emailListsChildV2">
|
||||
<p class="px-2 font-bold" style="font-size: 70%;">Create Lists</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</a>
|
||||
<li class="px-3 py-3">
|
||||
<div class="flex items-center">
|
||||
<div>
|
||||
|
||||
@@ -36,6 +36,7 @@ urlpatterns = [
|
||||
url(r'^RestoreHome$', views.RestoreHome, name='RestoreHome'),
|
||||
url(r'^AutoLogin$', views.AutoLogin, name='AutoLogin'),
|
||||
url(r'^RemoteBackupConfig$', views.RemoteBackupConfig, name='RemoteBackupConfig'),
|
||||
url(r'^RemoteBackupConfigV2$', views.RemoteBackupConfigV2, name='RemoteBackupConfigV2'),
|
||||
url(r'^BackupfileConfig$', views.BackupfileConfig, name='BackupfileConfig'),
|
||||
url(r'^AddRemoteBackupsite$', views.AddRemoteBackupsite, name='AddRemoteBackupsite'),
|
||||
url(r'^pricing$', views.WordpressPricing, name='pricing'),
|
||||
@@ -155,7 +156,6 @@ urlpatterns = [
|
||||
url(r'^prestaShopInstall$', views.prestaShopInstall, name='prestaShopInstall'),
|
||||
url(r'^(?P<domain>(.*))/installPrestaShop$', views.installPrestaShop, name='installPrestaShop'),
|
||||
|
||||
|
||||
## magento
|
||||
|
||||
url(r'^(?P<domain>(.*))/installMagento$', views.installMagento, name='installMagento'),
|
||||
|
||||
@@ -114,6 +114,17 @@ def RestoreHome(request):
|
||||
return redirect(loadLoginPage)
|
||||
|
||||
|
||||
def RestoreHomeV2(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
|
||||
BackupID = request.GET.get('BackupID')
|
||||
wm = WebsiteManager()
|
||||
return wm.RestoreHomeV2(request, userID, BackupID)
|
||||
except KeyError:
|
||||
return redirect(loadLoginPage)
|
||||
|
||||
|
||||
def RemoteBackupConfig(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
@@ -125,6 +136,17 @@ def RemoteBackupConfig(request):
|
||||
return redirect(loadLoginPage)
|
||||
|
||||
|
||||
def RemoteBackupConfigV2(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
|
||||
DeleteID = request.GET.get('DeleteID')
|
||||
wm = WebsiteManager()
|
||||
return wm.RemoteBackupConfigV2(request, userID, DeleteID)
|
||||
except KeyError:
|
||||
return redirect(loadLoginPage)
|
||||
|
||||
|
||||
def BackupfileConfig(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
@@ -137,6 +159,18 @@ def BackupfileConfig(request):
|
||||
return redirect(loadLoginPage)
|
||||
|
||||
|
||||
def BackupfileConfigV2(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
|
||||
ID = request.GET.get('ID')
|
||||
DeleteID = request.GET.get('DeleteID')
|
||||
wm = WebsiteManager()
|
||||
return wm.BackupfileConfigV2(request, userID, ID, DeleteID)
|
||||
except KeyError:
|
||||
return redirect(loadLoginPage)
|
||||
|
||||
|
||||
def AddRemoteBackupsite(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
@@ -149,6 +183,18 @@ def AddRemoteBackupsite(request):
|
||||
return redirect(loadLoginPage)
|
||||
|
||||
|
||||
def AddRemoteBackupsiteV2(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
|
||||
ID = request.GET.get('ID')
|
||||
DeleteSiteID = request.GET.get('DeleteID')
|
||||
wm = WebsiteManager()
|
||||
return wm.AddRemoteBackupsiteV2(request, userID, ID, DeleteSiteID)
|
||||
except KeyError:
|
||||
return redirect(loadLoginPage)
|
||||
|
||||
|
||||
def WordpressPricing(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
@@ -2025,6 +2071,15 @@ def ApacheManager(request, domain):
|
||||
return redirect(loadLoginPage)
|
||||
|
||||
|
||||
def ApacheManagerV2(request, domain):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
wm = WebsiteManager(domain)
|
||||
return wm.ApacheManagerV2(request, userID)
|
||||
except KeyError:
|
||||
return redirect(loadLoginPage)
|
||||
|
||||
|
||||
def getSwitchStatus(request):
|
||||
try:
|
||||
userID = request.session['userID']
|
||||
|
||||
@@ -398,6 +398,83 @@ class WebsiteManager:
|
||||
from django.shortcuts import reverse
|
||||
return redirect(reverse('pricing'))
|
||||
|
||||
def RestoreHomeV2(self, request=None, userID=None, BackupID=None):
|
||||
Data = {}
|
||||
currentACL = ACLManager.loadedACL(userID)
|
||||
admin = Administrator.objects.get(pk=userID)
|
||||
|
||||
if ACLManager.CheckForPremFeature('wp-manager'):
|
||||
|
||||
Data['backupobj'] = WPSitesBackup.objects.get(pk=BackupID)
|
||||
|
||||
if ACLManager.CheckIPBackupObjectOwner(currentACL, Data['backupobj'], admin) == 1:
|
||||
pass
|
||||
else:
|
||||
return ACLManager.loadError()
|
||||
|
||||
config = json.loads(Data['backupobj'].config)
|
||||
Data['FileName'] = config['name']
|
||||
try:
|
||||
Data['Backuptype'] = config['Backuptype']
|
||||
except:
|
||||
Data['Backuptype'] = None
|
||||
Data['WPsites'] = ACLManager.GetALLWPObjects(currentACL, userID)
|
||||
proc = httpProc(request, 'websiteFunctions/WPRestoreHomeV2.html',
|
||||
Data, 'createWebsite')
|
||||
return proc.render()
|
||||
else:
|
||||
from django.shortcuts import reverse
|
||||
return redirect(reverse('pricing'))
|
||||
|
||||
def RemoteBackupConfigV2(self, request=None, userID=None, DeleteID=None):
|
||||
Data = {}
|
||||
currentACL = ACLManager.loadedACL(userID)
|
||||
admin = Administrator.objects.get(pk=userID)
|
||||
try:
|
||||
if DeleteID != None:
|
||||
BackupconfigDelete = RemoteBackupConfig.objects.get(pk=DeleteID)
|
||||
BackupconfigDelete.delete()
|
||||
except:
|
||||
pass
|
||||
|
||||
if ACLManager.CheckForPremFeature('wp-manager'):
|
||||
|
||||
Data['WPsites'] = ACLManager.GetALLWPObjects(currentACL, userID)
|
||||
allcon = RemoteBackupConfig.objects.all()
|
||||
Data['backupconfigs'] = []
|
||||
for i in allcon:
|
||||
configr = json.loads(i.config)
|
||||
if i.configtype == "SFTP":
|
||||
Data['backupconfigs'].append({
|
||||
'id': i.pk,
|
||||
'Type': i.configtype,
|
||||
'HostName': configr['Hostname'],
|
||||
'Path': configr['Path']
|
||||
})
|
||||
elif i.configtype == "S3":
|
||||
Provider = configr['Provider']
|
||||
if Provider == "Backblaze":
|
||||
Data['backupconfigs'].append({
|
||||
'id': i.pk,
|
||||
'Type': i.configtype,
|
||||
'HostName': Provider,
|
||||
'Path': configr['S3keyname']
|
||||
})
|
||||
else:
|
||||
Data['backupconfigs'].append({
|
||||
'id': i.pk,
|
||||
'Type': i.configtype,
|
||||
'HostName': Provider,
|
||||
'Path': configr['S3keyname']
|
||||
})
|
||||
|
||||
proc = httpProc(request, 'websiteFunctions/RemoteBackupConfigV2.html',
|
||||
Data, 'createWebsite')
|
||||
return proc.render()
|
||||
else:
|
||||
from django.shortcuts import reverse
|
||||
return redirect(reverse('pricing'))
|
||||
|
||||
def RemoteBackupConfig(self, request=None, userID=None, DeleteID=None):
|
||||
Data = {}
|
||||
currentACL = ACLManager.loadedACL(userID)
|
||||
@@ -483,6 +560,42 @@ class WebsiteManager:
|
||||
from django.shortcuts import reverse
|
||||
return redirect(reverse('pricing'))
|
||||
|
||||
def BackupfileConfigV2(self, request=None, userID=None, RemoteConfigID=None, DeleteID=None):
|
||||
Data = {}
|
||||
currentACL = ACLManager.loadedACL(userID)
|
||||
admin = Administrator.objects.get(pk=userID)
|
||||
|
||||
Data['RemoteConfigID'] = RemoteConfigID
|
||||
RemoteConfigobj = RemoteBackupConfig.objects.get(pk=RemoteConfigID)
|
||||
try:
|
||||
if DeleteID != None:
|
||||
RemoteBackupConfigDelete = RemoteBackupSchedule.objects.get(pk=DeleteID)
|
||||
RemoteBackupConfigDelete.delete()
|
||||
except:
|
||||
pass
|
||||
|
||||
if ACLManager.CheckForPremFeature('wp-manager'):
|
||||
Data['WPsites'] = ACLManager.GetALLWPObjects(currentACL, userID)
|
||||
allsechedule = RemoteBackupSchedule.objects.filter(RemoteBackupConfig=RemoteConfigobj)
|
||||
Data['Backupschedule'] = []
|
||||
for i in allsechedule:
|
||||
lastrun = i.lastrun
|
||||
LastRun = time.strftime('%Y-%m-%d', time.localtime(float(lastrun)))
|
||||
Data['Backupschedule'].append({
|
||||
'id': i.pk,
|
||||
'Name': i.Name,
|
||||
'RemoteConfiguration': i.RemoteBackupConfig.configtype,
|
||||
'Retention': i.fileretention,
|
||||
'Frequency': i.timeintervel,
|
||||
'LastRun': LastRun
|
||||
})
|
||||
proc = httpProc(request, 'websiteFunctions/BackupfileConfigV2.html',
|
||||
Data, 'createWebsite')
|
||||
return proc.render()
|
||||
else:
|
||||
from django.shortcuts import reverse
|
||||
return redirect(reverse('pricing'))
|
||||
|
||||
def AddRemoteBackupsite(self, request=None, userID=None, RemoteScheduleID=None, DeleteSiteID=None):
|
||||
Data = {}
|
||||
currentACL = ACLManager.loadedACL(userID)
|
||||
@@ -518,6 +631,41 @@ class WebsiteManager:
|
||||
from django.shortcuts import reverse
|
||||
return redirect(reverse('pricing'))
|
||||
|
||||
def AddRemoteBackupsiteV2(self, request=None, userID=None, RemoteScheduleID=None, DeleteSiteID=None):
|
||||
Data = {}
|
||||
currentACL = ACLManager.loadedACL(userID)
|
||||
admin = Administrator.objects.get(pk=userID)
|
||||
|
||||
Data['RemoteScheduleID'] = RemoteScheduleID
|
||||
RemoteBackupScheduleobj = RemoteBackupSchedule.objects.get(pk=RemoteScheduleID)
|
||||
|
||||
try:
|
||||
if DeleteSiteID != None:
|
||||
RemoteBackupsitesDelete = RemoteBackupsites.objects.get(pk=DeleteSiteID)
|
||||
RemoteBackupsitesDelete.delete()
|
||||
except:
|
||||
pass
|
||||
|
||||
if ACLManager.CheckForPremFeature('wp-manager'):
|
||||
Data['WPsites'] = ACLManager.GetALLWPObjects(currentACL, userID)
|
||||
allRemoteBackupsites = RemoteBackupsites.objects.filter(owner=RemoteBackupScheduleobj)
|
||||
Data['RemoteBackupsites'] = []
|
||||
for i in allRemoteBackupsites:
|
||||
try:
|
||||
wpsite = WPSites.objects.get(pk=i.WPsites)
|
||||
Data['RemoteBackupsites'].append({
|
||||
'id': i.pk,
|
||||
'Title': wpsite.title,
|
||||
})
|
||||
except:
|
||||
pass
|
||||
proc = httpProc(request, 'websiteFunctions/AddRemoteBackupSiteV2.html',
|
||||
Data, 'createWebsite')
|
||||
return proc.render()
|
||||
else:
|
||||
from django.shortcuts import reverse
|
||||
return redirect(reverse('pricing'))
|
||||
|
||||
def WordpressPricing(self, request=None, userID=None, ):
|
||||
Data = {}
|
||||
proc = httpProc(request, 'websiteFunctions/CyberpanelPricing.html', Data, 'createWebsite')
|
||||
@@ -7003,6 +7151,26 @@ StrictHostKeyChecking no
|
||||
{'domainName': self.domain, 'phps': phps, 'apachemanager': apachemanager})
|
||||
return proc.render()
|
||||
|
||||
def ApacheManagerV2(self, request=None, userID=None, data=None):
|
||||
currentACL = ACLManager.loadedACL(userID)
|
||||
admin = Administrator.objects.get(pk=userID)
|
||||
|
||||
if ACLManager.checkOwnership(self.domain, admin, currentACL) == 1:
|
||||
pass
|
||||
else:
|
||||
return ACLManager.loadError()
|
||||
|
||||
phps = PHPManager.findPHPVersions()
|
||||
|
||||
if ACLManager.CheckForPremFeature('all'):
|
||||
apachemanager = 1
|
||||
else:
|
||||
apachemanager = 0
|
||||
|
||||
proc = httpProc(request, 'websiteFunctions/ApacheManagerV2.html',
|
||||
{'domainName': self.domain, 'phps': phps, 'apachemanager': apachemanager})
|
||||
return proc.render()
|
||||
|
||||
def saveApacheConfigsToFile(self, userID=None, data=None):
|
||||
|
||||
currentACL = ACLManager.loadedACL(userID)
|
||||
|
||||
Reference in New Issue
Block a user