mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 22:06:05 +01:00
wp sites under main sites
This commit is contained in:
@@ -2425,7 +2425,17 @@ Require valid-user"""
|
|||||||
return HttpResponse(json_data)
|
return HttpResponse(json_data)
|
||||||
|
|
||||||
def findWebsitesListJson(self, websites):
|
def findWebsitesListJson(self, websites):
|
||||||
|
try:
|
||||||
|
ipFile = "/etc/cyberpanel/machineIP"
|
||||||
|
f = open(ipFile)
|
||||||
|
ipData = f.read()
|
||||||
|
ipAddress = ipData.split('\n', 1)[0]
|
||||||
|
except BaseException as msg:
|
||||||
|
logging.CyberCPLogFileWriter.writeToFile("Failed to read machine IP, error:" + str(msg))
|
||||||
|
ipAddress = "192.168.100.1"
|
||||||
|
|
||||||
json_data = []
|
json_data = []
|
||||||
|
|
||||||
for website in websites:
|
for website in websites:
|
||||||
wp_sites = []
|
wp_sites = []
|
||||||
try:
|
try:
|
||||||
@@ -2445,10 +2455,9 @@ Require valid-user"""
|
|||||||
'adminEmail': website.adminEmail,
|
'adminEmail': website.adminEmail,
|
||||||
'phpVersion': website.phpSelection,
|
'phpVersion': website.phpSelection,
|
||||||
'state': website.state,
|
'state': website.state,
|
||||||
'ipAddress': website.ipAddress,
|
'ipAddress': ipAddress,
|
||||||
'diskUsed': website.diskUsed,
|
'package': website.package.packageName,
|
||||||
'package': website.package,
|
'admin': website.admin.userName,
|
||||||
'admin': website.admin,
|
|
||||||
'wp_sites': wp_sites
|
'wp_sites': wp_sites
|
||||||
})
|
})
|
||||||
return json.dumps(json_data)
|
return json.dumps(json_data)
|
||||||
|
|||||||
Reference in New Issue
Block a user