mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-01-28 18:29:05 +01:00
Fix installed plugins view to show plugins installed from store
- Add logic to check installed plugins that don't have source directories - Fixes issue where PM2 Manager (installed from store) wasn't showing in installed list - Now shows all installed plugins regardless of whether they have source in /home/cyberpanel/plugins/ - Prevents duplicate plugin entries by tracking processed plugins
This commit is contained in:
@@ -69,9 +69,12 @@ def help_page(request):
|
||||
def installed(request):
|
||||
mailUtilities.checkHome()
|
||||
pluginPath = '/home/cyberpanel/plugins'
|
||||
installedPath = '/usr/local/CyberCP'
|
||||
pluginList = []
|
||||
errorPlugins = []
|
||||
processed_plugins = set() # Track which plugins we've already processed
|
||||
|
||||
# First, process plugins from source directory
|
||||
if os.path.exists(pluginPath):
|
||||
for plugin in os.listdir(pluginPath):
|
||||
# Skip files (like .zip files) - only process directories
|
||||
@@ -81,7 +84,7 @@ def installed(request):
|
||||
|
||||
data = {}
|
||||
# Try installed location first, then fallback to source location
|
||||
completePath = '/usr/local/CyberCP/' + plugin + '/meta.xml'
|
||||
completePath = installedPath + '/' + plugin + '/meta.xml'
|
||||
sourcePath = os.path.join(pluginDir, 'meta.xml')
|
||||
|
||||
# Determine which meta.xml to use
|
||||
@@ -98,6 +101,8 @@ def installed(request):
|
||||
# No meta.xml found in either location - skip silently
|
||||
continue
|
||||
|
||||
processed_plugins.add(plugin)
|
||||
|
||||
pluginMetaData = ElementTree.parse(metaXmlPath)
|
||||
root = pluginMetaData.getroot()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user