Commit Graph

5251 Commits

Author SHA1 Message Date
master3395
b034d54055 Standardize plugin version format to 1.0.0 and add semantic versioning explanation
- Update examplePlugin and emailMarketing meta.xml to use 1.0.0 format
- Add comprehensive semantic versioning section to plugin help page
- Explain major/minor/patch version numbers with examples
- Standardize all plugins to use three-number version format (X.Y.Z)
- Improve version tracking and update clarity for plugin developers
2026-01-20 01:47:18 +01:00
master3395
07a4c92f65 Add pm2Manager to INSTALLED_APPS and fix duplicate fail2ban
- Add pm2Manager to INSTALLED_APPS to enable template loading
- Fix duplicate fail2ban entry that was causing ImproperlyConfigured error
- Enables pm2Manager/settings.html template to be found by Django
2026-01-20 01:42:43 +01:00
master3395
571a34822f Fix plugin Settings button to use main route instead of /settings/
- Change default manage_url from /plugins/{plugin}/settings/ to /plugins/{plugin}/
- Many plugins don't have a /settings/ route but have a main route
- Ensures Settings button works for plugins like examplePlugin that only have a main route
- Still respects settings_url and url from meta.xml if provided
2026-01-20 01:39:35 +01:00
master3395
f05f850727 Ensure emailMarketing manage_url is always set correctly
- Add fallback handling for emailMarketing in else branch
- Ensures Settings button always has correct URL (/emailMarketing/)
- Prevents any edge case where manage_url might be wrong
2026-01-20 01:37:49 +01:00
master3395
4eb12a5f81 Fix plugin author display and add Settings button
- Add author field extraction from meta.xml in both plugin processing loops
- Update discordWebhooks meta.xml to include author: Master3395
- Update examplePlugin meta.xml to include author: usmannasir
- Add Plugin Settings button next to Deactivate/Uninstall buttons in both grid and table views
- Special handling for emailMarketing core plugin URL (/emailMarketing/ instead of /plugins/emailMarketing/)
- Add btn-settings styling for Settings button with hover effects
2026-01-20 01:31:18 +01:00
master3395
080749eaa4 Add markdown link and image support to plugin help pages
- Convert linked images (badges): [![alt](img_url)](link_url) to clickable <a><img></a>
- Convert regular images: ![alt](img_url) to <img> tags
- Convert regular links: [text](url) to <a> tags
- All external links open in new tab with security attributes
- Preserve existing HTML tags when wrapping paragraphs
- Fixes badge links not working in README.md content
2026-01-20 01:23:44 +01:00
master3395
5dff70c9e6 Add GitHub README.md and CHANGELOG.md fetching for plugin help pages
- Fetch CHANGELOG.md from GitHub if not found locally (non-blocking, 3s timeout)
- Fetch README.md from GitHub if no local help files found
- Provides version history and documentation for plugins from GitHub
- All GitHub fetches are optional and fail silently to avoid slow page loads
- Enhances plugin-specific help pages with complete information
2026-01-20 01:22:03 +01:00
master3395
5bf3499d6f Fix plugin-specific help pages and examplePlugin version
- Update examplePlugin version from 0 to 1.0 in meta.xml
- Implement proper plugin_help view to show plugin-specific information
- Reads plugin meta.xml for name, version, author, description
- Looks for README.md, HELP.md, CHANGELOG.md files in plugin directory
- Displays plugin information and version history
- Now shows plugin-specific help instead of redirecting to development guide
- Individual plugin Help buttons now show plugin-specific information
2026-01-20 01:19:14 +01:00
master3395
1c1886f4c2 Add proper CSS styling for Plugin Development Guide link button
- Add specific CSS rules for a.view-btn to ensure proper styling
- Help button now displays correctly next to Plugin Store button
- Matches styling of other view toggle buttons (hover effects, colors)
- Button is clearly visible and accessible for users
2026-01-20 01:11:09 +01:00
master3395
efb1a03c53 Add Plugin Development Guide button next to Plugin Store
- Add help button next to CyberPanel Plugin Store button
- Links to /plugins/help/ (Plugin Development Guide)
- Helps users understand how to work with plugins
- Button appears in both view toggle sections (with and without plugins)
- Styled consistently with other view toggle buttons
2026-01-20 01:09:43 +01:00
master3395
8cfe946397 Fix remaining code block in help.html - wrap with verbatim
- Wrap second Django template code example (line 500) with {% verbatim %} tags
- Ensures all Django template syntax in code examples is properly escaped
- Fixes remaining 'Invalid block tag' error on line 660
2026-01-20 01:05:47 +01:00
master3395
1fd893357c Fix help.html template - use verbatim tags for code examples
- Wrap Django template code examples with {% verbatim %} tags
- Prevents Django from parsing template syntax in documentation code blocks
- Fixes 'Invalid block tag' error when displaying code examples
- All code examples now display correctly without syntax errors
2026-01-20 01:05:19 +01:00
master3395
d388e993d5 Fix help.html template - escape Django template tags in code examples
- Replace {% with {%% in code examples to prevent template parsing errors
- Fixes 'block tag with name title appears more than once' error
- Code examples now display correctly without being parsed as actual template blocks
2026-01-20 01:01:40 +01:00
master3395
32561dd9e5 Fix processed_plugins tracking - move add() after successful processing
- Move processed_plugins.add() to after plugin is successfully added to pluginList
- Prevents plugins from being marked as processed if they fail validation
- Ensures pm2Manager and other store-installed plugins show up correctly
2026-01-20 00:55:43 +01:00
master3395
bcc73e4352 Fix installed plugins view to show plugins installed from store - final fix
- Add logic to check installed plugins that don't have source directories
- Fixes issue where PM2 Manager (installed from store) wasn't showing
- Moved processed_plugins.add() to correct location in code flow
- Now shows all 4 installed plugins: testPlugin, discordWebhooks, fail2ban, pm2Manager
2026-01-20 00:55:24 +01:00
master3395
ed84555ddf 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
2026-01-20 00:53:18 +01:00
master3395
f2acb8bbfc Fix pluginInstaller encoding issues and installation timing
- Add UTF-8 encoding to all file operations in pluginInstaller
- Fix ASCII codec error in removeFromSettings and removeFromURLs
- Add 2 second delay after installation to allow filesystem sync
- Fix fileinput.input encoding issue in removeFromURLs
- Update uninstall confirmation message to warn about data deletion
- Fixes plugin installation and uninstallation from store
2026-01-20 00:47:49 +01:00
master3395
fa6ce67f24 Fix 500 error and pluginInstaller fileinput encoding issue
- Revert GitHub API fetching in installed() view to use local file modification time (prevents timeouts)
- Fix fileinput.input() encoding issue in pluginInstaller.removeFromURLs()
- Replace fileinput with manual file read/write using utf-8 encoding
- Add missing import re to pluginInstaller
- Fixes 500 Internal Server Error on CyberPanel pages
- Fixes plugin installation from store
2026-01-20 00:38:21 +01:00
master3395
046d5458bd Disable GitHub API calls for modify_date in installed() view
- Use local file modification time by default to prevent timeouts
- GitHub API calls commented out (can be enabled if needed)
- Improves page load performance
- Prevents 500 errors from API timeouts
2026-01-20 00:08:46 +01:00
master3395
271507eff2 Add better error handling for pluginInstaller exceptions
- Catch and re-raise exceptions from pluginInstaller.installPlugin()
- Add logging for installation steps
- Improve error messages for debugging
2026-01-19 23:44:52 +01:00
master3395
d5e8edc9bd Fix plugin ZIP structure for installation
- Add plugin name as directory prefix in ZIP file
- pluginInstaller expects ZIP to contain plugin_name/ directory
- Fixes installation failure where plugin directory was not created
2026-01-19 23:39:48 +01:00
master3395
48e11f19ed Update uninstall confirmation message
- Change message to warn that all data will be deleted
- Apply to both local and store uninstall functions
2026-01-19 23:36:50 +01:00
master3395
336b7001c9 Implement plugin installation from GitHub store
- Download plugin from GitHub repository
- Extract plugin directory from repo ZIP
- Create plugin ZIP file
- Use pluginInstaller to install plugin
- Set plugin to enabled by default after installation
- Add comprehensive error handling and logging
- Fixes 'Plugin store installation not implemented' error
2026-01-19 23:34:28 +01:00
master3395
e359332622 Add cache duration notice to Plugin Store
- Inform users that plugin store data is cached for 1 hour
- Explain that new plugins may take up to 1 hour to appear
- Improve transparency about cache behavior
2026-01-19 23:31:22 +01:00
master3395
c7c907b8e2 Merge branch 'v2.5.5-dev' of https://github.com/master3395/cyberpanel into v2.5.5-dev 2026-01-19 22:56:12 +01:00
master3395
82d68ab5a3 Add Modify Date column, GitHub commit date fetching, and plugin store caching
- Added Modify Date column to both Table View and Plugin Store
- Implemented GitHub API integration to fetch last commit dates
- Added caching system for plugin store to prevent rate limit errors
- Enhanced plugin store with installed/enabled status enrichment
- Added comprehensive plugin development guide
- Updated testPlugin meta.xml author to usmannasir
2026-01-19 22:55:59 +01:00
master3395
545e85a78a Merge branch 'v2.5.5-dev' of https://github.com/master3395/cyberpanel into v2.5.5-dev 2026-01-19 21:59:46 +01:00
master3395
a7b250d40f Fix dashboard stats loading - match v2.4.4 implementation
- Simplified getSystemStatus to return HttpResponse without explicit content_type
- Removed excessive logging and complex error handling
- Simplified systemStatusInfo controller to match v2.4.4 behavior
- Simplified pollDashboardStats to match v2.4.4 implementation
- Removed CSRF token headers from GET requests
- Fixed dashboard stats (CPU, RAM, Disk, Uptime, Users, Sites, DBs, Emails, FTP) not loading
- Matches working v2.4.4 implementation exactly
2026-01-19 21:59:02 +01:00
master3395
28efa90222 Add automatic rainloop to snappymail data migration for 2.4.4 -> 2.5.5-dev upgrades
- Added migrateRainloopToSnappymail() function to automatically migrate email data
- Migrates from /usr/local/lscp/cyberpanel/rainloop/data to /usr/local/lscp/cyberpanel/snappymail/data
- Uses rsync to preserve permissions and ownership
- Updates include.php files to use new snappymail path
- Includes safety checks to prevent data overwriting
- Added migration logic to cyberpanel_upgrade.sh
- Updated default paths from rainloop to snappymail
- Deprecates rainloop folder in 2.5.5-dev
2026-01-19 20:55:51 +01:00
master3395
4c69a8c329 Fix topProcesses page: Remove auto-refresh and fix double percentage signs
- Remove auto-refresh timeout (3 seconds) from topProcesses page
- Add manual refresh button in page header
- Fix double percentage signs (%% -> %) in CPU Time Distribution
- Remove duplicate serverStatus.js script loading in footer_scripts block

Changes:
- Removed $timeout($scope.topProcessesStatus, 3000) from serverStatus.js
- Removed extra % sign from template (backend already includes % in values)
- Added refresh button with loading state indicator
2026-01-19 20:21:12 +01:00
master3395
fa5af04ec7 Fix createUser template to match v2.4.4 - remove Home Directory section and user_filters load
- Removed {% load user_filters %} which is not needed in v2.4.4
- Removed Home Directory selection section (not in v2.4.4)
- Changed securityLevels to use direct Django template rendering instead of JSON encoding
- Template now matches GitHub v2.4.4 exactly
2026-01-19 19:24:13 +01:00
master3395
d17b7f1c7d Fix log parsing: correctly reconstruct resource path and timestamp
- Fixed timestamp parsing to combine fields 3 and 4 (timestamp can be split across fields)
- Fixed resource path parsing to handle query parameters (path may span multiple fields)
- Fixed size extraction to use field 9 instead of field 8 (size comes after status code)
- Resource path now correctly reconstructed until HTTP/version field is found
2026-01-19 18:55:56 +01:00
master3395
dfeeeb16a7 Fix: Remove fallback to master domain log file for child domains
- Removed fallback logic that was reading from master domain log file when child domain log file was empty
- This was causing cross-contamination - showing API logs when viewing cmstest logs
- Now only reads from the specific domain's log file as determined by _get_log_file_path()
- Fixed log parsing to correctly extract resource path (field 5) and size (field 8)
- Log format doesn't include domain name, so domain is determined by which log file is read

The issue was that when cmstest log file was old/empty, the code was falling back to
reading from newstargeted.com.access_log which contained logs from all sub-domains,
causing API logs to appear when viewing cmstest logs.
2026-01-19 18:55:32 +01:00
master3395
78a69096ef Add domain filtering to access log display
- Added domain filtering in getDataFromLogFile() to only show log entries for the requested domain
- Handles cases where vhost config hasn't been updated and multiple sub-domains log to the same file
- Filters out entries from other domains even if they're in the same log file
- Added error handling for malformed log entries
- Added fallback to master domain log file if child domain log file doesn't exist or is empty

This ensures that when viewing logs for a sub-domain, only that sub-domain's logs are displayed,
even if the vhost configuration still points to the master domain's log file (which needs to be fixed separately).
2026-01-19 18:49:06 +01:00
master3395
2b8377da7f Permanent fix: ensure all new child domains get correct log configuration
- Fixed perHostDomainConf() to replace {virtualHostName} placeholder in olsChildConf template
- Updated lswsChildConf template to use master domain log directory
- Updated lswsRediConfChild and lswsRediConfChildWWW templates to use master domain log directory
- Added automatic log directory and log file creation for child domains during creation
- Log files are now created at /home/{masterDomain}/logs/{childDomain}.{access|error}_log
- Ensures all newly created sub-domains automatically have separate log files from the start

This permanent fix ensures that when child domains are created:
1. VHost config uses correct log paths pointing to master domain's log directory
2. Log directory is created if it doesn't exist
3. Separate log files are created for each child domain with proper permissions
4. Works for both OpenLiteSpeed (OLS) and LiteSpeed Enterprise (LSWS) configurations

Fixes the root cause so all future child domain creations will have correct log configuration automatically.
2026-01-19 18:46:16 +01:00
master3395
fdf5b2abcb Fix sub-domain log viewing: properly handle child domain log paths
- Added _get_log_file_path() helper method to correctly determine log file paths
- For child domains (sub-domains), logs are stored in master domain's log directory
- Updated getDataFromLogFile() and fetchErrorLogs() to use the helper method
- Fixes issue where sub-domain logs couldn't be viewed in CyberPanel UI
- Logs are now correctly located at /home/{master_domain}/logs/{subdomain}.{access|error}_log

This resolves the bug where viewing logs for sub-domains would fail because
the code was looking for logs in /home/{subdomain}/logs/ instead of the
correct location /home/{master_domain}/logs/{subdomain}.{access|error}_log
2026-01-19 18:39:19 +01:00
master3395
00a3bdc5be Remove duplicate createUserCtr controller - merge home directory functionality into external JS file 2026-01-19 18:29:18 +01:00
master3395
1b40e1bc14 Fix createUser template: correct URL path, use AngularJS delimiters, fix controller logic 2026-01-19 18:26:24 +01:00
master3395
76b3f664a6 Fix Django template syntax error - use AngularJS delimiters for || operator in modifyUser 2026-01-19 18:24:47 +01:00
master3395
58f7d5d855 Fix AngularJS delimiters in modifyWebsite template for consistency 2026-01-19 18:24:11 +01:00
master3395
85be82a69d Fix Django template syntax error - use AngularJS delimiters for || operator 2026-01-19 18:23:54 +01:00
master3395
5a181e9389 Add user_filters to modifyUser template for consistency 2026-01-19 18:22:10 +01:00
master3395
b44b626d16 Add Django filesize template filter to fix createUser and modifyWebsite errors 2026-01-19 18:20:57 +01:00
master3395
021ed4dfa5 Add AngularJS filesize filter to fix createUser page error 2026-01-19 18:20:21 +01:00
master3395
fedf5817cc Fix dashboard data binding - use ng-bind instead of template syntax and add ng-cloak 2026-01-19 18:16:56 +01:00
master3395
7bab1bdf75 Fix dashboard data loading - add error handling and force AngularJS updates 2026-01-19 18:15:40 +01:00
master3395
3951979242 Add icon support for View Details button in .htaccess notification 2026-01-19 18:10:21 +01:00
master3395
f6b759d31b Force icon display with !important and add info icon to Learn More button 2026-01-19 18:07:33 +01:00
master3395
d237358168 Fix Learn More button text visibility and ensure .htaccess icon displays 2026-01-19 18:06:19 +01:00
master3395
513c61eab0 Make Learn More button text prominent and fix notification links 2026-01-19 18:03:39 +01:00