mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 13:56:01 +01:00
load fm page
This commit is contained in:
@@ -654,6 +654,16 @@ fileManager.controller('fileManagerCtrl', function ($scope, $http, FileUploader,
|
|||||||
} else {
|
} else {
|
||||||
if (functionName === "startPoint") {
|
if (functionName === "startPoint") {
|
||||||
completePathToFile = $scope.currentPath;
|
completePathToFile = $scope.currentPath;
|
||||||
|
// check if there is any path in QS
|
||||||
|
|
||||||
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
|
QSPath = urlParams.get('path')
|
||||||
|
|
||||||
|
if (QSPath !== null) {
|
||||||
|
completePathToFile = QSPath
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
} else if (functionName === "doubleClick") {
|
} else if (functionName === "doubleClick") {
|
||||||
completePathToFile = $scope.currentPath + "/" + node.innerHTML;
|
completePathToFile = $scope.currentPath + "/" + node.innerHTML;
|
||||||
} else if (functionName === "homeFetch") {
|
} else if (functionName === "homeFetch") {
|
||||||
@@ -1202,7 +1212,6 @@ fileManager.controller('fileManagerCtrl', function ($scope, $http, FileUploader,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.extractionLoading = false;
|
$scope.extractionLoading = false;
|
||||||
|
|
||||||
var completeFileToExtract = pathbase + "/" + allFilesAndFolders[0];
|
var completeFileToExtract = pathbase + "/" + allFilesAndFolders[0];
|
||||||
|
|||||||
@@ -90,7 +90,6 @@ def controller(request):
|
|||||||
else:
|
else:
|
||||||
return ACLManager.loadErrorJson('FilemanagerAdmin', 0)
|
return ACLManager.loadErrorJson('FilemanagerAdmin', 0)
|
||||||
|
|
||||||
|
|
||||||
fm = FM(request, data)
|
fm = FM(request, data)
|
||||||
|
|
||||||
if method == 'listForTable':
|
if method == 'listForTable':
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import shutil
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
from loginSystem.models import Administrator
|
from loginSystem.models import Administrator
|
||||||
|
from managePHP.phpManager import PHPManager
|
||||||
from plogical.acl import ACLManager
|
from plogical.acl import ACLManager
|
||||||
sys.path.append('/usr/local/CyberCP')
|
sys.path.append('/usr/local/CyberCP')
|
||||||
import django
|
import django
|
||||||
@@ -575,6 +576,8 @@ $parameters = array(
|
|||||||
dbName, dbUser, dbPassword = self.dbCreation(tempStatusPath, website)
|
dbName, dbUser, dbPassword = self.dbCreation(tempStatusPath, website)
|
||||||
self.permPath = '/home/%s/public_html' % (website.domain)
|
self.permPath = '/home/%s/public_html' % (website.domain)
|
||||||
|
|
||||||
|
php = PHPManager.getPHPString(website.phpSelection)
|
||||||
|
FinalPHPPath = '/usr/local/lsws/lsphp%s/bin/php' % (php)
|
||||||
|
|
||||||
## Security Check
|
## Security Check
|
||||||
|
|
||||||
@@ -600,7 +603,7 @@ $parameters = array(
|
|||||||
statusFile.close()
|
statusFile.close()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
command = "wp core download --allow-root --path=%s --version=%s" % (finalPath, self.extraArgs['version'])
|
command = f"{FinalPHPPath} -d error_reporting=0 /usr/bin/wp core download --allow-root --path={finalPath} --version={self.extraArgs['WPVersion']}"
|
||||||
except:
|
except:
|
||||||
command = "wp core download --allow-root --path=" + finalPath
|
command = "wp core download --allow-root --path=" + finalPath
|
||||||
|
|
||||||
@@ -618,7 +621,7 @@ $parameters = array(
|
|||||||
statusFile.writelines('Configuring the installation,40')
|
statusFile.writelines('Configuring the installation,40')
|
||||||
statusFile.close()
|
statusFile.close()
|
||||||
|
|
||||||
command = "wp core config --dbname=" + dbName + " --dbuser=" + dbUser + " --dbpass=" + dbPassword + " --dbhost=%s:%s --dbprefix=wp_ --allow-root --path=" % (ApplicationInstaller.LOCALHOST, ApplicationInstaller.PORT) + finalPath
|
command = f"{FinalPHPPath} -d error_reporting=0 /usr/bin/wp core config --dbname={dbName} --dbuser={dbUser} --dbpass={dbPassword} --dbhost={ApplicationInstaller.LOCALHOST}:{ApplicationInstaller.PORT} --dbprefix=wp_ --path={finalPath}"
|
||||||
result = ProcessUtilities.outputExecutioner(command, externalApp)
|
result = ProcessUtilities.outputExecutioner(command, externalApp)
|
||||||
|
|
||||||
if os.path.exists(ProcessUtilities.debugPath):
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
@@ -633,7 +636,7 @@ $parameters = array(
|
|||||||
else:
|
else:
|
||||||
finalURL = domainName
|
finalURL = domainName
|
||||||
|
|
||||||
command = 'wp core install --url="http://' + finalURL + '" --title="' + blogTitle + '" --admin_user="' + adminUser + '" --admin_password="' + adminPassword + '" --admin_email="' + adminEmail + '" --allow-root --path=' + finalPath
|
command = f'{FinalPHPPath} -d error_reporting=0 /usr/bin/wp core install --url="http://{finalURL}" --title="{blogTitle}" --admin_user="{adminUser}" --admin_password="{adminPassword}" --admin_email="{adminEmail}" --path={finalPath}'
|
||||||
result = ProcessUtilities.outputExecutioner(command, externalApp)
|
result = ProcessUtilities.outputExecutioner(command, externalApp)
|
||||||
|
|
||||||
if os.path.exists(ProcessUtilities.debugPath):
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
@@ -648,7 +651,7 @@ $parameters = array(
|
|||||||
statusFile.writelines('Installing LSCache Plugin,80')
|
statusFile.writelines('Installing LSCache Plugin,80')
|
||||||
statusFile.close()
|
statusFile.close()
|
||||||
|
|
||||||
command = "wp plugin install litespeed-cache --allow-root --path=" + finalPath
|
command = f"{FinalPHPPath} -d error_reporting=0 /usr/bin/wp plugin install litespeed-cache --allow-root --path=" + finalPath
|
||||||
result = ProcessUtilities.outputExecutioner(command, externalApp)
|
result = ProcessUtilities.outputExecutioner(command, externalApp)
|
||||||
|
|
||||||
if os.path.exists(ProcessUtilities.debugPath):
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
@@ -661,7 +664,7 @@ $parameters = array(
|
|||||||
statusFile.writelines('Activating LSCache Plugin,90')
|
statusFile.writelines('Activating LSCache Plugin,90')
|
||||||
statusFile.close()
|
statusFile.close()
|
||||||
|
|
||||||
command = "wp plugin activate litespeed-cache --allow-root --path=" + finalPath
|
command = f"{FinalPHPPath} -d error_reporting=0 /usr/bin/wp plugin activate litespeed-cache --allow-root --path=" + finalPath
|
||||||
result = ProcessUtilities.outputExecutioner(command, externalApp)
|
result = ProcessUtilities.outputExecutioner(command, externalApp)
|
||||||
|
|
||||||
if os.path.exists(ProcessUtilities.debugPath):
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
@@ -673,19 +676,19 @@ $parameters = array(
|
|||||||
try:
|
try:
|
||||||
if self.extraArgs['updates']:
|
if self.extraArgs['updates']:
|
||||||
if self.extraArgs['updates'] == 'Disabled':
|
if self.extraArgs['updates'] == 'Disabled':
|
||||||
command = "wp config set WP_AUTO_UPDATE_CORE false --raw --allow-root --path=" + finalPath
|
command = f"{FinalPHPPath} -d error_reporting=0 /usr/bin/wp config set WP_AUTO_UPDATE_CORE false --raw --allow-root --path=" + finalPath
|
||||||
result = ProcessUtilities.outputExecutioner(command, externalApp)
|
result = ProcessUtilities.outputExecutioner(command, externalApp)
|
||||||
|
|
||||||
if result.find('Success:') == -1:
|
if result.find('Success:') == -1:
|
||||||
raise BaseException(result)
|
raise BaseException(result)
|
||||||
elif self.extraArgs['updates'] == 'Minor and Security Updates':
|
elif self.extraArgs['updates'] == 'Minor and Security Updates':
|
||||||
command = "wp config set WP_AUTO_UPDATE_CORE minor --allow-root --path=" + finalPath
|
command = f"{FinalPHPPath} -d error_reporting=0 /usr/bin/wp config set WP_AUTO_UPDATE_CORE minor --allow-root --path=" + finalPath
|
||||||
result = ProcessUtilities.outputExecutioner(command, externalApp)
|
result = ProcessUtilities.outputExecutioner(command, externalApp)
|
||||||
|
|
||||||
if result.find('Success:') == -1:
|
if result.find('Success:') == -1:
|
||||||
raise BaseException(result)
|
raise BaseException(result)
|
||||||
else:
|
else:
|
||||||
command = "wp config set WP_AUTO_UPDATE_CORE true --raw --allow-root --path=" + finalPath
|
command = f"{FinalPHPPath} -d error_reporting=0 /usr/bin/wp config set WP_AUTO_UPDATE_CORE true --raw --allow-root --path=" + finalPath
|
||||||
result = ProcessUtilities.outputExecutioner(command, externalApp)
|
result = ProcessUtilities.outputExecutioner(command, externalApp)
|
||||||
|
|
||||||
if result.find('Success:') == -1:
|
if result.find('Success:') == -1:
|
||||||
@@ -734,35 +737,26 @@ $parameters = array(
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
############## Install Save Plugin Buckets
|
############## Install Save Plugin Buckets
|
||||||
try:
|
try:
|
||||||
if self.extraArgs['SavedPlugins'] == True:
|
if self.extraArgs['SavedPlugins'] == True:
|
||||||
AllPluginList= self.extraArgs['AllPluginsList']
|
AllPluginList= self.extraArgs['AllPluginsList']
|
||||||
for i in range(len(AllPluginList)):
|
for i in range(len(AllPluginList)):
|
||||||
# command = "wp plugin install " + AllPluginList[i]+ "--allow-root --path=" + finalPath
|
# command = "wp plugin install " + AllPluginList[i]+ "--allow-root --path=" + finalPath
|
||||||
command = "wp plugin install %s --allow-root --path=%s" %(AllPluginList[i], finalPath)
|
command = f"{FinalPHPPath} -d error_reporting=0 /usr/bin/wp plugin install %s --allow-root --path=%s" %(AllPluginList[i], finalPath)
|
||||||
result = ProcessUtilities.outputExecutioner(command, externalApp)
|
result = ProcessUtilities.outputExecutioner(command, externalApp)
|
||||||
|
|
||||||
if result.find('Success:') == -1:
|
if result.find('Success:') == -1:
|
||||||
raise BaseException(result)
|
raise BaseException(result)
|
||||||
|
|
||||||
command = "wp plugin activate %s --allow-root --path=%s" %(AllPluginList[i], finalPath)
|
command = f"{FinalPHPPath} -d error_reporting=0 /usr/bin/wp plugin activate %s --allow-root --path=%s" %(AllPluginList[i], finalPath)
|
||||||
result = ProcessUtilities.outputExecutioner(command, externalApp)
|
result = ProcessUtilities.outputExecutioner(command, externalApp)
|
||||||
except BaseException as msg:
|
except BaseException as msg:
|
||||||
logging.writeToFile("Error in istall plugin bucket: %s"%str(msg))
|
logging.writeToFile("Error in istall plugin bucket: %s"%str(msg))
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
||||||
# from filemanager.filemanager import FileManager
|
|
||||||
#
|
|
||||||
# fm = FileManager(None, None)
|
|
||||||
# fm.fixPermissions(self.masterDomain)
|
|
||||||
|
|
||||||
statusFile = open(tempStatusPath, 'w')
|
statusFile = open(tempStatusPath, 'w')
|
||||||
statusFile.writelines("Successfully Installed. [200]")
|
statusFile.writelines("Successfully Installed. [200]")
|
||||||
statusFile.close()
|
statusFile.close()
|
||||||
@@ -1669,6 +1663,7 @@ $parameters = array(
|
|||||||
|
|
||||||
def wordpressInstallNew(self):
|
def wordpressInstallNew(self):
|
||||||
try:
|
try:
|
||||||
|
|
||||||
from websiteFunctions.website import WebsiteManager
|
from websiteFunctions.website import WebsiteManager
|
||||||
import json
|
import json
|
||||||
tempStatusPath = self.data['tempStatusPath']
|
tempStatusPath = self.data['tempStatusPath']
|
||||||
|
|||||||
@@ -1156,13 +1156,11 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
|
|||||||
|
|
||||||
|
|
||||||
function ListInitialDatas(response) {
|
function ListInitialDatas(response) {
|
||||||
$('#wordpresshomeloading').hide();
|
//$('#wordpresshomeloading').hide();
|
||||||
|
|
||||||
if (response.data.abort === 1) {
|
if (response.data.abort === 1) {
|
||||||
|
|
||||||
if (response.data.installStatus === 1) {
|
if (response.data.installStatus === 1) {
|
||||||
|
|
||||||
|
|
||||||
$scope.wordpresshomeloading = true;
|
$scope.wordpresshomeloading = true;
|
||||||
$scope.stagingDetailsForm = true;
|
$scope.stagingDetailsForm = true;
|
||||||
$scope.installationProgress = false;
|
$scope.installationProgress = false;
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
Open
|
Open
|
||||||
</a>
|
</a>
|
||||||
<a target="_blank"
|
<a target="_blank"
|
||||||
href="/filemanager/{{ wpsite.owner.domain }}"
|
href="/filemanager/{{ wpsite.owner.domain }}?path={{wpsite.path}}"
|
||||||
style="margin-left: 4%">
|
style="margin-left: 4%">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg"
|
<svg xmlns="http://www.w3.org/2000/svg"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
@@ -441,7 +441,10 @@
|
|||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<button type="button" id="createbackupbutton"
|
<button type="button" id="createbackupbutton"
|
||||||
ng-click="CreateBackup()"
|
ng-click="CreateBackup()"
|
||||||
class="btn btn-primary btn-lg">{% trans "Create Backup" %}</button>
|
class="btn btn-primary btn-lg">{% trans "Create Backup" %}
|
||||||
|
<img style="display: none"
|
||||||
|
ng-hide="wordpresshomeloading"
|
||||||
|
src="{% static 'images/loading.gif' %}"></button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1391,7 +1391,6 @@ class WebsiteManager:
|
|||||||
extraArgs['pluginbucket'] = data['pluginbucket']
|
extraArgs['pluginbucket'] = data['pluginbucket']
|
||||||
except:
|
except:
|
||||||
extraArgs['pluginbucket'] = '-1'
|
extraArgs['pluginbucket'] = '-1'
|
||||||
|
|
||||||
extraArgs['adminUser'] = data['adminUser']
|
extraArgs['adminUser'] = data['adminUser']
|
||||||
extraArgs['PasswordByPass'] = data['PasswordByPass']
|
extraArgs['PasswordByPass'] = data['PasswordByPass']
|
||||||
extraArgs['adminPassword'] = data['PasswordByPass']
|
extraArgs['adminPassword'] = data['PasswordByPass']
|
||||||
|
|||||||
Reference in New Issue
Block a user